// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/style-engine.min.js?ver=faa37ce61b7ec8394b2a 
"use strict";var wp;(wp||={}).styleEngine=(()=>{var _=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var J=(r,e)=>{for(var t in e)_(r,t,{get:e[t],enumerable:!0})},Y=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of K(e))!X.call(r,i)&&i!==t&&_(r,i,{get:()=>e[i],enumerable:!(o=W(e,i))||o.enumerable});return r};var q=r=>Y(_({},"__esModule",{value:!0}),r);var $e={};J($e,{compileCSS:()=>He,getCSSRules:()=>N,getCSSValueFromRawStyle:()=>g});var l=function(){return l=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++){t=arguments[o];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(this,arguments)};function R(r){return r.toLowerCase()}var Q=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ee=/[^A-Z0-9]+/gi;function E(r,e){e===void 0&&(e={});for(var t=e.splitRegexp,o=t===void 0?Q:t,i=e.stripRegexp,a=i===void 0?ee:i,u=e.transform,f=u===void 0?R:u,p=e.delimiter,m=p===void 0?" ":p,c=S(S(r,o,"$1\0$2"),a,"\0"),b=0,v=c.length;c.charAt(b)==="\0";)b++;for(;c.charAt(v-1)==="\0";)v--;return c.slice(b,v).split("\0").map(f).join(m)}function S(r,e,t){return e instanceof RegExp?r.replace(e,t):e.reduce(function(o,i){return o.replace(i,t)},r)}function O(r,e){return e===void 0&&(e={}),E(r,l({delimiter:"."},e))}function d(r,e){return e===void 0&&(e={}),O(r,l({delimiter:"-"},e))}var w="var:",j="|",A="--";var x=(r,e)=>{let t=r;return e.forEach(o=>{t=t?.[o]}),t};function n(r,e,t,o){let i=x(r,t);return i?[{selector:e?.selector,key:o,value:g(i)}]:[]}function s(r,e,t,o,i=["top","right","bottom","left"]){let a=x(r,t);if(!a)return[];let u=[];if(typeof a=="string")u.push({selector:e?.selector,key:o.default,value:g(a)});else{let f=i.reduce((p,m)=>{let c=g(x(a,[m]));return c&&p.push({selector:e?.selector,key:o?.individual.replace("%s",P(m)),value:c}),p},[]);u.push(...f)}return u}function g(r){return typeof r=="string"&&r.startsWith(w)?`var(--wp--${r.slice(w.length).split(j).map(t=>d(t,{splitRegexp:[/([a-z0-9])([A-Z])/g,/([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})).join(A)})`:r}function P(r){let[e,...t]=r;return e.toUpperCase()+t.join("")}function T(r){let[e,...t]=r;return e.toLowerCase()+t.map(P).join("")}function I(r){try{return decodeURI(r)}catch{return r}}function y(r){return(e,t)=>n(e,t,r,T(r))}function h(r){return(e,t)=>["color","style","width"].flatMap(o=>y(["border",r,o])(e,t))}var re={name:"color",generate:y(["border","color"])},te={name:"radius",generate:(r,e)=>s(r,e,["border","radius"],{default:"borderRadius",individual:"border%sRadius"},["topLeft","topRight","bottomLeft","bottomRight"])},ne={name:"style",generate:y(["border","style"])},oe={name:"width",generate:y(["border","width"])},ae={name:"borderTop",generate:h("top")},ie={name:"borderRight",generate:h("right")},ue={name:"borderBottom",generate:h("bottom")},fe={name:"borderLeft",generate:h("left")},C=[re,ne,oe,te,ae,ie,ue,fe];var ce={name:"background",generate:(r,e)=>n(r,e,["color","background"],"backgroundColor")},k=ce;var le={name:"gradient",generate:(r,e)=>n(r,e,["color","gradient"],"background")},D=le;var se={name:"text",generate:(r,e)=>n(r,e,["color","text"],"color")},L=se;var F=[L,D,k];var pe={name:"height",generate:(r,e)=>n(r,e,["dimensions","height"],"height")},de={name:"minHeight",generate:(r,e)=>n(r,e,["dimensions","minHeight"],"minHeight")},ge={name:"aspectRatio",generate:(r,e)=>n(r,e,["dimensions","aspectRatio"],"aspectRatio")},me={name:"width",generate:(r,e)=>n(r,e,["dimensions","width"],"width")},B=[pe,de,ge,me];var ye={name:"backgroundImage",generate:(r,e)=>{let t=r?.background?.backgroundImage;return typeof t=="object"&&t?.url?[{selector:e.selector,key:"backgroundImage",value:`url( '${encodeURI(I(t.url))}' )`}]:n(r,e,["background","backgroundImage"],"backgroundImage")}},he={name:"backgroundPosition",generate:(r,e)=>n(r,e,["background","backgroundPosition"],"backgroundPosition")},be={name:"backgroundRepeat",generate:(r,e)=>n(r,e,["background","backgroundRepeat"],"backgroundRepeat")},ve={name:"backgroundSize",generate:(r,e)=>n(r,e,["background","backgroundSize"],"backgroundSize")},_e={name:"backgroundAttachment",generate:(r,e)=>n(r,e,["background","backgroundAttachment"],"backgroundAttachment")},z=[ye,he,be,ve,_e];var we={name:"shadow",generate:(r,e)=>n(r,e,["shadow"],"boxShadow")},H=[we];var xe={name:"color",generate:(r,e,t=["outline","color"],o="outlineColor")=>n(r,e,t,o)},Re={name:"offset",generate:(r,e,t=["outline","offset"],o="outlineOffset")=>n(r,e,t,o)},Se={name:"style",generate:(r,e,t=["outline","style"],o="outlineStyle")=>n(r,e,t,o)},Ee={name:"width",generate:(r,e,t=["outline","width"],o="outlineWidth")=>n(r,e,t,o)},$=[xe,Se,Re,Ee];var Oe={name:"padding",generate:(r,e)=>s(r,e,["spacing","padding"],{default:"padding",individual:"padding%s"})},U=Oe;var je={name:"margin",generate:(r,e)=>s(r,e,["spacing","margin"],{default:"margin",individual:"margin%s"})},M=je;var V=[M,U];var Ae={name:"fontSize",generate:(r,e)=>n(r,e,["typography","fontSize"],"fontSize")},Pe={name:"fontStyle",generate:(r,e)=>n(r,e,["typography","fontStyle"],"fontStyle")},Te={name:"fontWeight",generate:(r,e)=>n(r,e,["typography","fontWeight"],"fontWeight")},Ie={name:"fontFamily",generate:(r,e)=>n(r,e,["typography","fontFamily"],"fontFamily")},Ce={name:"letterSpacing",generate:(r,e)=>n(r,e,["typography","letterSpacing"],"letterSpacing")},ke={name:"lineHeight",generate:(r,e)=>n(r,e,["typography","lineHeight"],"lineHeight")},De={name:"textColumns",generate:(r,e)=>n(r,e,["typography","textColumns"],"columnCount")},Le={name:"textDecoration",generate:(r,e)=>n(r,e,["typography","textDecoration"],"textDecoration")},Fe={name:"textIndent",generate:(r,e)=>n(r,e,["typography","textIndent"],"textIndent")},Be={name:"textTransform",generate:(r,e)=>n(r,e,["typography","textTransform"],"textTransform")},ze={name:"writingMode",generate:(r,e)=>n(r,e,["typography","writingMode"],"writingMode")},Z=[Ie,Ae,Pe,Te,Ce,ke,De,Le,Fe,Be,ze];var G=[...C,...F,...B,...$,...V,...Z,...H,...z];function He(r,e={}){let t=N(r,e);if(!e?.selector){let a=[];return t.forEach(u=>{a.push(`${d(u.key)}: ${u.value};`)}),a.join(" ")}let o=t.reduce((a,u)=>{let{selector:f}=u;return f&&(a[f]||(a[f]=[]),a[f].push(u)),a},{});return Object.keys(o).reduce((a,u)=>(a.push(`${u} { ${o[u].map(f=>`${d(f.key)}: ${f.value};`).join(" ")} }`),a),[]).join(`
`)}function N(r,e={}){let t=[];return G.forEach(o=>{typeof o.generate=="function"&&t.push(...o.generate(r,e))}),t}return q($e);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/theme.min.js?ver=e22ce547a4420507b323 
var wp;(wp||={}).theme=(()=>{var ao=Object.create;var Le=Object.defineProperty;var no=Object.getOwnPropertyDescriptor;var so=Object.getOwnPropertyNames;var io=Object.getPrototypeOf,lo=Object.prototype.hasOwnProperty;var Ve=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),fo=(t,e)=>{for(var r in e)Le(t,r,{get:e[r],enumerable:!0})},Nt=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of so(e))!lo.call(t,a)&&a!==r&&Le(t,a,{get:()=>e[a],enumerable:!(o=no(e,a))||o.enumerable});return t};var de=(t,e,r)=>(r=t!=null?ao(io(t)):{},Nt(e||!t||!t.__esModule?Le(r,"default",{value:t,enumerable:!0}):r,t)),co=t=>Nt(Le({},"__esModule",{value:!0}),t);var Pt=Ve((ya,Bt)=>{Bt.exports=window.wp.privateApis});var Re=Ve((va,Ft)=>{Ft.exports=window.wp.element});var Ur=Ve((Mf,Kr)=>{Kr.exports=window.ReactJSXRuntime});var wa={};fo(wa,{privateApis:()=>At});var Ht=de(Pt(),1),{lock:$t,unlock:Sa}=(0,Ht.__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/theme");var Ue=de(Re(),1);var jt=de(Re(),1),Ie=(0,jt.createContext)({resolvedSettings:{color:{}}});function et(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function M(t,e,r=[0,0,0]){let o=et(t,e[0]),a=et(t,e[1]),s=et(t,e[2]);return r[0]=o,r[1]=a,r[2]=s,r}function Ae(t){return ee(t)==="string"}function ee(t){return(Object.prototype.toString.call(t).match(/^\[object\s+(.*?)\]$/)[1]||"").toLowerCase()}function Oe(t,{precision:e=16,unit:r}){return L(t)?"none":(t=+tt(t,e),t+(r??""))}function L(t){return t===null}function tt(t,e){if(t===0)return 0;let r=~~t,o=0;r&&e&&(o=~~Math.log10(Math.abs(r))+1);let a=10**(e-o);return Math.floor(t*a+.5)/a}function rt(t,e,r){return isNaN(t)?e:isNaN(e)?t:t+(e-t)*r}function uo(t,e,r){return(r-t)/(e-t)}function ot(t,e,r){return!t||!e||t===e||t[0]===e[0]&&t[1]===e[1]||isNaN(r)||r===null?r:rt(e[0],e[1],uo(t[0],t[1],r))}function Te(t,e,r){return Math.max(Math.min(r,e),t)}function Ee(t,e){return Math.sign(t)===Math.sign(e)?t:-t}function O(t,e){return Ee(Math.abs(t)**e,t)}function at(t,e){return e===0?0:t/e}function Gt(t,e,r=0,o=t.length){for(;r<o;){let a=r+o>>1;t[a]<e?r=a+1:o=a}return r}function ie(t,e){if(t instanceof e)return!0;let r=e.name;for(;t;){let o=Object.getPrototypeOf(t),a=o?.constructor?.name;if(a===r)return!0;if(!a||a==="Object")return!1;t=o}return!1}var le=class{type;coordMeta;coordRange;range;constructor(e,r){if(typeof e=="object"&&(this.coordMeta=e),r&&(this.coordMeta=r,this.coordRange=r.range??r.refRange),typeof e=="string"){let o=e.trim().match(/^(?<type><[a-z]+>)(\[(?<min>-?[.\d]+),\s*(?<max>-?[.\d]+)\])?$/);if(!o)throw new TypeError(`Cannot parse ${e} as a type definition.`);this.type=o.groups.type;let{min:a,max:s}=o.groups;(a||s)&&(this.range=[+a,+s])}}get computedRange(){return this.range?this.range:this.type==="<percentage>"?this.percentageRange():this.type==="<angle>"?[0,360]:null}get unit(){return this.type==="<percentage>"?"%":this.type==="<angle>"?"deg":""}resolve(e){if(this.type==="<angle>")return e;let r=this.computedRange,o=this.coordRange;return this.type==="<percentage>"&&(o??=this.percentageRange()),ot(r,o,e)}serialize(e,r){let o=this.type==="<percentage>"?this.percentageRange(100):this.computedRange,a=this.unit;return e=ot(this.coordRange,o,e),Oe(e,{unit:a,precision:r})}toString(){let e=this.type;if(this.range){let[r="",o=""]=this.range;e+=`[${r},${o}]`}return e}percentageRange(e=1){let r;return this.coordMeta&&this.coordMeta.range||this.coordRange&&this.coordRange[0]>=0?r=[0,1]:r=[-1,1],[r[0]*e,r[1]*e]}static get(e,r){return ie(e,this)?e:new this(e,r)}};var nt=Symbol("instance"),fe=class t{type;name;spaceCoords;coords;id;alpha;constructor(e,r=e.space){e[nt]=this,this.type="function",this.name="color",Object.assign(this,e),this.space=r,this.type!=="custom"&&(this.spaceCoords=Object.values(r.coords),this.coords||(this.coords=this.spaceCoords.map(o=>{let a=["<number>","<percentage>"];return o.type==="angle"&&a.push("<angle>"),a})),this.coords=this.coords.map((o,a)=>{let s=this.spaceCoords[a];return typeof o=="string"&&(o=o.trim().split(/\s*\|\s*/)),o.map(n=>le.get(n,s))}))}serializeCoords(e,r,o){return o=e.map((a,s)=>le.get(o?.[s]??this.coords[s][0],this.spaceCoords[s])),e.map((a,s)=>o[s].serialize(a,r))}coerceCoords(e,r){return Object.entries(this.space.coords).map(([o,a],s)=>{let n=e[s];if(L(n)||isNaN(n))return n;let i=r[s],l=this.coords[s].find(f=>f.type==i);if(!l){let f=a.name||o;throw new TypeError(`${i??n?.raw??n} not allowed for ${f} in ${this.name}()`)}return n=l.resolve(n),l.range&&(r[s]=l.toString()),n})}canSerialize(){return this.type==="function"||this.serialize}parse(e){return null}static get(e,...r){return!e||ie(e,this)?e:e[nt]?e[nt]:new t(e,...r)}};var st=class{add(e,r,o){if(typeof arguments[0]!="string"){for(var e in arguments[0])this.add(e,arguments[0][e],arguments[1]);return}(Array.isArray(e)?e:[e]).forEach(function(a){this[a]=this[a]||[],r&&this[a][o?"unshift":"push"](r)},this)}run(e,r){this[e]=this[e]||[],this[e].forEach(function(o){o.call(r&&r.context?r.context:r,r)})}},mo=new st,te=mo;var N={D50:[.3457/.3585,1,(1-.3457-.3585)/.3585],D65:[.3127/.329,1,(1-.3127-.329)/.329]};function _e(t){return Array.isArray(t)?t:N[t]}function re(t,e,r,o={}){if(t=_e(t),e=_e(e),!t||!e)throw new TypeError(`Missing white point to convert ${t?"":"from"}${!t&&!e?"/":""}${e?"":"to"}`);if(t===e)return r;let a={W1:t,W2:e,XYZ:r,options:o};if(te.run("chromatic-adaptation-start",a),a.M||(a.W1===N.D65&&a.W2===N.D50?a.M=[[1.0479297925449969,.022946870601609652,-.05019226628920524],[.02962780877005599,.9904344267538799,-.017073799063418826],[-.009243040646204504,.015055191490298152,.7518742814281371]]:a.W1===N.D50&&a.W2===N.D65&&(a.M=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]])),te.run("chromatic-adaptation-end",a),a.M)return M(a.XYZ,a.M);throw new TypeError("Only Bradford CAT with white points D50 and D65 supported for now.")}var X={gamut_mapping:"css",precision:5,deltaE:"76",verbose:globalThis?.process?.env?.NODE_ENV?.toLowerCase()!=="test",warn:function(e){this.verbose&&globalThis?.console?.warn?.(e)}};function it(t,e){let r={str:String(t)?.trim(),options:e};if(te.run("parse-start",r),r.color)return r.color;r.parsed=go(r.str);let o,a=r.options?r.options.parseMeta??r.options.meta:null;if(r.parsed){let s=r.parsed.name,n,i,l=r.parsed.args,f=l.map((c,b)=>r.parsed.argMeta[b]?.type);if(s==="color"){let c=l.shift();f.shift();let b=c.startsWith("--")?c.substring(2):`--${c}`,d=[c,b];if(n=m.findFormat({name:s,id:d,type:"function"}),!n){let g,h=c in m.registry?c:b;if(h in m.registry){let w=m.registry[h].formats?.color?.id;w&&(g=`Did you mean ${t.replace("color("+c,"color("+w)}?`)}throw new TypeError(`Cannot parse ${r.str}. `+(g??"Missing a plugin?"))}i=n.space,n.id.startsWith("--")&&!c.startsWith("--")&&X.warn(`${i.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${n.id}) instead of color(${c}).`),c.startsWith("--")&&!n.id.startsWith("--")&&X.warn(`${i.name} is a standard space and supported in the CSS spec. Use color(${n.id}) instead of prefixed color(${c}).`)}else n=m.findFormat({name:s,type:"function"}),i=n.space;a&&Object.assign(a,{format:n,formatId:n.name,types:f,commas:r.parsed.commas});let p=1;r.parsed.lastAlpha&&(p=r.parsed.args.pop(),a&&(a.alphaType=f.pop()));let u=n.coords.length;if(l.length!==u)throw new TypeError(`Expected ${u} coordinates for ${i.id} in ${r.str}), got ${l.length}`);l=n.coerceCoords(l,f),o={spaceId:i.id,coords:l,alpha:p}}else e:for(let s of m.all)for(let n in s.formats){let i=s.formats[n];if(i.type!=="custom"||i.test&&!i.test(r.str))continue;let l=s.getFormat(i),f=l.parse(r.str);if(f){a&&Object.assign(a,{format:l,formatId:n}),o=f;break e}}if(!o)throw new TypeError(`Could not parse ${t} as a color. Missing a plugin?`);return o.alpha=L(o.alpha)?o.alpha:o.alpha===void 0?1:Te(0,o.alpha,1),o}var Wt={"%":.01,deg:1,grad:.9,rad:180/Math.PI,turn:360},De={function:/^([a-z]+)\(((?:calc\(NaN\)|.)+?)\)$/i,number:/^([-+]?(?:[0-9]*\.)?[0-9]+(e[-+]?[0-9]+)?)$/i,unitValue:RegExp(`(${Object.keys(Wt).join("|")})$`),singleArgument:/\/?\s*(none|NaN|calc\(NaN\)|[-+\w.]+(?:%|deg|g?rad|turn)?)/g};function po(t){let e={},r=t.match(De.unitValue)?.[0],o=e.raw=t;return r?(e.type=r==="%"?"<percentage>":"<angle>",e.unit=r,e.unitless=Number(o.slice(0,-r.length)),o=e.unitless*Wt[r]):De.number.test(o)?(o=Number(o),e.type="<number>"):o==="none"?o=null:o==="NaN"||o==="calc(NaN)"?(o=NaN,e.type="<number>"):e.type="<ident>",{value:o,meta:e}}function go(t){if(!t)return;t=t.trim();let e=t.match(De.function);if(e){let r=[],o=[],a=!1,s=e[1].toLowerCase(),n=e[2].replace(De.singleArgument,(i,l)=>{let{value:f,meta:p}=po(l);return(i.startsWith("/")||s!=="color"&&r.length===3)&&(a=!0),r.push(f),o.push(p),""});return{name:s,args:r,argMeta:o,lastAlpha:a,commas:n.includes(","),rawName:e[1],rawArgs:e[2]}}}function x(t,e){if(Array.isArray(t))return t.map(o=>x(o,e));if(!t)throw new TypeError("Empty color reference");Ae(t)&&(t=it(t,e));let r=t.space||t.spaceId;return typeof r=="string"&&(t.space=m.get(r)),t.alpha===void 0&&(t.alpha=1),t}var ho=75e-6,m=class t{constructor(e){this.id=e.id,this.name=e.name,this.base=e.base?t.get(e.base):null,this.aliases=e.aliases,this.base&&(this.fromBase=e.fromBase,this.toBase=e.toBase);let r=e.coords??this.base.coords;for(let a in r)"name"in r[a]||(r[a].name=a);this.coords=r;let o=e.white??this.base.white??"D65";this.white=_e(o),this.formats=e.formats??{};for(let a in this.formats){let s=this.formats[a];s.type||="function",s.name||=a}this.formats.color?.id||(this.formats.color={...this.formats.color??{},id:e.cssId||this.id}),e.gamutSpace?this.gamutSpace=e.gamutSpace==="self"?this:t.get(e.gamutSpace):this.isPolar?this.gamutSpace=this.base:this.gamutSpace=this,this.gamutSpace.isUnbounded&&(this.inGamut=(a,s)=>!0),this.referred=e.referred,Object.defineProperty(this,"path",{value:bo(this).reverse(),writable:!1,enumerable:!0,configurable:!0}),te.run("colorspace-init-end",this)}inGamut(e,{epsilon:r=ho}={}){if(!this.equals(this.gamutSpace))return e=this.to(this.gamutSpace,e),this.gamutSpace.inGamut(e,{epsilon:r});let o=Object.values(this.coords);return e.every((a,s)=>{let n=o[s];if(n.type!=="angle"&&n.range){if(L(a))return!0;let[i,l]=n.range;return(i===void 0||a>=i-r)&&(l===void 0||a<=l+r)}return!0})}get isUnbounded(){return Object.values(this.coords).every(e=>!("range"in e))}get cssId(){return this.formats?.color?.id||this.id}get isPolar(){for(let e in this.coords)if(this.coords[e].type==="angle")return!0;return!1}getFormat(e){if(!e)return null;e==="default"?e=Object.values(this.formats)[0]:typeof e=="string"&&(e=this.formats[e]);let r=fe.get(e,this);return r!==e&&e.name in this.formats&&(this.formats[e.name]=r),r}equals(e){return e?this===e||this.id===e||this.id===e.id:!1}to(e,r){if(arguments.length===1){let i=x(e);[e,r]=[i.space,i.coords]}if(e=t.get(e),this.equals(e))return r;r=r.map(i=>L(i)?0:i);let o=this.path,a=e.path,s,n;for(let i=0;i<o.length&&o[i].equals(a[i]);i++)s=o[i],n=i;if(!s)throw new Error(`Cannot convert between color spaces ${this} and ${e}: no connection space was found`);for(let i=o.length-1;i>n;i--)r=o[i].toBase(r);for(let i=n+1;i<a.length;i++)r=a[i].fromBase(r);return r}from(e,r){if(arguments.length===1){let o=x(e);[e,r]=[o.space,o.coords]}return e=t.get(e),e.to(this,r)}toString(){return`${this.name} (${this.id})`}getMinCoords(){let e=[];for(let r in this.coords){let o=this.coords[r],a=o.range||o.refRange;e.push(a?.min??0)}return e}static registry={};static get all(){return[...new Set(Object.values(t.registry))]}static register(e,r){if(arguments.length===1&&(r=arguments[0],e=r.id),r=this.get(r),this.registry[e]&&this.registry[e]!==r)throw new Error(`Duplicate color space registration: '${e}'`);if(this.registry[e]=r,arguments.length===1&&r.aliases)for(let o of r.aliases)this.register(o,r);return r}static get(e,...r){if(!e||ie(e,this))return e;if(ee(e)==="string"){let a=t.registry[e.toLowerCase()];if(!a)throw new TypeError(`No color space found with id = "${e}"`);return a}if(r.length)return t.get(...r);throw new TypeError(`${e} is not a valid color space`)}static findFormat(e,r=t.all){if(!e)return null;typeof e=="string"&&(e={name:e});for(let o of r)for(let[a,s]of Object.entries(o.formats)){s.name??=a,s.type??="function";let n=(!e.name||s.name===e.name)&&(!e.type||s.type===e.type);if(e.id){let i=s.ids||[s.id],l=Array.isArray(e.id)?e.id:[e.id];n&&=l.some(f=>i.includes(f))}if(n){let i=fe.get(s,o);return i!==s&&(o.formats[s.name]=i),i}}return null}static resolveCoord(e,r){let o=ee(e),a,s;if(o==="string"?e.includes(".")?[a,s]=e.split("."):[a,s]=[,e]:Array.isArray(e)?[a,s]=e:(a=e.space,s=e.coordId),a=t.get(a),a||(a=r),!a)throw new TypeError(`Cannot resolve coordinate reference ${e}: No color space specified and relative references are not allowed here`);if(o=ee(s),o==="number"||o==="string"&&s>=0){let l=Object.entries(a.coords)[s];if(l)return{space:a,id:l[0],index:s,...l[1]}}a=t.get(a);let n=s.toLowerCase(),i=0;for(let l in a.coords){let f=a.coords[l];if(l.toLowerCase()===n||f.name?.toLowerCase()===n)return{space:a,id:l,index:i,...f};i++}throw new TypeError(`No "${s}" coordinate found in ${a.name}. Its coordinates are: ${Object.keys(a.coords).join(", ")}`)}static DEFAULT_FORMAT={type:"functions",name:"color"}};function bo(t){let e=[t];for(let r=t;r=r.base;)e.push(r);return e}var E=new m({id:"xyz-d65",name:"XYZ D65",coords:{x:{refRange:[0,1],name:"X"},y:{refRange:[0,1],name:"Y"},z:{refRange:[0,1],name:"Z"}},white:"D65",formats:{color:{ids:["xyz-d65","xyz"]}},aliases:["xyz"]});var F=class extends m{constructor(e){e.coords||(e.coords={r:{range:[0,1],name:"Red"},g:{range:[0,1],name:"Green"},b:{range:[0,1],name:"Blue"}}),e.base||(e.base=E),e.toXYZ_M&&e.fromXYZ_M&&(e.toBase??=r=>{let o=M(r,e.toXYZ_M);return this.white!==this.base.white&&(o=re(this.white,this.base.white,o)),o},e.fromBase??=r=>(r=re(this.base.white,this.white,r),M(r,e.fromXYZ_M))),e.referred??="display",super(e)}};function ge(t,e){t=x(t);let r=m.get(e,e?.space),o=e?.precision,a;return!r||t.space.equals(r)?a=t.coords.slice():a=r.from(t),o===void 0?a:a.map(s=>tt(s,o))}function v(t,e){if(t=x(t),e==="alpha")return t.alpha??1;let{space:r,index:o}=m.resolveCoord(e,t.space);return ge(t,r)[o]}function ze(t,e,r,o){return t=x(t),Array.isArray(e)&&([e,r,o]=[t.space,e,r]),e=m.get(e),t.coords=e===t.space?r.slice():e.to(t.space,r),o!==void 0&&(t.alpha=o),t}ze.returns="color";function j(t,e,r){if(t=x(t),arguments.length===2&&ee(arguments[1])==="object"){let o=arguments[1];for(let a in o)j(t,a,o[a])}else if(typeof r=="function"&&(r=r(v(t,e))),e==="alpha")t.alpha=r;else{let{space:o,index:a}=m.resolveCoord(e,t.space),s=ge(t,o);s[a]=r,ze(t,o,s)}return t}j.returns="color";var Xt=new m({id:"xyz-d50",name:"XYZ D50",white:"D50",base:E,fromBase:t=>re(E.white,"D50",t),toBase:t=>re("D50",E.white,t)});var Co=216/24389,Yt=24/116,Ne=24389/27,lt=N.D50,P=new m({id:"lab",name:"Lab",coords:{l:{refRange:[0,100],name:"Lightness"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:lt,base:Xt,fromBase(t){let r=t.map((n,i)=>n/lt[i]).map(n=>n>Co?Math.cbrt(n):(Ne*n+16)/116),o=116*r[1]-16,a=500*(r[0]-r[1]),s=200*(r[1]-r[2]);return[o,a,s]},toBase(t){let[e,r,o]=t,a=[];return a[1]=(e+16)/116,a[0]=r/500+a[1],a[2]=a[1]-o/200,[a[0]>Yt?Math.pow(a[0],3):(116*a[0]-16)/Ne,t[0]>8?Math.pow((t[0]+16)/116,3):t[0]/Ne,a[2]>Yt?Math.pow(a[2],3):(116*a[2]-16)/Ne].map((n,i)=>n*lt[i])},formats:{lab:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});function Y(t){return typeof t!="number"?t:(t%360+360)%360}var H=new m({id:"lch",name:"LCH",coords:{l:{refRange:[0,100],name:"Lightness"},c:{refRange:[0,150],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:P,fromBase(t){if(this.\u03B5===void 0){let i=Object.values(this.base.coords)[1].refRange,l=i[1]-i[0];this.\u03B5=l/1e5}let[e,r,o]=t,a=Math.abs(r)<this.\u03B5&&Math.abs(o)<this.\u03B5,s=a?null:Y(Math.atan2(o,r)*180/Math.PI),n=a?0:Math.sqrt(r**2+o**2);return[e,n,s]},toBase(t){let[e,r,o]=t,a=null,s=null;return L(o)||(r=r<0?0:r,a=r*Math.cos(o*Math.PI/180),s=r*Math.sin(o*Math.PI/180)),[e,a,s]},formats:{lch:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <angle>"]}}});var Jt=25**7,Be=Math.PI,Zt=180/Be,ce=Be/180;function Kt(t){let e=t*t;return e*e*e*t}function Pe(t,e,{kL:r=1,kC:o=1,kH:a=1}={}){[t,e]=x([t,e]);let[s,n,i]=P.from(t),l=H.from(P,[s,n,i])[1],[f,p,u]=P.from(e),c=H.from(P,[f,p,u])[1];l<0&&(l=0),c<0&&(c=0);let b=(l+c)/2,d=Kt(b),g=.5*(1-Math.sqrt(d/(d+Jt))),h=(1+g)*n,w=(1+g)*p,C=Math.sqrt(h**2+i**2),y=Math.sqrt(w**2+u**2),I=h===0&&i===0?0:Math.atan2(i,h),z=w===0&&u===0?0:Math.atan2(u,w);I<0&&(I+=2*Be),z<0&&(z+=2*Be),I*=Zt,z*=Zt;let _=f-s,A=y-C,R=z-I,K=I+z,Ot=Math.abs(R),me;C*y===0?me=0:Ot<=180?me=R:R>180?me=R-360:R<-180?me=R+360:X.warn("the unthinkable has happened");let Tt=2*Math.sqrt(y*C)*Math.sin(me*ce/2),Vr=(s+f)/2,Qe=(C+y)/2,Et=Kt(Qe),W;C*y===0?W=K:Ot<=180?W=K/2:K<360?W=(K+360)/2:W=(K-360)/2;let _t=(Vr-50)**2,eo=1+.015*_t/Math.sqrt(20+_t),Dt=1+.045*Qe,pe=1;pe-=.17*Math.cos((W-30)*ce),pe+=.24*Math.cos(2*W*ce),pe+=.32*Math.cos((3*W+6)*ce),pe-=.2*Math.cos((4*W-63)*ce);let zt=1+.015*Qe*pe,to=30*Math.exp(-1*((W-275)/25)**2),ro=2*Math.sqrt(Et/(Et+Jt)),oo=-1*Math.sin(2*to*ce)*ro,ke=(_/(r*eo))**2;return ke+=(A/(o*Dt))**2,ke+=(Tt/(a*zt))**2,ke+=oo*(A/(o*Dt))*(Tt/(a*zt)),Math.sqrt(ke)}var wo=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],xo=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],yo=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],So=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],G=new m({id:"oklab",name:"Oklab",coords:{l:{refRange:[0,1],name:"Lightness"},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:"D65",base:E,fromBase(t){let e=M(t,wo);return e[0]=Math.cbrt(e[0]),e[1]=Math.cbrt(e[1]),e[2]=Math.cbrt(e[2]),M(e,yo,e)},toBase(t){let e=M(t,So);return e[0]=e[0]**3,e[1]=e[1]**3,e[2]=e[2]**3,M(e,xo,e)},formats:{oklab:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});function he(t,e){[t,e]=x([t,e]);let[r,o,a]=G.from(t),[s,n,i]=G.from(e),l=r-s,f=o-n,p=a-i;return Math.sqrt(l**2+f**2+p**2)}var Mo=75e-6;function J(t,e,{epsilon:r=Mo}={}){t=x(t),e||(e=t.space),e=m.get(e);let o=t.coords;return e!==t.space&&(o=e.from(t)),e.inGamut(o,{epsilon:r})}function $(t){return{space:t.space,coords:t.coords.slice(),alpha:t.alpha}}function ft(t,e,r="lab"){r=m.get(r);let o=r.from(t),a=r.from(e);return Math.sqrt(o.reduce((s,n,i)=>{let l=a[i];return L(n)||L(l)?s:s+(l-n)**2},0))}function ct(t,e){return ft(t,e,"lab")}var vo=Math.PI,Ut=vo/180;function Qt(t,e,{l:r=2,c:o=1}={}){[t,e]=x([t,e]);let[a,s,n]=P.from(t),[,i,l]=H.from(P,[a,s,n]),[f,p,u]=P.from(e),c=H.from(P,[f,p,u])[1];i<0&&(i=0),c<0&&(c=0);let b=a-f,d=i-c,g=s-p,h=n-u,w=g**2+h**2-d**2,C=.511;a>=16&&(C=.040975*a/(1+.01765*a));let y=.0638*i/(1+.0131*i)+.638,I;L(l)&&(l=0),l>=164&&l<=345?I=.56+Math.abs(.2*Math.cos((l+168)*Ut)):I=.36+Math.abs(.4*Math.cos((l+35)*Ut));let z=Math.pow(i,4),_=Math.sqrt(z/(z+1900)),A=y*(_*I+1-_),R=(b/(r*C))**2;return R+=(d/(o*y))**2,R+=w/A**2,Math.sqrt(R)}var Vt=203,He=new m({id:"xyz-abs-d65",cssId:"--xyz-abs-d65",name:"Absolute XYZ D65",coords:{x:{refRange:[0,9504.7],name:"Xa"},y:{refRange:[0,1e4],name:"Ya"},z:{refRange:[0,10888.3],name:"Za"}},base:E,fromBase(t){return t.map(e=>e*Vt)},toBase(t){return t.map(e=>e/Vt)}});var $e=1.15,Fe=.66,er=2610/2**14,ko=2**14/2610,tr=3424/2**12,rr=2413/2**7,or=2392/2**7,Lo=1.7*2523/2**5,ar=2**5/(1.7*2523),je=-.56,ut=16295499532821565e-27,Ro=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],Io=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],Ao=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],Oo=[[1,.13860504327153927,.05804731615611883],[1,-.1386050432715393,-.058047316156118904],[1,-.09601924202631895,-.811891896056039]],nr=new m({id:"jzazbz",name:"Jzazbz",coords:{jz:{refRange:[0,1],name:"Jz"},az:{refRange:[-.21,.21]},bz:{refRange:[-.21,.21]}},base:He,fromBase(t){let[e,r,o]=t,a=$e*e-($e-1)*o,s=Fe*r-(Fe-1)*e,i=M([a,s,o],Ro).map(function(c){let b=tr+rr*O(c/1e4,er),d=1+or*O(c/1e4,er);return O(b/d,Lo)}),[l,f,p]=M(i,Ao);return[(1+je)*l/(1+je*l)-ut,f,p]},toBase(t){let[e,r,o]=t,a=(e+ut)/(1+je-je*(e+ut)),n=M([a,r,o],Oo).map(function(c){let b=tr-O(c,ar),d=or*O(c,ar)-rr;return 1e4*O(b/d,ko)}),[i,l,f]=M(n,Io),p=(i+($e-1)*f)/$e,u=(l+(Fe-1)*p)/Fe;return[p,u,f]},formats:{jzazbz:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});var mt=new m({id:"jzczhz",name:"JzCzHz",coords:{jz:{refRange:[0,1],name:"Jz"},cz:{refRange:[0,.26],name:"Chroma"},hz:{refRange:[0,360],type:"angle",name:"Hue"}},base:nr,fromBase:H.fromBase,toBase:H.toBase,formats:{jzczhz:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <angle>"]}}});function sr(t,e){[t,e]=x([t,e]);let[r,o,a]=mt.from(t),[s,n,i]=mt.from(e),l=r-s,f=o-n;L(a)&&L(i)?(a=0,i=0):L(a)?a=i:L(i)&&(i=a);let p=a-i,u=2*Math.sqrt(o*n)*Math.sin(p/2*(Math.PI/180));return Math.sqrt(l**2+f**2+u**2)}var fr=3424/4096,cr=2413/128,ur=2392/128,ir=2610/16384,To=2523/32,Eo=16384/2610,lr=32/2523,_o=[[.3592832590121217,.6976051147779502,-.035891593232029],[-.1920808463704993,1.100476797037432,.0753748658519118],[.0070797844607479,.0748396662186362,.8433265453898765]],Do=[[2048/4096,2048/4096,0],[6610/4096,-13613/4096,7003/4096],[17933/4096,-17390/4096,-543/4096]],zo=[[.9999999999999998,.0086090370379328,.111029625003026],[.9999999999999998,-.0086090370379328,-.1110296250030259],[.9999999999999998,.5600313357106791,-.3206271749873188]],No=[[2.0701522183894223,-1.3263473389671563,.2066510476294053],[.3647385209748072,.6805660249472273,-.0453045459220347],[-.0497472075358123,-.0492609666966131,1.1880659249923042]],pt=new m({id:"ictcp",name:"ICTCP",coords:{i:{refRange:[0,1],name:"I"},ct:{refRange:[-.5,.5],name:"CT"},cp:{refRange:[-.5,.5],name:"CP"}},base:He,fromBase(t){let e=M(t,_o);return Bo(e)},toBase(t){let e=Po(t);return M(e,No)},formats:{ictcp:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <percentage>"]}}});function Bo(t){let e=t.map(function(r){let o=fr+cr*(r/1e4)**ir,a=1+ur*(r/1e4)**ir;return(o/a)**To});return M(e,Do)}function Po(t){return M(t,zo).map(function(o){let a=Math.max(o**lr-fr,0),s=cr-ur*o**lr;return 1e4*(a/s)**Eo})}function mr(t,e){[t,e]=x([t,e]);let[r,o,a]=pt.from(t),[s,n,i]=pt.from(e);return 720*Math.sqrt((r-s)**2+.25*(o-n)**2+(a-i)**2)}function pr(t,e){[t,e]=x([t,e]);let r=2,[o,a,s]=G.from(t),[n,i,l]=G.from(e),f=o-n,p=r*(a-i),u=r*(s-l);return Math.sqrt(f**2+p**2+u**2)}var Ho=N.D65,br=.42,dr=1/br,dt=2*Math.PI,Cr=[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],$o=[[1.8620678550872327,-1.0112546305316843,.14918677544445175],[.38752654323613717,.6214474419314753,-.008973985167612518],[-.015841498849333856,-.03412293802851557,1.0499644368778496]],Fo=[[460,451,288],[460,-891,-261],[460,-220,-6300]],jo={dark:[.8,.525,.8],dim:[.9,.59,.9],average:[1,.69,1]},oe={h:[20.14,90,164.25,237.53,380.14],e:[.8,.7,1,1.2,.8],H:[0,100,200,300,400]},Go=180/Math.PI,gr=Math.PI/180;function wr(t,e){return t.map(o=>{let a=O(e*Math.abs(o)*.01,br);return 400*Ee(a,o)/(a+27.13)})}function qo(t,e){let r=100/e*27.13**dr;return t.map(o=>{let a=Math.abs(o);return Ee(r*O(a/(400-a),dr),o)})}function Wo(t){let e=Y(t);e<=oe.h[0]&&(e+=360);let r=Gt(oe.h,e)-1,[o,a]=oe.h.slice(r,r+2),[s,n]=oe.e.slice(r,r+2),i=oe.H[r],l=(e-o)/s;return i+100*l/(l+(a-e)/n)}function Xo(t){let e=(t%400+400)%400,r=Math.floor(.01*e);e=e%100;let[o,a]=oe.h.slice(r,r+2),[s,n]=oe.e.slice(r,r+2);return Y((e*(n*o-s*a)-100*o*n)/(e*(n-s)-100*n))}function gt(t,e,r,o,a){let s={};s.discounting=a,s.refWhite=t,s.surround=o;let n=t.map(h=>h*100);s.la=e,s.yb=r;let i=n[1],l=M(n,Cr),f=jo[s.surround],p=f[0];s.c=f[1],s.nc=f[2];let c=(1/(5*s.la+1))**4;s.fl=c*s.la+.1*(1-c)*(1-c)*Math.cbrt(5*s.la),s.flRoot=s.fl**.25,s.n=s.yb/i,s.z=1.48+Math.sqrt(s.n),s.nbb=.725*s.n**-.2,s.ncb=s.nbb;let b=a?1:Math.max(Math.min(p*(1-1/3.6*Math.exp((-s.la-42)/92)),1),0);s.dRgb=l.map(h=>rt(1,i/h,b)),s.dRgbInv=s.dRgb.map(h=>1/h);let d=l.map((h,w)=>h*s.dRgb[w]),g=wr(d,s.fl);return s.aW=s.nbb*(2*g[0]+g[1]+.05*g[2]),s}var hr=gt(Ho,64/Math.PI*.2,20,"average",!1);function Ge(t,e){if(!(t.J!==void 0^t.Q!==void 0))throw new Error("Conversion requires one and only one: 'J' or 'Q'");if(!(t.C!==void 0^t.M!==void 0^t.s!==void 0))throw new Error("Conversion requires one and only one: 'C', 'M' or 's'");if(!(t.h!==void 0^t.H!==void 0))throw new Error("Conversion requires one and only one: 'h' or 'H'");if(t.J===0||t.Q===0)return[0,0,0];let r=0;t.h!==void 0?r=Y(t.h)*gr:r=Xo(t.H)*gr;let o=Math.cos(r),a=Math.sin(r),s=0;t.J!==void 0?s=O(t.J,1/2)*.1:t.Q!==void 0&&(s=.25*e.c*t.Q/((e.aW+4)*e.flRoot));let n=0;t.C!==void 0?n=t.C/s:t.M!==void 0?n=t.M/e.flRoot/s:t.s!==void 0&&(n=4e-4*t.s**2*(e.aW+4)/e.c);let i=O(n*Math.pow(1.64-Math.pow(.29,e.n),-.73),10/9),l=.25*(Math.cos(r+2)+3.8),f=e.aW*O(s,2/e.c/e.z),p=5e4/13*e.nc*e.ncb*l,u=f/e.nbb,c=23*(u+.305)*at(i,23*p+i*(11*o+108*a)),b=c*o,d=c*a,g=qo(M([u,b,d],Fo).map(h=>h*1/1403),e.fl);return M(g.map((h,w)=>h*e.dRgbInv[w]),$o).map(h=>h/100)}function ht(t,e){let r=t.map(y=>y*100),o=wr(M(r,Cr).map((y,I)=>y*e.dRgb[I]),e.fl),a=o[0]+(-12*o[1]+o[2])/11,s=(o[0]+o[1]-2*o[2])/9,n=(Math.atan2(s,a)%dt+dt)%dt,i=.25*(Math.cos(n+2)+3.8),l=5e4/13*e.nc*e.ncb*at(i*Math.sqrt(a**2+s**2),o[0]+o[1]+1.05*o[2]+.305),f=O(l,.9)*Math.pow(1.64-Math.pow(.29,e.n),.73),p=e.nbb*(2*o[0]+o[1]+.05*o[2]),u=O(p/e.aW,.5*e.c*e.z),c=100*O(u,2),b=4/e.c*u*(e.aW+4)*e.flRoot,d=f*u,g=d*e.flRoot,h=Y(n*Go),w=Wo(h),C=50*O(e.c*f/(e.aW+4),1/2);return{J:c,C:d,h,s:C,Q:b,M:g,H:w}}var qs=new m({id:"cam16-jmh",cssId:"--cam16-jmh",name:"CAM16-JMh",coords:{j:{refRange:[0,100],name:"J"},m:{refRange:[0,105],name:"Colorfulness"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:E,fromBase(t){this.\u03B5===void 0&&(this.\u03B5=Object.values(this.coords)[1].refRange[1]/1e5);let e=ht(t,hr),r=Math.abs(e.M)<this.\u03B5;return[e.J,r?0:e.M,r?null:e.h]},toBase(t){return Ge({J:t[0],M:t[1],h:t[2]},hr)}});var Yo=N.D65,Jo=216/24389,xr=24389/27;function Zo(t){return 116*(t>Jo?Math.cbrt(t):(xr*t+16)/116)-16}function bt(t){return t>8?Math.pow((t+16)/116,3):t/xr}function Ko(t,e){let[r,o,a]=t,s=[],n=0;if(a===0)return[0,0,0];let i=bt(a);a>0?n=.00379058511492914*a**2+.608983189401032*a+.9155088574762233:n=9514440756550361e-21*a**2+.08693057439788597*a-21.928975842194614;let l=2e-12,f=15,p=0,u=1/0,c=n;for(;p<=f;){s=Ge({J:n,C:o,h:r},e);let b=Math.abs(s[1]-i);if(b<u){if(b<=l)return s;c=n,u=b}n=n-(s[1]-i)*n/(2*s[1]),p+=1}return Ge({J:n,C:o,h:r},e)}function Uo(t,e){let r=Zo(t[1]);if(r===0)return[0,0,0];let o=ht(t,be);return[Y(o.h),o.C,r]}var be=gt(Yo,200/Math.PI*bt(50),bt(50)*100,"average",!1),Ce=new m({id:"hct",name:"HCT",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},c:{refRange:[0,145],name:"Colorfulness"},t:{refRange:[0,100],name:"Tone"}},base:E,fromBase(t){this.\u03B5===void 0&&(this.\u03B5=Object.values(this.coords)[1].refRange[1]/1e5);let e=Uo(t,be);return e[1]<this.\u03B5&&(e[1]=0,e[0]=null),e},toBase(t){return Ko(t,be)},formats:{color:{id:"--hct",coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]}}});var ti=180/Math.PI,Qo=Math.PI/180,yr=[1,.007,.0228];function Sr(t){t[1]<0&&(t=Ce.fromBase(Ce.toBase(t)));let e=Math.log(Math.max(1+yr[2]*t[1]*be.flRoot,1))/yr[2],r=t[0]*Qo,o=e*Math.cos(r),a=e*Math.sin(r);return[t[2],o,a]}function Mr(t,e){[t,e]=x([t,e]);let[r,o,a]=Sr(Ce.from(t)),[s,n,i]=Sr(Ce.from(e));return Math.sqrt((r-s)**2+(o-n)**2+(a-i)**2)}var Ct={deltaE76:ct,deltaECMC:Qt,deltaE2000:Pe,deltaEJz:sr,deltaEITP:mr,deltaEOK:he,deltaEOK2:pr,deltaEHCT:Mr};function Vo(t){let e=t?Math.floor(Math.log10(Math.abs(t))):0;return Math.max(parseFloat(`1e${e-2}`),1e-6)}var vr={hct:{method:"hct.c",jnd:2,deltaEMethod:"hct",blackWhiteClamp:{}},"hct-tonal":{method:"hct.c",jnd:0,deltaEMethod:"hct",blackWhiteClamp:{channel:"hct.t",min:0,max:100}}};function B(t,{method:e=X.gamut_mapping,space:r=void 0,deltaEMethod:o="",jnd:a=2,blackWhiteClamp:s=void 0}={}){if(t=x(t),Ae(arguments[1])?r=arguments[1]:r||(r=t.space),r=m.get(r),J(t,r,{epsilon:0}))return t;let n;if(e==="css")n=Lr(t,{space:r});else{if(e!=="clip"&&!J(t,r)){Object.prototype.hasOwnProperty.call(vr,e)&&({method:e,jnd:a,deltaEMethod:o,blackWhiteClamp:s}=vr[e]);let i=Pe;if(o!==""){for(let f in Ct)if("deltae"+o.toLowerCase()===f.toLowerCase()){i=Ct[f];break}}a===0&&(a=1e-16);let l=B(S(t,r),{method:"clip",space:r});if(i(t,l)>a){if(s&&Object.keys(s).length===3){let C=m.resolveCoord(s.channel),y=v(S(t,C.space),C.id);if(L(y)&&(y=0),y>=s.max)return S({space:"xyz-d65",coords:N.D65},t.space);if(y<=s.min)return S({space:"xyz-d65",coords:[0,0,0]},t.space)}let f=m.resolveCoord(e),p=f.space,u=f.id,c=S(t,p);c.coords.forEach((C,y)=>{L(C)&&(c.coords[y]=0)});let d=(f.range||f.refRange)[0],g=Vo(a),h=d,w=v(c,u);for(;w-h>g;){let C=$(c);C=B(C,{space:r,method:"clip"}),i(c,C)-a<g?h=v(c,u):w=v(c,u),j(c,u,(h+w)/2)}n=S(c,r)}else n=l}else n=S(t,r);if(e==="clip"||!J(n,r,{epsilon:0})){let i=Object.values(r.coords).map(l=>l.range||[]);n.coords=n.coords.map((l,f)=>{let[p,u]=i[f];return p!==void 0&&(l=Math.max(p,l)),u!==void 0&&(l=Math.min(l,u)),l})}}return r!==t.space&&(n=S(n,t.space)),t.coords=n.coords,t}B.returns="color";var kr={WHITE:{space:G,coords:[1,0,0],alpha:1},BLACK:{space:G,coords:[0,0,0],alpha:1}};function Lr(t,{space:e}={}){t=x(t),e||(e=t.space),e=m.get(e);let a=m.get("oklch");if(e.isUnbounded)return S(t,e);let s=S(t,a),n=s.coords[0];if(n>=1){let d=S(kr.WHITE,e);return d.alpha=t.alpha,S(d,e)}if(n<=0){let d=S(kr.BLACK,e);return d.alpha=t.alpha,S(d,e)}if(J(s,e,{epsilon:0}))return S(s,e);function i(d){let g=S(d,e),h=Object.values(e.coords);return g.coords=g.coords.map((w,C)=>{if("range"in h[C]){let[y,I]=h[C].range;return Te(y,w,I)}return w}),g}let l=0,f=s.coords[1],p=!0,u=$(s),c=i(u),b=he(c,u);if(b<.02)return c;for(;f-l>1e-4;){let d=(l+f)/2;if(u.coords[1]=d,p&&J(u,e,{epsilon:0}))l=d;else if(c=i(u),b=he(c,u),b<.02){if(.02-b<1e-4)break;p=!1,l=d}else f=d}return c}function S(t,e,{inGamut:r}={}){t=x(t),e=m.get(e);let o=e.from(t),a={space:e,coords:o,alpha:t.alpha};return r&&(a=B(a,r===!0?void 0:r)),a}S.returns="color";function we(t,e={}){let{precision:r=X.precision,format:o,inGamut:a=!0,coords:s,alpha:n,commas:i}=e,l,f=x(t),p=o,u=f.parseMeta;u&&!o&&(u.format.canSerialize()&&(o=u.format,p=u.formatId),s??=u.types,n??=u.alphaType,i??=u.commas),p&&(o=f.space.getFormat(o)??m.findFormat(p)),o||(o=f.space.getFormat("default")??m.DEFAULT_FORMAT,p=o.name),o&&o.space&&o.space!==f.space&&(f=S(f,o.space));let c=f.coords.slice();if(a||=o.toGamut,a&&!J(f)&&(c=B($(f),a===!0?void 0:a).coords),o.type==="custom")if(o.serialize)l=o.serialize(c,f.alpha,e);else throw new TypeError(`format ${p} can only be used to parse colors, not for serialization`);else{let b=o.name||"color",d=o.serializeCoords(c,r,s);if(b==="color"){let y=o.id||o.ids?.[0]||f.space.cssId||f.space.id;d.unshift(y)}let g=f.alpha;n!==void 0&&typeof n!="object"&&(n=typeof n=="string"?{type:n}:{include:n});let h=n?.type??"<number>",w=n?.include===!0||o.alpha===!0||n?.include!==!1&&o.alpha!==!1&&g<1,C="";if(i??=o.commas,w){if(r!==null){let y;h==="<percentage>"&&(y="%",g*=100),g=Oe(g,{precision:r,unit:y})}C=`${i?",":" /"} ${g}`}l=`${b}(${d.join(i?", ":" ")}${C})`}return l}var ea=[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],ta=[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]],Rr=new F({id:"p3-linear",cssId:"display-p3-linear",name:"Linear P3",white:"D65",toXYZ_M:ea,fromXYZ_M:ta});var ra=[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],oa=[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],Ir=new F({id:"srgb-linear",name:"Linear sRGB",white:"D65",toXYZ_M:ra,fromXYZ_M:oa});var wt={aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[102/255,51/255,153/255],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]};var Ar=Array(3).fill("<percentage> | <number>[0, 255]"),Or=Array(3).fill("<number>[0, 255]"),D=new F({id:"srgb",name:"sRGB",base:Ir,fromBase:t=>t.map(e=>{let r=e<0?-1:1,o=e*r;return o>.0031308?r*(1.055*o**(1/2.4)-.055):12.92*e}),toBase:t=>t.map(e=>{let r=e<0?-1:1,o=e*r;return o<=.04045?e/12.92:r*((o+.055)/1.055)**2.4}),formats:{rgb:{coords:Ar},rgb_number:{name:"rgb",commas:!0,coords:Or,alpha:!1},color:{},rgba:{coords:Ar,commas:!0,alpha:!0},rgba_number:{name:"rgba",commas:!0,coords:Or},hex:{type:"custom",toGamut:!0,test:t=>/^#(([a-f0-9]{2}){3,4}|[a-f0-9]{3,4})$/i.test(t),parse(t){t.length<=5&&(t=t.replace(/[a-f0-9]/gi,"$&$&"));let e=[];return t.replace(/[a-f0-9]{2}/gi,r=>{e.push(parseInt(r,16)/255)}),{spaceId:"srgb",coords:e.slice(0,3),alpha:e.slice(3)[0]}},serialize:(t,e,{collapse:r=!0,alpha:o}={})=>{(o!==!1&&e<1||o===!0)&&t.push(e),t=t.map(n=>Math.round(n*255));let a=r&&t.every(n=>n%17===0);return"#"+t.map(n=>a?(n/17).toString(16):n.toString(16).padStart(2,"0")).join("")}},keyword:{type:"custom",test:t=>/^[a-z]+$/i.test(t),parse(t){t=t.toLowerCase();let e={spaceId:"srgb",coords:null,alpha:1};if(t==="transparent"?(e.coords=wt.black,e.alpha=0):e.coords=wt[t],e.coords)return e}}}});var xt=new F({id:"p3",cssId:"display-p3",name:"P3",base:Rr,fromBase:D.fromBase,toBase:D.toBase});function yt(t){return v(t,[E,"y"])}function qe(t,e){t=x(t),e=x(e);let r=Math.max(yt(t),0),o=Math.max(yt(e),0);return o>r&&([r,o]=[o,r]),(r+.05)/(o+.05)}var ae=new m({id:"hsl",name:"HSL",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:D,fromBase:t=>{let e=Math.max(...t),r=Math.min(...t),[o,a,s]=t,[n,i,l]=[null,0,(r+e)/2],f=e-r;if(f!==0){switch(i=l===0||l===1?0:(e-l)/Math.min(l,1-l),e){case o:n=(a-s)/f+(a<s?6:0);break;case a:n=(s-o)/f+2;break;case s:n=(o-a)/f+4}n=n*60}return i<0&&(n+=180,i=Math.abs(i)),n>=360&&(n-=360),[n,i*100,l*100]},toBase:t=>{let[e,r,o]=t;e=e%360,e<0&&(e+=360),r/=100,o/=100;function a(s){let n=(s+e/30)%12,i=r*Math.min(o,1-o);return o-i*Math.max(-1,Math.min(n-3,9-n,1))}return[a(0),a(8),a(4)]},formats:{hsl:{coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"]},hsla:{coords:["<number> | <angle>","<percentage> | <number>","<percentage> | <number>"],commas:!0,alpha:!0}}});var k=new m({id:"oklch",name:"OkLCh",coords:{l:{refRange:[0,1],name:"Lightness"},c:{refRange:[0,.4],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},white:"D65",base:G,fromBase:H.fromBase,toBase:H.toBase,formats:{oklch:{coords:["<percentage> | <number>","<number> | <percentage>","<number> | <angle>"]}}});function St(t,e){var r=0,o,a;e=e||{};function s(){var n=o,i=arguments.length,l,f;e:for(;n;){if(n.args.length!==arguments.length){n=n.next;continue}for(f=0;f<i;f++)if(n.args[f]!==arguments[f]){n=n.next;continue e}return n!==o&&(n===a&&(a=n.prev),n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=o,n.prev=null,o.prev=n,o=n),n.val}for(l=new Array(i),f=0;f<i;f++)l[f]=arguments[f];return n={args:l,val:t.apply(null,l)},o?(o.prev=n,n.next=o):a=n,r===e.maxSize?(a=a.prev,a.next=null):r++,o=n,n.val}return s.clear=function(){o=null,a=null,r=0},s}var ve=de(Re(),1);m.register(D);m.register(k);m.register(xt);m.register(ae);var Tr={"primary-bgFill1":["bg-interactive-brand-strong"],"primary-fgFill":["fg-interactive-brand-strong","fg-interactive-brand-strong-active"],"primary-bgFill2":["bg-interactive-brand-strong-active"],"primary-surface4":["bg-interactive-brand-weak-active"],"primary-fgSurface3":["fg-interactive-brand","fg-interactive-brand-active"],"primary-stroke3":["bg-thumb-brand","bg-thumb-brand-active","stroke-focus-brand","stroke-interactive-brand","stroke-surface-brand-strong"],"primary-stroke4":["stroke-interactive-brand-active"],"primary-stroke1":["stroke-surface-brand"],"primary-surface1":["bg-surface-brand"],"info-surface2":["bg-surface-info-weak"],"info-surface4":["bg-surface-info"],"info-fgSurface4":["fg-content-info"],"info-fgSurface3":["fg-content-info-weak"],"info-stroke3":["stroke-surface-info-strong"],"info-stroke1":["stroke-surface-info"],"success-surface2":["bg-surface-success-weak"],"success-surface4":["bg-surface-success"],"success-fgSurface4":["fg-content-success"],"success-fgSurface3":["fg-content-success-weak"],"success-stroke3":["stroke-surface-success-strong"],"success-stroke1":["stroke-surface-success"],"warning-surface2":["bg-surface-warning-weak"],"warning-surface4":["bg-surface-warning"],"warning-fgSurface4":["fg-content-warning"],"warning-fgSurface3":["fg-content-warning-weak"],"warning-stroke3":["stroke-surface-warning-strong"],"warning-stroke1":["stroke-surface-warning"],"error-bgFill1":["bg-interactive-error-strong"],"error-fgFill":["fg-interactive-error-strong","fg-interactive-error-strong-active"],"error-bgFill2":["bg-interactive-error-strong-active"],"error-surface2":["bg-interactive-error-active","bg-surface-error-weak"],"error-surface4":["bg-interactive-error-weak-active","bg-surface-error"],"error-fgSurface4":["fg-content-error"],"error-fgSurface3":["fg-content-error-weak","fg-interactive-error","fg-interactive-error-active"],"error-stroke3":["stroke-interactive-error","stroke-interactive-error-strong","stroke-surface-error-strong"],"error-stroke4":["stroke-interactive-error-active"],"error-stroke1":["stroke-surface-error"],"bg-surface2":["bg-surface-neutral"],"bg-surface5":["bg-interactive-neutral-strong-disabled"],"bg-surface4":["bg-interactive-neutral-weak-active"],"bg-surface3":["bg-surface-neutral-strong"],"bg-fgSurface4":["fg-content-neutral","fg-interactive-neutral","fg-interactive-neutral-active"],"bg-fgSurface3":["fg-content-neutral-weak","fg-interactive-neutral-weak"],"bg-fgSurface2":["fg-interactive-neutral-disabled","fg-interactive-neutral-strong-disabled","fg-interactive-neutral-weak-disabled"],"bg-stroke3":["bg-thumb-neutral-weak","stroke-interactive-neutral","stroke-surface-neutral-strong"],"bg-stroke4":["bg-thumb-neutral-weak-active","stroke-interactive-neutral-active","stroke-interactive-neutral-strong"],"bg-stroke2":["bg-thumb-neutral-disabled","bg-track-neutral","stroke-interactive-neutral-disabled","stroke-surface-neutral"],"bg-stroke1":["bg-track-neutral-weak","stroke-surface-neutral-weak"],"bg-bgFillInverted2":["bg-interactive-neutral-strong-active"],"bg-bgFillInverted1":["bg-interactive-neutral-strong"],"bg-fgFillInverted":["fg-interactive-neutral-strong","fg-interactive-neutral-strong-active"],"bg-surface1":["bg-surface-neutral-weak"],"caution-surface2":["bg-surface-caution-weak"],"caution-surface4":["bg-surface-caution"],"caution-fgSurface4":["fg-content-caution"],"caution-fgSurface3":["fg-content-caution-weak"]};function ne(t){let e=we(S(t,D));return we(e,{format:"hex"})}function Z(t,e){return qe(t,e)}function xe(t){return S(B(t,{space:D,method:"css"}),k)}var We=S("white",k),Xe=S("black",k),Er=.02,_r=3.1,Dr={lighter:{min:.2,max:.4},darker:{min:.75,max:.98}},U=.004,zr=10;var ye={bg:"#f8f8f8",primary:"#3858e9",info:"#0090ff",success:"#4ab866",caution:"#f0d149",warning:"#f0b849",error:"#cc1818"};function aa(t){let e=new Map,r=new Map;return Object.keys(t).forEach(o=>{e.set(o,[])}),r.set("seed",[]),Object.keys(t).forEach(o=>{r.set(o,[])}),Object.entries(t).forEach(([o,a])=>{let s=o,n=a.contrast.reference;e.get(s).push(n),r.get(n).push(s),a.sameAsIfPossible&&(e.get(s).push(a.sameAsIfPossible),r.get(a.sameAsIfPossible).push(s))}),{dependencies:e,dependents:r}}function Nr(t){let{dependents:e}=aa(t),r=[],o=new Set,a=new Set;function s(n){if(a.has(n))throw new Error(`Circular dependency detected involving step: ${String(n)}`);if(o.has(n))return;a.add(n),(e.get(n)||[]).forEach(l=>{s(l)}),a.delete(n),o.add(n),n!=="seed"&&r.unshift(n)}return s("seed"),r}function Br(t,e){let r=new Set;function o(a){if(a==="seed"||r.has(a))return;let s=e[a];s&&(o(s.contrast.reference),s.sameAsIfPossible&&o(s.sameAsIfPossible),r.add(a))}return o(t),Array.from(r)}function Mt(t,e){let r=Z(t,Xe),o=Z(t,We);return r>o+(e?_r:0)?{better:"darker",worse:"lighter"}:{better:"lighter",worse:"darker"}}function vt(t){return t===1?1:t+Er}function Pr(t,e){let r=Dr[e];return Math.max(r.min,Math.min(r.max,t))}function Ye(t,e,r,o,a,s){let n=r,i=o,l=!1,f=a,p=s,u=!1,c,b,d=0;for(;;){d++;let g=(n*p-f*i)/(p-i);if(c=t(g),b=e(c),Math.abs(b)<=U||d>=zr)break;b<=0?(n=g,i=b,l&&(p/=2),l=!0,u=!1):(f=g,p=b,u&&(i/=2),u=!0,l=!1)}return c}function jr(t,e,r={}){let o=r.gamut??D,a=r.alpha??.65,s=r.carry??.5,n=r.cUpperBound??.45,i=r.radiusLight??.2,l=r.radiusDark??.2,f=r.kLight??.85,p=r.kDark??.85,u=r.achromaEpsilon??.005,c=Math.max(0,v(t,[k,"c"])),b=v(t,[k,"h"]),d=c<u,g=b===null||!Number.isFinite(b);if(d||g)if(typeof r.hueFallback=="number")b=Gr(r.hueFallback);else return{space:k,coords:[se(e),0,0],alpha:1};let h=se(v(t,[k,"l"])),w=Fr(h,b,o,n),C=Fr(se(e),b,o,n),y=0,I=w>0?w:1e-6;y=se(c/I);let _=a*C*Math.pow(y,se(s)),A=na(h,e,{radiusLight:i,radiusDark:l,kLight:f,kDark:p}),R=_*A;return{l:se(e),c:R}}function se(t){return t<0?0:t>1?1:t}function Gr(t){let e=t%360;return e<0&&(e+=360),e}function Hr(t){let e=se(t);return .5-.5*Math.cos(Math.PI*e)}function na(t,e,r){let o=e-t;if(o>=0){let n=r.radiusLight>0?Math.abs(o)/r.radiusLight:1,i=Hr(n>1?1:n);return 1-(1-r.kLight)*i}let a=r.radiusDark>0?Math.abs(o)/r.radiusDark:1,s=Hr(a>1?1:a);return 1-(1-r.kDark)*s}var $r=new Map;function sa(t,e,r,o){let a=kt(t,.05),s=kt(Gr(e),10),n=kt(o,.05);return`${r}|L:${a}|H:${s}|cap:${n}`}function kt(t,e){return Math.round(t/e)*e}function Fr(t,e,r,o){let a=r.id,s=sa(t,e,a,o),n=$r.get(s);if(typeof n=="number")return n;let i=ia(t,e,r,o);return $r.set(s,i),i}function ia(t,e,r,o){let s=B({space:k,coords:[t,o,e],alpha:1},{space:r,method:"css"});return v(s,[k,"c"])}function q(t,e){return Math.log(t/e)}function qr(t,e,r,o,{lightnessConstraint:a,taperChromaOptions:s}={}){if(r<=1)return{color:t,reached:!0,achieved:1};function n(g){let h=g,w=v(e,[k,"c"]);if(s){let C=jr(e,h,s);if("l"in C&&"c"in C)h=C.l,w=C.c;else return C}return xe({spaceId:"oklch",coords:[h,w,v(e,[k,"h"])]})}let i=o==="lighter"?1:0,l=o==="lighter"?We:Xe,f=Z(t,l);if(a){let g=n(a.value),h=Z(t,g),w=q(h,r)>=-U;if(w||a.type==="force")return{color:g,reached:w,achieved:h,deficit:w?q(h,f):q(r,h)}}if(q(f,r)<=U)return{color:l,reached:q(f,r)>=-U,achieved:f,deficit:q(r,f)};let p=v(t,[k,"l"]),u=q(1,r),c=i,b=q(f,r);return{color:Ye(n,g=>q(Z(t,g),r),p,u,c,b),reached:!0,achieved:r,deficit:q(r,f)}}function Lt({seed:t,sortedSteps:e,config:r,mainDir:o,oppDir:a,pinLightness:s}){let n={},i,l=-1/0,f="lighter",p,u=new Map;u.set("seed",t);for(let c of e){let b=function(A,R){return R==="main"?o:R==="opposite"?a:R==="best"?Mt(A,d.preferLighter).better:R},{contrast:d,lightness:g,taperChromaOptions:h,sameAsIfPossible:w}=r[c],C=u.get(d.reference);if(!C)throw new Error(`Reference color for step ${c} not found: ${d.reference}`);if(w){let A=u.get(w);if(!A)throw new Error(`Same-as color for step ${c} not found: ${w}`);let R=Z(C,A),K=vt(d.target);if(R>=K){u.set(c,A),n[c]=ne(A);continue}}let y=b(C,d.followDirection),I=vt(d.target),z;s?.stepName===c?z={value:s.value,type:"force"}:g&&(z={value:g(y),type:"onlyIfSucceeds"});let _=qr(C,t,I,y,{lightnessConstraint:z,taperChromaOptions:h});!d.ignoreWhenAdjustingSeed&&_.deficit&&_.deficit>l&&(l=_.deficit,f=y,p=c),u.set(c,_.color),n[c]=ne(_.color),!_.reached&&!d.ignoreWhenAdjustingSeed&&(i??=[],i.push(c))}return{rampResults:n,warnings:i,maxDeficit:l,maxDeficitDirection:f,maxDeficitStep:p}}function Rt(t,e,{mainDirection:r,pinLightness:o,rescaleToFitContrastTargets:a=!0}={}){let s;try{s=xe(t)}catch(g){throw new Error(`Invalid seed color "${t}": ${g instanceof Error?g.message:"Unknown error"}`)}let n="lighter",i="darker";if(r)n=r,i=r==="darker"?"lighter":"darker";else{let{better:g,worse:h}=Mt(s);n=g,i=h}let l=Nr(e),{rampResults:f,warnings:p,maxDeficit:u,maxDeficitDirection:c,maxDeficitStep:b}=Lt({seed:s,sortedSteps:l,config:e,mainDir:n,oppDir:i,pinLightness:o}),d=f;if(u>U&&a){let g=function(A){return xe(j($(s),[k,"l"],A))},h=function(A){let R=Lt({seed:A,sortedSteps:w,config:e,mainDir:n,oppDir:i,pinLightness:o});return R.maxDeficitDirection===c?R.maxDeficit:-u},w=Br(b,e),C=c==="lighter"?0:1,y=-u,I=v(s,[k,"l"]),_=Ye(g,h,C,y,I,u);d=Lt({seed:_,sortedSteps:l,config:e,mainDir:n,oppDir:i,pinLightness:o}).rampResults}if(n==="darker"){let g=d.surface1;d.surface1=d.surface3,d.surface3=g}return{ramp:d,warnings:p,direction:n}}var Me=t=>t==="lighter"?.9551:.235,la=t=>t==="lighter"?.77:.56,fa=t=>t==="lighter"?.67:.45,Se={alpha:.7},Q={alpha:.6,kLight:.2,kDark:.2},Je={alpha:.6,radiusDark:.01,radiusLight:.01,kLight:.8,kDark:.8},ue={alpha:.75,radiusDark:.01,radiusLight:.01},Wr={contrast:{reference:"surface3",followDirection:"main",target:7,preferLighter:!0},lightness:Me,taperChromaOptions:Q},T={surface1:{contrast:{reference:"surface2",followDirection:"opposite",target:1.06,ignoreWhenAdjustingSeed:!0},taperChromaOptions:Se},surface2:{contrast:{reference:"seed",followDirection:"main",target:1}},surface3:{contrast:{reference:"surface2",followDirection:"main",target:1.06},taperChromaOptions:Se},surface4:{contrast:{reference:"surface2",followDirection:"main",target:1.12},taperChromaOptions:Se},surface5:{contrast:{reference:"surface2",followDirection:"main",target:1.2},taperChromaOptions:Se},surface6:{contrast:{reference:"surface2",followDirection:"main",target:1.4},taperChromaOptions:Se},bgFill1:{contrast:{reference:"surface2",followDirection:"main",target:4},lightness:fa},bgFill2:{contrast:{reference:"bgFill1",followDirection:"main",target:1.2}},bgFillInverted1:{contrast:{reference:"bgFillInverted2",followDirection:"opposite",target:1.2}},bgFillInverted2:Wr,bgFillDark:{contrast:{reference:"surface3",followDirection:"darker",target:7,ignoreWhenAdjustingSeed:!0},lightness:Me,taperChromaOptions:Q},stroke1:{contrast:{reference:"stroke3",followDirection:"opposite",target:2.6},taperChromaOptions:Je},stroke2:{contrast:{reference:"stroke3",followDirection:"opposite",target:2.4},taperChromaOptions:Je},stroke3:{contrast:{reference:"surface3",followDirection:"main",target:3},taperChromaOptions:Je},stroke4:{contrast:{reference:"stroke3",followDirection:"main",target:1.5},taperChromaOptions:Je},fgSurface1:{contrast:{reference:"surface3",followDirection:"main",target:2,preferLighter:!0},taperChromaOptions:Q},fgSurface2:{contrast:{reference:"surface3",followDirection:"main",target:3,preferLighter:!0},taperChromaOptions:Q},fgSurface3:{contrast:{reference:"surface3",followDirection:"main",target:4.5,preferLighter:!0},lightness:la,taperChromaOptions:Q},fgSurface4:Wr,fgFill:{contrast:{reference:"bgFill1",followDirection:"best",target:4.5,preferLighter:!0},lightness:Me,taperChromaOptions:Q},fgFillInverted:{contrast:{reference:"bgFillInverted1",followDirection:"best",target:4.5,preferLighter:!0},lightness:Me,taperChromaOptions:Q},fgFillDark:{contrast:{reference:"bgFillDark",followDirection:"best",target:4.5,preferLighter:!0},lightness:Me,taperChromaOptions:Q}},Xr={...T,surface1:{...T.surface1,taperChromaOptions:ue},surface2:{contrast:{reference:"bgFill1",followDirection:"opposite",target:T.bgFill1.contrast.target,ignoreWhenAdjustingSeed:!0},taperChromaOptions:ue},surface3:{...T.surface3,taperChromaOptions:ue},surface4:{...T.surface4,taperChromaOptions:ue},surface5:{...T.surface5,taperChromaOptions:ue},surface6:{...T.surface6,taperChromaOptions:ue},bgFill1:{contrast:{reference:"seed",followDirection:"main",target:1}},stroke1:{...T.stroke1},stroke2:{...T.stroke2},stroke3:{...T.stroke3,sameAsIfPossible:"fgSurface3",taperChromaOptions:void 0},stroke4:{...T.stroke4,taperChromaOptions:void 0},fgSurface1:{...T.fgSurface1,taperChromaOptions:void 0},fgSurface2:{...T.fgSurface2,taperChromaOptions:void 0},fgSurface3:{...T.fgSurface3,taperChromaOptions:void 0,sameAsIfPossible:"bgFill1"},fgSurface4:{...T.fgSurface4,taperChromaOptions:void 0}};function Jr(t){if(typeof t!="string"||t.trim()==="")throw new Error("Seed color must be a non-empty string");return Rt(t,T)}var Yr="surface2";function ca(t){return{mainDirection:t.direction,pinLightness:{stepName:Yr,value:Pr(v(t.ramp[Yr],[k,"l"]),t.direction)}}}function Zr(t,e){if(typeof t!="string"||t.trim()==="")throw new Error("Seed color must be a non-empty string");let r=e?ca(e):void 0;return Rt(t,Xr,r)}var ua=St(Jr,{maxSize:10}),ma=St(Zr,{maxSize:10}),pa=[["--wp-components-color-accent","var(--wp-admin-theme-color)"],["--wp-components-color-accent-darker-10","var(--wp-admin-theme-color-darker-10)"],["--wp-components-color-accent-darker-20","var(--wp-admin-theme-color-darker-20)"],["--wp-components-color-accent-inverted","var(--wpds-color-fg-interactive-brand-strong, #fff)"],["--wp-components-color-background","var(--wpds-color-bg-surface-neutral-strong, #ffffff)"],["--wp-components-color-foreground","var(--wpds-color-fg-content-neutral, #1e1e1e)"],["--wp-components-color-foreground-inverted","var(--wpds-color-bg-surface-neutral, #f8f8f8)"],["--wp-components-color-gray-100","var(--wpds-color-bg-surface-neutral, #f8f8f8)"],["--wp-components-color-gray-200","var(--wpds-color-stroke-surface-neutral, #d8d8d8)"],["--wp-components-color-gray-300","var(--wpds-color-stroke-surface-neutral, #d8d8d8)"],["--wp-components-color-gray-400","var(--wpds-color-stroke-interactive-neutral, #8a8a8a)"],["--wp-components-color-gray-600","var(--wpds-color-stroke-interactive-neutral, #8a8a8a)"],["--wp-components-color-gray-700","var(--wpds-color-fg-content-neutral-weak, #6d6d6d)"],["--wp-components-color-gray-800","var(--wpds-color-fg-content-neutral, #1e1e1e)"]];function It(t){return S(t,D).coords.map(r=>Math.round((r??0)*255)).join(", ")}function da(t){let e=S(t,ae),r=e.coords[2]??0,o=j($(e),[ae,"l"],Math.max(0,r-5)),a=j($(e),[ae,"l"],Math.max(0,r-10));return[["--wp-admin-theme-color",ne(e)],["--wp-admin-theme-color--rgb",It(e)],["--wp-admin-theme-color-darker-10",ne(o)],["--wp-admin-theme-color-darker-10--rgb",It(o)],["--wp-admin-theme-color-darker-20",ne(a)],["--wp-admin-theme-color-darker-20--rgb",It(a)]]}function ga(t){let e=[];for(let[r,{ramp:o}]of t)for(let[a,s]of Object.entries(o)){let n=`${r}-${a}`,i=Tr[n]??[];for(let l of i)e.push([`--wpds-color-${l}`,s])}return e}function ha({primary:t,computedColorRamps:e}){return Object.fromEntries([ga(e),da(t),pa].flat())}function Ze({color:t={}}={}){let{resolvedSettings:e}=(0,ve.useContext)(Ie),r=t.primary??e.color?.primary??ye.primary,o=t.bg??e.color?.bg??ye.bg,a=(0,ve.useMemo)(()=>({color:{primary:r,bg:o}}),[r,o]),s=(0,ve.useMemo)(()=>{let n={...ye,bg:o,primary:r},i=new Map,l=ua(n.bg);return Object.entries(n).forEach(([f,p])=>{f==="bg"?i.set(f,l):i.set(f,ma(p,l))}),ha({primary:n.primary,computedColorRamps:i})},[r,o]);return{resolvedSettings:a,themeProviderStyles:s}}var V=de(Ur(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='662a5161a8']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","662a5161a8"),t.appendChild(document.createTextNode(".dba930ea7a9438fd__root{display:contents}")),document.head.appendChild(t)}var Ke={root:"dba930ea7a9438fd__root"};function ba(t){return Object.entries(t).map(([e,r])=>`${e}: ${r};`).join("")}function Ca({instanceId:t,isRoot:e}){let r='[data-wpds-root-provider="true"]',o=`[data-wpds-theme-provider-id="${t}"]`,a=[];return e&&a.push(`:root:has(.${Ke.root}${r}${o})`),a.push(`.${Ke.root}.${Ke.root}${o}`),a.join(",")}var Qr=({children:t,color:e={},isRoot:r=!1,density:o})=>{let a=(0,Ue.useId)(),{themeProviderStyles:s,resolvedSettings:n}=Ze({color:e}),i=(0,Ue.useMemo)(()=>({resolvedSettings:n}),[n]);return(0,V.jsxs)(V.Fragment,{children:[s?(0,V.jsx)("style",{children:`${Ca({instanceId:a,isRoot:r})} {${ba(s)}}`}):null,(0,V.jsx)("div",{"data-wpds-theme-provider-id":a,"data-wpds-root-provider":r,"data-wpds-density":o,className:Ke.root,children:(0,V.jsx)(Ie.Provider,{value:i,children:t})})]})};var At={};$t(At,{ThemeProvider:Qr,useThemeProviderStyles:Ze});return co(wa);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/token-list.min.js?ver=16f0aebdd39d87c2a84b 
"use strict";var wp;(wp||={}).tokenList=(()=>{var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var s in e)a(r,s,{get:e[s],enumerable:!0})},A=(r,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!n.call(r,t)&&t!==s&&a(r,t,{get:()=>e[t],enumerable:!(i=u(e,t))||i.enumerable});return r};var v=r=>A(a({},"__esModule",{value:!0}),r);var _={};h(_,{default:()=>o});var o=class{_currentValue;_valueAsArray;constructor(r=""){this._currentValue="",this._valueAsArray=[],this.value=r}entries(...r){return this._valueAsArray.entries(...r)}forEach(...r){return this._valueAsArray.forEach(...r)}keys(...r){return this._valueAsArray.keys(...r)}values(...r){return this._valueAsArray.values(...r)}get value(){return this._currentValue}set value(r){r=String(r),this._valueAsArray=[...new Set(r.split(/\s+/g).filter(Boolean))],this._currentValue=this._valueAsArray.join(" ")}get length(){return this._valueAsArray.length}toString(){return this.value}*[Symbol.iterator](){return yield*this._valueAsArray}item(r){return this._valueAsArray[r]}contains(r){return this._valueAsArray.indexOf(r)!==-1}add(...r){this.value+=" "+r.join(" ")}remove(...r){this.value=this._valueAsArray.filter(e=>!r.includes(e)).join(" ")}toggle(r,e){return e===void 0&&(e=!this.contains(r)),e?this.add(r):this.remove(r),e}replace(r,e){return this.contains(r)?(this.remove(r),this.add(e),!0):!1}supports(r){return!0}};return v(_);})();
if (typeof wp.tokenList === 'object' && wp.tokenList.default) { wp.tokenList = wp.tokenList.default; };
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/upload-media.min.js?ver=d359c2cccf866d7082d2 
"use strict";var wp;(wp||={}).uploadMedia=(()=>{var Xe=Object.create;var N=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty;var tt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),M=(e,t)=>{for(var r in t)N(e,r,{get:t[r],enumerable:!0})},pe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ke(t))!et.call(e,n)&&n!==r&&N(e,n,{get:()=>t[n],enumerable:!(o=Ze(t,n))||o.enumerable});return e};var y=(e,t,r)=>(r=e!=null?Xe(Je(e)):{},pe(t||!e||!e.__esModule?N(r,"default",{value:e,enumerable:!0}):r,e)),rt=e=>pe(N({},"__esModule",{value:!0}),e);var q=S((ur,me)=>{me.exports=window.wp.data});var he=S((_r,ye)=>{ye.exports=window.wp.url});var D=S((Pr,Ue)=>{Ue.exports=window.wp.i18n});var Oe=S((Hr,Fe)=>{Fe.exports=window.wp.blob});var De=S((no,Me)=>{Me.exports=window.wp.privateApis});var se=S((po,Ne)=>{Ne.exports=window.wp.element});var ke=S((mo,qe)=>{qe.exports=window.wp.compose});var ue=S((fo,Le)=>{Le.exports=window.ReactJSXRuntime});var ar={};M(ar,{MediaUploadProvider:()=>je,UploadError:()=>v,clearFeatureDetectionCache:()=>Ye,detectClientSideMediaSupport:()=>ce,isClientSideMediaSupported:()=>He,store:()=>P});var O=y(q(),1);var s=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.RetryItem="RETRY_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateProgress="UPDATE_PROGRESS",e.UpdateSettings="UPDATE_SETTINGS",e))(s||{}),w=(e=>(e.Queued="QUEUED",e.Processing="PROCESSING",e.Paused="PAUSED",e.Uploaded="UPLOADED",e.Error="ERROR",e))(w||{}),u=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e.ResizeCrop="RESIZE_CROP",e.Rotate="ROTATE",e.TranscodeImage="TRANSCODE_IMAGE",e.ThumbnailGeneration="THUMBNAIL_GENERATION",e.Finalize="FINALIZE",e))(u||{});var k="core/upload-media",de=5,fe=2,ge=["image/jpeg","image/png","image/gif","image/webp","image/avif"];var ot=()=>{},nt={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:ot,maxConcurrentUploads:de,maxConcurrentImageProcessing:fe}};function it(e=nt,t={type:s.Unknown}){switch(t.type){case s.PauseQueue:return{...e,queueStatus:"paused"};case s.ResumeQueue:return{...e,queueStatus:"active"};case s.PauseItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Paused}:r)};case s.ResumeItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Processing}:r)};case s.Add:return{...e,queue:[...e.queue,t.item]};case s.Cancel:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,error:t.error}:r)};case s.RetryItem:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,status:w.Processing,error:void 0,retryCount:(r.retryCount??0)+1}:r)};case s.Remove:return{...e,queue:e.queue.filter(r=>r.id!==t.id)};case s.OperationStart:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,currentOperation:t.operation}:r)};case s.AddOperations:return{...e,queue:e.queue.map(r=>r.id!==t.id?r:{...r,operations:[...r.operations||[],...t.operations]})};case s.OperationFinish:return{...e,queue:e.queue.map(r=>{if(r.id!==t.id)return r;let o=r.operations?r.operations.slice(1):[],n=r.attachment||t.item.attachment?{...r.attachment,...t.item.attachment}:void 0;return{...r,currentOperation:void 0,operations:o,...t.item,attachment:n,additionalData:{...r.additionalData,...t.item.additionalData}}})};case s.CacheBlobUrl:{let r=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...r,t.blobUrl]}}}case s.RevokeBlobUrls:{let r={...e.blobUrls};return delete r[t.id],{...e,blobUrls:r}}case s.UpdateProgress:return{...e,queue:e.queue.map(r=>r.id===t.id?{...r,progress:t.progress}:r)};case s.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e}var Z=it;var L={};M(L,{getItems:()=>at,getSettings:()=>lt,isUploading:()=>st,isUploadingById:()=>ct,isUploadingByUrl:()=>ut});function at(e){return e.queue}function st(e){return e.queue.length>=1}function ut(e,t){return e.queue.some(r=>r.attachment?.url===t||r.sourceUrl===t)}function ct(e,t){return e.queue.some(r=>r.attachment?.id===t||r.sourceAttachmentId===t)}function lt(e){return e.settings}var K={};M(K,{getActiveImageProcessingCount:()=>vt,getActiveUploadCount:()=>ht,getAllItems:()=>pt,getBlobUrls:()=>yt,getFailedItems:()=>wt,getItem:()=>mt,getItemProgress:()=>Et,getPausedUploadForPost:()=>gt,getPendingImageProcessing:()=>bt,getPendingUploads:()=>Ut,hasPendingItemsByParentId:()=>Rt,isBatchUploaded:()=>dt,isPaused:()=>It,isUploadingToPost:()=>ft});function pt(e){return e.queue}function mt(e,t){return e.queue.find(r=>r.id===t)}function dt(e,t){return e.queue.filter(o=>t===o.batchId).length===0}function ft(e,t){return e.queue.some(r=>r.currentOperation===u.Upload&&r.additionalData.post===t)}function gt(e,t){return e.queue.find(r=>r.status===w.Paused&&r.additionalData.post===t)}function It(e){return e.queueStatus==="paused"}function yt(e,t){return e.blobUrls[t]||[]}function ht(e){return e.queue.filter(t=>t.currentOperation===u.Upload).length}function Ut(e){return e.queue.filter(t=>(Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0])===u.Upload&&t.currentOperation!==u.Upload)}function vt(e){return e.queue.filter(t=>t.currentOperation===u.ResizeCrop||t.currentOperation===u.Rotate).length}function bt(e){return e.queue.filter(t=>{let r=Array.isArray(t.operations?.[0])?t.operations[0][0]:t.operations?.[0];return(r===u.ResizeCrop||r===u.Rotate)&&t.currentOperation!==u.ResizeCrop&&t.currentOperation!==u.Rotate})}function wt(e){return e.queue.filter(t=>t.error!==void 0)}function Rt(e,t){return e.queue.some(r=>r.parentId===t)}function Et(e,t){return e.queue.find(o=>o.id===t)?.progress}var H={};M(H,{addItems:()=>Ft,cancelItem:()=>Ot,retryItem:()=>Tt});var W,St=new Uint8Array(16);function J(){if(!W&&(W=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!W))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return W(St)}var I=[];for(let e=0;e<256;++e)I.push((e+256).toString(16).slice(1));function Ie(e,t=0){return I[e[t+0]]+I[e[t+1]]+I[e[t+2]]+I[e[t+3]]+"-"+I[e[t+4]]+I[e[t+5]]+"-"+I[e[t+6]]+I[e[t+7]]+"-"+I[e[t+8]]+I[e[t+9]]+"-"+I[e[t+10]]+I[e[t+11]]+I[e[t+12]]+I[e[t+13]]+I[e[t+14]]+I[e[t+15]]}var _t=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ee={randomUUID:_t};function Pt(e,t,r){if(ee.randomUUID&&!t&&!e)return ee.randomUUID();e=e||{};let o=e.random||(e.rng||J)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return Ie(o)}var _=Pt;var te=class extends File{width=0;height=0;originalWidth=0;originalHeight=0;get wasResized(){return(this.originalWidth||0)>this.width||(this.originalHeight||0)>this.height}constructor(e,t,r,o,n){super([e],e.name,{type:e.type,lastModified:e.lastModified}),this.width=t,this.height=r,this.originalWidth=o,this.originalHeight=n}};var At=y(he(),1),Ct=y(D(),1);function ve(e){if(e instanceof File)return e;if("name"in e&&typeof e.name=="string")return new File([e],e.name,{type:e.type,lastModified:e.lastModified});let t=e.type.split("/")[1],r=e.type==="application/pdf"?"document":e.type.split("/")[0];return new File([e],`${r}.${t}`,{type:e.type})}function G(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}function re(e){return G(e,e.name)}function Q(e){return e.includes(".")?e.split(".").slice(0,-1).join("."):e}var oe,z;function $(){return oe||(oe=import("@wordpress/vips/worker").then(e=>(z=e,e))),oe}async function be(e,t,r,o,n){let{vipsConvertImageFormat:i}=await $(),a=await i(e,await t.arrayBuffer(),t.type,r,o,n),c=r.split("/")[1],l=`${Q(t.name)}.${c}`;return new File([new Blob([a])],l,{type:r})}async function we(e){let{vipsHasTransparency:t}=await $(),r=await fetch(e);if(!r.ok)throw new Error(`Failed to fetch image: ${r.status}`);return t(await r.arrayBuffer())}async function Re(e,t,r,o,n,i,a,c){if(i?.aborted)throw new Error("Operation aborted");let{vipsResizeImage:l}=await $(),{buffer:d,width:p,height:f,originalWidth:m,originalHeight:h}=await l(e,await t.arrayBuffer(),t.type,r,o,c),U=t.name;if(m>p||h>f){let R=Q(t.name);a?U=t.name.replace(R,`${R}-scaled`):n&&(U=t.name.replace(R,`${R}-${p}x${f}`))}return new te(new File([new Blob([d],{type:t.type})],U,{type:t.type}),p,f,m,h)}async function ne(e,t,r,o){if(o?.aborted)throw new Error("Operation aborted");if(r===1)return t;let{vipsRotateImage:n}=await $(),{buffer:i,width:a,height:c}=await n(e,await t.arrayBuffer(),t.type,r),l=Q(t.name),d=t.name.replace(l,`${l}-rotated`);return new te(new File([new Blob([i],{type:t.type})],d,{type:t.type}),a,c)}async function Ee(e){return z?z.vipsCancelOperations(e):!1}function Se(){z&&z.terminateVipsWorker()}var V=y(D(),1);var v=class extends Error{code;file;constructor({code:e,message:t,file:r,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=r}};function _e(e,t){if(!t)return;let r=t.some(o=>o.includes("/")?o===e.type:e.type.startsWith(`${o}/`));if(e.type&&!r)throw new v({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,V.sprintf)((0,V.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var j=y(D(),1);function Pe(e){return e?Object.entries(e).flatMap(([t,r])=>{let[o]=r.split("/"),n=t.split("|");return[r,...n.map(i=>`${o}/${i}`)]}):null}function Ae(e,t){let r=Pe(t);if(!r)return;let o=r.includes(e.type);if(e.type&&!o)throw new v({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,j.sprintf)((0,j.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var F=y(D(),1);function Ce(e,t){if(e.size<=0)throw new v({code:"EMPTY_FILE",message:(0,F.sprintf)((0,F.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new v({code:"SIZE_ABOVE_LIMIT",message:(0,F.sprintf)((0,F.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Ft({files:e,onChange:t,onSuccess:r,onError:o,onBatchSuccess:n,additionalData:i,allowedTypes:a}){return async({select:c,dispatch:l})=>{let d=_();for(let p of e){try{_e(p,a),Ae(p,c.getSettings().allowedMimeTypes)}catch(f){o?.(f);continue}try{Ce(p,c.getSettings().maxUploadFileSize)}catch(f){o?.(f);continue}l.addItem({file:p,batchId:d,onChange:t,onSuccess:r,onBatchSuccess:n,onError:o,additionalData:i})}}}function Ot(e,t,r=!1){return async({select:o,dispatch:n})=>{let i=o.getItem(e);if(i){if(i.abortController?.abort(),await Ee(e),!r){let{onError:a}=i;a?.(t??new Error("Upload cancelled")),!a&&t&&console.error("Upload cancelled",t)}n({type:s.Cancel,id:e,error:t}),n.removeItem(e),n.revokeBlobUrls(e),i.batchId&&o.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function Tt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);o&&o.error&&(r({type:s.RetryItem,id:e}),r.processItem(e))}}var ae={};M(ae,{addItem:()=>Mt,addSideloadItem:()=>Dt,finalizeItem:()=>Jt,finishOperation:()=>Wt,generateThumbnails:()=>Kt,getTranscodeImageOperation:()=>ie,pauseItem:()=>qt,pauseQueue:()=>Bt,prepareItem:()=>Vt,processItem:()=>zt,removeItem:()=>Lt,resizeCropItem:()=>Yt,resumeItemByPostId:()=>kt,resumeQueue:()=>Nt,revokeBlobUrls:()=>er,rotateItem:()=>Xt,sideloadItem:()=>Ht,transcodeImageItem:()=>Zt,updateItemProgress:()=>tr,updateSettings:()=>rr,uploadItem:()=>jt});var b=y(Oe(),1);var Te=class extends File{constructor(e="stub-file"){super([],e)}};var xe=.82;function xt(e,t,r){return t!==u.Upload||!e.parentId||!e.additionalData.post?!1:r.isUploadingToPost(e.additionalData.post)}function Mt({file:e,batchId:t,onChange:r,onSuccess:o,onBatchSuccess:n,onError:i,additionalData:a={},sourceUrl:c,sourceAttachmentId:l,abortController:d,operations:p}){return async({dispatch:f})=>{let m=_(),h=ve(e),U;h instanceof Te||(U=(0,b.createBlobURL)(h),f({type:s.CacheBlobUrl,id:m,blobUrl:U})),f({type:s.Add,item:{id:m,batchId:t,status:w.Processing,sourceFile:re(h),file:h,attachment:{url:U},additionalData:{convert_format:!1,generate_sub_sizes:!1,...a},onChange:r,onSuccess:o,onBatchSuccess:n,onError:i,sourceUrl:c,sourceAttachmentId:l,abortController:d||new AbortController,operations:Array.isArray(p)?p:[u.Prepare]}}),f.processItem(m)}}function Dt({file:e,onChange:t,additionalData:r,operations:o,batchId:n,parentId:i}){return({dispatch:a})=>{let c=_();a({type:s.Add,item:{id:c,batchId:n,status:w.Processing,sourceFile:re(e),file:e,onChange:t,additionalData:{...r},parentId:i,operations:Array.isArray(o)?o:[u.Prepare],abortController:new AbortController}}),a.processItem(c)}}function zt(e){return async({select:t,dispatch:r})=>{if(t.isPaused())return;let o=t.getItem(e);if(!o)return;let{attachment:n,onChange:i,onSuccess:a,onBatchSuccess:c,batchId:l,parentId:d}=o,p=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0],f=Array.isArray(o.operations?.[0])?o.operations[0][1]:void 0;if(xt(o,p,t)){r({type:s.PauseItem,id:e});return}if(p===u.Upload){let m=t.getSettings();if(t.getActiveUploadCount()>=m.maxConcurrentUploads)return}if(p===u.ResizeCrop||p===u.Rotate){let m=t.getSettings();if(t.getActiveImageProcessingCount()>=m.maxConcurrentImageProcessing)return}if(n&&i?.([n]),!p){if((d||!d&&!t.hasPendingItemsByParentId(e))&&(n&&a?.([n]),r.removeItem(e),r.revokeBlobUrls(e),l&&t.isBatchUploaded(l)&&c?.()),d&&l&&t.isBatchUploaded(l)){let m=t.getItem(d);if(!m)return;if(m.operations&&m.operations.length>0){r.processItem(d);return}n&&m.onSuccess?.([n]),r.removeItem(d),r.revokeBlobUrls(d),m.batchId&&t.isBatchUploaded(m.batchId)&&m.onBatchSuccess?.()}return}if(!(p===u.Finalize&&t.hasPendingItemsByParentId(e)))switch(r({type:s.OperationStart,id:e,operation:p}),p){case u.Prepare:r.prepareItem(o.id);break;case u.ResizeCrop:r.resizeCropItem(o.id,f);break;case u.Rotate:r.rotateItem(o.id,f);break;case u.TranscodeImage:r.transcodeImageItem(o.id,f);break;case u.Upload:o.parentId?r.sideloadItem(e):r.uploadItem(e);break;case u.ThumbnailGeneration:r.generateThumbnails(e);break;case u.Finalize:r.finalizeItem(e);break}}}function Bt(){return{type:s.PauseQueue}}function Nt(){return async({select:e,dispatch:t})=>{t({type:s.ResumeQueue});for(let r of e.getAllItems())t.processItem(r.id)}}function qt(e){return async({dispatch:t})=>{t({type:s.PauseItem,id:e})}}function kt(e){return async({select:t,dispatch:r})=>{let o=t.getPausedUploadForPost(e);o&&(r({type:s.ResumeItem,id:o.id}),r.processItem(o.id))}}function Lt(e){return async({select:t,dispatch:r})=>{t.getItem(e)&&(r({type:s.Remove,id:e}),t.getAllItems().length===0&&Se())}}function Wt(e,t){return async({select:r,dispatch:o})=>{let i=r.getItem(e)?.currentOperation;if(o({type:s.OperationFinish,id:e,item:t}),o.processItem(e),i===u.Upload){let a=r.getPendingUploads();for(let c of a)o.processItem(c.id)}if(i===u.ResizeCrop||i===u.Rotate){let a=r.getPendingImageProcessing();for(let c of a)o.processItem(c.id)}}}var Gt=["jpeg","webp","avif","png","gif"];function Qt(e){return Gt.includes(e)}function $t(e,t){switch(e){case"image/jpeg":return t.jpegInterlaced??!1;case"image/png":return t.pngInterlaced??!1;case"image/gif":return t.gifInterlaced??!1;default:return!1}}async function ie(e,t,r){if(e.type==="image/png"&&t==="image/jpeg"){let n=(0,b.createBlobURL)(e);try{if(await we(n))return null}catch{return null}finally{(0,b.revokeBlobURL)(n)}}let o=t.split("/")[1];return Qt(o)?[u.TranscodeImage,{outputFormat:o,outputQuality:xe,interlaced:$t(t,r)}]:null}function Vt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let{file:n}=o,i=[],a=t.getSettings(),c=n.type.startsWith("image/"),l=ge.includes(n.type);if(c&&l){let{imageOutputFormats:p}=a,f=p?.[n.type];if(f&&f!==n.type){let m=await ie(n,f,a);m&&i.push(m)}i.push(u.Upload,u.ThumbnailGeneration,u.Finalize)}else i.push(u.Upload);r({type:s.AddOperations,id:e,operations:i});let d=!l||!c?{additionalData:{...o.additionalData,generate_sub_sizes:!0,convert_format:!0}}:{};r.finishOperation(e,d)}}function jt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);o&&t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([n])=>{n&&!(0,b.isBlobURL)(n.url)&&r.finishOperation(e,{attachment:n})},onSuccess:([n])=>{r.finishOperation(e,{attachment:n})},onError:n=>{r.cancelItem(e,n)}})}}function Ht(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let{post:n,...i}=o.additionalData,a=t.getSettings().mediaSideload;if(!a){r.finishOperation(e,{});return}a({file:o.file,attachmentId:n,additionalData:i,signal:o.abortController?.signal,onFileChange:([c])=>{r.finishOperation(e,{attachment:c}),r.resumeItemByPostId(n)},onError:c=>{r.cancelItem(e,c),r.resumeItemByPostId(n)}})}}function Yt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(!n)return;if(!t?.resize){o.finishOperation(e,{file:n.file});return}let i=!!n.parentId,a=!!t.isThresholdResize;try{let c=await Re(n.id,n.file,t.resize,!1,i,n.abortController?.signal,a),l=(0,b.createBlobURL)(c);o({type:s.CacheBlobUrl,id:e,blobUrl:l}),o.finishOperation(e,{file:c,attachment:{url:l}})}catch(c){o.cancelItem(e,new v({code:"IMAGE_TRANSCODING_ERROR",message:"File could not be uploaded",file:n.file,cause:c instanceof Error?c:void 0}))}}}function Xt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(n){if(!t?.orientation||t.orientation===1){o.finishOperation(e,{file:n.file});return}try{let i=await ne(n.id,n.file,t.orientation,n.abortController?.signal),a=(0,b.createBlobURL)(i);o({type:s.CacheBlobUrl,id:e,blobUrl:a}),o.finishOperation(e,{file:i,attachment:{url:a}})}catch(i){o.cancelItem(e,new v({code:"IMAGE_ROTATION_ERROR",message:"Image could not be rotated",file:n.file,cause:i instanceof Error?i:void 0}))}}}}function Zt(e,t){return async({select:r,dispatch:o})=>{let n=r.getItem(e);if(!n)return;if(!t?.outputFormat){o.finishOperation(e,{file:n.file});return}let i=`image/${t.outputFormat}`,a=t.outputQuality??xe,c=t.interlaced??!1;try{let l=await be(n.id,n.file,i,a,c),d=(0,b.createBlobURL)(l);o({type:s.CacheBlobUrl,id:e,blobUrl:d}),o.finishOperation(e,{file:l,attachment:{url:d}})}catch(l){o.cancelItem(e,new v({code:"MEDIA_TRANSCODING_ERROR",message:"Image could not be transcoded to the target format",file:n.file,cause:l instanceof Error?l:void 0}))}}}function Kt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;if(!o.attachment){r.finishOperation(e,{});return}let n=o.attachment;if(n.exif_orientation&&n.exif_orientation!==1&&!o.file.name.includes("-scaled")&&n.id)try{let a=await ne(o.id,o.sourceFile,n.exif_orientation,o.abortController?.signal);r.addSideloadItem({file:a,batchId:_(),parentId:o.id,additionalData:{post:n.id,image_size:"original",convert_format:!1},operations:[u.Upload]})}catch{console.warn("Failed to rotate image, continuing with thumbnails")}if(!o.parentId&&n.missing_image_sizes&&n.missing_image_sizes.length>0){let a=t.getSettings(),c=a.allImageSizes||{},l=n.missing_image_sizes,d=n.filename?G(o.sourceFile,n.filename):o.sourceFile,p=_(),{imageOutputFormats:f}=a,m=o.sourceFile.type,h=f?.[m],U=null;h&&h!==m&&(U=await ie(o.sourceFile,h,a));for(let E of l){let R=c[E];if(!R){console.warn(`Image size "${E}" not found in configuration`);continue}let x=[[u.ResizeCrop,{resize:R}]];U&&x.push(U),x.push(u.Upload),r.addSideloadItem({file:d,onChange:([C])=>{(0,b.isBlobURL)(C.url)||o.onChange?.([C])},batchId:p,parentId:o.id,additionalData:{post:n.id,image_size:E,convert_format:!1},operations:x})}let{bigImageSizeThreshold:A}=a;if(A&&n.id){let E=await createImageBitmap(o.sourceFile),R=E.width>A||E.height>A;if(E.close(),R){let x=n.filename?G(o.sourceFile,n.filename):o.sourceFile,C=[[u.ResizeCrop,{resize:{width:A,height:A},isThresholdResize:!0}]];U&&C.push(U),C.push(u.Upload),r.addSideloadItem({file:x,onChange:([le])=>{(0,b.isBlobURL)(le.url)||o.onChange?.([le])},batchId:p,parentId:o.id,additionalData:{post:n.id,image_size:"scaled",convert_format:!1},operations:C})}}}r.finishOperation(e,{})}}function Jt(e){return async({select:t,dispatch:r})=>{let o=t.getItem(e);if(!o)return;let n=o.attachment,{mediaFinalize:i}=t.getSettings();if(n?.id&&i)try{await i(n.id)}catch(a){console.warn("Media finalization failed:",a)}r.finishOperation(e,{})}}function er(e){return async({select:t,dispatch:r})=>{let o=t.getBlobUrls(e);for(let n of o)(0,b.revokeBlobURL)(n);r({type:s.RevokeBlobUrls,id:e})}}function tr(e,t){return async({dispatch:r})=>{r({type:s.UpdateProgress,id:e,progress:t})}}function rr(e){return{type:s.UpdateSettings,settings:e}}var ze=y(De(),1),{lock:io,unlock:B}=(0,ze.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/upload-media");var Be={reducer:Z,selectors:L,actions:H},P=(0,O.createReduxStore)(k,{reducer:Z,selectors:L,actions:H});(0,O.select)(P)||(0,O.register)(P);B(P).registerPrivateActions(ae);B(P).registerPrivateSelectors(K);var $e=y(se(),1),Ve=y(q(),1);var We=y(se(),1),T=y(q(),1),Ge=y(ke(),1);var Y=y(ue(),1);function or(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,T.createRegistry)({},t),o.registerStore(k,Be),e.set(t,o)),o}var nr=(0,Ge.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,T.useRegistry)(),[n]=(0,We.useState)(()=>new WeakMap),i=or(n,o,t);return i===o?(0,Y.jsx)(e,{registry:o,...r}):(0,Y.jsx)(T.RegistryProvider,{value:i,children:(0,Y.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),Qe=nr;var X=y(ue(),1),ir=Qe(e=>{let{children:t,settings:r}=e,{updateSettings:o}=B((0,Ve.useDispatch)(P));return(0,$e.useEffect)(()=>{o(r)},[r,o]),(0,X.jsx)(X.Fragment,{children:t})}),je=ir;var g=null;function ce(){if(g!==null)return g;if(typeof WebAssembly>"u")return g={supported:!1,reason:"WebAssembly is not supported in this browser."},g;if(typeof SharedArrayBuffer>"u")return g={supported:!1,reason:"SharedArrayBuffer is not available. This may be due to missing cross-origin isolation headers."},g;if(typeof Worker>"u")return g={supported:!1,reason:"Web Workers are not supported in this browser."},g;if(typeof navigator<"u"&&"deviceMemory"in navigator&&navigator.deviceMemory<=2)return g={supported:!1,reason:"Device has insufficient memory for client-side media processing."},g;if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency<2)return g={supported:!1,reason:"Device has insufficient CPU cores for client-side media processing."},g;if(typeof navigator<"u"){let e=navigator.connection;if(e){if(e.saveData)return g={supported:!1,reason:"Data saver mode is enabled."},g;if(e.effectiveType==="slow-2g"||e.effectiveType==="2g")return g={supported:!1,reason:"Network connection is too slow for client-side media processing."},g}}if(typeof window<"u")try{let e=new Blob([""],{type:"application/javascript"}),t=URL.createObjectURL(e);try{new Worker(t).terminate()}finally{URL.revokeObjectURL(t)}}catch{return g={supported:!1,reason:"The site's Content Security Policy (CSP) does not allow blob: workers. The worker-src directive must include blob: to enable client-side media processing."},g}return g={supported:!0},g}function He(){return ce().supported}function Ye(){g=null}return rt(ar);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/block-editor.min.js?ver=93c3566b7f24c15b7e17 
"use strict";var wp;(wp||={}).blockEditor=(()=>{var Gme=Object.create;var l0=Object.defineProperty;var Wme=Object.getOwnPropertyDescriptor;var $me=Object.getOwnPropertyNames;var Kme=Object.getPrototypeOf,Yme=Object.prototype.hasOwnProperty;var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ip=(e,t)=>{for(var o in t)l0(e,o,{get:t[o],enumerable:!0})},l6=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $me(t))!Yme.call(e,n)&&n!==o&&l0(e,n,{get:()=>t[n],enumerable:!(r=Wme(t,n))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?Gme(Kme(e)):{},l6(t||!e||!e.__esModule?l0(o,"default",{value:e,enumerable:!0}):o,e)),qme=e=>l6(l0({},"__esModule",{value:!0}),e);var $=oe((hLe,u6)=>{u6.exports=window.wp.blocks});var R=oe((gLe,d6)=>{d6.exports=window.wp.element});var F=oe((bLe,f6)=>{f6.exports=window.wp.data});var Z=oe((kLe,m6)=>{m6.exports=window.wp.compose});var ut=oe((vLe,p6)=>{p6.exports=window.wp.hooks});var A=oe((wLe,C6)=>{C6.exports=window.wp.components});var CO=oe((CLe,B6)=>{B6.exports=window.wp.privateApis});var Re=oe((OLe,R6)=>{R6.exports=window.wp.deprecated});var w=oe((ALe,O6)=>{O6.exports=window.ReactJSXRuntime});var dn=oe((NLe,L6)=>{L6.exports=window.wp.url});var N=oe(($Le,j6)=>{j6.exports=window.wp.i18n});var yf=oe((KLe,U6)=>{"use strict";U6.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],o.get(n[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(n of t.entries())if(!o.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(t[n]!==o[n])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var q=oe((rNe,J6)=>{J6.exports=window.wp.primitives});var dr=oe((wVe,ej)=>{ej.exports=window.wp.richText});var oj=oe((CVe,tj)=>{tj.exports=window.wp.blockSerializationDefaultParser});var Xo=oe((t3e,Vj)=>{Vj.exports=window.wp.a11y});var Un=oe((o3e,Gj)=>{Gj.exports=window.wp.notices});var Zp=oe((r3e,Wj)=>{Wj.exports=window.wp.preferences});var TU=oe((oFe,Kw)=>{var CU={\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"},BU=Object.keys(CU).join("|"),ave=new RegExp(BU,"g"),lve=new RegExp(BU,"");function cve(e){return CU[e]}var EU=function(e){return e.replace(ave,cve)},uve=function(e){return!!e.match(lve)};Kw.exports=EU;Kw.exports.has=uve;Kw.exports.remove=EU});var zU=oe((wFe,FU)=>{FU.exports=window.wp.apiFetch});var SM=oe((CFe,jU)=>{jU.exports=window.wp.htmlEntities});var Uv=oe((XFe,aH)=>{aH.exports=window.wp.styleEngine});var it=oe((Z4e,PH)=>{PH.exports=window.wp.keycodes});var Fe=oe((hze,GH)=>{GH.exports=window.wp.dom});var $H=oe(NM=>{"use strict";Object.defineProperty(NM,"__esModule",{value:!0});NM.default=WH;function WH(){}WH.prototype={diff:function(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.callback;typeof r=="function"&&(n=r,r={}),this.options=r;var i=this;function s(g){return n?(setTimeout(function(){n(void 0,g)},0),!0):g}t=this.castInput(t),o=this.castInput(o),t=this.removeEmpty(this.tokenize(t)),o=this.removeEmpty(this.tokenize(o));var a=o.length,c=t.length,u=1,d=a+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],o,t,0);if(f[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(o),count:o.length}]);function h(){for(var g=-1*u;g<=u;g+=2){var b=void 0,v=f[g-1],k=f[g+1],y=(k?k.newPos:0)-g;v&&(f[g-1]=void 0);var S=v&&v.newPos+1<a,x=k&&0<=y&&y<c;if(!S&&!x){f[g]=void 0;continue}if(!S||x&&v.newPos<k.newPos?(b=rye(k),i.pushComponent(b.components,void 0,!0)):(b=v,b.newPos++,i.pushComponent(b.components,!0,void 0)),y=i.extractCommon(b,o,t,g),b.newPos+1>=a&&y+1>=c)return s(oye(i,b.components,o,t,i.useLongestToken));f[g]=b}u++}if(n)(function g(){setTimeout(function(){if(u>d)return n();h()||g()},0)})();else for(;u<=d;){var p=h();if(p)return p}},pushComponent:function(t,o,r){var n=t[t.length-1];n&&n.added===o&&n.removed===r?t[t.length-1]={count:n.count+1,added:o,removed:r}:t.push({count:1,added:o,removed:r})},extractCommon:function(t,o,r,n){for(var i=o.length,s=r.length,a=t.newPos,c=a-n,u=0;a+1<i&&c+1<s&&this.equals(o[a+1],r[c+1]);)a++,c++,u++;return u&&t.components.push({count:u}),t.newPos=a,c},equals:function(t,o){return this.options.comparator?this.options.comparator(t,o):t===o||this.options.ignoreCase&&t.toLowerCase()===o.toLowerCase()},removeEmpty:function(t){for(var o=[],r=0;r<t.length;r++)t[r]&&o.push(t[r]);return o},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function oye(e,t,o,r,n){for(var i=0,s=t.length,a=0,c=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=o.slice(a,a+u.count);d=d.map(function(h,p){var g=r[c+p];return g.length>h.length?g:h}),u.value=e.join(d)}else u.value=e.join(o.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}var m=t[s-1];return s>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[s-2].value+=m.value,t.pop()),t}function rye(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var YH=oe(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});Zv.diffChars=sye;Zv.characterDiff=void 0;var nye=iye($H());function iye(e){return e&&e.__esModule?e:{default:e}}var KH=new nye.default;Zv.characterDiff=KH;function sye(e,t,o){return KH.diff(e,t,o)}});var jr=oe((Pze,l8)=>{l8.exports=window.React});var u8=oe((Rze,c8)=>{"use strict";var uye="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";c8.exports=uye});var p8=oe((Oze,m8)=>{"use strict";var dye=u8();function d8(){}function f8(){}f8.resetWarningCache=d8;m8.exports=function(){function e(r,n,i,s,a,c){if(c!==dye){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:f8,resetWarningCache:d8};return o.PropTypes=o,o}});var g8=oe((Nze,h8)=>{h8.exports=p8()();var Aze,Lze});var k8=oe((_C,b8)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof _C<"u")t(b8,_C);else{var o={exports:{}};t(o,o.exports),e.autosize=o.exports}})(_C,function(e,t){"use strict";var o=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),r=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{r=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||o.has(c))return;var u=null,d=null,f=null;function m(){var y=window.getComputedStyle(c,null);y.resize==="vertical"?c.style.resize="none":y.resize==="both"&&(c.style.resize="horizontal"),y.boxSizing==="content-box"?u=-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):u=parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth),isNaN(u)&&(u=0),b()}function h(y){{var S=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=S}c.style.overflowY=y}function p(y){for(var S=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&S.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),y=y.parentNode;return S}function g(){if(c.scrollHeight!==0){var y=p(c),S=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,y.forEach(function(x){x.node.scrollTop=x.scrollTop}),S&&(document.documentElement.scrollTop=S)}}function b(){g();var y=Math.round(parseFloat(c.style.height)),S=window.getComputedStyle(c,null),x=S.boxSizing==="content-box"?Math.round(parseFloat(S.height)):c.offsetHeight;if(x<y?S.overflowY==="hidden"&&(h("scroll"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):S.overflowY!=="hidden"&&(h("hidden"),g(),x=S.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==x){f=x;var C=r("autosize:resized");try{c.dispatchEvent(C)}catch{}}}var v=function(){c.clientWidth!==d&&b()},k=function(y){window.removeEventListener("resize",v,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",k,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(y).forEach(function(S){c.style[S]=y[S]}),o.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",k,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",v,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",o.set(c,{destroy:k,update:b}),m()}function i(c){var u=o.get(c);u&&u.destroy()}function s(c){var u=o.get(c);u&&u.update()}var a=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(a=function(u){return u},a.destroy=function(c){return c},a.update=function(c){return c}):(a=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},a.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},a.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],s),c}),t.default=a,e.exports=t.default})});var y8=oe((Mze,v8)=>{var fye=function(e,t,o){return o=window.getComputedStyle,(o?o(e):e.currentStyle)[t.replace(/-(\w)/gi,function(r,n){return n.toUpperCase()})]};v8.exports=fye});var _8=oe((Dze,S8)=>{var DM=y8();function mye(e){var t=DM(e,"line-height"),o=parseFloat(t,10);if(t===o+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=DM(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=DM(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i);var c=i.offsetHeight;o=c,a.removeChild(i)}return o}S8.exports=mye});var w8=oe(Pl=>{"use strict";var pye=Pl&&Pl.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])};return function(t,o){e(t,o);function r(){this.constructor=t}t.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}})(),VM=Pl&&Pl.__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},hye=Pl&&Pl.__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};Pl.__esModule=!0;var wC=jr(),Xv=g8(),xC=k8(),gye=_8(),bye=gye,x8="autosize:resized",kye=(function(e){pye(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:bye(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&&xC(o.textarea)}):this.textarea&&xC(this.textarea),this.textarea&&this.textarea.addEventListener(x8,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(x8,this.onResize),xC.destroy(this.textarea))},t.prototype.render=function(){var o=this,r=this,n=r.props,i=n.onResize,s=n.maxRows,a=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=hye(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=r.state.lineHeight,h=s&&m?m*s:null;return wC.createElement("textarea",VM({},f,{onChange:this.onChange,style:h?VM({},c,{maxHeight:h}):c,ref:function(p){o.textarea=p,typeof o.props.innerRef=="function"?o.props.innerRef(p):o.props.innerRef&&(o.props.innerRef.current=p)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&xC.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:Xv.number,maxRows:Xv.number,onResize:Xv.func,innerRef:Xv.any,async:Xv.bool},t})(wC.Component);Pl.TextareaAutosize=wC.forwardRef(function(e,t){return wC.createElement(kye,VM({},e,{innerRef:t}))})});var FM=oe((Fze,C8)=>{"use strict";var vye=w8();C8.exports=vye.TextareaAutosize});var Qv=oe((Uze,I8)=>{I8.exports=window.wp.warning});var B7=oe((s6e,C7)=>{C7.exports=window.ReactDOM});var Is=oe((L6e,t9)=>{t9.exports=window.wp.keyboardShortcuts});var _9=oe((Yje,S9)=>{S9.exports=window.wp.uploadMedia});var R1=oe(()=>{});var O1=oe(()=>{});var UD=oe(()=>{});var AG=oe((_He,OG)=>{var E_e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",T_e=(e,t=21)=>(o=t)=>{let r="",n=o|0;for(;n--;)r+=e[Math.random()*e.length|0];return r},I_e=(e=21)=>{let t="",o=e|0;for(;o--;)t+=E_e[Math.random()*64|0];return t};OG.exports={nanoid:I_e,customAlphabet:T_e}});var HD=oe(()=>{});var NG=oe((CHe,GD)=>{var Ce=String,LG=function(){return{isColorSupported:!1,reset:Ce,bold:Ce,dim:Ce,italic:Ce,underline:Ce,inverse:Ce,hidden:Ce,strikethrough:Ce,black:Ce,red:Ce,green:Ce,yellow:Ce,blue:Ce,magenta:Ce,cyan:Ce,white:Ce,gray:Ce,bgBlack:Ce,bgRed:Ce,bgGreen:Ce,bgYellow:Ce,bgBlue:Ce,bgMagenta:Ce,bgCyan:Ce,bgWhite:Ce,blackBright:Ce,redBright:Ce,greenBright:Ce,yellowBright:Ce,blueBright:Ce,magentaBright:Ce,cyanBright:Ce,whiteBright:Ce,bgBlackBright:Ce,bgRedBright:Ce,bgGreenBright:Ce,bgYellowBright:Ce,bgBlueBright:Ce,bgMagentaBright:Ce,bgCyanBright:Ce,bgWhiteBright:Ce}};GD.exports=LG();GD.exports.createColors=LG});var A1=oe((BHe,VG)=>{"use strict";var MG=NG(),DG=HD(),By=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=MG.isColorSupported),DG&&t&&(o=DG(o));let r=o.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),s=String(i).length,a,c;if(t){let{bold:u,gray:d,red:f}=MG.createColors(!0);a=m=>u(f(m)),c=m=>d(m)}else a=c=u=>u;return r.slice(n,i).map((u,d)=>{let f=n+1+d,m=" "+(" "+f).slice(-s)+" | ";if(f===this.line){let h=c(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+c(m)+u+`
 `+h+a("^")}return" "+c(m)+u}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`

`+t+`
`),this.name+": "+this.message+t}};VG.exports=By;By.default=By});var FG=oe(()=>{});var HG=oe((IHe,UG)=>{"use strict";var{SourceMapConsumer:zG,SourceMapGenerator:jG}=R1(),{existsSync:P_e,readFileSync:R_e}=FG(),{dirname:WD,join:O_e}=O1();function A_e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Ey=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=WD(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new zG(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 A_e(t.substr(RegExp.lastMatch.length));let s=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let o=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let r=t.lastIndexOf(o.pop()),n=t.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,n)))}loadFile(t){if(this.root=WD(t),P_e(t))return this.mapFile=t,R_e(t,"utf-8").toString().trim()}loadMap(t,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let r=o(t);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(o instanceof zG)return jG.fromSourceMap(o).toString();if(o instanceof jG)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=O_e(WD(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)}};UG.exports=Ey;Ey.default=Ey});var ZD=oe((PHe,KG)=>{"use strict";var{SourceMapConsumer:L_e,SourceMapGenerator:N_e}=R1(),{fileURLToPath:GG,pathToFileURL:L1}=UD(),{isAbsolute:YD,resolve:qD}=O1(),{nanoid:M_e}=AG(),$D=HD(),WG=A1(),D_e=HG(),KD=Symbol("fromOffsetCache"),V_e=!!(L_e&&N_e),$G=!!(qD&&YD),Dh=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&&(!$G||/^\w+:\/\//.test(o.from)||YD(o.from)?this.file=o.from:this.file=qD(o.from)),$G&&V_e){let r=new D_e(this.css,o);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+M_e(6)+">"),this.map&&(this.map.file=this.from)}error(t,o,r,n={}){let i,s,a;if(o&&typeof o=="object"){let u=o,d=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,r=f.col}else o=u.line,r=u.column;if(typeof d.offset=="number"){let f=this.fromOffset(d.offset);s=f.line,a=f.col}else s=d.line,a=d.column}else if(!r){let u=this.fromOffset(o);o=u.line,r=u.col}let c=this.origin(o,r,s,a);return c?i=new WG(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):i=new WG(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&&(L1&&(i.input.url=L1(this.file).toString()),i.input.file=this.file),i}fromOffset(t){let o,r;if(this[KD])r=this[KD];else{let i=this.css.split(`
`);r=new Array(i.length);let s=0;for(let a=0,c=i.length;a<c;a++)r[a]=s,s+=i[a].length+1;this[KD]=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:qD(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,o,r,n){if(!this.map)return!1;let i=this.map.consumer(),s=i.originalPositionFor({column:o,line:t});if(!s.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let c;YD(s.source)?c=L1(s.source):c=new URL(s.source,this.map.consumer().sourceRoot||L1(this.map.mapFile));let u={column:s.column,endColumn:a&&a.column,endLine:a&&a.line,line:s.line,url:c.toString()};if(c.protocol==="file:")if(GG)u.file=GG(c);else throw new Error("file: protocol is not available in this PostCSS build");let d=i.sourceContentFor(s.source);return d&&(u.source=d),u}toJSON(){let t={};for(let o of["hasBOM","css","file","id"])this[o]!=null&&(t[o]=this[o]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};KG.exports=Dh;Dh.default=Dh;$D&&$D.registerInput&&$D.registerInput(Dh)});var QD=oe((RHe,JG)=>{"use strict";var{SourceMapConsumer:qG,SourceMapGenerator:N1}=R1(),{dirname:M1,relative:ZG,resolve:XG,sep:QG}=O1(),{pathToFileURL:YG}=UD(),F_e=ZD(),z_e=!!(qG&&N1),j_e=!!(M1&&XG&&ZG&&QG),XD=class{constructor(t,o,r,n){this.stringify=t,this.mapOpts=r.map||{},this.root=o,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let o=`
`;this.css.includes(`\r
`)&&(o=`\r
`),this.css+=o+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let o=this.toUrl(this.path(t.file)),r=t.root||M1(t.file),n;this.mapOpts.sourcesContent===!1?(n=new qG(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(),j_e&&z_e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,o=>{t+=o}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=N1.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new N1({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 N1({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,o=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,s;this.stringify(this.root,(a,c,u)=>{if(this.css+=a,c&&u!=="end"&&(n.generated.line=t,n.generated.column=o-1,c.source&&c.source.start?(n.source=this.sourcePath(c),n.original.line=c.source.start.line,n.original.column=c.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=a.match(/\n/g),i?(t+=i.length,s=a.lastIndexOf(`
`),o=a.length-s):o+=a.length,c&&u!=="start"){let d=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==d.last||d.raws.semicolon)&&(c.source&&c.source.end?(n.source=this.sourcePath(c),n.original.line=c.source.end.line,n.original.column=c.source.end.column-1,n.generated.line=t,n.generated.column=o-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=t,n.generated.column=o-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let o=this.memoizedPaths.get(t);if(o)return o;let r=this.opts.to?M1(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=M1(XG(r,this.mapOpts.annotation)));let n=ZG(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 F_e(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(o=>{if(o.source){let r=o.source.input.from;if(r&&!t[r]){t[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let o=this.memoizedFileURLs.get(t);if(o)return o;if(YG){let r=YG(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;QG==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};JG.exports=XD});var JD=oe((OHe,tW)=>{"use strict";var eW={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};function U_e(e){return e[0].toUpperCase()+e.slice(1)}var Ty=class{constructor(t){this.builder=t}atrule(t,o){let r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{let i=(t.raws.between||"")+(o?";":"");this.builder(r+n+i,t)}}beforeAfter(t,o){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):o==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let n=t.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
`)){let s=this.raw(t,null,"indent");if(s.length)for(let a=0;a<i;a++)r+=s}return r}block(t,o){let r=this.raw(t,"between","beforeOpen");this.builder(o+r+"{",t,"start");let n;t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,"after")):n=this.raw(t,"after","emptyBody"),n&&this.builder(n),this.builder("}",t,"end")}body(t){let o=t.nodes.length-1;for(;o>0&&t.nodes[o].type==="comment";)o-=1;let r=this.raw(t,"semicolon");for(let n=0;n<t.nodes.length;n++){let i=t.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,o!==n||r)}}comment(t){let o=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+o+t.text+r+"*/",t)}decl(t,o){let r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),o&&(n+=";"),this.builder(n,t)}document(t){this.body(t)}raw(t,o,r){let n;if(r||(r=o),o&&(n=t.raws[o],typeof n<"u"))return n;let i=t.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return eW[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"+U_e(r);this[a]?n=this[a](s,t):s.walk(c=>{if(n=c.raws[o],typeof n<"u")return!1})}return typeof n>"u"&&(n=eW[r]),s.rawCache[r]=n,n}rawBeforeClose(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return o=r.raws.after,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(t,o){let r;return t.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,o){let r;return t.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(o,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let o;return t.walk(r=>{if(r.type!=="decl"&&(o=r.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(t){let o;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return o=r.raws.before,o.includes(`
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(t){let o;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return o=r.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(o=r.raws.after,typeof o<"u"))return!1}),o}rawIndent(t){if(t.raws.indent)return t.raws.indent;let o;return t.walk(r=>{let n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
`);return o=i[i.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(t){let o;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(o=r.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(t,o){let r=t[o],n=t.raws[o];return n&&n.value===r?n.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,o){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,o)}};tW.exports=Ty;Ty.default=Ty});var D1=oe((AHe,oW)=>{"use strict";var H_e=JD();function e5(e,t){new H_e(t).stringify(e)}oW.exports=e5;e5.default=e5});var t5=oe((LHe,nW)=>{"use strict";var rW={};nW.exports=function(t){rW[t]||(rW[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var V1=oe((NHe,o5)=>{"use strict";o5.exports.isClean=Symbol("isClean");o5.exports.my=Symbol("my")});var z1=oe((MHe,iW)=>{"use strict";var{isClean:F1,my:G_e}=V1(),W_e=A1(),$_e=JD(),K_e=D1();function r5(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=>r5(s,o)):(i==="object"&&n!==null&&(n=r5(n)),o[r]=n)}return o}var Iy=class{constructor(t={}){this.raws={},this[F1]=!1,this[G_e]=!0;for(let o in t)if(o==="nodes"){this.nodes=[];for(let r of t[o])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[o]=t[o]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let o=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let o in t)this[o]=t[o];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let o=r5(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 W_e(t)}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:o==="root"?()=>t.root().toProxy():t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&t.markDirty()),!0}}}markDirty(){if(this[F1]){this[F1]=!1;let t=this;for(;t=t.parent;)t[F1]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,o){let r=this.source.start;if(t.index)r=this.positionInside(t.index,o);else if(t.word){o=this.toString();let n=o.indexOf(t.word);n!==-1&&(r=this.positionInside(n,o))}return r}positionInside(t,o){let r=o||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let s=0;s<t;s++)r[s]===`
`?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let o={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:o.column+1,line:o.line};if(t.word){let n=this.toString(),i=n.indexOf(t.word);i!==-1&&(o=this.positionInside(i,n),r=this.positionInside(i+t.word.length,n))}else t.start?o={column:t.start.column,line:t.start.line}:t.index&&(o=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<o.line||r.line===o.line&&r.column<=o.column)&&(r={column:o.column+1,line:o.line}),{end:r,start:o}}raw(t,o){return new $_e().raw(this,t,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let o=this,r=!1;for(let n of t)n===this?r=!0:r?(this.parent.insertAfter(o,n),o=n):this.parent.insertBefore(o,n);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,o){let r={},n=o==null;o=o||new Map;let i=0;for(let s in this){if(!Object.prototype.hasOwnProperty.call(this,s)||s==="parent"||s==="proxyCache")continue;let a=this[s];if(Array.isArray(a))r[s]=a.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,o):c);else if(typeof a=="object"&&a.toJSON)r[s]=a.toJSON(null,o);else if(s==="source"){let c=o.get(a.input);c==null&&(c=i,o.set(a.input,i),i++),r[s]={end:a.end,inputId:c,start:a.start}}else r[s]=a}return n&&(r.inputs=[...o.keys()].map(s=>s.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=K_e){t.stringify&&(t=t.stringify);let o="";return t(this,r=>{o+=r}),o}warn(t,o,r){let n={node:this};for(let i in r)n[i]=r[i];return t.warn(o,n)}get proxyOf(){return this}};iW.exports=Iy;Iy.default=Iy});var n5=oe((DHe,sW)=>{"use strict";var Y_e=z1(),Py=class extends Y_e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};sW.exports=Py;Py.default=Py});var i5=oe((VHe,aW)=>{"use strict";var q_e=z1(),Ry=class extends q_e{constructor(t){super(t),this.type="comment"}};aW.exports=Ry;Ry.default=Ry});var rm=oe((FHe,gW)=>{"use strict";var{isClean:lW,my:cW}=V1(),uW=n5(),dW=i5(),Z_e=z1(),fW,s5,a5,mW;function pW(e){return e.map(t=>(t.nodes&&(t.nodes=pW(t.nodes)),delete t.source,t))}function hW(e){if(e[lW]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)hW(t)}var Os=class e extends Z_e{append(...t){for(let o of t){let r=this.normalize(o,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let o of this.nodes)o.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let o=this.getIterator(),r,n;for(;this.indexes[o]<this.proxyOf.nodes.length&&(r=this.indexes[o],n=t(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[o]+=1;return delete this.indexes[o],n}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,o){return o==="proxyOf"?t:t[o]?o==="each"||typeof o=="string"&&o.startsWith("walk")?(...r)=>t[o](...r.map(n=>typeof n=="function"?(i,s)=>n(i.toProxy(),s):n)):o==="every"||o==="some"?r=>t[o]((n,...i)=>r(n.toProxy(),...i)):o==="root"?()=>t.root().toProxy():o==="nodes"?t.nodes.map(r=>r.toProxy()):o==="first"||o==="last"?t[o].toProxy():t[o]:t[o]},set(t,o,r){return t[o]===r||(t[o]=r,(o==="name"||o==="params"||o==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,o){let r=this.index(t),n=this.normalize(o,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let s of n)this.proxyOf.nodes.splice(r+1,0,s);let i;for(let s in this.indexes)i=this.indexes[s],r<i&&(this.indexes[s]=i+n.length);return this.markDirty(),this}insertBefore(t,o){let r=this.index(t),n=r===0?"prepend":!1,i=this.normalize(o,this.proxyOf.nodes[r],n).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<=s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}normalize(t,o){if(typeof t=="string")t=pW(fW(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 uW(t)]}else if(t.selector)t=[new s5(t)];else if(t.name)t=[new a5(t)];else if(t.text)t=[new dW(t)];else throw new Error("Unknown node type in node creation");return t.map(n=>(n[cW]||e.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[lW]&&hW(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]}};Os.registerParse=e=>{fW=e};Os.registerRule=e=>{s5=e};Os.registerAtRule=e=>{a5=e};Os.registerRoot=e=>{mW=e};gW.exports=Os;Os.default=Os;Os.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,a5.prototype):e.type==="rule"?Object.setPrototypeOf(e,s5.prototype):e.type==="decl"?Object.setPrototypeOf(e,uW.prototype):e.type==="comment"?Object.setPrototypeOf(e,dW.prototype):e.type==="root"&&Object.setPrototypeOf(e,mW.prototype),e[cW]=!0,e.nodes&&e.nodes.forEach(t=>{Os.rebuild(t)})}});var vW=oe((zHe,kW)=>{"use strict";var j1=/[\t\n\f\r "#'()/;[\\\]{}]/g,U1=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,X_e=/.[\r\n"'(/\\]/,bW=/[\da-f]/i;kW.exports=function(t,o={}){let r=t.css.valueOf(),n=o.ignoreErrors,i,s,a,c,u,d,f,m,h,p,g=r.length,b=0,v=[],k=[];function y(){return b}function S(I){throw t.error("Unclosed "+I,b)}function x(){return k.length===0&&b>=g}function C(I){if(k.length)return k.pop();if(b>=g)return;let P=I?I.ignoreUnclosed:!1;switch(i=r.charCodeAt(b),i){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,i=r.charCodeAt(s);while(i===32||i===10||i===9||i===13||i===12);p=["space",r.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let E=String.fromCharCode(i);p=[E,E,b];break}case 40:{if(m=v.length?v.pop()[1]:"",h=r.charCodeAt(b+1),m==="url"&&h!==39&&h!==34&&h!==32&&h!==10&&h!==9&&h!==12&&h!==13){s=b;do{if(d=!1,s=r.indexOf(")",s+1),s===-1)if(n||P){s=b;break}else S("bracket");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["brackets",r.slice(b,s+1),b,s],b=s}else s=r.indexOf(")",b+1),c=r.slice(b,s+1),s===-1||X_e.test(c)?p=["(","(",b]:(p=["brackets",c,b,s],b=s);break}case 39:case 34:{a=i===39?"'":'"',s=b;do{if(d=!1,s=r.indexOf(a,s+1),s===-1)if(n||P){s=b+1;break}else S("string");for(f=s;r.charCodeAt(f-1)===92;)f-=1,d=!d}while(d);p=["string",r.slice(b,s+1),b,s],b=s;break}case 64:{j1.lastIndex=b+1,j1.test(r),j1.lastIndex===0?s=r.length-1:s=j1.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,bW.test(r.charAt(s)))){for(;bW.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:S("comment")),p=["comment",r.slice(b,s+1),b,s],b=s):(U1.lastIndex=b+1,U1.test(r),U1.lastIndex===0?s=r.length-1:s=U1.lastIndex-2,p=["word",r.slice(b,s+1),b,s],v.push(p),b=s);break}}return b++,p}function B(I){k.push(I)}return{back:B,endOfFile:x,nextToken:C,position:y}}});var _W=oe((jHe,SW)=>{"use strict";var yW=rm(),Vh=class extends yW{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)}};SW.exports=Vh;Vh.default=Vh;yW.registerAtRule(Vh)});var H1=oe((UHe,BW)=>{"use strict";var xW=rm(),wW,CW,Fu=class extends xW{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 wW(new CW,this,t).stringify()}};Fu.registerLazyResult=e=>{wW=e};Fu.registerProcessor=e=>{CW=e};BW.exports=Fu;Fu.default=Fu;xW.registerRoot(Fu)});var TW=oe((HHe,EW)=>{"use strict";var Oy={comma(e){return Oy.split(e,[","],!0)},space(e){let t=[" ",`
`,"	"];return Oy.split(e,t)},split(e,t,o){let r=[],n="",i=!1,s=0,a=!1,c="",u=!1;for(let d of e)u?u=!1:d==="\\"?u=!0:a?d===c&&(a=!1):d==='"'||d==="'"?(a=!0,c=d):d==="("?s+=1:d===")"?s>0&&(s-=1):s===0&&t.includes(d)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=d;return(o||n!=="")&&r.push(n.trim()),r}};EW.exports=Oy;Oy.default=Oy});var RW=oe((GHe,PW)=>{"use strict";var IW=rm(),Q_e=TW(),Fh=class extends IW{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Q_e.comma(this.selector)}set selectors(t){let o=this.selector?this.selector.match(/,\s*/):null,r=o?o[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};PW.exports=Fh;Fh.default=Fh;IW.registerRule(Fh)});var NW=oe((WHe,LW)=>{"use strict";var J_e=n5(),e0e=vW(),t0e=i5(),o0e=_W(),r0e=H1(),OW=RW(),AW={empty:!0,space:!0};function n0e(e){for(let t=e.length-1;t>=0;t--){let o=e[t],r=o[3]||o[2];if(r)return r}}var l5=class{constructor(t){this.input=t,this.root=new r0e,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 o0e;o.name=t[1].slice(1),o.name===""&&this.unnamedAtrule(o,t),this.init(o,t[2]);let r,n,i,s=!1,a=!1,c=[],u=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){o.source.end=this.getPosition(t[2]),o.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(c.length>0){for(i=c.length-1,n=c[i];n&&n[0]==="space";)n=c[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(o.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(o,"params",c),s&&(t=c[c.length-1],o.source.end=this.getPosition(t[3]||t[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(t){let o=this.colon(t);if(o===!1)return;let r=0,n;for(let i=o-1;i>=0&&(n=t[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(t){let o=0,r,n,i;for(let[s,a]of t.entries()){if(r=a,n=r[0],n==="("&&(o+=1),n===")"&&(o-=1),o===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return s}i=r}return!1}comment(t){let o=new t0e;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=e0e(this.input)}decl(t,o){let r=new J_e;this.init(r,t[0][2]);let n=t[t.length-1];for(n[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(n[3]||n[2]||n0e(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 OW;this.init(o,t[2]),o.selector="",o.raws.between="",this.current=o}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let o=this.current.nodes[this.current.nodes.length-1];o&&o.type==="rule"&&!o.raws.ownSemicolon&&(o.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let o=this.input.fromOffset(t);return{column:o.col,line:o.line,offset:t}}init(t,o){this.current.push(t),t.source={input:this.input,start:this.getPosition(o)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let o=!1,r=null,n=!1,i=null,s=[],a=t[1].startsWith("--"),c=[],u=t;for(;u;){if(r=u[0],c.push(u),r==="("||r==="[")i||(i=u),s.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=u),s.push("}");else if(s.length===0)if(r===";")if(n){this.decl(c,a);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),o=!0;break}else r===":"&&(n=!0);else r===s[s.length-1]&&(s.pop(),s.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(o=!0),s.length>0&&this.unclosedBracket(i),o&&n){if(!a)for(;c.length&&(u=c[c.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,a)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,o,r,n){let i,s,a=r.length,c="",u=!0,d,f;for(let m=0;m<a;m+=1)i=r[m],s=i[0],s==="space"&&m===a-1&&!n?u=!1:s==="comment"?(f=r[m-1]?r[m-1][0]:"empty",d=r[m+1]?r[m+1][0]:"empty",!AW[f]&&!AW[d]?c.slice(-1)===","?u=!1:c+=i[1]:u=!1):c+=i[1];if(!u){let m=r.reduce((h,p)=>h+p[1],"");t.raws[o]={raw:m,value:c}}t[o]=c}rule(t){t.pop();let o=new OW;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})}};LW.exports=l5});var c5=oe(($He,MW)=>{"use strict";var i0e=rm(),s0e=NW(),a0e=ZD();function G1(e,t){let o=new a0e(e,t),r=new s0e(o);try{r.parse()}catch(n){throw n}return r.root}MW.exports=G1;G1.default=G1;i0e.registerParse(G1)});var VW=oe((KHe,DW)=>{"use strict";var Ay=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}};DW.exports=Ay;Ay.default=Ay});var u5=oe((YHe,FW)=>{"use strict";var l0e=VW(),Ly=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 l0e(t,o);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};FW.exports=Ly;Ly.default=Ly});var jW=oe((ZHe,zW)=>{"use strict";var c0e=QD(),u0e=D1(),qHe=t5(),d0e=c5(),f0e=u5(),Ny=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=u0e;this.result=new f0e(this._processor,n,this._opts),this.result.css=o;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new c0e(i,n,this._opts,o);if(a.isMap()){let[c,u]=a.generate();c&&(this.result.css=c),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,o){return this.async().then(t,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,o=d0e;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"}};zW.exports=Ny;Ny.default=Ny});var d5=oe((XHe,GW)=>{"use strict";var m0e=rm(),UW,HW,nm=class extends m0e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new UW(new HW,this,t).stringify()}};nm.registerLazyResult=e=>{UW=e};nm.registerProcessor=e=>{HW=e};GW.exports=nm;nm.default=nm});var qW=oe((JHe,YW)=>{"use strict";var{isClean:xa,my:p0e}=V1(),h0e=QD(),g0e=D1(),b0e=rm(),k0e=d5(),QHe=t5(),WW=u5(),v0e=c5(),y0e=H1(),S0e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},_0e={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},x0e={Once:!0,postcssPlugin:!0,prepare:!0},zh=0;function My(e){return typeof e=="object"&&typeof e.then=="function"}function KW(e){let t=!1,o=S0e[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[o,o+"-"+t,zh,o+"Exit",o+"Exit-"+t]:t?[o,o+"-"+t,o+"Exit",o+"Exit-"+t]:e.append?[o,zh,o+"Exit"]:[o,o+"Exit"]}function $W(e){let t;return e.type==="document"?t=["Document",zh,"DocumentExit"]:e.type==="root"?t=["Root",zh,"RootExit"]:t=KW(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function f5(e){return e[xa]=!1,e.nodes&&e.nodes.forEach(t=>f5(t)),e}var m5={},zu=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=f5(o);else if(o instanceof e||o instanceof WW)n=f5(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=v0e;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[p0e]&&b0e.rebuild(n)}this.result=new WW(t,n,r),this.helpers={...m5,postcss:m5,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(!_0e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${o.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!x0e[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(My(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];){t[xa]=!0;let o=[$W(t)];for(;o.length>0;){let r=this.visitTick(o);if(My(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 My(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=g0e;t.syntax&&(o=t.syntax.stringify),t.stringifier&&(o=t.stringifier),o.stringify&&(o=o.stringify);let n=new h0e(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(My(o))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[xa];)t[xa]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let o of t.nodes)this.visitSync(this.listeners.OnceExit,o);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,o){return this.async().then(t,o)}toString(){return this.css}visitSync(t,o){for(let[r,n]of t){this.result.lastPlugin=r;let i;try{i=n(o,this.helpers)}catch(s){throw this.handleError(s,o.proxyOf)}if(o.type!=="root"&&o.type!=="document"&&!o.parent)return!0;if(My(i))throw this.getAsyncError()}}visitTick(t){let o=t[t.length-1],{node:r,visitors:n}=o;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(n.length>0&&o.visitorIndex<n.length){let[s,a]=n[o.visitorIndex];o.visitorIndex+=1,o.visitorIndex===n.length&&(o.visitors=[],o.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(o.iterator!==0){let s=o.iterator,a;for(;a=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!a[xa]){a[xa]=!0,t.push($W(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===zh){r.nodes&&r.nodes.length&&(r[xa]=!0,o.iterator=r.getIterator());return}else if(this.listeners[s]){o.visitors=this.listeners[s];return}}t.pop()}walkSync(t){t[xa]=!0;let o=KW(t);for(let r of o)if(r===zh)t.nodes&&t.each(n=>{n[xa]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};zu.registerPostcss=e=>{m5=e};YW.exports=zu;zu.default=zu;y0e.registerLazyResult(zu);k0e.registerLazyResult(zu)});var XW=oe((e8e,ZW)=>{"use strict";var w0e=jW(),C0e=qW(),B0e=d5(),E0e=H1(),im=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 w0e(this,t,o):new C0e(this,t,o)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};ZW.exports=im;im.default=im;E0e.registerProcessor(im);B0e.registerProcessor(im)});var e$=oe((t8e,JW)=>{JW.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&&QW(s.source.input.file,n)||i.length&&s.source.input.file&&!QW(s.source.input.file,i)||s.walkRules(a=>{let c=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];a.parent&&c.includes(a.parent.name)||(a.selectors=a.selectors.map(u=>t.exclude&&T0e(u,t.exclude)?u:t.transform?t.transform(o,u,r+u,s.source.input.file,a):r+u))})}};function QW(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e.includes(o))}function T0e(e,t){return t.some(o=>o instanceof RegExp?o.test(e):e===o)}});var o$=oe((o8e,t$)=>{var p5=40,h5=41,W1=39,g5=34,b5=92,jh=47,k5=44,v5=58,$1=42,I0e=117,P0e=85,R0e=43,O0e=/^[a-f0-9?-]+$/i;t$.exports=function(e){for(var t=[],o=e,r,n,i,s,a,c,u,d,f=0,m=o.charCodeAt(f),h=o.length,p=[{nodes:t}],g=0,b,v="",k="",y="";f<h;)if(m<=32){r=f;do r+=1,m=o.charCodeAt(r);while(m<=32);s=o.slice(f,r),i=t[t.length-1],m===h5&&g?y=s:i&&i.type==="div"?(i.after=s,i.sourceEndIndex+=s.length):m===k5||m===v5||m===jh&&o.charCodeAt(r+1)!==$1&&(!b||b&&b.type==="function"&&b.value!=="calc")?k=s:t.push({type:"space",sourceIndex:f,sourceEndIndex:r,value:s}),f=r}else if(m===W1||m===g5){r=f,n=m===W1?"'":'"',s={type:"string",sourceIndex:f,quote:n};do if(a=!1,r=o.indexOf(n,r+1),~r)for(c=r;o.charCodeAt(c-1)===b5;)c-=1,a=!a;else o+=n,r=o.length-1,s.unclosed=!0;while(a);s.value=o.slice(f+1,r),s.sourceEndIndex=s.unclosed?r:r+1,t.push(s),f=r+1,m=o.charCodeAt(f)}else if(m===jh&&o.charCodeAt(f+1)===$1)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===jh||m===$1)&&b&&b.type==="function"&&b.value==="calc")s=o[f],t.push({type:"word",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s}),f+=1,m=o.charCodeAt(f);else if(m===jh||m===k5||m===v5)s=o[f],t.push({type:"div",sourceIndex:f-k.length,sourceEndIndex:f+s.length,value:s,before:k,after:""}),k="",f+=1,m=o.charCodeAt(f);else if(p5===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!==W1&&m!==g5){r-=1;do if(a=!1,r=o.indexOf(")",r+1),~r)for(c=r;o.charCodeAt(c-1)===b5;)c-=1,a=!a;else o+=")",r=o.length-1,s.unclosed=!0;while(a);u=r;do u-=1,m=o.charCodeAt(u);while(m<=32);d<u?(f!==u+1?s.nodes=[{type:"word",sourceIndex:f,sourceEndIndex:u+1,value:o.slice(f,u+1)}]:s.nodes=[],s.unclosed&&u+1!==r?(s.after="",s.nodes.push({type:"space",sourceIndex:u+1,sourceEndIndex:r,value:o.slice(u+1,r)})):(s.after=o.slice(u+1,r),s.sourceEndIndex=r)):(s.after="",s.nodes=[]),f=r+1,s.sourceEndIndex=s.unclosed?r:f,m=o.charCodeAt(f),t.push(s)}else g+=1,s.after="",s.sourceEndIndex=f+1,t.push(s),p.push(s),t=s.nodes=[],b=s;v=""}else if(h5===m&&g)f+=1,m=o.charCodeAt(f),b.after=y,b.sourceEndIndex+=y.length,y="",g-=1,p[p.length-1].sourceEndIndex=f,p.pop(),b=p[g],t=b.nodes;else{r=f;do m===b5&&(r+=1),r+=1,m=o.charCodeAt(r);while(r<h&&!(m<=32||m===W1||m===g5||m===k5||m===v5||m===jh||m===p5||m===$1&&b&&b.type==="function"&&b.value==="calc"||m===jh&&b.type==="function"&&b.value==="calc"||m===h5&&g));s=o.slice(f,r),p5===m?v=s:(I0e===s.charCodeAt(0)||P0e===s.charCodeAt(0))&&R0e===s.charCodeAt(1)&&O0e.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 n$=oe((r8e,r$)=>{r$.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 l$=oe((n8e,a$)=>{function i$(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=s$(e.nodes,t),o!=="function"?n:r+"("+(e.before||"")+n+(e.after||"")+(e.unclosed?"":")")):r}function s$(e,t){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=i$(e[r],t)+o;return o}return i$(e,t)}a$.exports=s$});var u$=oe((i8e,c$)=>{var K1=45,Y1=43,y5=46,A0e=101,L0e=69;function N0e(e){var t=e.charCodeAt(0),o;if(t===Y1||t===K1){if(o=e.charCodeAt(1),o>=48&&o<=57)return!0;var r=e.charCodeAt(2);return o===y5&&r>=48&&r<=57}return t===y5?(o=e.charCodeAt(1),o>=48&&o<=57):t>=48&&t<=57}c$.exports=function(e){var t=0,o=e.length,r,n,i;if(o===0||!N0e(e))return!1;for(r=e.charCodeAt(t),(r===Y1||r===K1)&&t++;t<o&&(r=e.charCodeAt(t),!(r<48||r>57));)t+=1;if(r=e.charCodeAt(t),n=e.charCodeAt(t+1),r===y5&&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===A0e||r===L0e)&&(n>=48&&n<=57||(n===Y1||n===K1)&&i>=48&&i<=57))for(t+=n===Y1||n===K1?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 p$=oe((s8e,m$)=>{var M0e=o$(),d$=n$(),f$=l$();function ju(e){return this instanceof ju?(this.nodes=M0e(e),this):new ju(e)}ju.prototype.toString=function(){return Array.isArray(this.nodes)?f$(this.nodes):""};ju.prototype.walk=function(e,t){return d$(this.nodes,e,t),this};ju.unit=u$();ju.walk=d$;ju.stringify=f$;m$.exports=ju});var g$=oe((a8e,S5)=>{var h$=p$();S5.exports=e=>{let o=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(r){let n=h$(r.value),i=!1;n.walk(s=>{if(s.type!=="function"||s.value!=="url")return;let a=s.nodes[0].value,c=new URL(a,e.rootUrl);return c.pathname===a&&o.skipHostRelativeUrls||(s.nodes[0].value=c.toString(),i=!0),!1}),i&&(r.value=h$.stringify(n))}}};S5.exports.postcss=!0});var I$=oe((S8e,T$)=>{T$.exports=window.wp.priorityQueue});var F5=oe((p9e,TK)=>{TK.exports=window.wp.blob});var Jy=oe((VWe,DY)=>{DY.exports=window.wp.isShallowEqual});var XE=oe((Kqe,TX)=>{TX.exports=window.wp.tokenList});var MV=oe((iZe,UX)=>{"use strict";var k1e=function(t){return v1e(t)&&!y1e(t)};function v1e(e){return!!e&&typeof e=="object"}function y1e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||x1e(e)}var S1e=typeof Symbol=="function"&&Symbol.for,_1e=S1e?Symbol.for("react.element"):60103;function x1e(e){return e.$$typeof===_1e}function w1e(e){return Array.isArray(e)?[]:{}}function xS(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Rg(w1e(e),e,t):e}function C1e(e,t,o){return e.concat(t).map(function(r){return xS(r,o)})}function B1e(e,t){if(!t.customMerge)return Rg;var o=t.customMerge(e);return typeof o=="function"?o:Rg}function E1e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function zX(e){return Object.keys(e).concat(E1e(e))}function jX(e,t){try{return t in e}catch{return!1}}function T1e(e,t){return jX(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function I1e(e,t,o){var r={};return o.isMergeableObject(e)&&zX(e).forEach(function(n){r[n]=xS(e[n],o)}),zX(t).forEach(function(n){T1e(e,n)||(jX(e,n)&&o.isMergeableObject(t[n])?r[n]=B1e(n,o)(e[n],t[n],o):r[n]=xS(t[n],o))}),r}function Rg(e,t,o){o=o||{},o.arrayMerge=o.arrayMerge||C1e,o.isMergeableObject=o.isMergeableObject||k1e,o.cloneUnlessOtherwiseSpecified=xS;var r=Array.isArray(t),n=Array.isArray(e),i=r===n;return i?r?o.arrayMerge(e,t,o):I1e(e,t,o):xS(t,o)}Rg.all=function(t,o){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,n){return Rg(r,n,o)},{})};var P1e=Rg;UX.exports=P1e});var ZQ=oe((NQe,qQ)=>{qQ.exports=window.wp.commands});var pc=oe((mot,mte)=>{mte.exports=window.wp.date});var $te=oe((ert,Wte)=>{var zte=!1,Gm,N3,M3,gI,bI,jte,kI,D3,V3,F3,Ute,z3,j3,Hte,Gte;function En(){if(!zte){zte=!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(z3=/\b(iPhone|iP[ao]d)/.exec(e),j3=/\b(iP[ao]d)/.exec(e),F3=/Android/i.exec(e),Hte=/FBAN\/\w+;/i.exec(e),Gte=/Mobile/i.exec(e),Ute=!!/Win64/.exec(e),t){Gm=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Gm&&document&&document.documentMode&&(Gm=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);jte=r?parseFloat(r[1])+4:Gm,N3=t[2]?parseFloat(t[2]):NaN,M3=t[3]?parseFloat(t[3]):NaN,gI=t[4]?parseFloat(t[4]):NaN,gI?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),bI=t&&t[1]?parseFloat(t[1]):NaN):bI=NaN}else Gm=N3=M3=bI=gI=NaN;if(o){if(o[1]){var n=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);kI=n?parseFloat(n[1].replace("_",".")):!0}else kI=!1;D3=!!o[2],V3=!!o[3]}else kI=D3=V3=!1}}var U3={ie:function(){return En()||Gm},ieCompatibilityMode:function(){return En()||jte>Gm},ie64:function(){return U3.ie()&&Ute},firefox:function(){return En()||N3},opera:function(){return En()||M3},webkit:function(){return En()||gI},safari:function(){return U3.webkit()},chrome:function(){return En()||bI},windows:function(){return En()||D3},osx:function(){return En()||kI},linux:function(){return En()||V3},iphone:function(){return En()||z3},mobile:function(){return En()||z3||j3||F3||Gte},nativeApp:function(){return En()||Hte},android:function(){return En()||F3},ipad:function(){return En()||j3}};Wte.exports=U3});var Yte=oe((trt,Kte)=>{"use strict";var vI=!!(typeof window<"u"&&window.document&&window.document.createElement),yEe={canUseDOM:vI,canUseWorkers:typeof Worker<"u",canUseEventListeners:vI&&!!(window.addEventListener||window.attachEvent),canUseViewport:vI&&!!window.screen,isInWorker:!vI};Kte.exports=yEe});var Qte=oe((ort,Xte)=>{"use strict";var qte=Yte(),Zte;qte.canUseDOM&&(Zte=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function SEe(e,t){if(!qte.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&&Zte&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}Xte.exports=SEe});var noe=oe((rrt,roe)=>{"use strict";var _Ee=$te(),xEe=Qte(),Jte=10,eoe=40,toe=800;function ooe(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*Jte,n=o*Jte,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(e.deltaMode==1?(r*=eoe,n*=eoe):(r*=toe,n*=toe)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}}ooe.getEventType=function(){return _Ee.firefox()?"DOMMouseScroll":xEe("wheel")?"wheel":"mousewheel"};roe.exports=ooe});var soe=oe((nrt,ioe)=>{ioe.exports=noe()});var Nre=oe((qnt,Lre)=>{"use strict";Lre.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 dLe={};Ip(dLe,{AlignmentControl:()=>$w,AlignmentToolbar:()=>wU,Autocomplete:()=>ZU,BlockAlignmentControl:()=>cC,BlockAlignmentToolbar:()=>kH,BlockBindingsAttributeControl:()=>$v,BlockBindingsSourceFieldsList:()=>Wv,BlockBreadcrumb:()=>jH,BlockCanvas:()=>tJ,BlockColorsStyleSelector:()=>iJ,BlockContextProvider:()=>g0,BlockControls:()=>Mt,BlockEdit:()=>Fw,BlockEditorKeyboardShortcuts:()=>g1,BlockEditorProvider:()=>U9,BlockFormatControls:()=>bV,BlockIcon:()=>Ae,BlockInspector:()=>Hae,BlockList:()=>Gh,BlockMover:()=>kE,BlockNavigationDropdown:()=>pee,BlockPopover:()=>vY,BlockPreview:()=>vn,BlockSelectionClearer:()=>OY,BlockSettingsMenu:()=>GE,BlockSettingsMenuControls:()=>FE,BlockStyles:()=>Qg,BlockTitle:()=>Yv,BlockToolbar:()=>MQ,BlockTools:()=>RS,BlockVerticalAlignmentControl:()=>iC,BlockVerticalAlignmentToolbar:()=>Fee,ButtonBlockAppender:()=>Qu,ButtonBlockerAppender:()=>cY,ColorPalette:()=>ate,ColorPaletteControl:()=>ute,ContrastChecker:()=>QT,CopyHandler:()=>$ae,DefaultBlockAppender:()=>cg,DimensionControl:()=>lb,FontSizePicker:()=>fM,HeadingLevelDropdown:()=>Bee,HeightControl:()=>Fte,InnerBlocks:()=>tS,Inserter:()=>Ui,InspectorAdvancedControls:()=>rd,InspectorControls:()=>fe,JustifyContentControl:()=>ah,JustifyToolbar:()=>qoe,LineHeightControl:()=>HI,LinkControl:()=>Pd,MediaPlaceholder:()=>gne,MediaReplaceFlow:()=>_b,MediaUpload:()=>qu,MediaUploadCheck:()=>Ds,MultiSelectScrollIntoView:()=>Zae,NavigableToolbar:()=>Bg,ObserveTyping:()=>rq,PanelColorSettings:()=>kne,PlainText:()=>gie,RecursionProvider:()=>f4,RichText:()=>Eb,RichTextShortcut:()=>wF,RichTextToolbarButton:()=>BF,SETTINGS_DEFAULTS:()=>Kk,SkipToSelectedBlock:()=>kP,ToolSelector:()=>cle,Typewriter:()=>ele,URLInput:()=>Td,URLInputButton:()=>Cie,URLPopover:()=>Ad,Warning:()=>pu,WritingFlow:()=>E1,__experimentalBlockAlignmentMatrixControl:()=>AH,__experimentalBlockFullHeightAligmentControl:()=>IH,__experimentalBlockPatternSetup:()=>Mee,__experimentalBlockPatternsList:()=>Ca,__experimentalBlockVariationPicker:()=>Eee,__experimentalBlockVariationTransforms:()=>WT,__experimentalBorderRadiusControl:()=>ZT,__experimentalColorGradientControl:()=>_d,__experimentalColorGradientSettingsDropdown:()=>fI,__experimentalDateFormatPicker:()=>pte,__experimentalDuotoneControl:()=>eI,__experimentalFontAppearanceControl:()=>oI,__experimentalFontFamilyControl:()=>rI,__experimentalGetBorderClassesAndStyles:()=>sO,__experimentalGetColorClassesAndStyles:()=>aO,__experimentalGetElementClassName:()=>lLe,__experimentalGetGapCSSValue:()=>mr,__experimentalGetGradientClass:()=>th,__experimentalGetGradientObjectByGradientValue:()=>pU,__experimentalGetShadowClassesAndStyles:()=>Yz,__experimentalGetSpacingClassesAndStyles:()=>Xz,__experimentalImageEditor:()=>Uoe,__experimentalImageSizeControl:()=>$oe,__experimentalImageURLInputUI:()=>Oie,__experimentalInspectorPopoverHeader:()=>y2,__experimentalLetterSpacingControl:()=>iI,__experimentalLibrary:()=>Yae,__experimentalLinkControl:()=>UI,__experimentalLinkControlSearchInput:()=>yre,__experimentalLinkControlSearchItem:()=>are,__experimentalLinkControlSearchResults:()=>mre,__experimentalListView:()=>zT,__experimentalPanelColorGradientSettings:()=>pI,__experimentalPreviewOptions:()=>Yie,__experimentalPublishDateTimePicker:()=>ile,__experimentalRecursionProvider:()=>tle,__experimentalResponsiveBlockControl:()=>Sie,__experimentalSpacingSizesControl:()=>Db,__experimentalTextDecorationControl:()=>aI,__experimentalTextTransformControl:()=>cI,__experimentalUnitControl:()=>xie,__experimentalUseBlockOverlayActive:()=>HH,__experimentalUseBlockPreview:()=>L$,__experimentalUseBorderProps:()=>Kz,__experimentalUseColorProps:()=>Zz,__experimentalUseCustomSides:()=>Cz,__experimentalUseGradient:()=>Yke,__experimentalUseHasRecursion:()=>ole,__experimentalUseMultipleOriginColorsAndGradients:()=>wd,__experimentalUseResizeCanvas:()=>qie,__experimentalWritingModeControl:()=>dI,__unstableBlockSettingsMenuFirstItem:()=>TE,__unstableBlockToolbarLastItem:()=>xE,__unstableEditorStyles:()=>Nl,__unstableIframe:()=>Mh,__unstableInserterMenuExtension:()=>yB,__unstableRichTextInputEvent:()=>EF,__unstableUseBlockSelectionClearer:()=>hm,__unstableUseClipboardHandler:()=>Wae,__unstableUseMouseMoveTypingReset:()=>rS,__unstableUseTypewriter:()=>c4,__unstableUseTypingObserver:()=>nS,createCustomColorsHOC:()=>fU,getColorClassName:()=>_i,getColorObjectByAttributeValues:()=>da,getColorObjectByColorValue:()=>p0,getComputedFluidTypographyValue:()=>bU,getCustomValueFromPreset:()=>JU,getDimensionsClassesAndStyles:()=>$z,getFontSize:()=>oh,getFontSizeClass:()=>hu,getFontSizeObjectByValue:()=>dM,getGradientSlugByValue:()=>hU,getGradientValueBySlug:()=>Gw,getPxFromCssUnit:()=>xme,getSpacingPresetCssVar:()=>jv,getTypographyClassesAndStyles:()=>Qz,isValueSpacingPreset:()=>nC,privateApis:()=>a6,store:()=>_,storeConfig:()=>Qp,transformStyles:()=>Uh,useBlockBindingsUtils:()=>El,useBlockCommands:()=>_T,useBlockDisplayInformation:()=>Tt,useBlockEditContext:()=>Ie,useBlockEditingMode:()=>ao,useBlockProps:()=>ky,useCachedTruthy:()=>Jz,useHasRecursion:()=>m4,useInnerBlocksProps:()=>ym,useSetting:()=>lU,useSettings:()=>me,useStyleOverride:()=>Qn,withColorContext:()=>XT,withColors:()=>mU,withFontSizes:()=>_U});function c6(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=c6(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Zme(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=c6(e))&&(r&&(r+=" "),r+=t);return r}var V=Zme;var ule=l($(),1),as=l(R(),1),x2=l(F(),1),b4=l(Z(),1),w_=l(ut(),1);var c0=l(R(),1),bs=Symbol("mayDisplayControls"),Pp=Symbol("mayDisplayParentControls"),$c=Symbol("mayDisplayPatternEditingControls"),u0=Symbol("blockEditingMode"),Rp=Symbol("blockBindings"),d0=Symbol("isPreviewMode"),Hk=Symbol("isInListViewBlockSupportTree"),gO={name:"",isSelected:!1},bO=(0,c0.createContext)(gO);bO.displayName="BlockEditContext";var{Provider:f0}=bO;function Ie(){return(0,c0.useContext)(bO)}var Xme={grad:.9,turn:360,rad:360/(2*Math.PI)},ml=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Zo=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Si=function(e,t,o){return t===void 0&&(t=0),o===void 0&&(o=1),e>o?o:e>t?e:t},_6=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},h6=function(e){return{r:Si(e.r,0,255),g:Si(e.g,0,255),b:Si(e.b,0,255),a:Si(e.a)}},kO=function(e){return{r:Zo(e.r),g:Zo(e.g),b:Zo(e.b),a:Zo(e.a,3)}},Qme=/^#([0-9a-f]{3,8})$/i,m0=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},x6=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}},w6=function(e){var t=e.h,o=e.s,r=e.v,n=e.a;t=t/360*6,o/=100,r/=100;var i=Math.floor(t),s=r*(1-o),a=r*(1-(t-i)*o),c=r*(1-(1-t+i)*o),u=i%6;return{r:255*[r,a,s,s,c,r][u],g:255*[c,r,r,a,s,s][u],b:255*[s,s,c,r,r,a][u],a:n}},g6=function(e){return{h:_6(e.h),s:Si(e.s,0,100),l:Si(e.l,0,100),a:Si(e.a)}},b6=function(e){return{h:Zo(e.h),s:Zo(e.s),l:Zo(e.l),a:Zo(e.a,3)}},k6=function(e){return w6((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},Gk=function(e){return{h:(t=x6(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},Jme=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,epe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tpe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ope=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,SO={string:[[function(e){var t=Qme.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?Zo(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?Zo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=tpe.exec(e)||ope.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:h6({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=Jme.exec(e)||epe.exec(e);if(!t)return null;var o,r,n=g6({h:(o=t[1],r=t[2],r===void 0&&(r="deg"),Number(o)*(Xme[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return k6(n)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,r=e.b,n=e.a,i=n===void 0?1:n;return ml(t)&&ml(o)&&ml(r)?h6({r:Number(t),g:Number(o),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,o=e.s,r=e.l,n=e.a,i=n===void 0?1:n;if(!ml(t)||!ml(o)||!ml(r))return null;var s=g6({h:Number(t),s:Number(o),l:Number(r),a:Number(i)});return k6(s)},"hsl"],[function(e){var t=e.h,o=e.s,r=e.v,n=e.a,i=n===void 0?1:n;if(!ml(t)||!ml(o)||!ml(r))return null;var s=(function(a){return{h:_6(a.h),s:Si(a.s,0,100),v:Si(a.v,0,100),a:Si(a.a)}})({h:Number(t),s:Number(o),v:Number(r),a:Number(i)});return w6(s)},"hsv"]]},v6=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]},rpe=function(e){return typeof e=="string"?v6(e.trim(),SO.string):typeof e=="object"&&e!==null?v6(e,SO.object):[null,void 0]};var vO=function(e,t){var o=Gk(e);return{h:o.h,s:Si(o.s+100*t,0,100),l:o.l,a:o.a}},yO=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},y6=function(e,t){var o=Gk(e);return{h:o.h,s:o.s,l:Si(o.l+100*t,0,100),a:o.a}},_O=(function(){function e(t){this.parsed=rpe(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 Zo(yO(this.rgba),2)},e.prototype.isDark=function(){return yO(this.rgba)<.5},e.prototype.isLight=function(){return yO(this.rgba)>=.5},e.prototype.toHex=function(){return t=kO(this.rgba),o=t.r,r=t.g,n=t.b,s=(i=t.a)<1?m0(Zo(255*i)):"","#"+m0(o)+m0(r)+m0(n)+s;var t,o,r,n,i,s},e.prototype.toRgb=function(){return kO(this.rgba)},e.prototype.toRgbString=function(){return t=kO(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 b6(Gk(this.rgba))},e.prototype.toHslString=function(){return t=b6(Gk(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=x6(this.rgba),{h:Zo(t.h),s:Zo(t.s),v:Zo(t.v),a:Zo(t.a,3)};var t},e.prototype.invert=function(){return Bt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Bt(vO(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Bt(vO(this.rgba,-t))},e.prototype.grayscale=function(){return Bt(vO(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Bt(y6(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Bt(y6(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Bt({r:(o=this.rgba).r,g:o.g,b:o.b,a:t}):Zo(this.rgba.a,3);var o},e.prototype.hue=function(t){var o=Gk(this.rgba);return typeof t=="number"?Bt({h:t,s:o.s,l:o.l,a:o.a}):Zo(o.h)},e.prototype.isEqual=function(t){return this.toHex()===Bt(t).toHex()},e})(),Bt=function(e){return e instanceof _O?e:new _O(e)},S6=[],Kc=function(e){e.forEach(function(t){S6.indexOf(t)<0&&(t(_O,SO),S6.push(t))})};function Yc(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var n in o)r[o[n]]=n;var i={};e.prototype.toName=function(s){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,u=r[this.toHex()];if(u)return u;if(s?.closest){var d=this.toRgb(),f=1/0,m="black";if(!i.length)for(var h in o)i[h]=new e(o[h]).toRgb();for(var p in o){var g=(a=d,c=i[p],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));g<f&&(f=g,m=p)}return m}},t.string.push([function(s){var a=s.toLowerCase(),c=a==="transparent"?"#0000":o[a];return c?new e(c).toRgb():null},"name"])}var xO=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},wO=function(e){return .2126*xO(e.r)+.7152*xO(e.g)+.0722*xO(e.b)};function Op(e){e.prototype.luminance=function(){return t=wO(this.rgba),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.round(r*t)/r+0;var t,o,r},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var o,r,n,i,s,a,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),a=wO(i),c=wO(s),o=a>c?(a+.05)/(c+.05):(c+.05)/(a+.05),(r=2)===void 0&&(r=0),n===void 0&&(n=Math.pow(10,r)),Math.floor(n*o)/n+0},e.prototype.isReadable=function(t,o){return t===void 0&&(t="#FFF"),o===void 0&&(o={}),this.contrast(t)>=(a=(s=(r=o).size)===void 0?"normal":s,(i=(n=r.level)===void 0?"AA":n)==="AAA"&&a==="normal"?7:i==="AA"&&a==="large"?3:4.5);var r,n,i,s,a}}var I6=l(A(),1);var E6=l(CO(),1),{lock:T6,unlock:M}=(0,E6.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor");Kc([Yc,Op]);var{kebabCase:npe}=M(I6.privateApis),da=(e,t,o)=>{if(t){let r=e?.find(n=>n.slug===t);if(r)return r}return{color:o}},p0=(e,t)=>e?.find(o=>o.color===t);function _i(e,t){if(!(!e||!t))return`has-${npe(t)}-${e}`}function P6(e,t){let o=Bt(t),r=({color:i})=>o.contrast(i),n=Math.max(...e.map(r));return e.find(i=>r(i)===n).color}var zw=l(R(),1),zf=l(Z(),1),uU=l(A(),1);var sU=l(F(),1),aU=l(Re(),1);var Vw=l(R(),1),Dw=l($(),1);var pl=l($(),1),F6=l(A(),1),$k=l(F(),1),vf=l(R(),1);var Ap=l(R(),1),A6=l(w(),1),h0=(0,Ap.createContext)({});h0.displayName="BlockContext";function g0({value:e,children:t}){let o=(0,Ap.useContext)(h0),r=(0,Ap.useMemo)(()=>({...o,...e}),[o,e]);return(0,A6.jsx)(h0.Provider,{value:r,children:t})}var xr=h0;var Lp=l(dn(),1);function gf(e){return e?.startsWith("#")&&(0,Lp.isValidFragment)(e)}function bf(e){return e?.startsWith("/")||e?.startsWith("./")||e?.startsWith("../")}function kf(e){if(e.includes(" "))return!1;let o=(0,Lp.getProtocol)(e),r=(0,Lp.isValidProtocol)(o),n=ipe(e),i=e?.startsWith("www.");return r||i||gf(e)||n||bf(e)}function ipe(e,t=6){let o=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(o)}var spe="__default",N6="core/pattern-overrides";function Wk(e){return e?.[spe]?.source===N6}function M6(e,t){if(Wk(e)){let o={};for(let r of t){let n=e[r]?e[r]:{source:N6};o[r]=n}return o}return e}var D6=l(R(),1),ur=(0,D6.createContext)({});ur.displayName="PrivateBlockContext";var b0=l(w(),1),ape={},lpe=e=>{let{name:t}=e,o=(0,pl.getBlockType)(t);if(!o)return null;let r=o.edit||o.save;return(0,b0.jsx)(r,{...e})},V6=(0,F6.withFilters)("editor.BlockEdit")(lpe),cpe=e=>{let{name:t,clientId:o,attributes:r,setAttributes:n}=e,i=(0,$k.useRegistry)(),s=(0,pl.getBlockType)(t),a=(0,vf.useContext)(xr),c=(0,$k.useSelect)(v=>M(v(pl.store)).getAllBlockBindingsSources(),[]),{bindableAttributes:u}=(0,vf.useContext)(ur),{blockBindings:d,context:f,hasPatternOverrides:m}=(0,vf.useMemo)(()=>{let v=s?.usesContext?Object.fromEntries(Object.entries(a).filter(([k])=>s.usesContext.includes(k))):ape;return r?.metadata?.bindings&&Object.values(r?.metadata?.bindings||{}).forEach(k=>{c[k?.source]?.usesContext?.forEach(y=>{v[y]=a[y]})}),{blockBindings:M6(r?.metadata?.bindings,u),context:v,hasPatternOverrides:Wk(r?.metadata?.bindings)}},[s?.usesContext,a,r?.metadata?.bindings,u,c]),h=(0,$k.useSelect)(v=>{if(!d)return r;let k={},y=new Map;for(let[S,x]of Object.entries(d)){let{source:C,args:B}=x,I=c[C];!I||!u?.includes(S)||y.set(I,{...y.get(I),[S]:{args:B}})}if(y.size)for(let[S,x]of y){let C={};S.getValues?C=S.getValues({select:v,context:f,clientId:o,bindings:x}):Object.keys(x).forEach(B=>{C[B]=S.label});for(let[B,I]of Object.entries(C))B==="url"&&(!I||!kf(I))?k[B]=null:k[B]=I}return{...r,...k}},[r,u,d,o,f,c]),p=(0,vf.useCallback)(v=>{if(!d){n(v);return}i.batch(()=>{let k={...v},y=new Map;for(let[x,C]of Object.entries(k)){if(!d[x]||!u?.includes(x))continue;let B=d[x],I=c[B?.source];I?.setValues&&(y.set(I,{...y.get(I),[x]:{args:B.args,newValue:C}}),delete k[x])}if(y.size)for(let[x,C]of y)x.setValues({select:i.select,dispatch:i.dispatch,context:f,clientId:o,bindings:C});let S=!!f["pattern/overrides"];!(m&&S)&&Object.keys(k).length&&(m&&delete k.href,n(k))})},[u,d,o,f,m,n,c,i]);if(!s)return null;if(s.apiVersion>1)return(0,b0.jsx)(V6,{...e,attributes:h,context:f,setAttributes:p});let g=(0,pl.hasBlockSupport)(s,"className",!0)?(0,pl.getBlockDefaultClassName)(t):null,b=V(g,r?.className,e.className);return(0,b0.jsx)(V6,{...e,attributes:h,className:b,context:f,setAttributes:p})},z6=cpe;var rU=l($(),1),uM=l(A(),1),nU=l(F(),1),Mw=l(N(),1);var Nw=l(F(),1);var qk=l(yf(),1),TO=l(Z(),1),Zk=l(F(),1),Y6=l(Re(),1),E0=l($(),1);var Ne=l(N(),1),H6={insertUsage:{}},Kk={alignWide:!1,supportsLayout:!0,colors:[{name:(0,Ne.__)("Black"),slug:"black",color:"#000000"},{name:(0,Ne.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,Ne.__)("White"),slug:"white",color:"#ffffff"},{name:(0,Ne.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,Ne.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,Ne.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,Ne.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,Ne.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,Ne.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,Ne.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,Ne.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,Ne.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,Ne._x)("Small","font size name"),size:13,slug:"small"},{name:(0,Ne._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,Ne._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,Ne._x)("Large","font size name"),size:36,slug:"large"},{name:(0,Ne._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,Ne.__)("Thumbnail")},{slug:"medium",name:(0,Ne.__)("Medium")},{slug:"large",name:(0,Ne.__)("Large")},{slug:"full",name:(0,Ne.__)("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,Ne.__)("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,Ne.__)("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,Ne.__)("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,Ne.__)("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,Ne.__)("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,Ne.__)("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,Ne.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,Ne.__)("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,Ne.__)("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,Ne.__)("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,Ne.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,Ne.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function k0(e,t,o){return[...e.slice(0,o),...Array.isArray(t)?t:[t],...e.slice(o)]}function v0(e,t,o,r=1){let n=[...e];return n.splice(t,r),k0(n,e.slice(t,t+r),o)}var xi=Symbol("globalStylesDataKey"),y0=Symbol("globalStylesLinks"),qc=Symbol("selectBlockPatternsKey"),S0=Symbol("reusableBlocksSelect"),Zc=Symbol("sectionRootClientIdKey"),_0=Symbol("mediaEditKey"),x0=Symbol("getMediaSelect"),Xc=Symbol("isIsolatedEditor"),wi=Symbol("deviceTypeKey"),w0=Symbol("isNavigationOverlayContext"),C0=Symbol("mediaUploadOnSuccess");var{isContentBlock:upe}=M(E0.privateApis),dpe=e=>e;function B0(e,t=""){let o=new Map,r=[];return o.set(t,r),e.forEach(n=>{let{clientId:i,innerBlocks:s}=n;r.push(i),B0(s,i).forEach((a,c)=>{o.set(c,a)})}),o}function BO(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 q6(e,t=dpe){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 Z6(e){let t={},o=[...e];for(;o.length;){let{innerBlocks:r,...n}=o.shift();o.push(...r),t[n.clientId]=!0}return t}function G6(e){return q6(e,t=>{let{attributes:o,...r}=t;return r})}function W6(e){return q6(e,t=>t.attributes)}function fpe(e,t){return(0,qk.default)(Object.keys(e),Object.keys(t))}function mpe(e,t){return e.type==="UPDATE_BLOCK_ATTRIBUTES"&&t!==void 0&&t.type==="UPDATE_BLOCK_ATTRIBUTES"&&(0,qk.default)(e.clientIds,t.clientIds)&&fpe(e.attributes,t.attributes)}function $6(e,t){let o=e.tree,r=[...t],n=[...t];for(;r.length;){let i=r.shift();r.push(...i.innerBlocks),n.push(...i.innerBlocks)}for(let i of n)o.set(i.clientId,{});for(let i of n)o.set(i.clientId,Object.assign(o.get(i.clientId),{...e.byClientId.get(i.clientId),attributes:e.attributes.get(i.clientId),innerBlocks:i.innerBlocks.map(s=>o.get(s.clientId))}))}function hl(e,t,o=!1){let r=e.tree,n=new Set([]),i=new Set;for(let s of t){let a=o?s:e.parents.get(s);do if(e.controlledInnerBlocks[a]){i.add(a);break}else n.add(a),a=e.parents.get(a);while(a!==void 0)}for(let s of n)r.set(s,{...r.get(s)});for(let s of n)r.get(s).innerBlocks=(e.order.get(s)||[]).map(a=>r.get(a));for(let s of i)r.set("controlled||"+s,{innerBlocks:(e.order.get(s)||[]).map(a=>r.get(a))})}var ppe=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),$6(r,o.blocks),hl(r,o.rootClientId?[o.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(o.clientId,{...r.tree.get(o.clientId),...r.byClientId.get(o.clientId),attributes:r.attributes.get(o.clientId)}),hl(r,[o.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{r.tree=new Map(r.tree),o.clientIds.forEach(i=>{r.tree.set(i,{...r.tree.get(i),attributes:r.attributes.get(i)})}),hl(r,o.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let i=Z6(o.blocks);r.tree=new Map(r.tree),o.replacedClientIds.forEach(a=>{r.tree.delete(a),i[a]||r.tree.delete("controlled||"+a)}),$6(r,o.blocks),hl(r,o.blocks.map(a=>a.clientId),!1);let s=[];for(let a of o.clientIds){let c=t.parents.get(a);c!==void 0&&(c===""||r.byClientId.get(c))&&s.push(c)}hl(r,s,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":let n=[];for(let i of o.clientIds){let s=t.parents.get(i);s!==void 0&&(s===""||r.byClientId.get(s))&&n.push(s)}r.tree=new Map(r.tree),o.removedClientIds.forEach(i=>{r.tree.delete(i),r.tree.delete("controlled||"+i)}),hl(r,n,!0);break;case"MOVE_BLOCKS_TO_POSITION":{let i=[];o.fromRootClientId?i.push(o.fromRootClientId):i.push(""),o.toRootClientId&&i.push(o.toRootClientId),r.tree=new Map(r.tree),hl(r,i,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{let i=[o.rootClientId?o.rootClientId:""];r.tree=new Map(r.tree),hl(r,i,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{let i=[];r.attributes.forEach((s,a)=>{r.byClientId.get(a).name==="core/block"&&s.ref===o.updatedId&&i.push(a)}),r.tree=new Map(r.tree),i.forEach(s=>{r.tree.set(s,{...r.byClientId.get(s),attributes:r.attributes.get(s),innerBlocks:r.tree.get(s).innerBlocks})}),hl(r,i,!1)}}return r};function hpe(e){let t,o=!1,r;return(n,i)=>{let s=e(n,i),a;if(i.type==="SET_EXPLICIT_PERSISTENT"&&(r=i.isPersistentChange,a=n.isPersistentChange??!0),r!==void 0)return a=r,a===s.isPersistentChange?s:{...s,isPersistentChange:a};let c=i.type==="MARK_LAST_CHANGE_AS_PERSISTENT"||o;return n===s&&!c?(o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",a=n?.isPersistentChange??!0,n.isPersistentChange===a?n:{...s,isPersistentChange:a}):(s={...s,isPersistentChange:c?!o:!mpe(i,t)},t=i,o=i.type==="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT",s)}}function gpe(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 bpe=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)},kpe=e=>(t,o)=>{if(o.type==="RESET_BLOCKS"){let r=e(void 0,{type:"INSERT_BLOCKS",rootClientId:"",blocks:o.blocks}),n=t?.controlledInnerBlocks??{};if(t?.order)for(let s of Object.keys(n)){if(!n[s]||!r.byClientId.has(s))continue;r.controlledInnerBlocks[s]=!0;let a=t.order.get(s);if(!a?.length)continue;r.order.set(s,a);let c=(u,d)=>{let f=t.byClientId.get(u);if(!f)return;r.byClientId.set(u,f),r.attributes.set(u,t.attributes.get(u)),r.parents.set(u,d);let m=t.order.get(u)||[];r.order.set(u,m),m.forEach(h=>c(h,u))};a.forEach(u=>c(u,s))}for(let s of Object.keys(r.controlledInnerBlocks)){let a=r.order.get(s);if(!a?.length)continue;let c=a.map(f=>t.tree.get(f)),u=r.tree.get(s);u&&(u.innerBlocks=c),r.tree.set("controlled||"+s,{innerBlocks:c});let d=f=>{let m=t.tree.get(f);if(!m)return;r.tree.set(f,m),(r.order.get(f)||[]).forEach(d)};a.forEach(d)}let i=t?.blockEditingModes??new Map;for(let[s,a]of i)r.tree.has(s)&&r.blockEditingModes.set(s,a);return r}return e(t,o)},vpe=e=>(t,o)=>{if(o.type!=="REPLACE_INNER_BLOCKS")return e(t,o);let r={};if(Object.keys(t.controlledInnerBlocks).length){let s=[...o.blocks];for(;s.length;){let{innerBlocks:a,...c}=s.shift();s.push(...a),t.controlledInnerBlocks[c.clientId]&&(r[c.clientId]=!0)}}let n=t;t.order.get(o.rootClientId)&&(n=e(n,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(o.rootClientId)}));let i=n;if(o.blocks.length){i=e(i,{...o,type:"INSERT_BLOCKS",index:0});let s=new Map(i.order);Object.keys(r).forEach(a=>{t.order.get(a)&&s.set(a,t.order.get(a))}),i.order=s,i.tree=new Map(i.tree),Object.keys(r).forEach(a=>{let c=`controlled||${a}`;t.tree.has(c)&&i.tree.set(c,t.tree.get(c))})}return i},ype=e=>(t,o)=>{if(t&&o.type==="SAVE_REUSABLE_BLOCK_SUCCESS"){let{id:r,updatedId:n}=o;if(r===n)return t;t={...t},t.attributes=new Map(t.attributes),t.attributes.forEach((i,s)=>{let{name:a}=t.byClientId.get(s);a==="core/block"&&i.ref===r&&t.attributes.set(s,{...i,ref:n})})}return e(t,o)},Spe=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)},_pe=(0,TO.pipe)(Zk.combineReducers,ype,ppe,bpe,vpe,kpe,hpe,gpe,Spe)({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let o=new Map(e);return G6(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)}),G6(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 W6(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;let o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),o}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every(n=>!e.get(n)))return e;let o=!1,r=new Map(e);for(let n of t.clientIds){let i=Object.entries(t.options?.uniqueByBlock?t.attributes[n]:t.attributes??{});if(i.length===0)continue;let s=!1,a=e.get(n),c={};i.forEach(([u,d])=>{a[u]!==d&&(s=!0,c[u]=d)}),o=o||s,s&&r.set(n,{...a,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;let o=new Map(e);return t.replacedClientIds.forEach(r=>{o.delete(r)}),W6(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=B0(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=B0(t.blocks,o),{index:i=r.length}=t,s=new Map(e);return n.forEach((a,c)=>{s.set(c,a)}),s.set(o,k0(r,n.get(o),i)),s}case"MOVE_BLOCKS_TO_POSITION":{let{fromRootClientId:o="",toRootClientId:r="",clientIds:n}=t,{index:i=e.get(r).length}=t;if(o===r){let c=e.get(r).indexOf(n[0]),u=new Map(e);return u.set(r,v0(e.get(r),c,i,n.length)),u}let s=new Map(e);return s.set(o,e.get(o)?.filter(a=>!n.includes(a))??[]),s.set(r,k0(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,v0(i,s,s-1,o.length)),a}case"MOVE_BLOCKS_DOWN":{let{clientIds:o,rootClientId:r=""}=t,n=o[0],i=o[o.length-1],s=e.get(r);if(!s.length||i===s[s.length-1])return e;let a=s.indexOf(n),c=new Map(e);return c.set(r,v0(s,a,a+1,o.length)),c}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let{clientIds:o}=t;if(!t.blocks)return e;let r=B0(t.blocks),n=new Map(e);return t.replacedClientIds.forEach(i=>{n.delete(i)}),r.forEach((i,s)=>{s!==""&&n.set(s,i)}),n.forEach((i,s)=>{let a=Object.values(i).reduce((c,u)=>u===o[0]?[...c,...r.get("")]:(o.indexOf(u)===-1&&c.push(u),c),[]);n.set(s,a)}),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o.forEach((r,n)=>{let i=r?.filter(s=>!t.removedClientIds.includes(s))??[];i.length!==r.length&&o.set(n,i)}),o}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{let o=new Map(e);return BO(t.blocks).forEach(([r,n])=>{o.set(r,n)}),o}case"INSERT_BLOCKS":{let o=new Map(e);return BO(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)}),BO(t.blocks,e.get(t.clientIds[0])).forEach(([r,n])=>{o.set(r,n)}),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{let o=new Map(e);return t.removedClientIds.forEach(r=>{o.delete(r)}),o}}return e},controlledInnerBlocks(e={},{type:t,clientId:o,hasControlledInnerBlocks:r}){return t==="SET_HAS_CONTROLLED_INNER_BLOCKS"?{...e,[o]:r}:e},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 xpe(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e}function wpe(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e}function Cpe(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e}function Bpe(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e}function Epe(e={},t){return t.type==="SET_BLOCK_VISIBILITY"?{...e,...t.updates}:e}function K6(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 Tpe(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":let{selectionStart:n,selectionEnd:i}=t;return{selectionStart:n,selectionEnd:i};case"MULTI_SELECT":let{start:s,end:a}=t;return s===e.selectionStart?.clientId&&a===e.selectionEnd?.clientId?e:{selectionStart:{clientId:s},selectionEnd:{clientId:a}};case"RESET_BLOCKS":let c=e?.selectionStart?.clientId,u=e?.selectionEnd?.clientId;if(!c&&!u)return e;if(!t.blocks.some(d=>d.clientId===c))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some(d=>d.clientId===u))return{...e,selectionEnd:e.selectionStart}}let o=K6(e.selectionStart,t),r=K6(e.selectionEnd,t);return o===e.selectionStart&&r===e.selectionEnd?e:{selectionStart:o,selectionEnd:r}}function Ipe(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e}function Ppe(e=!0,t){return t.type==="TOGGLE_SELECTION"?t.isSelectionEnabled:e}function Rpe(e=null,t){switch(t.type){case"SHOW_VIEWPORT_MODAL":return t.clientIds;case"HIDE_VIEWPORT_MODAL":return null}return e}function Ope(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 Ape(e=!1,t){return t.type==="SET_BLOCK_REMOVAL_RULES"?t.rules:e}function Lpe(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 Npe(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 Mpe(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,qk.default)(e,a)?e:a}case"HIDE_INSERTION_POINT":return null}return e}function Dpe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function Vpe(e=Kk,t){if(t.type==="UPDATE_SETTINGS"){let o=t.reset?{...Kk,...t.settings}:{...e,...t.settings};return Object.defineProperty(o,"__unstableIsPreviewMode",{get(){return(0,Y6.default)("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),o}return e}function Fpe(e=H6,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{let o=t.blocks.reduce((r,n)=>{let{attributes:i,name:s}=n,a=s,c=(0,Zk.select)(E0.store).getActiveBlockVariation(s,i);return c?.name&&(a+="/"+c.name),s==="core/block"&&(a+="/"+i.ref),{...r,[a]:{time:t.time,count:r[a]?r[a].count+1:1}}},e.insertUsage);return{...e,insertUsage:o}}}return e}var zpe=(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":{let o=new Set,r=[...t.blocks];for(;r.length;){let n=r.shift();o.add(n.clientId),r.push(...n.innerBlocks)}return Object.fromEntries(Object.entries(e).filter(([n])=>!t.clientIds.includes(n)||o.has(n)))}case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter(([o])=>!t.clientIds.includes(o)));case"UPDATE_BLOCK_LIST_SETTINGS":{let o=typeof t.clientId=="string"?{[t.clientId]:t.settings}:t.clientId;for(let n in o)o[n]?(0,qk.default)(e[n],o[n])&&delete o[n]:e[n]||delete o[n];if(Object.keys(o).length===0)return e;let r={...e,...o};for(let n in o)o[n]||delete r[n];return r}}return e};function jpe(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 Upe(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 Hpe(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 Gpe(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 Wpe(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 $pe(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(!Z6(t.blocks)[e])return;break}return e}function Kpe(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 Ype(e=[],t){return t.type==="REGISTER_INSERTER_MEDIA_CATEGORY"?[...e,t.category]:e}function qpe(e=!1,t){return t.type==="LAST_FOCUS"?t.lastFocus:e}function Zpe(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e}function Xpe(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e}function Qpe(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 Jpe(e=0,t){return t.type==="INCREMENT_LIST_VIEW_EXPAND_REVISION"?e+1:e}function ehe(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 the(e=null,t){switch(t.type){case"REQUEST_INSPECTOR_TAB":return{tabName:t.tabName,options:t.options};case"CLEAR_REQUESTED_INSPECTOR_TAB":return null}return e}var ohe=(0,Zk.combineReducers)({blocks:_pe,isDragging:Cpe,isTyping:wpe,isBlockInterfaceHidden:xpe,draggedBlocks:Bpe,selection:Tpe,isMultiSelecting:Ipe,isSelectionEnabled:Ppe,initialPosition:Lpe,blocksMode:Npe,blockListSettings:zpe,insertionPoint:Xpe,insertionCue:Mpe,template:Dpe,settings:Vpe,preferences:Fpe,lastBlockAttributesChange:jpe,lastFocus:qpe,expandedBlock:Gpe,highlightedBlock:Upe,lastBlockInserted:Wpe,editedContentOnlySection:$pe,blockVisibility:Epe,viewportModalClientIds:Rpe,styleOverrides:Kpe,removalPromptData:Ope,blockRemovalRules:Ape,registeredInserterMediaCategories:Ype,zoomLevel:Zpe,hasBlockSpotlight:Hpe,openedListViewPanels:Qpe,listViewExpandRevision:Jpe,listViewContentPanelOpen:ehe,requestedInspectorTab:the});function X6(e,t){if(t===""){let n=e.blocks.tree.get(t);return n?{clientId:"",...n}:void 0}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);let o=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:o?.innerBlocks}}function IO(e,t,o){let r=X6(e,t);if(r&&(o(r),!!r?.innerBlocks?.length))for(let n of r?.innerBlocks)IO(e,n.clientId,o)}function Yk(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 rhe(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}function EO(e,t=""){let o=e?.zoomLevel<100||e?.zoomLevel==="auto-scaled",r=new Map,n=e.settings?.[Zc],i=e.blocks.order.get(n),s=Array.from(e.blocks.blockEditingModes).some(([,g])=>g==="disabled"),a=[],c=[];Object.keys(e.blocks.controlledInnerBlocks).forEach(g=>{let b=e.blocks.byClientId?.get(g);b?.name==="core/template-part"&&a.push(g),b?.name==="core/block"&&c.push(g)});let u=Object.keys(e.blockListSettings).filter(g=>e.blockListSettings[g]?.templateLock==="contentOnly"),d=e.settings?.[Xc],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 IO(e,t,g=>{let{clientId:b,name:v}=g,k=!!e.editedContentOnlySection,y=!1;if(k&&(y=b===e.editedContentOnlySection||!!Yk(e,b,[e.editedContentOnlySection]),!y)){r.set(b,"disabled");return}if(!e.blocks.blockEditingModes.has(b)){if(s){let S,x=e.blocks.parents.get(b);for(;x!==void 0&&(e.blocks.blockEditingModes.has(x)&&(S=e.blocks.blockEditingModes.get(x)),!S);)x=e.blocks.parents.get(x);if(S==="disabled"){r.set(b,"disabled");return}}if(o){if(b===n){r.set(b,"contentOnly");return}if(!i?.length){r.set(b,"disabled");return}if(i.includes(b)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}if(c.length){if(c.includes(b)){if(Yk(e,b,c)){r.set(b,"disabled");return}return}let S=Yk(e,b,c);if(S){if(Yk(e,S,c)){r.set(b,"disabled");return}if(rhe(g)){r.set(b,"contentOnly");return}r.set(b,"disabled");return}}if(k&&y){r.set(b,"default");return}p.length&&Yk(e,b,p)&&(upe(v)?r.set(b,"contentOnly"):r.set(b,"disabled"))}}),r}function Qc({prevState:e,nextState:t,addedBlocks:o,removedClientIds:r}){let n=e.derivedBlockEditingModes,i;return r?.forEach(s=>{IO(e,s,a=>{n.has(a.clientId)&&(i||(i=new Map(n)),i.delete(a.clientId))})}),o?.forEach(s=>{let a=EO(t,s.clientId);a.size&&(i?i=new Map([...i?.size?i:[],...a]):i=new Map([...n?.size?n:[],...a]))}),i}function nhe(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=Qc({prevState:t,nextState:r,removedClientIds:o.clientIds});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{let n=Qc({prevState:t,nextState:r,addedBlocks:o.blocks});if(n)return{...r,derivedBlockEditingModes:n??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{if(r.settings?.disableContentOnlyForUnsyncedPatterns)break;let i=[],s=[];for(let c of o?.clientIds){let u=o.options?.uniqueByBlock?o.attributes[c]:o.attributes;if(!u)break;u.metadata?.patternName&&!t.blocks.attributes.get(c)?.metadata?.patternName?i.push(r.blocks.tree.get(c)):u.metadata&&!u.metadata?.patternName&&t.blocks.attributes.get(c)?.metadata?.patternName&&s.push(c)}if(!i?.length&&!s?.length)break;let a=Qc({prevState:t,nextState:r,addedBlocks:i,removedClientIds:s});if(a)return{...r,derivedBlockEditingModes:a??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{let n=[],i=[],s=typeof o.clientId=="string"?{[o.clientId]:o.settings}:o.clientId;for(let c in s){let u=t.blockListSettings[c]?.templateLock!=="contentOnly"&&r.blockListSettings[c]?.templateLock==="contentOnly",d=t.blockListSettings[c]?.templateLock==="contentOnly"&&r.blockListSettings[c]?.templateLock!=="contentOnly";u?n.push(r.blocks.tree.get(c)):d&&i.push(c)}if(!n.length&&!i.length)break;let a=Qc({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=X6(r,o.clientId);if(!n)break;let i=Qc({prevState:t,nextState:r,removedClientIds:[o.clientId],addedBlocks:[n]});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{let n=Qc({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=Qc({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=Qc({prevState:t,nextState:r,addedBlocks:n,removedClientIds:o.clientIds});if(i)return{...r,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":{if(t?.settings?.[Zc]!==r?.settings?.[Zc]||!!t?.settings?.disableContentOnlyForUnsyncedPatterns!=!!r?.settings?.disableContentOnlyForUnsyncedPatterns||!!t?.settings?.[Xc]!=!!r?.settings?.[Xc]||!!t?.settings?.disableContentOnlyForTemplateParts!=!!r?.settings?.disableContentOnlyForTemplateParts)return{...r,derivedBlockEditingModes:EO(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:EO(r)}}return r.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,r}}function ihe(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 Q6=(0,TO.pipe)(nhe,ihe)(ohe);var rM={};Ip(rM,{__experimentalGetActiveBlockIdByBlockNames:()=>nbe,__experimentalGetAllowedBlocks:()=>Uge,__experimentalGetAllowedPatterns:()=>$ge,__experimentalGetBlockListSettingsForBlocks:()=>Xge,__experimentalGetDirectInsertBlock:()=>Hge,__experimentalGetGlobalBlocksByName:()=>Jhe,__experimentalGetLastBlockAttributeChanges:()=>ebe,__experimentalGetParsedPattern:()=>Gge,__experimentalGetPatternTransformItems:()=>qge,__experimentalGetPatternsByBlockTypes:()=>Yge,__experimentalGetReusableBlockTitle:()=>Qge,__unstableGetBlockWithoutInnerBlocks:()=>Zhe,__unstableGetClientIdWithClientIdsTree:()=>Sj,__unstableGetClientIdsTree:()=>_j,__unstableGetContentLockingParent:()=>fbe,__unstableGetSelectedBlocksWithPartialSelection:()=>Sge,__unstableGetTemporarilyEditingAsBlocks:()=>mbe,__unstableGetVisibleBlocks:()=>lbe,__unstableHasActiveBlockOverlayActive:()=>Dj,__unstableIsFullySelected:()=>bge,__unstableIsLastBlockChangeIgnored:()=>Jge,__unstableIsSelectionCollapsed:()=>kge,__unstableIsSelectionMergeable:()=>yge,__unstableIsWithinBlockOverlay:()=>cbe,__unstableSelectionHasUnmergeableBlock:()=>vge,areInnerBlocksControlled:()=>Ow,canEditBlock:()=>Lj,canInsertBlockType:()=>Df,canInsertBlocks:()=>Nge,canLockBlockType:()=>Dge,canMoveBlock:()=>Aj,canMoveBlocks:()=>Mge,canRemoveBlock:()=>QN,canRemoveBlocks:()=>Oj,didAutomaticChange:()=>obe,getAdjacentBlockClientId:()=>YN,getAllowedBlocks:()=>WN,getBlock:()=>xl,getBlockAttributes:()=>Ti,getBlockCount:()=>tge,getBlockEditingMode:()=>Ii,getBlockHierarchyRootClientId:()=>age,getBlockIndex:()=>Ej,getBlockInsertionPoint:()=>Rge,getBlockListSettings:()=>oM,getBlockMode:()=>Bge,getBlockName:()=>dt,getBlockNamesByClientId:()=>ege,getBlockOrder:()=>wr,getBlockParents:()=>ys,getBlockParentsByBlockName:()=>KN,getBlockRootClientId:()=>Po,getBlockSelectionEnd:()=>rge,getBlockSelectionStart:()=>oge,getBlockTransformItems:()=>zge,getBlocks:()=>Xhe,getBlocksByClientId:()=>Rw,getBlocksByName:()=>wj,getClientIdsOfDescendants:()=>xj,getClientIdsWithDescendants:()=>$p,getDirectInsertBlock:()=>Mj,getDraggedBlockClientIds:()=>Tge,getFirstMultiSelectedBlockClientId:()=>qN,getGlobalBlockCount:()=>Qhe,getHoveredBlockClientId:()=>abe,getInserterItems:()=>Fge,getLastMultiSelectedBlockClientId:()=>Cj,getLowestCommonAncestorWithSelectedBlock:()=>lge,getMultiSelectedBlockClientIds:()=>du,getMultiSelectedBlocks:()=>fge,getMultiSelectedBlocksEndClientId:()=>gge,getMultiSelectedBlocksStartClientId:()=>hge,getNextBlockClientId:()=>uge,getPatternsByBlockTypes:()=>Kge,getPreviousBlockClientId:()=>cge,getSelectedBlock:()=>sge,getSelectedBlockClientId:()=>Yp,getSelectedBlockClientIds:()=>qp,getSelectedBlockCount:()=>nge,getSelectedBlocksInitialCaretPosition:()=>dge,getSelectionEnd:()=>Ov,getSelectionStart:()=>Rv,getSettings:()=>su,getTemplate:()=>Lge,getTemplateLock:()=>fa,hasBlockMovingClientId:()=>tbe,hasDraggedInnerBlock:()=>Pj,hasInserterItems:()=>jge,hasMultiSelection:()=>xge,hasSelectedBlock:()=>ige,hasSelectedInnerBlock:()=>Ij,isAncestorBeingDragged:()=>Ige,isAncestorMultiSelected:()=>pge,isBlockBeingDragged:()=>ZN,isBlockHighlighted:()=>rbe,isBlockInsertionPointVisible:()=>Oge,isBlockMultiSelected:()=>Bj,isBlockSelected:()=>Tj,isBlockValid:()=>qhe,isBlockVisible:()=>sbe,isBlockWithinSelection:()=>_ge,isCaretWithinFormattedText:()=>Pge,isDraggingBlocks:()=>Rj,isFirstMultiSelectedBlock:()=>mge,isGroupable:()=>dbe,isLastBlockChangePersistent:()=>Zge,isMultiSelecting:()=>wge,isSelectionEnabled:()=>Cge,isTyping:()=>Ege,isUngroupable:()=>ube,isValidTemplate:()=>Age,wasBlockJustInserted:()=>ibe});var Oe=l($(),1),kj=l(R(),1),vj=l(ut(),1);var T0=l(R(),1),we=(0,T0.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,T0.cloneElement)(e,{width:t,height:t,...o,ref:r}));var I0=l(q(),1),PO=l(w(),1),Sf=(0,PO.jsx)(I0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PO.jsx)(I0.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})});var P0=l(q(),1),RO=l(w(),1),OO=(0,RO.jsx)(P0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RO.jsx)(P0.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});var R0=l(q(),1),AO=l(w(),1),Jc=(0,AO.jsx)(R0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AO.jsx)(R0.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})});var O0=l(q(),1),LO=l(w(),1),_f=(0,LO.jsx)(O0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LO.jsx)(O0.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})});var A0=l(q(),1),NO=l(w(),1),eu=(0,NO.jsx)(A0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NO.jsx)(A0.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});var L0=l(q(),1),MO=l(w(),1),DO=(0,MO.jsx)(L0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MO.jsx)(L0.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 N0=l(q(),1),VO=l(w(),1),Xk=(0,VO.jsx)(N0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VO.jsx)(N0.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var M0=l(q(),1),FO=l(w(),1),Qk=(0,FO.jsx)(M0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FO.jsx)(M0.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 D0=l(q(),1),zO=l(w(),1),jO=(0,zO.jsx)(D0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zO.jsx)(D0.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 V0=l(q(),1),UO=l(w(),1),HO=(0,UO.jsx)(V0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UO.jsx)(V0.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 F0=l(q(),1),GO=l(w(),1),Jk=(0,GO.jsx)(F0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GO.jsx)(F0.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 z0=l(q(),1),WO=l(w(),1),$O=(0,WO.jsx)(z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WO.jsx)(z0.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 j0=l(q(),1),KO=l(w(),1),gl=(0,KO.jsx)(j0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KO.jsx)(j0.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var U0=l(q(),1),YO=l(w(),1),zn=(0,YO.jsx)(U0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YO.jsx)(U0.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var H0=l(q(),1),qO=l(w(),1),ev=(0,qO.jsx)(H0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qO.jsx)(H0.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var G0=l(q(),1),ZO=l(w(),1),Mr=(0,ZO.jsx)(G0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZO.jsx)(G0.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var W0=l(q(),1),XO=l(w(),1),tu=(0,XO.jsx)(W0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XO.jsx)(W0.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 $0=l(q(),1),QO=l(w(),1),Vo=(0,QO.jsx)($0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QO.jsx)($0.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var K0=l(q(),1),JO=l(w(),1),xf=(0,JO.jsx)(K0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JO.jsx)(K0.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var Y0=l(q(),1),eA=l(w(),1),wf=(0,eA.jsx)(Y0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eA.jsx)(Y0.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 q0=l(q(),1),tA=l(w(),1),oA=(0,tA.jsx)(q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tA.jsx)(q0.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 Z0=l(q(),1),rA=l(w(),1),nA=(0,rA.jsx)(Z0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rA.jsx)(Z0.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 X0=l(q(),1),iA=l(w(),1),Cf=(0,iA.jsx)(X0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iA.jsx)(X0.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 Q0=l(q(),1),sA=l(w(),1),aA=(0,sA.jsx)(Q0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sA.jsx)(Q0.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 Bf=l(q(),1),Np=l(w(),1),lA=(0,Np.jsxs)(Bf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Np.jsx)(Bf.G,{opacity:".25",children:(0,Np.jsx)(Bf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Np.jsx)(Bf.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 Ef=l(q(),1),Mp=l(w(),1),cA=(0,Mp.jsxs)(Ef.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Mp.jsx)(Ef.G,{opacity:".25",children:(0,Mp.jsx)(Ef.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Mp.jsx)(Ef.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 Tf=l(q(),1),Dp=l(w(),1),uA=(0,Dp.jsxs)(Tf.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Dp.jsx)(Tf.G,{opacity:".25",children:(0,Dp.jsx)(Tf.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Dp.jsx)(Tf.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]});var If=l(q(),1),Vp=l(w(),1),dA=(0,Vp.jsxs)(If.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Vp.jsx)(If.G,{opacity:".25",children:(0,Vp.jsx)(If.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,Vp.jsx)(If.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 J0=l(q(),1),fA=l(w(),1),mA=(0,fA.jsx)(J0.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fA.jsx)(J0.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 ex=l(q(),1),pA=l(w(),1),tv=(0,pA.jsx)(ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(ex.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});var tx=l(q(),1),hA=l(w(),1),gA=(0,hA.jsx)(tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hA.jsx)(tx.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 ox=l(q(),1),bA=l(w(),1),Pf=(0,bA.jsx)(ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bA.jsx)(ox.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 rx=l(q(),1),kA=l(w(),1),vA=(0,kA.jsx)(rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kA.jsx)(rx.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});var nx=l(q(),1),yA=l(w(),1),SA=(0,yA.jsx)(nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)(nx.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});var ix=l(q(),1),_A=l(w(),1),xA=(0,_A.jsx)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(ix.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var sx=l(q(),1),wA=l(w(),1),CA=(0,wA.jsx)(sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(sx.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 ax=l(q(),1),BA=l(w(),1),EA=(0,BA.jsx)(ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BA.jsx)(ax.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 lx=l(q(),1),TA=l(w(),1),IA=(0,TA.jsx)(lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(lx.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 cx=l(q(),1),PA=l(w(),1),RA=(0,PA.jsx)(cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(cx.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 ux=l(q(),1),OA=l(w(),1),AA=(0,OA.jsx)(ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,OA.jsx)(ux.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 dx=l(q(),1),LA=l(w(),1),NA=(0,LA.jsx)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(dx.Path,{d:"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 fx=l(q(),1),MA=l(w(),1),mx=(0,MA.jsx)(fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MA.jsx)(fx.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 px=l(q(),1),DA=l(w(),1),ov=(0,DA.jsx)(px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(px.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 hx=l(q(),1),VA=l(w(),1),rv=(0,VA.jsx)(hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(hx.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 gx=l(q(),1),FA=l(w(),1),nv=(0,FA.jsx)(gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FA.jsx)(gx.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 bx=l(q(),1),zA=l(w(),1),jA=(0,zA.jsx)(bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(bx.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})});var kx=l(q(),1),UA=l(w(),1),HA=(0,UA.jsx)(kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UA.jsx)(kx.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 vx=l(q(),1),GA=l(w(),1),WA=(0,GA.jsx)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,GA.jsx)(vx.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 yx=l(q(),1),$A=l(w(),1),KA=(0,$A.jsx)(yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(yx.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})});var Sx=l(q(),1),YA=l(w(),1),qA=(0,YA.jsx)(Sx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YA.jsx)(Sx.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 _x=l(q(),1),ZA=l(w(),1),XA=(0,ZA.jsx)(_x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(_x.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 xx=l(q(),1),QA=l(w(),1),JA=(0,QA.jsx)(xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(xx.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});var wx=l(q(),1),eL=l(w(),1),iv=(0,eL.jsx)(wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(wx.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 Cx=l(q(),1),tL=l(w(),1),oL=(0,tL.jsx)(Cx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tL.jsx)(Cx.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 Bx=l(q(),1),rL=l(w(),1),nL=(0,rL.jsx)(Bx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(Bx.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})});var Ex=l(q(),1),iL=l(w(),1),sL=(0,iL.jsx)(Ex.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,iL.jsx)(Ex.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})});var Tx=l(q(),1),aL=l(w(),1),ou=(0,aL.jsx)(Tx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aL.jsx)(Tx.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})});var Ix=l(q(),1),lL=l(w(),1),ru=(0,lL.jsx)(Ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(Ix.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})});var Px=l(q(),1),cL=l(w(),1),nu=(0,cL.jsx)(Px.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cL.jsx)(Px.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});var Rx=l(q(),1),uL=l(w(),1),dL=(0,uL.jsx)(Rx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uL.jsx)(Rx.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});var Ox=l(q(),1),fL=l(w(),1),Fp=(0,fL.jsx)(Ox.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(Ox.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})});var Ax=l(q(),1),mL=l(w(),1),pL=(0,mL.jsx)(Ax.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mL.jsx)(Ax.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})});var Lx=l(q(),1),hL=l(w(),1),zp=(0,hL.jsx)(Lx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hL.jsx)(Lx.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})});var Nx=l(q(),1),gL=l(w(),1),bL=(0,gL.jsx)(Nx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Nx.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})});var Mx=l(q(),1),kL=l(w(),1),bl=(0,kL.jsx)(Mx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kL.jsx)(Mx.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 Dx=l(q(),1),vL=l(w(),1),yL=(0,vL.jsx)(Dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vL.jsx)(Dx.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 Vx=l(q(),1),SL=l(w(),1),Ci=(0,SL.jsx)(Vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SL.jsx)(Vx.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 Fx=l(q(),1),_L=l(w(),1),fn=(0,_L.jsx)(Fx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_L.jsx)(Fx.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 zx=l(q(),1),xL=l(w(),1),sv=(0,xL.jsx)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xL.jsx)(zx.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var jx=l(q(),1),wL=l(w(),1),CL=(0,wL.jsx)(jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wL.jsx)(jx.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 Ux=l(q(),1),BL=l(w(),1),EL=(0,BL.jsx)(Ux.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BL.jsx)(Ux.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 Hx=l(q(),1),TL=l(w(),1),Rf=(0,TL.jsx)(Hx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TL.jsx)(Hx.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 av=l(q(),1),lv=l(w(),1),jp=(0,lv.jsxs)(av.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,lv.jsx)(av.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,lv.jsx)(av.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 Gx=l(q(),1),IL=l(w(),1),cv=(0,IL.jsx)(Gx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IL.jsx)(Gx.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 Wx=l(q(),1),PL=l(w(),1),ks=(0,PL.jsx)(Wx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PL.jsx)(Wx.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var uv=l(q(),1),dv=l(w(),1),kl=(0,dv.jsxs)(uv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,dv.jsx)(uv.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,dv.jsx)(uv.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 $x=l(q(),1),RL=l(w(),1),OL=(0,RL.jsx)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,RL.jsx)($x.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 Kx=l(q(),1),AL=l(w(),1),Of=(0,AL.jsx)(Kx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AL.jsx)(Kx.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var Yx=l(q(),1),LL=l(w(),1),NL=(0,LL.jsx)(Yx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LL.jsx)(Yx.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 qx=l(q(),1),ML=l(w(),1),Bi=(0,ML.jsx)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ML.jsx)(qx.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Zx=l(q(),1),DL=l(w(),1),VL=(0,DL.jsx)(Zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DL.jsx)(Zx.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})});var Xx=l(q(),1),FL=l(w(),1),zL=(0,FL.jsx)(Xx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FL.jsx)(Xx.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})});var Qx=l(q(),1),jL=l(w(),1),UL=(0,jL.jsx)(Qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jL.jsx)(Qx.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var Jx=l(q(),1),HL=l(w(),1),GL=(0,HL.jsx)(Jx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HL.jsx)(Jx.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 ew=l(q(),1),WL=l(w(),1),$L=(0,WL.jsx)(ew.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WL.jsx)(ew.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 tw=l(q(),1),KL=l(w(),1),YL=(0,KL.jsx)(tw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KL.jsx)(tw.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var ow=l(q(),1),qL=l(w(),1),Dr=(0,qL.jsx)(ow.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qL.jsx)(ow.Path,{d:"M7 11.5h10V13H7z"})});var rw=l(q(),1),ZL=l(w(),1),XL=(0,ZL.jsx)(rw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZL.jsx)(rw.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 nw=l(q(),1),QL=l(w(),1),JL=(0,QL.jsx)(nw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QL.jsx)(nw.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 iw=l(q(),1),eN=l(w(),1),tN=(0,eN.jsx)(iw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eN.jsx)(iw.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 sw=l(q(),1),oN=l(w(),1),Af=(0,oN.jsx)(sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oN.jsx)(sw.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 fv=l(q(),1),mv=l(w(),1),rN=(0,mv.jsxs)(fv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,mv.jsx)(fv.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,mv.jsx)(fv.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 aw=l(q(),1),nN=l(w(),1),iN=(0,nN.jsx)(aw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nN.jsx)(aw.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 lw=l(q(),1),sN=l(w(),1),cw=(0,sN.jsx)(lw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sN.jsx)(lw.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})});var pv=l(q(),1),hv=l(w(),1),aN=(0,hv.jsxs)(pv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,hv.jsx)(pv.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,hv.jsx)(pv.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]});var Up=l(q(),1),Hp=l(w(),1),lN=(0,Hp.jsxs)(Up.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Hp.jsx)(Up.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,Hp.jsx)(Up.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,Hp.jsx)(Up.Path,{d:"m18 7.5v9h1.5v-9z"})]});var gv=l(q(),1),bv=l(w(),1),cN=(0,bv.jsxs)(gv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,bv.jsx)(gv.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,bv.jsx)(gv.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});var kv=l(q(),1),vv=l(w(),1),uN=(0,vv.jsxs)(kv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,vv.jsx)(kv.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,vv.jsx)(kv.Path,{d:"m18 16.5v-9h1.5v9z"})]});var yv=l(q(),1),Sv=l(w(),1),dN=(0,Sv.jsxs)(yv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Sv.jsx)(yv.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,Sv.jsx)(yv.Path,{d:"m16.5 6h-9v-1.5h9z"})]});var Gp=l(q(),1),Wp=l(w(),1),fN=(0,Wp.jsxs)(Gp.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Wp.jsx)(Gp.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,Wp.jsx)(Gp.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,Wp.jsx)(Gp.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]});var uw=l(q(),1),mN=l(w(),1),pN=(0,mN.jsx)(uw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mN.jsx)(uw.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 dw=l(q(),1),hN=l(w(),1),_v=(0,hN.jsx)(dw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hN.jsx)(dw.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});var fw=l(q(),1),gN=l(w(),1),Lf=(0,gN.jsx)(fw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gN.jsx)(fw.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})});var mw=l(q(),1),bN=l(w(),1),kN=(0,bN.jsx)(mw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bN.jsx)(mw.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 pw=l(q(),1),vN=l(w(),1),Ei=(0,vN.jsx)(pw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,vN.jsx)(pw.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 hw=l(q(),1),yN=l(w(),1),SN=(0,yN.jsx)(hw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yN.jsx)(hw.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 gw=l(q(),1),_N=l(w(),1),xN=(0,_N.jsx)(gw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_N.jsx)(gw.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 bw=l(q(),1),wN=l(w(),1),CN=(0,wN.jsx)(bw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wN.jsx)(bw.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 kw=l(q(),1),BN=l(w(),1),EN=(0,BN.jsx)(kw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BN.jsx)(kw.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 vw=l(q(),1),TN=l(w(),1),IN=(0,TN.jsx)(vw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TN.jsx)(vw.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 yw=l(q(),1),PN=l(w(),1),RN=(0,PN.jsx)(yw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PN.jsx)(yw.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 Sw=l(q(),1),ON=l(w(),1),vl=(0,ON.jsx)(Sw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ON.jsx)(Sw.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 _w=l(q(),1),AN=l(w(),1),vs=(0,AN.jsx)(_w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AN.jsx)(_w.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 xw=l(q(),1),LN=l(w(),1),NN=(0,LN.jsx)(xw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LN.jsx)(xw.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 ww=l(q(),1),MN=l(w(),1),DN=(0,MN.jsx)(ww.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,MN.jsx)(ww.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 Cw=l(q(),1),VN=l(w(),1),FN=(0,VN.jsx)(Cw.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VN.jsx)(Cw.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 _l=l(dr(),1),jn=l(Re(),1),Ee=l(F(),1);var hj=l($(),1),gj=l(oj(),1);var Kt="core/block-editor";var Tw={};Ip(Tw,{getAllPatterns:()=>xhe,getBlockRemovalRules:()=>bhe,getBlockSettings:()=>nj,getBlockStyles:()=>Ihe,getBlockWithoutAttributes:()=>fhe,getClosestAllowedInsertionPoint:()=>lj,getClosestAllowedInsertionPointForPattern:()=>Rhe,getContentLockingParent:()=>zN,getEditedContentOnlySection:()=>jN,getEnabledBlockParents:()=>hhe,getEnabledClientIdsTree:()=>phe,getExpandedBlock:()=>The,getInserterMediaCategories:()=>yhe,getInsertionPoint:()=>Ohe,getLastFocus:()=>Bhe,getLastInsertedBlocksClientIds:()=>dhe,getListViewExpandRevision:()=>zhe,getParentSectionBlock:()=>au,getPatternBySlug:()=>_he,getRegisteredInserterMediaCategories:()=>vhe,getRemovalPromptData:()=>ghe,getRequestedInspectorTab:()=>Uhe,getReusableBlocks:()=>Che,getSectionRootClientId:()=>Mf,getStyleOverrides:()=>khe,getViewportModalClientIds:()=>jhe,getZoomLevel:()=>Phe,hasAllowedPatterns:()=>She,hasBlockSpotlight:()=>Mhe,isBlockHiddenAnywhere:()=>Ahe,isBlockHiddenAtViewport:()=>cj,isBlockHiddenEverywhere:()=>GN,isBlockInterfaceHidden:()=>uhe,isBlockParentHiddenAtViewport:()=>Nhe,isBlockParentHiddenEverywhere:()=>Lhe,isBlockSubtreeDisabled:()=>mhe,isContainerInsertableToInContentOnlyMode:()=>wv,isDragging:()=>Ehe,isEditLockedBlock:()=>uj,isListViewContentPanelOpen:()=>Vhe,isListViewPanelOpened:()=>Fhe,isLockedBlock:()=>Dhe,isMoveLockedBlock:()=>dj,isRemoveLockedBlock:()=>fj,isSectionBlock:()=>lu,isWithinEditedContentOnlySection:()=>UN,isZoomOut:()=>HN});var Vr=l(F(),1),xv=l($(),1);var Bw=l(N(),1);var Et={desktop:{label:(0,Bw.__)("Desktop"),icon:mA,key:"desktop"},tablet:{label:(0,Bw.__)("Tablet"),icon:SN,key:"tablet"},mobile:{label:(0,Bw.__)("Mobile"),icon:cv,key:"mobile"}},iu=Object.entries(Et);var Ew=l($(),1),rj=l(ut(),1);function pe(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let r=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[r]=o,e}var yl=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var she=["color","border","dimensions","typography","spacing"],ahe={"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},lhe={"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"},che=e=>lhe[e]||e;function nj(e,t,...o){let r=dt(e,t),n=[];if(t){let i=t;do{let s=dt(e,i);(0,Ew.hasBlockSupport)(s,"__experimentalSettings",!1)&&n.push(i)}while(i=e.blocks.parents.get(i))}return o.map(i=>{if(she.includes(i)){console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");return}let s=(0,rj.applyFilters)("blockEditor.useSetting.before",void 0,i,t,r);if(s!==void 0)return s;let a=che(i);for(let d of n){let f=Ti(e,d);if(s=yl(f.settings?.blocks?.[r],a)??yl(f.settings,a),s!==void 0)break}let c=su(e);if(s===void 0&&r&&(s=yl(c.__experimentalFeatures?.blocks?.[r],a)),s===void 0&&(s=yl(c.__experimentalFeatures,a)),s!==void 0)return Ew.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[a]?s.custom??s.theme??s.default:s;let u=ahe[a]?.(c);return u!==void 0?u:a==="typography.dropCap"?!0:void 0})}var{isContentBlock:ij}=M(xv.privateApis);function uhe(e){return e.isBlockInterfaceHidden}function dhe(e){return e?.lastBlockInserted?.clientIds}function fhe(e,t){return e.blocks.byClientId.get(t)}var mhe=(e,t)=>{let o=r=>Ii(e,r)==="disabled"&&wr(e,r).every(o);return wr(e,t).every(o)};function wv(e,t,o){let r=ij(t),n=dt(e,o),i=ij(n);return Mf(e)===o||i&&r}function sj(e,t){let o=wr(e,t),r=[];for(let n of o){let i=sj(e,n);Ii(e,n)!=="disabled"?r.push({clientId:n,innerBlocks:i}):r.push(...i)}return r}var phe=(0,Vr.createRegistrySelector)(()=>(0,Vr.createSelector)(sj,e=>[e.blocks.order,e.derivedBlockEditingModes,e.blocks.blockEditingModes])),hhe=(0,Vr.createSelector)((e,t,o=!1)=>ys(e,t,o).filter(r=>Ii(e,r)!=="disabled"),e=>[e.blocks.parents,e.blocks.blockEditingModes,e.settings.templateLock,e.blockListSettings]);function ghe(e){return e.removalPromptData}function bhe(e){return e.blockRemovalRules}var khe=(0,Vr.createSelector)(e=>{let o=$p(e).reduce((r,n,i)=>(r[n]=i,r),{});return[...e.styleOverrides].sort((r,n)=>{let[,{clientId:i}]=r,[,{clientId:s}]=n,a=o[i]??-1,c=o[s]??-1;return a-c})},e=>[e.blocks.order,e.styleOverrides]);function vhe(e){return e.registeredInserterMediaCategories}var yhe=(0,Vr.createSelector)(e=>{let{settings:{inserterMediaCategories:t,allowedMimeTypes:o,enableOpenverseMediaCategory:r},registeredInserterMediaCategories:n}=e;if(!t&&!n.length||!o)return;let i=t?.map(({name:a})=>a)||[];return[...t||[],...(n||[]).filter(({name:a})=>!i.includes(a))].filter(a=>!r&&a.name==="openverse"?!1:Object.values(o).some(c=>c.startsWith(`${a.mediaType}/`)))},e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]),She=(0,Vr.createRegistrySelector)(e=>(0,Vr.createSelector)((t,o=null)=>{let{getAllPatterns:r}=M(e(Kt)),n=r(),{allowedBlockTypes:i}=su(t);return n.some(s=>{let{inserter:a=!0}=s;if(!a)return!1;let c=Nf(s);return Bv(c,i)&&c.every(({name:u})=>Df(t,u,o))})},(t,o)=>[...Ev(e)(t),...cu(e)(t,o)])),_he=(0,Vr.createRegistrySelector)(e=>(0,Vr.createSelector)((t,o)=>{if(o?.startsWith("core/block/")){let r=parseInt(o.slice(11),10),n=M(e(Kt)).getReusableBlocks().find(({id:i})=>i===r);return n?Cv(n,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].find(({name:r})=>r===o)},(t,o)=>o?.startsWith("core/block/")?[M(e(Kt)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[qc]?.(e)])),xhe=(0,Vr.createRegistrySelector)(e=>(0,Vr.createSelector)(t=>[...M(e(Kt)).getReusableBlocks().map(o=>Cv(o,t.settings.__experimentalUserPatternCategories)),...t.settings.__experimentalBlockPatterns??[],...t.settings[qc]?.(e)??[]].filter((o,r,n)=>r===n.findIndex(i=>o.name===i.name)),Ev(e))),whe=[],Che=(0,Vr.createRegistrySelector)(e=>t=>{let o=t.settings[S0];return(o?o(e):t.settings.__experimentalReusableBlocks)??whe});function Bhe(e){return e.lastFocus}function Ehe(e){return e.isDragging}function The(e){return e.expandedBlock}var zN=(e,t)=>{let o=t,r;for(;!r&&(o=e.blocks.parents.get(o));)fa(e,o)==="contentOnly"&&(r=o);return r};function aj(e,t){let o=dt(e,t);if(o==="core/block")return!0;let r=Ti(e,t),n=o==="core/template-part",i=e.settings?.[Xc],s=e.settings?.disableContentOnlyForUnsyncedPatterns,a=e.settings?.disableContentOnlyForTemplateParts;if((!s&&r?.metadata?.patternName||n&&!a)&&!i)return!0;let c=fa(e,t)==="contentOnly",u=Po(e,t),d=fa(e,u)==="contentOnly";return!!(c&&!d)}var au=(e,t)=>{if(UN(e,t))return;let o=t,r;for(;o=e.blocks.parents.get(o);)aj(e,o)&&(r=o);return r};function lu(e,t){return UN(e,t)||au(e,t)?!1:aj(e,t)}function jN(e){return e.editedContentOnlySection}function UN(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 Ihe=(0,Vr.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 Mf(e){return e.settings?.[Zc]}function HN(e){return e.zoomLevel==="auto-scaled"||e.zoomLevel<100}function Phe(e){return e.zoomLevel}function lj(e,t,o=""){let r=Array.isArray(t)?t:[t],n=s=>r.every(a=>Df(e,a,s));if(!o){if(n(o))return o;let s=Mf(e);return s&&n(s)?s:null}let i=o;for(;i!==null&&!n(i);)i=Po(e,i);return i}function Rhe(e,t,o){let{allowedBlockTypes:r}=su(e);if(!Bv(Nf(t),r))return null;let i=Nf(t).map(({blockName:s})=>s);return lj(e,i,o)}function Ohe(e){return e.insertionPoint}var Ahe=(e,t)=>{let o=dt(e,t);if(!(0,xv.hasBlockSupport)(o,"visibility",!0))return!1;let n=e.blocks.attributes.get(t)?.metadata?.blockVisibility;return n===!1?!0:typeof n?.viewport=="object"&&n?.viewport!==null?Object.values(Et).some(i=>n?.viewport?.[i.key]===!1):!1},GN=(e,t)=>{let o=dt(e,t);return(0,xv.hasBlockSupport)(o,"visibility",!0)?e.blocks.attributes.get(t)?.metadata?.blockVisibility===!1:!1},Lhe=(e,t)=>ys(e,t).some(r=>GN(e,r)),cj=(e,t,o)=>{if(GN(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},Nhe=(e,t,o)=>ys(e,t).some(n=>cj(e,n,o));function Mhe(e){return!!e.hasBlockSpotlight||!!e.editedContentOnlySection}function uj(e,t){return!!Ti(e,t)?.lock?.edit}function dj(e,t){let o=Ti(e,t);if(o?.lock?.move!==void 0)return!!o?.lock?.move;let r=Po(e,t);return fa(e,r)==="all"}function fj(e,t){let o=Ti(e,t);if(o?.lock?.remove!==void 0)return!!o?.lock?.remove;let r=Po(e,t),n=fa(e,r);return n==="all"||n==="insert"}function Dhe(e,t){return uj(e,t)||dj(e,t)||fj(e,t)}function Vhe(e){return e.listViewContentPanelOpen}function Fhe(e,t){return e.openedListViewPanels?.allOpen?!0:e.openedListViewPanels?.panels?.[t]===!0}function zhe(e){return e.listViewExpandRevision||0}function jhe(e){return e.viewportModalClientIds}function Uhe(e){return e.requestedInspectorTab}var Iv=l(N(),1),Nt={user:"user",theme:"theme",directory:"directory"},Tv={full:"fully",unsynced:"unsynced"},Vf={name:"allPatterns",label:(0,Iv._x)("All","patterns")},Sl={name:"myPatterns",label:(0,Iv.__)("My patterns")},Kp={name:"core/starter-content",label:(0,Iv.__)("Starter content")};function Iw(e,t,o){let r=e.name.startsWith("core/block"),n=e.source==="core"||e.source?.startsWith("pattern-directory");return!!(t===Nt.theme&&(r||n)||t===Nt.directory&&(r||!n)||t===Nt.user&&e.type!==Nt.user||o===Tv.full&&e.syncStatus!==""||o===Tv.unsynced&&e.syncStatus!=="unsynced"&&r)}var uu=Symbol("isFiltered"),mj=new WeakMap,pj=new WeakMap;function Cv(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:Nt.user,title:e.title?.raw,categories:e.wp_pattern_category?.map(o=>{let r=t.find(({id:n})=>n===o);return r?r.slug:o}),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function Hhe(e){let t=(0,hj.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 Pw(e){let t=mj.get(e);return t||(t=Hhe(e),mj.set(e,t)),t}function Nf(e){let t=pj.get(e);return t||(t=(0,gj.parse)(e.content),t=t.filter(o=>o.blockName!==null),pj.set(e,t)),t}var Ff=(e,t,o=null)=>typeof e=="boolean"?e:Array.isArray(e)?e.includes("core/post-content")&&t===null?!0:e.includes(t):o,Bv=(e,t)=>{if(typeof t=="boolean")return t;let o=[...e];for(;o.length>0;){let r=o.shift();if(!Ff(t,r.name||r.blockName,!0))return!1;r.innerBlocks?.forEach(i=>{o.push(i)})}return!0},Ev=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[qc]?.(e),t.blockPatterns,M(e(Kt)).getReusableBlocks()],cu=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.blocks.order.get(t||""),e.settings.allowedBlockTypes,e.settings.templateLock,Ii(e,t),Mf(e),lu(e,t),au(e,t)];var Ghe=(e,t,o)=>(r,n)=>{let i,s;if(typeof e=="function"?(i=e(r),s=e(n)):(i=r[e],s=n[e]),i>s)return o==="asc"?1:-1;if(s>i)return o==="asc"?-1:1;let a=t.findIndex(u=>u===r),c=t.findIndex(u=>u===n);return a>c?1:c>a?-1:0};function ma(e,t,o="asc"){return e.concat().sort(Ghe(t,e,o))}var{isContentBlock:$N}=M(Oe.privateApis),Whe=3600*1e3,$he=24*3600*1e3,Khe=168*3600*1e3,fr=[],Yhe=new Set,yj={[uu]:!0};function dt(e,t){let o=e.blocks.byClientId.get(t),r="core/social-link";if(kj.Platform.OS!=="web"&&o?.name===r){let n=e.blocks.attributes.get(t),{service:i}=n??{};return i?`${r}-${i}`:r}return o?o.name:null}function qhe(e,t){let o=e.blocks.byClientId.get(t);return!!o&&o.isValid}function Ti(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function xl(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}var Zhe=(0,Ee.createSelector)((e,t)=>{let o=e.blocks.byClientId.get(t);return o?{...o,attributes:Ti(e,t)}:null},(e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]);function Xhe(e,t){let o=!t||!Ow(e,t)?t||"":"controlled||"+t;return e.blocks.tree.get(o)?.innerBlocks||fr}var Sj=(0,Ee.createSelector)((e,t)=>((0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:_j(e,t)}),e=>[e.blocks.order]),_j=(0,Ee.createSelector)((e,t="")=>((0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),wr(e,t).map(o=>Sj(e,o))),e=>[e.blocks.order]),xj=(0,Ee.createSelector)((e,t)=>{t=Array.isArray(t)?[...t]:[t];let o=[];for(let n of t){let i=e.blocks.order.get(n);i&&o.push(...i)}let r=0;for(;r<o.length;){let n=o[r],i=e.blocks.order.get(n);i&&o.splice(r+1,0,...i),r++}return o},e=>[e.blocks.order]),$p=e=>xj(e,""),Qhe=(0,Ee.createSelector)((e,t)=>{let o=$p(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]),wj=(0,Ee.createSelector)((e,t)=>{if(!t)return fr;let o=Array.isArray(t)?t:[t],n=$p(e).filter(i=>{let s=e.blocks.byClientId.get(i);return o.includes(s.name)});return n.length>0?n:fr},e=>[e.blocks.order,e.blocks.byClientId]);function Jhe(e,t){return(0,jn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),wj(e,t)}var Rw=(0,Ee.createSelector)((e,t)=>(Array.isArray(t)?t:[t]).map(o=>xl(e,o)),(e,t)=>(Array.isArray(t)?t:[t]).map(o=>e.blocks.tree.get(o))),ege=(0,Ee.createSelector)((e,t)=>Rw(e,t).filter(Boolean).map(o=>o.name),(e,t)=>Rw(e,t));function tge(e,t){return wr(e,t).length}function Rv(e){return e.selection.selectionStart}function Ov(e){return e.selection.selectionEnd}function oge(e){return e.selection.selectionStart.clientId}function rge(e){return e.selection.selectionEnd.clientId}function nge(e){let t=du(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function ige(e){let{selectionStart:t,selectionEnd:o}=e.selection;return!!t.clientId&&t.clientId===o.clientId}function Yp(e){let{selectionStart:t,selectionEnd:o}=e.selection,{clientId:r}=t;return!r||r!==o.clientId?null:r}function sge(e){let t=Yp(e);return t?xl(e,t):null}function Po(e,t){return e.blocks.parents.get(t)??null}var ys=(0,Ee.createSelector)((e,t,o=!1)=>{let r=[],n=t;for(;n=e.blocks.parents.get(n);)r.push(n);return r.length?o?r:r.reverse():fr},e=>[e.blocks.parents]),KN=(0,Ee.createSelector)((e,t,o,r=!1)=>{let n=ys(e,t,r),i=Array.isArray(o)?s=>o.includes(s):s=>o===s;return n.filter(s=>i(dt(e,s)))},e=>[e.blocks.parents]);function age(e,t){let o=t,r;do r=o,o=e.blocks.parents.get(o);while(o);return r}function lge(e,t){let o=Yp(e),r=[...ys(e,t),t],n=[...ys(e,o),o],i,s=Math.min(r.length,n.length);for(let a=0;a<s&&r[a]===n[a];a++)i=r[a];return i}function YN(e,t,o=1){if(t===void 0&&(t=Yp(e)),t===void 0&&(o<0?t=qN(e):t=Cj(e)),!t)return null;let r=Po(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 cge(e,t){return YN(e,t,-1)}function uge(e,t){return YN(e,t,1)}function dge(e){return e.initialPosition}var qp=(0,Ee.createSelector)(e=>{let{selectionStart:t,selectionEnd:o}=e.selection;if(!t.clientId||!o.clientId)return fr;if(t.clientId===o.clientId)return[t.clientId];let r=Po(e,t.clientId);if(r===null)return fr;let n=wr(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 du(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?fr:qp(e)}var fge=(0,Ee.createSelector)(e=>{let t=du(e);return t.length?t.map(o=>xl(e,o)):fr},e=>[...qp.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]);function qN(e){return du(e)[0]||null}function Cj(e){let t=du(e);return t[t.length-1]||null}function mge(e,t){return qN(e)===t}function Bj(e,t){return du(e).indexOf(t)!==-1}var pge=(0,Ee.createSelector)((e,t)=>{let o=t,r=!1;for(;o&&!r;)o=Po(e,o),r=Bj(e,o);return r},e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]);function hge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:t.clientId||null}function gge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId===o.clientId?null:o.clientId||null}function bge(e){let t=Rv(e),o=Ov(e);return!t.attributeKey&&!o.attributeKey&&typeof t.offset>"u"&&typeof o.offset>"u"}function kge(e){let t=Rv(e),o=Ov(e);return!!t&&!!o&&t.clientId===o.clientId&&t.attributeKey===o.attributeKey&&t.offset===o.offset}function vge(e){return qp(e).some(t=>{let o=dt(e,t);return!(0,Oe.getBlockType)(o).merge})}function yge(e,t){let o=Rv(e),r=Ov(e);if(o.clientId===r.clientId||!o.attributeKey||!r.attributeKey||typeof o.offset>"u"||typeof r.offset>"u")return!1;let n=Po(e,o.clientId),i=Po(e,r.clientId);if(n!==i)return!1;let s=wr(e,n),a=s.indexOf(o.clientId),c=s.indexOf(r.clientId),u,d;a>c?(u=r,d=o):(u=o,d=r);let f=t?d.clientId:u.clientId,m=t?u.clientId:d.clientId,h=dt(e,f);if(!(0,Oe.getBlockType)(h).merge)return!1;let g=xl(e,m);if(g.name===h)return!0;let b=(0,Oe.switchToBlockType)(g,h);return b&&b.length}var Sge=e=>{let t=Rv(e),o=Ov(e);if(t.clientId===o.clientId||!t.attributeKey||!o.attributeKey||typeof t.offset>"u"||typeof o.offset>"u")return fr;let r=Po(e,t.clientId),n=Po(e,o.clientId);if(r!==n)return fr;let i=wr(e,r),s=i.indexOf(t.clientId),a=i.indexOf(o.clientId),[c,u]=s>a?[o,t]:[t,o],d=xl(e,c.clientId),f=xl(e,u.clientId),m=d.attributes[c.attributeKey],h=f.attributes[u.attributeKey],p=(0,_l.create)({html:m}),g=(0,_l.create)({html:h});return p=(0,_l.remove)(p,0,c.offset),g=(0,_l.remove)(g,u.offset,g.text.length),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,_l.toHTMLString)({value:p})}},{...f,attributes:{...f.attributes,[u.attributeKey]:(0,_l.toHTMLString)({value:g})}}]};function wr(e,t){return e.blocks.order.get(t||"")||fr}function Ej(e,t){let o=Po(e,t);return wr(e,o).indexOf(t)}function Tj(e,t){let{selectionStart:o,selectionEnd:r}=e.selection;return o.clientId!==r.clientId?!1:o.clientId===t}function Ij(e,t,o=!1){let r=qp(e);return r.length?o?r.some(n=>ys(e,n,!0).includes(t)):r.some(n=>Po(e,n)===t):!1}function Pj(e,t,o=!1){return wr(e,t).some(r=>ZN(e,r)||o&&Pj(e,r,o))}function _ge(e,t){if(!t)return!1;let o=du(e),r=o.indexOf(t);return r>-1&&r<o.length-1}function xge(e){let{selectionStart:t,selectionEnd:o}=e.selection;return t.clientId!==o.clientId}function wge(e){return e.isMultiSelecting}function Cge(e){return e.isSelectionEnabled}function Bge(e,t){return e.blocksMode[t]||"visual"}function Ege(e){return e.isTyping}function Rj(e){return!!e.draggedBlocks.length}function Tge(e){return e.draggedBlocks}function ZN(e,t){return e.draggedBlocks.includes(t)}function Ige(e,t){return Rj(e)?ys(e,t).some(r=>ZN(e,r)):!1}function Pge(){return(0,jn.default)('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}var Rge=(0,Ee.createSelector)(e=>{let t,o,{insertionCue:r,selection:{selectionEnd:n}}=e;if(r!==null)return r;let{clientId:i}=n;return i?(t=Po(e,i)||void 0,o=Ej(e,n.clientId)+1):o=wr(e).length,{rootClientId:t,index:o}},e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]);function Oge(e){return e.insertionCue!==null}function Age(e){return e.template.isValid}function Lge(e){return e.settings.template}function fa(e,t){if(!t)return e.settings.templateLock??!1;let o=oM(e,t)?.templateLock;return o==="contentOnly"&&e.editedContentOnlySection===t?!1:o??!1}var XN=(e,t,o=null)=>{let r,n;if(t&&typeof t=="object"?(r=t,n=t.name):(r=(0,Oe.getBlockType)(t),n=t),!r)return!1;let{allowedBlockTypes:i}=su(e);if(!Ff(i,n,!0))return!1;let a=(Array.isArray(r.parent)?r.parent:[]).concat(Array.isArray(r.ancestor)?r.ancestor:[]);if(a.length>0){if(a.includes("core/post-content"))return!0;let c=o,u=!1;do{if(a.includes(dt(e,c))){u=!0;break}c=e.blocks.parents.get(c)}while(c);return u}return!0},Av=(e,t,o=null)=>{if(e.settings.isPreviewMode||!XN(e,t,o))return!1;let r;t&&typeof t=="object"?(r=t,t=r.name):r=(0,Oe.getBlockType)(t);let n=fa(e,o);if(n&&n!=="contentOnly")return!1;let i=Ii(e,o??""),s=!!lu(e,o),a=s?o:au(e,o),c=!!a;if(i==="disabled"&&(!c||t!==(0,Oe.getDefaultBlockName)()))return!1;let u=oM(e,o);if(o&&u===void 0)return!1;let d=$N(t);if(c&&!d||c&&dt(e,a)==="core/block")return!1;if(c&&(s||i==="contentOnly"||i==="disabled")&&!wv(e,t,o)){let S=(0,Oe.getDefaultBlockName)();if(t===S){if(!wr(e,o).some(B=>dt(e,B)===S))return!1}else return!1}let f=dt(e,o),h=(0,Oe.getBlockType)(f)?.allowedBlocks,p=Ff(h,t);if(p!==!1){let S=u?.allowedBlocks,x=Ff(S,t);x!==null&&(p=x)}let g=r.parent,b=Ff(g,f),v=!0,k=r.ancestor;k&&(v=[o,...ys(e,o)].some(x=>Ff(k,dt(e,x))));let y=v&&(p===null&&b===null||p===!0||b===!0);return y&&(0,vj.applyFilters)("blockEditor.__unstableCanInsertBlockType",y,r,o,{getBlock:xl.bind(null,e),getBlockParentsByBlockName:KN.bind(null,e)})},Df=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)(Av,(t,o,r)=>cu(e)(t,r)));function Nge(e,t,o=null){return t.every(r=>Df(e,dt(e,r),o))}function QN(e,t){if(e.settings.isPreviewMode)return!1;let o=Ti(e,t);if(o===null)return!0;if(o.lock?.remove!==void 0)return!o.lock.remove;let r=Po(e,t),n=fa(e,r);if(n&&n!=="contentOnly")return!1;let i=!!lu(e,r),s=i?r:au(e,r),a=!!s,c=$N(dt(e,t));if(a&&!c||a&&dt(e,s)==="core/block")return!1;let u=Ii(e,r),d=dt(e,t),f=(0,Oe.getDefaultBlockName)();return a&&(i||d===f||u==="contentOnly")&&!wv(e,dt(e,t),r)?d===f?wr(e,r).filter(p=>dt(e,p)===f).length>1:!1:u!=="disabled"}function Oj(e,t){return t.every(o=>QN(e,o))}function Aj(e,t){if(e.settings.isPreviewMode)return!1;let o=Ti(e,t);if(o===null)return!0;if(o.lock?.move!==void 0)return!o.lock.move;let r=Po(e,t);if(fa(e,r)==="all")return!1;let i=!!au(e,t),s=$N(dt(e,t));if(i&&!s)return!1;let a=!!lu(e,r),c=Ii(e,r);return i&&(a||c==="contentOnly")&&!wv(e,dt(e,t),r)?!1:Ii(e,r)!=="disabled"}function Mge(e,t){return t.every(o=>Aj(e,o))}function Lj(e,t){if(e.settings.isPreviewMode)return!1;let o=Ti(e,t);if(o===null)return!0;let{lock:r}=o;return!r?.edit}function Dge(e,t){return e.settings.isPreviewMode||!(0,Oe.hasBlockSupport)(t,"lock",!0)?!1:!!e.settings?.canLockBlocks}function JN(e,t){return e.preferences.insertUsage?.[t]??null}var Pv=(e,t,o)=>(0,Oe.hasBlockSupport)(t,"inserter",!0)?Av(e,t.name,o):!1,Vge=(e,t)=>o=>{let r=`${t.id}/${o.name}`,{time:n,count:i=0}=JN(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:eM(n,i),isSearchOnly:o.isSearchOnly}},eM=(e,t)=>{if(!e)return t;let o=Date.now()-e;switch(!0){case o<Whe:return t*4;case o<$he:return t*2;case o<Khe:return t/2;default:return t/4}},Nj=(e,{buildScope:t="inserter"})=>o=>{let r=o.name,n=!1;(0,Oe.hasBlockSupport)(o.name,"multiple",!0)||(n=Rw(e,$p(e)).some(({name:f})=>f===o.name));let{time:i,count:s=0}=JN(e,r)||{},a={id:r,name:o.name,title:o.title,icon:o.icon,isDisabled:n,frecency:eM(i,s)};if(t==="transform")return a;let c=(0,Oe.getBlockVariations)(o.name,"inserter"),u=(0,Oe.getBlockVariations)(o.name,"block"),d=[...c,...u.filter(f=>o.name==="core/heading"&&["h1","h2","h3","h4","h5","h6"].includes(f.name)).map(f=>({...f,isSearchOnly:!0}))];return{...a,initialAttributes:{},description:o.description,category:o.category,keywords:o.keywords,parent:o.parent,ancestor:o.ancestor,variations:d,example:o.example,utility:1}},Fge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=yj)=>{let n=h=>{let p=h.wp_pattern_sync_status?Ei:{src:Ei,foreground:"var(--wp-block-synced-color)"},g=Cv(h),{time:b,count:v=0}=JN(t,g.name)||{},k=eM(b,v);return{id:g.name,name:"core/block",initialAttributes:{ref:h.id},title:g.title,icon:p,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:k,content:g.content,get blocks(){return Pw(g).blocks},syncStatus:g.syncStatus}},i=Av(t,"core/block",o)?M(e(Kt)).getReusableBlocks().map(n):[],s=Nj(t,{buildScope:"inserter"}),a=(0,Oe.getBlockTypes)().filter(h=>(0,Oe.hasBlockSupport)(h,"inserter",!0)).map(s);if(r[uu]!==!1)a=a.filter(h=>Pv(t,h,o));else{let{getClosestAllowedInsertionPoint:h}=M(e(Kt));a=a.filter(p=>XN(t,p,o)&&h(p.name,o)!==null).map(p=>({...p,isAllowedInCurrentRoot:Pv(t,p,o)}))}let c=a.reduce((h,p)=>{let{variations:g=[]}=p;if(g.some(({isDefault:b})=>b)||h.push(p),g.length){let b=Vge(t,p);h.push(...g.map(b))}return h},[]),u=(h,p)=>{let{core:g,noncore:b}=h;return(p.name.startsWith("core/")?g:b).push(p),h},{core:d,noncore:f}=c.reduce(u,{core:[],noncore:[]});return[...[...d,...f],...i]},(t,o)=>[(0,Oe.getBlockTypes)(),M(e(Kt)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...cu(e)(t,o)])),zge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{let n=Array.isArray(o)?o:[o],i=Nj(t,{buildScope:"transform"}),s=(0,Oe.getBlockTypes)().filter(u=>Pv(t,u,r)).map(i),a=Object.fromEntries(Object.entries(s).map(([,u])=>[u.name,u])),c=(0,Oe.getPossibleBlockTransformations)(n).reduce((u,d)=>(a[d?.name]&&u.push(a[d.name]),u),[]);return ma(c,u=>a[u.name].frecency,"desc")},(t,o,r)=>[(0,Oe.getBlockTypes)(),t.preferences.insertUsage,...cu(e)(t,r)])),jge=(e,t=null)=>(0,Oe.getBlockTypes)().some(n=>Pv(e,n,t))?!0:Av(e,"core/block",t),WN=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null)=>{if(!o)return;let r=(0,Oe.getBlockTypes)().filter(i=>Pv(t,i,o));return Av(t,"core/block",o)&&r.push("core/block"),r},(t,o)=>[(0,Oe.getBlockTypes)(),...cu(e)(t,o)])),Uge=(0,Ee.createSelector)((e,t=null)=>((0,jn.default)('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),WN(e,t)),(e,t)=>WN.getDependants(e,t));function Mj(e,t=null){if(!t)return;let{defaultBlock:o,directInsert:r}=e.blockListSettings[t]??{};if(!(!o||!r))return o}function Hge(e,t=null){return(0,jn.default)('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Mj(e,t)}var Gge=(0,Ee.createRegistrySelector)(e=>(t,o)=>{let r=M(e(Kt)).getPatternBySlug(o);return r?Pw(r):null}),tM=e=>(t,o)=>[...Ev(e)(t),...cu(e)(t,o)],bj=new WeakMap;function Wge(e){let t=bj.get(e);return t||(t={...e,get blocks(){return Pw(e).blocks}},bj.set(e,t)),t}var $ge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o=null,r=yj)=>{let{getAllPatterns:n}=M(e(Kt)),i=n(),{allowedBlockTypes:s}=su(t);return i.filter(({inserter:d=!0})=>!!d).map(Wge).filter(d=>Bv(Nf(d),s)).filter(d=>Nf(d).every(({blockName:f})=>r[uu]!==!1?Df(t,f,o):XN(t,f,o)))},tM(e))),Kge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o)return fr;let n=e(Kt).__experimentalGetAllowedPatterns(r),i=Array.isArray(o)?o:[o],s=n.filter(a=>a?.blockTypes?.some?.(c=>i.includes(c)));return s.length===0?fr:s},(t,o,r)=>tM(e)(t,r))),Yge=(0,Ee.createRegistrySelector)(e=>((0,jn.default)('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(Kt).getPatternsByBlockTypes)),qge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o,r=null)=>{if(!o||o.some(({clientId:i,innerBlocks:s})=>s.length||Ow(t,i)))return fr;let n=Array.from(new Set(o.map(({name:i})=>i)));return e(Kt).getPatternsByBlockTypes(n,r)},(t,o,r)=>tM(e)(t,r)));function oM(e,t){return e.blockListSettings[t]}function su(e){return e.settings}function Zge(e){return e.blocks.isPersistentChange}var Xge=(0,Ee.createSelector)((e,t=[])=>t.reduce((o,r)=>e.blockListSettings[r]?{...o,[r]:e.blockListSettings[r]}:o,{}),e=>[e.blockListSettings]),Qge=(0,Ee.createRegistrySelector)(e=>(0,Ee.createSelector)((t,o)=>{(0,jn.default)("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});let r=M(e(Kt)).getReusableBlocks().find(n=>n.id===o);return r?r.title?.raw:null},()=>[M(e(Kt)).getReusableBlocks()]));function Jge(e){return e.blocks.isIgnoredChange}function ebe(e){return e.lastBlockAttributesChange}function tbe(){return(0,jn.default)('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function obe(e){return!!e.automaticChangeStatus}function rbe(e,t){return e.highlightedBlock===t}function Ow(e,t){return!!e.blocks.controlledInnerBlocks[t]}var nbe=(0,Ee.createSelector)((e,t)=>{if(!t.length)return null;let o=Yp(e);if(t.includes(dt(e,o)))return o;let r=du(e),n=KN(e,o||r[0],t);return n?n[n.length-1]:null},(e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]);function ibe(e,t,o){let{lastBlockInserted:r}=e;return r.clientIds?.includes(t)&&r.source===o}function sbe(e,t){return e.blockVisibility?.[t]??!0}function abe(){(0,jn.default)("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}var lbe=(0,Ee.createSelector)(e=>{let t=new Set(Object.keys(e.blockVisibility).filter(o=>e.blockVisibility[o]));return t.size===0?Yhe:t},e=>[e.blockVisibility]);function Dj(e,t){if(Ii(e,t)!=="default")return!1;if(!Lj(e,t))return!0;if(HN(e)){let n=Mf(e);if(n){if(wr(e,n)?.includes(t))return!0}else if(t&&!Po(e,t))return!0}return((0,Oe.hasBlockSupport)(dt(e,t),"__experimentalDisableBlockOverlay",!1)?!1:Ow(e,t))&&!Tj(e,t)&&!Ij(e,t,!0)}function cbe(e,t){let o=e.blocks.parents.get(t);for(;o;){if(Dj(e,o))return!0;o=e.blocks.parents.get(o)}return!1}function Ii(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 ube=(0,Ee.createRegistrySelector)(e=>(t,o="")=>{let r=o||Yp(t);if(!r||lu(t,r))return!1;let{getGroupingBlockName:n}=e(Oe.store),i=xl(t,r),s=n();return i&&(i.name===s||(0,Oe.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&QN(t,r)}),dbe=(0,Ee.createRegistrySelector)(e=>(t,o=fr)=>{let{getGroupingBlockName:r}=e(Oe.store),n=r(),i=o?.length?o:qp(t),s=i?.length?Po(t,i[0]):void 0;return Df(t,n,s)&&i.length&&Oj(t,i)}),fbe=(e,t)=>((0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),zN(e,t));function mbe(e){return(0,jn.default)("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),jN(e)}var Aw={};Ip(Aw,{__experimentalUpdateSettings:()=>nM,clearBlockRemovalPrompt:()=>vbe,clearRequestedInspectorTab:()=>Dbe,closeListViewContentPanel:()=>Abe,deleteStyleOverride:()=>_be,editContentOnlySection:()=>sM,ensureDefaultBlock:()=>Hj,expandBlock:()=>Bbe,hideBlockInterface:()=>gbe,hideViewportModal:()=>Nbe,openListViewContentPanel:()=>Obe,privateRemoveBlocks:()=>iM,requestInspectorTab:()=>Mbe,resetZoomLevel:()=>Pbe,setBlockRemovalRules:()=>ybe,setInsertionPoint:()=>Ebe,setLastFocus:()=>xbe,setStyleOverride:()=>Sbe,setZoomLevel:()=>Ibe,showBlockInterface:()=>bbe,showViewportModal:()=>Lbe,startDragging:()=>wbe,stopDragging:()=>Cbe,stopEditingContentOnlySection:()=>Tbe,toggleBlockSpotlight:()=>Rbe});var Fj=l(R(),1),zj=l(Re(),1),jj=l(Xo(),1),Uj=l(N(),1),pbe=e=>Array.isArray(e)?e:[e],hbe=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function nM(e,{stripExperimentalSettings:t=!1,reset:o=!1}={}){let r=e;Object.hasOwn(r,"__unstableIsPreviewMode")&&((0,zj.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&&Fj.Platform.OS==="web"){n={};for(let i in r)hbe.includes(i)||(n[i]=r[i])}return{type:"UPDATE_SETTINGS",settings:n,reset:o}}function gbe(){return{type:"HIDE_BLOCK_INTERFACE"}}function bbe(){return{type:"SHOW_BLOCK_INTERFACE"}}var iM=(e,t=!0,o=!1)=>({select:r,dispatch:n,registry:i})=>{if(!e||!e.length||(e=pbe(e),!r.canRemoveBlocks(e)))return;let a=!o&&r.getBlockRemovalRules();if(a){let u=function(h){let p=[],g=[...h];for(;g.length;){let{innerBlocks:b,...v}=g.shift();g.push(...b),p.push(v)}return p};var c=u;let d=e.map(r.getBlock),f=u(d),m;for(let h of a)if(m=h.callback(f),m){n(kbe(e,t,m));return}}t&&n.selectPreviousBlock(e[0],t),i.batch(()=>{n({type:"REMOVE_BLOCKS",clientIds:e}),n(Hj())})},Hj=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;let{__unstableHasCustomAppender:r}=e.getSettings();r||t.insertDefaultBlock()};function kbe(e,t,o){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:o}}function vbe(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function ybe(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Sbe(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function _be(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function xbe(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function wbe(){return{type:"START_DRAGGING"}}function Cbe(){return{type:"STOP_DRAGGING"}}function Bbe(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function Ebe(e){return{type:"SET_INSERTION_POINT",value:e}}function sM(e){return{type:"EDIT_CONTENT_ONLY_SECTION",clientId:e}}function Tbe(){return{type:"EDIT_CONTENT_ONLY_SECTION"}}var Ibe=(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,jj.speak)((0,Uj.__)("You are currently in zoom-out mode."))}}o({type:"SET_ZOOM_LEVEL",zoom:e})};function Pbe(){return{type:"RESET_ZOOM_LEVEL"}}function Rbe(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}function Obe(){return{type:"OPEN_LIST_VIEW_CONTENT_PANEL"}}function Abe(){return{type:"CLOSE_LIST_VIEW_CONTENT_PANEL"}}function Lbe(e){return{type:"SHOW_VIEWPORT_MODAL",clientIds:e}}function Nbe(){return{type:"HIDE_VIEWPORT_MODAL"}}function Mbe(e,t={}){return{type:"REQUEST_INSPECTOR_TAB",tabName:e,options:t}}function Dbe(){return{type:"CLEAR_REQUESTED_INSPECTOR_TAB"}}var cM={};Ip(cM,{__unstableDeleteSelection:()=>ake,__unstableExpandSelection:()=>cke,__unstableIncrementListViewExpandRevision:()=>Hke,__unstableMarkAutomaticChange:()=>Eke,__unstableMarkLastChangeAsPersistent:()=>Cke,__unstableMarkNextChangeAsNotPersistent:()=>Bke,__unstableSaveReusableBlock:()=>wke,__unstableSetAllListViewPanelsOpen:()=>jke,__unstableSetEditorMode:()=>Tke,__unstableSetOpenListViewPanel:()=>zke,__unstableSetTemporarilyEditingAsBlocks:()=>Mke,__unstableSplitSelection:()=>lke,__unstableToggleListViewPanel:()=>Uke,clearSelectedBlock:()=>Zbe,duplicateBlocks:()=>Pke,enterFormattedText:()=>kke,exitFormattedText:()=>vke,flashBlock:()=>Ake,hideInsertionPoint:()=>nke,hoverBlock:()=>Gbe,insertAfterBlock:()=>Oke,insertBeforeBlock:()=>Rke,insertBlock:()=>oke,insertBlocks:()=>Jj,insertDefaultBlock:()=>Ske,mergeBlocks:()=>uke,moveBlockToPosition:()=>tke,moveBlocksDown:()=>Jbe,moveBlocksToPosition:()=>Qj,moveBlocksUp:()=>eke,multiSelect:()=>qbe,receiveBlocks:()=>zbe,registerInserterMediaCategory:()=>Dke,removeBlock:()=>dke,removeBlocks:()=>eU,replaceBlock:()=>Qbe,replaceBlocks:()=>Zj,replaceInnerBlocks:()=>fke,resetBlocks:()=>Vbe,resetSelection:()=>Fbe,selectBlock:()=>Hbe,selectNextBlock:()=>$be,selectPreviousBlock:()=>Wbe,selectionChange:()=>yke,setBlockEditingMode:()=>Vke,setBlockMovingClientId:()=>Ike,setBlockVisibility:()=>Nke,setHasControlledInnerBlocks:()=>Lke,setTemplateValidity:()=>ike,showInsertionPoint:()=>rke,startDraggingBlocks:()=>gke,startMultiSelect:()=>Kbe,startTyping:()=>pke,stopDraggingBlocks:()=>bke,stopMultiSelect:()=>Ybe,stopTyping:()=>hke,synchronizeTemplate:()=>ske,toggleBlockHighlight:()=>lM,toggleBlockMode:()=>mke,toggleSelection:()=>Xbe,unsetBlockEditingMode:()=>Fke,updateBlock:()=>Ube,updateBlockAttributes:()=>jbe,updateBlockListSettings:()=>_ke,updateSettings:()=>xke,validateBlocksToTemplate:()=>qj});var be=l($(),1),Lw=l(Xo(),1),fu=l(N(),1),Kj=l(Un(),1),ft=l(dr(),1),mu=l(Re(),1),Yj=l(Zp(),1);var $j=l(dr(),1),wl="\x86";function Lv(e){if(e)return Object.keys(e).find(t=>{let o=e[t];return(typeof o=="string"||o instanceof $j.RichTextData)&&o.toString().indexOf(wl)!==-1})}function aM(e){for(let[t,o]of Object.entries(e.attributes))if(o.source==="rich-text"||o.source==="html")return t}var Xp=e=>Array.isArray(e)?e:[e],Vbe=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(qj(e))},qj=e=>({select:t,dispatch:o})=>{let r=t.getTemplate(),n=t.getTemplateLock(),i=!r||n!=="all"||(0,be.doBlocksMatchTemplate)(e,r),s=t.isValidTemplate();if(i!==s)return o.setTemplateValidity(i),i};function Fbe(e,t,o){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:o}}function zbe(e){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function jbe(e,t,o={uniqueByBlock:!1}){return typeof o=="boolean"&&(o={uniqueByBlock:o}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Xp(e),attributes:t,options:o}}function Ube(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Hbe(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Gbe(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}var Wbe=(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)}}},$be=e=>({select:t,dispatch:o})=>{let r=t.getNextBlockClientId(e);r&&o.selectBlock(r)};function Kbe(){return{type:"START_MULTI_SELECT"}}function Ybe(){return{type:"STOP_MULTI_SELECT"}}var qbe=(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,Lw.speak)((0,fu.sprintf)((0,fu._n)("%s block selected.","%s blocks selected.",a),a),"assertive")};function Zbe(){return{type:"CLEAR_SELECTED_BLOCK"}}function Xbe(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}var Zj=(e,t,o,r=0,n)=>({select:i,dispatch:s,registry:a})=>{e=Xp(e),t=Xp(t);let c=i.getBlockRootClientId(e[0]);for(let u=0;u<t.length;u++){let d=t[u];if(!i.canInsertBlockType(d.name,c))return}a.batch(()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:o,initialPosition:r,meta:n}),s.ensureDefaultBlock()})};function Qbe(e,t){return Zj(e,t)}var Xj=e=>(t,o)=>({select:r,dispatch:n})=>{r.canMoveBlocks(t)&&n({type:e,clientIds:Xp(t),rootClientId:o})},Jbe=Xj("MOVE_BLOCKS_DOWN"),eke=Xj("MOVE_BLOCKS_UP"),Qj=(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 tke(e,t="",o="",r){return Qj([e],t,o,r)}function oke(e,t,o,r,n,i){return Jj([e],t,o,r,n,i)}var Jj=(e,t,o,r=!0,n=0,i)=>({select:s,dispatch:a})=>{n!==null&&typeof n=="object"&&(i=n,n=0,(0,mu.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=Xp(e);let c=[];for(let u of e)s.canInsertBlockType(u.name,o)&&c.push(u);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:o,time:Date.now(),updateSelection:r,initialPosition:r?n:null,meta:i})};function rke(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 nke=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function ike(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}var ske=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});let o=e.getBlocks(),r=e.getTemplate(),n=(0,be.synchronizeBlocksWithTemplate)(o,r);t.resetBlocks(n)},ake=e=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd();if(n.clientId===i.clientId)return;if(!n.attributeKey||!i.attributeKey||typeof n.offset>"u"||typeof i.offset>"u")return!1;let s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=e?m:f,p=o.getBlock(h.clientId),g=(0,be.getBlockType)(p.name);if(!g.merge)return;let b=f,v=m,k=o.getBlock(b.clientId),y=o.getBlock(v.clientId),S=k.attributes[b.attributeKey],x=y.attributes[v.attributeKey],C=(0,ft.create)({html:S}),B=(0,ft.create)({html:x});C=(0,ft.remove)(C,b.offset,C.text.length),B=(0,ft.insert)(B,wl,0,v.offset);let I=(0,be.cloneBlock)(k,{[b.attributeKey]:(0,ft.toHTMLString)({value:C})}),P=(0,be.cloneBlock)(y,{[v.attributeKey]:(0,ft.toHTMLString)({value:B})}),E=e?I:P,L=k.name===y.name?[E]:(0,be.switchToBlockType)(E,g.name);if(!L||!L.length)return;let T;if(e){let se=L.pop();T=g.merge(se.attributes,P.attributes)}else{let se=L.shift();T=g.merge(I.attributes,se.attributes)}let O=Lv(T),D=T[O],U=(0,ft.create)({html:D}),G=U.text.indexOf(wl),j=(0,ft.remove)(U,G,G+1),z=(0,ft.toHTMLString)({value:j});T[O]=z;let W=o.getSelectedBlockClientIds(),ee=[...e?L:[],{...p,attributes:{...p.attributes,...T}},...e?[]:L];t.batch(()=>{r.selectionChange(p.clientId,O,G,G),r.replaceBlocks(W,ee,0,o.getSelectedBlocksInitialCaretPosition())})},lke=(e=[])=>({registry:t,select:o,dispatch:r})=>{let n=o.getSelectionStart(),i=o.getSelectionEnd(),s=o.getBlockRootClientId(n.clientId),a=o.getBlockRootClientId(i.clientId);if(s!==a)return;let c=o.getBlockOrder(s),u=c.indexOf(n.clientId),d=c.indexOf(i.clientId),f,m;u>d?(f=i,m=n):(f=n,m=i);let h=f,p=m,g=o.getBlock(h.clientId),b=o.getBlock(p.clientId),v=(0,be.getBlockType)(g.name),k=(0,be.getBlockType)(b.name),y=typeof h.attributeKey=="string"?h.attributeKey:aM(v),S=typeof p.attributeKey=="string"?p.attributeKey:aM(k),x=o.getBlockAttributes(h.clientId);if(x?.metadata?.bindings?.[y]){if(e.length){let{createWarningNotice:ie}=t.dispatch(Kj.store);ie((0,fu.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"});return}r.insertAfterBlock(h.clientId);return}if(!y||!S||typeof n.offset>"u"||typeof i.offset>"u")return;if(h.clientId===p.clientId&&y===S&&h.offset===p.offset){if(e.length){if((0,be.isUnmodifiedDefaultBlock)(g,"content")){r.replaceBlocks([h.clientId],e,e.length-1,-1);return}}else if(!o.getBlockOrder(h.clientId).length){let ie=function(){let Q=(0,be.getDefaultBlockName)();return o.canInsertBlockType(Q,s)?(0,be.createBlock)(Q):(0,be.createBlock)(o.getBlockName(h.clientId))};var B=ie;let re=x[y].length;if(h.offset===0&&re){r.insertBlocks([ie()],o.getBlockIndex(h.clientId),s,!1);return}if(h.offset===re){r.insertBlocks([ie()],o.getBlockIndex(h.clientId)+1,s);return}}}let I=g.attributes[y],P=b.attributes[S],E=(0,ft.create)({html:I}),L=(0,ft.create)({html:P});E=(0,ft.remove)(E,h.offset,E.text.length),L=(0,ft.remove)(L,0,p.offset);let T={...g,innerBlocks:g.clientId===b.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[y]:(0,ft.toHTMLString)({value:E})}},O={...b,clientId:g.clientId===b.clientId?(0,be.createBlock)(b.name).clientId:b.clientId,attributes:{...b.attributes,[S]:(0,ft.toHTMLString)({value:L})}},D=(0,be.getDefaultBlockName)();if(g.clientId===b.clientId&&D&&O.name!==D&&o.canInsertBlockType(D,s)){let ie=(0,be.switchToBlockType)(O,D);ie?.length===1&&(O=ie[0])}if(!e.length){r.replaceBlocks(o.getSelectedBlockClientIds(),[T,O]);return}let U,G=[],j=[...e],z=j.shift(),W=(0,be.getBlockType)(T.name),ee=W.merge&&z.name===W.name?[z]:(0,be.switchToBlockType)(z,W.name);if(ee?.length){let ie=ee.shift();T={...T,attributes:{...T.attributes,...W.merge(T.attributes,ie.attributes)}},G.push(T),U={clientId:T.clientId,attributeKey:y,offset:(0,ft.create)({html:T.attributes[y]}).text.length},j.unshift(...ee)}else(0,be.isUnmodifiedBlock)(T)||G.push(T),G.push(z);let se=j.pop(),ce=(0,be.getBlockType)(O.name);if(j.length&&G.push(...j),se){let ie=ce.merge&&ce.name===se.name?[se]:(0,be.switchToBlockType)(se,ce.name);if(ie?.length){let re=ie.pop();G.push({...O,attributes:{...O.attributes,...ce.merge(re.attributes,O.attributes)}}),G.push(...ie),U={clientId:O.clientId,attributeKey:S,offset:(0,ft.create)({html:re.attributes[S]}).text.length}}else G.push(se),(0,be.isUnmodifiedBlock)(O)||G.push(O)}else(0,be.isUnmodifiedBlock)(O)||G.push(O);t.batch(()=>{r.replaceBlocks(o.getSelectedBlockClientIds(),G,G.length-1,0),U&&r.selectionChange(U.clientId,U.attributeKey,U.offset,U.offset)})},cke=()=>({select:e,dispatch:t})=>{let o=e.getSelectionStart(),r=e.getSelectionEnd();t.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},uke=(e,t)=>({registry:o,select:r,dispatch:n})=>{let i=e,s=t,a=r.getBlock(i),c=(0,be.getBlockType)(a.name);if(!c||r.getBlockEditingMode(i)==="disabled"||r.getBlockEditingMode(s)==="disabled")return;let u=r.getBlock(s);if(!c.merge&&(0,be.getBlockSupport)(a.name,"__experimentalOnMerge")){let x=(0,be.switchToBlockType)(u,c.name);if(x?.length!==1){n.selectBlock(a.clientId);return}let[C]=x;if(C.innerBlocks.length<1){n.selectBlock(a.clientId);return}o.batch(()=>{n.insertBlocks(C.innerBlocks,void 0,i),n.removeBlock(s),n.selectBlock(C.innerBlocks[0].clientId);let B=r.getNextBlockClientId(i);if(B&&r.getBlockName(i)===r.getBlockName(B)){let I=r.getBlockAttributes(i),P=r.getBlockAttributes(B);Object.keys(I).every(E=>I[E]===P[E])&&(n.moveBlocksToPosition(r.getBlockOrder(B),B,i),n.removeBlock(B,!1))}});return}if((0,be.isUnmodifiedDefaultBlock)(a)){n.removeBlock(i,r.isBlockSelected(i));return}if((0,be.isUnmodifiedDefaultBlock)(u)){n.removeBlock(s,r.isBlockSelected(s));return}if(!c.merge){(0,be.isUnmodifiedBlock)(u,"content")?n.removeBlock(s,r.isBlockSelected(s)):n.selectBlock(a.clientId);return}let d=(0,be.getBlockType)(u.name),{clientId:f,attributeKey:m,offset:h}=r.getSelectionStart(),g=(f===i?c:d).attributes[m],b=(f===i||f===s)&&m!==void 0&&h!==void 0&&!!g;g||(typeof m=="number"?window.console.error(`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${typeof m}`):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));let v=(0,be.cloneBlock)(a),k=(0,be.cloneBlock)(u);if(b){let x=f===i?v:k,C=x.attributes[m],B=(0,ft.insert)((0,ft.create)({html:C}),wl,h,h);x.attributes[m]=(0,ft.toHTMLString)({value:B})}let y=a.name===u.name?[k]:(0,be.switchToBlockType)(k,a.name);if(!y||!y.length)return;let S=c.merge(v.attributes,y[0].attributes);if(b){let x=Lv(S),C=S[x],B=(0,ft.create)({html:C}),I=B.text.indexOf(wl),P=(0,ft.remove)(B,I,I+1),E=(0,ft.toHTMLString)({value:P});S[x]=E,n.selectionChange(a.clientId,x,I,I)}n.replaceBlocks([a.clientId,u.clientId],[{...a,attributes:{...a.attributes,...S}},...y.slice(1)],0)},eU=(e,t=!0)=>iM(e,t);function dke(e,t){return eU([e],t)}function fke(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 mke(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function pke(){return{type:"START_TYPING"}}function hke(){return{type:"STOP_TYPING"}}function gke(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function bke(){return{type:"STOP_DRAGGING_BLOCKS"}}function kke(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function vke(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function yke(e,t,o,r){return typeof e=="string"?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:o,endOffset:r}:{type:"SELECTION_CHANGE",...e}}var Ske=(e,t,o)=>({dispatch:r})=>{let n=(0,be.getDefaultBlockName)();if(!n)return;let i=(0,be.createBlock)(n,e);return r.insertBlock(i,o,t)};function _ke(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function xke(e){return nM(e,{stripExperimentalSettings:!0})}function wke(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Cke(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Bke(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}var Eke=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});let{requestIdleCallback:t=o=>setTimeout(o,100)}=window;t(()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})})},Tke=e=>({registry:t})=>{t.dispatch(Yj.store).set("core","editorTool",e),e==="navigation"?(0,Lw.speak)((0,fu.__)("You are currently in Write mode.")):e==="edit"&&(0,Lw.speak)((0,fu.__)("You are currently in Design mode."))};function Ike(){return(0,mu.default)('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}var Pke=(e,t=!0)=>({select:o,dispatch:r})=>{if(!e||!e.length)return;let n=o.getBlocksByClientId(e);if(n.some(d=>!d)||n.map(d=>d.name).some(d=>!(0,be.hasBlockSupport)(d,"multiple",!0)))return;let s=o.getBlockRootClientId(e[0]),a=Xp(e),c=o.getBlockIndex(a[a.length-1]),u=n.map(d=>(0,be.__experimentalCloneSanitizedBlock)(d));return r.insertBlocks(u,c+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map(d=>d.clientId)},Rke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,be.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n,r)},Oke=e=>({select:t,dispatch:o})=>{if(!e)return;let r=t.getBlockRootClientId(e),n=t.getBlockIndex(e),i=r?t.getDirectInsertBlock(r):null;if(!i)return o.insertDefaultBlock({},r,n+1);let s={};if(i.attributesToCopy){let c=t.getBlockAttributes(e);i.attributesToCopy.forEach(u=>{c[u]&&(s[u]=c[u])})}let a=(0,be.createBlock)(i.name,{...i.attributes,...s});return o.insertBlock(a,n+1,r)};function lM(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}var Ake=(e,t=150)=>async({dispatch:o})=>{o(lM(e,!0)),await new Promise(r=>setTimeout(r,t)),o(lM(e,!1))};function Lke(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Nke(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Mke(e){return(0,mu.default)("wp.data.dispatch( 'core/block-editor' ).__unstableSetTemporarilyEditingAsBlocks",{since:"7.0"}),sM(e)}var Dke=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 Vke(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Fke(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}function zke(e){return{type:"SET_OPEN_LIST_VIEW_PANEL",clientId:e}}function jke(){return{type:"SET_ALL_LIST_VIEW_PANELS_OPEN"}}function Uke(e,t){return{type:"TOGGLE_LIST_VIEW_PANEL",clientId:e,isOpen:t}}function Hke(){return{type:"INCREMENT_LIST_VIEW_EXPAND_REVISION"}}var Qp={reducer:Q6,selectors:rM,actions:cM},_=(0,Nw.createReduxStore)(Kt,{...Qp,persist:["preferences"]}),tU=(0,Nw.registerStore)(Kt,{...Qp,persist:["preferences"]});M(tU).registerPrivateActions(Aw);M(tU).registerPrivateSelectors(Tw);M(_).registerPrivateActions(Aw);M(_).registerPrivateSelectors(Tw);var Jp=l(A(),1),oU=l(N(),1);var Ss=l(w(),1);function Gke({className:e,actions:t,children:o,secondaryActions:r}){return(0,Ss.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,Ss.jsx)("div",{className:V(e,"block-editor-warning"),children:(0,Ss.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,Ss.jsx)("p",{className:"block-editor-warning__message",children:o}),(t?.length>0||r)&&(0,Ss.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map((n,i)=>(0,Ss.jsx)("span",{className:"block-editor-warning__action",children:n},i)),r&&(0,Ss.jsx)(Jp.DropdownMenu,{className:"block-editor-warning__secondary",icon:ks,label:(0,oU.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,Ss.jsx)(Jp.MenuGroup,{children:r.map((n,i)=>(0,Ss.jsx)(Jp.MenuItem,{onClick:n.onClick,children:n.title},i))})})]})]})})})}var pu=Gke;var eh=l(w(),1);function iU({originalBlockClientId:e,name:t,onReplace:o}){let{selectBlock:r}=(0,nU.useDispatch)(_),n=(0,rU.getBlockType)(t);return(0,eh.jsxs)(pu,{actions:[(0,eh.jsx)(uM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(e),children:(0,Mw.__)("Find original")},"find-original"),(0,eh.jsx)(uM.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o([]),children:(0,Mw.__)("Remove")},"remove")],children:[(0,eh.jsxs)("strong",{children:[n?.title,": "]}),(0,Mw.__)("This block can only be used once.")]})}var Nv=l(w(),1);function Fw({mayDisplayControls:e,mayDisplayParentControls:t,mayDisplayPatternEditingControls:o,blockEditingMode:r,isPreviewMode:n,...i}){let{name:s,isSelected:a,clientId:c,attributes:u={},__unstableLayoutClassNames:d}=i,{layout:f=null,metadata:m={}}=u,{bindings:h}=m,p=(0,Dw.hasBlockSupport)(s,"layout",!1)||(0,Dw.hasBlockSupport)(s,"__experimentalLayout",!1),b=!!Ie()[Hk]||(0,Dw.hasBlockSupport)(s,"listView")||s==="core/navigation",{originalBlockClientId:v}=(0,Vw.useContext)(ur);return(0,Nv.jsxs)(f0,{value:(0,Vw.useMemo)(()=>({name:s,isSelected:a,clientId:c,layout:p?f:null,__unstableLayoutClassNames:d,[bs]:e,[Pp]:t,[$c]:o&&r!=="disabled",[u0]:r,[Rp]:h,[d0]:n,[Hk]:b}),[s,a,c,p,f,d,e,t,o,r,h,n,b]),children:[(0,Nv.jsx)(z6,{...i}),v&&(0,Nv.jsx)(iU,{originalBlockClientId:v,name:s,onReplace:i.onReplace})]})}function me(...e){let{clientId:t=null}=Ie();return(0,sU.useSelect)(o=>M(o(_)).getBlockSettings(t,...e),[t,...e])}function lU(e){(0,aU.default)("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});let[t]=me(e);return t}var jw=l(w(),1),{kebabCase:Wke}=M(uU.privateApis),cU=([e,...t])=>e.toUpperCase()+t.join(""),$ke=e=>(0,zf.createHigherOrderComponent)(t=>function(r){return(0,jw.jsx)(t,{...r,colors:e})},"withCustomColorPalette"),Kke=()=>(0,zf.createHigherOrderComponent)(e=>function(o){let[r,n,i]=me("color.palette.custom","color.palette.theme","color.palette.default"),s=(0,zw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]);return(0,jw.jsx)(e,{...o,colors:s})},"withEditorColorPalette");function dU(e,t){let o=e.reduce((r,n)=>({...r,...typeof n=="string"?{[n]:Wke(n)}:n}),{});return(0,zf.compose)([t,r=>class extends zw.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 P6(s,i)}createSetters(){return Object.keys(o).reduce((i,s)=>{let a=cU(s),c=`custom${a}`;return i[`set${a}`]=this.createSetColor(s,c),i},{})}createSetColor(i,s){return a=>{let c=p0(this.props.colors,a);this.props.setAttributes({[i]:c&&c.slug?c.slug:void 0,[s]:c&&c.slug?void 0:a})}}static getDerivedStateFromProps({attributes:i,colors:s},a){return Object.entries(o).reduce((c,[u,d])=>{let f=da(s,i[u],i[`custom${cU(u)}`]),m=a[u];return m?.color===f.color&&m?c[u]=m:c[u]={...f,class:_i(d,f.slug)},c},{})}render(){return(0,jw.jsx)(r,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function fU(e){return(...t)=>{let o=$ke(e);return(0,zf.createHigherOrderComponent)(dU(t,o),"withCustomColors")}}function mU(...e){let t=Kke();return(0,zf.createHigherOrderComponent)(dU(e,t),"withColors")}var Uw=l(R(),1),Hw=l(F(),1);function th(e){if(e)return`has-${e}-gradient-background`}function Gw(e,t){let o=e?.find(r=>r.slug===t);return o&&o.gradient}function pU(e,t){return e?.find(r=>r.gradient===t)}function hU(e,t){let o=pU(e,t);return o&&o.slug}function Yke({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){let{clientId:o}=Ie(),[r,n,i]=me("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,Uw.useMemo)(()=>[...r||[],...n||[],...i||[]],[r,n,i]),{gradient:a,customGradient:c}=(0,Hw.useSelect)(h=>{let{getBlockAttributes:p}=h(_),g=p(o)||{};return{customGradient:g[t],gradient:g[e]}},[o,e,t]),{updateBlockAttributes:u}=(0,Hw.useDispatch)(_),d=(0,Uw.useCallback)(h=>{let p=hU(s,h);if(p){u(o,{[e]:p,[t]:void 0});return}u(o,{[e]:void 0,[t]:h})},[s,o,u]),f=th(a),m;return a?m=Gw(s,a):m=c,{gradientClass:f,gradientValue:m,setGradient:d}}var gU=l(A(),1);var{kebabCase:qke}=M(gU.privateApis),oh=(e,t,o)=>{if(t){let r=e?.find(({slug:n})=>n===t);if(r)return r}return{size:o}};function dM(e,t){let o=e?.find(({size:r})=>r===t);return o||{size:t}}function hu(e){if(e)return`has-${qke(e)}-font-size`}var Zke="1600px",Xke="320px",Qke=1,Jke=.25,eve=.75,tve="14px";function bU({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=Xke,maximumViewportWidth:n=Zke,scaleFactor:i=Qke,minimumFontSizeLimit:s}){if(s=gu(s)?s:tve,o){let y=gu(o);if(!y?.unit)return null;let S=gu(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),Jke),eve),B=Mv(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=gu(e),c=a?.unit||"rem",u=gu(t,{coerceTo:c});if(!a||!u)return null;let d=gu(e,{coerceTo:"rem"}),f=gu(n,{coerceTo:c}),m=gu(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=Mv(m.value/100,3),g=Mv(p,3)+c,b=100*((u.value-a.value)/h),v=Mv((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function gu(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),{value:Mv(d,3),unit:u}}function Mv(e,t=3){let o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}var kU=l(A(),1);var vU=l(w(),1);function ove(e){let[t,o]=me("typography.fontSizes","typography.customFontSize");return(0,vU.jsx)(kU.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!o,__next40pxDefaultSize:!0})}var fM=ove;var Dv=l(Z(),1),SU=l(R(),1);var mM=l(w(),1),rve=[],yU=([e,...t])=>e.toUpperCase()+t.join(""),_U=(...e)=>{let t=e.reduce((o,r)=>(o[r]=`custom${yU(r)}`,o),{});return(0,Dv.createHigherOrderComponent)((0,Dv.compose)([(0,Dv.createHigherOrderComponent)(o=>function(n){let[i]=me("typography.fontSizes");return(0,mM.jsx)(o,{...n,fontSizes:i||rve})},"withFontSizes"),o=>class extends SU.Component{constructor(n){super(n),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce((n,[i,s])=>{let a=yU(i);return n[`set${a}`]=this.createSetFontSize(i,s),n},{})}createSetFontSize(n,i){return s=>{let a=this.props.fontSizes?.find(({size:c})=>c===Number(s));this.props.setAttributes({[n]:a&&a.slug?a.slug:void 0,[i]:a&&a.slug?void 0:s})}}static getDerivedStateFromProps({attributes:n,fontSizes:i},s){let a=(u,d)=>s[d]?n[d]?n[d]!==s[d].slug:s[d].size!==n[u]:!0;if(!Object.values(t).some(a))return null;let c=Object.entries(t).filter(([u,d])=>a(d,u)).reduce((u,[d,f])=>{let m=n[d],h=oh(i,m,n[f]);return u[d]={...h,class:hu(m)},u},{});return{...s,...c}}render(){return(0,mM.jsx)(o,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")};var bu=l(N(),1),Ww=l(A(),1);var xU=l(w(),1),nve=[{icon:Jc,title:(0,bu.__)("Align text left"),align:"left"},{icon:Sf,title:(0,bu.__)("Align text center"),align:"center"},{icon:eu,title:(0,bu.__)("Align text right"),align:"right"}],ive={placement:"bottom-start"};function sve({value:e,onChange:t,alignmentControls:o=nve,label:r=(0,bu.__)("Align text"),description:n=(0,bu.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function a(m){return()=>t(e===m?void 0:m)}let c=o.find(m=>m.align===e);function u(){return c?c.icon:(0,bu.isRTL)()?eu:Jc}let d=s?Ww.ToolbarGroup:Ww.ToolbarDropdownMenu,f=s?{isCollapsed:i}:{toggleProps:{description:n},popoverProps:ive};return(0,xU.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 pM=sve;var hM=l(w(),1),$w=e=>(0,hM.jsx)(pM,{...e,isToolbar:!1}),wU=e=>(0,hM.jsx)(pM,{...e,isToolbar:!0});var Jw=l(ut(),1),eC=l(A(),1),$U=l(R(),1),tC=l($(),1);var DU=l(F(),1),vu=l($(),1),yM=l(R(),1);var AU=l(TU(),1);var gM=function(e,t){return gM=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])},gM(e,t)};function IU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");gM(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}var Fo=function(){return Fo=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},Fo.apply(this,arguments)};function PU(e){return e.toLowerCase()}var dve=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],fve=/[^A-Z0-9]+/gi;function OU(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?dve:o,n=t.stripRegexp,i=n===void 0?fve:n,s=t.transform,a=s===void 0?PU:s,c=t.delimiter,u=c===void 0?" ":c,d=RU(RU(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 RU(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}var mve=e=>e.name||"",pve=e=>e.title,hve=e=>e.description||"",gve=e=>e.keywords||[],bve=e=>e.category,kve=()=>null,vve=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],yve=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),bM=new Map,kM=new Map;function Yw(e=""){if(bM.has(e))return bM.get(e);let t=OU(e,{splitRegexp:vve,stripRegexp:yve}).split(" ").filter(Boolean);return bM.set(e,t),t}function Vv(e=""){if(kM.has(e))return kM.get(e);let t=(0,AU.default)(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),kM.set(e,t),t}var Fv=(e="")=>Yw(Vv(e)),Sve=(e,t)=>e.filter(o=>!Fv(t).some(r=>r.includes(o))),qw=(e,t,o,r)=>Fv(r).length===0?e:zv(e,r,{getCategory:s=>t.find(({slug:a})=>a===s.category)?.title,getCollection:s=>o[s.name.split("/")[0]]?.title}),zv=(e=[],t="",o={})=>{if(Fv(t).length===0)return e;let n=e.map(i=>[i,_ve(i,t,o)]).filter(([,i])=>i>0);return n.sort(([,i],[,s])=>s-i),n.map(([i])=>i)};function _ve(e,t,o={}){let{getName:r=mve,getTitle:n=pve,getDescription:i=hve,getKeywords:s=gve,getCategory:a=bve,getCollection:c=kve}=o,u=r(e),d=n(e),f=i(e),m=s(e),h=a(e),p=c(e),g=Vv(t),b=Vv(d),v=0;if(g===b)v+=30;else if(b.startsWith(g))v+=20;else{let k=[u,d,f,...m,h,p].join(" "),y=Yw(g);Sve(y,k).length===0&&(v+=10)}if(v!==0&&u.startsWith("core/")){let k=u!==e.id;v+=k?1:2}return v}var pa=l($(),1),rh=l(F(),1),Zw=l(R(),1),LU=l(Un(),1),Xw=l(N(),1);var xve=(e,t,o)=>{let r=(0,Zw.useMemo)(()=>({[uu]:!!o}),[o]),[n]=(0,rh.useSelect)(d=>[d(_).getInserterItems(e,r)],[e,r]),{getClosestAllowedInsertionPoint:i}=M((0,rh.useSelect)(_)),{createErrorNotice:s}=(0,rh.useDispatch)(LU.store),[a,c]=(0,rh.useSelect)(d=>{let{getCategories:f,getCollections:m}=d(pa.store);return[f(),m()]},[]),u=(0,Zw.useCallback)(({name:d,initialAttributes:f,innerBlocks:m,syncStatus:h,content:p},g)=>{let b=i(d,e);if(b===null){let k=(0,pa.getBlockType)(d)?.title??d;s((0,Xw.sprintf)((0,Xw.__)(`Block "%s" can't be inserted.`),k),{type:"snackbar",id:"inserter-notice"});return}let v=h==="unsynced"?(0,pa.parse)(p,{__unstableSkipMigrationLogs:!0}):(0,pa.createBlock)(d,f,(0,pa.createBlocksFromInnerBlocksTemplate)(m));t(v,void 0,g,b)},[i,e,t,s]);return[n,a,c,u]},ku=xve;var NU=l(A(),1);var MU=l(R(),1),vM=l(w(),1);function wve({icon:e,showColors:t=!1,className:o,context:r}){e?.src==="block-default"&&(e={src:Jk});let n=(0,vM.jsx)(NU.Icon,{icon:e&&e.src?e.src:e,context:r}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,vM.jsx)("span",{style:i,className:V("block-editor-block-icon",o,{"has-colors":t}),children:n})}var Ae=(0,MU.memo)(wve);var Qw=(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 nh=l(w(),1),Cve=()=>{},Bve=9;function Eve(){return{name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){let{rootClientId:t,selectedBlockId:o,prioritizedBlocks:r}=(0,DU.useSelect)(u=>{let{getSelectedBlockClientId:d,getBlock:f,getBlockListSettings:m,getBlockRootClientId:h}=u(_),{getActiveBlockVariation:p}=u(vu.store),g=d(),{name:b,attributes:v}=f(g),k=p(b,v),y=h(g);return{selectedBlockId:k?`${b}/${k.name}`:b,rootClientId:y,prioritizedBlocks:m(y)?.prioritizedInserterBlocks}},[]),[n,i,s]=ku(t,Cve,!0),a=(0,yM.useMemo)(()=>(e.trim()?qw(n,i,s,e):Qw(ma(n,"frecency","desc"),r)).filter(d=>d.id!==o).slice(0,Bve),[e,o,n,i,s,r]);return[(0,yM.useMemo)(()=>a.map(u=>{let{title:d,icon:f,isDisabled:m}=u;return{key:`block-${u.id}`,value:u,label:(0,nh.jsxs)(nh.Fragment,{children:[(0,nh.jsx)(Ae,{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,vu.cloneBlock)(s)):(0,vu.createBlock)(t,o,(0,vu.createBlocksFromInnerBlocksTemplate)(r))}}}}var VU=Eve();var UU=l(zU(),1),HU=l(dn(),1);var GU=l(SM(),1),jf=l(w(),1),Tve=10;function Ive(){return{name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await(0,UU.default)({path:(0,HU.addQueryArgs)("/wp/v2/search",{per_page:Tve,search:e,type:"post",order_by:"menu_order"})});return t=t.filter(o=>o.title!==""),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,jf.jsxs)(jf.Fragment,{children:[(0,jf.jsx)(we,{icon:e.subtype==="page"?kl:YL},"icon"),(0,GU.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,jf.jsx)("a",{href:e.url,children:e.title})}}}var WU=Ive();var KU=l(w(),1),Pve=[];function YU({completers:e=Pve}){let{name:t}=Ie();return(0,$U.useMemo)(()=>{let o=[...e,WU];return(t===(0,tC.getDefaultBlockName)()||(0,tC.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(o=[...o,VU]),(0,Jw.hasFilter)("editor.Autocomplete.completers")&&(o===e&&(o=o.map(r=>({...r}))),o=(0,Jw.applyFilters)("editor.Autocomplete.completers",o,t)),o},[e,t])}function qU(e){return(0,eC.__unstableUseAutocompleteProps)({...e,completers:YU(e)})}function Rve(e){return(0,KU.jsx)(eC.Autocomplete,{...e,completers:YU(e)})}var ZU=Rve;var BM=l(N(),1),xu=l(A(),1);var gH=l(F(),1);var aC=l(R(),1);var Pi=l(N(),1);var mn=l(A(),1);var ih=l(N(),1);var Hn={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 Gn(e,t=""){return e.split(",").map(o=>`${o}${t?` ${t}`:""}`).join(",")}function yu(e,t=Hn,o,r){let n="";return t?.[o]?.spacingStyles?.length&&r&&t[o].spacingStyles.forEach(i=>{n+=`${Gn(e,i.selector.trim())} { `,n+=Object.entries(i.rules).map(([s,a])=>`${s}: ${a||r}`).join("; "),n+="; }"}),n}function oC(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,ih.sprintf)((0,ih.__)("Max %s wide"),t)),i.test(o)&&(n.wide=(0,ih.sprintf)((0,ih.__)("Max %s wide"),o)),n}var _s=l(N(),1);var XU=8,Su=["top","right","bottom","left"],QU={top:void 0,right:void 0,bottom:void 0,left:void 0},rC={custom:cw,axial:cw,horizontal:lN,vertical:fN,top:dN,right:uN,bottom:aN,left:cN},ha={default:(0,_s.__)("Spacing control"),top:(0,_s.__)("Top"),bottom:(0,_s.__)("Bottom"),left:(0,_s.__)("Left"),right:(0,_s.__)("Right"),mixed:(0,_s.__)("Mixed"),vertical:(0,_s.__)("Vertical"),horizontal:(0,_s.__)("Horizontal"),axial:(0,_s.__)("Horizontal & vertical"),custom:(0,_s.__)("Custom")},Cl={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function nC(e){return e?.includes?e==="0"||e.includes("var:preset|spacing|"):!1}function JU(e,t){if(!nC(e))return e;let o=Ove(e);return t.find(n=>String(n.slug)===o)?.size}function sh(e,t){if(!e||nC(e)||e==="0")return e;let o=t.find(r=>String(r.size)===String(e));return o?.slug?`var:preset|spacing|${o.slug}`:e}function jv(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Ove(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 _M(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 Ave(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 eH(e={},t){let{top:o,right:r,bottom:n,left:i}=e,s=[o,r,n,i].filter(Boolean),a=o===n&&i===r&&(!!o||!!i),c=!s.length&&Ave(t),u=t?.includes("horizontal")&&t?.includes("vertical")&&t?.length===2;if(_M(t)&&(a||c))return Cl.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]:Cl.custom}function Lve(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function mr(e,t="0"){let o=Lve(e);if(!o)return null;let r=jv(o?.top)||t,n=jv(o?.left)||t;return r===n?r:`${r} ${n}`}var oo=l(w(),1),Nve={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},tH={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Mve={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},oH={horizontal:"center",vertical:"top"},Dve=["wrap","nowrap"],nH={name:"flex",label:(0,Pi.__)("Flex"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowOrientation:n=!0,allowJustification:i=!0,allowWrap:s=!0}=r;return(0,oo.jsxs)(oo.Fragment,{children:[(0,oo.jsxs)(mn.Flex,{children:[i&&(0,oo.jsx)(mn.FlexItem,{children:(0,oo.jsx)(rH,{layout:t,onChange:o})}),n&&(0,oo.jsx)(mn.FlexItem,{children:(0,oo.jsx)(jve,{layout:t,onChange:o})})]}),s&&(0,oo.jsx)(zve,{layout:t,onChange:o})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowVerticalAlignment:n=!0,allowJustification:i=!0}=r;return!i&&!n?null:(0,oo.jsxs)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:[i&&(0,oo.jsx)(rH,{layout:t,onChange:o,isToolbar:!0}),n&&(0,oo.jsx)(Vve,{layout:t,onChange:o})]})},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Hn}){let{orientation:c="horizontal"}=o,u="0.5em";if(s){let k=mr(s,"0.5em").split(" ");u=k.length>1?k[1]:k[0]}let d=r?.spacing?.blockGap&&!Ue(n,"spacing","blockGap")?mr(r?.spacing?.blockGap,u):void 0,f=Nve[o.justifyContent],m=Dve.includes(o.flexWrap)?o.flexWrap:"wrap",h=Mve[o.verticalAlignment],p=tH[o.justifyContent]||tH.left,g="",b=[];return m&&m!=="wrap"&&b.push(`flex-wrap: ${m}`),c==="horizontal"?(h&&b.push(`align-items: ${h}`),f&&b.push(`justify-content: ${f}`)):(h&&b.push(`justify-content: ${h}`),b.push("flex-direction: column"),b.push(`align-items: ${p}`)),b.length&&(g=`${Gn(t)} {
				${b.join("; ")};
			}`),i&&d&&(g+=yu(t,a,"flex",d)),g},getOrientation(e){let{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function Vve({layout:e,onChange:t}){let{orientation:o="horizontal"}=e,r=o==="horizontal"?oH.horizontal:oH.vertical,{verticalAlignment:n=r}=e;return(0,oo.jsx)(iC,{onChange:s=>{t({...e,verticalAlignment:s})},value:n,controls:o==="horizontal"?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}var Fve={placement:"bottom-start"};function rH({layout:e,onChange:t,isToolbar:o=!1}){let{justifyContent:r="left",orientation:n="horizontal"}=e,i=c=>{t({...e,justifyContent:c})},s=["left","center","right"];if(n==="horizontal"?s.push("space-between"):s.push("stretch"),o)return(0,oo.jsx)(ah,{allowedControls:s,value:r,onChange:i,popoverProps:Fve});let a=[{value:"left",icon:ru,label:(0,Pi.__)("Justify items left")},{value:"center",icon:ou,label:(0,Pi.__)("Justify items center")},{value:"right",icon:nu,label:(0,Pi.__)("Justify items right")}];return n==="horizontal"?a.push({value:"space-between",icon:Fp,label:(0,Pi.__)("Space between items")}):a.push({value:"stretch",icon:zp,label:(0,Pi.__)("Stretch items")}),(0,oo.jsx)(mn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Pi.__)("Justification"),value:r,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:a.map(({value:c,icon:u,label:d})=>(0,oo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{value:c,icon:u,label:d},c))})}function zve({layout:e,onChange:t}){let{flexWrap:o="wrap"}=e;return(0,oo.jsx)(mn.ToggleControl,{label:(0,Pi.__)("Allow to wrap to multiple lines"),onChange:r=>{t({...e,flexWrap:r?"wrap":"nowrap"})},checked:o==="wrap"})}function jve({layout:e,onChange:t}){let{orientation:o="horizontal",verticalAlignment:r,justifyContent:n}=e;return(0,oo.jsxs)(mn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,Pi.__)("Orientation"),value:o,onChange:i=>{let s=r,a=n;return i==="horizontal"?(r==="space-between"&&(s="center"),n==="stretch"&&(a="left")):(r==="stretch"&&(s="top"),n==="space-between"&&(a="left")),t({...e,orientation:i,verticalAlignment:s,justifyContent:a})},children:[(0,oo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{icon:Qk,value:"horizontal",label:(0,Pi.__)("Horizontal")}),(0,oo.jsx)(mn.__experimentalToggleGroupControlOptionIcon,{icon:DO,value:"vertical",label:(0,Pi.__)("Vertical")})]})}var iH=l(N(),1);var sH={name:"default",label:(0,iH.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,style:o,blockName:r,hasBlockGapSupport:n,layoutDefinitions:i=Hn}){let s=mr(o?.spacing?.blockGap),a="";Ue(r,"spacing","blockGap")||(s?.top?a=mr(s?.top):typeof s=="string"&&(a=mr(s)));let c="";return n&&a&&(c+=yu(t,i,"default",a)),c},getOrientation(){return"vertical"},getAlignments(e,t){let o=oC(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 pn=l(A(),1),Bl=l(N(),1);var lH=l(Uv(),1);var Qo=l(w(),1),cH={name:"constrained",label:(0,Bl.__)("Constrained"),inspectorControls:function({layout:t,onChange:o,layoutBlockSupport:r={}}){let{wideSize:n,contentSize:i,justifyContent:s="center"}=t,{allowJustification:a=!0,allowCustomContentAndWideSize:c=!0}=r,u=h=>{o({...t,justifyContent:h})},d=[{value:"left",icon:ru,label:(0,Bl.__)("Justify items left")},{value:"center",icon:ou,label:(0,Bl.__)("Justify items center")},{value:"right",icon:nu,label:(0,Bl.__)("Justify items right")}],[f]=me("spacing.units"),m=(0,pn.__experimentalUseCustomUnits)({availableUnits:f||["%","px","em","rem","vw"]});return(0,Qo.jsxs)(pn.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[c&&(0,Qo.jsxs)(Qo.Fragment,{children:[(0,Qo.jsx)(pn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("Content width"),labelPosition:"top",value:i||n||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,contentSize:h!==""?h:void 0})},units:m,prefix:(0,Qo.jsx)(pn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Qo.jsx)(we,{icon:_f})})}),(0,Qo.jsx)(pn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("Wide width"),labelPosition:"top",value:n||i||"",onChange:h=>{h=0>parseFloat(h)?"0":h,o({...t,wideSize:h!==""?h:void 0})},units:m,prefix:(0,Qo.jsx)(pn.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Qo.jsx)(we,{icon:Lf})})}),(0,Qo.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,Bl.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),a&&(0,Qo.jsx)(pn.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Bl.__)("Justification"),value:s,onChange:u,children:d.map(({value:h,icon:p,label:g})=>(0,Qo.jsx)(pn.__experimentalToggleGroupControlOptionIcon,{value:h,icon:p,label:g},h))})]})},toolBarControls:function({layout:t={},onChange:o,layoutBlockSupport:r}){let{allowJustification:n=!0}=r;return n?(0,Qo.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Qo.jsx)(Hve,{layout:t,onChange:o})}):null},getLayoutStyle:function({selector:t,layout:o={},style:r,blockName:n,hasBlockGapSupport:i,layoutDefinitions:s=Hn}){let{contentSize:a,wideSize:c,justifyContent:u}=o,d=mr(r?.spacing?.blockGap),f="";Ue(n,"spacing","blockGap")||(d?.top?f=mr(d?.top):typeof d=="string"&&(f=mr(d)));let m=u==="left"?"0 !important":"auto !important",h=u==="right"?"0 !important":"auto !important",p=a||c?`
					${Gn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {
						max-width: ${a??c};
						margin-left: ${m};
						margin-right: ${h};
					}
					${Gn(t,"> .alignwide")}  {
						max-width: ${c??a};
					}
					${Gn(t,"> .alignfull")} {
						max-width: none;
					}
				`:"";return u==="left"?p+=`${Gn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-left: ${m}; }`:u==="right"&&(p+=`${Gn(t,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}
			{ margin-right: ${h}; }`),r?.spacing?.padding&&(0,lH.getCSSRules)(r).forEach(b=>{if(b.key==="paddingRight"){let v=b.value==="0"?"0px":b.value;p+=`
					${Gn(t,"> .alignfull")} {
						margin-right: calc(${v} * -1);
					}
					`}else if(b.key==="paddingLeft"){let v=b.value==="0"?"0px":b.value;p+=`
					${Gn(t,"> .alignfull")} {
						margin-left: calc(${v} * -1);
					}
					`}}),i&&f&&(p+=yu(t,s,"constrained",f)),p},getOrientation(){return"vertical"},getAlignments(e){let t=oC(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}},Uve={placement:"bottom-start"};function Hve({layout:e,onChange:t}){let{justifyContent:o="center"}=e;return(0,Qo.jsx)(ah,{allowedControls:["left","center","right"],value:o,onChange:i=>{t({...e,justifyContent:i})},popoverProps:Uve})}var Fr=l(N(),1),nt=l(A(),1),sC=l(R(),1);var Ye=l(w(),1),Gve={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},Wve=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}],uH={name:"grid",label:(0,Fr.__)("Grid"),inspectorControls:function({layout:t={},onChange:o,layoutBlockSupport:r={}}){let{allowSizingOnChildren:n=!1}=r,i=!0,s=!t?.isManualPlacement||window.__experimentalEnableGridInteractivity;return(0,Ye.jsxs)(Ye.Fragment,{children:[window.__experimentalEnableGridInteractivity&&(0,Ye.jsx)(Yve,{layout:t,onChange:o}),(0,Ye.jsxs)(nt.__experimentalVStack,{spacing:4,children:[i&&(0,Ye.jsx)(Kve,{layout:t,onChange:o,allowSizingOnChildren:n}),s&&(0,Ye.jsx)($ve,{layout:t,onChange:o})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:t,layout:o,style:r,blockName:n,hasBlockGapSupport:i,globalBlockGapValue:s,layoutDefinitions:a=Hn}){let{minimumColumnWidth:c=null,columnCount:u=null,rowCount:d=null}=o,f="1.2rem";if(s){let b=mr(s,"0.5em").split(" ");f=b.length>1?b[1]:b[0]}let m=r?.spacing?.blockGap&&!Ue(n,"spacing","blockGap")?mr(r?.spacing?.blockGap,f):void 0,h="",p=[];if(c&&u>0){let g=m||f;(g==="0"||g===0)&&(g="0px");let b=`max(min( ${c}, 100%), ( 100% - (${g}*${u-1}) ) / ${u})`;p.push(`grid-template-columns: repeat(auto-fill, minmax(${b}, 1fr))`,"container-type: inline-size"),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)}else u?(p.push(`grid-template-columns: repeat(${u}, minmax(0, 1fr))`),d&&p.push(`grid-template-rows: repeat(${d}, minmax(1rem, auto))`)):p.push(`grid-template-columns: repeat(auto-fill, minmax(min(${c||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return p.length&&(h=`${Gn(t)} { ${p.join("; ")}; }`),i&&m&&(h+=yu(t,a,"grid",m)),h},getOrientation(){return"horizontal"},getAlignments(){return[]}};function $ve({layout:e,onChange:t}){let{minimumColumnWidth:o,columnCount:r,isManualPlacement:n}=e,s=o||(n||r?null:"12rem"),[a,c="rem"]=(0,nt.__experimentalParseQuantityAndUnitFromRawValue)(s),u=f=>{t({...e,minimumColumnWidth:[f,c].join("")})},d=f=>{let m;["em","rem"].includes(f)&&c==="px"?m=(a/16).toFixed(2)+f:["em","rem"].includes(c)&&f==="px"&&(m=Math.round(a*16)+f),t({...e,minimumColumnWidth:m})};return(0,Ye.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,Ye.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Fr.__)("Min. column width")}),(0,Ye.jsxs)(nt.Flex,{gap:4,children:[(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(nt.__experimentalUnitControl,{size:"__unstable-large",onChange:f=>{t({...e,minimumColumnWidth:f===""?void 0:f})},onUnitChange:d,value:s,units:Wve,min:0,label:(0,Fr.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,onChange:u,value:a||0,min:0,max:Gve[c]||600,withInputField:!1,label:(0,Fr.__)("Minimum column width"),hideLabelFromVision:!0})})]}),(0,Ye.jsx)("p",{className:"components-base-control__help",children:(0,Fr.__)("Columns will wrap to fewer per row when they can no longer maintain the minimum width.")})]})}function Kve({layout:e,onChange:t,allowSizingOnChildren:o}){let{columnCount:n=void 0,rowCount:i,isManualPlacement:s}=e;return(0,Ye.jsx)(Ye.Fragment,{children:(0,Ye.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[!s&&(0,Ye.jsx)(nt.BaseControl.VisualLabel,{as:"legend",children:(0,Fr.__)("Max. columns")}),(0,Ye.jsxs)(nt.Flex,{gap:4,children:[(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:(0,Ye.jsx)(nt.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let u=a===""||a==="0"?s?1:void 0:parseInt(a,10);t({...e,columnCount:u})},value:n,min:1,label:(0,Fr.__)("Columns"),hideLabelFromVision:!s})}),(0,Ye.jsx)(nt.FlexItem,{isBlock:!0,children:o&&s?(0,Ye.jsx)(nt.__experimentalNumberControl,{size:"__unstable-large",onChange:a=>{let c=a===""||a==="0"?1:parseInt(a,10);t({...e,rowCount:c})},value:i,min:1,label:(0,Fr.__)("Rows")}):(0,Ye.jsx)(nt.RangeControl,{__next40pxDefaultSize:!0,value:n??1,onChange:a=>t({...e,columnCount:a===""||a==="0"?1:a}),min:1,max:16,withInputField:!1,label:(0,Fr.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function Yve({layout:e,onChange:t}){let{columnCount:o,rowCount:r,minimumColumnWidth:n,isManualPlacement:i}=e,[s,a]=(0,sC.useState)(o||3),[c,u]=(0,sC.useState)(r),[d,f]=(0,sC.useState)(n||"12rem"),m=i?"manual":"auto",h=g=>{g==="manual"?f(n||"12rem"):(a(o||3),u(r)),t({...e,columnCount:s,rowCount:g==="manual"?c:void 0,isManualPlacement:g==="manual"?!0:void 0,minimumColumnWidth:g==="auto"?d:null})},p=m==="manual"?(0,Fr.__)("Grid items can be manually placed in any position on the grid."):(0,Fr.__)("Grid items are placed automatically depending on their order.");return(0,Ye.jsxs)(nt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,label:(0,Fr.__)("Grid item position"),value:m,onChange:h,isBlock:!0,help:p,children:[(0,Ye.jsx)(nt.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Fr.__)("Auto")},"auto"),(0,Ye.jsx)(nt.__experimentalToggleGroupControlOption,{value:"manual",label:(0,Fr.__)("Manual")},"manual")]})}var dH=[sH,nH,cH,uH];function xs(e="default"){return dH.find(t=>t.name===e)}function fH(){return dH}var xM=l(w(),1),wM={type:"default"},CM=(0,aC.createContext)(wM);CM.displayName="BlockLayoutContext";var mH=CM.Provider;function Uf(){return(0,aC.useContext)(CM)}function pH({layout:e={},css:t,...o}){let r=xs(e.type),[n]=me("spacing.blockGap"),i=n!==null;if(r){if(t)return(0,xM.jsx)("style",{children:t});let s=r.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...o});if(s)return(0,xM.jsx)("style",{children:s})}return null}var lC=[],hH=["none","left","center","right","wide","full"],qve=["wide","full"];function Hv(e=hH){e.includes("none")||(e=["none",...e]);let t=e.length===1&&e[0]==="none",[o,r,n]=(0,gH.useSelect)(c=>{if(t)return[!1,!1,!1];let u=c(_).getSettings();return[u.alignWide??!1,u.supportsLayout,u.__unstableIsBlockBasedTheme]},[t]),i=Uf();if(t)return lC;let s=xs(i?.type);if(r){let u=s.getAlignments(i,n).filter(d=>e.includes(d.name));return u.length===1&&u[0].name==="none"?lC:u}if(s.name!=="default"&&s.name!=="constrained")return lC;let a=e.filter(c=>i.alignments?i.alignments.includes(c):!o&&qve.includes(c)?!1:hH.includes(c)).map(c=>({name:c}));return a.length===1&&a[0].name==="none"?lC:a}var _u=l(N(),1);var Gv={none:{icon:_f,title:(0,_u._x)("None","Alignment option")},left:{icon:zL,title:(0,_u.__)("Align left")},center:{icon:VL,title:(0,_u.__)("Align center")},right:{icon:UL,title:(0,_u.__)("Align right")},wide:{icon:Lf,title:(0,_u.__)("Wide width")},full:{icon:_v,title:(0,_u.__)("Full width")}},bH="none";var Hf=l(w(),1);function Zve({value:e,onChange:t,controls:o,isToolbar:r,isCollapsed:n=!0}){let i=Hv(o);if(!!!i.length)return null;function a(h){t([e,"none"].includes(h)?void 0:h)}let c=Gv[e],u=Gv[bH],d=r?xu.ToolbarGroup:xu.ToolbarDropdownMenu,f={icon:c?c.icon:u.icon,label:(0,BM.__)("Align")},m=r?{isCollapsed:n,controls:i.map(({name:h})=>({...Gv[h],isActive:e===h||!e&&h==="none",role:n?"menuitemradio":void 0,onClick:()=>a(h)}))}:{toggleProps:{description:(0,BM.__)("Change alignment")},children:({onClose:h})=>(0,Hf.jsx)(Hf.Fragment,{children:(0,Hf.jsx)(xu.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map(({name:p,info:g})=>{let{icon:b,title:v}=Gv[p],k=p===e||!e&&p==="none";return(0,Hf.jsx)(xu.MenuItem,{icon:b,iconPosition:"left",className:V("components-dropdown-menu__menu-item",{"is-active":k}),isSelected:k,onClick:()=>{a(p),h()},role:"menuitemradio",info:g,children:v},p)})})})};return(0,Hf.jsx)(d,{...f,...m})}var EM=Zve;var TM=l(w(),1),cC=e=>(0,TM.jsx)(EM,{...e,isToolbar:!1}),kH=e=>(0,TM.jsx)(EM,{...e,isToolbar:!0});var xH=l(yf(),1),mC=l(N(),1),pC=l($(),1),Cs=l(A(),1),RM=l(F(),1),wH=l(R(),1),CH=l(Z(),1);var PM=l(yf(),1),vH=l($(),1),yH=l(A(),1),SH=l(F(),1),dC=l(R(),1),_H=l(Z(),1);var uC=l(F(),1);function IM(e){return!e||Object.keys(e).length===0}function El(e){let{clientId:t}=Ie(),o=e||t,{updateBlockAttributes:r}=(0,uC.useDispatch)(_),{getBlockAttributes:n}=(0,uC.useRegistry)().select(_);return{updateBlockBindings:a=>{let{metadata:{bindings:c,...u}={}}=n(o),d={...c};Object.entries(a).forEach(([m,h])=>{if(!h&&d[m]){delete d[m];return}d[m]=h});let f={...u,bindings:d};IM(f.bindings)&&delete f.bindings,r(o,{metadata:IM(f)?void 0:f})},removeAllBlockBindings:()=>{let{metadata:{bindings:a,...c}={}}=n(o);r(o,{metadata:IM(c)?void 0:c})}}}var ws=l(w(),1),{Menu:wu}=M(yH.privateApis);function Xve({args:e,attribute:t,field:o,source:r,sourceKey:n}){let i=(0,dC.useMemo)(()=>({source:n,args:o.args||{key:o.key}}),[o.args,o.key,n]),s=(0,dC.useContext)(xr),a=(0,SH.useSelect)(u=>r.getValues({select:u,context:s,bindings:{[t]:i}}),[t,s,i,r]),{updateBlockBindings:c}=El();return(0,ws.jsxs)(wu.CheckboxItem,{onChange:()=>{let u=(0,PM.default)(e,o.args)??o.key===e?.key;c(u?{[t]:void 0}:{[t]:i})},name:t+"-binding",value:a[t],checked:(0,PM.default)(e,o.args)??o.key===e?.key,children:[(0,ws.jsx)(wu.ItemLabel,{children:o.label}),(0,ws.jsx)(wu.ItemHelpText,{children:a[t]})]})}function Wv({args:e,attribute:t,sourceKey:o,fields:r}){let n=(0,_H.useViewportMatch)("medium","<");if(!r||r.length===0)return null;let i=(0,vH.getBlockBindingsSource)(o);return(0,ws.jsxs)(wu,{placement:n?"bottom-start":"left-start",children:[(0,ws.jsx)(wu.SubmenuTriggerItem,{children:(0,ws.jsx)(wu.ItemLabel,{children:i.label})}),(0,ws.jsx)(wu.Popover,{gutter:8,children:(0,ws.jsx)(wu.Group,{children:r.map(s=>(0,ws.jsx)(Xve,{args:e,attribute:t,field:s,source:i,sourceKey:o},o+JSON.stringify(s.args)||s.key))})})]},o)}var Ri=l(w(),1),{Menu:fC}=M(Cs.privateApis);function $v({attribute:e,binding:t,blockName:o}){let{updateBlockBindings:r}=El(),n=(0,CH.useViewportMatch)("medium","<"),i=(0,wH.useContext)(xr),s=(0,RM.useSelect)(g=>{let{getAllBlockBindingsSources:b,getBlockBindingsSourceFieldsList:v,getBlockType:k}=M(g(pC.store)),y=k(o).attributes?.[e];if(y?.enum)return{};let S=y?.type==="rich-text"?"string":y?.type,x={};return Object.entries(b()).forEach(([C,B])=>{let I=v(B,i);if(!I?.length)return;let P=I.filter(E=>E.type===S);P.length&&(x[C]=P)}),x},[e,o,i]),{canUpdateBlockBindings:a}=(0,RM.useSelect)(g=>({canUpdateBlockBindings:g(_).getSettings().canUpdateBlockBindings})),c=Object.keys(s).length>0,u=!a||!c,{source:d,args:f}=t||{},m=(0,pC.getBlockBindingsSource)(d),h,p=!0;return t===void 0?(c?h=(0,mC.__)("Not connected"):h=(0,mC.__)("No sources available"),p=!0):m?h=s?.[d]?.find(g=>(0,xH.default)(g.args,f))?.label||m?.label||d:(p=!1,h=(0,mC.__)("Source not registered")),(0,Ri.jsx)(Cs.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:!!c&&(()=>{r({[e]:void 0})}),children:(0,Ri.jsxs)(fC,{placement:n?"bottom-start":"left-start",children:[(0,Ri.jsx)(fC.TriggerButton,{render:(0,Ri.jsx)(Cs.__experimentalItem,{}),disabled:!c,children:(0,Ri.jsxs)(Cs.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,Ri.jsx)(Cs.__experimentalText,{truncate:!0,children:e}),(0,Ri.jsx)(Cs.__experimentalText,{truncate:!0,variant:p?"muted":void 0,isDestructive:!p,children:h})]})}),!u&&(0,Ri.jsx)(fC.Popover,{gutter:n?8:36,children:(0,Ri.jsx)(fC,{placement:n?"bottom-start":"left-start",children:Object.entries(s).map(([g,b])=>(0,Ri.jsx)(Wv,{args:t?.args,attribute:e,sourceKey:g,fields:b},g))})})]})})}var BH=l(N(),1),EH=l(A(),1);var TH=l(w(),1);function Qve({isActive:e,label:t=(0,BH.__)("Full height"),onToggle:o,isDisabled:r}){return(0,TH.jsx)(EH.ToolbarButton,{isActive:e,icon:NA,label:t,onClick:()=>o(!e),disabled:r})}var IH=Qve;var RH=l(N(),1),OH=l(it(),1),Gf=l(A(),1),Kv=l(w(),1),Jve=()=>{};function eye(e){let{label:t=(0,RH.__)("Change matrix alignment"),onChange:o=Jve,value:r="center",isDisabled:n}=e,i=(0,Kv.jsx)(Gf.AlignmentMatrixControl.Icon,{value:r});return(0,Kv.jsx)(Gf.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:s,isOpen:a})=>(0,Kv.jsx)(Gf.ToolbarButton,{onClick:s,"aria-haspopup":"true","aria-expanded":a,onKeyDown:u=>{!a&&u.keyCode===OH.DOWN&&(u.preventDefault(),s())},label:t,icon:i,showTooltip:!0,disabled:n}),renderContent:()=>(0,Kv.jsx)(Gf.AlignmentMatrixControl,{onChange:o,value:r})})}var AH=eye;var LM=l(A(),1),bC=l(F(),1),kC=l(N(),1);var zH=l(R(),1);var LH=l(F(),1),hC=l($(),1);function zr({clientId:e,maximumLength:t,context:o}){let r=(0,LH.useSelect)(n=>{if(!e)return null;let{getBlockName:i,getBlockAttributes:s}=n(_),{getBlockType:a,getActiveBlockVariation:c}=n(hC.store),u=i(e),d=a(u);if(!d)return null;let f=s(e),m=(0,hC.__experimentalGetBlockLabel)(d,f,o);return m!==d.title?m:c(u,f)?.title||d.title},[e,o]);return r?t&&t>0&&r.length>t?r.slice(0,t-3)+"...":r:null}function Yv({clientId:e,maximumLength:t,context:o}){return zr({clientId:e,maximumLength:t,context:o})}var Wf=l(R(),1),DH=l(Z(),1);var gC=l(R(),1),OM=l(Z(),1),NH=l(w(),1),qv=(0,gC.createContext)({refsMap:(0,OM.observableMap)()});qv.displayName="BlockRefsContext";function MH({children:e}){let t=(0,gC.useMemo)(()=>({refsMap:(0,OM.observableMap)()}),[]);return(0,NH.jsx)(qv.Provider,{value:t,children:e})}function VH(e){let{refsMap:t}=(0,Wf.useContext)(qv);return(0,DH.useRefEffect)(o=>(t.set(e,o),()=>t.delete(e)),[e])}function AM(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function $f(e,t){let{refsMap:o}=(0,Wf.useContext)(qv);(0,Wf.useLayoutEffect)(()=>{AM(t,o.get(e));let r=o.subscribe(e,()=>AM(t,o.get(e)));return()=>{r(),AM(t,null)}},[o,e,t])}function Xe(e){let[t,o]=(0,Wf.useState)(null);return $f(e,o),t}function FH(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 Wn=l(w(),1);function tye({rootLabelText:e}){let{selectBlock:t,clearSelectedBlock:o}=(0,bC.useDispatch)(_),{clientId:r,parents:n,hasSelection:i}=(0,bC.useSelect)(c=>{let{getSelectionStart:u,getSelectedBlockClientId:d,getEnabledBlockParents:f}=M(c(_)),m=d();return{parents:f(m),clientId:m,hasSelection:!!u().clientId}},[]),s=e||(0,kC._x)("Document","noun, breadcrumb"),a=(0,zH.useRef)();return $f(r,a),(0,Wn.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,kC.__)("Block breadcrumb"),children:[(0,Wn.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,Wn.jsx)(LM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{let c=a.current?.closest(".editor-styles-wrapper");o(),FH(c)?.focus()},children:s}),!i&&(0,Wn.jsx)("span",{children:s}),!!r&&(0,Wn.jsx)(we,{icon:tu,className:"block-editor-block-breadcrumb__separator"})]}),n.map(c=>(0,Wn.jsxs)("li",{children:[(0,Wn.jsx)(LM.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(c),children:(0,Wn.jsx)(Yv,{clientId:c,maximumLength:35,context:"breadcrumb"})}),(0,Wn.jsx)(we,{icon:tu,className:"block-editor-block-breadcrumb__separator"})]},c)),!!r&&(0,Wn.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,Wn.jsx)(Yv,{clientId:r,maximumLength:35,context:"breadcrumb"})})]})}var jH=tye;var UH=l(F(),1);function HH(e){return(0,UH.useSelect)(t=>{let{__unstableHasActiveBlockOverlayActive:o}=t(_);return o(e)},[e])}var wT=l(Z(),1),QQ=l(R(),1),JQ=l(F(),1),eJ=l(A(),1);var Gi=l(F(),1),XB=l(Z(),1),td=l(R(),1),lq=l($(),1);var Nu=l(R(),1),He=l($(),1),p9=l(A(),1),c1=l(F(),1),u1=l(Z(),1),h9=l(Fe(),1);var Tl=l(N(),1),yC=l(A(),1),Kf=l(R(),1),ch=l($(),1),SC=l(F(),1);var QH=l(YH(),1),vC=l(N(),1),JH=l($(),1);var qH=l(A(),1),ZH=l(R(),1),XH=l(Fe(),1),ga=l(w(),1);function MM({title:e,rawContent:t,renderedContent:o,action:r,actionText:n,className:i}){return(0,ga.jsxs)("div",{className:i,children:[(0,ga.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,ga.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,ga.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,ga.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,ga.jsx)(ZH.RawHTML,{children:(0,XH.safeHTML)(o)})})]}),(0,ga.jsx)("div",{className:"block-editor-block-compare__action",children:(0,ga.jsx)(qH.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:r,children:n})})]})}var lh=l(w(),1);function aye({block:e,onKeep:t,onConvert:o,convertor:r,convertButtonText:n}){function i(u,d){return(0,QH.diffChars)(u,d).map((m,h)=>{let p=V({"block-editor-block-compare__added":m.added,"block-editor-block-compare__removed":m.removed});return(0,lh.jsx)("span",{className:p,children:m.value},h)})}function s(u){return(Array.isArray(u)?u:[u]).map(m=>(0,JH.getSaveContent)(m.name,m.attributes,m.innerBlocks)).join("")}let a=s(r(e)),c=i(e.originalContent,a);return(0,lh.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,lh.jsx)(MM,{title:(0,vC.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,vC.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,lh.jsx)(MM,{title:(0,vC.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:n,rawContent:c,renderedContent:a})]})}var e8=aye;var Il=l(w(),1),t8=e=>(0,ch.rawHandler)({HTML:e.originalContent});function o8({clientId:e}){let{block:t,canInsertHTMLBlock:o,canInsertClassicBlock:r}=(0,SC.useSelect)(d=>{let{canInsertBlockType:f,getBlock:m,getBlockRootClientId:h}=d(_),p=h(e);return{block:m(e),canInsertHTMLBlock:f("core/html",p),canInsertClassicBlock:f("core/freeform",p)}},[e]),{replaceBlock:n}=(0,SC.useDispatch)(_),[i,s]=(0,Kf.useState)(!1),a=(0,Kf.useCallback)(()=>s(!1),[]),c=(0,Kf.useMemo)(()=>({toClassic(){let d=(0,ch.createBlock)("core/freeform",{content:t.originalContent});return n(t.clientId,d)},toHTML(){let d=(0,ch.createBlock)("core/html",{content:t.originalContent});return n(t.clientId,d)},toBlocks(){let d=t8(t);return n(t.clientId,d)},toRecoveredBlock(){let d=(0,ch.createBlock)(t.name,t.attributes,t.innerBlocks);return n(t.clientId,d)}}),[t,n]),u=(0,Kf.useMemo)(()=>[{title:(0,Tl._x)("Resolve","imperative verb"),onClick:()=>s(!0)},o&&{title:(0,Tl.__)("Convert to HTML"),onClick:c.toHTML},r&&{title:(0,Tl.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean),[o,r,c]);return(0,Il.jsxs)(Il.Fragment,{children:[(0,Il.jsx)(pu,{actions:[(0,Il.jsx)(yC.Button,{__next40pxDefaultSize:!0,onClick:c.toRecoveredBlock,variant:"primary",children:(0,Tl.__)("Attempt recovery")},"recover")],secondaryActions:u,children:(0,Tl.__)("Block contains unexpected or invalid content.")}),i&&(0,Il.jsx)(yC.Modal,{title:(0,Tl.__)("Resolve Block"),onRequestClose:a,className:"block-editor-block-compare",children:(0,Il.jsx)(e8,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:t8,convertButtonText:(0,Tl.__)("Convert to Blocks")})})]})}var r8=l(N(),1);var n8=l(w(),1),lye=(0,n8.jsx)(pu,{className:"block-editor-block-list__block-crash-warning",children:(0,r8.__)("This block has encountered an error and cannot be previewed.")}),i8=()=>lye;var s8=l(R(),1),cye=class extends s8.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}},a8=cye;var B8=l(FM(),1),uh=l(R(),1),CC=l(F(),1),ba=l($(),1);var E8=l(w(),1);function yye({clientId:e}){let[t,o]=(0,uh.useState)(""),r=(0,CC.useSelect)(a=>a(_).getBlock(e),[e]),{updateBlock:n}=(0,CC.useDispatch)(_),i=(0,uh.useMemo)(()=>r?(0,ba.getBlockContent)(r):"",[r]),s=()=>{let a=(0,ba.getBlockType)(r.name);if(!a)return;let c=(0,ba.getBlockAttributes)(a,t,r.attributes),u=t||(0,ba.getSaveContent)(a,c),[d]=t?(0,ba.validateBlock)({...r,attributes:c,originalContent:u}):[!0];n(e,{attributes:c,originalContent:u,isValid:d}),t||o(u)};return(0,uh.useEffect)(()=>{o(i)},[i]),(0,E8.jsx)(B8.default,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:s,onChange:a=>o(a.target.value)})}var T8=yye;var d9=l(R(),1),a1=l(N(),1),f9=l($(),1),Ch=l(Z(),1),m9=l(Qv(),1);var jM=ey(),Se=e=>Jv(e,jM),UM=ey();Se.write=e=>Jv(e,UM);var BC=ey();Se.onStart=e=>Jv(e,BC);var HM=ey();Se.onFrame=e=>Jv(e,HM);var GM=ey();Se.onFinish=e=>Jv(e,GM);var dh=[];Se.setTimeout=(e,t)=>{let o=Se.now()+t,r=()=>{let i=dh.findIndex(s=>s.cancel==r);~i&&dh.splice(i,1),Bu-=~i?1:0},n={time:o,handler:e,cancel:r};return dh.splice(P8(o),0,n),Bu+=1,R8(),n};var P8=e=>~(~dh.findIndex(t=>t.time>e)||~dh.length);Se.cancel=e=>{BC.delete(e),HM.delete(e),GM.delete(e),jM.delete(e),UM.delete(e)};Se.sync=e=>{zM=!0,Se.batchedUpdates(e),zM=!1};Se.throttle=e=>{let t;function o(){try{e(...t)}finally{t=null}}function r(...n){t=n,Se.onStart(o)}return r.handler=e,r.cancel=()=>{BC.delete(o),t=null},r};var WM=typeof window<"u"?window.requestAnimationFrame:()=>{};Se.use=e=>WM=e;Se.now=typeof performance<"u"?()=>performance.now():Date.now;Se.batchedUpdates=e=>e();Se.catch=console.error;Se.frameLoop="always";Se.advance=()=>{Se.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):A8()};var Cu=-1,Bu=0,zM=!1;function Jv(e,t){zM?(t.delete(e),e(0)):(t.add(e),R8())}function R8(){Cu<0&&(Cu=0,Se.frameLoop!=="demand"&&WM(O8))}function Sye(){Cu=-1}function O8(){~Cu&&(WM(O8),Se.batchedUpdates(A8))}function A8(){let e=Cu;Cu=Se.now();let t=P8(Cu);if(t&&(L8(dh.splice(0,t),o=>o.handler()),Bu-=t),!Bu){Sye();return}BC.flush(),jM.flush(e?Math.min(64,Cu-e):16.667),HM.flush(),UM.flush(),GM.flush()}function ey(){let e=new Set,t=e;return{add(o){Bu+=t==e&&!e.has(o)?1:0,e.add(o)},delete(o){return Bu-=t==e&&e.has(o)?1:0,e.delete(o)},flush(o){t.size&&(e=new Set,Bu-=t.size,L8(t,r=>r(o)&&e.add(r)),Bu+=e.size,t=e)}}}function L8(e,t){e.forEach(o=>{try{t(o)}catch(r){Se.catch(r)}})}var Ai=l(jr());function RC(){}var z8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),ae={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 ka(e,t){if(ae.arr(e)){if(!ae.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 bt=(e,t)=>e.forEach(t);function Li(e,t,o){if(ae.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 hn=e=>ae.und(e)?[]:ae.arr(e)?e:[e];function hh(e,t){if(e.size){let o=Array.from(e);e.clear(),bt(o,t)}}var gh=(e,...t)=>hh(e,o=>o(...t)),XM=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),QM,j8,Eu=null,U8=!1,JM=RC,_ye=e=>{e.to&&(j8=e.to),e.now&&(Se.now=e.now),e.colors!==void 0&&(Eu=e.colors),e.skipAnimation!=null&&(U8=e.skipAnimation),e.createStringInterpolator&&(QM=e.createStringInterpolator),e.requestAnimationFrame&&Se.use(e.requestAnimationFrame),e.batchedUpdates&&(Se.batchedUpdates=e.batchedUpdates),e.willAdvance&&(JM=e.willAdvance),e.frameLoop&&(Se.frameLoop=e.frameLoop)},$n=Object.freeze({__proto__:null,get createStringInterpolator(){return QM},get to(){return j8},get colors(){return Eu},get skipAnimation(){return U8},get willAdvance(){return JM},assign:_ye}),ty=new Set,Oi=[],$M=[],IC=0,bh={get idle(){return!ty.size&&!Oi.length},start(e){IC>e.priority?(ty.add(e),Se.onStart(xye)):(H8(e),Se(qM))},advance:qM,sort(e){if(IC)Se.onFrame(()=>bh.sort(e));else{let t=Oi.indexOf(e);~t&&(Oi.splice(t,1),G8(e))}},clear(){Oi=[],ty.clear()}};function xye(){ty.forEach(H8),ty.clear(),Se(qM)}function H8(e){Oi.includes(e)||G8(e)}function G8(e){Oi.splice(wye(Oi,t=>t.priority>e.priority),0,e)}function qM(e){let t=$M;for(let o=0;o<Oi.length;o++){let r=Oi[o];IC=r.priority,r.idle||(JM(r),r.advance(e),r.idle||t.push(r))}return IC=0,$M=Oi,$M.length=0,Oi=t,Oi.length>0}function wye(e,t){let o=e.findIndex(t);return o<0?e.length:o}var W8={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Bs="[-+]?\\d*\\.?\\d+",PC=Bs+"%";function OC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Cye=new RegExp("rgb"+OC(Bs,Bs,Bs)),Bye=new RegExp("rgba"+OC(Bs,Bs,Bs,Bs)),Eye=new RegExp("hsl"+OC(Bs,PC,PC)),Tye=new RegExp("hsla"+OC(Bs,PC,PC,Bs)),Iye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Pye=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Rye=/^#([0-9a-fA-F]{6})$/,Oye=/^#([0-9a-fA-F]{8})$/;function Aye(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Rye.exec(e))?parseInt(t[1]+"ff",16)>>>0:Eu&&Eu[e]!==void 0?Eu[e]:(t=Cye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|255)>>>0:(t=Bye.exec(e))?(fh(t[1])<<24|fh(t[2])<<16|fh(t[3])<<8|D8(t[4]))>>>0:(t=Iye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Oye.exec(e))?parseInt(t[1],16)>>>0:(t=Pye.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Eye.exec(e))?(N8(M8(t[1]),EC(t[2]),EC(t[3]))|255)>>>0:(t=Tye.exec(e))?(N8(M8(t[1]),EC(t[2]),EC(t[3]))|D8(t[4]))>>>0:null}function KM(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 N8(e,t,o){let r=o<.5?o*(1+t):o+t-o*t,n=2*o-r,i=KM(n,r,e+1/3),s=KM(n,r,e),a=KM(n,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function fh(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function M8(e){return(parseFloat(e)%360+360)%360/360}function D8(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function EC(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function V8(e){let t=Aye(e);if(t===null)return e;t=t||0;let o=(t&4278190080)>>>24,r=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${o}, ${r}, ${n}, ${i})`}var Tu=(e,t,o)=>{if(ae.fun(e))return e;if(ae.arr(e))return Tu({range:e,output:t,extrapolate:o});if(ae.str(e.output[0]))return QM(e);let r=e,n=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{let d=Nye(u,i);return Lye(u,i[d],i[d+1],n[d],n[d+1],c,s,a,r.map)}};function Lye(e,t,o,r,n,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>o){if(a==="identity")return u;a==="clamp"&&(u=o)}return r===n?r:t===o?e<=t?r:n:(t===-1/0?u=-u:o===1/0?u=u-t:u=(u-t)/(o-t),u=i(u),r===-1/0?u=-u:n===1/0?u=u+r:u=u*(n-r)+r,u)}function Nye(e,t){for(var o=1;o<t.length-1&&!(t[o]>=e);++o);return o-1}function ZM(){return ZM=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},ZM.apply(this,arguments)}var mh=Symbol.for("FluidValue.get"),Yf=Symbol.for("FluidValue.observers"),Ur=e=>!!(e&&e[mh]),pr=e=>e&&e[mh]?e[mh]():e,eD=e=>e[Yf]||null;function Mye(e,t){e.eventObserved?e.eventObserved(t):e(t)}function qf(e,t){let o=e[Yf];o&&o.forEach(r=>{Mye(r,t)})}var ph=class{constructor(t){if(this[mh]=void 0,this[Yf]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");Dye(this,t)}},Dye=(e,t)=>$8(e,mh,t);function Iu(e,t){if(e[mh]){let o=e[Yf];o||$8(e,Yf,o=new Set),o.has(t)||(o.add(t),e.observerAdded&&e.observerAdded(o.size,t))}return t}function Pu(e,t){let o=e[Yf];if(o&&o.has(t)){let r=o.size-1;r?o.delete(t):e[Yf]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var $8=(e,t,o)=>Object.defineProperty(e,t,{value:o,writable:!0,configurable:!0}),TC=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Vye=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,F8=new RegExp(`(${TC.source})(%|[a-z]+)`,"i"),Fye=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,AC=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,K8=e=>{let[t,o]=zye(e);if(!t||XM())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&&AC.test(o))return K8(o);if(o)return o}return e},zye=e=>{let t=AC.exec(e);if(!t)return[,];let[,o,r]=t;return[o,r]},YM,jye=(e,t,o,r,n)=>`rgba(${Math.round(t)}, ${Math.round(o)}, ${Math.round(r)}, ${n})`,LC=e=>{YM||(YM=Eu?new RegExp(`(${Object.keys(Eu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>pr(i).replace(AC,K8).replace(Vye,V8).replace(YM,V8)),o=t.map(i=>i.match(TC).map(Number)),n=o[0].map((i,s)=>o.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(i=>Tu(ZM({},e,{output:i})));return i=>{var s;let a=!F8.test(t[0])&&((s=t.find(u=>F8.test(u)))==null?void 0:s.replace(TC,"")),c=0;return t[0].replace(TC,()=>`${n[c++](i)}${a||""}`).replace(Fye,jye)}},Y8="react-spring: ",q8=e=>{let t=e,o=!1;if(typeof t!="function")throw new TypeError(`${Y8}once requires a function parameter`);return(...r)=>{o||(t(...r),o=!0)}},Uye=q8(console.warn);function Z8(){Uye(`${Y8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Wze=q8(console.warn);function kh(e){return ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!XM()&&AC.test(e)||e in(Eu||{}))}var oy=XM()?Ai.useEffect:Ai.useLayoutEffect,Hye=()=>{let e=(0,Ai.useRef)(!1);return oy(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tD(){let e=(0,Ai.useState)()[1],t=Hye();return()=>{t.current&&e(Math.random())}}function X8(e,t){let[o]=(0,Ai.useState)(()=>({inputs:t,result:e()})),r=(0,Ai.useRef)(),n=r.current,i=n;return i?t&&i.inputs&&Gye(t,i.inputs)||(i={inputs:t,result:e()}):i=o,(0,Ai.useEffect)(()=>{r.current=i,n==o&&(o.inputs=o.result=void 0)},[i]),i.result}function Gye(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 oD=e=>(0,Ai.useEffect)(e,Wye),Wye=[];var fy=l(jr()),my=l(jr());var t7=l(jr()),Rl=l(jr()),ry=Symbol.for("Animated:node"),$ye=e=>!!e&&e[ry]===e,Es=e=>e&&e[ry],VC=(e,t)=>z8(e,ry,t),ny=e=>e&&e[ry]&&e[ry].getPayload(),NC=class{constructor(){this.payload=void 0,VC(this,this)}getPayload(){return this.payload||[]}},Zf=class e extends NC{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,ae.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 ae.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,ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Xf=class e extends Zf{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Tu({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ae.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=Tu({output:[this.getValue(),t]})),this._value=0,super.reset()}},MC={dependencies:null},Qf=class extends NC{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let o={};return Li(this.source,(r,n)=>{$ye(r)?o[n]=r.getValue(t):Ur(r)?o[n]=pr(r):t||(o[n]=r)}),o}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&bt(this.payload,t=>t.reset())}_makePayload(t){if(t){let o=new Set;return Li(t,this._addToPayload,o),Array.from(o)}}_addToPayload(t){MC.dependencies&&Ur(t)&&MC.dependencies.add(t);let o=ny(t);o&&bt(o,r=>this.add(r))}},rD=class e extends Qf{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(Kye)),!0)}};function Kye(e){return(kh(e)?Xf:Zf).create(e)}function FC(e){let t=Es(e);return t?t.constructor:ae.arr(e)?rD:kh(e)?Xf:Zf}function DC(){return DC=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},DC.apply(this,arguments)}var Q8=(e,t)=>{let o=!ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Rl.forwardRef)((r,n)=>{let i=(0,Rl.useRef)(null),s=o&&(0,Rl.useCallback)(p=>{i.current=qye(n,p)},[n]),[a,c]=Yye(r,t),u=tD(),d=()=>{let p=i.current;if(o&&!p)return;(p?t.applyAnimatedValues(p,a.getValue(!0)):!1)===!1&&u()},f=new nD(d,c),m=(0,Rl.useRef)();oy(()=>(m.current=f,bt(c,p=>Iu(p,f)),()=>{m.current&&(bt(m.current.deps,p=>Pu(p,m.current)),Se.cancel(m.current.update))})),(0,Rl.useEffect)(d,[]),oD(()=>()=>{let p=m.current;bt(p.deps,g=>Pu(g,p))});let h=t.getComponentProps(a.getValue());return t7.createElement(e,DC({},h,{ref:s}))})},nD=class{constructor(t,o){this.update=t,this.deps=o}eventObserved(t){t.type=="change"&&Se.write(this.update)}};function Yye(e,t){let o=new Set;return MC.dependencies=o,e.style&&(e=DC({},e,{style:t.createAnimatedStyle(e.style)})),e=new Qf(e),MC.dependencies=null,[e,o]}function qye(e,t){return e&&(ae.fun(e)?e(t):e.current=t),t}var J8=Symbol.for("AnimatedComponent"),o7=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:o=n=>new Qf(n),getComponentProps:r=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:o,getComponentProps:r},i=s=>{let a=e7(s)||"Anonymous";return ae.str(s)?s=i[s]||(i[s]=Q8(s,n)):s=s[J8]||(s[J8]=Q8(s,n)),s.displayName=`Animated(${a})`,s};return Li(e,(s,a)=>{ae.arr(e)&&(a=e7(s)),i[a]=i(s)}),{animated:i}},e7=e=>ae.str(e)?e:e&&ae.str(e.displayName)?e.displayName:ae.fun(e)&&e.name||null;function Hr(){return Hr=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},Hr.apply(this,arguments)}function Jf(e,...t){return ae.fun(e)?e(...t):e}var ly=(e,t)=>e===!0||!!(t&&e&&(ae.fun(e)?e(t):hn(e).includes(t))),p7=(e,t)=>ae.obj(e)?t&&e[t]:e,h7=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Zye=e=>e,g7=(e,t=Zye)=>{let o=Xye;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);ae.und(i)||(r[n]=i)}return r},Xye=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Qye={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 Jye(e){let t={},o=0;if(Li(e,(r,n)=>{Qye[n]||(t[n]=r,o++)}),o)return t}function b7(e){let t=Jye(e);if(t){let o={to:t};return Li(e,(r,n)=>n in t||(o[n]=r)),o}return Hr({},e)}function cy(e){return e=pr(e),ae.arr(e)?e.map(cy):kh(e)?$n.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function aD(e){return ae.fun(e)||ae.arr(e)&&ae.obj(e[0])}var eSe={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}},UC=1.70158,zC=UC*1.525,r7=UC+1,n7=2*Math.PI/3,i7=2*Math.PI/4.5,jC=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,tSe={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=>r7*e*e*e-UC*e*e,easeOutBack:e=>1+r7*Math.pow(e-1,3)+UC*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((zC+1)*2*e-zC)/2:(Math.pow(2*e-2,2)*((zC+1)*(e*2-2)+zC)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*n7),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*n7)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*i7))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*i7)/2+1,easeInBounce:e=>1-jC(1-e),easeOutBounce:jC,easeInOutBounce:e=>e<.5?(1-jC(1-2*e))/2:(1+jC(2*e-1))/2},lD=Hr({},eSe.default,{mass:1,damping:1,easing:tSe.linear,clamp:!1}),cD=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,lD)}};function oSe(e,t,o){o&&(o=Hr({},o),s7(o,t),t=Hr({},o,t)),s7(e,t),Object.assign(e,t);for(let s in lD)e[s]==null&&(e[s]=lD[s]);let{mass:r,frequency:n,damping:i}=e;return ae.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 s7(e,t){if(!ae.und(t.decay))e.duration=void 0;else{let o=!ae.und(t.tension)||!ae.und(t.friction);(o||!ae.und(t.frequency)||!ae.und(t.damping)||!ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),o&&(e.frequency=void 0)}}var a7=[],uD=class{constructor(){this.changed=!1,this.values=a7,this.toValues=null,this.fromValues=a7,this.to=void 0,this.from=void 0,this.config=new cD,this.immediate=!1}};function k7(e,{key:t,props:o,defaultProps:r,state:n,actions:i}){return new Promise((s,a)=>{var c;let u,d,f=ly((c=o.cancel)!=null?c:r?.cancel,t);if(f)p();else{ae.und(o.pause)||(n.paused=ly(o.pause,t));let g=r?.pause;g!==!0&&(g=n.paused||ly(g,t)),u=Jf(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-Se.now()}function h(){u>0&&!$n.skipAnimation?(n.delayed=!0,d=Se.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(Hr({},o,{callId:e,cancel:f}),s)}catch(g){a(g)}}})}var bD=(e,t)=>t.length==1?t[0]:t.some(o=>o.cancelled)?vh(e.get()):t.every(o=>o.noop)?v7(e.get()):Ts(e.get(),t.every(o=>o.finished)),v7=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ts=(e,t,o=!1)=>({value:e,finished:t,cancelled:o}),vh=e=>({value:e,cancelled:!0,finished:!1});function y7(e,t,o,r){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=o;return!i&&e===a&&!t.reset?c:o.promise=(async()=>{o.asyncId=n,o.asyncTo=e;let u=g7(t,(b,v)=>v==="onRest"?void 0:b),d,f,m=new Promise((b,v)=>(d=b,f=v)),h=b=>{let v=n<=(o.cancelId||0)&&vh(r)||n!==o.asyncId&&Ts(r,!1);if(v)throw b.result=v,f(b),b},p=(b,v)=>{let k=new HC,y=new GC;return(async()=>{if($n.skipAnimation)throw uy(o),y.result=Ts(r,!1),f(y),y;h(k);let S=ae.obj(b)?Hr({},b):Hr({},v,{to:b});S.parentId=n,Li(u,(C,B)=>{ae.und(S[B])&&(S[B]=C)});let x=await r.start(S);return h(k),o.paused&&await new Promise(C=>{o.resumeQueue.add(C)}),x})()},g;if($n.skipAnimation)return uy(o),Ts(r,!1);try{let b;ae.arr(e)?b=(async v=>{for(let k of v)await p(k)})(e):b=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([b.then(d),m]),g=Ts(r.get(),!0,!1)}catch(b){if(b instanceof HC)g=b.result;else if(b instanceof GC)g=b.result;else throw b}finally{n==o.asyncId&&(o.asyncId=i,o.asyncTo=i?a:void 0,o.promise=i?c:void 0)}return ae.fun(s)&&Se.batchedUpdates(()=>{s(g,r,r.item)}),g})()}function uy(e,t){hh(e.timeouts,o=>o.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var HC=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}},GC=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},dD=e=>e instanceof dy,rSe=1,dy=class extends ph{constructor(...t){super(...t),this.id=rSe++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=Es(this);return t&&t.getValue()}to(...t){return $n.to(this,t)}interpolate(...t){return Z8(),$n.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){qf(this,{type:"change",parent:this,value:t,idle:o})}_onPriorityChange(t){this.idle||bh.sort(this),qf(this,{type:"priority",parent:this,priority:t})}},em=Symbol.for("SpringPhase"),S7=1,fD=2,mD=4,iD=e=>(e[em]&S7)>0,Ru=e=>(e[em]&fD)>0,iy=e=>(e[em]&mD)>0,l7=(e,t)=>t?e[em]|=fD|S7:e[em]&=~fD,c7=(e,t)=>t?e[em]|=mD:e[em]&=~mD,pD=class extends dy{constructor(t,o){if(super(),this.key=void 0,this.animation=new uD,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,!ae.und(t)||!ae.und(o)){let r=ae.obj(t)?Hr({},t):Hr({},o,{from:t});ae.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Ru(this)||this._state.asyncTo)||iy(this)}get goal(){return pr(this.animation.to)}get velocity(){let t=Es(this);return t instanceof Zf?t.lastVelocity||0:t.getPayload().map(o=>o.lastVelocity||0)}get hasAnimated(){return iD(this)}get isAnimating(){return Ru(this)}get isPaused(){return iy(this)}get isDelayed(){return this._state.delayed}advance(t){let o=!0,r=!1,n=this.animation,{config:i,toValues:s}=n,a=ny(n.to);!a&&Ur(n.to)&&(s=hn(pr(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Xf?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=ae.arr(i.velocity)?i.velocity[f]:i.velocity,k,y=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(ae.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,x=Math.exp(-(1-S)*g);p=b+v/(1-S)*(1-x),h=Math.abs(d.lastPosition-p)<=y,k=v*x}else{k=d.lastVelocity==null?v:d.lastVelocity;let S=i.restVelocity||y/10,x=i.clamp?0:i.bounce,C=!ae.und(x),B=b==m?d.v0>0:b<m,I,P=!1,E=1,L=Math.ceil(t/E);for(let T=0;T<L&&(I=Math.abs(k)>S,!(!I&&(h=Math.abs(m-p)<=y,h)));++T){C&&(P=p==m||p>m==B,P&&(k=-k*x,p=m));let O=-i.tension*1e-6*(p-m),D=-i.friction*.001*k,U=(O+D)/i.mass;k=k+U*E,p=p+k*E}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,g=d.elapsedTime+=t)),S=(i.progress||0)+g/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),p=b+i.easing(S)*(m-b),k=(p-d.lastPosition)/t,h=S==1}d.lastVelocity=k,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[f].done&&(h=!1),h?d.done=!0:o=!1,d.setValue(p,i.round)&&(r=!0)});let c=Es(this),u=c.getValue();if(o){let d=pr(n.to);(u!==d||r)&&!i.decay?(c.setValue(d),this._onChange(d)):r&&i.decay&&this._onChange(u),this._stop()}else r&&this._onChange(u)}set(t){return Se.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ru(this)){let{to:t,config:o}=this.animation;Se.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 ae.und(t)?(r=this.queue||[],this.queue=[]):r=[ae.obj(t)?t:Hr({},o,{to:t})],Promise.all(r.map(n=>this._update(n))).then(n=>bD(this,n))}stop(t){let{to:o}=this.animation;return this._focus(this.get()),uy(this._state,t&&this._lastCallId),Se.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=ae.obj(r)?r[o]:r,(r==null||aD(r))&&(r=void 0),n=ae.obj(n)?n[o]:n,n==null&&(n=void 0);let i={to:r,from:n};return iD(this)||(t.reverse&&([r,n]=[n,r]),n=pr(n),ae.und(n)?Es(this)||this._set(r):this._set(n)),i}_update(t,o){let r=Hr({},t),{key:n,defaultProps:i}=this;r.default&&Object.assign(i,g7(r,(c,u)=>/^on/.test(u)?p7(c,n):c)),d7(this,r,"onProps"),ay(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 k7(++this._lastCallId,{key:n,props:r,defaultProps:i,state:a,actions:{pause:()=>{iy(this)||(c7(this,!0),gh(a.pauseQueue),ay(this,"onPause",Ts(this,sy(this,this.animation.to)),this))},resume:()=>{iy(this)&&(c7(this,!1),Ru(this)&&this._resume(),gh(a.resumeQueue),ay(this,"onResume",Ts(this,sy(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(r.loop&&c.finished&&!(o&&c.noop)){let u=_7(r);if(u)return this._update(u,!0)}return c})}_merge(t,o,r){if(o.cancel)return this.stop(!0),r(vh(this));let n=!ae.und(t.to),i=!ae.und(t.from);if(n||i)if(o.callId>this._lastToId)this._lastToId=o.callId;else return r(vh(this));let{key:s,defaultProps:a,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!o.default||ae.und(f))&&(f=m),o.reverse&&([f,m]=[m,f]);let h=!ka(m,d);h&&(c.from=m),m=pr(m);let p=!ka(f,u);p&&this._focus(f);let g=aD(o.to),{config:b}=c,{decay:v,velocity:k}=b;(n||i)&&(b.velocity=0),o.config&&!g&&oSe(b,Jf(o.config,s),o.config!==a.config?Jf(a.config,s):void 0);let y=Es(this);if(!y||ae.und(f))return r(Ts(this,!0));let S=ae.und(o.reset)?i&&!o.default:!ae.und(m)&&ly(o.reset,s),x=S?m:this.get(),C=cy(f),B=ae.num(C)||ae.arr(C)||kh(C),I=!g&&(!B||ly(a.immediate||o.immediate,s));if(p){let T=FC(f);if(T!==y.constructor)if(I)y=this._set(C);else throw Error(`Cannot animate between ${y.constructor.name} and ${T.name}, as the "to" prop suggests`)}let P=y.constructor,E=Ur(f),L=!1;if(!E){let T=S||!iD(this)&&h;(p||T)&&(L=ka(cy(x),C),E=!L),(!ka(c.immediate,I)&&!I||!ka(b.decay,v)||!ka(b.velocity,k))&&(E=!0)}if(L&&Ru(this)&&(c.changed&&!S?E=!0:E||this._stop(u)),!g&&((E||Ur(u))&&(c.values=y.getPayload(),c.toValues=Ur(f)?null:P==Xf?[1]:hn(C)),c.immediate!=I&&(c.immediate=I,!I&&!S&&this._set(u)),E)){let{onRest:T}=c;bt(nSe,D=>d7(this,o,D));let O=Ts(this,sy(this,u));gh(this._pendingCalls,O),this._pendingCalls.add(r),c.changed&&Se.batchedUpdates(()=>{c.changed=!S,T?.(O,this),S?Jf(a.onRest,O):c.onStart==null||c.onStart(O,this)})}S&&this._set(x),g?r(y7(o.to,o,this._state,this)):E?this._start():Ru(this)&&!p?this._pendingCalls.add(r):r(v7(x))}_focus(t){let o=this.animation;t!==o.to&&(eD(this)&&this._detach(),o.to=t,eD(this)&&this._attach())}_attach(){let t=0,{to:o}=this.animation;Ur(o)&&(Iu(o,this),dD(o)&&(t=o.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;Ur(t)&&Pu(t,this)}_set(t,o=!0){let r=pr(t);if(!ae.und(r)){let n=Es(this);if(!n||!ka(r,n.getValue())){let i=FC(r);!n||n.constructor!=i?VC(this,i.create(r)):n.setValue(r),n&&Se.batchedUpdates(()=>{this._onChange(r,o)})}}return Es(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,ay(this,"onStart",Ts(this,sy(this,t.to)),this))}_onChange(t,o){o||(this._onStart(),Jf(this.animation.onChange,t,this)),Jf(this.defaultProps.onChange,t,this),super._onChange(t,o)}_start(){let t=this.animation;Es(this).reset(pr(t.to)),t.immediate||(t.fromValues=t.values.map(o=>o.lastPosition)),Ru(this)||(l7(this,!0),iy(this)||this._resume())}_resume(){$n.skipAnimation?this.finish():bh.start(this)}_stop(t,o){if(Ru(this)){l7(this,!1);let r=this.animation;bt(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),qf(this,{type:"idle",parent:this});let n=o?vh(this.get()):Ts(this.get(),sy(this,t??r.to));gh(this._pendingCalls,n),r.changed&&(r.changed=!1,ay(this,"onRest",n,this))}}};function sy(e,t){let o=cy(t),r=cy(e.get());return ka(r,o)}function _7(e,t=e.loop,o=e.to){let r=Jf(t);if(r){let n=r!==!0&&b7(r),i=(n||e).reverse,s=!n||n.reset;return hD(Hr({},e,{loop:t,default:!1,pause:void 0,to:!i||aD(o)?o:void 0,from:s?e.from:void 0,reset:s},n))}}function hD(e){let{to:t,from:o}=e=b7(e),r=new Set;return ae.obj(t)&&u7(t,r),ae.obj(o)&&u7(o,r),e.keys=r.size?Array.from(r):null,e}function u7(e,t){Li(e,(o,r)=>o!=null&&t.add(r))}var nSe=["onStart","onRest","onChange","onPause","onResume"];function d7(e,t,o){e.animation[o]=t[o]!==h7(t,o)?p7(t[o],e.key):void 0}function ay(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 iSe=["onStart","onChange","onRest"],sSe=1,WC=class{constructor(t,o){this.id=sSe++,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(Hr({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];ae.und(r)||this.springs[o].set(r)}}update(t){return t&&this.queue.push(hD(t)),this}start(t){let{queue:o}=this;return t?o=hn(t).map(hD):this.queue=[],this._flush?this._flush(this,o):(w7(this,o),aSe(this,o))}stop(t,o){if(t!==!!t&&(o=t),o){let r=this.springs;bt(hn(o),n=>r[n].stop(!!t))}else uy(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ae.und(t))this.start({pause:!0});else{let o=this.springs;bt(hn(t),r=>o[r].pause())}return this}resume(t){if(ae.und(t))this.start({pause:!1});else{let o=this.springs;bt(hn(t),r=>o[r].resume())}return this}each(t){Li(this.springs,t)}_onFrame(){let{onStart:t,onChange:o,onRest:r}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,hh(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,a=i||s&&r.size?this.get():null;i&&o.size&&hh(o,([c,u])=>{u.value=a,c(u,this,this._item)}),s&&(this._started=!1,hh(r,([c,u])=>{u.value=a,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Se.onFrame(this._onFrame)}};function aSe(e,t){return Promise.all(t.map(o=>x7(e,o))).then(o=>bD(e,o))}async function x7(e,t,o){let{keys:r,to:n,from:i,loop:s,onRest:a,onResolve:c}=t,u=ae.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ae.arr(n)||ae.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):bt(iSe,g=>{let b=t[g];if(ae.fun(b)){let v=e._events[g];t[g]=({finished:k,cancelled:y})=>{let S=v.get(b);S?(k||(S.finished=!1),y&&(S.cancelled=!0)):v.set(b,{value:null,finished:k||!1,cancelled:y||!1})},u&&(u[g]=t[g])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,gh(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),h=t.cancel===!0||h7(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(k7(++e._lastAsyncId,{props:t,state:f,actions:{pause:RC,resume:RC,start(g,b){h?(uy(f,e._lastAsyncId),b(vh(e))):(g.onRest=a,b(y7(d,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});let p=bD(e,await Promise.all(m));if(s&&p.finished&&!(o&&p.noop)){let g=_7(t,s,n);if(g)return w7(e,[g]),x7(e,g,!0)}return c&&Se.batchedUpdates(()=>c(p,e,e.item)),p}function lSe(e,t){let o=new pD;return o.key=e,t&&Iu(o,t),o}function cSe(e,t,o){t.keys&&bt(t.keys,r=>{(e[r]||(e[r]=o(r)))._prepareNode(t)})}function w7(e,t){bt(t,o=>{cSe(e.springs,o,r=>lSe(r,e))})}function uSe(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 dSe=["children"],kD=e=>{let{children:t}=e,o=uSe(e,dSe),r=(0,my.useContext)($C),n=o.pause||!!r.pause,i=o.immediate||!!r.immediate;o=X8(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=$C;return fy.createElement(s,{value:o},t)},$C=fSe(kD,{});kD.Provider=$C.Provider;kD.Consumer=$C.Consumer;function fSe(e,t){return Object.assign(e,fy.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var f7;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(f7||(f7={}));var gD=class extends dy{constructor(t,o){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Tu(...o);let r=this._get(),n=FC(r);VC(this,n.create(r))}advance(t){let o=this._get(),r=this.get();ka(o,r)||(Es(this).setValue(o),this._onChange(o,this.idle)),!this.idle&&m7(this._active)&&sD(this)}_get(){let t=ae.arr(this.source)?this.source.map(pr):hn(pr(this.source));return this.calc(...t)}_start(){this.idle&&!m7(this._active)&&(this.idle=!1,bt(ny(this),t=>{t.done=!1}),$n.skipAnimation?(Se.batchedUpdates(()=>this.advance()),sD(this)):bh.start(this))}_attach(){let t=1;bt(hn(this.source),o=>{Ur(o)&&Iu(o,this),dD(o)&&(o.idle||this._active.add(o),t=Math.max(t,o.priority+1))}),this.priority=t,this._start()}_detach(){bt(hn(this.source),t=>{Ur(t)&&Pu(t,this)}),this._active.clear(),sD(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=hn(this.source).reduce((o,r)=>Math.max(o,(dD(r)?r.priority:0)+1),0))}};function mSe(e){return e.idle!==!1}function m7(e){return!e.size||Array.from(e).every(mSe)}function sD(e){e.idle||(e.idle=!0,bt(ny(e),t=>{t.done=!0}),qf(e,{type:"idle",parent:e}))}$n.assign({createStringInterpolator:LC,to:(e,t)=>new gD(e,t)});var t6e=bh.advance;var T7=l(B7());function _D(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 pSe=["style","children","scrollTop","scrollLeft"],I7=/^--/;function hSe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!I7.test(e)&&!(py.hasOwnProperty(e)&&py[e])?t+"px":(""+t).trim()}var E7={};function gSe(e,t){if(!e.nodeType||!e.setAttribute)return!1;let o=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",r=t,{style:n,children:i,scrollTop:s,scrollLeft:a}=r,c=_D(r,pSe),u=Object.values(c),d=Object.keys(c).map(f=>o||e.hasAttribute(f)?f:E7[f]||(E7[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=hSe(f,n[f]);I7.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 py={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},bSe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),kSe=["Webkit","Ms","Moz","O"];py=Object.keys(py).reduce((e,t)=>(kSe.forEach(o=>e[bSe(o,t)]=e[t]),e),py);var vSe=["x","y","z"],ySe=/^(matrix|translate|scale|rotate|skew)/,SSe=/^(translate)/,_Se=/^(rotate|skew)/,vD=(e,t)=>ae.num(e)&&e!==0?e+t:e,KC=(e,t)=>ae.arr(e)?e.every(o=>KC(o,t)):ae.num(e)?e===t:parseFloat(e)===t,yD=class extends Qf{constructor(t){let{x:o,y:r,z:n}=t,i=_D(t,vSe),s=[],a=[];(o||r||n)&&(s.push([o||0,r||0,n||0]),a.push(c=>[`translate3d(${c.map(u=>vD(u,"px")).join(",")})`,KC(c,0)])),Li(i,(c,u)=>{if(u==="transform")s.push([c||""]),a.push(d=>[d,d===""]);else if(ySe.test(u)){if(delete i[u],ae.und(c))return;let d=SSe.test(u)?"px":_Se.test(u)?"deg":"";s.push(hn(c)),a.push(u==="rotate3d"?([f,m,h,p])=>[`rotate3d(${f},${m},${h},${vD(p,d)})`,KC(p,0)]:f=>[`${u}(${f.map(m=>vD(m,d)).join(",")})`,KC(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new SD(s,a)),super(i)}},SD=class extends ph{constructor(t,o){super(),this._value=null,this.inputs=t,this.transforms=o}get(){return this._value||(this._value=this._get())}_get(){let t="",o=!0;return bt(this.inputs,(r,n)=>{let i=pr(r[0]),[s,a]=this.transforms[n](ae.arr(i)?i:r.map(pr));t+=" "+s,o=o&&a}),o?"none":t}observerAdded(t){t==1&&bt(this.inputs,o=>bt(o,r=>Ur(r)&&Iu(r,this)))}observerRemoved(t){t==0&&bt(this.inputs,o=>bt(o,r=>Ur(r)&&Pu(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),qf(this,t)}},xSe=["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"],wSe=["scrollTop","scrollLeft"];$n.assign({batchedUpdates:T7.unstable_batchedUpdates,createStringInterpolator:LC,colors:W8});var CSe=o7(xSe,{applyAnimatedValues:gSe,createAnimatedStyle:e=>new yD(e),getComponentProps:e=>_D(e,wSe)}),P7=CSe.animated;var yh=l(R(),1),O7=l(Fe(),1),A7=l(F(),1);var BSe=200;function R7(e){return{top:e.offsetTop,left:e.offsetLeft}}function ESe({triggerAnimationOnChange:e,clientId:t}){let o=(0,yh.useRef)(),{isTyping:r,getGlobalBlockCount:n,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:a,isAncestorMultiSelected:c,isDraggingBlocks:u}=(0,A7.useSelect)(_),{previous:d,prevRect:f}=(0,yh.useMemo)(()=>({previous:o.current&&R7(o.current),prevRect:o.current&&o.current.getBoundingClientRect()}),[e]);return(0,yh.useLayoutEffect)(()=>{if(!d||!o.current)return;let m=(0,O7.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()>BSe){b();return}let k=h||a(t)||c(t);if(k&&g)return;let y=k?"1":"",S=new WC({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:I}){if(!o.current)return;let{x:P,y:E}=I;P=Math.round(P),E=Math.round(E);let L=P===0&&E===0;o.current.style.transformOrigin="center center",o.current.style.transform=L?null:`translate3d(${P}px,${E}px,0)`,o.current.style.zIndex=y,b()}});o.current.style.transform=void 0;let x=R7(o.current),C=Math.round(d.left-x.left),B=Math.round(d.top-x.top);return S.start({x:0,y:0,from:{x:C,y:B}}),()=>{S.stop(),S.set({x:0,y:0})}},[d,f,t,r,n,i,s,a,c,u]),o}var YC=ESe;var ZC=l(R(),1),Ol=l(Fe(),1),N7=l(F(),1);var qC=".block-editor-block-list__block",TSe=".block-list-appender",ISe=".block-editor-button-block-appender";function L7(e,t){return e.closest(qC)===t.closest(qC)}function va(e,t){return t.closest([qC,TSe,ISe].join(","))===e}function Ni(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;let o=e.closest(qC);if(o)return o.id.slice(6)}function xD(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 PSe(e){let t=e.ownerDocument.defaultView;if(!t||e.classList.contains("components-visually-hidden"))return!1;let o=e.getBoundingClientRect();if(o.width===0||o.height===0)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});let r=t.getComputedStyle(e);return!(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")}function RSe(e){let t=window.getComputedStyle(e);return t.overflowX==="auto"||t.overflowX==="scroll"||t.overflowY==="auto"||t.overflowY==="scroll"}var OSe=["core/navigation"];function Sh(e){let t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let o=e.getBoundingClientRect(),r=e.getAttribute("data-type");if(r&&OSe.includes(r)){let s=[e],a;for(;a=s.pop();)if(!RSe(a)){for(let c of a.children)if(PSe(c)){let u=c.getBoundingClientRect();o=xD(o,u),s.push(c)}}}let n=Math.max(o.left,0),i=Math.min(o.right,t.innerWidth);return o=new window.DOMRectReadOnly(n,o.top,i-n,o.height),o}function M7({clientId:e,initialPosition:t}){let o=(0,ZC.useRef)(),{isBlockSelected:r,isMultiSelecting:n,isZoomOut:i}=M((0,N7.useSelect)(_));return(0,ZC.useEffect)(()=>{if(!r(e)||n()||i()||t==null||!o.current)return;let{ownerDocument:s}=o.current;if(va(o.current,s.activeElement))return;let a=Ol.focus.tabbable.find(o.current).filter(d=>(0,Ol.isTextField)(d)),c=t===-1,u=a[c?a.length-1:0]||o.current;if(!va(o.current,u)){o.current.focus();return}if(!o.current.getAttribute("contenteditable")){let d=Ol.focus.tabbable.findNext(o.current);if(d&&va(o.current,d)&&(0,Ol.isFormElement)(d)){d.focus();return}}(0,Ol.placeCaretAtHorizontalEdge)(u,c)},[t,e]),o}var D7=l(Z(),1);function XC(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered",e.type==="mouseover"))}function V7({isEnabled:e=!0}={}){return(0,D7.useRefEffect)(t=>{if(e)return t.addEventListener("mouseout",XC),t.addEventListener("mouseover",XC),()=>{t.removeEventListener("mouseout",XC),t.removeEventListener("mouseover",XC),t.classList.remove("is-hovered")}},[e])}var QC=l(F(),1),F7=l(Z(),1);function z7(e){let{isBlockSelected:t}=(0,QC.useSelect)(_),{selectBlock:o,selectionChange:r}=(0,QC.useDispatch)(_);return(0,F7.useRefEffect)(n=>{function i(s){if(!n.parentElement.closest('[contenteditable="true"]')){if(t(e)){s.target.isContentEditable||r(e);return}va(n,s.target)&&o(e)}}return n.addEventListener("focusin",i),()=>{n.removeEventListener("focusin",i)}},[t,o])}var _h=l($(),1),U7=l(Fe(),1),Ou=l(it(),1),JC=l(F(),1),H7=l(Z(),1);function j7(e){return!e||e==="transparent"||e==="rgba(0, 0, 0, 0)"}function G7({clientId:e,isSelected:t}){let{getBlockRootClientId:o,isZoomOut:r,hasMultiSelection:n,isSectionBlock:i,editedContentOnlySection:s,getBlock:a}=M((0,JC.useSelect)(_)),{insertAfterBlock:c,removeBlock:u,resetZoomLevel:d,startDraggingBlocks:f,stopDraggingBlocks:m,editContentOnlySection:h}=M((0,JC.useDispatch)(_));return(0,H7.useRefEffect)(p=>{if(!t)return;function g(k){let{keyCode:y,target:S}=k;y!==Ou.ENTER&&y!==Ou.BACKSPACE&&y!==Ou.DELETE||S!==p||(0,U7.isTextField)(S)||(k.preventDefault(),y===Ou.ENTER&&r()?d():y===Ou.ENTER?c(e):u(e))}function b(k){if(p!==k.target||p.isContentEditable||p.ownerDocument.activeElement!==p||n()){k.preventDefault();return}let y=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:o(e)});k.dataTransfer.effectAllowed="move",k.dataTransfer.clearData(),k.dataTransfer.setData("wp-blocks",y);let{ownerDocument:S}=p,{defaultView:x}=S;x.getSelection().removeAllRanges();let B=S.createElement("div");B.style.width="1px",B.style.height="1px",B.style.position="fixed",B.style.visibility="hidden",S.body.appendChild(B),k.dataTransfer.setDragImage(B,0,0);let I=p.getBoundingClientRect(),P=p.id,E=p.cloneNode();E.style.display="none",p.id=null,p.after(E);let L=1;{let J=p;for(;J=J.parentElement;){let{scale:K}=x.getComputedStyle(J);if(K&&K!=="none"){L=parseFloat(K);break}}}let T=1/L,O={};for(let J of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])O[J]=p.style[J];let D=x.scrollY,U=x.scrollX,G=k.clientX,j=k.clientY;p.style.position="relative",p.style.top="0px",p.style.left="0px";let z=k.clientX-I.left,W=k.clientY-I.top,ee=I.height>200?200/I.height:1;if(p.style.zIndex="1000",p.style.transformOrigin=`${z*T}px ${W*T}px`,p.style.transition="transform 0.2s ease-out",p.style.transform=`scale(${ee})`,p.style.opacity="0.9",j7(x.getComputedStyle(p).backgroundColor)){let J="transparent",K=p;for(;K=K.parentElement;){let{backgroundColor:H}=x.getComputedStyle(K);if(!j7(H)){J=H;break}}p.style.backgroundColor=J}let se=!1,ce=G,ie=j;function re(J){J.clientX===ce&&J.clientY===ie||(ce=J.clientX,ie=J.clientY,Q())}function Q(){se||(se=!0,p.style.pointerEvents="none");let J=ie-j,K=ce-G,H=x.scrollY,X=x.scrollX,ne=H-D,le=X-U,ve=J+ne,he=K+le;p.style.top=`${ve*T}px`,p.style.left=`${he*T}px`}function Y(){S.removeEventListener("dragover",re),S.removeEventListener("dragend",Y),S.removeEventListener("drop",Y),S.removeEventListener("scroll",Q);for(let[J,K]of Object.entries(O))p.style[J]=K;E.remove(),p.id=P,B.remove(),m(),document.body.classList.remove("is-dragging-components-draggable"),S.documentElement.classList.remove("is-dragging")}S.addEventListener("dragover",re),S.addEventListener("dragend",Y),S.addEventListener("drop",Y),S.addEventListener("scroll",Q),f([e]),document.body.classList.add("is-dragging-components-draggable"),S.documentElement.classList.add("is-dragging")}p.addEventListener("keydown",g),p.addEventListener("dragstart",b);function v(k){let y=i(e),S=a(e),x=(0,_h.isReusableBlock)(S),C=(0,_h.isTemplatePart)(S);!y||s===e||x||C||(k.preventDefault(),h(e))}return p.addEventListener("dblclick",v),()=>{p.removeEventListener("keydown",g),p.removeEventListener("dragstart",b),p.removeEventListener("dblclick",v)}},[e,t,o,a,_h.isReusableBlock,_h.isTemplatePart,c,u,r,d,n,f,m,i,s,h])}var W7=l(Z(),1),$7=l(R(),1);function K7(){let e=(0,$7.useContext)(e1);return(0,W7.useRefEffect)(t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}},[e])}var t1=l(Z(),1);function Y7({isSelected:e}){let t=(0,t1.useReducedMotion)();return(0,t1.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 q7=l(Z(),1),Z7=l(F(),1);function o1({clientId:e="",isEnabled:t=!0}={}){let{getEnabledClientIdsTree:o}=M((0,Z7.useSelect)(_));return(0,q7.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 X7=l(Z(),1),hy=new Map;function ASe(e,t){let o=hy.get(e);o||(o=new Set,hy.set(e,o),e.addEventListener("pointerdown",J7)),o.add(t)}function LSe(e,t){let o=hy.get(e);o&&(o.delete(t),Q7(t),o.size===0&&(hy.delete(e),e.removeEventListener("pointerdown",J7)))}function Q7(e){let t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),t==="true"&&!e.getAttribute("draggable")&&e.setAttribute("draggable","true"))}function J7(e){let{target:t}=e,{ownerDocument:o,isContentEditable:r,tagName:n}=t,i=["INPUT","TEXTAREA"].includes(n),s=hy.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)Q7(a)}function e9(){return(0,X7.useRefEffect)(e=>(ASe(e.ownerDocument,e),()=>{LSe(e.ownerDocument,e)}),[])}var mo=l(N(),1),gn=l(R(),1),Gr=l(A(),1),xh=l(F(),1),n9=l(Is(),1),i9=l(Un(),1);var gy=l(N(),1);function NSe(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"||!iu.some(([,{key:n}])=>n===t)?!1:r[t]===!1}function o9(e,t){if(!e?.length)return!1;let o=e.filter(r=>NSe(r,t)).length;return o===0?!1:o===e.length?!0:null}function r9(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 by(e){if(!e&&e!==!1)return null;if(e===!1)return(0,gy.__)("Block is hidden");if(e?.viewport){let t=iu.filter(([o])=>e.viewport?.[o]===!1).map(([,o])=>o.label);if(t.length>0)return(0,gy.sprintf)((0,gy.__)("Block is hidden on %s"),t.join(", "))}return null}var ro=l(w(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4334c7deb6']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","4334c7deb6"),e.appendChild(document.createTextNode(".block-editor-block-visibility-modal{z-index:1000001}.block-editor-block-visibility-modal__options{border:0;list-style:none;margin:24px 0;padding:0}.block-editor-block-visibility-modal__options-item{align-items:center;display:flex;gap:24px;justify-content:space-between;margin:0 0 16px}.block-editor-block-visibility-modal__options-item:last-child{margin:0}.block-editor-block-visibility-modal__options-item--everywhere{align-items:start;flex-direction:column}.block-editor-block-visibility-modal__options-checkbox--everywhere{font-weight:600}.block-editor-block-visibility-modal__options-icon--checked{fill:#ddd}.block-editor-block-visibility-modal__sub-options{padding-inline-start:12px;width:100%}.block-editor-block-visibility-modal__description{color:#757575;font-size:12px}.block-editor-block-visibility-info{align-items:center;display:flex;justify-content:start;margin:0 16px 16px;padding-bottom:4px;padding-top:4px}")),document.head.appendChild(e)}var MSe={[Et.mobile.key]:!1,[Et.tablet.key]:!1,[Et.desktop.key]:!1},DSe=[];function wD({clientIds:e,onClose:t}){let{createSuccessNotice:o}=(0,xh.useDispatch)(i9.store),{updateBlockAttributes:r}=(0,xh.useDispatch)(_),n=(0,xh.useSelect)(k=>k(_).getBlocksByClientId(e)??DSe,[e]),i=(0,xh.useSelect)(k=>k(n9.store).getShortcutRepresentation("core/editor/toggle-list-view"),[]),s=(0,gn.useMemo)(()=>{if(n?.length===0)return{hideEverywhere:!1,viewportChecked:{}};let k={};return iu.forEach(([,{key:y}])=>{k[y]=o9(n,y)}),{hideEverywhere:r9(n),viewportChecked:k}},[n]),[a,c]=(0,gn.useState)(s?.viewportChecked??{}),[u,d]=(0,gn.useState)(s?.hideEverywhere??!1),f=(0,gn.useCallback)((k,y)=>{c({...a,[k]:y})},[a]),m=(0,gn.useMemo)(()=>{if(!u)return(0,mo.sprintf)((0,mo.__)("Block visibility settings updated. You can access them via the List View (%s)."),i);let k=n?.length>1?(0,mo.__)("Blocks hidden. You can access them via the List View (%s)."):(0,mo.__)("Block hidden. You can access it via the List View (%s).");return(0,mo.sprintf)(k,i)},[u,n?.length,i]),h=(0,gn.useMemo)(()=>Object.values(a).some(k=>k===!0||k===null),[a]),p=(0,gn.useMemo)(()=>u!==s.hideEverywhere?!0:iu.some(([,{key:k}])=>a[k]!==s.viewportChecked[k]),[u,a,s]),g=(0,gn.useMemo)(()=>u===null?!0:Object.values(a).some(k=>k===null),[u,a]),b=(0,gn.useCallback)(k=>{k.preventDefault();let y=u?!1:{viewport:iu.reduce((x,[,{key:C}])=>(a[C]&&(x[C]=!1),x),{})},S=Object.fromEntries(n.map(({clientId:x,attributes:C})=>[x,{metadata:Me({...C?.metadata,blockVisibility:y})}]));r(e,S,{uniqueByBlock:!0}),o(m,{id:u?"block-visibility-hidden":"block-visibility-viewports-updated",type:"snackbar"}),t()},[n,e,o,u,m,t,r,a]),v=n?.length>1;return(0,ro.jsx)(Gr.Modal,{title:e?.length>1?(0,mo.__)("Hide blocks"):(0,mo.__)("Hide block"),onRequestClose:t,overlayClassName:"block-editor-block-visibility-modal",size:"small",children:(0,ro.jsxs)("form",{onSubmit:b,children:[(0,ro.jsxs)("fieldset",{children:[(0,ro.jsx)("legend",{children:v?(0,mo.__)("Select the viewport sizes for which you want to hide the blocks. Changes will apply to all selected blocks."):(0,mo.__)("Select the viewport size for which you want to hide the block.")}),(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__options",children:(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item block-editor-block-visibility-modal__options-item--everywhere",children:[(0,ro.jsx)(Gr.CheckboxControl,{className:"block-editor-block-visibility-modal__options-checkbox--everywhere",label:(0,mo.__)("Omit from published content"),checked:u===!0,indeterminate:u===null,onChange:k=>{d(k),c(MSe)}}),u!==!0&&(0,ro.jsx)("ul",{className:"block-editor-block-visibility-modal__sub-options",children:iu.map(([,{label:k,icon:y,key:S}])=>(0,ro.jsxs)("li",{className:"block-editor-block-visibility-modal__options-item",children:[(0,ro.jsx)(Gr.CheckboxControl,{label:(0,mo.sprintf)((0,mo.__)("Hide on %s"),k),checked:a[S]??!1,indeterminate:a[S]===null,onChange:x=>f(S,x)}),(0,ro.jsx)(Gr.Icon,{icon:y,className:V({"block-editor-block-visibility-modal__options-icon--checked":a[S]})})]},S))})]})}),v&&g&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,mo.__)("Selected blocks have different visibility settings. The checkboxes show an indeterminate state when settings differ.")}),!v&&u===!0&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,mo.sprintf)((0,mo.__)("Block will be hidden in the editor, and omitted from the published markup on the frontend. You can configure it again by selecting it in the List View (%s)."),i)}),!v&&!u&&h&&(0,ro.jsx)("p",{className:"block-editor-block-visibility-modal__description",children:(0,gn.createInterpolateElement)((0,mo.sprintf)((0,mo.__)("Block will be hidden according to the selected viewports. It will be <strong>included in the published markup on the frontend</strong>. You can configure it again by selecting it in the List View (%s)."),i),{strong:(0,ro.jsx)("strong",{})})})]}),(0,ro.jsxs)(Gr.Flex,{className:"block-editor-block-visibility-modal__actions",justify:"flex-end",expanded:!1,children:[(0,ro.jsx)(Gr.FlexItem,{children:(0,ro.jsx)(Gr.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,mo.__)("Cancel")})}),(0,ro.jsx)(Gr.FlexItem,{children:(0,ro.jsx)(Gr.Button,{variant:"primary",type:"submit",disabled:!p,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,mo.__)("Apply")})})]})]})})}var CD=l(Z(),1);function Mi(e={}){let{blockVisibility:t=void 0,deviceType:o=Et.desktop.key,view:r=window}=e,n=(0,CD.useViewportMatch)("mobile",">=",r),i=(0,CD.useViewportMatch)("medium",">=",r),s;return o===Et.mobile.key?s=Et.mobile.key:o===Et.tablet.key?s=Et.tablet.key:n?n&&!i?s=Et.tablet.key:s=Et.desktop.key:s=Et.mobile.key,{isBlockCurrentlyHidden:t===!1||t?.viewport?.[s]===!1,currentViewport:s}}var BD=l(N(),1),r1=l(A(),1),n1=l(R(),1);var s9=l($(),1),i1=l(F(),1);var ED=l(w(),1);function TD({clientIds:e}){let t=(0,n1.useRef)(!1),{canToggleBlockVisibility:o,areBlocksHiddenAnywhere:r}=(0,i1.useSelect)(s=>{let{getBlocksByClientId:a,getBlockName:c,isBlockHiddenAnywhere:u}=M(s(_));return{canToggleBlockVisibility:a(e).every(({clientId:f})=>(0,s9.hasBlockSupport)(c(f),"visibility",!0)),areBlocksHiddenAnywhere:e?.every(f=>u(f))}},[e]),n=(0,i1.useDispatch)(_);if((0,n1.useEffect)(()=>{r&&(t.current=!0)},[r]),!r&&!t.current)return null;let{showViewportModal:i}=M(n);return(0,ED.jsx)(r1.ToolbarGroup,{className:"block-editor-block-visibility-toolbar",children:(0,ED.jsx)(r1.ToolbarButton,{disabled:!o,icon:r?vs:Af,label:r?(0,BD.__)("Hidden"):(0,BD.__)("Visible"),onClick:()=>i(e),"aria-haspopup":"dialog"})})}var ID=l(N(),1),a9=l(A(),1),s1=l(F(),1),l9=l(Is(),1);var c9=l(w(),1);function PD({clientIds:e}){let{areBlocksHiddenAnywhere:t,shortcut:o}=(0,s1.useSelect)(n=>{let{isBlockHiddenAnywhere:i}=M(n(_));return{areBlocksHiddenAnywhere:e?.every(s=>i(s)),shortcut:n(l9.store).getShortcutRepresentation("core/block-editor/toggle-block-visibility")}},[e]),{showViewportModal:r}=M((0,s1.useDispatch)(_));return(0,c9.jsx)(a9.MenuItem,{onClick:()=>r(e),shortcut:o,children:t?(0,ID.__)("Show"):(0,ID.__)("Hide")})}var Lu=l(A(),1),RD=l(F(),1),Au=l(N(),1);var wh=l(w(),1),{Badge:VSe}=M(Lu.privateApis),FSe={currentBlockVisibility:void 0,hasParentHiddenEverywhere:!1,selectedDeviceType:Et.desktop.value};function u9({clientId:e}){let{currentBlockVisibility:t,selectedDeviceType:o,hasParentHiddenEverywhere:r}=(0,RD.useSelect)(f=>{if(!e)return FSe;let{getBlockAttributes:m,isBlockParentHiddenEverywhere:h,getSettings:p}=M(f(_));return{currentBlockVisibility:m(e)?.metadata?.blockVisibility,selectedDeviceType:p()?.[wi]?.toLowerCase()||Et.desktop.value,hasParentHiddenEverywhere:h(e)}},[e]),i=Xe(e)?.ownerDocument?.defaultView,s=i===null?void 0:i,{isBlockCurrentlyHidden:a,currentViewport:c}=Mi({blockVisibility:t,deviceType:o,view:s}),u=(0,RD.useSelect)(f=>!e||!c?!1:M(f(_)).isBlockParentHiddenAtViewport(e,c),[e,c]);if(!(a||r||u))return null;let d;if(a)if(t===!1)d=(0,Au.__)("Block is hidden");else{let f=Et[c]?.label||c;d=(0,Au.sprintf)((0,Au.__)("Block is hidden on %s"),f)}if(r)d=(0,Au.__)("Parent block is hidden");else if(u){let f=Et[c]?.label||c;d=(0,Au.sprintf)((0,Au.__)("Parent block is hidden on %s"),f)}return(0,wh.jsx)(VSe,{className:"block-editor-block-visibility-info",children:(0,wh.jsxs)(Lu.__experimentalHStack,{spacing:2,justify:"start",children:[(0,wh.jsx)(Lu.Icon,{icon:vs}),(0,wh.jsx)(Lu.__experimentalText,{children:d})]})})}function ky(e={},{__unstableIsHtml:t}={}){let{clientId:o,className:r,wrapperProps:n={},isAligned:i,index:s,mode:a,name:c,blockApiVersion:u,blockTitle:d,isSelected:f,isSubtreeDisabled:m,hasOverlay:h,initialPosition:p,blockEditingMode:g,isHighlighted:b,isMultiSelected:v,isPartiallySelected:k,isReusable:y,isDragging:S,hasChildSelected:x,isEditingDisabled:C,hasEditableOutline:B,isEditingContentOnlySection:I,defaultClassName:P,isSectionBlock:E,isWithinSectionBlock:L,canMove:T,blockVisibility:O,deviceType:D}=(0,d9.useContext)(ur),U=(0,Ch.useRefEffect)(Y=>{if(Y){let{ownerDocument:J}=Y,{defaultView:K}=J;U.current=K}},[]),G=(0,a1.sprintf)((0,a1.__)("Block: %s"),d),j=a==="html"&&!t?"-visual":"",z=e9(),W=!L,ee=(0,Ch.useMergeRefs)([e.ref,U,M7({clientId:o,initialPosition:p}),VH(o),z7(o),G7({clientId:o,isSelected:f}),V7({isEnabled:W}),K7(),YC({triggerAnimationOnChange:s,clientId:o}),(0,Ch.useDisabled)({isDisabled:!h}),o1({clientId:o,isEnabled:E}),Y7({isSelected:f}),T?z:void 0]),se=Ie(),ie=!!se[Rp]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{},{isBlockCurrentlyHidden:re}=Mi({blockVisibility:O,deviceType:D,view:U.current});u<2&&o===se.clientId&&(0,m9.default)(`Block type "${c}" 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:T&&!x?!0:void 0,...n,...e,ref:ee,id:`block-${o}${j}`,role:"document","aria-label":G,"data-block":o,"data-type":c,"data-title":d,inert:m?"true":void 0,className:V("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":h,"is-selected":f,"is-highlighted":b,"is-multi-selected":v,"is-partially-selected":k,"is-reusable":y,"is-dragging":S,"has-child-selected":x,"is-editing-disabled":C,"has-editable-outline":B,"has-negative-margin":Q,"is-editing-content-only-section":I,"is-block-hidden":re},r,e.className,n.className,P),style:{...n.style,...e.style,...ie}}}ky.save=f9.__unstableGetBlockProps;var po=l(w(),1);function zSe(e,t){let o={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(o.className=V(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(o.style={...e.style,...t.style}),o}function l1({children:e,isHtml:t,...o}){return(0,po.jsx)("div",{...ky(o,{__unstableIsHtml:t}),children:e})}function OD({block:{__unstableBlockSource:e},mode:t,isLocked:o,canRemove:r,clientId:n,isSelected:i,isSelectionEnabled:s,className:a,__unstableLayoutClassNames:c,name:u,isValid:d,attributes:f,wrapperProps:m,setAttributes:h,onReplace:p,onRemove:g,onInsertBlocksAfter:b,onMerge:v,toggleSelection:k}){let{mayDisplayControls:y,mayDisplayParentControls:S,isSelectionWithinCurrentSection:x,themeSupportsLayout:C,...B}=(0,Nu.useContext)(ur),I=Uf()||{},P=(0,po.jsx)(Fw,{name:u,isSelected:i,attributes:f,setAttributes:h,insertBlocksAfter:o?void 0:b,onReplace:r?p:void 0,onRemove:r?g:void 0,mergeBlocks:r?v:void 0,clientId:n,isSelectionEnabled:s,toggleSelection:k,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(I).length?I:void 0,mayDisplayControls:y,mayDisplayParentControls:S,mayDisplayPatternEditingControls:x,blockEditingMode:B.blockEditingMode,isPreviewMode:B.isPreviewMode}),E=(0,He.getBlockType)(u);E?.getEditWrapperProps&&(m=zSe(m,E.getEditWrapperProps(f)));let L=m&&!!m["data-align"]&&!C,T=a?.includes("is-position-sticky");L&&(P=(0,po.jsx)("div",{className:V("wp-block",T&&a),"data-align":m["data-align"],children:P}));let O;if(d)t==="html"?O=(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)("div",{style:{display:"none"},children:P}),(0,po.jsx)(l1,{isHtml:!0,children:(0,po.jsx)(T8,{clientId:n})})]}):E?.apiVersion>1?O=P:O=(0,po.jsx)(l1,{children:P});else{let j=e?(0,He.serializeRawBlock)(e):(0,He.getSaveContent)(E,f);O=(0,po.jsxs)(l1,{className:"has-warning",children:[(0,po.jsx)(o8,{clientId:n}),(0,po.jsx)(Nu.RawHTML,{children:(0,h9.safeHTML)(j)})]})}let{"data-align":D,...U}=m??{},G={...U,className:V(U.className,D&&C&&`align${D}`,!(D&&T)&&a)};return(0,po.jsx)(ur.Provider,{value:{wrapperProps:G,isAligned:L,isSelectionWithinCurrentSection:x,...B},children:(0,po.jsx)(a8,{fallback:(0,po.jsx)(l1,{className:"has-warning",children:(0,po.jsx)(i8,{})}),children:O})})}var jSe=(0,c1.withDispatch)((e,t,o)=>{let{updateBlockAttributes:r,insertBlocks:n,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d,selectBlock:f}=e(_);return{setAttributes(m){let{getMultiSelectedBlockClientIds:h}=o.select(_),p=h(),{clientId:g,attributes:b}=t,v=p.length?p:[g],k=typeof m=="function"?m(b):m;r(v,k)},onInsertBlocks(m,h){let{rootClientId:p}=t;n(m,h,p)},onInsertBlocksAfter(m){let{clientId:h,rootClientId:p}=t,{getBlockIndex:g}=o.select(_),b=g(h);n(m,b+1,p)},onMerge(m){let{clientId:h,rootClientId:p}=t,{getPreviousBlockClientId:g,getNextBlockClientId:b,getBlock:v,getBlockAttributes:k,getBlockName:y,getBlockOrder:S,getBlockIndex:x,getBlockRootClientId:C,canInsertBlockType:B}=o.select(_);function I(){let E=v(h),L=(0,He.getDefaultBlockName)(),T=(0,He.getBlockType)(L);if(y(h)!==L){let O=(0,He.switchToBlockType)(E,L);O&&O.length&&s(h,O)}else if((0,He.isUnmodifiedDefaultBlock)(E)){let O=b(h);O&&o.batch(()=>{d(h),f(O)})}else if(T.merge){let O=T.merge({},E.attributes);s([h],[(0,He.createBlock)(L,O)])}}function P(E,L=!0){let T=y(E),D=(0,He.getBlockType)(T).category==="text",U=C(E),G=S(E),[j]=G;G.length===1&&(0,He.isUnmodifiedBlock)(v(j))?d(E):D?o.batch(()=>{if(B(y(j),U))u([j],E,U,x(E));else{let z=(0,He.switchToBlockType)(v(j),(0,He.getDefaultBlockName)());z&&z.length&&z.every(W=>B(W.name,U))?(n(z,x(E),U,L),d(j,!1)):I()}!S(E).length&&(0,He.isUnmodifiedBlock)(v(E))&&d(E,!1)}):I()}if(m){if(p){let L=b(p);if(L)if(y(p)===y(L)){let T=k(p),O=k(L);if(Object.keys(T).every(D=>T[D]===O[D])){o.batch(()=>{u(S(L),L,p),d(L,!1)});return}}else{i(p,L);return}}let E=b(h);if(!E)return;S(E).length?P(E,!1):i(h,E)}else{let E=g(h);if(E)i(E,h);else if(p){let L=g(p);if(L&&y(p)===y(L)){let T=k(p),O=k(L);if(Object.keys(T).every(D=>T[D]===O[D])){o.batch(()=>{u(S(p),p,L),d(p,!1)});return}}P(p)}else I()}},onReplace(m,h,p){m.length&&!(0,He.isUnmodifiedDefaultBlock)(m[m.length-1])&&c();let g=m?.length===1&&Array.isArray(m[0])?m[0]:m;s([t.clientId],g,h,p)},onRemove(){d(t.clientId)},toggleSelection(m){a(m)}}});OD=(0,u1.compose)(jSe,(0,p9.withFilters)("editor.BlockListBlock"))(OD);function USe(e){let{clientId:t,rootClientId:o}=e,r=(0,c1.useSelect)(ne=>{let{isBlockSelected:le,getBlockMode:ve,isSelectionEnabled:he,getTemplateLock:xe,isSectionBlock:ze,getParentSectionBlock:ot,getBlockWithoutAttributes:Wt,getBlockAttributes:fo,canRemoveBlock:Do,canMoveBlock:rt,getSettings:ar,getEditedContentOnlySection:xt,getBlockEditingMode:At,getBlockName:Pe,isFirstMultiSelectedBlock:wt,getMultiSelectedBlockClientIds:qo,hasSelectedInnerBlock:$t,getBlocksByName:lr,getBlockIndex:ln,isBlockMultiSelected:je,isBlockSubtreeDisabled:Eo,isBlockHighlighted:Ze,__unstableIsFullySelected:Ve,__unstableSelectionHasUnmergeableBlock:gt,isBlockBeingDragged:To,isDragging:cr,__unstableHasActiveBlockOverlayActive:ge,getSelectedBlocksInitialCaretPosition:Ct}=M(ne(_)),Io=Wt(t);if(!Io)return;let{hasBlockSupport:Ke,getActiveBlockVariation:te}=ne(He.store),Le=fo(t),{name:ct,isValid:Gc}=Io,ua=(0,He.getBlockType)(ct),Bp=ar(),{supportsLayout:jk,isPreviewMode:hf,__experimentalBlockBindingsSupportedAttributes:cn}=Bp,Ep=cn?.[ct],Tp=Le?.metadata?.blockVisibility,s0=Bp?.[wi]?.toLowerCase()||"desktop",a0=ua?.apiVersion>1,Uk=je(t),ue=At(t),to={isPreviewMode:hf,blockWithoutAttributes:Io,name:ct,attributes:Le,isValid:Gc,themeSupportsLayout:jk,index:ln(t),isReusable:(0,He.isReusableBlock)(ua),className:a0?Le.className:void 0,defaultClassName:a0?(0,He.getBlockDefaultClassName)(ct):void 0,blockTitle:ua?.title,bindableAttributes:Ep,blockVisibility:Tp,deviceType:s0,isMultiSelected:Uk,blockEditingMode:ue,isEditingDisabled:ue==="disabled"};if(hf)return to;let ye=le(t),Lt=Do(t),un=rt(t),_r=te(ct,Le),Wc=!0,mO=$t(t,Wc),pO=ze(t)?t:ot(t),hO=(0,He.hasBlockSupport)(ct,"multiple",!0)?[]:lr(ct),Ume=hO.length&&hO[0]!==t;return{...to,mode:ve(t),isSelectionEnabled:he(),isLocked:!!xe(o),isSectionBlock:ze(t),isWithinSectionBlock:!!pO,isSelectionWithinCurrentSection:le(pO)||$t(pO,Wc),blockType:ua,canRemove:Lt,canMove:un,isSelected:ye,isEditingContentOnlySection:xt()===t,blockEditingMode:ue,mayDisplayControls:ye||wt(t)&&qo().every(Hme=>Pe(Hme)===ct),mayDisplayParentControls:Ke(Pe(t),"__experimentalExposeControlsToChildren",!1)&&$t(t),blockApiVersion:ua?.apiVersion||1,blockTitle:_r?.title||ua?.title,isSubtreeDisabled:ue==="disabled"&&Eo(t),hasOverlay:ge(t)&&!cr(),initialPosition:ye?Ct():void 0,isHighlighted:Ze(t),isMultiSelected:Uk,isPartiallySelected:Uk&&!Ve()&&!gt(),isDragging:To(t),hasChildSelected:mO,isEditingDisabled:ue==="disabled",hasEditableOutline:ue!=="disabled"&&At(o)==="disabled",originalBlockClientId:Ume?hO[0]:!1,blockVisibility:Tp,deviceType:s0}},[t,o]),n=(0,u1.useRefEffect)(ne=>{if(ne){let{ownerDocument:le}=ne,{defaultView:ve}=le;n.current=ve}},[]),{isBlockCurrentlyHidden:i}=Mi({blockVisibility:r?.blockVisibility,deviceType:r?.deviceType,view:n.current}),s=(0,Nu.useMemo)(()=>({...r?.blockWithoutAttributes,attributes:r?.attributes}),[r?.blockWithoutAttributes,r?.attributes]);if(!r)return null;let{isPreviewMode:a,mode:c="visual",isSelectionEnabled:u=!1,isLocked:d=!1,canRemove:f=!1,canMove:m=!1,name:h,attributes:p,isValid:g,isSelected:b=!1,themeSupportsLayout:v,isEditingContentOnlySection:k,blockEditingMode:y,mayDisplayControls:S,mayDisplayParentControls:x,index:C,blockApiVersion:B,blockType:I,blockTitle:P,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,isHighlighted:O,isMultiSelected:D,isPartiallySelected:U,isReusable:G,isDragging:j,hasChildSelected:z,isSectionBlock:W,isWithinSectionBlock:ee,isSelectionWithinCurrentSection:se,isEditingDisabled:ce,hasEditableOutline:ie,className:re,defaultClassName:Q,originalBlockClientId:Y,bindableAttributes:J,blockVisibility:K,deviceType:H}=r,X={isPreviewMode:a,clientId:t,className:re,index:C,mode:c,name:h,blockApiVersion:B,blockType:I,blockTitle:P,isSelected:b,isSubtreeDisabled:E,hasOverlay:L,initialPosition:T,blockEditingMode:y,isHighlighted:O,isMultiSelected:D,isPartiallySelected:U,isReusable:G,isDragging:j,hasChildSelected:z,isSectionBlock:W,isWithinSectionBlock:ee,isSelectionWithinCurrentSection:se,isEditingDisabled:ce,hasEditableOutline:ie,isEditingContentOnlySection:k,defaultClassName:Q,mayDisplayControls:S,mayDisplayParentControls:x,originalBlockClientId:Y,themeSupportsLayout:v,canMove:m,isBlockCurrentlyHidden:i,bindableAttributes:J,blockVisibility:K,deviceType:H};return i&&!b&&!D&&!z?null:(0,po.jsx)(ur.Provider,{value:X,children:(0,po.jsx)(OD,{...e,mode:c,isSelectionEnabled:u,isLocked:d,canRemove:f,canMove:m,block:s,name:h,attributes:p,isValid:g,isSelected:b})})}var g9=(0,Nu.memo)(USe);var Y5=l(F(),1),uY=l($(),1);var $5=l(N(),1),iY=l(SM(),1),AB=l(F(),1),LB=l(it(),1);var rY=l(Xo(),1),Gl=l(N(),1),PB=l(A(),1),nY=l(R(),1),RB=l(F(),1),OB=l(Z(),1),Yy=l($(),1);var Ft=l(R(),1),lg=l(A(),1),Xu=l(N(),1),Wy=l(Z(),1),QK=l(F(),1);var Bh=l(N(),1),Eh=l(R(),1),k9=l(A(),1),vy=l(w(),1),b9=[(0,Eh.createInterpolateElement)((0,Bh.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,vy.jsx)("kbd",{})}),(0,Eh.createInterpolateElement)((0,Bh.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,vy.jsx)("kbd",{})}),(0,Eh.createInterpolateElement)((0,Bh.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,vy.jsx)("kbd",{})}),(0,Bh.__)("Drag files into the editor to automatically insert media blocks."),(0,Bh.__)("Change a block's type by pressing the block icon on the toolbar.")];function HSe(){let[e]=(0,Eh.useState)(Math.floor(Math.random()*b9.length));return(0,vy.jsx)(k9.Tip,{children:b9[e]})}var v9=HSe;var $h=l($(),1),N$=l(R(),1),M$=l(N(),1);var bn=l(A(),1),d1=l(F(),1),y9=l(Re(),1),Mu=l(N(),1);var f1=l($(),1);var Cr=l(w(),1),{Badge:GSe}=M(bn.privateApis);function WSe({children:e,onClick:t}){return t?(0,Cr.jsx)(bn.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-card__parent-select-button",onClick:t,children:e}):e}function $Se({title:e,icon:t,description:o,blockType:r,className:n,name:i,allowParentNavigation:s,parentClientId:a,isChild:c,children:u,clientId:d}){r&&((0,y9.default)("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),{title:e,icon:t,description:o}=r);let{parentBlockClientId:f,parentBlockName:m}=(0,d1.useSelect)(g=>{if(a||c||!s)return{};let{getBlockParents:b,getBlockName:v}=g(_),y=b(d,!1).find(S=>{let x=v(S);return x==="core/navigation"||(0,f1.hasBlockSupport)(x,"listView")});return{parentBlockClientId:y,parentBlockName:y?v(y):null}},[d,s,c,a]),{selectBlock:h}=(0,d1.useDispatch)(_),p=a?"div":"h2";return(0,Cr.jsx)("div",{className:V("block-editor-block-card",{"is-parent":a,"is-child":c},n),children:(0,Cr.jsxs)(bn.__experimentalVStack,{children:[(0,Cr.jsxs)(bn.__experimentalHStack,{justify:"flex-start",spacing:0,children:[f&&(0,Cr.jsx)(bn.Button,{onClick:()=>h(f),label:m?(0,Mu.sprintf)((0,Mu.__)('Go to "%s" block'),(0,f1.getBlockType)(m)?.title):(0,Mu.__)("Go to parent block"),style:{minWidth:24,padding:0},icon:(0,Mu.isRTL)()?Vo:Mr,size:"small"}),c&&(0,Cr.jsx)("span",{className:"block-editor-block-card__child-indicator-icon",children:(0,Cr.jsx)(bn.Icon,{icon:(0,Mu.isRTL)()?Xk:Qk})}),(0,Cr.jsxs)(WSe,{onClick:a?()=>{h(a)}:void 0,children:[(0,Cr.jsx)(Ae,{icon:t,showColors:!0}),(0,Cr.jsxs)(bn.__experimentalVStack,{spacing:1,children:[(0,Cr.jsxs)(p,{className:"block-editor-block-card__title",children:[(0,Cr.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!a&&!c&&!!i?.length&&(0,Cr.jsx)(GSe,{children:e})]}),u]})]})]}),!a&&!c&&o&&(0,Cr.jsx)(bn.__experimentalText,{className:"block-editor-block-card__description",children:o})]})})}var yy=$Se;var Z1=l(Z(),1),w5=l(F(),1),sm=l(R(),1),x5=l(Re(),1);var z9=l(F(),1),Du=l(R(),1),j9=l(A(),1),tm=l(_9(),1);var x9=l(R(),1),Th=l(F(),1),w9=l(Z(),1);var m1=l(w(),1);function KSe(e,t,o){if(!o)return t;let r=e.get(t);return r||(r=(0,Th.createRegistry)({},t),r.registerStore(Kt,Qp),e.set(t,r)),r}var YSe=(0,w9.createHigherOrderComponent)(e=>function({useSubRegistry:o=!0,...r}){let n=(0,Th.useRegistry)(),[i]=(0,x9.useState)(()=>new WeakMap),s=KSe(i,n,o);return s===n?(0,m1.jsx)(e,{registry:n,...r}):(0,m1.jsx)(Th.RegistryProvider,{value:s,children:(0,m1.jsx)(e,{registry:s,...r})})},"withRegistryProvider"),C9=YSe;var Wr=l(R(),1),I9=l(F(),1),P9=l($(),1);var B9=l(R(),1),qSe=()=>{},p1=(0,B9.createContext)({getSelection:()=>{},onChangeSelection:qSe});var E9=()=>{};function R9(e,t){let o=(0,P9.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=>R9(r,t))),o}function O9(e,t){return e.map(o=>{let r=t.internalToExternal.get(o.clientId);return{...o,clientId:r??o.clientId,innerBlocks:O9(o.innerBlocks,t)}})}function T9(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 h1({clientId:e=null,value:t,onChange:o=E9,onInput:r=E9}){let n=(0,I9.useRegistry)(),{getSelection:i,onChangeSelection:s}=(0,Wr.useContext)(p1),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_),{getBlockName:m,getBlocks:h,getSelectionStart:p,getSelectionEnd:g}=n.select(_),b=(0,Wr.useRef)({incoming:null,outgoing:[]}),v=(0,Wr.useRef)(!1),k=(0,Wr.useRef)({externalToInternal:new Map,internalToExternal:new Map}),y=(0,Wr.useRef)(null),S=(0,Wr.useRef)(!1),x=()=>{let E=i();if(!E?.selectionStart?.clientId||E===y.current)return;let L=E.selectionStart.clientId;if(e?k.current.externalToInternal.has(L):!!m(L)){y.current=E;let O=D=>!D?.clientId||!e?D:{...D,clientId:k.current.externalToInternal.get(D.clientId)??D.clientId};S.current=!0,c(O(E.selectionStart),O(E.selectionEnd),E.initialPosition),S.current=!1}},C=()=>{t&&(e?n.batch(()=>{k.current.externalToInternal.clear(),k.current.internalToExternal.clear();let E=t.map(L=>R9(L,k.current));d(e,!0),v.current&&(b.current.incoming=E),f(),u(e,E),y.current=null}):(v.current&&(b.current.incoming=t),f(),a(t)))},B=()=>{f(),e?(d(e,!1),f(),u(e,[])):a([])},I=(0,Wr.useRef)(r),P=(0,Wr.useRef)(o);(0,Wr.useEffect)(()=>{I.current=r,P.current=o},[r,o]),(0,Wr.useEffect)(()=>{let E=b.current.outgoing.includes(t),L=h(e)===t;E?b.current.outgoing[b.current.outgoing.length-1]===t&&(b.current.outgoing=[]):L||(b.current.outgoing=[],C(),x())},[t,e]),(0,Wr.useEffect)(()=>{let{getSelectedBlocksInitialCaretPosition:E,isLastBlockChangePersistent:L,__unstableIsLastBlockChangeIgnored:T,areInnerBlocksControlled:O,getBlockParents:D}=n.select(_),U=h(e),G=L(),j=!1,z=p(),W=g();v.current=!0;let ee=n.subscribe(()=>{if(e!==null&&m(e)===null)return;let se=L(),ce=h(e),ie=ce!==U;if(U=ce,ie&&(b.current.incoming||T())){b.current.incoming=null,G=se;return}let Q=ie||j&&!ie&&se&&!G,Y=p(),J=g(),K=Y!==z||J!==W;K&&(z=Y,W=J),(Q||K)&&n.batch(()=>{if(Q){G=se;let H=e?O9(U,k.current):U,X={selectionStart:Y,selectionEnd:J,initialPosition:E()},ne=e?T9(X,k.current):X;b.current.outgoing.push(H),(G?P.current:I.current)(H,{selection:ne})}if(K&&!Q&&Y?.clientId&&!S.current&&(e?k.current.internalToExternal.has(Y.clientId):!D(Y.clientId).some(X=>O(X)))){let X={selectionStart:Y,selectionEnd:J,initialPosition:E()};s(e?T9(X,k.current):X)}}),j=ie},_);return()=>{v.current=!1,ee()}},[n,e]),(0,Wr.useEffect)(()=>()=>{B()},[])}var A9=l(R(),1),L9=l(F(),1),N9=l(Is(),1),ho=l(N(),1);function M9(){return null}function ZSe(){let{registerShortcut:e}=(0,L9.useDispatch)(N9.store);return(0,A9.useEffect)(()=>{e({name:"core/block-editor/copy",category:"block",description:(0,ho.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,ho.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,ho.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,ho.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,ho.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,ho.__)("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,ho.__)("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,ho.__)("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,ho.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/stop-editing-as-blocks",category:"block",description:(0,ho.__)("Finish editing a design."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/select-all",category:"selection",description:(0,ho.__)("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,ho.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,ho.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,ho.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,ho.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,ho.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,ho.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,ho.__)("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,ho.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}}),e({name:"core/block-editor/rename",category:"block",description:(0,ho.__)("Rename the selected block."),keyCombination:{modifier:"primaryAlt",character:"r"}})},[e]),null}M9.Register=ZSe;var g1=M9;var D9=l(R(),1);function XSe(e={}){return(0,D9.useMemo)(()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,mediaFinalize:e.mediaFinalize,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes,allImageSizes:e.allImageSizes,bigImageSizeThreshold:e.bigImageSizeThreshold}),[e])}var V9=XSe;var Al=l(w(),1),AD=()=>{},F9=!1,Ih=null;function QSe(){if(Ih!==null)return Ih;if(!window.__clientSideMediaProcessing||typeof tm.detectClientSideMediaSupport!="function")return Ih=!1,!1;let e=(0,tm.detectClientSideMediaSupport)();return!e||!e.supported?(F9||(console.info(`Client-side media processing unavailable: ${e.reason}. Using server-side processing.`),F9=!0),Ih=!1,!1):(Ih=!0,!0)}function JSe(e,t,{allowedTypes:o,additionalData:r={},filesList:n,onError:i=AD,onFileChange:s,onSuccess:a,onBatchSuccess:c}){e.dispatch(tm.store).addItems({files:Array.from(n),onChange:s,onSuccess:u=>{t?.[C0]?.(u),a?.(u)},onBatchSuccess:c,onError:u=>i(typeof u=="string"?u:u?.message??""),additionalData:r,allowedTypes:o})}function e_e(e){return h1(e),null}var Ph=C9(e=>{let{settings:t,registry:o,stripExperimentalSettings:r=!1}=e,n=V9(t),i=QSe(),s=!!t?.mediaUpload?.__isMediaUploadInterceptor,a=(0,Du.useMemo)(()=>{if(i&&t?.mediaUpload&&!s){let p=JSe.bind(null,o,t);return p.__isMediaUploadInterceptor=!0,{...t,mediaUpload:p}}return t},[t,o,i,s]),{__experimentalUpdateSettings:c}=M((0,z9.useDispatch)(_));(0,Du.useEffect)(()=>{c({...a,__internalIsInitialized:!0},{stripExperimentalSettings:r,reset:!0})},[a,r,c]);let u=(0,Du.useRef)(e.selection);u.current=e.selection;let d=(0,Du.useRef)(e.onChangeSelection??AD);d.current=e.onChangeSelection??AD;let f=(0,Du.useMemo)(()=>({getSelection:()=>u.current,onChangeSelection:(...p)=>d.current(...p)}),[]),m=(0,Al.jsxs)(j9.SlotFillProvider,{passthrough:!0,children:[!a?.isPreviewMode&&(0,Al.jsx)(g1.Register,{}),(0,Al.jsx)(MH,{children:e.children})]}),h=(0,Al.jsxs)(p1.Provider,{value:f,children:[(0,Al.jsx)(e_e,{clientId:e.clientId,value:e.value,onChange:e.onChange,onInput:e.onInput}),m]});return i&&!s?(0,Al.jsx)(tm.MediaUploadProvider,{settings:n,useSubRegistry:!1,children:h}):h}),t_e=e=>(0,Al.jsx)(Ph,{...e,stripExperimentalSettings:!0,children:e.children}),U9=t_e;var Dy=l(Z(),1),C$=l(F(),1),q1=l(R(),1),B$=l(A(),1);var om=l(R(),1),TG=l(N(),1),Vu=l(Z(),1),IG=l(A(),1),zD=l(F(),1);var SG=l(F(),1),_G=l(N(),1),wy=l(Z(),1),xG=l(R(),1);var H9=l(Z(),1),G9=l(F(),1);function o_e(e){let{isMultiSelecting:t,getMultiSelectedBlockClientIds:o,hasMultiSelection:r,getSelectedBlockClientId:n,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(_);return{isMultiSelecting:t(),multiSelectedBlockClientIds:o(),hasMultiSelection:r(),selectedBlockClientId:n(),initialPosition:i(),isFullSelection:s()}}function W9(){let{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:o,hasMultiSelection:r,selectedBlockClientId:n,isFullSelection:i}=(0,G9.useSelect)(o_e,[]);return(0,H9.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;if(e==null||!r||t)return;let{length:u}=o;u<2||i&&(s.contentEditable=!0,s.focus(),c.getSelection().removeAllRanges())},[r,t,o,n,e,i])}var Rh=l(Fe(),1),LD=l(it(),1),b1=l(F(),1),k1=l(Z(),1),Sy=l(R(),1);var ND=l(w(),1);function $9(){let e=(0,Sy.useRef)(),t=(0,Sy.useRef)(),o=(0,Sy.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:n,getBlockCount:i,getBlockOrder:s,getLastFocus:a,getSectionRootClientId:c,isZoomOut:u}=M((0,b1.useSelect)(_)),{setLastFocus:d}=M((0,b1.useDispatch)(_)),f=(0,Sy.useRef)();function m(v){let k=e.current.ownerDocument===v.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(f.current)f.current=null;else if(r())e.current.focus();else if(n())a()?.current?a().current.focus():e.current.querySelector(`[data-block="${n()}"]`).focus();else if(u()){let y=c(),S=s(y);S.length?e.current.querySelector(`[data-block="${S[0]}"]`).focus():y?e.current.querySelector(`[data-block="${y}"]`).focus():k.focus()}else{let y=v.target.compareDocumentPosition(k)&v.target.DOCUMENT_POSITION_FOLLOWING,S=Rh.focus.tabbable.find(e.current);S.length&&(y?S[0]:S[S.length-1]).focus()}}let h=(0,ND.jsx)("div",{ref:t,tabIndex:"0",onFocus:m}),p=(0,ND.jsx)("div",{ref:o,tabIndex:"0",onFocus:m}),g=(0,k1.useRefEffect)(v=>{function k(B){if(B.defaultPrevented||B.keyCode!==LD.TAB||!o.current||!t.current)return;let{target:I,shiftKey:P}=B,E=P?"findPrevious":"findNext",L=Rh.focus.tabbable[E](I),T=I.closest("[data-block]"),O=T&&L&&(L7(T,L)||va(T,L));if((0,Rh.isFormElement)(L)&&O)return;let D=P?t:o;f.current=!0,D.current.focus({preventScroll:!0})}function y(B){d({...a(),current:B.target});let{ownerDocument:I}=v;!B.relatedTarget&&B.target.hasAttribute("data-block")&&I.activeElement===I.body&&i()===0&&v.focus()}function S(B){if(B.keyCode!==LD.TAB||B.target?.getAttribute("role")==="region"||e.current===B.target)return;let P=B.shiftKey?"findPrevious":"findNext",E=Rh.focus.tabbable[P](B.target);(E===t.current||E===o.current)&&(B.preventDefault(),E.focus({preventScroll:!0}))}let{ownerDocument:x}=v,{defaultView:C}=x;return C.addEventListener("keydown",S),v.addEventListener("keydown",k),v.addEventListener("focusout",y),()=>{C.removeEventListener("keydown",S),v.removeEventListener("keydown",k),v.removeEventListener("focusout",y)}},[]),b=(0,k1.useMergeRefs)([e,g]);return[h,b,p]}var go=l(Fe(),1),ya=l(it(),1),v1=l(F(),1),K9=l(Z(),1);function r_e(e,t,o){let r=t===ya.UP||t===ya.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 MD(e,t,o,r){let n=go.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"&&Ni(a)&&go.focus.focusable.find(a).filter(c=>!(0,go.isFormElement)(c)).length!==0||!go.focus.tabbable.isTabbableIndex(a)||a.isContentEditable&&a.contentEditable!=="true")return!1;if(r){let c=a.getBoundingClientRect();if(c.left>=i.right||c.right<=i.left)return!1}return!0}return n.find(s)}function Y9(){let{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:o,hasMultiSelection:r,__unstableIsFullySelected:n}=(0,v1.useSelect)(_),{selectBlock:i}=(0,v1.useDispatch)(_);return(0,K9.useRefEffect)(s=>{let a;function c(){a=null}function u(f,m){let h=MD(f,m,s);return h&&Ni(h)}function d(f){if(f.defaultPrevented)return;let{keyCode:m,target:h,shiftKey:p,ctrlKey:g,altKey:b,metaKey:v}=f,k=m===ya.UP,y=m===ya.DOWN,S=m===ya.LEFT,x=m===ya.RIGHT,C=k||S,B=S||x,I=k||y,P=B||I,E=p||g||b||v,L=I?go.isVerticalEdge:go.isHorizontalEdge,{ownerDocument:T}=s,{defaultView:O}=T;if(!P||o().isPreviewMode)return;if(r()){if(p||!n())return;f.preventDefault(),C?i(e()):i(t(),-1);return}if(!r_e(h,m,E))return;I?a||(a=(0,go.computeCaretRect)(O)):a=null;let D=(0,go.isRTL)(h)?!C:C,{keepCaretInsideBlock:U}=o();if(p)u(h,C)&&L(h,C)&&(s.contentEditable=!0,s.focus());else if(I&&(0,go.isVerticalEdge)(h,C)&&(!b||(0,go.isHorizontalEdge)(h,D))&&!U){let G=MD(h,C,s,!0);G&&((0,go.placeCaretAtVerticalEdge)(G,b?!C:C,b?void 0:a),f.preventDefault())}else if(B&&O.getSelection().isCollapsed&&(0,go.isHorizontalEdge)(h,D)&&!U){let G=MD(h,D,s);(0,go.placeCaretAtHorizontalEdge)(G,C),f.preventDefault()}}return s.addEventListener("mousedown",c),s.addEventListener("keydown",d),()=>{s.removeEventListener("mousedown",c),s.removeEventListener("keydown",d)}},[])}var q9=l(Z(),1),Z9=l(F(),1),Sa=l(it(),1);function X9(){let e=(0,Z9.useSelect)(t=>t(_).getSettings().isPreviewMode,[]);return(0,q9.useRefEffect)(t=>{if(!e)return;function o(r){let{keyCode:n,shiftKey:i,target:s}=r,a=n===Sa.TAB,c=n===Sa.UP,u=n===Sa.DOWN,d=n===Sa.LEFT;if(!a&&!(c||u||d||n===Sa.RIGHT))return;let h=a?i:c||d,p=Array.from(t.querySelectorAll("[data-block]"));if(!p.length)return;let g=s.closest("[data-block]"),b=g?p.indexOf(g):-1;if(b===-1||a&&(h&&b===0||!h&&b===p.length-1))return;let v;h?v=b<=0?p.length-1:b-1:v=b===-1||b>=p.length-1?0:b+1,r.preventDefault(),p[v].focus()}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[e])}var Q9=l(Fe(),1),y1=l(F(),1),J9=l(Is(),1),eG=l(Z(),1);function tG(){let{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:o}=(0,y1.useSelect)(_),{multiSelect:r,selectBlock:n}=(0,y1.useDispatch)(_),i=(0,J9.__unstableUseShortcutEventMatch)();return(0,eG.useRefEffect)(s=>{function a(c){if(!i("core/block-editor/select-all",c))return;let u=t();if(u.length<2&&!(0,Q9.isEntirelySelected)(c.target))return;c.preventDefault();let{ownerDocument:d}=c.target,[f]=u,m=Ni(d.activeElement);if(m&&m!==f&&!va(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 S1=l(F(),1),rG=l(Z(),1);function oG(e,t){e.contentEditable=t,t&&e.focus()}function nG(){let{startMultiSelect:e,stopMultiSelect:t}=(0,S1.useDispatch)(_),{getSettings:o,isSelectionEnabled:r,hasSelectedBlock:n,isDraggingBlocks:i,isMultiSelecting:s}=(0,S1.useSelect)(_);return(0,rG.useRefEffect)(a=>{let{ownerDocument:c}=a,{defaultView:u}=c,d,f;function m(){t(),u.removeEventListener("mouseup",m),f=u.requestAnimationFrame(()=>{if(!n())return;oG(a,!1);let b=u.getSelection();if(b.rangeCount){let v=b.getRangeAt(0),{commonAncestorContainer:k}=v,y=v.cloneRange();d.contains(k)&&(d.focus(),b.removeAllRanges(),b.addRange(y))}})}let h;function p({target:b}){h=b}function g({buttons:b,target:v,relatedTarget:k}){v.contains(h)&&(v.contains(k)||i()||b===1&&(s()||a!==v&&(v.getAttribute("contenteditable")!=="true"&&!o().isPreviewMode||r()&&(d=v,e(),u.addEventListener("mouseup",m),oG(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 _1=l(F(),1),aG=l(Z(),1),DD=l(dr(),1),lG=l(Fe(),1);function n_e(e){let{anchorNode:t,anchorOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===0?t:t.childNodes[o-1]}function i_e(e){let{focusNode:t,focusOffset:o}=e;return t.nodeType===t.TEXT_NODE||o===t.childNodes.length?t:o===0&&(0,lG.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[o]}function s_e(e,t){let o=0;for(;e[o]===t[o];)o++;return o}function iG(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function sG(e){return(e.nodeType===e.ELEMENT_NODE?e:e.parentElement)?.closest("[data-wp-block-attribute-key]")}function cG(){let{multiSelect:e,selectBlock:t,selectionChange:o}=(0,_1.useDispatch)(_),{getBlockParents:r,getBlockSelectionStart:n,isMultiSelecting:i}=(0,_1.useSelect)(_);return(0,aG.useRefEffect)(s=>{let{ownerDocument:a}=s,{defaultView:c}=a;function u(d){let f=c.getSelection();if(!f.rangeCount)return;let m=n_e(f),h=i_e(f);if(!s.contains(m)||!s.contains(h))return;let p=d.shiftKey&&d.type==="mouseup";if(f.isCollapsed&&!p){if(s.contentEditable==="true"&&!i()){iG(s,!1);let k=m.nodeType===m.ELEMENT_NODE?m:m.parentElement;k=k?.closest("[contenteditable]"),k?.focus()}return}let g=Ni(m),b=Ni(h);if(p){let k=n(),y=Ni(d.target),S=y!==b;(g===b&&f.isCollapsed||!b||S)&&(b=y),g!==k&&(g=k)}if(g===void 0&&b===void 0){iG(s,!1);return}if(d.type==="mouseup"&&!d.shiftKey&&!i()&&g===b){let k=Ni(d.target);if(k&&k!==g){f.removeAllRanges();return}}if(g===b)i()?e(g,g):t(g);else{let k=[...r(g),g],y=[...r(b),b],S=s_e(k,y);if(k[S]!==g||y[S]!==b){e(k[S],y[S]);return}let x=sG(m),C=sG(h);if(x&&C){let B=f.getRangeAt(0),I=(0,DD.create)({element:x,range:B,__unstableIsEditableTree:!0}),P=(0,DD.create)({element:C,range:B,__unstableIsEditableTree:!0}),E=I.start??I.end,L=P.start??P.end;o({start:{clientId:g,attributeKey:x.dataset.wpBlockAttributeKey,offset:E},end:{clientId:b,attributeKey:C.dataset.wpBlockAttributeKey,offset:L}})}else e(g,b)}}return a.addEventListener("selectionchange",u),c.addEventListener("mouseup",u),()=>{a.removeEventListener("selectionchange",u),c.removeEventListener("mouseup",u)}},[e,t,o,r])}var x1=l(F(),1),uG=l(Z(),1);function dG(){let{selectBlock:e}=(0,x1.useDispatch)(_),{isSelectionEnabled:t,getBlockSelectionStart:o,hasMultiSelection:r}=(0,x1.useSelect)(_);return(0,uG.useRefEffect)(n=>{function i(s){if(!t()||s.button!==0)return;let a=o(),c=Ni(s.target);s.shiftKey?a&&a!==c&&(n.contentEditable=!0,n.focus()):r()&&e(c)}return n.addEventListener("mousedown",i),()=>{n.removeEventListener("mousedown",i)}},[e,t,o,r])}var w1=l(F(),1),fG=l(Z(),1),Ll=l(it(),1),Ps=l($(),1);function mG(){let{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:o,__unstableIsSelectionMergeable:r,hasMultiSelection:n,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:a,getSelectionStart:c,getSelectionEnd:u,getBlockAttributes:d}=(0,w1.useSelect)(_),{replaceBlocks:f,__unstableSplitSelection:m,removeBlocks:h,__unstableDeleteSelection:p,__unstableExpandSelection:g,__unstableMarkAutomaticChange:b}=(0,w1.useDispatch)(_);return(0,fG.useRefEffect)(v=>{function k(x){v.contentEditable==="true"&&x.preventDefault()}function y(x){if(!x.defaultPrevented){if(!n()){if(x.keyCode===Ll.ENTER){if(x.shiftKey||e())return;let C=o(),B=i(C),I=c(),P=u();if(I.attributeKey===P.attributeKey){let E=d(C)[I.attributeKey],L=(0,Ps.getBlockTransforms)("from").filter(({type:O})=>O==="enter"),T=(0,Ps.findTransform)(L,O=>O.regExp.test(E));if(T){f(C,T.transform({content:E})),b();return}}if(!(0,Ps.hasBlockSupport)(B,"splitting",!1)&&!x.__deprecatedOnSplit)return;(s((0,Ps.getDefaultBlockName)(),a(C))||s(B,a(C)))&&(m(),x.preventDefault())}return}x.keyCode===Ll.ENTER?(v.contentEditable=!1,x.preventDefault(),e()?f(t(),(0,Ps.createBlock)((0,Ps.getDefaultBlockName)())):m()):x.keyCode===Ll.BACKSPACE||x.keyCode===Ll.DELETE?(v.contentEditable=!1,x.preventDefault(),e()?h(t()):r()?p(x.keyCode===Ll.DELETE):g()):x.key.length===1&&!(x.metaKey||x.ctrlKey)&&(v.contentEditable=!1,r()?p(x.keyCode===Ll.DELETE):(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}}function S(x){n()&&(v.contentEditable=!1,r()?p():(x.preventDefault(),v.ownerDocument.defaultView.getSelection().removeAllRanges()))}return v.addEventListener("beforeinput",k),v.addEventListener("keydown",y),v.addEventListener("compositionstart",S),()=>{v.removeEventListener("beforeinput",k),v.removeEventListener("keydown",y),v.removeEventListener("compositionstart",S)}},[])}var _a=l($(),1),B1=l(Fe(),1),Lh=l(F(),1),yG=l(Z(),1);var pG=l(R(),1),hG=l($(),1),_y=l(F(),1),Di=l(N(),1),gG=l(Un(),1);function Oh(){let{getBlockName:e}=(0,_y.useSelect)(_),{getBlockType:t}=(0,_y.useSelect)(hG.store),{createSuccessNotice:o}=(0,_y.useDispatch)(gG.store);return(0,pG.useCallback)((r,n)=>{let i="";if(r==="copyStyles")i=(0,Di.__)("Styles copied to clipboard.");else if(n.length===1){let s=n[0],a=t(e(s))?.title;r==="copy"?i=(0,Di.sprintf)((0,Di.__)('Copied "%s" to clipboard.'),a):i=(0,Di.sprintf)((0,Di.__)('Moved "%s" to clipboard.'),a)}else r==="copy"?i=(0,Di.sprintf)((0,Di._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",n.length),n.length):i=(0,Di.sprintf)((0,Di._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",n.length),n.length);o(i,{type:"snackbar"})},[o,e,t])}var kG=l(Fe(),1),Vi=l($(),1);var bG=l(Fe(),1);function a_e(e){let t="<!--StartFragment-->",o=e.indexOf(t);if(o>-1)e=e.substring(o+t.length);else return e;let n=e.indexOf("<!--EndFragment-->");return n>-1&&(e=e.substring(0,n)),e}function l_e(e){let t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}function Ah({clipboardData:e}){let t="",o="";try{t=e.getData("text/plain"),o=e.getData("text/html")}catch{return}o=a_e(o),o=l_e(o);let r=(0,bG.getFilesFromDataTransfer)(e);return r.length&&!c_e(r,o)?{files:r}:{html:o,plainText:t,files:[]}}function c_e(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){let o=/<\s*img\b/gi;if(t.match(o)?.length!==1)return!0;let r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}var VD=Symbol("requiresWrapperOnCopy");function C1(e,t,o){let r=t,[n]=t;if(n&&o.select(Vi.store).getBlockType(n.name)[VD]){let{getBlockRootClientId:a,getBlockName:c,getBlockAttributes:u}=o.select(_),d=a(n.clientId),f=c(d);f&&(r=(0,Vi.createBlock)(f,u(d),r))}let i=(0,Vi.serialize)(r);e.clipboardData.setData("text/plain",u_e(i)),e.clipboardData.setData("text/html",i)}function vG(e,t){let{plainText:o,html:r,files:n}=Ah(e),i=[];if(n.length){let s=(0,Vi.getBlockTransforms)("from");i=n.reduce((a,c)=>{let u=(0,Vi.findTransform)(s,d=>d.type==="files"&&d.isMatch([c]));return u&&a.push(u.transform([c])),a},[]).flat()}else i=(0,Vi.pasteHandler)({HTML:r,plainText:o,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}function u_e(e){return e=e.replace(/<br>/g,`
`),(0,kG.__unstableStripHTML)(e).trim().replace(/\n\n+/g,`

`)}function xy(){let e=(0,Lh.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:o,hasMultiSelection:r,getSettings:n,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:a,__unstableIsSelectionMergeable:c,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:f}=(0,Lh.useSelect)(_),{flashBlock:m,removeBlocks:h,replaceBlocks:p,__unstableDeleteSelection:g,__unstableExpandSelection:b,__unstableSplitSelection:v}=(0,Lh.useDispatch)(_),k=Oh();return(0,yG.useRefEffect)(y=>{function S(x){if(x.defaultPrevented)return;let C=o();if(C.length===0)return;if(!r()){let{target:L}=x,{ownerDocument:T}=L;if(x.type==="copy"||x.type==="cut"?(0,B1.documentHasUncollapsedSelection)(T):(0,B1.documentHasSelection)(T)&&!T.activeElement.isContentEditable)return}let{activeElement:B}=x.target.ownerDocument;if(!y.contains(B))return;let I=c(),P=a()||s(),E=!P&&!I;if(x.type==="copy"||x.type==="cut")if(x.preventDefault(),C.length===1&&m(C[0]),E)b();else{k(x.type,C);let L;if(P)L=t(C);else{let[T,O]=u(),D=t(C.slice(1,C.length-1));L=[T,...D,O]}C1(x,L,e)}if(x.type==="cut")P&&!E?h(C):(x.target.ownerDocument.activeElement.contentEditable=!1,g());else if(x.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:L,mediaUpload:T}=n();if(x.clipboardData.getData("rich-text")==="true")return;let{plainText:D,html:U,files:G}=Ah(x),j=s(),z=[];if(G.length){if(!T){x.preventDefault();return}let ce=(0,_a.getBlockTransforms)("from");z=G.reduce((ie,re)=>{let Q=(0,_a.findTransform)(ce,Y=>Y.type==="files"&&Y.isMatch([re]));return Q&&ie.push(Q.transform([re])),ie},[]).flat()}else z=(0,_a.pasteHandler)({HTML:U,plainText:D,mode:j?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:L});if(typeof z=="string")return;if(j){p(C,z,z.length-1,-1),x.preventDefault();return}if(!r()&&!(0,_a.hasBlockSupport)(i(C[0]),"splitting",!1)&&!x.__deprecatedOnSplit)return;let[W]=C,ee=f(W),se=[];for(let ce of z)if(d(ce.name,ee))se.push(ce);else{let ie=i(ee),re=ce.name!==ie?(0,_a.switchToBlockType)(ce,ie):[ce];if(!re)return;for(let Q of re)for(let Y of Q.innerBlocks)se.push(Y)}v(se),x.preventDefault()}}return y.ownerDocument.addEventListener("copy",S),y.ownerDocument.addEventListener("cut",S),y.ownerDocument.addEventListener("paste",S),()=>{y.ownerDocument.removeEventListener("copy",S),y.ownerDocument.removeEventListener("cut",S),y.ownerDocument.removeEventListener("paste",S)}},[])}var Nh=l(w(),1);function FD(){let[e,t,o]=$9(),r=(0,SG.useSelect)(n=>n(_).hasMultiSelection(),[]);return[e,(0,wy.useMergeRefs)([t,xy(),mG(),nG(),cG(),dG(),W9(),tG(),Y9(),X9(),(0,wy.useRefEffect)(n=>(n.tabIndex=0,n.dataset.hasMultiSelection=r,r?(n.setAttribute("aria-label",(0,_G.__)("Multiple selected blocks")),()=>{delete n.dataset.hasMultiSelection,n.removeAttribute("aria-label")}):()=>{delete n.dataset.hasMultiSelection}),[r])]),o]}function d_e({children:e,...t},o){let[r,n,i]=FD();return(0,Nh.jsxs)(Nh.Fragment,{children:[r,(0,Nh.jsx)("div",{...t,ref:(0,wy.useMergeRefs)([n,o]),className:V(t.className,"block-editor-writing-flow"),children:e}),i]})}var E1=(0,xG.forwardRef)(d_e);var T1=null;function wG(){return T1||(T1=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}let{ownerNode:o,cssRules:r}=t;if(o===null||!r||o.id.startsWith("wp-")||!o.id)return e;function n(i){return Array.from(i).find(({selectorText:s,conditionText:a,cssRules:c})=>a?n(c):s&&(s.includes(".editor-styles-wrapper")||s.includes(".wp-block")))}if(n(r)){let i=o.tagName==="STYLE";if(i){let s=o.id.replace("-inline-css","-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}if(e.push(o.cloneNode(!0)),!i){let s=o.id.replace("-css","-inline-css"),a=document.getElementById(s);a&&e.push(a.cloneNode(!0))}}return e},[]),T1)}var kn=l(R(),1),Cy=l(Z(),1);function CG({frameSize:e,containerWidth:t,maxContainerWidth:o,scaleContainerWidth:r}){return(Math.min(t,o)-e*2)/r}function f_e(e,t){let{scaleValue:o,scrollHeight:r}=e,{frameSize:n,scaleValue:i}=t;return r*(i/o)+n*2}function m_e(e,t){let{containerHeight:o,frameSize:r,scaleValue:n,scrollTop:i}=e,{containerHeight:s,frameSize:a,scaleValue:c,scrollHeight:u}=t,d=i;d=(d+o/2-r)/n-o/2,d=(d+s/2)*c+a-s/2,d=i<=r?0:d;let f=u-s;return Math.round(Math.min(Math.max(0,d),Math.max(0,f)))}function p_e(e,t){let{scaleValue:o,frameSize:r,scrollTop:n}=e,{scaleValue:i,frameSize:s,scrollTop:a}=t;return[{translate:"0 0",scale:o,paddingTop:`${r/o}px`,paddingBottom:`${r/o}px`},{translate:`0 ${n-a}px`,scale:i,paddingTop:`${s/i}px`,paddingBottom:`${s/i}px`}]}function BG({frameSize:e,iframeDocument:t,maxContainerWidth:o=750,scale:r}){let[n,{height:i}]=(0,Cy.useResizeObserver)(),[s,{width:a,height:c}]=(0,Cy.useResizeObserver)(),u=(0,kn.useRef)(0),d=r!==1,f=(0,Cy.useReducedMotion)(),m=r==="auto-scaled",h=(0,kn.useRef)(!1),p=(0,kn.useRef)(null);(0,kn.useEffect)(()=>{d||(u.current=a)},[a,d]);let g=Math.max(u.current,a),b=m?CG({frameSize:e,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:g}):r,v=(0,kn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),k=(0,kn.useRef)({scaleValue:b,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,kn.useCallback)(()=>{let{scrollTop:C}=v.current,{scrollTop:B}=k.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${C}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${B}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(p_e(v.current,k.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})},[t]),S=(0,kn.useCallback)(()=>{h.current=!1,p.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${k.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=k.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=k.current},[t]),x=(0,kn.useRef)(!1);return(0,kn.useEffect)(()=>{let C=t&&x.current!==d;if(x.current=d,!!C&&(h.current=!0,!!d))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}},[t,d]),(0,kn.useEffect)(()=>{if(t&&(m&&v.current.scaleValue!==1&&(v.current.scaleValue=CG({frameSize:v.current.frameSize,containerWidth:a,maxContainerWidth:o,scaleContainerWidth:a})),b<1&&(h.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",b),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${c}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${g}px`)),h.current))if(h.current=!1,p.current){p.current.reverse();let C=v.current,B=k.current;v.current=B,k.current=C}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=c,k.current={scaleValue:b,frameSize:e,containerHeight:t.documentElement.clientHeight},k.current.scrollHeight=f_e(v.current,k.current),k.current.scrollTop=m_e(v.current,k.current),p.current=y(),f?S():p.current.onfinish=S},[y,S,f,m,b,e,t,i,a,c,o,g]),{isZoomedOut:d,scaleContainerWidth:g,contentResizeListener:n,containerResizeListener:s}}var Rs=l(w(),1);function PG(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 h_e(e){return(0,Vu.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];PG(a,d,o)},r.addEventListener(s,i[s]);return()=>{for(let s of n)r.removeEventListener(s,i[s])}})}var EG=new WeakMap,g_e=globalThis.FinalizationRegistry?new globalThis.FinalizationRegistry(e=>URL.revokeObjectURL(e)):void 0;function b_e(e){let t=EG.get(e);if(t)return t;let o=`<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<base href="${window.location.href}">
		<script>window.frameElement._load()<\/script>
		<style>
			html{
				height: auto !important;
				min-height: 100%;
			}
			/* Lowest specificity to not override global styles */
			:where(body) {
				margin: 0;
				/* Default background color in case zoom out mode background
				colors the html element */
				background-color: white;
			}
		</style>
		${e.styles??""}
		${e.scripts??""}
	</head>
	<body>
		<script>document.currentScript.parentElement.remove()<\/script>
	</body>
</html>`;return t=URL.createObjectURL(new Blob([o],{type:"text/html"})),EG.set(e,t),g_e?.register(e,t),t}function k_e({contentRef:e,children:t,tabIndex:o=0,scale:r=1,frameSize:n=0,readonly:i,forwardedRef:s,title:a=(0,TG.__)("Editor canvas"),...c}){let{resolvedAssets:u,isPreviewMode:d}=(0,zD.useSelect)(T=>{let O=T(_).getSettings();return{resolvedAssets:O.__unstableResolvedAssets,isPreviewMode:O.isPreviewMode}},[]),[f,m]=(0,om.useState)(),[h,p]=(0,om.useState)([]),[g,b,v]=FD(),k=(0,Vu.useRefEffect)(T=>{T._load=()=>{m(T.contentDocument)};let O;function D(z){z.preventDefault()}function U(z){z.target.tagName==="A"&&z.target.getAttribute("href")?.startsWith("#")&&(z.preventDefault(),O.defaultView.location.hash=z.target.getAttribute("href").slice(1))}let{ownerDocument:G}=T;p(Array.from(G.body.classList).filter(z=>z.startsWith("admin-color-")||z.startsWith("post-type-")||z==="wp-embed-responsive"));function j(){let{contentDocument:z}=T,{documentElement:W}=z;O=z,W.classList.add("block-editor-iframe__html"),z.dir=G.dir;for(let ee of wG())z.getElementById(ee.id)||(z.head.appendChild(ee.cloneNode(!0)),d||console.warn(`${ee.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ee));O.addEventListener("dragover",D,!1),O.addEventListener("drop",D,!1),O.addEventListener("click",U)}return T.addEventListener("load",j),()=>{delete T._load,T.removeEventListener("load",j),O?.removeEventListener("dragover",D),O?.removeEventListener("drop",D),O?.removeEventListener("click",U)}},[]),{contentResizeListener:y,containerResizeListener:S,isZoomedOut:x,scaleContainerWidth:C}=BG({scale:r,frameSize:parseInt(n),iframeDocument:f}),B=(0,Vu.useDisabled)({isDisabled:!i}),I=(0,Vu.useMergeRefs)([h_e(f),e,b,B]),P=b_e(u),E=o>=0&&!d,L=(0,Rs.jsxs)(Rs.Fragment,{children:[E&&g,(0,Rs.jsx)("iframe",{...c,style:{...c.style,height:c.style?.height,border:0},ref:(0,Vu.useMergeRefs)([s,k]),tabIndex:o,src:P,title:a,onKeyDown:T=>{if(c.onKeyDown&&c.onKeyDown(T),T.currentTarget.ownerDocument!==T.target.ownerDocument){let{stopPropagation:O}=T.nativeEvent;T.nativeEvent.stopPropagation=()=>{},T.stopPropagation(),T.nativeEvent.stopPropagation=O,PG(T,window.KeyboardEvent,T.currentTarget)}},children:f&&(0,om.createPortal)((0,Rs.jsxs)("body",{ref:I,className:V("block-editor-iframe__body","editor-styles-wrapper",...h),children:[y,(0,Rs.jsx)(IG.__experimentalStyleProvider,{document:f,children:t})]}),f.documentElement)}),E&&v]});return(0,Rs.jsxs)("div",{className:"block-editor-iframe__container",children:[S,(0,Rs.jsx)("div",{className:V("block-editor-iframe__scale-container",x&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":x&&`${C}px`},children:L})]})}function v_e(e,t){return(0,zD.useSelect)(r=>r(_).getSettings().__internalIsInitialized,[])?(0,Rs.jsx)(k_e,{...e,forwardedRef:t}):null}var Mh=(0,om.forwardRef)(v_e);var x$=l(A(),1),Hh=l(R(),1),w$=l(F(),1);var P1={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},y_e=new Set(["combinator","comma"]);var S_e=e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(P1[e].source.replace("(?<argument>\xB6*)","(?<argument>.*)"),"gu");default:return P1[e]}};function __e(e,t){let o=0,r="";for(;t<e.length;t++){let n=e[t];switch(n){case"(":++o;break;case")":--o;break}if(r+=n,o===0)return r}return r}function x_e(e,t=P1){if(!e)return[];let o=[e];for(let[n,i]of Object.entries(t))for(let s=0;s<o.length;s++){let a=o[s];if(typeof a!="string")continue;i.lastIndex=0;let c=i.exec(a);if(!c)continue;let u=c.index-1,d=[],f=c[0],m=a.slice(0,u+1);m&&d.push(m),d.push({...c.groups,type:n,content:f});let h=a.slice(u+f.length+1);h&&d.push(h),o.splice(s,1,...d)}let r=0;for(let n of o)switch(typeof n){case"string":throw new Error(`Unexpected sequence ${n} found at index ${r}`);case"object":r+=n.content.length,n.pos=[r-n.content.length,r],y_e.has(n.type)&&(n.content=n.content.trim()||" ");break}return o}var w_e=/(['"])([^\\\n]+?)\1/g,C_e=/\\./g;function jD(e,t=P1){if(e=e.trim(),e==="")return[];let o=[];e=e.replace(C_e,(i,s)=>(o.push({value:i,offset:s}),"\uE000".repeat(i.length))),e=e.replace(w_e,(i,s,a,c)=>(o.push({value:i,offset:c}),`${s}${"\uE001".repeat(a.length)}${s}`));{let i=0,s;for(;(s=e.indexOf("(",i))>-1;){let a=__e(e,s);o.push({value:a,offset:s}),e=`${e.substring(0,s)}(${"\xB6".repeat(a.length-2)})${e.substring(s+a.length)}`,i=s+a.length}}let r=x_e(e,t),n=new Set;for(let i of o.reverse())for(let s of r){let{offset:a,value:c}=i;if(!(s.pos[0]<=a&&a+c.length<=s.pos[1]))continue;let{content:u}=s,d=a-s.pos[0];s.content=u.slice(0,d)+c+u.slice(d+c.length),s.content!==u&&n.add(s)}for(let i of n){let s=S_e(i.type);if(!s)throw new Error(`Unknown token type: ${i.type}`);s.lastIndex=0;let a=s.exec(i.content);if(!a)throw new Error(`Unable to parse content for ${i.type}: ${i.content}`);Object.assign(i,a.groups)}return r}function*I1(e,t){switch(e.type){case"list":for(let o of e.list)yield*I1(o,e);break;case"complex":yield*I1(e.left,e),yield*I1(e.right,e);break;case"compound":yield*e.list.map(o=>[o,e]);break;default:yield[e,t]}}function RG(e){let t;return Array.isArray(e)?t=e:t=[...I1(e)].map(([o])=>o),t.map(o=>o.content).join("")}var k$=l(XW(),1),v$=l(A1(),1),y$=l(e$(),1),S$=l(g$(),1),b$=new Map,_$=[{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 D0e(e,t){let o=jD(t),r=o.findLastIndex(({content:s,type:a})=>_$.some(c=>s===c.content&&a===c.type)),n=-1;for(let s=r+1;s<o.length;s++)if(o[s].type==="combinator"){n=s;break}let i=jD(e);return o.splice(n===-1?o.length:n,0,{type:"combinator",content:" "},...i),RG(o)}function V0e({css:e,ignoredSelectors:t=[],baseURL:o},r="",n){if(!r&&!o)return e;try{let i=[...t,...n?.ignoredSelectors??[],r];return new k$.default([r&&(0,y$.default)({prefix:r,transform(s,a,c){return i.some(d=>d instanceof RegExp?a.match(d):a.includes(d))?a:_$.some(d=>a.startsWith(d.content))?D0e(s,a):c}}),o&&(0,S$.default)({rootUrl:o})].filter(Boolean)).process(e,{}).css}catch(i){return i instanceof v$.default?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i.message+`
`+i.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",i),null}}var F0e=(e,t="",o)=>{let r=b$.get(t);return r||(r=new WeakMap,b$.set(t,r)),e.map(n=>{let i=r.get(n);return i||(i=V0e(n,t,o),r.set(n,i)),i})},Uh=F0e;var Uu=l(w(),1);Kc([Yc,Op]);function z0e(e,t){return(0,Hh.useCallback)(o=>{if(!o)return;let{ownerDocument:r}=o,{defaultView:n,body:i}=r,s=t?r.querySelector(t):i,a;if(s)a=n?.getComputedStyle(s,null).getPropertyValue("background-color");else{let u=r.createElement("div");u.classList.add("editor-styles-wrapper"),i.appendChild(u),a=n?.getComputedStyle(u,null).getPropertyValue("background-color"),i.removeChild(u)}let c=Bt(a);c.luminance()>.5||c.alpha()===0?i.classList.remove("is-dark-theme"):i.classList.add("is-dark-theme")},[e,t])}function j0e({styles:e,scope:t,transformOptions:o}){let r=(0,w$.useSelect)(s=>M(s(_)).getStyleOverrides(),[]),[n,i]=(0,Hh.useMemo)(()=>{let s=Object.values(e??[]);for(let[a,c]of r){let u=s.findIndex(({id:f})=>a===f),d={...c,id:a};u===-1?s.push(d):s[u]=d}return[Uh(s.filter(a=>a?.css),t,o),s.filter(a=>a.__unstableType==="svgs").map(a=>a.assets).join("")]},[e,r,t,o]);return(0,Uu.jsxs)(Uu.Fragment,{children:[(0,Uu.jsx)("style",{ref:z0e(n,t)}),n.map((s,a)=>(0,Uu.jsx)("style",{children:s},a)),(0,Uu.jsx)(x$.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 Nl=(0,Hh.memo)(j0e);var Fi=l(w(),1),U0e=(0,q1.memo)(Gh),_5=2e3,H0e=[];function G0e({viewportWidth:e,containerWidth:t,minHeight:o,additionalStyles:r=H0e}){e||(e=t);let[n,{height:i}]=(0,Dy.useResizeObserver)(),{styles:s}=(0,C$.useSelect)(d=>({styles:d(_).getSettings().styles}),[]),a=(0,q1.useMemo)(()=>s&&[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...r],[s,r]),c=t/e,u=i?t/(i*c):0;return(0,Fi.jsx)(B$.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${c})`,aspectRatio:u,maxHeight:i>_5?_5*c:void 0,minHeight:o},children:(0,Fi.jsxs)(Mh,{contentRef:(0,Dy.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:_5,minHeight:c!==0&&c<1&&o?o/c:o},children:[(0,Fi.jsx)(Nl,{styles:a}),n,(0,Fi.jsx)(U0e,{renderAppender:!1})]})})}function E$(e){let[t,{width:o}]=(0,Dy.useResizeObserver)();return(0,Fi.jsxs)(Fi.Fragment,{children:[(0,Fi.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,Fi.jsx)("div",{className:"block-editor-block-preview__container",children:!!o&&(0,Fi.jsx)(G0e,{...e,containerWidth:o})})]})}var Wh=l(R(),1),R$=l(I$(),1),P$=(0,R$.createQueue)();function O$({children:e,placeholder:t}){let[o,r]=(0,Wh.useState)(!1);return(0,Wh.useEffect)(()=>{let n={};return P$.add(n,()=>{(0,Wh.flushSync)(()=>{r(!0)})}),()=>{P$.cancel(n)}},[]),o?e:t}var am=l(w(),1),W0e=[];function $0e({blocks:e,viewportWidth:t=1200,minHeight:o,additionalStyles:r=W0e,__experimentalMinHeight:n,__experimentalPadding:i}){n&&(o=n,(0,x5.default)("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(r=[...r,{css:`body { padding: ${i}px; }`}],(0,x5.default)("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));let s=(0,w5.useSelect)(u=>u(_).getSettings(),[]),a=(0,sm.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,sm.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return!e||e.length===0?null:(0,am.jsx)(Ph,{value:c,settings:a,children:(0,am.jsx)(E$,{viewportWidth:t,minHeight:o,additionalStyles:r})})}var A$=(0,sm.memo)($0e);A$.Async=O$;var vn=A$;function L$({blocks:e,props:t={},layout:o}){let r=(0,w5.useSelect)(u=>u(_).getSettings(),[]),n=(0,sm.useMemo)(()=>({...r,styles:void 0,focusMode:!1,isPreviewMode:!0}),[r]),i=(0,Z1.useDisabled)(),s=(0,Z1.useMergeRefs)([t.ref,i]),a=(0,sm.useMemo)(()=>Array.isArray(e)?e:[e],[e]),c=(0,am.jsxs)(Ph,{value:a,settings:n,children:[(0,am.jsx)(Nl,{}),(0,am.jsx)(Vy,{renderAppender:!1,layout:o})]});return{...t,ref:s,className:V(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?c:null}}var Hu=l(w(),1);function K0e({item:e}){let{name:t,title:o,icon:r,description:n,initialAttributes:i,example:s}=e,a=(0,$h.isReusableBlock)(e),c=(0,N$.useMemo)(()=>s?(0,$h.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,$h.createBlock)(t,i),[t,s,i]),u=144,d=280,f=s?.viewportWidth??500,m=d/f,h=m!==0&&m<1&&u?u/m:u;return(0,Hu.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,Hu.jsx)("div",{className:"block-editor-inserter__preview",children:a||s?(0,Hu.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,Hu.jsx)(vn,{blocks:c,viewportWidth:f,minHeight:u,additionalStyles:[{css:`
										body { 
											padding: 24px;
											min-height:${Math.round(h)}px;
											display:flex;
											align-items:center;
										}
										.is-root-container { width: 100%; }
									`}]})}):(0,Hu.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,M$.__)("No preview available.")})}),!a&&(0,Hu.jsx)(yy,{title:o,icon:r,description:n})]})}var X1=K0e;var Jh=l(N(),1),Vl=l(R(),1),R5=l(Z(),1);var Z$=l($(),1),X$=l(Z(),1);var Qh=l(R(),1),Gu=l($(),1),Y$=l(A(),1),Fy=l(it(),1);var G$=l(A(),1),W$=l(R(),1);var Kh=l(R(),1),D$=l(N(),1),V$=l(Xo(),1),F$=l(w(),1);function Y0e(e,t){let[o,r]=(0,Kh.useState)(!1);return(0,Kh.useEffect)(()=>{o&&(0,V$.speak)((0,D$.__)("Use left and right arrow keys to move through blocks"))},[o]),(0,F$.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:n=>{!n.currentTarget.contains(n.relatedTarget)&&r(!1)},...e})}var C5=(0,Kh.forwardRef)(Y0e);var z$=l(R(),1),j$=l(A(),1),U$=l(w(),1);function q0e(e,t){return(0,U$.jsx)(j$.Composite.Group,{role:"presentation",ref:t,...e})}var B5=(0,z$.forwardRef)(q0e);var J1=l(A(),1),H$=l(R(),1),Q1=l(w(),1);function Z0e({isFirst:e,as:t,children:o,...r},n){return(0,Q1.jsx)(J1.Composite.Item,{ref:n,role:"option",accessibleWhenDisabled:!0,...r,render:i=>{let s={...i,tabIndex:e?0:i.tabIndex};return t?(0,Q1.jsx)(t,{...s,children:o}):typeof o=="function"?o(s):(0,Q1.jsx)(J1.Button,{__next40pxDefaultSize:!0,...s,children:o})}})}var E5=(0,H$.forwardRef)(Z0e);var T5=l(w(),1);function X0e({key:e,children:t}){return(0,T5.jsx)(W$.Fragment,{children:t},e)}function Q0e({children:e}){return(0,T5.jsx)(G$.Composite,{focusShift:!0,focusWrap:"horizontal",render:X0e,children:e})}var Yh=Q0e;var $$=l(A(),1),tB=l($(),1),oB=l(F(),1),K$=l(R(),1);var Zh=l(N(),1),qh=l(A(),1);var As=l(w(),1);function eB({count:e,icon:t,isPattern:o,fadeWhenDisabled:r}){let n=o&&(0,Zh.__)("Pattern");return(0,As.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,As.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,As.jsxs)(qh.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,As.jsx)(qh.FlexItem,{children:t?(0,As.jsx)(Ae,{icon:t}):n||(0,Zh.sprintf)((0,Zh._n)("%d block","%d blocks",e),e)}),(0,As.jsx)(qh.FlexItem,{children:(0,As.jsx)(Ae,{icon:tv})}),r&&(0,As.jsx)(qh.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,As.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var I5=l(w(),1),J0e=({isEnabled:e,blocks:t,icon:o,children:r,pattern:n})=>{let i=t.length===1?t[0].name:void 0,s=(0,oB.useSelect)(f=>i&&f(tB.store).getBlockType(i)?.icon,[i]),{startDragging:a,stopDragging:c}=M((0,oB.useDispatch)(_)),u=(0,K$.useMemo)(()=>n?.type===Nt.user&&n?.syncStatus!=="unsynced"?[(0,tB.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,I5.jsx)($$.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:d},onDragStart:f=>{a();let m=new Set;for(let h of d){let p=`wp-block:${h.name}`;m.has(p)||(f.dataTransfer.items.add("",p),m.add(p))}},onDragEnd:()=>{c()},__experimentalDragComponent:(0,I5.jsx)(eB,{count:t.length,icon:o||!n&&s,isPattern:!!n}),children:({onDraggableStart:f,onDraggableEnd:m})=>r({draggable:!0,onDragStart:f,onDragEnd:m})})},Xh=J0e;var Ml=l(w(),1);function exe({className:e,isFirst:t,item:o,onSelect:r,onHover:n,isDraggable:i,...s}){let a=(0,Qh.useRef)(!1),c=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},u=(0,Qh.useMemo)(()=>[(0,Gu.createBlock)(o.name,o.initialAttributes,(0,Gu.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))],[o.name,o.initialAttributes,o.innerBlocks]),d=(0,Gu.isReusableBlock)(o)&&o.syncStatus!=="unsynced"||(0,Gu.isTemplatePart)(o);return(0,Ml.jsx)(Xh,{isEnabled:i&&!o.isDisabled,blocks:u,icon:o.icon,children:({draggable:f,onDragStart:m,onDragEnd:h})=>(0,Ml.jsx)("div",{className:V("block-editor-block-types-list__list-item",{"is-synced":d}),draggable:f,onDragStart:p=>{a.current=!0,m&&(n(null),m(p))},onDragEnd:p=>{a.current=!1,h&&h(p)},children:(0,Ml.jsxs)(E5,{isFirst:t,className:V("block-editor-block-types-list__item",e),disabled:o.isDisabled,onClick:p=>{p.preventDefault(),r(o,(0,Fy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null)},onKeyDown:p=>{let{keyCode:g}=p;g===Fy.ENTER&&(p.preventDefault(),r(o,(0,Fy.isAppleOS)()?p.metaKey:p.ctrlKey),n(null))},onMouseEnter:()=>{a.current||n(o)},onMouseLeave:()=>n(null),...s,children:[(0,Ml.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:c,children:(0,Ml.jsx)(Ae,{icon:o.icon,showColors:!0})}),(0,Ml.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,Ml.jsx)(Y$.__experimentalTruncate,{numberOfLines:3,children:o.title})})]})})})}var q$=(0,Qh.memo)(exe);var zy=l(w(),1);function txe(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 Q$({items:e=[],onSelect:t,onHover:o=()=>{},children:r,label:n,isDraggable:i=!0}){let s="block-editor-block-types-list",a=(0,X$.useInstanceId)(Q$,s);return(0,zy.jsxs)(C5,{className:s,"aria-label":n,children:[txe(e,3).map((c,u)=>(0,zy.jsx)(B5,{children:c.map((d,f)=>(0,zy.jsx)(q$,{item:d,className:(0,Z$.getBlockMenuDefaultClassName)(d.id),onSelect:t,onHover:o,isDraggable:i&&!d.isDisabled,isFirst:u===0&&f===0,rowId:`${a}-${u}`},d.id))},u)),r]})}var lm=Q$;var J$=l(A(),1),Dl=l(w(),1);function oxe({title:e,icon:t,children:o}){return(0,Dl.jsxs)(Dl.Fragment,{children:[(0,Dl.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,Dl.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,Dl.jsx)(J$.Icon,{icon:t})]}),(0,Dl.jsx)("div",{className:"block-editor-inserter__panel-content",children:o})]})}var Wu=oxe;var eK=l(N(),1),P5=l(w(),1);function rxe(){return(0,P5.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,P5.jsx)("p",{children:(0,eK.__)("No results found.")})})}var Ls=rxe;var zo=l(w(),1),nxe=e=>e.name.split("/")[0],ixe=6,sxe=[];function tK({items:e,collections:t,categories:o,onSelectItem:r,onHover:n,showMostUsedBlocks:i,className:s}){let a=(0,Vl.useMemo)(()=>ma(e,"frecency","desc").slice(0,ixe),[e]),c=(0,Vl.useMemo)(()=>e.filter(p=>!p.category),[e]),u=(0,Vl.useMemo)(()=>{let p={...t};return Object.keys(t).forEach(g=>{p[g]=e.filter(b=>nxe(b)===g),p[g].length===0&&delete p[g]}),p},[e,t]);(0,Vl.useEffect)(()=>()=>n(null),[]);let d=(0,R5.useAsyncList)(o),f=o.length===d.length,m=(0,Vl.useMemo)(()=>Object.entries(t),[t]),h=(0,R5.useAsyncList)(f?m:sxe);return(0,zo.jsxs)("div",{className:s,children:[i&&e.length>3&&!!a.length&&(0,zo.jsx)(Wu,{title:(0,Jh._x)("Most used","blocks"),children:(0,zo.jsx)(lm,{items:a,onSelect:r,onHover:n,label:(0,Jh._x)("Most used","blocks")})}),d.map(p=>{let g=e.filter(b=>b.category===p.slug);return!g||!g.length?null:(0,zo.jsx)(Wu,{title:p.title,icon:p.icon,children:(0,zo.jsx)(lm,{items:g,onSelect:r,onHover:n,label:p.title})},p.slug)}),f&&c.length>0&&(0,zo.jsx)(Wu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,Jh.__)("Uncategorized"),children:(0,zo.jsx)(lm,{items:c,onSelect:r,onHover:n,label:(0,Jh.__)("Uncategorized")})}),h.map(([p,g])=>{let b=u[p];return!b||!b.length?null:(0,zo.jsx)(Wu,{title:g.title,icon:g.icon,children:(0,zo.jsx)(lm,{items:b,onSelect:r,onHover:n,label:g.title})},p)})]})}function axe({rootClientId:e,onInsert:t,onHover:o,showMostUsedBlocks:r},n){let[i,s,a,c]=ku(e,t);if(!i.length)return(0,zo.jsx)(Ls,{});let u=[],d=[];for(let f of i)f.category!=="reusable"&&(f.isSearchOnly||(f.isAllowedInCurrentRoot?u.push(f):d.push(f)));return(0,zo.jsx)(Yh,{children:(0,zo.jsxs)("div",{ref:n,children:[!!u.length&&(0,zo.jsx)(zo.Fragment,{children:(0,zo.jsx)(tK,{items:u,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,zo.jsx)(tK,{items:d,categories:s,collections:a,onSelectItem:c,onHover:o,showMostUsedBlocks:r,className:"block-editor-inserter__all-blocks"})]})})}var oK=(0,Vl.forwardRef)(axe);var xK=l(R(),1),wK=l(Z(),1),CK=l(A(),1),BK=l(N(),1);var bK=l(A(),1),D5=l(R(),1),kK=l(N(),1);var rB=l(A(),1),O5=l(N(),1),Fl=l(w(),1);function lxe({selectedCategory:e,patternCategories:t,onClickCategory:o}){let r="block-editor-block-patterns-explorer__sidebar";return(0,Fl.jsx)("div",{className:`${r}__categories-list`,children:t.map(({name:n,label:i})=>(0,Fl.jsx)(rB.Button,{__next40pxDefaultSize:!0,label:i,className:`${r}__categories-list__item`,isPressed:e===n,onClick:()=>{o(n)},children:i},n))})}function cxe({searchValue:e,setSearchValue:t}){return(0,Fl.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,Fl.jsx)(rB.SearchControl,{onChange:t,value:e,label:(0,O5.__)("Search"),placeholder:(0,O5.__)("Search")})})}function uxe({selectedCategory:e,patternCategories:t,onClickCategory:o,searchValue:r,setSearchValue:n}){return(0,Fl.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,Fl.jsx)(cxe,{searchValue:r,setSearchValue:n}),!r&&(0,Fl.jsx)(lxe,{selectedCategory:e,patternCategories:t,onClickCategory:o})]})}var rK=uxe;var jl=l(R(),1),rg=l(N(),1),fK=l(Z(),1),mK=l(A(),1),pK=l(Xo(),1);var nK=l($(),1),wa=l(R(),1),zl=l(A(),1),iK=l(Z(),1),sK=l(N(),1);var yn=l(A(),1),zi=l(N(),1),Br=l(w(),1);function nB({currentPage:e,numPages:t,changePage:o,totalItems:r}){return(0,Br.jsxs)(yn.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,Br.jsx)(yn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._n)("%s item","%s items",r),r)}),t>1&&(0,Br.jsxs)(yn.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,Br.jsxs)(yn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(1),disabled:e===1,"aria-label":(0,zi.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\xAB"})}),(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(e-1),disabled:e===1,"aria-label":(0,zi.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\u2039"})})]}),(0,Br.jsx)(yn.__experimentalText,{variant:"muted",children:(0,zi.sprintf)((0,zi._x)("%1$s of %2$s","paging"),e,t)}),(0,Br.jsxs)(yn.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(e+1),disabled:e===t,"aria-label":(0,zi.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\u203A"})}),(0,Br.jsx)(yn.Button,{variant:"tertiary",onClick:()=>o(t),disabled:e===t,"aria-label":(0,zi.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,Br.jsx)("span",{children:"\xBB"})})]})]})]})}var Yt=l(w(),1),dxe=({showTooltip:e,title:t,children:o})=>e?(0,Yt.jsx)(zl.Tooltip,{text:t,children:o}):(0,Yt.jsx)(Yt.Fragment,{children:o});function aK({id:e,isDraggable:t,pattern:o,onClick:r,onHover:n,showTitlesAsTooltip:i,category:s,isSelected:a}){let[c,u]=(0,wa.useState)(!1),{blocks:d,viewportWidth:f}=o,h=`block-editor-block-patterns-list__item-description-${(0,iK.useInstanceId)(aK)}`,p=o.type===Nt.user,g=(0,wa.useMemo)(()=>!s||!t?d:(d??[]).map(b=>{let v=(0,nK.cloneBlock)(b);return v.attributes.metadata?.categories?.includes(s)&&(v.attributes.metadata.categories=[s]),v}),[d,t,s]);return(0,Yt.jsx)(Xh,{isEnabled:t,blocks:g,pattern:o,children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:b,onDragStart:y=>{u(!0),v&&(n?.(null),v(y))},onDragEnd:y=>{u(!1),k&&k(y)},children:(0,Yt.jsx)(dxe,{showTooltip:i&&!p,title:o.title,children:(0,Yt.jsxs)(zl.Composite.Item,{render:(0,Yt.jsx)("div",{role:"option","aria-label":o.title,"aria-describedby":o.description?h:void 0,className:V("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":o.type===Nt.user&&!o.syncStatus,"is-selected":a})}),id:e,onClick:()=>{r(o,d),n?.(null)},onMouseEnter:()=>{c||n?.(o)},onMouseLeave:()=>n?.(null),children:[(0,Yt.jsx)(vn.Async,{placeholder:(0,Yt.jsx)(fxe,{}),children:(0,Yt.jsx)(vn,{blocks:d,viewportWidth:f})}),(!i||p)&&(0,Yt.jsxs)(zl.__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)(we,{className:"block-editor-patterns__pattern-icon",icon:Ei})}),(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:o.title})]}),!!o.description&&(0,Yt.jsx)(zl.VisuallyHidden,{id:h,children:o.description})]})})})})}function fxe(){return(0,Yt.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}function mxe({isDraggable:e,blockPatterns:t,onHover:o,onClickPattern:r,orientation:n,label:i=(0,sK.__)("Block patterns"),category:s,showTitlesAsTooltip:a,pagingProps:c},u){let[d,f]=(0,wa.useState)(void 0),[m,h]=(0,wa.useState)(null);(0,wa.useEffect)(()=>{let g=t[0]?.name;f(g)},[t]);let p=(g,b)=>{h(g.name),r(g,b)};return(0,Yt.jsxs)(zl.Composite,{orientation:n,activeId:d,setActiveId:f,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:u,children:[t.map(g=>(0,Yt.jsx)(aK,{id:g.name,pattern:g,onClick:p,onHover:o,isDraggable:e,showTitlesAsTooltip:a,category:s,isSelected:!!m&&m===g.name},g.name)),c&&(0,Yt.jsx)(nB,{...c})]})}var Ca=(0,wa.forwardRef)(mxe);var cm=l(F(),1),cK=l($(),1),iB=l(N(),1),uK=l(Xo(),1),A5=l(R(),1);function lK({destinationRootClientId:e,destinationIndex:t,rootClientId:o,registry:r}){if(o===e)return t;let n=["",...r.select(_).getBlockParents(e),e],i=n.indexOf(o);return i!==-1?r.select(_).getBlockIndex(n[i+1])+1:r.select(_).getBlockOrder(o).length}function pxe({rootClientId:e="",insertionIndex:t,clientId:o,isAppender:r,onSelect:n,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){let a=(0,cm.useRegistry)(),{getSelectedBlock:c,getClosestAllowedInsertionPoint:u,isBlockInsertionPointVisible:d}=M((0,cm.useSelect)(_)),{destinationRootClientId:f,destinationIndex:m}=(0,cm.useSelect)(S=>{let{getSelectedBlockClientId:x,getBlockRootClientId:C,getBlockIndex:B,getBlockOrder:I,getInsertionPoint:P}=M(S(_)),E=x(),L=e,T,O=P();return t!==void 0?T=t:O&&O.hasOwnProperty("index")?(L=O?.rootClientId?O.rootClientId:e,T=O.index):o?T=B(o):!r&&E?(L=C(E),T=B(E)+1):T=I(L).length,{destinationRootClientId:L,destinationIndex:T}},[e,t,o,r]),{replaceBlocks:h,insertBlocks:p,showInsertionPoint:g,hideInsertionPoint:b,setLastFocus:v}=M((0,cm.useDispatch)(_)),k=(0,A5.useCallback)((S,x,C=!1,B)=>{(C||i||s)&&v(null);let I=c();!r&&I&&(0,cK.isUnmodifiedDefaultBlock)(I,"content")?h(I.clientId,S,null,i||C?0:null,x):p(S,r||B===void 0?m:lK({destinationRootClientId:f,destinationIndex:m,rootClientId:B,registry:a}),r||B===void 0?f:B,s,i||C?0:null,x);let P=Array.isArray(S)?S.length:1,E=(0,iB.sprintf)((0,iB._n)("%d block added.","%d blocks added.",P),P);(0,uK.speak)(E),n&&n(S)},[r,c,h,p,f,m,n,i,s,v,a]),y=(0,A5.useCallback)(S=>{if(S&&!d()){let x=u(S.name,f);x!==null&&g(x,lK({destinationRootClientId:f,destinationIndex:m,rootClientId:x,registry:a}))}else b()},[u,d,g,b,f,m,a]);return[f,k,y]}var $u=pxe;var eg=l(R(),1),sB=l($(),1),tg=l(F(),1),aB=l(N(),1),dK=l(Un(),1);var hxe=(e,t,o,r)=>{let n=(0,eg.useMemo)(()=>({[uu]:!!r}),[r]),i=(0,tg.useSelect)(p=>{let{getSettings:g}=M(p(_));return g()[w0]??!1},[]),{patternCategories:s,patterns:a,userPatternCategories:c}=(0,tg.useSelect)(p=>{let{getSettings:g,__experimentalGetAllowedPatterns:b}=M(p(_)),{__experimentalUserPatternCategories:v,__experimentalBlockPatternCategories:k}=g();return{patterns:b(t,n),userPatternCategories:v,patternCategories:k}},[t,n]),u=(0,eg.useMemo)(()=>a.filter(p=>!(p.categories?.includes("navigation")&&!i)),[a,i]),{getClosestAllowedInsertionPointForPattern:d}=M((0,tg.useSelect)(_)),f=(0,eg.useMemo)(()=>{let p=[...s];return c?.forEach(g=>{p.find(b=>b.name===g.name)||p.push(g)}),p},[s,c]),{createSuccessNotice:m}=(0,tg.useDispatch)(dK.store),h=(0,eg.useCallback)((p,g)=>{let b=r?t:d(p,t);if(b===null)return;let v=p.type===Nt.user&&p.syncStatus!=="unsynced"?[(0,sB.createBlock)("core/block",{ref:p.id})]:g;e((v??[]).map(k=>{let y=(0,sB.cloneBlock)(k);return y.attributes.metadata?.categories?.includes(o)&&(y.attributes.metadata.categories=[o]),y}),p.name,!1,b),m((0,aB.sprintf)((0,aB.__)('Block pattern "%s" inserted.'),p.title),{type:"snackbar",id:"inserter-notice"})},[m,e,o,t,d,r]);return[u,f,h]},Ku=hxe;var og=l(R(),1),L5=l(Z(),1),N5=l(Fe(),1),lB=20;function cB(e,t,o,r=""){let[n,i]=(0,og.useState)(1),s=(0,L5.usePrevious)(t),a=(0,L5.usePrevious)(r);(s!==t||a!==r)&&n!==1&&i(1);let c=e.length,u=n-1,d=(0,og.useMemo)(()=>e.slice(u*lB,u*lB+lB),[u,e]),f=Math.ceil(e.length/lB),m=h=>{(0,N5.getScrollContainer)(o?.current)?.scrollTo(0,0),i(h)};return(0,og.useEffect)(function(){(0,N5.getScrollContainer)(o?.current)?.scrollTo(0,0)},[t,o]),{totalItems:c,categoryPatterns:d,numPages:f,changePage:m,currentPage:n}}var Ns=l(w(),1);function gxe({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,Ns.jsx)(mK.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,rg.sprintf)((0,rg._n)("%d pattern found","%d patterns found",t),t)}):null}function bxe({searchValue:e,selectedCategory:t,patternCategories:o,rootClientId:r,onModalClose:n}){let i=(0,jl.useRef)(),s=(0,fK.useDebounce)(pK.speak,500),[a,c]=$u({rootClientId:r,shouldFocusBlock:!0}),[u,,d]=Ku(c,a,t),f=(0,jl.useMemo)(()=>o.map(v=>v.name),[o]),m=(0,jl.useMemo)(()=>{let v=u.filter(k=>{if(t===Vf.name||t===Sl.name&&k.type===Nt.user||t===Kp.name&&k.blockTypes?.includes("core/post-content"))return!0;if(t==="uncategorized"){let y=k.categories?.some(S=>f.includes(S))??!1;return!k.categories?.length||!y}return k.categories?.includes(t)});return e?zv(v,e):v},[e,u,t,f]);(0,jl.useEffect)(()=>{if(!e)return;let v=m.length,k=(0,rg.sprintf)((0,rg._n)("%d result found.","%d results found.",v),v);s(k)},[e,s,m.length]);let h=cB(m,t,i),[p,g]=(0,jl.useState)(e);e!==p&&(g(e),h.changePage(1));let b=!!m?.length;return(0,Ns.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,Ns.jsx)(gxe,{filterValue:e,filteredBlockPatternsLength:m.length}),(0,Ns.jsx)(Yh,{children:b&&(0,Ns.jsxs)(Ns.Fragment,{children:[(0,Ns.jsx)(Ca,{blockPatterns:h.categoryPatterns,onClickPattern:(v,k)=>{d(v,k),n()},isDraggable:!1}),(0,Ns.jsx)(nB,{...h})]})})]})}var hK=bxe;var M5=l(R(),1),ng=l(N(),1),gK=l(Xo(),1);function kxe(e,t){return!e.categories||!e.categories.length?!1:e.categories.some(o=>t.some(r=>r.name===o))}function ig(e,t="all"){let[o,r]=Ku(void 0,e),n=(0,M5.useMemo)(()=>t==="all"?o:o.filter(s=>!Iw(s,t)),[t,o]);return(0,M5.useMemo)(()=>{let s=r.filter(a=>n.some(c=>c.categories?.includes(a.name))).sort((a,c)=>a.label.localeCompare(c.label));return n.some(a=>!kxe(a,r))&&!s.find(a=>a.name==="uncategorized")&&s.push({name:"uncategorized",label:(0,ng._x)("Uncategorized")}),n.some(a=>a.blockTypes?.includes("core/post-content"))&&s.unshift(Kp),n.some(a=>a.type===Nt.user)&&s.unshift(Sl),n.length>0&&s.unshift({name:Vf.name,label:Vf.label}),(0,gK.speak)((0,ng.sprintf)((0,ng._n)("%d category button displayed.","%d category buttons displayed.",s.length),s.length)),s},[r,n])}var um=l(w(),1);function vxe({initialCategory:e,rootClientId:t,onModalClose:o}){let[r,n]=(0,D5.useState)(""),[i,s]=(0,D5.useState)(e?.name),a=ig(t);return(0,um.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,um.jsx)(rK,{selectedCategory:i,patternCategories:a,onClickCategory:s,searchValue:r,setSearchValue:n}),(0,um.jsx)(hK,{searchValue:r,selectedCategory:i,patternCategories:a,rootClientId:t,onModalClose:o})]})}function yxe({onModalClose:e,...t}){return(0,um.jsx)(bK.Modal,{title:(0,kK.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,um.jsx)(vxe,{onModalClose:e,...t})})}var vK=yxe;var sg=l(N(),1),Dt=l(A(),1);var Jo=l(w(),1);function Sxe({title:e}){return(0,Jo.jsx)(Dt.__experimentalVStack,{spacing:0,children:(0,Jo.jsx)(Dt.__experimentalView,{children:(0,Jo.jsx)(Dt.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Jo.jsxs)(Dt.__experimentalHStack,{spacing:2,children:[(0,Jo.jsx)(Dt.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,sg.isRTL)()?Vo:Mr,size:"small",label:(0,sg.__)("Back")}),(0,Jo.jsx)(Dt.__experimentalSpacer,{children:(0,Jo.jsx)(Dt.__experimentalHeading,{level:5,children:e})})]})})})})}function uB({categories:e,children:t}){return(0,Jo.jsxs)(Dt.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,Jo.jsx)(Dt.Navigator.Screen,{path:"/",children:(0,Jo.jsx)(Dt.__experimentalItemGroup,{children:e.map(o=>(0,Jo.jsx)(Dt.Navigator.Button,{path:`/category/${o.name}`,as:Dt.__experimentalItem,isAction:!0,children:(0,Jo.jsxs)(Dt.__experimentalHStack,{children:[(0,Jo.jsx)(Dt.FlexBlock,{children:o.label}),(0,Jo.jsx)(we,{icon:(0,sg.isRTL)()?Mr:Vo})]})},o.name))})}),e.map(o=>(0,Jo.jsxs)(Dt.Navigator.Screen,{path:`/category/${o.name}`,children:[(0,Jo.jsx)(Sxe,{title:(0,sg.__)("Back")}),t(o)]},o.name))]})}var ji=l(R(),1),V5=l(N(),1),Ms=l(A(),1);var _n=l(A(),1),Sn=l(N(),1);var dB=l(R(),1);var hr=l(w(),1),yK=e=>e!=="all"&&e!=="user",_xe=e=>e.name===Sl.name,xxe=[{value:"all",label:(0,Sn._x)("All","patterns")},{value:Nt.directory,label:(0,Sn.__)("Pattern Directory")},{value:Nt.theme,label:(0,Sn.__)("Theme & Plugins")},{value:Nt.user,label:(0,Sn.__)("User")}];function SK({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:o,patternSourceFilter:r,scrollContainerRef:n,category:i}){let s=i.name===Sl.name?Nt.user:r,a=yK(s),c=_xe(i),u=(0,dB.useMemo)(()=>[{value:"all",label:(0,Sn._x)("All","patterns")},{value:Tv.full,label:(0,Sn._x)("Synced","patterns"),disabled:a},{value:Tv.unsynced,label:(0,Sn._x)("Not synced","patterns"),disabled:a}],[a]);function d(f){t(f),yK(f)&&e("all")}return(0,hr.jsx)(hr.Fragment,{children:(0,hr.jsx)(_n.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,Sn.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,hr.jsx)(we,{icon:(0,hr.jsx)(_n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,hr.jsx)(_n.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,hr.jsxs)(hr.Fragment,{children:[!c&&(0,hr.jsx)(_n.MenuGroup,{label:(0,Sn.__)("Source"),children:(0,hr.jsx)(_n.MenuItemsChoice,{choices:xxe,onSelect:f=>{d(f),n.current?.scrollTo(0,0)},value:s})}),(0,hr.jsx)(_n.MenuGroup,{label:(0,Sn.__)("Type"),children:(0,hr.jsx)(_n.MenuItemsChoice,{choices:u,onSelect:f=>{e(f),n.current?.scrollTo(0,0)},value:o})}),(0,hr.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,dB.createInterpolateElement)((0,Sn.__)("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,hr.jsx)(_n.ExternalLink,{href:(0,Sn.__)("https://wordpress.org/patterns/")})})})]})})})}var $r=l(w(),1),wxe=()=>{};function fB({rootClientId:e,onInsert:t,onHover:o=wxe,category:r,showTitlesAsTooltip:n}){let[i,,s]=Ku(t,e,r?.name),[a,c]=(0,ji.useState)("all"),[u,d]=(0,ji.useState)("all"),f=ig(e,u),m=(0,ji.useRef)(),h=(0,ji.useMemo)(()=>i.filter(k=>Iw(k,u,a)?!1:r.name===Vf.name||r.name===Sl.name&&k.type===Nt.user||r.name===Kp.name&&k.blockTypes?.includes("core/post-content")?!0:r.name==="uncategorized"?k.categories?!k.categories.some(y=>f.some(S=>S.name===y)):!0:k.categories?.includes(r.name)),[i,f,r.name,u,a]),p=cB(h,r,m),{changePage:g}=p;(0,ji.useEffect)(()=>()=>o(null),[]);let b=(0,ji.useCallback)(k=>{c(k),g(1)},[c,g]),v=(0,ji.useCallback)(k=>{d(k),g(1)},[d,g]);return(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsxs)(Ms.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,$r.jsxs)(Ms.__experimentalHStack,{children:[(0,$r.jsx)(Ms.FlexBlock,{children:(0,$r.jsx)(Ms.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:r.label})}),(0,$r.jsx)(SK,{patternSyncFilter:a,patternSourceFilter:u,setPatternSyncFilter:b,setPatternSourceFilter:v,scrollContainerRef:m,category:r})]}),!h.length&&(0,$r.jsx)(Ms.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,V5.__)("No results found")})]}),h.length>0&&(0,$r.jsxs)($r.Fragment,{children:[(0,$r.jsx)(Ms.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,V5.__)("Drag and drop patterns into the canvas.")}),(0,$r.jsx)(Ca,{ref:m,blockPatterns:p.categoryPatterns,onClickPattern:s,onHover:o,label:r.label,orientation:"vertical",category:r.name,isDraggable:!0,showTitlesAsTooltip:n,patternFilter:u,pagingProps:p})]})]})}var pB=l(Z(),1),hB=l(A(),1),_K=l(R(),1);var dm=l(w(),1),{Tabs:mB}=M(hB.privateApis);function Cxe({categories:e,selectedCategory:t,onSelectCategory:o,children:r}){let s={type:"tween",duration:(0,pB.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},a=(0,pB.usePrevious)(t),c=t?t.name:null,[u,d]=(0,_K.useState)(),f=e?.[0]?.name;return c===null&&!u&&f&&d(f),(0,dm.jsxs)(mB,{selectOnMove:!1,selectedTabId:c,orientation:"vertical",onSelect:m=>{o(e.find(h=>h.name===m))},activeTabId:u,onActiveTabIdChange:d,children:[(0,dm.jsx)(mB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map(m=>(0,dm.jsx)(mB.Tab,{tabId:m.name,"aria-current":m===t?"true":void 0,children:m.label},m.name))}),e.map(m=>(0,dm.jsx)(mB.TabPanel,{tabId:m.name,focusable:!1,children:(0,dm.jsx)(hB.__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 gB=Cxe;var Kn=l(w(),1);function Bxe({onSelectCategory:e,selectedCategory:t,onInsert:o,rootClientId:r,children:n}){let[i,s]=(0,xK.useState)(!1),a=ig(r),c=(0,wK.useViewportMatch)("medium","<");return a.length?(0,Kn.jsxs)(Kn.Fragment,{children:[!c&&(0,Kn.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,Kn.jsx)(gB,{categories:a,selectedCategory:t,onSelectCategory:e,children:n}),(0,Kn.jsx)(CK.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,BK.__)("Explore all patterns")})]}),c&&(0,Kn.jsx)(uB,{categories:a,children:u=>(0,Kn.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,Kn.jsx)(fB,{onInsert:o,rootClientId:r,category:u},u.name)})}),i&&(0,Kn.jsx)(vK,{initialCategory:t||a[0],patternCategories:a,onModalClose:()=>s(!1),rootClientId:r})]}):(0,Kn.jsx)(Ls,{})}var EK=Bxe;var GK=l(N(),1),WK=l(Z(),1),$K=l(A(),1),vB=l(R(),1);var kB=l(A(),1),zK=l(N(),1),jK=l(Z(),1);var NK=l(A(),1),MK=l(N(),1);var Vt=l(A(),1),Yn=l(N(),1),Ba=l(R(),1),z5=l($(),1);var jy=l(F(),1),RK=l(Un(),1),OK=l(F5(),1),AK=l(dn(),1);var IK=l($(),1),PK=l(w(),1),Exe={image:"img",video:"video",audio:"audio"};function bB(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=Exe[t],s=(0,PK.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,IK.createBlock)(`core/${t}`,o),s]}var st=l(w(),1),Txe=["image"],Ixe={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function Pxe({category:e,media:t}){if(!e.getReportUrl)return null;let o=e.getReportUrl(t);return(0,st.jsx)(Vt.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,Yn.__)("Options"),popoverProps:Ixe,icon:ks,children:()=>(0,st.jsx)(Vt.MenuGroup,{children:(0,st.jsx)(Vt.MenuItem,{onClick:()=>window.open(o,"_blank").focus(),icon:vA,children:(0,Yn.sprintf)((0,Yn.__)("Report %s"),e.mediaType)})})})}function Rxe({onClose:e,onSubmit:t}){return(0,st.jsxs)(Vt.Modal,{title:(0,Yn.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,st.jsxs)(Vt.__experimentalVStack,{spacing:3,children:[(0,st.jsx)("p",{children:(0,Yn.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,st.jsx)("p",{children:(0,Yn.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,st.jsxs)(Vt.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,Yn.__)("Cancel")})}),(0,st.jsx)(Vt.FlexItem,{children:(0,st.jsx)(Vt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,Yn.__)("Insert")})})]})]})}function LK({media:e,onClick:t,category:o}){let[r,n]=(0,Ba.useState)(!1),[i,s]=(0,Ba.useState)(!1),[a,c]=(0,Ba.useState)(!1),[u,d]=(0,Ba.useMemo)(()=>bB(e,o.mediaType),[e,o.mediaType]),{createErrorNotice:f,createSuccessNotice:m}=(0,jy.useDispatch)(RK.store),{getSettings:h,getBlock:p}=(0,jy.useSelect)(_),{updateBlockAttributes:g}=(0,jy.useDispatch)(_),b=(0,Ba.useCallback)(S=>{if(a)return;let x=h(),C=(0,z5.cloneBlock)(S),{id:B,url:I,caption:P}=C.attributes;if(!B&&!x.mediaUpload){n(!0);return}if(B){t(C);return}c(!0),window.fetch(I).then(E=>E.blob()).then(E=>{let L=(0,AK.getFilename)(I)||"image.jpg",T=new File([E],L,{type:E.type});x.mediaUpload({filesList:[T],additionalData:{caption:P},onFileChange([O]){(0,OK.isBlobURL)(O.url)||(p(C.clientId)?g(C.clientId,{...C.attributes,id:O.id,url:O.url}):(t({...C,attributes:{...C.attributes,id:O.id,url:O.url}}),m((0,Yn.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),c(!1))},allowedTypes:Txe,onError(O){f(O,{type:"snackbar",id:"inserter-notice"}),c(!1)}})}).catch(()=>{n(!0),c(!1)})},[a,h,t,m,g,f,p]),v=typeof e.title=="string"?e.title:e.title?.rendered||(0,Yn.__)("no title"),k=(0,Ba.useCallback)(()=>s(!0),[]),y=(0,Ba.useCallback)(()=>s(!1),[]);return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Xh,{isEnabled:!0,blocks:[u],children:({draggable:S,onDragStart:x,onDragEnd:C})=>(0,st.jsx)("div",{className:V("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:S,onDragStart:x,onDragEnd:C,children:(0,st.jsxs)("div",{onMouseEnter:k,onMouseLeave:y,children:[(0,st.jsx)(Vt.Tooltip,{text:v,children:(0,st.jsx)(Vt.Composite.Item,{render:(0,st.jsx)("div",{"aria-label":v,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>b(u),children:(0,st.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[d,a&&(0,st.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,st.jsx)(Vt.Spinner,{})})]})})}),!a&&(0,st.jsx)(Pxe,{category:o,media:e})]})})}),r&&(0,st.jsx)(Rxe,{onClose:()=>n(!1),onSubmit:()=>{t((0,z5.cloneBlock)(u)),m((0,Yn.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),n(!1)}})]})}var j5=l(w(),1);function Oxe({mediaList:e,category:t,onClick:o,label:r=(0,MK.__)("Media List")}){return(0,j5.jsx)(NK.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":r,children:e.map((n,i)=>(0,j5.jsx)(LK,{media:n,category:t,onClick:o},n.id||n.sourceId||i))})}var DK=Oxe;var Ul=l(R(),1),U5=l(F(),1);function VK(e,t={}){let[o,r]=(0,Ul.useState)(),[n,i]=(0,Ul.useState)(!1),s=(0,Ul.useRef)();return(0,Ul.useEffect)(()=>{(async()=>{let a=JSON.stringify({category:e.name,...t});s.current=a,i(!0),r([]);let c=await e.fetch?.(t);a===s.current&&(r(c),i(!1))})()},[e.name,...Object.values(t)]),{mediaList:o,isLoading:n}}function FK(e){let[t,o]=(0,Ul.useState)([]),r=(0,U5.useSelect)(a=>M(a(_)).getInserterMediaCategories(),[]),{canInsertImage:n,canInsertVideo:i,canInsertAudio:s}=(0,U5.useSelect)(a=>{let{canInsertBlockType:c}=a(_);return{canInsertImage:c("core/image",e),canInsertVideo:c("core/video",e),canInsertAudio:c("core/audio",e)}},[e]);return(0,Ul.useEffect)(()=>{(async()=>{let a=[];if(!r)return;let c=new Map(await Promise.all(r.map(async d=>{if(d.isExternalResource)return[d.name,!0];let f=[];try{f=await d.fetch({per_page:1})}catch{}return[d.name,!!f.length]}))),u={image:n,video:i,audio:s};r.forEach(d=>{u[d.mediaType]&&c.get(d.name)&&a.push(d)}),a.length&&o(a)})()},[n,i,s,r]),t}var Yu=l(w(),1),Axe=10;function Uy({rootClientId:e,onInsert:t,category:o}){let[r,n,i]=(0,jK.useDebouncedInput)(),{mediaList:s,isLoading:a}=VK(o,{per_page:i?20:Axe,search:i}),c="block-editor-inserter__media-panel",u=o.labels.search_items||(0,zK.__)("Search");return(0,Yu.jsxs)("div",{className:c,children:[(0,Yu.jsx)(kB.SearchControl,{className:`${c}-search`,onChange:n,value:r,label:u,placeholder:u}),a&&(0,Yu.jsx)("div",{className:`${c}-spinner`,children:(0,Yu.jsx)(kB.Spinner,{})}),!a&&!s?.length&&(0,Yu.jsx)(Ls,{}),!a&&!!s?.length&&(0,Yu.jsx)(DK,{rootClientId:e,onClick:t,mediaList:s,category:o})]})}var UK=l(F(),1);function Lxe({fallback:e=null,children:t}){return(0,UK.useSelect)(r=>{let{getSettings:n}=r(_);return!!n().mediaUpload},[])?t:e}var Ds=Lxe;var HK=l(A(),1),Nxe=()=>null,qu=(0,HK.withFilters)("editor.MediaUpload")(Nxe);var qn=l(w(),1),Mxe=["image","video","audio"];function Dxe({rootClientId:e,selectedCategory:t,onSelectCategory:o,onInsert:r,children:n}){let i=FK(e),s=(0,WK.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",c=(0,vB.useCallback)(d=>{if(!d?.url)return;let f=window.__experimentalDataViewsMediaModal&&d.mime_type?d.mime_type.split("/")[0]:d.type,[m]=bB(d,f);r(m)},[r]),u=(0,vB.useMemo)(()=>i.map(d=>({...d,label:d.labels.name})),[i]);return u.length?(0,qn.jsxs)(qn.Fragment,{children:[!s&&(0,qn.jsxs)("div",{className:`${a}-container`,children:[(0,qn.jsx)(gB,{categories:u,selectedCategory:t,onSelectCategory:o,children:n}),(0,qn.jsx)(Ds,{children:(0,qn.jsx)(qu,{multiple:!1,onSelect:c,allowedTypes:Mxe,render:({open:d})=>(0,qn.jsx)($K.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,GK.__)("Open Media Library")})})})]}),s&&(0,qn.jsx)(uB,{categories:u,children:d=>(0,qn.jsx)(Uy,{onInsert:r,rootClientId:e,category:d})})]}):(0,qn.jsx)(Ls,{})}var H5=Dxe;var Hy=l(R(),1),Zu=l(N(),1),G5=l(A(),1),SB=l(Z(),1),qK=l(Xo(),1),ZK=l(F(),1);var KK=l(A(),1),{Fill:YK,Slot:Vxe}=(0,KK.createSlotFill)("__unstableInserterMenuExtension");YK.Slot=Vxe;var yB=YK;var xn=l(w(),1),Fxe=9,zxe=[];function jxe({filterValue:e,onSelect:t,onHover:o,onHoverPattern:r,rootClientId:n,clientId:i,isAppender:s,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:u,showBlockDirectory:d=!1,isDraggable:f=!0,shouldFocusBlock:m=!0,prioritizePatterns:h,selectBlockOnInsert:p,isQuick:g}){let b=(0,SB.useDebounce)(qK.speak,500),{prioritizedBlocks:v}=(0,ZK.useSelect)(j=>({prioritizedBlocks:j(_).getBlockListSettings(n)?.prioritizedInserterBlocks||zxe}),[n]),[k,y]=$u({onSelect:t,rootClientId:n,clientId:i,isAppender:s,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:p}),[S,x,C,B]=ku(k,y,g),[I,,P]=Ku(y,k,void 0,g),E=(0,Hy.useMemo)(()=>{if(c===0)return[];let j=zv(I,e);return c!==void 0?j.slice(0,c):j},[e,I,c]),L=u;h&&E.length>2&&(L=0);let T=(0,Hy.useMemo)(()=>{if(L===0)return[];let j=S.filter(ee=>ee.name!=="core/block"),z=ma(j,"frecency","desc");!e&&v.length&&(z=Qw(z,v));let W=qw(z,x,C,e);return L!==void 0?W.slice(0,L):W},[e,S,x,C,L,v]);(0,Hy.useEffect)(()=>{if(!e)return;let j=T.length+E.length,z=(0,Zu.sprintf)((0,Zu._n)("%d result found.","%d results found.",j),j);b(z)},[e,b,T,E]);let O=(0,SB.useAsyncList)(T,{step:Fxe}),D=T.length>0||E.length>0,U=!!T.length&&(0,xn.jsx)(Wu,{title:(0,xn.jsx)(G5.VisuallyHidden,{children:(0,Zu.__)("Blocks")}),children:(0,xn.jsx)(lm,{items:O,onSelect:B,onHover:o,label:(0,Zu.__)("Blocks"),isDraggable:f})}),G=!!E.length&&(0,xn.jsx)(Wu,{title:(0,xn.jsx)(G5.VisuallyHidden,{children:(0,Zu.__)("Block patterns")}),children:(0,xn.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,xn.jsx)(Ca,{blockPatterns:E,onClickPattern:P,onHover:r,isDraggable:f})})});return(0,xn.jsxs)(Yh,{children:[!d&&!D&&(0,xn.jsx)(Ls,{}),h?G:U,!!T.length&&!!E.length&&(0,xn.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),h?U:G,d&&(0,xn.jsx)(yB.Slot,{fillProps:{onSelect:B,onHover:o,filterValue:e,hasItems:D,rootClientId:k},children:j=>j.length?j:D?null:(0,xn.jsx)(Ls,{})})]})}var _B=jxe;var wB=l(A(),1),XK=l(R(),1);var Hl=l(w(),1),{Tabs:xB}=M(wB.privateApis);function Uxe({defaultTabId:e,onClose:t,onSelect:o,selectedTab:r,tabs:n,closeButtonLabel:i},s){return(0,Hl.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,Hl.jsxs)(xB,{selectOnMove:!1,defaultTabId:e,onSelect:o,selectedTabId:r,children:[(0,Hl.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,Hl.jsx)(wB.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:wf,label:i,onClick:()=>t(),size:"compact"}),(0,Hl.jsx)(xB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:n.map(a=>(0,Hl.jsx)(xB.Tab,{tabId:a.name,className:"block-editor-tabbed-sidebar__tab",children:a.title},a.name))})]}),n.map(a=>(0,Hl.jsx)(xB.TabPanel,{tabId:a.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:a.panelRef,children:a.panel},a.name))]})})}var CB=(0,XK.forwardRef)(Uxe);var BB=l(F(),1),ag=l(R(),1);function Gy(e=!0){let{setZoomLevel:t,resetZoomLevel:o}=M((0,BB.useDispatch)(_)),{isZoomedOut:r,isZoomOut:n}=(0,BB.useSelect)(a=>{let{isZoomOut:c}=M(a(_));return{isZoomedOut:c(),isZoomOut:c}},[]),i=(0,ag.useRef)(!1),s=(0,ag.useRef)(e);(0,ag.useEffect)(()=>{r!==s.current&&(i.current=!1)},[r]),(0,ag.useEffect)(()=>(s.current=e,e!==n()&&(i.current=!0,e?t("auto-scaled"):o()),()=>{i.current&&n()&&o()}),[e,n,o,t])}var qe=l(w(),1),JK=()=>{};function Hxe({rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,onSelect:n,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:a="",shouldFocusBlock:c=!0,onPatternCategorySelection:u,onClose:d,__experimentalInitialTab:f,__experimentalInitialCategory:m},h){let{isZoomOutMode:p,hasSectionRootClientId:g}=(0,QK.useSelect)(he=>{let{isZoomOut:xe,getSectionRootClientId:ze}=M(he(_));return{isZoomOutMode:xe(),hasSectionRootClientId:!!ze()}},[]),[b,v,k]=(0,Wy.useDebouncedInput)(a),[y,S]=(0,Ft.useState)(null),[x,C]=(0,Ft.useState)(m),[B,I]=(0,Ft.useState)("all"),[P,E]=(0,Ft.useState)(null),L=(0,Wy.useViewportMatch)("large"),O=(0,Wy.useViewportMatch)("medium","<")?d:JK;function D(){return f||(p?"patterns":"blocks")}let[U,G]=(0,Ft.useState)(D());Gy(g&&(U==="patterns"||U==="media")&&L);let[z,W,ee]=$u({rootClientId:e,clientId:t,isAppender:o,insertionIndex:r,shouldFocusBlock:c}),se=(0,Ft.useRef)(),ce=(0,Ft.useCallback)((he,xe,ze,ot)=>{W(he,xe,ze,ot),n(he),O(),window.requestAnimationFrame(()=>{!c&&!se.current?.contains(h.current.ownerDocument.activeElement)&&se.current?.querySelector("button").focus()})},[W,O,n,h,c]),ie=(0,Ft.useCallback)((he,xe,...ze)=>{ee(!1),W(he,{patternName:xe},...ze),n(),O()},[W,O,n,ee]),re=(0,Ft.useCallback)(he=>{ee(he),S(he)},[ee,S]),Q=(0,Ft.useCallback)((he,xe)=>{C(he),I(xe),u?.()},[C,u]),Y=U==="patterns"&&!k&&!!x,J=U==="media"&&!!P,K=(0,Ft.useMemo)(()=>U==="media"?null:(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(lg.SearchControl,{className:"block-editor-inserter__search",onChange:he=>{y&&S(null),v(he)},value:b,label:(0,Xu.__)("Search"),placeholder:(0,Xu.__)("Search")}),!!k&&(0,qe.jsx)(_B,{filterValue:k,onSelect:n,onHover:re,rootClientId:e,clientId:t,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:c,prioritizePatterns:U==="patterns"})]}),[U,y,S,v,b,k,n,re,c,t,e,r,o]),H=(0,Ft.useMemo)(()=>(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,qe.jsx)(oK,{ref:se,rootClientId:z,onInsert:ce,onHover:re,showMostUsedBlocks:s})}),i&&(0,qe.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,qe.jsx)(lg.VisuallyHidden,{as:"h2",children:(0,Xu.__)("A tip for using the block editor")}),(0,qe.jsx)(v9,{})]})]}),[z,ce,re,s,i]),X=(0,Ft.useMemo)(()=>(0,qe.jsx)(EK,{rootClientId:z,onInsert:ie,onSelectCategory:Q,selectedCategory:x,children:Y&&(0,qe.jsx)(fB,{rootClientId:z,onInsert:ie,category:x,patternFilter:B,showTitlesAsTooltip:!0})}),[z,ie,Q,B,x,Y]),ne=(0,Ft.useMemo)(()=>(0,qe.jsx)(H5,{rootClientId:z,selectedCategory:P,onSelectCategory:E,onInsert:ce,children:J&&(0,qe.jsx)(Uy,{rootClientId:z,onInsert:ce,category:P})}),[z,ce,P,E,J]),le=he=>{he!=="patterns"&&C(null),G(he)},ve=(0,Ft.useRef)();return(0,Ft.useLayoutEffect)(()=>{ve.current&&window.requestAnimationFrame(()=>{ve.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()})},[]),(0,qe.jsxs)("div",{className:V("block-editor-inserter__menu",{"show-panel":Y||J,"is-zoom-out":p}),ref:h,children:[(0,qe.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,qe.jsx)(CB,{ref:ve,onSelect:le,onClose:d,selectedTab:U,closeButtonLabel:(0,Xu.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,Xu.__)("Blocks"),panel:(0,qe.jsxs)(qe.Fragment,{children:[K,U==="blocks"&&!k&&H]})},{name:"patterns",title:(0,Xu.__)("Patterns"),panel:(0,qe.jsxs)(qe.Fragment,{children:[K,U==="patterns"&&!k&&X]})},{name:"media",title:(0,Xu.__)("Media"),panel:(0,qe.jsxs)(qe.Fragment,{children:[K,ne]})}]})}),i&&y&&(0,qe.jsx)(lg.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,qe.jsx)(X1,{item:y})})]})}var W5=(0,Ft.forwardRef)(Hxe);function Gxe(e,t){return(0,qe.jsx)(W5,{...e,onPatternCategorySelection:JK,ref:t})}var eY=(0,Ft.forwardRef)(Gxe);var EB=l(R(),1),$y=l(N(),1),TB=l(A(),1),tY=l(F(),1);var fm=l(w(),1),Wxe=6,$xe=6,Kxe=2;function IB({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n,hasSearch:i=!0}){let[s,a]=(0,EB.useState)(""),[c,u]=$u({onSelect:e,rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:n}),[d]=ku(c,u,!0),{setInserterIsOpened:f,insertionIndex:m}=(0,tY.useSelect)(g=>{let{getSettings:b,getBlockIndex:v,getBlockCount:k}=g(_),y=b(),S=v(o),x=k();return{setInserterIsOpened:y.__experimentalSetIsInserterOpened,insertionIndex:S===-1?x:S}},[o]),h=i&&d.length>Wxe;(0,EB.useEffect)(()=>{f&&f(!1)},[f]);let p=()=>{f({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})};return(0,fm.jsxs)("div",{className:V("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":f}),children:[h&&(0,fm.jsx)(TB.SearchControl,{className:"block-editor-inserter__search",value:s,onChange:g=>{a(g)},label:(0,$y.__)("Search"),placeholder:(0,$y.__)("Search")}),(0,fm.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,fm.jsx)(_B,{filterValue:s,onSelect:e,rootClientId:t,clientId:o,isAppender:r,maxBlockPatterns:s?Kxe:0,maxBlockTypes:$xe,isDraggable:!1,selectBlockOnInsert:n,isQuick:!0})}),f&&(0,fm.jsx)(TB.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:p,"aria-label":(0,$y.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,$y.__)("Browse all")})]})}var Yxe=50;function oY(e,t){if(!e||!e.attributes||!t?.__experimentalLabel)return null;let o=t.__experimentalLabel(e.attributes,{context:"appender"});return typeof o=="string"&&o.length<Yxe&&o.length>0?o:null}var Ky=l(w(),1),qxe=({onToggle:e,disabled:t,isOpen:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s={}})=>{let{as:a=PB.Button,label:c,onClick:u,...d}=s,f=c;!f&&i?f=i:!f&&n?f=(0,Gl.sprintf)((0,Gl._x)("Add %s","directly add the only allowed block"),r.toLowerCase()):f||(f=(0,Gl._x)("Add block","Generic label for block inserter button"));function m(h){e&&e(h),u&&u(h)}return(0,Ky.jsx)(a,{__next40pxDefaultSize:s.as?void 0:!0,icon:Bi,label:f,tooltipPosition:"bottom",onClick:m,className:"block-editor-inserter__toggle","aria-haspopup":n?!1:"true","aria-expanded":n?!1:o,disabled:t,...d})},Zxe=class extends nY.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){let{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){let{disabled:o,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s,hasItems:a,renderToggle:c=qxe}=this.props;return c({onToggle:e,isOpen:t,disabled:o||!a,blockTitle:r,hasSingleBlockType:n,appenderLabel:i,toggleProps:s})}renderContent({onClose:e}){let{rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:a}=this.props;return i?(0,Ky.jsx)(IB,{onSelect:c=>{let u=Array.isArray(c)&&c?.length?c[0]:c;s&&typeof s=="function"&&s(u),e()},rootClientId:t,clientId:o,isAppender:r,selectBlockOnInsert:a}):(0,Ky.jsx)(eY,{onSelect:()=>{e()},onClose:e,rootClientId:t,clientId:o,isAppender:r,showInserterHelpPanel:n})}render(){let{position:e,hasSingleBlockType:t,directInsertBlock:o,insertOnlyAllowedBlock:r,__experimentalIsQuick:n,onSelectOrClose:i}=this.props;return t||o?this.renderToggle({onToggle:r}):(0,Ky.jsx)(PB.Dropdown,{className:"block-editor-inserter",contentClassName:V("block-editor-inserter__popover",{"is-quick":n}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,Gl.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}},Ui=(0,OB.compose)([(0,RB.withSelect)((e,{clientId:t,rootClientId:o,shouldDirectInsert:r=!0})=>{let{getBlockRootClientId:n,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:a}=e(_),{getBlockVariations:c,getBlockType:u}=e(Yy.store);o=o||n(t)||void 0;let d=s(o),f=r&&a(o),m=d?.length===1&&c(d[0].name,"inserter")?.length===0,h=!1;m&&(h=d[0]);let p=f?u(f.name):null,g=oY(f,p);return{hasItems:i(o),hasSingleBlockType:m,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:f,appenderLabel:g,rootClientId:o}}),(0,RB.withDispatch)((e,t,{select:o})=>({insertOnlyAllowedBlock(){let{rootClientId:r,clientId:n,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:d}=t;if(!s&&!c)return;function f(b){let{getBlock:v,getPreviousBlockClientId:k}=o(_);if(!b||!n&&!r)return{};let y={},S={};if(n){let x=v(n),C=v(k(n));x?.name===C?.name&&(S=C?.attributes||{})}else{let x=v(r);if(x?.innerBlocks?.length){let C=x.innerBlocks[x.innerBlocks.length-1];c&&c?.name===C.name&&(S=C.attributes)}}return b.forEach(x=>{S.hasOwnProperty(x)&&(y[x]=S[x])}),y}function m(){let{getBlockIndex:b,getBlockSelectionEnd:v,getBlockOrder:k,getBlockRootClientId:y}=o(_);if(n)return b(n);let S=v();return!i&&S&&y(S)===r?b(S)+1:k(r).length}let{insertBlock:h}=e(_),p;if(c){let b=f(c.attributesToCopy);p=(0,Yy.createBlock)(c.name,{...c.attributes||{},...b})}else p=(0,Yy.createBlock)(a.name);h(p,m(),r,d),u&&u(p);let g=(0,Gl.sprintf)((0,Gl.__)("%s block added"),a.title);(0,rY.speak)(g)}})),(0,OB.ifCondition)(({hasItems:e,isAppender:t,rootClientId:o,clientId:r})=>e||!t&&!o&&!r)])(Zxe);var qy=l(w(),1),Xxe="\uFEFF";function cg({rootClientId:e}){let{showPrompt:t,isLocked:o,placeholder:r,isManualGrid:n}=(0,AB.useSelect)(u=>{let{getBlockCount:d,getSettings:f,getTemplateLock:m,getBlockAttributes:h}=u(_),p=!d(e),{bodyPlaceholder:g}=f();return{showPrompt:p,isLocked:!!m(e),placeholder:g,isManualGrid:h(e)?.layout?.isManualPlacement}},[e]),{insertDefaultBlock:i,startTyping:s}=(0,AB.useDispatch)(_);if(o||n)return null;let a=(0,iY.decodeEntities)(r)||(0,$5.__)("Type / to choose a block"),c=()=>{i(void 0,e),s()};return(0,qy.jsxs)("div",{"data-root-client-id":e||"",className:V("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,qy.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,$5.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:u=>{(LB.ENTER===u.keyCode||LB.SPACE===u.keyCode)&&c()},onClick:()=>c(),onFocus:()=>{t&&c()},children:t?a:Xxe}),(0,qy.jsx)(Ui,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}var sY=l(A(),1),K5=l(R(),1),Zy=l(N(),1);var aY=l(Re(),1);var NB=l(w(),1);function lY({rootClientId:e,className:t,onFocus:o,tabIndex:r,onSelect:n},i){return(0,NB.jsx)(Ui,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...s)=>{n&&typeof n=="function"&&n(...s)},renderToggle:({onToggle:s,disabled:a,isOpen:c,blockTitle:u,hasSingleBlockType:d,appenderLabel:f})=>{let m=!d,h;return f?h=f:d?h=(0,Zy.sprintf)((0,Zy._x)("Add %s","directly add the only allowed block"),u.toLowerCase()):h=(0,Zy._x)("Add block","Generic label for block inserter button"),(0,NB.jsx)(sY.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:o,tabIndex:r,className:V(t,"block-editor-button-block-appender"),onClick:s,"aria-haspopup":m?"true":void 0,"aria-expanded":m?c:void 0,disabled:a,label:h,showTooltip:!0,children:(0,NB.jsx)(we,{icon:Bi})})},isAppender:!0})}var cY=(0,K5.forwardRef)((e,t)=>((0,aY.default)("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),lY(e,t))),Qu=(0,K5.forwardRef)(lY);var ug=l(w(),1);function Qxe({rootClientId:e}){return(0,Y5.useSelect)(o=>o(_).canInsertBlockType((0,uY.getDefaultBlockName)(),e))?(0,ug.jsx)(cg,{rootClientId:e}):(0,ug.jsx)(Qu,{rootClientId:e,className:"block-list-appender__toggle"})}function dY({rootClientId:e,CustomAppender:t,className:o,tagName:r="div"}){let n=(0,Y5.useSelect)(i=>{let{getBlockInsertionPoint:s,isBlockInsertionPointVisible:a,getBlockCount:c}=i(_),u=s();return a()&&e===u?.rootClientId&&c(e)===0},[e]);return(0,ug.jsx)(r,{tabIndex:-1,className:V("block-list-appender wp-block",o,{"is-drag-over":n}),contentEditable:!1,"data-block":!0,children:t?(0,ug.jsx)(t,{}):(0,ug.jsx)(Qxe,{rootClientId:e})})}var BY=l(Z(),1),Qy=l(F(),1),EY=l(R(),1),TY=l(N(),1);var dg=l(F(),1),ed=l(R(),1),VB=l(A(),1),wY=l(Z(),1);var pY=l(F(),1),Ju=l(R(),1),hY=l(A(),1),gY=l(N(),1);var mY=l(Z(),1),q5=l(Fe(),1),fY=new WeakMap;function Jxe(e){let t=(0,mY.useRefEffect)(o=>{function r(i){let{deltaX:s,deltaY:a,target:c}=i,u=e.current,d=fY.get(u);d||(d=(0,q5.getScrollContainer)(u),fY.set(u,d));let f=(0,q5.getScrollContainer)(c);o.contains(f)||d.scrollBy(s,a)}let n={passive:!0};return o.addEventListener("wheel",r,n),()=>{o.removeEventListener("wheel",r,n)}},[e]);return e?t:null}var mm=Jxe;var Z5=l(w(),1),ewe=Number.MAX_SAFE_INTEGER;function twe({previousClientId:e,nextClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,operation:i="insert",nearestSide:s="right",...a}){let[c,u]=(0,Ju.useReducer)(k=>(k+1)%ewe,0),{orientation:d,rootClientId:f,isVisible:m}=(0,pY.useSelect)(k=>{let{getBlockListSettings:y,getBlockRootClientId:S,isBlockVisible:x}=k(_),C=S(e??t);return{orientation:y(C)?.orientation||"vertical",rootClientId:C,isVisible:x(e)&&x(t)}},[e,t]),h=Xe(e),p=Xe(t),g=d==="vertical",b=(0,Ju.useMemo)(()=>c<0||!h&&!p||!m?void 0:{contextElement:i==="group"?p||h:h||p,getBoundingClientRect(){let y=h?h.getBoundingClientRect():null,S=p?p.getBoundingClientRect():null,x=0,C=0,B=0,I=0;if(i==="group"){let P=S||y;C=P.top,B=0,I=P.bottom-P.top,x=s==="left"?P.left-2:P.right-2}else g?(C=y?y.bottom:S.top,B=y?y.width:S.width,I=S&&y?S.top-y.bottom:0,x=y?y.left:S.left):(C=y?y.top:S.top,I=y?y.height:S.height,(0,gY.isRTL)()?(x=S?S.right:y.left,B=y&&S?y.left-S.right:0):(x=y?y.right:S.left,B=y&&S?S.left-y.right:0),B=Math.max(B,0));return new window.DOMRect(x,C,B,I)}},[h,p,c,g,m,i,s]),v=mm(n);return(0,Ju.useLayoutEffect)(()=>{if(!h)return;let k=new window.MutationObserver(u);return k.observe(h,{attributes:!0}),()=>{k.disconnect()}},[h]),(0,Ju.useLayoutEffect)(()=>{if(!p)return;let k=new window.MutationObserver(u);return k.observe(p,{attributes:!0}),()=>{k.disconnect()}},[p]),(0,Ju.useLayoutEffect)(()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",u),()=>{h.ownerDocument.defaultView?.removeEventListener("resize",u)}},[h]),!h&&!p||!m?null:(0,Z5.jsx)(hY.Popover,{ref:v,animate:!1,anchor:b,focusOnMount:!1,__unstableSlotName:r,inline:!r,...a,className:V("block-editor-block-popover","block-editor-block-popover__inbetween",a.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,Z5.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:o})},t+"--"+f)}var MB=twe;var yY=l(F(),1),SY=l(Z(),1),_Y=l(A(),1);var $l=l(R(),1);var bY=l(Z(),1),kY=l(A(),1),Wl=l(R(),1);var X5=l(w(),1),owe=Number.MAX_SAFE_INTEGER;function rwe({clientId:e,bottomClientId:t,children:o,__unstablePopoverSlot:r,__unstableContentRef:n,shift:i=!0,...s},a){let c=Xe(e),u=Xe(t??e),d=(0,bY.useMergeRefs)([a,mm(n)]),[f,m]=(0,Wl.useReducer)(p=>(p+1)%owe,0);(0,Wl.useLayoutEffect)(()=>{if(!c)return;let p=new window.MutationObserver(m);return p.observe(c,{attributes:!0}),()=>{p.disconnect()}},[c]);let h=(0,Wl.useMemo)(()=>{if(!(f<0||!c||t&&!u))return{getBoundingClientRect(){return u?xD(Sh(c),Sh(u)):Sh(c)},contextElement:c}},[f,c,t,u]);return!c||t&&!u?null:(0,X5.jsx)(kY.Popover,{ref:d,animate:!1,focusOnMount:!1,anchor:h,__unstableSlotName:r,inline:!r,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:V("block-editor-block-popover",s.className),variant:"unstyled",children:o})}var pm=(0,Wl.forwardRef)(rwe),nwe=({clientId:e,bottomClientId:t,children:o,...r},n)=>(0,X5.jsx)(pm,{...r,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:n,children:o}),vY=(0,Wl.forwardRef)(nwe);var DB=l(w(),1);function iwe({clientId:e,bottomClientId:t,children:o,shift:r=!1,additionalStyles:n,...i},s){t??=e;let a=Xe(e);return(0,DB.jsx)(pm,{ref:s,clientId:e,bottomClientId:t,shift:r,...i,children:a&&e===t?(0,DB.jsx)(swe,{selectedElement:a,additionalStyles:n,children:o}):o})}function swe({selectedElement:e,additionalStyles:t={},children:o}){let[r,n]=(0,$l.useState)(e.offsetWidth),[i,s]=(0,$l.useState)(e.offsetHeight);(0,$l.useEffect)(()=>{let c=new window.ResizeObserver(()=>{n(e.offsetWidth),s(e.offsetHeight)});return c.observe(e,{box:"border-box"}),()=>c.disconnect()},[e]);let a=(0,$l.useMemo)(()=>({position:"absolute",width:r,height:i,...t}),[r,i,t]);return(0,DB.jsx)("div",{style:a,children:o})}var Hi=(0,$l.forwardRef)(iwe);var Q5=l(w(),1),Xy={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};function awe({__unstablePopoverSlot:e,__unstableContentRef:t}){let{clientId:o}=(0,yY.useSelect)(n=>{let{getBlockOrder:i,getBlockInsertionPoint:s}=n(_),a=s(),c=i(a.rootClientId);return c.length?{clientId:c[a.index]}:{}},[]),r=(0,SY.useReducedMotion)();return(0,Q5.jsx)(Hi,{clientId:o,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,Q5.jsx)(_Y.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:r?Xy.show:Xy.hide,animate:Xy.show,exit:r?Xy.show:Xy.exit,className:"block-editor-block-popover__drop-zone-foreground"})})}var xY=awe;var Kl=l(w(),1),fg=(0,ed.createContext)();fg.displayName="InsertionPointOpenRefContext";function lwe({__unstablePopoverSlot:e,__unstableContentRef:t,operation:o="insert",nearestSide:r="right"}){let{selectBlock:n,hideInsertionPoint:i}=(0,dg.useDispatch)(_),s=(0,ed.useContext)(fg),a=(0,ed.useRef)(),{orientation:c,previousClientId:u,nextClientId:d,rootClientId:f,isInserterShown:m,isDistractionFree:h,isZoomOutMode:p}=(0,dg.useSelect)(P=>{let{getBlockOrder:E,getBlockListSettings:L,getBlockInsertionPoint:T,isBlockBeingDragged:O,getPreviousBlockClientId:D,getNextBlockClientId:U,getSettings:G,isZoomOut:j}=M(P(_)),z=T(),W=E(z.rootClientId);if(!W.length)return{};let ee=W[z.index-1],se=W[z.index];for(;O(ee);)ee=D(ee);for(;O(se);)se=U(se);let ce=G();return{previousClientId:ee,nextClientId:se,orientation:L(z.rootClientId)?.orientation||"vertical",rootClientId:z.rootClientId,isDistractionFree:ce.isDistractionFree,isInserterShown:z?.__unstableWithInserter,isZoomOutMode:j()}},[]),{getBlockEditingMode:g}=(0,dg.useSelect)(_),b=(0,wY.useReducedMotion)();function v(P){P.target===a.current&&d&&g(d)!=="disabled"&&n(d,-1)}function k(P){P.target===a.current&&!s.current&&i()}function y(P){P.target!==a.current&&(s.current=!0)}let S=(0,ed.useCallback)(P=>{!P&&s.current&&(s.current=!1)},[s]),x={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:m?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},C={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h||p&&o!=="insert")return null;let I=V("block-editor-block-list__insertion-point",c==="horizontal"||o==="group"?"is-horizontal":"is-vertical");return(0,Kl.jsx)(MB,{previousClientId:u,nextClientId:d,__unstablePopoverSlot:e,__unstableContentRef:t,operation:o,nearestSide:r,children:(0,Kl.jsxs)(VB.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:a,tabIndex:-1,onClick:v,onFocus:y,className:V(I,{"is-with-inserter":m}),onHoverEnd:k,children:[(0,Kl.jsx)(VB.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),m&&(0,Kl.jsx)(VB.__unstableMotion.div,{variants:C,className:V("block-editor-block-list__insertion-point-inserter"),children:(0,Kl.jsx)(Ui,{ref:S,position:"bottom center",clientId:d,rootClientId:f,__experimentalIsQuick:!0,onToggle:P=>{s.current=P},onSelectOrClose:()=>{s.current=!1}})})]})})}function CY(e){let{insertionPoint:t,isVisible:o,isBlockListEmpty:r}=(0,dg.useSelect)(n=>{let{getBlockInsertionPoint:i,isBlockInsertionPointVisible:s,getBlockCount:a}=n(_),c=i();return{insertionPoint:c,isVisible:s(),isBlockListEmpty:a(c?.rootClientId)===0}},[]);return!o||r?null:t.operation==="replace"?(0,Kl.jsx)(xY,{...e},`${t.rootClientId}-${t.index}`):(0,Kl.jsx)(lwe,{operation:t.operation,nearestSide:t.nearestSide,...e})}function IY(){let e=(0,EY.useContext)(fg),t=(0,Qy.useSelect)(g=>{let b=g(_).getSettings();return b.isDistractionFree||b.isPreviewMode||M(g(_)).isZoomOut()},[]),{getBlockListSettings:o,getBlockIndex:r,isMultiSelecting:n,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:a,__unstableIsWithinBlockOverlay:c,getBlockEditingMode:u,getBlockName:d,getBlockAttributes:f,getParentSectionBlock:m}=M((0,Qy.useSelect)(_)),{showInsertionPoint:h,hideInsertionPoint:p}=(0,Qy.useDispatch)(_);return(0,BY.useRefEffect)(g=>{if(t)return;function b(v){if(e===void 0||e.current||v.target.nodeType===v.target.TEXT_NODE||n())return;if(!v.target.classList.contains("block-editor-block-list__layout")){p();return}let k;if(v.target.classList.contains("is-root-container")||(k=(v.target.getAttribute("data-block")?v.target:v.target.closest("[data-block]")).getAttribute("data-block")),a(k)||u(k)==="disabled"||d(k)==="core/block"||k&&f(k).layout?.isManualPlacement)return;let y=o(k),S=y?.orientation||"vertical",x=!!y?.__experimentalCaptureToolbars,C=v.clientY,B=v.clientX,P=Array.from(v.target.children).find(O=>{let D=O.getBoundingClientRect();return O.classList.contains("wp-block")&&S==="vertical"&&D.top>C||O.classList.contains("wp-block")&&S==="horizontal"&&((0,TY.isRTL)()?D.right<B:D.left>B)});if(!P){p();return}if(!P.id&&(P=P.firstElementChild,!P)){p();return}let E=P.id.slice(6);if(!E||c(E)||m(E)||i().includes(E)&&S==="vertical"&&!x&&!s().hasFixedToolbar)return;let L=P.getBoundingClientRect();if(S==="horizontal"&&(v.clientY>L.bottom||v.clientY<L.top)||S==="vertical"&&(v.clientX>L.right||v.clientX<L.left)){p();return}let T=r(E);if(T===0){p();return}h(k,T,{__unstableWithInserter:!0})}return g.addEventListener("mousemove",b),()=>{g.removeEventListener("mousemove",b)}},[e,o,r,n,h,p,i,t])}var FB=l(F(),1),PY=l(Z(),1);var RY=l(w(),1);function hm(){let{getSettings:e,hasSelectedBlock:t,hasMultiSelection:o}=(0,FB.useSelect)(_),{clearSelectedBlock:r}=(0,FB.useDispatch)(_),{clearBlockSelection:n}=e();return(0,PY.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 OY(e){return(0,RY.jsx)("div",{ref:hm(),...e})}var JY=l(Z(),1),pg=l(R(),1),eq=l(F(),1),vm=l($(),1);var AY=l(w(),1);function LY({showSeparator:e,isFloating:t,onAddBlock:o,isToggle:r}){let{clientId:n}=Ie();return(0,AY.jsx)(Qu,{className:V({"block-list-appender__toggle":r}),rootClientId:n,showSeparator:e,isFloating:t,onAddBlock:o})}var NY=l(w(),1);function MY(){let{clientId:e}=Ie();return(0,NY.jsx)(cg,{rootClientId:e})}var jB=l(R(),1),FY=l(F(),1),zB=l(Re(),1),zY=l(Jy(),1);var eS=new WeakMap;function cwe(){let e;return t=>((e===void 0||!(0,zY.isShallowEqual)(e,t))&&(e=t),e)}function VY(e){let[t]=(0,jB.useState)(cwe);return t(e)}function jY(e,t,o,r,n,i,s,a,c,u,d,f){let m=(0,FY.useRegistry)(),h=VY(o),p=VY(r),g=c===void 0||t==="contentOnly"?t:c;(0,jB.useLayoutEffect)(()=>{let b={allowedBlocks:h,prioritizedInserterBlocks:p,templateLock:g};if(u!==void 0&&(b.__experimentalCaptureToolbars=u),d!==void 0)b.orientation=d;else{let v=xs(f?.type);b.orientation=v.getOrientation(f)}s!==void 0&&((0,zB.default)("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),b.defaultBlock=s),n!==void 0&&(b.defaultBlock=n),a!==void 0&&((0,zB.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,zB.default)("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),eS.get(m)||eS.set(m,{}),eS.get(m)[e]=b,window.queueMicrotask(()=>{let v=eS.get(m);if(Object.keys(v).length){let{updateBlockListSettings:k}=m.dispatch(_);k(v),eS.set(m,{})}})},[e,h,p,g,n,i,s,a,u,d,f,m])}var J5=l(yf(),1),UB=l(R(),1),UY=l(F(),1),HY=l($(),1);function GY(e,t,o,r){let n=(0,UY.useRegistry)(),i=(0,UB.useRef)(null);(0,UB.useLayoutEffect)(()=>{let s=!1,{getBlocks:a,getSelectedBlocksInitialCaretPosition:c,isBlockSelected:u}=n.select(_),{replaceInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=n.dispatch(_);return window.queueMicrotask(()=>{if(s)return;let m=a(e),h=m.length===0||o==="all"||o==="contentOnly",p=!(0,J5.default)(t,i.current);if(!h||!p)return;i.current=t;let g=(0,HY.synchronizeBlocksWithTemplate)(m,t);(0,J5.default)(g,m)||(f(),d(e,g,m.length===0&&r&&g.length!==0&&u(e),c()))}),()=>{s=!0}},[t,o,e,n,r])}var WY=l($(),1),$Y=l(F(),1);function KY(e){return(0,$Y.useSelect)(t=>{let o=t(_).getBlock(e);if(!o)return;let r=t(WY.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 km=l(F(),1),WB=l(R(),1),$B=l(Z(),1),XY=l(N(),1),mg=l($(),1);var eV=l(R(),1),Zn=l($(),1),gm=l(F(),1),YY=l(Fe(),1);function tV(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 uwe(e,t,o,r,n,i,s,a,c){return u=>{let{srcRootClientId:d,srcClientIds:f,type:m,blocks:h}=tV(u);if(m==="inserter"){s();let p=h.map(g=>(0,Zn.cloneBlock)(g));i(p,!0,null)}if(m==="block"){let p=o(f[0]);if(d===e&&p===t||f.includes(e)||r(f).some(k=>k===e))return;if(a==="group"){let k=f.map(y=>c(y));i(k,!0,null,f);return}let g=d===e,b=f.length,v=g&&p<t?t-b:t;n(f,d,v)}}}function dwe(e,t,o,r,n){return i=>{if(!t().mediaUpload)return;let s=(0,Zn.findTransform)((0,Zn.getBlockTransforms)("from"),a=>a.type==="files"&&r(a.blockName,e)&&a.isMatch(i));if(s){let a=s.transform(i,o);n(a)}}}function fwe(e){return t=>{let o=(0,Zn.pasteHandler)({HTML:t,mode:"BLOCKS"});o.length&&e(o)}}function HB(e,t,o={}){let{operation:r="insert",nearestSide:n="right"}=o,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:a,getBlockOrder:c,getBlocksByClientId:u,getSettings:d,getBlock:f}=(0,gm.useSelect)(_),{getGroupingBlockName:m}=(0,gm.useSelect)(Zn.store),{insertBlocks:h,moveBlocksToPosition:p,updateBlockAttributes:g,clearSelectedBlock:b,replaceBlocks:v,removeBlocks:k}=(0,gm.useDispatch)(_),y=(0,gm.useRegistry)(),S=(0,eV.useCallback)((P,E=!0,L=0,T=[])=>{Array.isArray(P)||(P=[P]);let D=c(e)[t];if(r==="replace")v(D,P,void 0,L);else if(r==="group"){let U=f(D);n==="left"?P.push(U):P.unshift(U);let G=P.map(ee=>(0,Zn.createBlock)(ee.name,ee.attributes,ee.innerBlocks)),j=P.every(ee=>ee.name==="core/image"),z=i("core/gallery",e),W=(0,Zn.createBlock)(j&&z?"core/gallery":m(),{layout:{type:"flex",flexWrap:j&&z?null:"nowrap"}},G);v([D,...T],W,void 0,L)}else h(P,t,e,E,L)},[c,e,t,r,v,f,n,i,m,h]),x=(0,eV.useCallback)((P,E,L)=>{if(r==="replace"){let T=u(P),D=c(e)[t];y.batch(()=>{k(P,!1),v(D,T,void 0,0)})}else p(P,E,e,L)},[r,c,u,p,y,k,v,t,e]),C=uwe(e,t,s,a,x,S,b,r,f),B=dwe(e,d,g,i,S),I=fwe(S);return P=>{let E=(0,YY.getFilesFromDataTransfer)(P.dataTransfer),L=P.dataTransfer.getData("text/html");L?I(L):E.length?B(E):C(P)}}function mwe(e,t,o){let r=o==="top"||o==="bottom",{x:n,y:i}=e,s=r?n:i,a=r?i:n,c=r?t.left:t.top,u=r?t.right:t.bottom,d=t[o],f;return s>=c&&s<=u?f=s:s<u?f=c:f=u,Math.sqrt((s-f)**2+(a-d)**2)}function bm(e,t,o=["top","bottom","left","right"]){let r,n;return o.forEach(i=>{let s=mwe(e,t,i);(r===void 0||s<r)&&(r=s,n=i)}),[r,n]}function GB(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}function qY(e,t){return t.top<=e.y&&t.bottom>=e.y}var oV=30,pwe=120,hwe=120;function gwe(e,t,o="vertical",r={}){let n=o==="horizontal"?["left","right"]:["top","bottom"],i=0,s="before",a=1/0,c=null,u="right",{dropZoneElement:d,parentBlockOrientation:f,rootBlockIndex:m=0}=r;if(d&&f!=="horizontal"){let v=d.getBoundingClientRect(),[k,y]=bm(t,v,["top","bottom"]);if(v.height>pwe&&k<oV){if(y==="top")return[m,"before"];if(y==="bottom")return[m+1,"after"]}}let h=(0,XY.isRTL)();if(d&&f==="horizontal"){let v=d.getBoundingClientRect(),[k,y]=bm(t,v,["left","right"]);if(v.width>hwe&&k<oV){if(h&&y==="right"||!h&&y==="left")return[m,"before"];if(h&&y==="left"||!h&&y==="right")return[m+1,"after"]}}e.forEach(({isUnmodifiedDefaultBlock:v,getBoundingClientRect:k,blockIndex:y,blockOrientation:S})=>{let x=k();if(!x)return;let[C,B]=bm(t,x,n),[I,P]=bm(t,x,["left","right"]),E=GB(t,x);v&&E?C=0:o==="vertical"&&S!=="horizontal"&&(E&&I<oV||!E&&qY(t,x))&&(c=y,u=P),C<a&&(s=B==="bottom"||!h&&B==="right"||h&&B==="left"?"after":"before",a=C,i=y)});let p=i+(s==="after"?1:-1),g=!!e[i]?.isUnmodifiedDefaultBlock,b=!!e[p]?.isUnmodifiedDefaultBlock;return c!==null?[c,"group",u]:!g&&!b?[s==="after"?i+1:i,"insert"]:[g?i:p,"replace"]}function KB(e,t,o,r){let n=!0;if(t){let a=t?.map(({name:c})=>c);n=o.every(c=>a?.includes(c))}let s=o.map(a=>e(a)).every(a=>{let[c]=a?.parent||[];return c?c===r:!0});return n&&s}function ZY(e,t){let{defaultView:o}=t;return!!(o&&e instanceof o.HTMLElement&&e.closest("[data-is-insertion-point]"))}function QY({dropZoneElement:e,rootClientId:t="",parentClientId:o="",isDisabled:r=!1}={}){let n=(0,km.useRegistry)(),[i,s]=(0,WB.useState)({index:null,operation:"insert"}),{getBlockType:a,getBlockVariations:c,getGroupingBlockName:u}=(0,km.useSelect)(mg.store),{canInsertBlockType:d,getBlockListSettings:f,getBlocks:m,getBlockIndex:h,getDraggedBlockClientIds:p,getBlockNamesByClientId:g,getAllowedBlocks:b,isDragging:v,isGroupable:k,isZoomOut:y,getSectionRootClientId:S,getBlockParents:x}=M((0,km.useSelect)(_)),{showInsertionPoint:C,hideInsertionPoint:B,startDragging:I,stopDragging:P}=M((0,km.useDispatch)(_)),E=HB(i.operation==="before"||i.operation==="after"?o:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),L=(0,$B.useThrottle)((0,WB.useCallback)((T,O)=>{v()||I();let D=p(),U=[t,...x(t,!0)];if(D.some(H=>U.includes(H)))return;let j=b(t),z=g([t])[0],W=g(D);if(!KB(a,j,W,z))return;let se=S();if(y()&&se!==t)return;let ce=m(t).filter(H=>!((0,mg.hasBlockSupport)(H.name,"visibility",!0)&&H.attributes?.metadata?.blockVisibility===!1));if(ce.length===0){n.batch(()=>{s({index:0,operation:"insert"}),C(t,0,{operation:"insert"})});return}let ie=ce.map(H=>{let X=H.clientId;return{isUnmodifiedDefaultBlock:(0,mg.isUnmodifiedDefaultBlock)(H),getBoundingClientRect:()=>{let ne=O.getElementById(`block-${X}`);return ne?ne.getBoundingClientRect():null},blockIndex:h(X),blockOrientation:f(X)?.orientation}}),re=gwe(ie,{x:T.clientX,y:T.clientY},f(t)?.orientation,{dropZoneElement:e,parentBlockClientId:o,parentBlockOrientation:o?f(o)?.orientation:void 0,rootBlockIndex:h(t)}),[Q,Y,J]=re,K=ie[Q]?.isUnmodifiedDefaultBlock;if(!(y()&&!K&&Y!=="insert")){if(Y==="group"){let H=ce[Q],X=[H.name,...W].every(xe=>xe==="core/image"),ne=d("core/gallery",t),le=k([H.clientId,p()]),ve=c(u(),"block"),he=ve&&ve.find(({name:xe})=>xe==="group-row");if(X&&!ne&&(!le||!he)||!X&&(!le||!he))return}n.batch(()=>{s({index:Q,operation:Y,nearestSide:J});let H=["before","after"].includes(Y)?o:t;C(H,Q,{operation:Y,nearestSide:J})})}},[v,b,t,g,p,a,S,y,m,f,e,o,h,n,I,C,d,k,c,u]),200);return(0,$B.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:r,onDrop:E,onDragOver(T){L(T,T.currentTarget.ownerDocument)},onDragLeave(T){let{ownerDocument:O}=T.currentTarget;ZY(T.relatedTarget,O)||ZY(T.target,O)||(L.cancel(),B())},onDragEnd(){L.cancel(),P(),B()}})}var Yl=l(w(),1),bwe={};function kwe({children:e,clientId:t}){let o=KY(t);return(0,Yl.jsx)(g0,{value:o,children:e})}var vwe=(0,pg.memo)(Vy);function tq(e){let{clientId:t,allowedBlocks:o,prioritizedInserterBlocks:r,defaultBlock:n,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:a,template:c,templateLock:u,wrapperRef:d,templateInsertUpdatesSelection:f,__experimentalCaptureToolbars:m,__experimentalAppenderTagName:h,renderAppender:p,orientation:g,placeholder:b,layout:v,name:k,blockType:y,parentLock:S,defaultLayout:x}=e;jY(t,S,o,r,n,i,s,a,u,m,g,v),GY(t,c,u,f);let C=(0,vm.getBlockSupport)(k,"layout")||(0,vm.getBlockSupport)(k,"__experimentalLayout")||bwe,{allowSizingOnChildren:B=!1}=C,I=v||C,P=(0,pg.useMemo)(()=>({...x,...I,...B&&{allowSizingOnChildren:!0}}),[x,I,B]),E=(0,Yl.jsx)(vwe,{rootClientId:t,renderAppender:p,__experimentalAppenderTagName:h,layout:P,wrapperRef:d,placeholder:b});return!y?.providesContext||Object.keys(y.providesContext).length===0?E:(0,Yl.jsx)(kwe,{clientId:t,children:E})}function ywe(e){return h1(e),(0,Yl.jsx)(tq,{...e})}var YB=(0,pg.forwardRef)((e,t)=>{let o=ym({ref:t},e);return(0,Yl.jsx)("div",{className:"block-editor-inner-blocks",children:(0,Yl.jsx)("div",{...o})})});function ym(e={},t={}){let{__unstableDisableLayoutClassNames:o,__unstableDisableDropZone:r,dropZoneElement:n}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:a=""}=Ie(),c=(0,eq.useSelect)(S=>{let{getBlockName:x,isZoomOut:C,getTemplateLock:B,getBlockRootClientId:I,getBlockEditingMode:P,getBlockSettings:E,getSectionRootClientId:L}=M(S(_));if(!i){let W=L();return{isDropZoneDisabled:C()&&W!==""}}let{hasBlockSupport:T,getBlockType:O}=S(vm.store),D=x(i),U=P(i),G=I(i),[j]=E(i,"layout"),z=U==="disabled";if(C()){let W=L();z=i!==W}return{__experimentalCaptureToolbars:T(D,"__experimentalExposeControlsToChildren",!1),name:D,blockType:O(D),parentLock:B(G),parentClientId:G,isDropZoneDisabled:z,defaultLayout:j}},[i]),{__experimentalCaptureToolbars:u,name:d,blockType:f,parentLock:m,parentClientId:h,isDropZoneDisabled:p,defaultLayout:g}=c,b=QY({dropZoneElement:n,rootClientId:i,parentClientId:h}),v=(0,JY.useMergeRefs)([e.ref,r||p||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:b]),k={__experimentalCaptureToolbars:u,layout:s,name:d,blockType:f,parentLock:m,defaultLayout:g,...t},y=k.value&&k.onChange?ywe:tq;return{...e,ref:v,className:V(e.className,"block-editor-block-list__layout",o?"":a),children:i?(0,Yl.jsx)(y,{...k,clientId:i}):(0,Yl.jsx)(Vy,{...t})}}ym.save=vm.__unstableGetInnerBlocksProps;YB.DefaultBlockAppender=MY;YB.ButtonBlockAppender=LY;YB.Content=()=>ym.save().children;var tS=YB;var oS=l(Z(),1),hg=l(F(),1),rV=l(Fe(),1),Er=l(it(),1);var oq=l(w(),1),Swe=new Set([Er.UP,Er.RIGHT,Er.DOWN,Er.LEFT,Er.ENTER,Er.BACKSPACE]);function _we(e){let{keyCode:t,shiftKey:o}=e;return!o&&Swe.has(t)}function rS(){let e=(0,hg.useSelect)(o=>o(_).isTyping(),[]),{stopTyping:t}=(0,hg.useDispatch)(_);return(0,oS.useRefEffect)(o=>{if(!e)return;let{ownerDocument:r}=o,n,i;function s(a){let{clientX:c,clientY:u}=a;n&&i&&(n!==c||i!==u)&&t(),n=c,i=u}return r.addEventListener("mousemove",s),()=>{r.removeEventListener("mousemove",s)}},[e,t])}function nS(){let{isTyping:e}=(0,hg.useSelect)(i=>{let{isTyping:s}=i(_);return{isTyping:s()}},[]),{startTyping:t,stopTyping:o}=(0,hg.useDispatch)(_),r=rS(),n=(0,oS.useRefEffect)(i=>{let{ownerDocument:s}=i,{defaultView:a}=s,c=a.getSelection();if(e){let h=function(v){let{target:k}=v;b=a.setTimeout(()=>{(0,rV.isTextField)(k)||o()})},p=function(v){let{keyCode:k}=v;(k===Er.ESCAPE||k===Er.TAB)&&o()},g=function(){c.isCollapsed||o()};var u=h,d=p,f=g;let b;return i.addEventListener("focus",h),i.addEventListener("keydown",p),s.addEventListener("selectionchange",g),()=>{a.clearTimeout(b),i.removeEventListener("focus",h),i.removeEventListener("keydown",p),s.removeEventListener("selectionchange",g)}}function m(h){let{type:p,target:g}=h;!(0,rV.isTextField)(g)||!i.contains(g)||p==="keydown"&&!_we(h)||t()}return i.addEventListener("keypress",m),i.addEventListener("keydown",m),()=>{i.removeEventListener("keypress",m),i.removeEventListener("keydown",m)}},[e,t,o]);return(0,oS.useMergeRefs)([r,n])}function xwe({children:e}){return(0,oq.jsx)("div",{ref:nS(),children:e})}var rq=xwe;var iS=l(A(),1),nq=l(Z(),1),iq=l(F(),1),sq=l(R(),1),aq=l(N(),1);var qB=l(w(),1);function nV({clientId:e,rootClientId:t="",position:o="top"}){let[r,n]=(0,sq.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:a,blockInsertionPointVisible:c,blockInsertionPoint:u,blocksBeingDragged:d}=(0,iq.useSelect)(x=>{let{getInsertionPoint:C,getBlockOrder:B,getSectionRootClientId:I,isBlockInsertionPointVisible:P,getBlockInsertionPoint:E,getDraggedBlockClientIds:L}=M(x(_)),T=I(),O=B(T);return{sectionRootClientId:T,sectionClientIds:O,insertionPoint:C(),blockInsertionPoint:E(),blockInsertionPointVisible:P(),blocksBeingDragged:L()}},[]),f=(0,nq.useReducedMotion)();if(!e)return;let m=!1;if(!(t===i&&s&&s.includes(e)))return null;let p=a?.index===0&&e===s[a.index],g=a&&a.hasOwnProperty("index")&&e===s[a.index-1];o==="top"&&(m=p||c&&u.index===0&&e===s[u.index]),o==="bottom"&&(m=g||c&&e===s[u.index-1]);let b=d[0],v=d.includes(e),k=s.indexOf(b),S=(k>0?s[k-1]:null)===e;return(v||S)&&(m=!1),(0,qB.jsx)(iS.__unstableAnimatePresence,{children:m&&(0,qB.jsx)(iS.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:f?0:.2,ease:[.6,0,.4,1]},className:V("block-editor-block-list__zoom-out-separator",{"is-dragged-over":r}),"data-is-insertion-point":"true",onDragOver:()=>n(!0),onDragLeave:()=>n(!1),children:(0,qB.jsx)(iS.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,aq.__)("Drop pattern.")})})})}var Kr=l(w(),1),e1=(0,td.createContext)();e1.displayName="IntersectionObserverContext";var ZB=new WeakMap,wwe={trailing:!0};function Cwe({className:e,...t}){let{isOutlineMode:o,isFocusMode:r,isPreviewMode:n,editedContentOnlySection:i}=(0,Gi.useSelect)(f=>{let{getSettings:m,isTyping:h,hasBlockSpotlight:p,getEditedContentOnlySection:g}=M(f(_)),{outlineMode:b,focusMode:v,isPreviewMode:k}=m();return{isOutlineMode:b&&!h(),isFocusMode:v||p(),isPreviewMode:k,editedContentOnlySection:g()}},[]),s=(0,Gi.useRegistry)(),{setBlockVisibility:a}=(0,Gi.useDispatch)(_),c=(0,XB.useDebounce)((0,td.useCallback)(()=>{let f={};ZB.get(s).forEach(([m,h])=>{f[m]=h}),a(f)},[s]),300,wwe),u=(0,td.useMemo)(()=>{let{IntersectionObserver:f}=window;if(f)return new f(m=>{ZB.get(s)||ZB.set(s,[]);for(let h of m){let p=h.target.getAttribute("data-block");ZB.get(s).push([p,h.isIntersecting])}c()})},[]),d=ym({ref:(0,XB.useMergeRefs)([hm(),IY(),nS()]),className:V("is-root-container",e,{"is-outline-mode":o,"is-focus-mode":r,"is-preview-mode":n})},t);return(0,Kr.jsxs)(e1.Provider,{value:u,children:[(0,Kr.jsx)("div",{...d}),!!i&&(0,Kr.jsx)(Bwe,{clientId:i})]})}function Bwe({clientId:e}){let{stopEditingContentOnlySection:t}=M((0,Gi.useDispatch)(_)),o=(0,Gi.useSelect)(r=>{let{isBlockSelected:n,hasSelectedInnerBlock:i,getBlockSelectionStart:s}=r(_);return!s()||n(e)||i(e,!0)},[e]);return(0,td.useEffect)(()=>{o||t()},[o,t]),null}function Gh(e){return(0,Kr.jsx)(f0,{value:gO,children:(0,Kr.jsx)(Cwe,{...e})})}var Ewe=[],Twe=new Set;function Iwe({placeholder:e,rootClientId:t,renderAppender:o,__experimentalAppenderTagName:r,layout:n=wM}){let i=o!==!1,s=!!o,{order:a,isZoomOut:c,selectedBlocks:u,visibleBlocks:d,shouldRenderAppender:f}=(0,Gi.useSelect)(m=>{let{getSettings:h,getBlockOrder:p,getSelectedBlockClientIds:g,__unstableGetVisibleBlocks:b,getTemplateLock:v,getBlockEditingMode:k,isSectionBlock:y,isContainerInsertableToInContentOnlyMode:S,getBlockName:x,isZoomOut:C,canInsertBlockType:B}=M(m(_)),I=p(t);if(h().isPreviewMode)return{order:I,selectedBlocks:Ewe,visibleBlocks:Twe};let P=g(),E=P[0],L=!t&&!E&&(!I.length||!B((0,lq.getDefaultBlockName)(),t)),T=!!(t&&E&&t===E),O=v(t);return{order:I,selectedBlocks:P,visibleBlocks:b(),isZoomOut:C(),shouldRenderAppender:(!y(t)||S(x(E),t))&&k(t)!=="disabled"&&(!O||O==="contentOnly")&&i&&!C()&&(s||T||L)}},[t,i,s]);return(0,Kr.jsxs)(mH,{value:n,children:[a.map(m=>(0,Kr.jsxs)(Gi.AsyncModeProvider,{value:!d.has(m)&&!u.includes(m),children:[c&&(0,Kr.jsx)(nV,{clientId:m,rootClientId:t,position:"top"}),(0,Kr.jsx)(g9,{rootClientId:t,clientId:m}),c&&(0,Kr.jsx)(nV,{clientId:m,rootClientId:t,position:"bottom"})]},m)),a.length<1&&e,f&&(0,Kr.jsx)(dY,{tagName:r,rootClientId:t,CustomAppender:o})]})}function Vy(e){return(0,Kr.jsx)(Gi.AsyncModeProvider,{value:!1,children:(0,Kr.jsx)(Iwe,{...e})})}var Ug=l(F(),1),JV=l(Fe(),1),e3=l(A(),1),YQ=l(Is(),1),ST=l(R(),1),Hg=l($(),1),t3=l(Xo(),1),Gg=l(N(),1);var Mq=l(Z(),1),Dq=l(F(),1),Vq=l(Fe(),1),Ea=l(R(),1);var Xn=l(N(),1),_m=l($(),1),sE=l(A(),1),Pq=l(Z(),1),Rq=l(F(),1),aE=l(R(),1);var aS=l(A(),1),mq=l(Qv(),1),pq=l(Re(),1),oE=l(R(),1);var Tr=l(A(),1),cq=(0,Tr.createSlotFill)("InspectorControls"),Pwe=(0,Tr.createSlotFill)("InspectorAdvancedControls"),Rwe=(0,Tr.createSlotFill)("InspectorControlsBindings"),Owe=(0,Tr.createSlotFill)("InspectorControlsBackground"),Awe=(0,Tr.createSlotFill)("InspectorControlsBorder"),Lwe=(0,Tr.createSlotFill)("InspectorControlsColor"),Nwe=(0,Tr.createSlotFill)("InspectorControlsFilter"),Mwe=(0,Tr.createSlotFill)("InspectorControlsDimensions"),Dwe=(0,Tr.createSlotFill)("InspectorControlsPosition"),Vwe=(0,Tr.createSlotFill)("InspectorControlsTypography"),Fwe=(0,Tr.createSlotFill)("InspectorControlsListView"),zwe=(0,Tr.createSlotFill)("InspectorControlsStyles"),jwe=(0,Tr.createSlotFill)("InspectorControlsEffects"),Uwe=(0,Tr.createSlotFill)("InspectorControlsContent"),Hwe={default:cq,advanced:Pwe,background:Owe,bindings:Rwe,border:Awe,color:Lwe,content:Uwe,dimensions:Mwe,effects:jwe,filter:Nwe,list:Fwe,position:Dwe,settings:cq,styles:zwe,typography:Vwe},Wi=Hwe,sS=(0,Tr.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));var gg=l(A(),1),JB=l(R(),1),uq=l(Z(),1),eE=l(F(),1);var QB=l(w(),1),dq=Symbol("ListViewContentPopover"),{Fill:fq,Slot:Gwe}=(0,gg.createSlotFill)(dq);function Wwe(){return(0,uq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:35,resize:!1}}}function tE({listViewRef:e}){let{popoverProps:t}=Wwe(),o=(0,gg.__experimentalUseSlotFills)(dq),r=!!(o&&o.length),{selectedClientId:n,isOpen:i}=(0,eE.useSelect)(u=>{let{getSelectedBlockClientId:d}=u(_),f=M(u(_));return{selectedClientId:d(),isOpen:f.isListViewContentPanelOpen()}},[]),[s,a]=(0,JB.useState)(null);(0,JB.useLayoutEffect)(()=>{if(!n||!e?.current){a(null);return}let u=e.current.querySelector(`[data-block="${n}"]`);a(u)},[n,e]);let{closeListViewContentPanel:c}=M((0,eE.useDispatch)(_));return!i||!r||!s?null:(0,QB.jsx)(gg.Popover,{...t??{},className:"block-editor-inspector-list-view-content-popover",anchor:s,onClose:c,children:(0,QB.jsx)("div",{style:{width:"280px"},children:(0,QB.jsx)(Gwe,{})})})}var od=l(w(),1),$we=["content","list"],Kwe=["default","settings","advanced"];function Sm({children:e,group:t="default",__experimentalGroup:o,resetAllFilter:r}){o&&((0,pq.default)("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=o);let n=Ie(),i=Wi[t]?.Fill;if(!i)return(0,mq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(n[$c]){let s=n.name==="core/template-part",a=Kwe.includes(t),c=$we.includes(t);if(!(s&&a||c))return null}return!n[$c]&&!n[bs]?null:t==="content"&&n[Hk]&&n[$c]?n[bs]?(0,od.jsx)(aS.__experimentalStyleProvider,{document,children:(0,od.jsx)(fq,{children:e})}):null:(0,od.jsx)(aS.__experimentalStyleProvider,{document,children:(0,od.jsx)(i,{children:s=>(0,od.jsx)(qwe,{fillProps:s,children:e,resetAllFilter:r})})})}function Ywe({resetAllFilter:e,children:t}){let{registerResetAllFilter:o,deregisterResetAllFilter:r}=(0,oE.useContext)(aS.__experimentalToolsPanelContext);return(0,oE.useEffect)(()=>{if(e&&o&&r)return o(e),()=>{r(e)}},[e,o,r]),t}function qwe({children:e,resetAllFilter:t,fillProps:o}){let{forwardedContext:r=[]}=o,n=(0,od.jsx)(Ywe,{resetAllFilter:t,children:e});return r.reduce((i,[s,a])=>(0,od.jsx)(s,{...a,children:i}),n)}var _q=l(A(),1),xq=l(R(),1),wq=l(Qv(),1),Cq=l(Re(),1);var gq=l(A(),1),rE=l(F(),1),bq=l(R(),1);var hq=l(Z(),1);function Ro(){return(0,hq.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function bg(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 kq=l(w(),1);function vq({children:e,group:t,label:o}){let{updateBlockAttributes:r}=(0,rE.useDispatch)(_),{getBlockAttributes:n,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:a}=(0,rE.useSelect)(_),c=Ro(),u=s(),d=(0,bq.useCallback)((f=[])=>{let m={},h=a()?i():[u];h.forEach(p=>{let{style:g}=n(p),b={style:g};f.forEach(v=>{b={...b,...v(b)}}),b={...b,style:Me(b.style)},m[p]=b}),r(h,m,!0)},[n,i,a,u,r]);return(0,kq.jsx)(gq.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:o,resetAll:d,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:c,children:e},u)}var iV=l(A(),1),nE=l(R(),1),yq=l(w(),1);function Sq({Slot:e,fillProps:t,...o}){let r=(0,nE.useContext)(iV.__experimentalToolsPanelContext),n=(0,nE.useMemo)(()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[iV.__experimentalToolsPanelContext.Provider,{value:r}]]}),[r,t]);return(0,yq.jsx)(e,{...o,fillProps:n,bubblesVirtually:!0})}var iE=l(w(),1);function Zwe({__experimentalGroup:e,group:t="default",label:o,fillProps:r,...n},i){e&&((0,Cq.default)("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);let s=Wi[t],a=(0,_q.__experimentalUseSlotFills)(s?.name);if(!s)return(0,wq.default)(`Unknown InspectorControls group "${t}" provided.`),null;if(!a?.length)return null;let{Slot:c}=s;return o?(0,iE.jsx)(vq,{group:t,label:o,children:(0,iE.jsx)(Sq,{...n,fillProps:r,Slot:c})}):(0,iE.jsx)(c,{...n,ref:i,fillProps:r,bubblesVirtually:!0})}var sV=(0,xq.forwardRef)(Zwe);var aV=l(w(),1),Bq=Sm;Bq.Slot=sV;var rd=e=>(0,aV.jsx)(Sm,{...e,group:"advanced"});rd.Slot=function(t){return(0,aV.jsx)(sV,{...t,group:"advanced"})};rd.slotName="InspectorAdvancedControls";var fe=Bq;var Tq=l(F(),1),nd=l($(),1),lS=l(N(),1);function Eq(e){let t=e?.style?.position?.type;return t==="sticky"?(0,lS.__)("Sticky"):t==="fixed"?(0,lS.__)("Fixed"):null}function Tt(e){return(0,Tq.useSelect)(t=>{if(!e)return null;let{getBlockName:o,getBlockAttributes:r,__experimentalGetParsedPattern:n}=t(_),{getBlockType:i,getActiveBlockVariation:s}=t(nd.store),a=o(e),c=i(a);if(!c)return null;let u=r(e),d=u?.metadata?.patternName;if(d){let v=n(d),k=Eq(u);return{isSynced:!1,title:(0,lS.__)("Pattern"),icon:Ei,description:v?.description||(0,lS.__)("A block pattern."),anchor:u?.anchor,positionLabel:k,positionType:u?.style?.position?.type,name:v?.title||u?.metadata?.name}}let f=s(a,u),m=(0,nd.isReusableBlock)(c)||(0,nd.isTemplatePart)(c),p=(m?(0,nd.__experimentalGetBlockLabel)(c,u):void 0)||c.title,g=Eq(u),b={isSynced:m,title:p,icon:c.icon,description:c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name};return f?{isSynced:m,title:f.title||c.title,icon:f.icon||c.icon,description:f.description||c.description,anchor:u?.anchor,positionLabel:g,positionType:u?.style?.position?.type,name:u?.metadata?.name}:b},[e])}var cS=l(w(),1),uS="position",lV={key:"default",value:"",name:(0,Xn.__)("Default")},cV={key:"sticky",value:"sticky",name:(0,Xn._x)("Sticky","Name for the value of the CSS position property"),hint:(0,Xn.__)("The block will stick to the top of the window instead of scrolling.")},Iq={key:"fixed",value:"fixed",name:(0,Xn._x)("Fixed","Name for the value of the CSS position property"),hint:(0,Xn.__)("The block will not move when the page is scrolled.")},Xwe=["top","right","bottom","left"],Qwe=["sticky","fixed"];function Jwe({selector:e,style:t}){let o="",{type:r}=t?.position||{};return Qwe.includes(r)&&(o+=`${e} {`,o+=`position: ${r};`,Xwe.forEach(n=>{t?.position?.[n]!==void 0&&(o+=`${n}: ${t.position[n]};`)}),(r==="sticky"||r==="fixed")&&(o+="z-index: 10"),o+="}"),o}function eCe(e){let t=(0,_m.getBlockSupport)(e,uS);return!!(t===!0||t?.sticky)}function tCe(e){let t=(0,_m.getBlockSupport)(e,uS);return!!(t===!0||t?.fixed)}function oCe(e){return!!(0,_m.getBlockSupport)(e,uS)}function Oq(e){let t=e?.style?.position?.type;return t==="sticky"||t==="fixed"}function Aq({name:e}={}){let[t,o]=me("position.fixed","position.sticky"),r=!t&&!o;return!oCe(e)||r}function rCe({style:e={},clientId:t,name:o,setAttributes:r}){let n=tCe(o),i=eCe(o),s=e?.position?.type,{firstParentClientId:a}=(0,Rq.useSelect)(h=>{let{getBlockParents:p}=h(_),g=p(t);return{firstParentClientId:g[g.length-1]}},[t]),c=Tt(a),u=i&&s===cV.value&&c?(0,Xn.sprintf)((0,Xn.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,d=(0,aE.useMemo)(()=>{let h=[lV];return(i||s===cV.value)&&h.push(cV),(n||s===Iq.value)&&h.push(Iq),h},[n,i,s]),f=h=>{let g={...e,position:{...e?.position,type:h,top:h==="sticky"||h==="fixed"?"0px":void 0}};r({style:Me(g)})},m=s&&d.find(h=>h.value===s)||lV;return aE.Platform.select({web:d.length>1?(0,cS.jsx)(fe,{group:"position",children:(0,cS.jsx)(sE.BaseControl,{help:u,children:(0,cS.jsx)(sE.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,Xn.__)("Position"),hideLabelFromVision:!0,describedBy:(0,Xn.sprintf)((0,Xn.__)("Currently selected position: %s"),m.name),options:d,value:m,onChange:({selectedItem:h})=>{f(h.value)},size:"__unstable-large"})})}):null,native:null})}var uV={edit:function(t){return Aq(t)?null:(0,cS.jsx)(rCe,{...t})},useBlockProps:iCe,attributeKeys:["style"],hasSupport(e){return(0,_m.hasBlockSupport)(e,uS)}},nCe={};function iCe({name:e,style:t}){let o=(0,_m.hasBlockSupport)(e,uS),r=Aq({name:e}),n=o&&!r,i=(0,Pq.useInstanceId)(nCe),s=`.wp-container-${i}.wp-container-${i}`,a;n&&(a=Jwe({selector:s,style:t})||"");let c=V({[`wp-container-${i}`]:n&&!!a,[`is-position-${t?.position?.type}`]:n&&!!a&&!!t?.position?.type});return Qn({css:a}),{className:c}}var Fq={placement:"top-start"},Lq={...Fq,flip:!1,shift:!0},sCe={...Fq,flip:!0,shift:!1};function Nq(e,t,o,r,n){if(!e||!t)return Lq;let i=o?.scrollTop||0,s=Sh(t),a=e.getBoundingClientRect(),c=i+a.top,u=e.ownerDocument.documentElement.clientHeight,d=c+r,f=s.top>d,m=s.height>u-r;return!n&&(f||m)?Lq:sCe}function lE({contentElement:e,clientId:t}){let o=Xe(t),[r,n]=(0,Ea.useState)(0),{blockIndex:i,isSticky:s}=(0,Dq.useSelect)(m=>{let{getBlockIndex:h,getBlockAttributes:p}=m(_);return{blockIndex:h(t),isSticky:Oq(p(t))}},[t]),a=(0,Ea.useMemo)(()=>{if(e)return(0,Vq.getScrollContainer)(e)},[e]),[c,u]=(0,Ea.useState)(()=>Nq(e,o,a,r,s)),d=(0,Mq.useRefEffect)(m=>{n(m.offsetHeight)},[]),f=(0,Ea.useCallback)(()=>u(Nq(e,o,a,r,s)),[e,o,a,r]);return(0,Ea.useLayoutEffect)(f,[i,f]),(0,Ea.useLayoutEffect)(()=>{if(!e||!o)return;let m=e?.ownerDocument?.defaultView;m?.addEventHandler?.("resize",f);let h,p=o?.ownerDocument?.defaultView;return p.ResizeObserver&&(h=new p.ResizeObserver(f),h.observe(o)),()=>{m?.removeEventHandler?.("resize",f),h&&h.disconnect()}},[f,e,o]),{...c,ref:d}}var zq=l(F(),1);function cE(e){return(0,zq.useSelect)(o=>{let{getBlockRootClientId:r,getBlockParents:n,__experimentalGetBlockListSettingsForBlocks:i,isBlockInsertionPointVisible:s,getBlockInsertionPoint:a,getBlockOrder:c,hasMultiSelection:u,getLastMultiSelectedBlockClientId:d}=o(_),f=n(e),m=i(f),h=f.find(g=>m[g]?.__experimentalCaptureToolbars),p=!1;if(s()){let g=a();p=c(g.rootClientId)[g.index]===e}return{capturingClientId:h,isInsertionPointVisible:p,lastClientId:u()?d():null,rootClientId:r(e)}},[e])}var uE=l(w(),1);function jq({clientId:e,__unstableContentRef:t}){let{capturingClientId:o,isInsertionPointVisible:r,lastClientId:n,rootClientId:i}=cE(e),s=lE({contentElement:t?.current,clientId:e});return(0,uE.jsx)(Hi,{clientId:o||e,bottomClientId:n,className:V("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":r}),__unstableContentRef:t,...s,children:(0,uE.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,uE.jsx)(Ui,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var DQ=l(F(),1),jg=l(R(),1),VQ=l(Is(),1);var OQ=l(N(),1),AQ=l(F(),1),qV=l(R(),1),LQ=l(Z(),1),nc=l($(),1),NQ=l(A(),1);var xm=l(A(),1),Qq=l(F(),1),Jq=l(N(),1);var $q=l($(),1),Kq=l(A(),1),dS=l(F(),1),fS=l(R(),1),Yq=l(Z(),1);var Hq=l(Fe(),1),Ta=l(R(),1),dE=50,Gq=25,aCe=1e3,Uq=aCe*(Gq/1e3);function Wq(){let e=(0,Ta.useRef)(null),t=(0,Ta.useRef)(null),o=(0,Ta.useRef)(null),r=(0,Ta.useRef)(null);(0,Ta.useEffect)(()=>()=>{r.current&&(clearInterval(r.current),r.current=null)},[]);let n=(0,Ta.useCallback)(a=>{e.current=a.clientY,o.current=(0,Hq.getScrollContainer)(a.target),r.current=setInterval(()=>{if(o.current&&t.current){let c=o.current.scrollTop+t.current;o.current.scroll({top:c})}},Gq)},[]),i=(0,Ta.useCallback)(a=>{if(!o.current)return;let c=o.current.offsetHeight,u=e.current-o.current.offsetTop,d=a.clientY-o.current.offsetTop;if(a.clientY>u){let f=Math.max(c-u-dE,0),m=Math.max(d-u-dE,0),h=f===0||m===0?0:m/f;t.current=Uq*h}else if(a.clientY<u){let f=Math.max(u-dE,0),m=Math.max(u-d-dE,0),h=f===0||m===0?0:m/f;t.current=-Uq*h}else t.current=0},[]);return[n,i,()=>{e.current=null,o.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}var dV=l(w(),1),lCe=({appendToOwnerDocument:e,children:t,clientIds:o,cloneClassname:r,elementId:n,onDragStart:i,onDragEnd:s,fadeWhenDisabled:a=!1,dragComponent:c})=>{let{srcRootClientId:u,isDraggable:d,icon:f,visibleInserter:m,getBlockType:h}=(0,dS.useSelect)(E=>{let{canMoveBlocks:L,getBlockRootClientId:T,getBlockName:O,getBlockAttributes:D,isBlockInsertionPointVisible:U}=E(_),{getBlockType:G,getActiveBlockVariation:j}=E($q.store),z=T(o[0]),W=O(o[0]),ee=j(W,D(o[0]));return{srcRootClientId:z,isDraggable:L(o),icon:ee?.icon||G(W)?.icon,visibleInserter:U(),getBlockType:G}},[o]),p=(0,fS.useRef)(!1),[g,b,v]=Wq(),{getAllowedBlocks:k,getBlockNamesByClientId:y,getBlockRootClientId:S}=(0,dS.useSelect)(_),{startDraggingBlocks:x,stopDraggingBlocks:C}=(0,dS.useDispatch)(_);(0,fS.useEffect)(()=>()=>{p.current&&C()},[]);let I=Xe(o[0])?.closest("body");return(0,fS.useEffect)(()=>{if(!I||!a)return;let L=(0,Yq.throttle)(T=>{if(!T.target.closest("[data-block]"))return;let O=y(o),D=T.target.closest("[data-block]").getAttribute("data-block"),U=k(D),G=y([D])[0],j;if(U?.length===0){let z=S(D),W=y([z])[0],ee=k(z);j=KB(h,ee,O,W)}else j=KB(h,U,O,G);!j&&!m?window?.document?.body?.classList?.add("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token")},200);return I.addEventListener("dragover",L),()=>{I.removeEventListener("dragover",L)}},[o,I,a,k,y,S,h,m]),d?(0,dV.jsx)(Kq.Draggable,{appendToOwnerDocument:e,cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:{type:"block",srcClientIds:o,srcRootClientId:u},onDragStart:E=>{window.requestAnimationFrame(()=>{x(o),p.current=!0,g(E),i&&i()})},onDragOver:b,onDragEnd:()=>{C(),p.current=!1,v(),s&&s()},__experimentalDragComponent:c!==void 0?c:(0,dV.jsx)(eB,{count:o.length,icon:f,fadeWhenDisabled:!0}),elementId:n,children:({onDraggableStart:E,onDraggableEnd:L})=>t({draggable:!0,onDragStart:E,onDragEnd:L})}):t({draggable:!1})},fE=lCe;var Zq=l($(),1),mE=l(A(),1),Xq=l(Z(),1),pE=l(F(),1),hE=l(R(),1),$i=l(N(),1);var ke=l(N(),1),id=(e,t)=>e==="up"?t==="horizontal"?(0,ke.isRTL)()?"right":"left":"up":e==="down"?t==="horizontal"?(0,ke.isRTL)()?"left":"right":"down":null;function qq(e,t,o,r,n,i,s){let a=o+1;if(e>1)return cCe(e,o,r,n,i,s);if(r&&n)return(0,ke.sprintf)((0,ke.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!n){let c=id("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&n){let c=id("down",s);if(c==="down")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved down"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the end of the content and can\u2019t be moved right"),t)}if(i<0&&!r){let c=id("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){let c=id("up",s);if(c==="up")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved up"),t);if(c==="left")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved left"),t);if(c==="right")return(0,ke.sprintf)((0,ke.__)("Block %1$s is at the beginning of the content and can\u2019t be moved right"),t)}}function cCe(e,t,o,r,n,i){let s=t+1;if(o&&r)return(0,ke.__)("All blocks are selected, and cannot be moved");if(n>0&&!r){let a=id("down",i);if(a==="down")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n>0&&r){let a=id("down",i);if(a==="down")return(0,ke.__)("Blocks cannot be moved down as they are already at the bottom");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(n<0&&!o){let a=id("up",i);if(a==="up")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if(a==="left")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if(a==="right")return(0,ke.sprintf)((0,ke.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(n<0&&o){let a=id("up",i);if(a==="up")return(0,ke.__)("Blocks cannot be moved up as they are already at the top");if(a==="left")return(0,ke.__)("Blocks cannot be moved left as they are already are at the leftmost position");if(a==="right")return(0,ke.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}var ql=l(w(),1),uCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?Vo:Mr:xf:e==="down"?t==="horizontal"?(0,$i.isRTL)()?Mr:Vo:zn:null,dCe=(e,t)=>e==="up"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move right"):(0,$i.__)("Move left"):(0,$i.__)("Move up"):e==="down"?t==="horizontal"?(0,$i.isRTL)()?(0,$i.__)("Move left"):(0,$i.__)("Move right"):(0,$i.__)("Move down"):null,fV=(0,hE.forwardRef)(({clientIds:e,direction:t,orientation:o,...r},n)=>{let i=(0,Xq.useInstanceId)(fV),s=Array.isArray(e)?e:[e],a=s.length,{disabled:c}=r,{blockType:u,isDisabled:d,rootClientId:f,isFirst:m,isLast:h,firstIndex:p,orientation:g="vertical"}=(0,pE.useSelect)(x=>{let{getBlockIndex:C,getBlockRootClientId:B,getBlockOrder:I,getBlock:P,getBlockListSettings:E}=x(_),L=s[0],T=B(L),O=C(L),D=C(s[s.length-1]),U=I(T),G=P(L),j=O===0,z=D===U.length-1,{orientation:W}=E(T)||{};return{blockType:G?(0,Zq.getBlockType)(G.name):null,isDisabled:c||(t==="up"?j:z),rootClientId:T,firstIndex:O,isFirst:j,isLast:z,orientation:o||W}},[e,t]),{moveBlocksDown:b,moveBlocksUp:v}=(0,pE.useDispatch)(_),k=t==="up"?v:b,y=x=>{k(e,f),r.onClick&&r.onClick(x)},S=`block-editor-block-mover-button__description-${i}`;return(0,ql.jsxs)(ql.Fragment,{children:[(0,ql.jsx)(mE.Button,{__next40pxDefaultSize:!0,ref:n,className:V("block-editor-block-mover-button",`is-${t}-button`),icon:uCe(t,g),label:dCe(t,g),"aria-describedby":S,...r,onClick:d?null:y,disabled:d,accessibleWhenDisabled:!0}),(0,ql.jsx)(mE.VisuallyHidden,{id:S,children:qq(a,u&&u.title,p,m,h,t==="up"?-1:1,g)})]})}),gE=(0,hE.forwardRef)((e,t)=>(0,ql.jsx)(fV,{direction:"up",ref:t,...e})),bE=(0,hE.forwardRef)((e,t)=>(0,ql.jsx)(fV,{direction:"down",ref:t,...e}));var Ia=l(w(),1);function fCe({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:o,isBlockMoverDownButtonDisabled:r}){let{canMove:n,rootClientId:i,isFirst:s,isLast:a,orientation:c,isManualGrid:u}=(0,Qq.useSelect)(d=>{let{getBlockIndex:f,getBlockListSettings:m,canMoveBlocks:h,getBlockOrder:p,getBlockRootClientId:g,getBlockAttributes:b}=d(_),v=Array.isArray(e)?e:[e],k=v[0],y=g(k),S=f(k),x=f(v[v.length-1]),C=p(y),{layout:B={}}=b(y)??{};return{canMove:h(e),rootClientId:y,isFirst:S===0,isLast:x===C.length-1,orientation:m(y)?.orientation,isManualGrid:B.type==="grid"&&B.isManualPlacement&&window.__experimentalEnableGridInteractivity}},[e]);return!n||s&&a&&!i||t&&u?null:(0,Ia.jsxs)(xm.ToolbarGroup,{className:V("block-editor-block-mover",{"is-horizontal":c==="horizontal"}),children:[!t&&(0,Ia.jsx)(fE,{clientIds:e,fadeWhenDisabled:!0,children:d=>(0,Ia.jsx)(xm.Button,{__next40pxDefaultSize:!0,icon:tv,className:"block-editor-block-mover__drag-handle",label:(0,Jq.__)("Drag"),tabIndex:"-1",...d})}),!u&&(0,Ia.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,Ia.jsx)(xm.ToolbarItem,{children:d=>(0,Ia.jsx)(gE,{disabled:o,clientIds:e,...d})}),(0,Ia.jsx)(xm.ToolbarItem,{children:d=>(0,Ia.jsx)(bE,{disabled:r,clientIds:e,...d})})]})]})}var kE=fCe;var oZ=l(A(),1),yE=l(F(),1),SE=l(N(),1),rZ=l(R(),1);var mS=l(F(),1),sd=l(R(),1);var{clearTimeout:eZ,setTimeout:mCe}=window,tZ=200;function pCe({ref:e,isFocused:t,highlightParent:o,debounceTimeout:r=tZ}){let{getSelectedBlockClientId:n,getBlockRootClientId:i}=(0,mS.useSelect)(_),{toggleBlockHighlight:s}=(0,mS.useDispatch)(_),a=(0,sd.useRef)(),c=(0,mS.useSelect)(g=>g(_).getSettings().isDistractionFree,[]),u=g=>{if(g&&c)return;let b=n(),v=o?i(b):b;s(v,g)},d=()=>e?.current&&e.current.matches(":hover"),f=()=>{let g=d();return!t&&!g},m=()=>{let g=a.current;g&&eZ&&eZ(g)},h=g=>{g&&g.stopPropagation(),m(),u(!0)},p=g=>{g&&g.stopPropagation(),m(),a.current=mCe(()=>{f()&&u(!1)},r)};return(0,sd.useEffect)(()=>()=>{u(!1),m()},[]),{debouncedShowGestures:h,debouncedHideGestures:p}}function kg({ref:e,highlightParent:t=!1,debounceTimeout:o=tZ}){let[r,n]=(0,sd.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=pCe({ref:e,debounceTimeout:o,isFocused:r,highlightParent:t}),a=(0,sd.useRef)(!1),c=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,sd.useEffect)(()=>{let u=e.current,d=()=>{c()&&(n(!0),i())},f=()=>{c()||(n(!1),s())};return u&&!a.current&&(u.addEventListener("focus",d,!0),u.addEventListener("blur",f,!0),a.current=!0),()=>{u&&(u.removeEventListener("focus",d),u.removeEventListener("blur",f))}},[e,a,n,i,s]),{onMouseMove:i,onMouseLeave:s}}var vE=l(w(),1);function nZ(){let{selectBlock:e}=(0,yE.useDispatch)(_),{parentClientId:t}=(0,yE.useSelect)(i=>{let{getBlockParents:s,getSelectedBlockClientId:a,getParentSectionBlock:c}=M(i(_)),u=a(),d=c(u),f=s(u);return{parentClientId:d??f[f.length-1]}},[]),o=Tt(t),r=(0,rZ.useRef)(),n=kg({ref:r,highlightParent:!0});return(0,vE.jsx)("div",{className:"block-editor-block-parent-selector",ref:r,...n,children:(0,vE.jsx)(oZ.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,SE.sprintf)((0,SE.__)("Select parent block: %s"),o?.title),showTooltip:!0,icon:(0,vE.jsx)(Ae,{icon:o?.icon})})},t)}var _E=l(A(),1);var vg=l(A(),1),hCe=(0,vg.createSlotFill)("BlockControls"),gCe=(0,vg.createSlotFill)("BlockControlsBlock"),bCe=(0,vg.createSlotFill)("BlockFormatControls"),kCe=(0,vg.createSlotFill)("BlockControlsOther"),vCe=(0,vg.createSlotFill)("BlockControlsParent"),yCe={default:hCe,block:gCe,inline:bCe,other:kCe,parent:vCe},pS=yCe;function iZ(e,t){let o=Ie();return o[bs]?pS[e]?.Fill:o[Pp]&&t?pS.parent.Fill:null}var Zl=l(w(),1);function mV({group:e="default",controls:t,children:o,__experimentalShareWithChildBlocks:r=!1}){let n=iZ(e,r);if(!n)return null;let i=(0,Zl.jsxs)(Zl.Fragment,{children:[e==="default"&&(0,Zl.jsx)(_E.ToolbarGroup,{controls:t}),o]});return(0,Zl.jsx)(_E.__experimentalStyleProvider,{document,children:(0,Zl.jsx)(n,{children:s=>{let{forwardedContext:a=[]}=s;return a.reduce((c,[u,d])=>(0,Zl.jsx)(u,{...d,children:c}),i)}})})}var hS=l(R(),1),Xl=l(A(),1),aZ=l(Qv(),1);var pV=l(w(),1),{ComponentsContext:sZ}=M(Xl.privateApis);function hV({group:e="default",...t}){let o=(0,hS.useContext)(Xl.__experimentalToolbarContext),r=(0,hS.useContext)(sZ),n=(0,hS.useMemo)(()=>({forwardedContext:[[Xl.__experimentalToolbarContext.Provider,{value:o}],[sZ.Provider,{value:r}]]}),[o,r]),i=pS[e],s=(0,Xl.__experimentalUseSlotFills)(i.name);if(!i)return(0,aZ.default)(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;let{Slot:a}=i,c=(0,pV.jsx)(a,{...t,bubblesVirtually:!0,fillProps:n});return e==="default"?c:(0,pV.jsx)(Xl.ToolbarGroup,{children:c})}var gV=l(w(),1),lZ=mV;lZ.Slot=hV;var bV=e=>(0,gV.jsx)(mV,{group:"inline",...e});bV.Slot=function(t){return(0,gV.jsx)(hV,{group:"inline",...t})};var Mt=lZ;var cZ=l(A(),1),{Fill:uZ,Slot:SCe}=(0,cZ.createSlotFill)("__unstableBlockToolbarLastItem");uZ.Slot=SCe;var xE=uZ;var HE=l(A(),1);var wg=l($(),1),ti=l(A(),1),Om=l(F(),1);var jE=l(R(),1),Pa=l(N(),1),fX=l(Is(),1),Rm=l(Z(),1);var Sg=l(F(),1),ad=l($(),1);var EZ=l(R(),1),bS=l($(),1),gS=l(F(),1),TZ=l(Un(),1),Ql=l(N(),1);var Jn=l($(),1),dZ=l(R(),1),_Ce="align";var fZ="__experimentalBorder",wE="color",xCe="customClassName",mZ="typography.__experimentalFontFamily",pZ="typography.fontSize",wCe="typography.lineHeight",CCe="typography.__experimentalFontStyle",BCe="typography.__experimentalFontWeight",hZ="typography.textAlign",ECe="typography.textColumns",TCe="typography.__experimentalTextDecoration",ICe="typography.__experimentalWritingMode",PCe="typography.__experimentalTextTransform",RCe="typography.__experimentalLetterSpacing",OCe="layout",ACe=[wCe,pZ,CCe,BCe,mZ,hZ,ECe,TCe,PCe,ICe,RCe],LCe=["shadow"],NCe="spacing",MCe=[...LCe,...ACe,fZ,wE,NCe],gZ=e=>(0,Jn.hasBlockSupport)(e,_Ce);function bZ(e,t="any"){if(dZ.Platform.OS!=="web")return!1;let o=(0,Jn.getBlockSupport)(e,fZ);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}var kZ=e=>{let t=(0,Jn.getBlockSupport)(e,wE);return t!==null&&typeof t=="object"&&!!t.gradients},vZ=e=>{let t=(0,Jn.getBlockSupport)(e,wE);return t&&t.background!==!1},yZ=e=>(0,Jn.hasBlockSupport)(e,hZ);var SZ=e=>{let t=(0,Jn.getBlockSupport)(e,wE);return t&&t.text!==!1};var _Z=e=>(0,Jn.hasBlockSupport)(e,xCe,!0);var xZ=e=>(0,Jn.hasBlockSupport)(e,mZ);var wZ=e=>(0,Jn.hasBlockSupport)(e,pZ);var CZ=e=>(0,Jn.hasBlockSupport)(e,OCe);var BZ=e=>MCe.some(t=>(0,Jn.hasBlockSupport)(e,t));function DCe(e){try{let t=(0,bS.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return!(t.length===1&&t[0].name==="core/freeform")}catch{return!1}}var VCe={align:gZ,borderColor:e=>bZ(e,"color"),backgroundColor:vZ,textAlign:yZ,textColor:SZ,gradient:kZ,className:_Z,fontFamily:xZ,fontSize:wZ,layout:CZ,style:BZ};function FCe(e,t){return Object.entries(VCe).reduce((o,[r,n])=>(n(e.name)&&n(t.name)&&(o[r]=e.attributes[r]),o),{})}function kV(e,t,o){for(let r=0;r<Math.min(t.length,e.length);r+=1)o(e[r].clientId,FCe(t[r],e[r])),kV(e[r].innerBlocks,t[r].innerBlocks,o)}function yg(){let e=(0,gS.useRegistry)(),{updateBlockAttributes:t}=(0,gS.useDispatch)(_),{createSuccessNotice:o,createWarningNotice:r,createErrorNotice:n}=(0,gS.useDispatch)(TZ.store);return(0,EZ.useCallback)(async i=>{let s="";try{if(!window.navigator.clipboard){n((0,Ql.__)("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,Ql.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"});return}if(!s||!DCe(s)){r((0,Ql.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});return}let a=(0,bS.parse)(s);if(a.length===1?e.batch(()=>{kV(i,i.map(()=>a[0]),t)}):e.batch(()=>{kV(i,a,t)}),i.length===1){let c=(0,bS.getBlockType)(i[0].name)?.title;o((0,Ql.sprintf)((0,Ql.__)("Pasted styles to %s."),c),{type:"snackbar"})}else o((0,Ql.sprintf)((0,Ql.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})},[e.batch,t,o,r,n])}function IZ({clientIds:e,children:t,__experimentalUpdateSelection:o}){let{getDefaultBlockName:r,getGroupingBlockName:n}=(0,Sg.useSelect)(ad.store),i=(0,Sg.useSelect)(y=>{let{canInsertBlockType:S,getBlockRootClientId:x,getBlocksByClientId:C,getDirectInsertBlock:B,canRemoveBlocks:I}=y(_),P=C(e),E=x(e[0]),L=S(r(),E),T=E?B(E):null;return{canRemove:I(e),canInsertBlock:P.every(O=>(L||!!T)&&S(O.name,E)),canCopyStyles:P.every(O=>!!O&&((0,ad.hasBlockSupport)(O.name,"color")||(0,ad.hasBlockSupport)(O.name,"typography"))),canDuplicate:P.every(O=>!!O&&(0,ad.hasBlockSupport)(O.name,"multiple",!0)&&S(O.name,E))}},[e,r]),{getBlocksByClientId:s,getBlocks:a}=(0,Sg.useSelect)(_),{canRemove:c,canInsertBlock:u,canCopyStyles:d,canDuplicate:f}=i,{removeBlocks:m,replaceBlocks:h,duplicateBlocks:p,insertAfterBlock:g,insertBeforeBlock:b,flashBlock:v}=(0,Sg.useDispatch)(_),k=yg();return t({canCopyStyles:d,canDuplicate:f,canInsertBlock:u,canRemove:c,onDuplicate(){return p(e,o)},onRemove(){return m(e,o)},onInsertBefore(){b(e[0])},onInsertAfter(){g(e[e.length-1])},onGroup(){if(!e.length)return;let y=n(),S=(0,ad.switchToBlockType)(s(e),y);S&&h(e,S)},onUngroup(){if(!e.length)return;let y=a(e[0]);y.length&&h(e,y)},onCopy(){e.length===1&&v(e[0])},async onPasteStyles(){await k(s(e))}})}var PZ=l(A(),1),zCe=(0,PZ.createSlotFill)(Symbol("CommentIconSlotFill")),CE=zCe;var RZ=l(N(),1),OZ=l(A(),1),BE=l($(),1),EE=l(F(),1);var AZ=l(w(),1);function jCe({clientId:e}){let t=(0,EE.useSelect)(r=>r(_).getBlock(e),[e]),{replaceBlocks:o}=(0,EE.useDispatch)(_);return!t||t.name!=="core/html"?null:(0,AZ.jsx)(OZ.MenuItem,{onClick:()=>o(e,(0,BE.rawHandler)({HTML:(0,BE.getBlockContent)(t)})),children:(0,RZ.__)("Convert to Blocks")})}var LZ=jCe;var NZ=l(A(),1),{Fill:MZ,Slot:UCe}=(0,NZ.createSlotFill)("__unstableBlockSettingsMenuFirstItem");MZ.Slot=UCe;var TE=MZ;var xg=l(A(),1),nX=l($(),1),iX=l(F(),1);var yV=l(A(),1),SV=l(N(),1),FZ=l($(),1),RE=l(F(),1),zZ=l(it(),1);var DZ=l($(),1),VZ=l(F(),1);function kS(e){return(0,VZ.useSelect)(t=>{let{getBlocksByClientId:o,getSelectedBlockClientIds:r,isUngroupable:n,isGroupable:i}=t(_),{getGroupingBlockName:s,getBlockType:a}=t(DZ.store),c=e?.length?e:r(),u=o(c),[d]=u,f=c.length===1&&n(c[0]);return{clientIds:c,isGroupable:i(c),isUngroupable:f,blocksSelection:u,groupingBlockName:s(),onUngroup:f&&a(d.name)?.transforms?.ungroup}},[e])}var IE=l(F(),1),PE=l($(),1),wm=l(A(),1);var vS=l(N(),1);var Cm=l(w(),1),HCe={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};function GCe(){let{blocksSelection:e,clientIds:t,groupingBlockName:o,isGroupable:r}=kS(),{replaceBlocks:n}=(0,IE.useDispatch)(_),{canRemove:i,variations:s}=(0,IE.useSelect)(p=>{let{canRemoveBlocks:g}=p(_),{getBlockVariations:b}=p(PE.store);return{canRemove:g(t),variations:b(o,"transform")}},[t,o]),a=p=>{let g=(0,PE.switchToBlockType)(e,o);typeof p!="string"&&(p="group"),g&&g.length>0&&(g[0].attributes.layout=HCe[p],n(t,g))},c=()=>a("row"),u=()=>a("stack"),d=()=>a("grid");if(!r||!i)return null;let f=!!s.find(({name:p})=>p==="group-row"),m=!!s.find(({name:p})=>p==="group-stack"),h=!!s.find(({name:p})=>p==="group-grid");return(0,Cm.jsxs)(wm.ToolbarGroup,{children:[(0,Cm.jsx)(wm.ToolbarButton,{icon:nv,label:(0,vS._x)("Group","action: convert blocks to group"),onClick:a}),f&&(0,Cm.jsx)(wm.ToolbarButton,{icon:JL,label:(0,vS._x)("Row","action: convert blocks to row"),onClick:c}),m&&(0,Cm.jsx)(wm.ToolbarButton,{icon:pN,label:(0,vS._x)("Stack","action: convert blocks to stack"),onClick:u}),h&&(0,Cm.jsx)(wm.ToolbarButton,{icon:rv,label:(0,vS._x)("Grid","action: convert blocks to grid"),onClick:d})]})}var vV=GCe;var Bm=l(w(),1);function jZ({clientIds:e,isGroupable:t,isUngroupable:o,onUngroup:r,blocksSelection:n,groupingBlockName:i,onClose:s=()=>{}}){let{getSelectedBlockClientIds:a}=(0,RE.useSelect)(_),{replaceBlocks:c}=(0,RE.useDispatch)(_),u=()=>{let m=(0,FZ.switchToBlockType)(n,i);m&&c(e,m)},d=()=>{let m=n[0].innerBlocks;m.length&&(r&&(m=r(n[0].attributes,n[0].innerBlocks)),c(e,m))};if(!t&&!o)return null;let f=a();return(0,Bm.jsxs)(Bm.Fragment,{children:[t&&(0,Bm.jsx)(yV.MenuItem,{shortcut:f.length>1?zZ.displayShortcut.primary("g"):void 0,onClick:()=>{u(),s()},children:(0,SV._x)("Group","verb")}),o&&(0,Bm.jsx)(yV.MenuItem,{onClick:()=>{d(),s()},children:(0,SV._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}var _V=l(N(),1),GZ=l(R(),1),WZ=l(A(),1);var UZ=l(F(),1);function ei(e){return(0,UZ.useSelect)(t=>{let{canLockBlockType:o,getBlockName:r,isEditLockedBlock:n,isMoveLockedBlock:i,isRemoveLockedBlock:s,isLockedBlock:a}=M(t(_));return{isEditLocked:n(e),isMoveLocked:i(e),isRemoveLocked:s(e),canLock:o(r(e)),isLocked:a(e)}},[e])}var Ki=l(N(),1),yS=l(R(),1),bo=l(A(),1);var OE=l(F(),1),HZ=l($(),1);var It=l(w(),1),WCe=["core/navigation"];function $Ce(e){return e.remove&&e.move?"all":e.remove&&!e.move?"insert":!1}function AE({clientId:e,onClose:t}){let[o,r]=(0,yS.useState)({move:!1,remove:!1}),{isEditLocked:n,isMoveLocked:i,isRemoveLocked:s}=ei(e),{allowsEditLocking:a,templateLock:c,hasTemplateLock:u}=(0,OE.useSelect)(v=>{let{getBlockName:k,getBlockAttributes:y}=v(_),S=k(e),x=(0,HZ.getBlockType)(S);return{allowsEditLocking:WCe.includes(S),templateLock:y(e)?.templateLock,hasTemplateLock:!!x?.attributes?.templateLock}},[e]),[d,f]=(0,yS.useState)(!!c),{updateBlockAttributes:m}=(0,OE.useDispatch)(_),h=Tt(e);(0,yS.useEffect)(()=>{r({move:i,remove:s,...a?{edit:n}:{}})},[n,i,s,a]);let p=Object.values(o).every(Boolean),g=Object.values(o).some(Boolean)&&!p,b=o.move!==i||o.remove!==s||a&&o.edit!==n||u&&d!==!!c;return(0,It.jsx)(bo.Modal,{title:(0,Ki.sprintf)((0,Ki.__)("Lock %s"),h.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,It.jsxs)("form",{onSubmit:v=>{v.preventDefault(),b&&(m([e],{lock:o,templateLock:d?$Ce(o):void 0}),t())},children:[(0,It.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,It.jsx)("legend",{children:(0,Ki.__)("Select the features you want to lock")}),(0,It.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,It.jsxs)("li",{children:[(0,It.jsx)(bo.CheckboxControl,{className:"block-editor-block-lock-modal__options-all",label:(0,Ki.__)("Lock all"),checked:p,indeterminate:g,onChange:v=>r({move:v,remove:v,...a?{edit:v}:{}})}),(0,It.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[a&&(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(bo.CheckboxControl,{label:(0,Ki.__)("Lock editing"),checked:!!o.edit,onChange:v=>r(k=>({...k,edit:v}))}),(0,It.jsx)(bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.edit?Rf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(bo.CheckboxControl,{label:(0,Ki.__)("Lock movement"),checked:o.move,onChange:v=>r(k=>({...k,move:v}))}),(0,It.jsx)(bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.move?Rf:vl})]}),(0,It.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,It.jsx)(bo.CheckboxControl,{label:(0,Ki.__)("Lock removal"),checked:o.remove,onChange:v=>r(k=>({...k,remove:v}))}),(0,It.jsx)(bo.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:o.remove?Rf:vl})]})]})]})}),u&&(0,It.jsx)(bo.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,Ki.__)("Apply to all blocks inside"),checked:d,disabled:o.move&&!o.remove,onChange:()=>f(!d)})]}),(0,It.jsxs)(bo.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,It.jsx)(bo.FlexItem,{children:(0,It.jsx)(bo.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Ki.__)("Cancel")})}),(0,It.jsx)(bo.FlexItem,{children:(0,It.jsx)(bo.Button,{variant:"primary",type:"submit",disabled:!b,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Ki.__)("Apply")})})]})]})})}var Em=l(w(),1);function xV({clientId:e}){let{canLock:t,isLocked:o}=ei(e),[r,n]=(0,GZ.useReducer)(s=>!s,!1);if(!t)return null;let i=o?(0,_V.__)("Unlock"):(0,_V.__)("Lock");return(0,Em.jsxs)(Em.Fragment,{children:[(0,Em.jsx)(WZ.MenuItem,{icon:o?vl:CL,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog",children:i}),r&&(0,Em.jsx)(AE,{clientId:e,onClose:n})]})}var LE=l(N(),1),NE=l(A(),1),_g=l(R(),1);var ld=l(w(),1);function wV({clientId:e}){let{canLock:t,isLocked:o}=ei(e),[r,n]=(0,_g.useReducer)(a=>!a,!1),i=(0,_g.useRef)(!1);if((0,_g.useEffect)(()=>{o&&(i.current=!0)},[o]),!o&&!i.current)return null;let s=o?(0,LE.__)("Unlock"):(0,LE.__)("Lock");return!t&&o&&(s=(0,LE.__)("Locked")),(0,ld.jsxs)(ld.Fragment,{children:[(0,ld.jsx)(NE.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,ld.jsx)(NE.ToolbarButton,{disabled:!t,icon:o?Rf:vl,label:s,onClick:n,"aria-expanded":r,"aria-haspopup":"dialog"})}),r&&(0,ld.jsx)(AE,{clientId:e,onClose:n})]})}var CV=l(N(),1),$Z=l(A(),1),ME=l($(),1),DE=l(F(),1);var KZ=l(w(),1),KCe=()=>{};function YZ({clientId:e,onToggle:t=KCe}){let{blockType:o,mode:r,enabled:n}=(0,DE.useSelect)(a=>{let{getBlock:c,getBlockMode:u,getSettings:d}=a(_),f=c(e);return{mode:u(e),blockType:f?(0,ME.getBlockType)(f.name):null,enabled:d().codeEditingEnabled&&!!f?.isValid}},[e]),{toggleBlockMode:i}=(0,DE.useDispatch)(_);if(!o||!(0,ME.hasBlockSupport)(o,"html",!0)||!n)return null;let s=r==="visual"?(0,CV.__)("Edit as HTML"):(0,CV.__)("Edit visually");return(0,KZ.jsx)($Z.MenuItem,{onClick:()=>{i(e),t()},children:s})}var QZ=l(A(),1),JZ=l(N(),1),eX=l(R(),1),tX=l(F(),1),oX=l(Is(),1);var Fs=l(A(),1),Vs=l(N(),1),ZZ=l(R(),1),XZ=l(Xo(),1),VE=l(F(),1);function qZ(e){return e?.trim()?.length===0}var Jl=l(w(),1);function Tm({clientId:e,onClose:t}){let[o,r]=(0,ZZ.useState)(),n=Tt(e),{metadata:i}=(0,VE.useSelect)(b=>{let{getBlockAttributes:v}=b(_);return{metadata:v(e)?.metadata}},[e]),{updateBlockAttributes:s}=(0,VE.useDispatch)(_),a=i?.name||"",c=n?.title,u=!!a&&!!i?.bindings&&Object.values(i.bindings).some(b=>b.source==="core/pattern-overrides"),d=o!==void 0&&o!==a,f=o===c,m=qZ(o),h=d||f,p=b=>b.target.select(),g=()=>{let b=f||m?void 0:o,v=f||m?(0,Vs.sprintf)((0,Vs.__)('Block name reset to: "%s".'),o):(0,Vs.sprintf)((0,Vs.__)('Block name changed to: "%s".'),o);(0,XZ.speak)(v,"assertive"),s([e],{metadata:Me({...i,name:b})}),t()};return(0,Jl.jsx)(Fs.Modal,{title:(0,Vs.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,Jl.jsx)("form",{onSubmit:b=>{b.preventDefault(),h&&g()},children:(0,Jl.jsxs)(Fs.__experimentalVStack,{spacing:"3",children:[(0,Jl.jsx)(Fs.TextControl,{__next40pxDefaultSize:!0,value:o??a,label:(0,Vs.__)("Name"),help:u?(0,Vs.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:c,onChange:r,onFocus:p}),(0,Jl.jsxs)(Fs.__experimentalHStack,{justify:"right",children:[(0,Jl.jsx)(Fs.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Vs.__)("Cancel")}),(0,Jl.jsx)(Fs.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!h,variant:"primary",type:"submit",children:(0,Vs.__)("Save")})]})]})})})}var Im=l(w(),1);function BV({clientId:e}){let[t,o]=(0,eX.useState)(!1),r=(0,tX.useSelect)(n=>n(oX.store).getShortcutRepresentation("core/block-editor/rename"),[]);return(0,Im.jsxs)(Im.Fragment,{children:[(0,Im.jsx)(QZ.MenuItem,{onClick:()=>{o(!0)},"aria-expanded":t,"aria-haspopup":"dialog",shortcut:r,children:(0,JZ.__)("Rename")}),t&&(0,Im.jsx)(Tm,{clientId:e,onClose:()=>o(!1)})]})}var rX=l($(),1);function Pm(e){return{canRename:!!e&&(0,rX.getBlockSupport)(e,"renaming",!0)}}var zs=l(w(),1),{Fill:YCe,Slot:qCe}=(0,xg.createSlotFill)("BlockSettingsMenuControls"),ZCe=({fillProps:e,clientIds:t=null})=>{let{selectedBlocks:o,selectedClientIds:r,isContentOnly:n,canToggleSelectedBlocksVisibility:i,canEdit:s}=(0,iX.useSelect)(b=>{let{getBlocksByClientId:v,getBlockNamesByClientId:k,getSelectedBlockClientIds:y,getBlockEditingMode:S,canEditBlock:x}=b(_),C=t!==null?t:y();return{selectedBlocks:k(C),selectedClientIds:C,isContentOnly:S(C[0])==="contentOnly",canToggleSelectedBlocksVisibility:v(C).every(B=>(0,nX.hasBlockSupport)(B.name,"visibility",!0)),canEdit:x(C[0])}},[t]),{canLock:a}=ei(r[0]),{canRename:c}=Pm(o[0]),u=r.length===1&&a&&!n,d=r.length===1&&c&&!n,f=i&&!n,m=kS(r),{isGroupable:h,isUngroupable:p}=m,g=(h||p)&&!n;return(0,zs.jsx)(qCe,{fillProps:{...e,canEdit:s,selectedBlocks:o,selectedClientIds:r},children:b=>!b?.length>0&&!g&&!u?null:(0,zs.jsxs)(xg.MenuGroup,{children:[g&&(0,zs.jsx)(jZ,{...m,onClose:e?.onClose}),s&&u&&(0,zs.jsx)(xV,{clientId:r[0]}),s&&d&&(0,zs.jsx)(BV,{clientId:r[0]}),s&&f&&(0,zs.jsx)(PD,{clientIds:r}),b,s&&e?.count===1&&!n&&(0,zs.jsx)(YZ,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};function sX({...e}){return(0,zs.jsx)(xg.__experimentalStyleProvider,{document,children:(0,zs.jsx)(YCe,{...e})})}sX.Slot=ZCe;var FE=sX;var aX=l(R(),1),lX=l(A(),1),cX=l(Z(),1),uX=l(F(),1),zE=l(N(),1);var EV=l(w(),1);function dX({parentClientId:e,parentBlockType:t}){let o=(0,cX.useViewportMatch)("medium","<"),{selectBlock:r}=(0,uX.useDispatch)(_),n=(0,aX.useRef)(),i=kg({ref:n,highlightParent:!0});return o?(0,EV.jsx)(lX.MenuItem,{...i,ref:n,icon:(0,EV.jsx)(Ae,{icon:t.icon}),onClick:()=>r(e),children:(0,zE.sprintf)((0,zE.__)("Select parent block (%s)"),t.title)}):null}var kt=l(w(),1),XCe={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function TV({clientIds:e,onCopy:t,label:o,shortcut:r,eventType:n="copy",__experimentalUpdateSelection:i=!1}){let{getBlocksByClientId:s}=(0,Om.useSelect)(_),{removeBlocks:a}=(0,Om.useDispatch)(_),c=Oh(),u=(0,Rm.useCopyToClipboard)(()=>(0,wg.serialize)(s(e)),()=>{switch(n){case"copy":case"copyStyles":t(),c(n,e);break;case"cut":c(n,e),a(e,i);break;default:break}}),d=o||(0,Pa.__)("Copy");return(0,kt.jsx)(ti.MenuItem,{ref:u,shortcut:r,children:d})}function IV({block:e,clientIds:t,children:o,__experimentalSelectBlock:r,...n}){let i=t.length,s=t[0],{firstParentClientId:a,parentBlockType:c,previousBlockClientId:u,selectedBlockClientIds:d,isContentOnly:f,isZoomOut:m,canEdit:h}=(0,Om.useSelect)(C=>{let{getBlockName:B,getBlockRootClientId:I,getPreviousBlockClientId:P,getSelectedBlockClientIds:E,getBlockAttributes:L,getBlockEditingMode:T,isZoomOut:O,canEditBlock:D}=M(C(_)),{getActiveBlockVariation:U}=C(wg.store),G=I(s),j=G&&B(G);return{firstParentClientId:G,parentBlockType:G&&(U(j,L(G))||(0,wg.getBlockType)(j)),previousBlockClientId:P(s),selectedBlockClientIds:E(),isContentOnly:T(s)==="contentOnly",isZoomOut:O(),canEdit:D(s)}},[s]),{getBlockOrder:p,getSelectedBlockClientIds:g}=(0,Om.useSelect)(_),b=(0,Om.useSelect)(C=>{let{getShortcutRepresentation:B}=C(fX.store);return{copy:B("core/block-editor/copy"),cut:B("core/block-editor/cut"),duplicate:B("core/block-editor/duplicate"),remove:B("core/block-editor/remove"),insertAfter:B("core/block-editor/insert-after"),insertBefore:B("core/block-editor/insert-before")}},[]),v=d.length>0;async function k(C){if(!r)return;let B=await C;B&&B[0]&&r(B[0],!1)}function y(){if(!r)return;let C=u||a;C||(C=p()[0]);let B=v&&g().length===0;r(C,B)}let x=!d?.includes(a)&&!!a;return(0,kt.jsx)(IZ,{clientIds:t,__experimentalUpdateSelection:!r,children:({canCopyStyles:C,canDuplicate:B,canInsertBlock:I,canRemove:P,onDuplicate:E,onInsertAfter:L,onInsertBefore:T,onRemove:O,onCopy:D,onPasteStyles:U})=>!P&&!B&&!I&&f?null:(0,kt.jsx)(ti.DropdownMenu,{icon:ks,label:(0,Pa.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:XCe,noIcons:!0,...n,children:({onClose:j})=>(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsxs)(ti.MenuGroup,{children:[(0,kt.jsx)(TE.Slot,{fillProps:{onClose:j}}),x&&(0,kt.jsx)(dX,{parentClientId:a,parentBlockType:c}),h&&i===1&&(0,kt.jsx)(LZ,{clientId:s}),!f&&(0,kt.jsx)(TV,{clientIds:t,onCopy:D,shortcut:b.copy}),P&&!f&&(0,kt.jsx)(TV,{clientIds:t,label:(0,Pa.__)("Cut"),eventType:"cut",shortcut:b.cut,__experimentalUpdateSelection:!r}),B&&(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,E,k),shortcut:b.duplicate,children:(0,Pa.__)("Duplicate")}),I&&!m&&(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,T),shortcut:b.insertBefore,children:(0,Pa.__)("Add before")}),(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,L),shortcut:b.insertAfter,children:(0,Pa.__)("Add after")})]}),h&&i===1&&(0,kt.jsx)(CE.Slot,{fillProps:{clientId:s,onClose:j}})]}),C&&!f&&(0,kt.jsxs)(ti.MenuGroup,{children:[(0,kt.jsx)(TV,{clientIds:t,onCopy:D,label:(0,Pa.__)("Copy styles"),eventType:"copyStyles"}),h&&(0,kt.jsx)(ti.MenuItem,{onClick:U,children:(0,Pa.__)("Paste styles")})]}),!f&&(0,kt.jsx)(FE.Slot,{fillProps:{onClose:j,count:i,firstBlockClientId:s},clientIds:t}),typeof o=="function"?o({onClose:j}):jE.Children.map(z=>(0,jE.cloneElement)(z,{onClose:j})),P&&(0,kt.jsx)(ti.MenuGroup,{children:(0,kt.jsx)(ti.MenuItem,{onClick:(0,Rm.pipe)(j,O,y),shortcut:b.remove,children:(0,Pa.__)("Delete")})})]})})})}var mX=IV;var pX=l(A(),1),QCe=(0,pX.createSlotFill)(Symbol("CommentIconToolbarSlotFill")),UE=QCe;var Cg=l(w(),1);function JCe({clientIds:e,...t}){return(0,Cg.jsxs)(HE.ToolbarGroup,{children:[(0,Cg.jsx)(UE.Slot,{}),(0,Cg.jsx)(HE.ToolbarItem,{children:o=>(0,Cg.jsx)(mX,{clientIds:e,toggleProps:o,...t})})]})}var GE=JCe;var WE=l(A(),1),hX=l(N(),1),$E=l(F(),1);var PV=l(w(),1);function gX({clientIds:e}){let t=e.length===1?e[0]:void 0,o=(0,$E.useSelect)(n=>!!t&&n(_).getBlockMode(t)==="html",[t]),{toggleBlockMode:r}=(0,$E.useDispatch)(_);return o?(0,PV.jsx)(WE.ToolbarGroup,{children:(0,PV.jsx)(WE.ToolbarButton,{onClick:()=>{r(t)},children:(0,hX.__)("Edit visually")})}):null}var KE=l(A(),1),Yr=l(R(),1),vX=l(F(),1),yX=l(Re(),1),OV=l(Fe(),1),SX=l(Is(),1),_X=l(it(),1);var RV=l(w(),1);function e1e(e){let t="toolbarItem";return!e.some(o=>!(t in o.dataset))}function bX(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function kX(e){return e.contains(e.ownerDocument.activeElement)}function t1e(e){let[t]=OV.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}function o1e(e){let[o,r]=(0,Yr.useState)(!0),n=(0,Yr.useCallback)(()=>{let i=OV.focus.tabbable.find(e.current),s=e1e(i);s||(0,yX.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,Yr.useLayoutEffect)(()=>{let i=new window.MutationObserver(n);return i.observe(e.current,{childList:!0,subtree:!0}),()=>i.disconnect()},[n,o,e]),o}function r1e({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:o,defaultIndex:r,onIndexChange:n,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){let[a]=(0,Yr.useState)(t),[c]=(0,Yr.useState)(r),u=(0,Yr.useCallback)(()=>{t1e(e.current)},[e]);(0,SX.useShortcut)("core/block-editor/focus-toolbar",()=>{i&&u()}),(0,Yr.useEffect)(()=>{a&&u()},[o,a,u]),(0,Yr.useEffect)(()=>{let m=e.current,h=0;return!a&&!kX(m)&&(h=window.requestAnimationFrame(()=>{let p=bX(m),g=c||0;p[g]&&kX(m)&&p[g].focus({preventScroll:!0})})),()=>{if(window.cancelAnimationFrame(h),!n||!m)return;let g=bX(m).findIndex(b=>b.tabIndex===0);n(g)}},[c,a,n,e]);let{getLastFocus:f}=M((0,vX.useSelect)(_));(0,Yr.useEffect)(()=>{let m=e.current;if(s){let h=p=>{let g=f();p.keyCode===_X.ESCAPE&&g?.current&&(p.preventDefault(),g.current.focus())};return m.addEventListener("keydown",h),()=>{m.removeEventListener("keydown",h)}}},[s,f,e])}function Bg({children:e,focusOnMount:t,focusEditorOnEscape:o=!1,shouldUseKeyboardFocusShortcut:r=!0,__experimentalInitialIndex:n,__experimentalOnIndexChange:i,orientation:s="horizontal",...a}){let c=(0,Yr.useRef)(),u=o1e(c);return r1e({toolbarRef:c,focusOnMount:t,defaultIndex:n,onIndexChange:i,isAccessibleToolbar:u,shouldUseKeyboardFocusShortcut:r,focusEditorOnEscape:o}),u?(0,RV.jsx)(KE.Toolbar,{label:a["aria-label"],ref:c,orientation:s,...a,children:e}):(0,RV.jsx)(KE.NavigableMenu,{orientation:s,role:"toolbar",ref:c,...a,children:e})}var xX=l(F(),1),YE=l($(),1);function qE(){return(0,xX.useSelect)(t=>{let{getBlockEditingMode:o,getBlockName:r,getBlockSelectionStart:n}=t(_),i=n(),s=i&&(0,YE.getBlockType)(r(i));return s&&(0,YE.hasBlockSupport)(s,"__experimentalToolbar",!0)&&o(i)!=="disabled"},[])}var cd=l(A(),1),wX=l(N(),1),CX=l($(),1),BX=l(R(),1),ZE=l(F(),1);var Eg=l(w(),1),AV=[],n1e=6,i1e={placement:"bottom-start"};function EX({clientId:e}){let{categories:t,currentPatternName:o,patterns:r}=(0,ZE.useSelect)(a=>{let{getBlockAttributes:c,getBlockRootClientId:u,__experimentalGetAllowedPatterns:d}=a(_),f=c(e),m=f?.metadata?.categories||AV,h=u(e),p=m.length>0?d(h):AV;return{categories:m,currentPatternName:f?.metadata?.patternName,patterns:p}},[e]),{replaceBlocks:n}=(0,ZE.useDispatch)(_),i=(0,BX.useMemo)(()=>t.length===0||!r||r.length===0?AV:r.filter(a=>{let c=a.source==="core"||a.source?.startsWith("pattern-directory")&&a.source!=="pattern-directory/theme";return a.blocks.length===1&&!c&&o!==a.name&&a.categories?.some(u=>t.includes(u))&&(a.syncStatus==="unsynced"||!a.id)}).slice(0,n1e),[t,o,r]);if(i.length<2)return null;let s=a=>{let c=(a.blocks??[]).map(u=>(0,CX.cloneBlock)(u));c[0].attributes.metadata={...c[0].attributes.metadata,categories:t},n(e,c)};return(0,Eg.jsx)(cd.Dropdown,{popoverProps:i1e,renderToggle:({onToggle:a,isOpen:c})=>(0,Eg.jsx)(cd.ToolbarGroup,{children:(0,Eg.jsx)(cd.ToolbarButton,{onClick:()=>a(!c),"aria-expanded":c,children:(0,wX.__)("Change design")})}),renderContent:()=>(0,Eg.jsx)(cd.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,Eg.jsx)(Ca,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}var Us=l(A(),1),XX=l(N(),1),iT=l(F(),1);var JE=l(F(),1),ud=l($(),1),OX=l(R(),1);var LV=l(XE(),1),IX=l(N(),1);function PX(e,t){for(let o of new LV.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 QE(e)}function Tg(e,t,o){let r=new LV.default(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+o.name),r.value}function RX(e){return!e||e.length===0?[]:QE(e)?e:[{name:"default",label:(0,IX._x)("Default","block style"),isDefault:!0},...e]}function QE(e){return e?.find(t=>t.isDefault)}function s1e(e,t){return(0,OX.useMemo)(()=>{let o=t?.example,r=t?.name;if(o&&r)return(0,ud.getBlockFromExample)(r,{attributes:o.attributes,innerBlocks:o.innerBlocks});if(e)return(0,ud.cloneBlock)(e)},[e,t?.example,t?.name])}function Ig({clientId:e,onSwitch:t}){let o=m=>{let{getBlock:h}=m(_),p=h(e);if(!p)return{};let g=(0,ud.getBlockType)(p.name),{getBlockStyles:b}=m(ud.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,JE.useSelect)(o,[e]),{updateBlockAttributes:a}=(0,JE.useDispatch)(_),c=RX(r),u=PX(c,s),d=s1e(n,i);return{onSelect:m=>{let h=Tg(s,u,m);a(e,{className:h}),t()},stylesToRender:c,activeStyle:u,genericPreviewBlock:d,className:s}}var Lg=l($(),1),BS=l(F(),1),nT=l(R(),1);function AX(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 Oo=(e,t,o)=>{let r=Array.isArray(t)?t:t.split("."),n=e;return r.forEach(i=>{n=n?.[i]}),n??o};var NX=l(Uv(),1);var a1e="1600px",l1e="320px",c1e=1,u1e=.25,d1e=.75,f1e="14px";function LX({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:r=l1e,maximumViewportWidth:n=a1e,scaleFactor:i=c1e,minimumFontSizeLimit:s}){if(s=Ra(s)?s:f1e,o){let y=Ra(o);if(!y?.unit||!y?.value)return null;let S=Ra(s,{coerceTo:y.unit});if(S?.value&&!e&&!t&&y?.value<=S?.value)return null;if(t||(t=`${y.value}${y.unit}`),!e){let x=y.unit==="px"?y.value:y.value*16,C=Math.min(Math.max(1-.075*Math.log2(x),u1e),d1e),B=SS(y.value*C,3);S?.value&&B<S?.value?e=`${S.value}${S.unit}`:e=`${B}${y.unit}`}}let a=Ra(e),c=a?.unit||"rem",u=Ra(t,{coerceTo:c});if(!a||!u)return null;let d=Ra(e,{coerceTo:"rem"}),f=Ra(n,{coerceTo:c}),m=Ra(r,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let p=SS(m.value/100,3),g=SS(p,3)+c,b=100*((u.value-a.value)/h),v=SS((b||1)*i,3),k=`${d.value}${d.unit} + ((1vw - ${g}) * ${v})`;return`clamp(${e}, ${k}, ${t})`}function Ra(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:o,rootSizeValue:r,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.toString().match(s);if(!a||a.length<3)return null;let[,c,u]=a,d=parseFloat(c);return o==="px"&&(u==="em"||u==="rem")&&(d=d*r,u=o),u==="px"&&(o==="em"||o==="rem")&&(d=d/r,u=o),(o==="em"||o==="rem")&&(u==="em"||u==="rem")&&(u=o),u?{value:SS(d,3),unit:u}:null}function SS(e,t=3){let o=Math.pow(10,t);return Math.round(e*o)/o}function NV(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function m1e(e){let t=e?.typography??{},o=e?.layout,r=Ra(o?.wideSize)?o?.wideSize:null;return NV(t)&&r?{fluid:{maxViewportWidth:r,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function ec(e,t){let{size:o}=e;if(!o||o==="0"||e?.fluid===!1||!NV(t?.typography)&&!NV(e))return o;let r=m1e(t)?.fluid??{},n=LX({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:typeof r=="object"?r?.minFontSize:void 0,maximumViewportWidth:typeof r=="object"?r?.maxViewportWidth:void 0,minimumViewportWidth:typeof r=="object"?r?.minViewportWidth:void 0});return n||o}var Oa="body",_S=":root",eT=[{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)=>ec(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 js(e,t){if(!e||!t)return t;let o=e.split(","),r=t.split(","),n=[];return o.forEach(i=>{r.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function MX(e,t){if(!e||!t)return;let o={};return Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(o[r]=js(e,n)),typeof n=="object"&&(o[r]={},Object.entries(n).forEach(([i,s])=>{o[r][i]=js(e,s)}))}),o}function DX(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function VX(e,t){let o=`.is-style-${e}`;if(!t)return o;let r=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,a,c)=>a+c+o;return t.split(",").map(s=>s.replace(r,n)).join(",")}function p1e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let o=(0,NX.getCSSValueFromRawStyle)(Oo(t,e.ref));return typeof o=="object"&&o!==null&&"ref"in o&&o?.ref?void 0:o===void 0?e:o}return e}function h1e(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 Pg(e,t){if(!e||!t)return e;let o=p1e(e,t);return typeof o=="object"&&o!==null&&"url"in o&&o?.url&&(o.url=h1e(o.url,t?._links?.["wp:theme-file"])),o}function FX(e,t,o=[],r="slug",n){let i=[t?Oo(e,["blocks",t,...o]):void 0,Oo(e,o)].filter(Boolean);for(let s of i)if(s){let a=["custom","theme","default"];for(let c of a){let u=s[c];if(u){let d=u.find(f=>f[r]===n);if(d)return r==="slug"||FX(e,t,o,"slug",d.slug)[r]===d[r]?d:void 0}}}}function g1e(e,t,o,[r,n]=[]){let i=eT.find(a=>a.cssVarInfix===r);if(!i||!e.settings)return o;let s=FX(e.settings,t,i.path,"slug",n);if(s){let{valueKey:a}=i,c=s[a];return wn(e,t,c)}return o}function b1e(e,t,o,r=[]){let n=(t?Oo(e?.settings??{},["blocks",t,"custom",...r]):void 0)??Oo(e?.settings??{},["custom",...r]);return n?wn(e,t,n):o}function wn(e,t,o){if(!o||typeof o!="string")if(typeof o=="object"&&o!==null&&"ref"in o&&typeof o.ref=="string"){let u=Oo(e,o.ref);if(!u||typeof u=="object"&&"ref"in u)return u;o=u}else return o;let r="var:",n="var(--wp--",i=")",s;if(o.startsWith(r))s=o.slice(r.length).split("|");else if(o.startsWith(n)&&o.endsWith(i))s=o.slice(n.length,-i.length).split("--");else return o;let[a,...c]=s;return a==="preset"?g1e(e,t,o,c):a==="custom"?b1e(e,t,o,c):o}var qr=l($(),1),wS=l(Uv(),1),YX=l(F(),1);function oi(e,t="root",o={}){if(!t)return null;let{fallback:r=!1}=o,{name:n,selectors:i,supports:s}=e,a=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(a&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=r?u:null;if(a)return Oo(i,`${c}.root`,null)||Oo(i,c,null)||m;let h=s?Oo(s,`${c}.__experimentalSelector`,null):void 0;return h?js(u,h):m}let f;return a&&(f=Oo(i,c,null)),f||(r?oi(e,d[0],o):null)}function Og(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 DV(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function R1e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function VV(e,t="0"){let o=R1e(e);if(!o)return null;let r=DV(o?.top)||t,n=DV(o?.left)||t;return r===n?r:`${r} ${n}`}var HX={backgroundSize:"cover",backgroundPosition:"50% 50%"};function GX(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:HX.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:HX.backgroundPosition}),t}var WX={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 O1e={button:"wp-element-button",caption:"wp-element-caption"},A1e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function L1e(e="*",t={}){return eT.reduce((o,{path:r,cssVarInfix:n,classes:i})=>{if(!i)return o;let s=Oo(t,r,[]);return["default","theme","custom"].forEach(a=>{s[a]&&s[a].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Og(c)}-${u}`,m=e.split(",").map(p=>`${p}${f}`).join(","),h=`var(--wp--preset--${n}--${Og(c)})`;o+=`${m}{${d}: ${h} !important;}`})})}),o},"")}function N1e(e,t){let o=e.split(","),r=[];return o.forEach(n=>{r.push(`${t.trim()}${n.trim()}`)}),r.join(", ")}var $X=(e,t,o)=>{if(o!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",s=".wp-block-paragraph";if(i in e){let a=e[i],c={...e};return delete c[i],c[s]=a,c}return e},KX=(e,t)=>{let o={};return Object.entries(e).forEach(([r,n])=>{if(r==="root"||!t?.[r])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,a])=>{if(s==="root"||!t?.[r][s])return;let c={[r]:{[s]:t[r][s]}},u=Ag(c);o[a]=[...o[a]||[],...u],delete t[r][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,a={[r]:t[r]},c=Ag(a);o[s]=[...o[s]||[],...c],delete t[r]}}),o};function Ag(e={},t="",o,r={},n=!1){let i=Oa===t,s=Object.entries(qr.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let p=d;if(p[0]==="elements"||m)return c;let g=Oo(e,p);if(u==="--wp--style--root--padding"&&(typeof g=="string"||!o))return c;if(f&&typeof g!="string")Object.entries(f).forEach(b=>{let[v,k]=b;if(!Oo(g,[k],!1))return;let y=v.startsWith("--")?v:Og(v);c.push(`${y}: ${(0,wS.getCSSValueFromRawStyle)(Oo(g,[k]))}`)});else if(Oo(e,p,!1)){let b=u.startsWith("--")?u:Og(u);c.push(`${b}: ${(0,wS.getCSSValueFromRawStyle)(Oo(e,p))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Pg(e.background.backgroundImage,r)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...GX(e.background)}})),(0,wS.getCSSRules)(e).forEach(c=>{if(i&&(o||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Og(c.key),d=Pg(c.value,r);u==="font-size"&&(d=ec({name:"",slug:"",size:d},r?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function FV({layoutDefinitions:e=WX,style:t,selector:o,hasBlockGapSupport:r,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",a=r?VV(t?.spacing?.blockGap):"";if(n&&(o===Oa?a=a||"0.5em":!r&&i&&(a=i)),a&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!r&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,p])=>{m.push(`${h}: ${p||a}`)}),m.length){let h="";r?h=o===Oa?`:root :where(.${c})${f?.selector||""}`:`:root :where(${o}-${c})${f?.selector||""}`:h=o===Oa?`:where(.${c}${f?.selector||""})`:`:where(${o}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),o===Oa&&r&&(s+=`${_S} { --wp--style--block-gap: ${a}; }`)),o===Oa&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${o} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([p,g])=>{h.push(`${p}: ${g}`)}),h.length){let p=`.${u}${m?.selector||""}`;s+=`${p} { ${h.join("; ")}; }`}})})}return s}var M1e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function tT(e){if(!e)return{};let r=Object.entries(e).filter(([n])=>M1e.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(r)}var D1e=(e,t)=>{let o=[];if(!e?.styles)return o;let r=tT(e.styles);return r&&o.push({styles:r,selector:Oa,skipSelectorWrapper:!0}),Object.entries(qr.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&o.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!O1e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=tT(i),a=i,c=[];if(a?.variations){let u={};Object.entries(a.variations).forEach(([d,f])=>{let m=f;u[d]=tT(m),m?.css&&(u[d].css=m.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(m?.elements??{}).forEach(([p,g])=>{g&&qr.__EXPERIMENTAL_ELEMENTS[p]&&c.push({styles:g,selector:js(h,qr.__EXPERIMENTAL_ELEMENTS[p])})}),Object.entries(m?.blocks??{}).forEach(([p,g])=>{let b=typeof t!="string"?js(h,t[p]?.selector):void 0,v=typeof t!="string"?js(h,t[p]?.duotoneSelector):void 0,k=typeof t!="string"?MX(h,t[p]?.featureSelectors??{}):void 0,y=tT(g);g?.css&&(y.css=g.css),!(!b||typeof t=="string")&&(c.push({selector:b,duotoneSelector:v,featureSelectors:k,fallbackGapValue:t[p]?.fallbackGapValue,hasLayoutSupport:t[p]?.hasLayoutSupport,styles:y}),Object.entries(g.elements??{}).forEach(([S,x])=>{x&&qr.__EXPERIMENTAL_ELEMENTS[S]&&c.push({styles:x,selector:js(b,qr.__EXPERIMENTAL_ELEMENTS[S])})}))})}),s.variations=u}typeof t!="string"&&t?.[n]?.selector&&o.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors,name:n}),Object.entries(a?.elements??{}).forEach(([u,d])=>{typeof t!="string"&&d&&t?.[n]&&qr.__EXPERIMENTAL_ELEMENTS[u]&&o.push({styles:d,selector:t[n]?.selector.split(",").map(f=>qr.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),o.push(...c)}),o},V1e=(e,t)=>{let o=[];if(!e?.settings)return o;let r=s=>{let a={};return eT.forEach(({path:c})=>{let u=Oo(s,c,!1);u!==!1&&(a=AX(a,c,u))}),a},n=r(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&o.push({presets:n,custom:i,selector:_S}),Object.entries(e.settings?.blocks??{}).forEach(([s,a])=>{let c=a.custom;if(typeof t=="string"||!t[s])return;let u=r(a);(Object.keys(u).length>0||c)&&o.push({presets:u,custom:c,selector:t[s]?.selector})}),o};var oT=(e,t,o,r,n=!1,i=!1,s={})=>{let a={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=D1e(e,t),u=V1e(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=a.marginReset||a.rootPadding||a.layoutStyles,p="";if(a.presets&&(f||m)&&(p+=`${_S} {`,p=f?p+` --wp--style--global--content-size: ${f};`:p,p=m?p+` --wp--style--global--wide-size: ${m};`:p,p+="}"),h&&(p+=":where(body) {margin: 0;",a.rootPadding&&d&&(p+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),p+="}"),a.blockStyles&&c.forEach(({selector:g,duotoneSelector:b,styles:v,fallbackGapValue:k,hasLayoutSupport:y,featureSelectors:S,styleVariationSelectors:x,skipSelectorWrapper:C,name:B})=>{if(S){let E=KX(S,v);E=$X(E,e.settings,B),Object.entries(E).forEach(([L,T])=>{if(T.length){let O=T.join(";");p+=`:root :where(${L}){${O};}`}})}if(b){let E={};v?.filter&&(E.filter=v.filter,delete v.filter);let L=Ag(E);L.length&&(p+=`${b}{${L.join(";")};}`)}!n&&(Oa===g||y)&&(p+=FV({style:v,selector:g,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:k}));let I=Ag(v,g,d,e,i);if(I?.length){let E=C?g:`:root :where(${g})`;p+=`${E}{${I.join(";")};}`}v?.css&&(p+=CS(v.css,`:root :where(${g})`)),a.variationStyles&&x&&Object.entries(x).forEach(([E,L])=>{let T=v?.variations?.[E];if(T){if(S){let D=KX(S,T);D=$X(D,e.settings,B),Object.entries(D).forEach(([U,G])=>{if(G.length){let j=N1e(U,L),z=G.join(";");p+=`:root :where(${j}){${z};}`}})}let O=Ag(T,L,d,e);if(O.length&&(p+=`:root :where(${L}){${O.join(";")};}`),T?.css&&(p+=CS(T.css,`:root :where(${L})`)),y&&T?.spacing?.blockGap){let D=L+g;p+=FV({style:T,selector:D,hasBlockGapSupport:!0,hasFallbackGapSupport:r,fallbackGapValue:k})}}});let P=Object.entries(v).filter(([E])=>E.startsWith(":"));P?.length&&P.forEach(([E,L])=>{let T=Ag(L);if(!T?.length)return;let D=`:root :where(${g.split(",").map(U=>U+E).join(",")}){${T.join(";")};}`;p+=D})}),a.layoutStyles&&(p=p+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",p=p+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",p=p+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),a.blockGap&&o){let g=VV(e?.styles?.spacing?.blockGap)||"0.5em";p=p+`:root :where(.wp-site-blocks) > * { margin-block-start: ${g}; margin-block-end: 0; }`,p=p+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",p=p+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return a.presets&&u.forEach(({selector:g,presets:b})=>{(Oa===g||_S===g)&&(g="");let v=L1e(g,b);v.length>0&&(p+=v)}),p};var F1e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let o={root:t};return Object.entries(A1e).forEach(([r,n])=>{let i=oi(e,r);i&&(o[n]=i)}),o},rT=(e,t)=>{let{getBlockStyles:o}=(0,YX.select)(qr.store),r={};return e.forEach(n=>{let i=n.name,s=oi(n);if(!s)return;let a=oi(n,"filter.duotone");if(!a){let h=oi(n),p=(0,qr.getBlockSupport)(n,"color.__experimentalDuotone",!1);a=p&&h&&js(h,p)}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=o(i),f={};d?.forEach(h=>{let p=t?`-${t}`:"",g=`${h.name}${p}`,b=VX(g,s);f[g]=b});let m=F1e(n,s);r[i]={duotoneSelector:a??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),r};function CS(e,t){let o="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))o+=`:root :where(${t}){${n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[a,c]=s,u=a.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?a.replace(d,"").trim():a.trim(),m;f===""?m=t:m=a.startsWith(" ")?js(t,f):DX(t,f),o+=`:root :where(${m})${d}{${c.trim()}}`}}),o}var ES=l(w(),1),zV="is-style-";function qX(e){return e?e.split(/\s+/).reduce((t,o)=>{if(o.startsWith(zV)){let r=o.slice(zV.length);r!=="default"&&t.push(r)}return t},[]):[]}function jV(e,t=[]){let o=qX(e);if(!o)return null;for(let r of o)if(t.some(n=>n.name===r))return r;return null}function z1e({override:e}){tc(e)}function UV({config:e}){let{getBlockStyles:t,overrides:o}=(0,BS.useSelect)(i=>({getBlockStyles:i(Lg.store).getBlockStyles,overrides:M(i(_)).getStyleOverrides()}),[]),{getBlockName:r}=(0,BS.useSelect)(_),n=(0,nT.useMemo)(()=>{if(!o?.length)return;let i=[],s=[];for(let[,a]of o)if(a?.variation&&a?.clientId&&!s.includes(a.clientId)){let c=r(a.clientId),u=e?.styles?.blocks?.[c]?.variations?.[a.variation];if(u){let d={settings:e?.settings,styles:{blocks:{[c]:{variations:{[`${a.variation}-${a.clientId}`]:u}}}}},f=rT((0,Lg.getBlockTypes)(),a.clientId),b=oT(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});i.push({id:`${a.variation}-${a.clientId}`,css:b,__unstableType:"variation",variation:a.variation,clientId:a.clientId}),s.push(a.clientId)}}return i},[e,o,t,r]);return!n||!n.length?null:(0,ES.jsx)(ES.Fragment,{children:n.map(i=>(0,ES.jsx)(z1e,{override:i},i.id))})}function HV(e,t,o){if(!e?.styles?.blocks?.[t]?.variations?.[o])return;let r=i=>{Object.keys(i).forEach(s=>{let a=i[s];if(typeof a=="object"&&a!==null)if(a.ref!==void 0)if(typeof a.ref!="string"||a.ref.trim()==="")delete i[s];else{let c=yl(e,a.ref);c?i[s]=c:delete i[s]}else r(a),Object.keys(a).length===0&&delete i[s]})},n=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[o]));return r(n),n}function j1e(e,t,o){let{globalSettings:r,globalStyles:n}=(0,BS.useSelect)(i=>{let s=i(_).getSettings();return{globalSettings:s.__experimentalFeatures,globalStyles:s[xi]}},[]);return(0,nT.useMemo)(()=>{let i=HV({settings:r,styles:n},e,t);return{settings:r,styles:{blocks:{[e]:{variations:{[`${t}-${o}`]:i}}}}}},[r,n,t,o,e])}function U1e({name:e,className:t,clientId:o}){let{getBlockStyles:r}=(0,BS.useSelect)(Lg.store),n=r(e),i=jV(t,n),s=`${zV}${i}-${o}`,{settings:a,styles:c}=j1e(e,i,o),u=(0,nT.useMemo)(()=>{if(!i)return;let d={settings:a,styles:c},f=rT((0,Lg.getBlockTypes)(),o);return oT(d,f,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})},[i,a,c,o]);return tc({id:`variation-${o}`,css:u,__unstableType:"variation",variation:i,clientId:o}),i?{className:s}:{}}var ZX={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>qX(e).length>0,useBlockProps:U1e};var dd=l(w(),1),H1e=(0,dd.jsxs)(Us.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,dd.jsx)(Us.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,dd.jsx)(Us.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 G1e({clientId:e}){let{stylesToRender:t,activeStyle:o,className:r}=Ig({clientId:e}),{updateBlockAttributes:n}=(0,iT.useDispatch)(_),{globalSettings:i,globalStyles:s,blockName:a}=(0,iT.useSelect)(d=>{let f=d(_).getSettings();return{globalSettings:f.__experimentalFeatures,globalStyles:f[xi],blockName:d(_).getBlockName(e)}},[e]),c=o?.name?HV({settings:i,styles:s},a,o.name)?.color?.background:void 0;return!t||t.length===0?null:(0,dd.jsx)(Us.ToolbarGroup,{children:(0,dd.jsx)(Us.ToolbarButton,{onClick:()=>{let f=(t.findIndex(p=>p.name===o.name)+1)%t.length,m=t[f],h=Tg(r,o,m);n(e,{className:h})},label:(0,XX.__)("Shuffle styles"),children:(0,dd.jsx)(Us.Icon,{icon:H1e,style:{fill:c||"transparent"}})})})}var QX=G1e;var lT=l(A(),1),GV=l(N(),1),JX=l(F(),1),cT=l($(),1);var sT=l(F(),1);function aT(e){let{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i}=(0,sT.useSelect)(u=>{let{isSectionBlock:d,getParentSectionBlock:f,getEditedContentOnlySection:m,isWithinEditedContentOnlySection:h}=M(u(_)),p=m();return{isSectionBlock:d(e),isWithinSection:d(e)||!!f(e),isWithinEditedSection:h(e),isEditingContentOnlySection:p===e,editedContentOnlySection:p}},[e]),s=(0,sT.useDispatch)(_),{editContentOnlySection:a,stopEditingContentOnlySection:c}=M(s);return{isSectionBlock:t,isWithinSection:o,isWithinEditedSection:r,isEditingContentOnlySection:n,editedContentOnlySection:i,editContentOnlySection:a,stopEditingContentOnlySection:c}}var WV=l(w(),1);function eQ({clientId:e}){let{isSectionBlock:t,isEditingContentOnlySection:o,editContentOnlySection:r,stopEditingContentOnlySection:n}=aT(e),i=(0,JX.useSelect)(c=>{if(!e)return null;let{getBlockName:u}=c(_),d=u(e);return d?{name:d}:null},[e]);if(!e||!t&&!o||(0,cT.isReusableBlock)(i)||(0,cT.isTemplatePart)(i))return null;let s=o;return(0,WV.jsx)(lT.ToolbarGroup,{children:(0,WV.jsx)(lT.ToolbarButton,{onClick:()=>{s?n():r(e)},children:s?(0,GV.__)("Exit pattern"):(0,GV.__)("Edit pattern")})})}var EQ=l(A(),1),TQ=l(N(),1),IQ=l(F(),1);var PS=l($(),1),PQ=l(Zp(),1);var Aa=l(N(),1),La=l(A(),1),fd=l($(),1),bT=l(F(),1);var lQ=l(N(),1),TS=l(A(),1),fT=l($(),1),mT=l(R(),1);var tQ=l(N(),1),oQ=l(A(),1),rQ=l(Z(),1);var Am=l(w(),1);function uT({blocks:e}){return(0,rQ.useViewportMatch)("medium","<")?null:(0,Am.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,Am.jsx)(oQ.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,Am.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,Am.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,tQ.__)("Preview")}),(0,Am.jsx)(vn,{viewportWidth:601,blocks:e})]})})})}var nQ=l(A(),1),Ng=l($(),1),iQ=l(F(),1),dT=l(R(),1);var oc=l(w(),1),W1e={};function sQ({clientIds:e,blocks:t}){let{activeBlockVariation:o,blockVariationTransformations:r}=(0,iQ.useSelect)(i=>{let{getBlockAttributes:s,canRemoveBlocks:a}=i(_),{getActiveBlockVariation:c,getBlockVariations:u}=i(Ng.store),d=a(e);if(t.length!==1||!d)return W1e;let[f]=t;return{blockVariationTransformations:u(f.name,"transform"),activeBlockVariation:c(f.name,s(f.clientId))}},[e,t]);return(0,dT.useMemo)(()=>r?.filter(({name:i})=>i!==o?.name),[r,o])}var $1e=({transformations:e,onSelect:t,blocks:o})=>{let[r,n]=(0,dT.useState)();return(0,oc.jsxs)(oc.Fragment,{children:[r&&(0,oc.jsx)(uT,{blocks:(0,Ng.cloneBlock)(o[0],e.find(({name:i})=>i===r).attributes)}),e?.map(i=>(0,oc.jsx)(K1e,{item:i,onSelect:t,setHoveredTransformItemName:n},i.name))]})};function K1e({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i}=e;return(0,oc.jsxs)(nQ.MenuItem,{className:(0,Ng.getBlockMenuDefaultClassName)(r),onClick:s=>{s.preventDefault(),t(r)},onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,oc.jsx)(Ae,{icon:n,showColors:!0}),i]})}var aQ=$1e;var Cn=l(w(),1);function Y1e(e){let t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},o=(0,mT.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 q1e=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:o,onSelect:r,onSelectVariation:n,blocks:i})=>{let[s,a]=(0,mT.useState)(),{priorityTextTransformations:c,restTransformations:u}=Y1e(t),d=c.length&&u.length,f=!!u.length&&(0,Cn.jsx)(Z1e,{restTransformations:u,onSelect:r,setHoveredTransformItemName:a});return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsxs)(TS.MenuGroup,{label:(0,lQ.__)("Transform to"),className:e,children:[s&&(0,Cn.jsx)(uT,{blocks:(0,fT.switchToBlockType)(i,s)}),!!o?.length&&(0,Cn.jsx)(aQ,{transformations:o,blocks:i,onSelect:n}),c.map(m=>(0,Cn.jsx)(cQ,{item:m,onSelect:r,setHoveredTransformItemName:a},m.name)),!d&&f]}),!!d&&(0,Cn.jsx)(TS.MenuGroup,{className:e,children:f})]})};function Z1e({restTransformations:e,onSelect:t,setHoveredTransformItemName:o}){return e.map(r=>(0,Cn.jsx)(cQ,{item:r,onSelect:t,setHoveredTransformItemName:o},r.name))}function cQ({item:e,onSelect:t,setHoveredTransformItemName:o}){let{name:r,icon:n,title:i,isDisabled:s}=e;return(0,Cn.jsxs)(TS.MenuItem,{className:(0,fT.getBlockMenuDefaultClassName)(r),onClick:a=>{a.preventDefault(),t(r)},disabled:s,onMouseLeave:()=>o(null),onMouseEnter:()=>o(r),onFocus:()=>o(r),onBlur:()=>o(null),children:[(0,Cn.jsx)(Ae,{icon:n,showColors:!0}),i]})}var uQ=q1e;var fQ=l(N(),1),mQ=l(A(),1);var pT=l(A(),1);var Mg=l(w(),1),X1e=()=>{};function dQ({clientId:e,onSwitch:t=X1e}){let{onSelect:o,stylesToRender:r,activeStyle:n}=Ig({clientId:e,onSwitch:t});return!r||r.length===0?null:(0,Mg.jsx)(Mg.Fragment,{children:r.map(i=>{let s=i.label||i.name;return(0,Mg.jsx)(pT.MenuItem,{icon:n.name===i.name?gl:null,onClick:()=>o(i),children:(0,Mg.jsx)(pT.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:s})},i.name)})})}var $V=l(w(),1);function hT({hoveredBlock:e,onSwitch:t}){let{clientId:o}=e;return(0,$V.jsx)(mQ.MenuGroup,{label:(0,fQ.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,$V.jsx)(dQ,{clientId:o,onSwitch:t})})}var YV=l(N(),1),vQ=l(R(),1),gT=l(Z(),1);var Hs=l(A(),1);var gQ=l(R(),1),bQ=l($(),1);var pQ=l($(),1),KV=(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=KV(s,t,o);if(a)return a}}},hQ=(e,t)=>{let o=(0,pQ.getBlockAttributesNamesByRole)(e,"content");return o?.length?o.reduce((r,n)=>(t[n]&&(r[n]=t[n]),r),{}):t};var Q1e=(e,t)=>{let o=hQ(t.name,t.attributes);e.attributes={...e.attributes,...o}},J1e=(e,t)=>{let o=t.map(n=>(0,bQ.cloneBlock)(n)),r=new Set;for(let n of e){let i=!1;for(let s of o){let a=KV(s,n.name,r);if(a){i=!0,r.add(a.clientId),Q1e(a,n);break}}if(!i)return}return o},eBe=(e,t)=>(0,gQ.useMemo)(()=>e.reduce((o,r)=>{let n=J1e(t,r.blocks);return n&&o.push({...r,transformedBlocks:n}),o},[]),[e,t]),kQ=eBe;var gr=l(w(),1);function tBe({blocks:e,patterns:t,onSelect:o}){let[r,n]=(0,vQ.useState)(!1),i=kQ(t,e);return i.length?(0,gr.jsxs)(Hs.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[r&&(0,gr.jsx)(oBe,{patterns:i,onSelect:o}),(0,gr.jsx)(Hs.MenuItem,{onClick:s=>{s.preventDefault(),n(!r)},icon:Vo,children:(0,YV.__)("Patterns")})]}):null}function oBe({patterns:e,onSelect:t}){let o=(0,gT.useViewportMatch)("medium","<");return(0,gr.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,gr.jsx)(Hs.Popover,{className:"block-editor-block-switcher__popover-preview",placement:o?"bottom":"right-start",offset:16,children:(0,gr.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,gr.jsx)(rBe,{patterns:e,onSelect:t})})})})}function rBe({patterns:e,onSelect:t}){return(0,gr.jsx)(Hs.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,YV.__)("Patterns list"),children:e.map(o=>(0,gr.jsx)(yQ,{pattern:o,onSelect:t},o.name))})}function yQ({pattern:e,onSelect:t}){let o="block-editor-block-switcher__preview-patterns-container",r=(0,gT.useInstanceId)(yQ,`${o}-list__item-description`);return(0,gr.jsxs)("div",{className:`${o}-list__list-item`,children:[(0,gr.jsxs)(Hs.Composite.Item,{render:(0,gr.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,gr.jsx)(vn,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,gr.jsx)("div",{className:`${o}-list__item-title`,children:e.title})]}),!!e.description&&(0,gr.jsx)(Hs.VisuallyHidden,{id:r,children:e.description})]})}var SQ=tBe;var ri=l(w(),1);function nBe({onClose:e,clientIds:t}){let{replaceBlocks:o,multiSelect:r,updateBlockAttributes:n}=(0,bT.useDispatch)(_),{possibleBlockTransformations:i,patterns:s,blocks:a,isUsingBindings:c,canRemove:u,hasBlockStyles:d}=(0,bT.useSelect)(I=>{let{getBlockAttributes:P,getBlocksByClientId:E,getBlockRootClientId:L,getBlockTransformItems:T,__experimentalGetPatternTransformItems:O,canRemoveBlocks:D,getBlockName:U}=I(_),{getBlockStyles:G}=I(fd.store),j=L(t[0]),z=E(t),W=t.length===1,ee=W&&U(t[0]),se=W&&!!G(ee)?.length;return{blocks:z,possibleBlockTransformations:T(z,j),patterns:O(z,j),isUsingBindings:t.every(ce=>!!P(ce)?.metadata?.bindings),canRemove:D(t),hasBlockStyles:se}},[t]),f=sQ({clientIds:t,blocks:a});function m(I){I.length>1&&r(I[0].clientId,I[I.length-1].clientId)}function h(I){let P=(0,fd.switchToBlockType)(a,I);o(t,P),m(P)}function p(I){n(a[0].clientId,{...f.find(({name:P})=>P===I).attributes})}function g(I){o(t,I),m(I)}let b=a.length===1,v=b&&((0,fd.isTemplatePart)(a[0])||(0,fd.isReusableBlock)(a[0])),k=!!i?.length&&u&&!v,y=!!f?.length,S=!!s?.length&&u,x=k||y;if(!(d||x||S))return(0,ri.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,Aa.__)("No transforms.")});let B=b?(0,Aa._x)("This block is connected.","block toolbar button label and description"):(0,Aa._x)("These blocks are connected.","block toolbar button label and description");return(0,ri.jsxs)("div",{className:"block-editor-block-switcher__container",children:[S&&(0,ri.jsx)(SQ,{blocks:a,patterns:s,onSelect:I=>{g(I),e()}}),x&&(0,ri.jsx)(uQ,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,possibleBlockVariationTransformations:f,blocks:a,onSelect:I=>{h(I),e()},onSelectVariation:I=>{p(I),e()}}),d&&(0,ri.jsx)(hT,{hoveredBlock:a[0],onSwitch:e}),c&&(0,ri.jsx)(La.MenuGroup,{children:(0,ri.jsx)(La.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:B})})]})}var iBe=({children:e,clientIds:t,label:o,text:r})=>{let i=t.length===1?(0,Aa.__)("Change block type or style"):(0,Aa.sprintf)((0,Aa._n)("Change type of %d block","Change type of %d blocks",t.length),t.length);return(0,ri.jsx)(La.ToolbarGroup,{children:(0,ri.jsx)(La.ToolbarItem,{children:s=>(0,ri.jsx)(La.DropdownMenu,{className:"block-editor-block-switcher",label:o,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:e,text:r,toggleProps:{description:i,...s},menuProps:{orientation:"both"},children:({onClose:a})=>(0,ri.jsx)(nBe,{onClose:a,clientIds:t})})})})},_Q=iBe;var xQ=l(N(),1),Vg=l(A(),1);var Dg=l(w(),1);function wQ({clientIds:e,children:t,label:o,text:r}){return(0,Dg.jsx)(Vg.ToolbarGroup,{children:(0,Dg.jsx)(Vg.ToolbarItem,{children:n=>(0,Dg.jsx)(Vg.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,xQ.__)("Change block style"),...n},menuProps:{orientation:"both"},children:({onClose:i})=>(0,Dg.jsx)("div",{className:"block-editor-block-switcher__container",children:(0,Dg.jsx)(hT,{hoveredBlock:{clientId:e[0]},onSwitch:i})})})})})}var Fg=l(A(),1),IS=l(N(),1),kT=l(R(),1),CQ=l(F(),1);var rc=l(w(),1);function sBe({clientIds:e,blockTitle:t}){let o=(0,CQ.useSelect)(i=>{let{getBlockAttributes:s}=i(_);return s(e?.[0])?.metadata?.name},[e]),r=e.length===1,n;return r&&o?n=(0,IS.sprintf)((0,IS.__)('This %1$s is editable using the "%2$s" override.'),t.toLowerCase(),o):n=(0,IS.__)("These blocks are editable using overrides."),(0,rc.jsx)(Fg.__experimentalText,{children:n})}function BQ({icon:e,clientIds:t,blockTitle:o,label:r}){let[n,i]=(0,kT.useState)(!1),s=(0,kT.useRef)();return(0,rc.jsxs)(rc.Fragment,{children:[(0,rc.jsx)(Fg.ToolbarButton,{ref:s,className:"block-editor-block-toolbar__pattern-overrides-indicator",icon:e,label:r,onClick:()=>i(!n),"aria-expanded":n}),n&&(0,rc.jsx)(Fg.Popover,{anchor:s.current,onClose:()=>i(!1),placement:"bottom-start",offset:16,className:"block-editor-block-toolbar__pattern-overrides-popover",children:(0,rc.jsx)(sBe,{clientIds:t,blockTitle:o})})]})}var zg=l(w(),1);function aBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r,getBlockParentsByBlockName:n,canRemoveBlocks:i,getTemplateLock:s,getBlockEditingMode:a,canEditBlock:c}=M(e(_)),{getBlockStyles:u}=e(PS.store),d=t.some(P=>s(P)==="contentOnly"),f=t.length===1,m=f&&o(t[0]),h=f&&!!u(m)?.length,p=t.some(P=>!!r(P)?.metadata?.patternName),g=t.every(P=>Wk(r(P)?.metadata?.bindings)),b=t.every(P=>n(P,"core/block",!0).length>0),v=i(t),k=t.every(P=>c(P)),y=a(t[0]),S=y==="default",x=y==="contentOnly",B=!p&&S&&(h||v)&&!d&&k,I=g&&b;return B?"switcher":x&&h&&!g&&k?"styles-only":I?"pattern-overrides":"default"}function lBe({select:e,clientIds:t}){let{getBlockName:o,getBlockAttributes:r}=M(e(_)),n=t.length===1,i=t[0],s=r(i);if(n&&s?.metadata?.patternName)return Ei;let a=o(i),c=(0,PS.getBlockType)(a);if(n){let{getActiveBlockVariation:f}=e(PS.store);return f(a,s)?.icon||c?.icon}let u=t.map(f=>o(f));return new Set(u).size===1?c?.icon:Cf}function RQ({clientIds:e,isSynced:t}){let{icon:o,showIconLabels:r,variant:n}=(0,IQ.useSelect)(f=>({icon:lBe({select:f,clientIds:e}),showIconLabels:f(PQ.store).get("core","showIconLabels"),variant:aBe({select:f,clientIds:e})}),[e]),i=zr({clientId:e?.[0],maximumLength:35}),s=e.length===1,a=s&&t&&!r,c=s?i:(0,TQ.__)("Multiple blocks selected"),u=a&&i?i:void 0,d=(0,zg.jsx)(Ae,{className:"block-editor-block-toolbar__block-icon",icon:o});return n==="switcher"?(0,zg.jsx)(_Q,{clientIds:e,label:c,text:u,children:d}):n==="styles-only"?(0,zg.jsx)(wQ,{clientIds:e,label:c,text:u,children:d}):n==="pattern-overrides"?(0,zg.jsx)(BQ,{icon:d,clientIds:e,blockTitle:i,label:c}):(0,zg.jsx)(EQ.ToolbarButton,{disabled:!0,className:"block-editor-block-toolbar__block-icon-button",title:c,icon:d,text:u})}var Qe=l(w(),1);function ZV({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,variant:n="unstyled"}){let{blockClientId:i,blockClientIds:s,isDefaultEditingMode:a,blockType:c,toolbarKey:u,shouldShowVisualToolbar:d,showParentSelector:f,isUsingBindings:m,isSectionContainer:h,hasContentOnlyLocking:p,showShuffleButton:g,showSlots:b,showGroupButtons:v,showLockButtons:k,showBlockVisibilityButton:y,showSwitchSectionStyleButton:S,areSelectedBlocksHiddenOnViewport:x,canEdit:C}=(0,AQ.useSelect)(G=>{let{canEditBlock:j}=G(_),{getBlockName:z,getBlockMode:W,getBlockParents:ee,getSelectedBlockClientIds:se,isBlockValid:ce,getBlockEditingMode:ie,getBlockAttributes:re,getSettings:Q,getTemplateLock:Y,getParentSectionBlock:J,isZoomOut:K,isSectionBlock:H,isBlockHiddenAtViewport:X}=M(G(_)),ne=se(),le=ne[0],ve=ee(le),xe=J(le)??ve[ve.length-1],ze=z(xe),ot=(0,nc.getBlockType)(ze),Wt=ie(le),fo=Wt==="default",Do=z(le),rt=ne.every(je=>ce(je)),ar=ne.every(je=>W(je)==="visual"),xt=ne.every(je=>!!re(je)?.metadata?.bindings),At=ne.some(je=>Y(je)==="contentOnly"),Pe=K(),wt=H(le),qo=j(le),$t=qo&&(Pe||wt),lr=Q()?.[wi]?.toLowerCase()||"desktop",ln=ne.length>0&&ne.every(je=>X(je,lr));return{blockClientId:le,blockClientIds:ne,isDefaultEditingMode:fo,blockType:le&&(0,nc.getBlockType)(Do),shouldShowVisualToolbar:rt&&ar,toolbarKey:`${le}${xe}`,showParentSelector:!Pe&&ot&&Wt!=="contentOnly"&&ie(xe)!=="disabled"&&(0,nc.hasBlockSupport)(ot,"__experimentalParentSelector",!0)&&ne.length===1,isUsingBindings:xt,isSectionContainer:wt,hasContentOnlyLocking:At,showShuffleButton:Pe,showSlots:!Pe,showGroupButtons:!Pe,showLockButtons:!Pe,showBlockVisibilityButton:!Pe,showSwitchSectionStyleButton:$t,areSelectedBlocksHiddenOnViewport:ln,canEdit:qo}},[]),B=(0,qV.useRef)(null),I=(0,qV.useRef)(),P=kg({ref:I}),E=!(0,LQ.useViewportMatch)("medium","<");if(!qE())return null;let T=s.length>1,O=(0,nc.isReusableBlock)(c)||(0,nc.isTemplatePart)(c),D=V("block-editor-block-contextual-toolbar",{"has-parent":f}),U=V("block-editor-block-toolbar",{"is-synced":O,"is-connected":m});return(0,Qe.jsx)(Bg,{focusEditorOnEscape:!0,className:D,"aria-label":(0,OQ.__)("Block tools"),variant:n==="toolbar"?void 0:n,focusOnMount:t,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,children:(0,Qe.jsxs)("div",{ref:B,className:U,children:[f&&!T&&E&&(0,Qe.jsx)(nZ,{}),(d||T)&&(0,Qe.jsx)("div",{ref:I,...P,children:(0,Qe.jsxs)(NQ.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,Qe.jsx)(RQ,{clientIds:s,isSynced:O}),a&&y&&(0,Qe.jsx)(TD,{clientIds:s}),!T&&a&&k&&(0,Qe.jsx)(wV,{clientId:i}),(0,Qe.jsx)(kE,{clientIds:s,hideDragHandle:e})]})}),!x&&!p&&d&&T&&v&&(0,Qe.jsx)(vV,{}),!T&&C&&(0,Qe.jsx)(eQ,{clientId:s[0]}),!x&&g&&(0,Qe.jsx)(EX,{clientId:s[0]}),!x&&S&&(0,Qe.jsx)(QX,{clientId:s[0]}),!x&&d&&b&&(0,Qe.jsxs)(Qe.Fragment,{children:[!h&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Mt.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(Mt.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"})]}),(0,Qe.jsx)(Mt.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,Qe.jsx)(xE.Slot,{})]}),(0,Qe.jsx)(gX,{clientIds:s}),(0,Qe.jsx)(GE,{clientIds:s})]})},u)}function MQ({hideDragHandle:e,variant:t}){return(0,Qe.jsx)(ZV,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}var XV=l(w(),1);function FQ({clientId:e,isTyping:t,__unstableContentRef:o}){let{capturingClientId:r,isInsertionPointVisible:n,lastClientId:i}=cE(e),s=(0,jg.useRef)();(0,jg.useEffect)(()=>{s.current=void 0},[e]);let{stopTyping:a}=(0,DQ.useDispatch)(_),c=(0,jg.useRef)(!1);(0,VQ.useShortcut)("core/block-editor/focus-toolbar",()=>{c.current=!0,a(!0)}),(0,jg.useEffect)(()=>{c.current=!1});let u=r||e,d=lE({contentElement:o?.current,clientId:u});return!t&&(0,XV.jsx)(pm,{clientId:u,bottomClientId:i,className:V("block-editor-block-list__block-popover",{"is-insertion-point-visible":n}),resize:!1,...d,__unstableContentRef:o,children:(0,XV.jsx)(ZV,{focusOnMount:c.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:f=>{s.current=f},variant:"toolbar"})})}var vT=l(F(),1),yT=l(R(),1);var zQ=l(A(),1);var jQ=l(N(),1),UQ=l(w(),1);function cBe({onClick:e}){return(0,UQ.jsx)(zQ.Button,{variant:"primary",icon:Bi,size:"compact",className:V("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,jQ._x)("Add pattern","Generic label for pattern inserter button")})}var HQ=cBe;var QV=l(w(),1);function uBe(){let[e,t]=(0,yT.useState)(!1),{hasSelection:o,blockOrder:r,setInserterIsOpened:n,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:a,insertionPointVisible:c}=(0,vT.useSelect)(p=>{let{getSettings:g,getBlockOrder:b,getSelectionStart:v,getSelectedBlockClientId:k,getSectionRootClientId:y,getBlockInsertionPoint:S,isBlockInsertionPointVisible:x}=M(p(_)),C=y();return{hasSelection:!!v().clientId,blockOrder:b(C),sectionRootClientId:C,setInserterIsOpened:g().__experimentalSetIsInserterOpened,selectedBlockClientId:k(),blockInsertionPoint:S(),insertionPointVisible:x()}},[]),{showInsertionPoint:u}=M((0,vT.useDispatch)(_));if((0,yT.useEffect)(()=>{let p=setTimeout(()=>{t(!0)},500);return()=>{clearTimeout(p)}},[]),!e||!o)return null;let d=s,m=r.findIndex(p=>s===p)+1,h=r[m];return c&&a?.index===m?null:(0,QV.jsx)(MB,{previousClientId:d,nextClientId:h,children:(0,QV.jsx)(HQ,{onClick:()=>{n({rootClientId:i,insertionIndex:m,tab:"patterns",category:"all"}),u(i,m,{operation:"insert"})}})})}var GQ=uBe;var WQ=l(F(),1),$Q=l($(),1);function KQ(){return(0,WQ.useSelect)(e=>{let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getBlock:r,getBlockMode:n,getSettings:i,isTyping:s,isBlockInterfaceHidden:a}=M(e(_)),c=t()||o(),u=r(c),d=!!c&&!!u,f=d&&(0,$Q.isUnmodifiedDefaultBlock)(u,"content")&&n(c)!=="html",m=c&&!s()&&f,h=!a()&&!i().hasFixedToolbar&&!m&&d&&!f;return{showEmptyBlockSideInserter:m,showBlockToolbarPopover:h}},[])}var Yi=l(w(),1);function dBe(e){let{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:o,getSettings:r,isTyping:n,isDragging:i,isZoomOut:s,getViewportModalClientIds:a}=M(e(_));return{clientId:t()||o(),hasFixedToolbar:r().hasFixedToolbar,isTyping:n(),isZoomOutMode:s(),isDragging:i(),viewportModalClientIds:a()}}function RS({children:e,__unstableContentRef:t,...o}){let{clientId:r,hasFixedToolbar:n,isTyping:i,isZoomOutMode:s,isDragging:a,viewportModalClientIds:c}=(0,Ug.useSelect)(dBe,[]),u=(0,YQ.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:d,getSelectedBlockClientIds:f,getBlockRootClientId:m,getBlockEditingMode:h,getBlockName:p,isGroupable:g,getEditedContentOnlySection:b,canEditBlock:v}=M((0,Ug.useSelect)(_)),{getGroupingBlockName:k}=(0,Ug.useSelect)(Hg.store),{showEmptyBlockSideInserter:y,showBlockToolbarPopover:S}=KQ(),x=yg(),[C,B]=(0,ST.useState)(null),{canRename:I}=Pm(p(f()[0])),{duplicateBlocks:P,removeBlocks:E,replaceBlocks:L,insertAfterBlock:T,insertBeforeBlock:O,selectBlock:D,moveBlocksUp:U,moveBlocksDown:G,expandBlock:j,stopEditingContentOnlySection:z,showViewportModal:W,hideViewportModal:ee}=M((0,Ug.useDispatch)(_));function se(re){if(!re.defaultPrevented){if(u("core/block-editor/move-up",re)||u("core/block-editor/move-down",re)){let Q=f();if(Q.length){re.preventDefault();let Y=m(Q[0]);(u("core/block-editor/move-up",re)?"up":"down")==="up"?U(Q,Y):G(Q,Y);let K=Array.isArray(Q)?Q.length:1,H=(0,Gg.sprintf)((0,Gg._n)("%d block moved.","%d blocks moved.",Q.length),K);(0,t3.speak)(H)}}else if(u("core/block-editor/duplicate",re)){let Q=f();Q.length&&(re.preventDefault(),P(Q))}else if(u("core/block-editor/remove",re)){let Q=f();Q.length&&(re.preventDefault(),E(Q))}else if(u("core/block-editor/paste-styles",re)){let Q=f();if(Q.length){re.preventDefault();let Y=d(Q);x(Y)}}else if(u("core/block-editor/insert-after",re)){let Q=f();Q.length&&(re.preventDefault(),T(Q[Q.length-1]))}else if(u("core/block-editor/insert-before",re)){let Q=f();Q.length&&(re.preventDefault(),O(Q[0]))}else if(u("core/block-editor/unselect",re)){if(re.target.closest("[role=toolbar]"))return;let Q=f();Q.length>1&&(re.preventDefault(),D(Q[0]))}else if(u("core/block-editor/collapse-list-view",re)){if((0,JV.isTextField)(re.target)||(0,JV.isTextField)(re.target?.contentWindow?.document?.activeElement))return;re.preventDefault(),j(r)}else if(u("core/block-editor/group",re)){let Q=f();if(Q.length>1&&g(Q)){re.preventDefault();let Y=d(Q),J=k(),K=(0,Hg.switchToBlockType)(Y,J);L(Q,K),(0,t3.speak)((0,Gg.__)("Selected blocks are grouped."))}}else if(u("core/block-editor/rename",re)){let Q=f();if(Q.length===1){let Y=h(Q[0])==="contentOnly";I&&!Y&&v(Q[0])&&(re.preventDefault(),B(Q[0]))}}else if(u("core/block-editor/toggle-block-visibility",re)){let Q=f();if(Q.length){if(re.preventDefault(),!d(Q).every(K=>(0,Hg.hasBlockSupport)(K.name,"visibility",!0))||Q.some(K=>h(K)!=="default"||!v(K)))return;W(Q)}}u("core/block-editor/stop-editing-as-blocks",re)&&b()&&z()}}let ce=mm(t),ie=mm(t);return(0,Yi.jsxs)("div",{...o,onKeyDown:se,className:V(o.className,{"block-editor-block-tools--is-dragging":a}),children:[(0,Yi.jsxs)(fg.Provider,{value:(0,ST.useRef)(!1),children:[!i&&!s&&(0,Yi.jsx)(CY,{__unstableContentRef:t}),y&&(0,Yi.jsx)(jq,{__unstableContentRef:t,clientId:r}),S&&(0,Yi.jsx)(FQ,{__unstableContentRef:t,clientId:r,isTyping:i}),!s&&!n&&(0,Yi.jsx)(e3.Popover.Slot,{name:"block-toolbar",ref:ce}),e,(0,Yi.jsx)(e3.Popover.Slot,{name:"__unstable-block-tools-after",ref:ie}),s&&!a&&(0,Yi.jsx)(GQ,{__unstableContentRef:t})]}),C&&(0,Yi.jsx)(Tm,{clientId:C,onClose:()=>B(null)}),c&&(0,Yi.jsx)(wD,{clientIds:c,onClose:ee})]})}var qi=l(N(),1),Na=l($(),1),ic=l(F(),1),o3=l(ZQ(),1);var fBe=()=>function(){let{replaceBlocks:t,multiSelect:o}=(0,ic.useDispatch)(_),{blocks:r,clientIds:n,canRemove:i,possibleBlockTransformations:s,invalidSelection:a}=(0,ic.useSelect)(h=>{let{getBlockRootClientId:p,getBlockTransformItems:g,getSelectedBlockClientIds:b,getBlocksByClientId:v,canRemoveBlocks:k}=h(_),y=b(),S=v(y);if(S.filter(C=>!C).length>0)return{invalidSelection:!0};let x=p(y[0]);return{blocks:S,clientIds:y,possibleBlockTransformations:g(S,x),canRemove:k(y),invalidSelection:!1}},[]);if(a)return{isLoading:!1,commands:[]};let c=r.length===1&&(0,Na.isTemplatePart)(r[0]);function u(h){h.length>1&&o(h[0].clientId,h[h.length-1].clientId)}function d(h){let p=(0,Na.switchToBlockType)(r,h);t(n,p),u(p)}let f=!!s.length&&i&&!c;return!n||n.length<1||!f?{isLoading:!1,commands:[]}:{isLoading:!1,commands:s.map(h=>{let{name:p,title:g,icon:b}=h,v=!b?.src||b?.src==="block-default"?{src:Jk}:b;return{name:"core/block-editor/transform-to-"+p.replace("/","-"),label:(0,qi.sprintf)((0,qi.__)("Transform to %s"),g),icon:v?.src,category:"command",callback:({close:k})=>{d(p),k()}}})}},mBe=()=>function(){let{clientIds:t,isUngroupable:o,isGroupable:r}=(0,ic.useSelect)(O=>{let{getSelectedBlockClientIds:D,isUngroupable:U,isGroupable:G}=O(_);return{clientIds:D(),isUngroupable:U(),isGroupable:G()}},[]),{canInsertBlockType:n,getBlockRootClientId:i,getBlocksByClientId:s,canRemoveBlocks:a,isBlockHiddenAnywhere:c}=M((0,ic.useSelect)(_)),{getBlockEditingMode:u}=(0,ic.useSelect)(_),{getDefaultBlockName:d,getGroupingBlockName:f}=(0,ic.useSelect)(Na.store),m=s(t),h=(0,ic.useDispatch)(_),{removeBlocks:p,replaceBlocks:g,duplicateBlocks:b,insertAfterBlock:v,insertBeforeBlock:k}=h,y=()=>{if(!m.length)return;let O=f(),D=(0,Na.switchToBlockType)(m,O);D&&g(t,D)},S=()=>{if(!m.length)return;let O=m[0].innerBlocks;O.length&&g(t,O)};if(!t||t.length<1)return{isLoading:!1,commands:[]};let{showViewportModal:x}=M(h),C=i(t[0]),B=n(d(),C),I=m.every(O=>!!O&&(0,Na.hasBlockSupport)(O.name,"multiple",!0)&&n(O.name,C)),P=a(t),E=[];I&&E.push({name:"duplicate",label:(0,qi.__)("Duplicate"),callback:()=>b(t,!0),icon:Cf}),B&&E.push({name:"add-before",label:(0,qi.__)("Add before"),callback:()=>{let O=Array.isArray(t)?t[0]:O;k(O)},icon:Bi},{name:"add-after",label:(0,qi.__)("Add after"),callback:()=>{let O=Array.isArray(t)?t[t.length-1]:O;v(O)},icon:Bi}),r&&E.push({name:"Group",label:(0,qi.__)("Group"),callback:y,icon:nv}),o&&E.push({name:"ungroup",label:(0,qi.__)("Ungroup"),callback:S,icon:RN}),P&&E.push({name:"remove",label:(0,qi.__)("Delete"),callback:()=>p(t,!0),icon:IN});let L=m.every(O=>!!O&&(0,Na.hasBlockSupport)(O.name,"visibility",!0)),T=t.every(O=>u(O)==="default");if(L&&T){let O=t.some(D=>c(D));E.push({name:"toggle-visibility",label:O?(0,qi.__)("Show"):(0,qi.__)("Hide"),callback:()=>x(t),icon:O?Af:vs})}return{isLoading:!1,commands:E.map(O=>({...O,name:"core/block-editor/action-"+O.name,category:"command",callback:({close:D})=>{O.callback(),D()}}))}},_T=()=>{(0,o3.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:fBe()}),(0,o3.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:mBe(),context:"block-selection-edit"})};var Zr=l(w(),1),xT=(0,eJ.createSlotFill)(Symbol("BlockCanvasCover"));function XQ({children:e}){return(0,Zr.jsx)("div",{className:"block-canvas-cover",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:e})}var pBe={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function r3({shouldIframe:e=!0,height:t="300px",children:o=(0,Zr.jsx)(Gh,{}),styles:r,contentRef:n,iframeProps:i}){_T();let s=(0,wT.useViewportMatch)("medium","<"),a=rS(),c=hm(),u=(0,QQ.useRef)(),d=(0,wT.useMergeRefs)([n,c,u]),f=(0,JQ.useSelect)(h=>M(h(_)).getZoomLevel(),[]),m=f!==100&&!s?{scale:f,frameSize:"40px"}:{};return e?(0,Zr.jsx)(RS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:(0,Zr.jsxs)(Mh,{...i,...m,ref:a,contentRef:d,style:{...i?.style},name:"editor-canvas",children:[(0,Zr.jsx)(xT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,Zr.jsx)(XQ,{children:p},g))}),(0,Zr.jsx)(Nl,{styles:r}),o]})}):(0,Zr.jsxs)(RS,{__unstableContentRef:u,style:{height:t,display:"flex"},children:[(0,Zr.jsx)(xT.Slot,{fillProps:{containerRef:u},children:h=>h.map((p,g)=>(0,Zr.jsx)(XQ,{children:p},g))}),(0,Zr.jsx)(Nl,{styles:r,scope:":where(.editor-styles-wrapper)",transformOptions:pBe}),(0,Zr.jsx)(E1,{ref:d,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%",overflow:"auto"},children:o})]})}function hBe({children:e,height:t,styles:o}){return(0,Zr.jsx)(r3,{height:t,styles:o,children:e})}var tJ=hBe;var Ma=l(A(),1),oJ=l(N(),1),rJ=l(it(),1),nJ=l(Re(),1),Zi=l(w(),1),gBe=()=>(0,Zi.jsx)(Ma.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,Zi.jsx)(Ma.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})}),bBe=({style:e,className:t})=>(0,Zi.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,Zi.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,Zi.jsx)(gBe,{})})}),kBe=({TextColor:e,BackgroundColor:t})=>function({onToggle:r,isOpen:n}){let i=s=>{!n&&s.keyCode===rJ.DOWN&&(s.preventDefault(),r())};return(0,Zi.jsx)(Ma.ToolbarGroup,{children:(0,Zi.jsx)(Ma.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,oJ.__)("Open Colors Selector"),onClick:r,onKeyDown:i,icon:(0,Zi.jsx)(t,{children:(0,Zi.jsx)(e,{children:(0,Zi.jsx)(bBe,{})})})})})},vBe=({children:e,...t})=>((0,nJ.default)("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,Zi.jsx)(Ma.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:kBe(t),renderContent:()=>e})),iJ=vBe;var dee=l(Re(),1),jT=l(A(),1),c3=l(N(),1),fee=l(F(),1),mee=l(R(),1);var Xg=l(Z(),1),FT=l(A(),1),LS=l(F(),1),cee=l(Re(),1),vo=l(R(),1),l3=l(N(),1);var LT=l(A(),1),NT=l(R(),1),MT=l(F(),1);var aJ=l(Z(),1),lJ=l(Xo(),1),cJ=l(F(),1),IT=l(R(),1),Wg=l(N(),1);var CT=l(R(),1),BT=(0,CT.createContext)({});BT.displayName="ListViewContext";var md=()=>(0,CT.useContext)(BT);var ET=l(R(),1),sJ=l(w(),1);function TT({children:e,...t}){let o=(0,ET.useRef)();return(0,ET.useEffect)(()=>{o.current&&(o.current.textContent=o.current.textContent)},[e]),(0,sJ.jsx)("div",{hidden:!0,...t,ref:o,children:e})}var OS=l(w(),1),n3=(0,IT.forwardRef)(({nestingLevel:e,blockCount:t,clientId:o,...r},n)=>{let{insertedBlock:i,setInsertedBlock:s}=md(),a=(0,aJ.useInstanceId)(n3),{directInsert:c,hideInserter:u}=(0,cJ.useSelect)(p=>{let{getBlockListSettings:g,getTemplateLock:b,isZoomOut:v}=M(p(_)),y=g(o)?.directInsert||!1,S=!!b(o)||v();return{directInsert:y,hideInserter:S}},[o]),d=zr({clientId:o,context:"list-view"}),f=zr({clientId:i?.clientId,context:"list-view"});if((0,IT.useEffect)(()=>{f?.length&&(0,lJ.speak)((0,Wg.sprintf)((0,Wg.__)("%s block inserted"),f),"assertive")},[f]),u)return null;let m=`list-view-appender__${a}`,h=(0,Wg.sprintf)((0,Wg.__)("Append to %1$s block at position %2$d, Level %3$d"),d,t+1,e);return(0,OS.jsxs)("div",{className:"list-view-appender",children:[(0,OS.jsx)(Ui,{ref:n,rootClientId:o,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:c,__experimentalIsQuick:!0,...r,toggleProps:{"aria-describedby":m},onSelectOrClose:p=>{p?.clientId&&s(p)}}),(0,OS.jsx)(TT,{id:m,children:h})]})});var gd=l($(),1),Nm=l(A(),1),OT=l(Z(),1);var ko=l(R(),1),Kg=l(F(),1),s3=l(N(),1),AT=l(it(),1),LJ=l(Jy(),1),NJ=l(Is(),1),MJ=l(Xo(),1);var uJ=l(A(),1),dJ=l(Z(),1),fJ=l(R(),1);var mJ=l(w(),1),yBe=P7(uJ.__experimentalTreeGridRow),SBe=(0,fJ.forwardRef)(({isDragged:e,isSelected:t,position:o,level:r,rowCount:n,children:i,className:s,path:a,...c},u)=>{let d=YC({clientId:c["data-block"],enableAnimation:!0,triggerAnimationOnChange:a}),f=(0,dJ.useMergeRefs)([u,d]);return(0,mJ.jsx)(yBe,{ref:f,className:V("block-editor-list-view-leaf",s),level:r,positionInSet:o,setSize:n,isExpanded:void 0,...c,children:i})}),pJ=SBe;var hJ=l(Fe(),1),gJ=l(R(),1);function bJ({isSelected:e,selectedClientIds:t,rowItemRef:o}){let r=t.length===1;(0,gJ.useLayoutEffect)(()=>{if(!e||!r||!o.current)return;let n=(0,hJ.getScrollContainer)(o.current),{ownerDocument:i}=o.current;if(n===i.body||n===i.documentElement||!n)return;let a=o.current.getBoundingClientRect(),c=n.getBoundingClientRect();(a.top<c.top||a.bottom>c.bottom)&&o.current.scrollIntoView()},[e,r,o])}var BJ=l(R(),1);var pd=l(A(),1),xJ=l(R(),1);var RT=l(it(),1),wJ=l(F(),1);var kJ=l(N(),1),i3=l(w(),1);function PT({onClick:e}){return(0,i3.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,i3.jsx)(we,{icon:(0,kJ.isRTL)()?ev:tu})})}var vJ=l(R(),1),yJ=l(F(),1);var _Be=3,SJ={"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?SJ[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>=_Be)return t}return t}};function xBe(e,t){let o=SJ[e.name],r=o?o(e):void 0;return r?Array.isArray(r)?t?[]:r:[r]:[]}function _J({clientId:e,isExpanded:t}){let{block:o}=(0,yJ.useSelect)(n=>({block:n(_).getBlock(e)}),[e]);return(0,vJ.useMemo)(()=>xBe(o,t),[o,t])}var jo=l(w(),1),{Badge:wBe}=M(pd.privateApis);function CBe({className:e,block:{clientId:t},onClick:o,onContextMenu:r,onMouseDown:n,onToggleExpanded:i,tabIndex:s,onFocus:a,onDragStart:c,onDragEnd:u,draggable:d,isExpanded:f,ariaDescribedBy:m},h){let p=Tt(t),g=zr({clientId:t,context:"list-view"}),{isLocked:b}=ei(t),{hasPatternName:v,blockVisibility:k}=(0,wJ.useSelect)(P=>{let{getBlockAttributes:E}=M(P(_)),L=E(t);return{hasPatternName:!!L?.metadata?.patternName,blockVisibility:L?.metadata?.blockVisibility}},[t]),y=b,S=p?.positionType==="sticky",x=_J({clientId:t,isExpanded:f}),C=by(k),B=P=>{P.dataTransfer.clearData(),c?.(P)};function I(P){(P.keyCode===RT.ENTER||P.keyCode===RT.SPACE)&&o(P)}return(0,jo.jsxs)("a",{className:V("block-editor-list-view-block-select-button",e),onClick:o,onContextMenu:r,onKeyDown:I,onMouseDown:n,ref:h,tabIndex:s,onFocus:a,onDragStart:B,onDragEnd:u,draggable:d,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":f,children:[(0,jo.jsx)(PT,{onClick:i}),(0,jo.jsx)(Ae,{icon:v?Ei:p?.icon,showColors:!0,context:"list-view"}),(0,jo.jsxs)(pd.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,jo.jsx)(pd.__experimentalTruncate,{ellipsizeMode:"auto",children:g})}),p?.anchor&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,jo.jsx)(wBe,{className:"block-editor-list-view-block-select-button__anchor",children:p.anchor})}),S&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,jo.jsx)(we,{icon:NL})}),x.length?(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:x.map((P,E)=>(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${P.url})`,zIndex:x.length-E}},P.clientId))}):null,!!C&&(0,jo.jsx)(pd.Tooltip,{text:C,children:(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility","aria-hidden":"true",children:(0,jo.jsx)(we,{icon:vs})})}),y&&(0,jo.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,jo.jsx)(we,{icon:EL})})]})]})}var CJ=(0,xJ.forwardRef)(CBe);var hd=l(w(),1),BBe=(0,BJ.forwardRef)(({onClick:e,onToggleExpanded:t,block:o,isSelected:r,position:n,siblingBlockCount:i,level:s,isExpanded:a,selectedClientIds:c,...u},d)=>{let{clientId:f}=o,{AdditionalBlockContent:m,insertedBlock:h,setInsertedBlock:p}=md(),g=c.includes(f)?c:[f];return(0,hd.jsxs)(hd.Fragment,{children:[m&&(0,hd.jsx)(m,{block:o,insertedBlock:h,setInsertedBlock:p}),(0,hd.jsx)(fE,{appendToOwnerDocument:!0,clientIds:g,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:b,onDragStart:v,onDragEnd:k})=>(0,hd.jsx)(CJ,{ref:d,className:"block-editor-list-view-block-contents",block:o,onClick:e,onToggleExpanded:t,isSelected:r,position:n,siblingBlockCount:i,level:s,draggable:b,onDragStart:v,onDragEnd:k,isExpanded:a,...u})})]})}),EJ=BBe;var Lm=l(N(),1),TJ=l(Fe(),1),IJ=(e,t,o)=>(0,Lm.sprintf)((0,Lm.__)("Block %1$d of %2$d, Level %3$d."),e,t,o),PJ=(e,t)=>[e?.positionLabel?`${(0,Lm.sprintf)((0,Lm.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,Lm.__)("This block is locked."):void 0].filter(Boolean).join(" "),RJ=(e,t)=>Array.isArray(t)&&t.length?t.indexOf(e)!==-1:t===e;function OJ(e,t,o,r){let n=[...o,e],i=[...r,t],s=Math.min(n.length,i.length)-1,a=n[s],c=i[s];return{start:a,end:c}}function $g(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&&TJ.focus.focusable.find(r)?.[0]?.focus()})}function AJ({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:o,clientId:r,firstDraggedBlockIndex:n,isDragged:i}){let s,a,c;if(!i){a=!1;let u=e[r];c=u>n,t!=null&&n!==void 0?u!==void 0&&(u>=n&&u<t?s="up":u<n&&u>=t?s="down":s="normal",a=typeof t=="number"&&t-1===u&&o==="inside"):t===null&&n!==void 0?u!==void 0&&u>=n?s="up":s="normal":t!=null&&n===void 0?u!==void 0&&(u<t?s="normal":s="down"):t===null&&(s="normal")}return{displacement:s,isNesting:a,isAfterDraggedBlocks:c}}var er=l(w(),1);function DJ({block:{clientId:e},displacement:t,isAfterDraggedBlocks:o,isDragged:r,isNesting:n,isSelected:i,isBranchSelected:s,selectBlock:a,position:c,level:u,rowCount:d,siblingBlockCount:f,showBlockMovers:m,path:h,isExpanded:p,selectedClientIds:g,isSyncedBranch:b}){let v=(0,ko.useRef)(null),k=(0,ko.useRef)(null),y=(0,ko.useRef)(null),[S,x]=(0,ko.useState)(!1),[C,B]=(0,ko.useState)(),[I,P]=(0,ko.useState)(!1),{isLocked:E}=ei(e),L=i&&g[0]===e,T=i&&g[g.length-1]===e,{toggleBlockHighlight:O,duplicateBlocks:D,multiSelect:U,replaceBlocks:G,removeBlocks:j,insertAfterBlock:z,insertBeforeBlock:W,showViewportModal:ee}=M((0,Kg.useDispatch)(_)),se=(0,OT.useDebounce)(O,50),{canInsertBlockType:ce,getSelectedBlockClientIds:ie,getPreviousBlockClientId:re,getBlockRootClientId:Q,getBlockOrder:Y,getBlockParents:J,getBlockEditingMode:K,getBlocksByClientId:H,canEditBlock:X,canMoveBlock:ne,canRemoveBlocks:le,isGroupable:ve}=(0,Kg.useSelect)(_),{getGroupingBlockName:he}=(0,Kg.useSelect)(gd.store),xe=Tt(e),ze=yg(),{block:ot,blockName:Wt,allowRightClickOverrides:fo}=(0,Kg.useSelect)(ue=>{let{getBlock:to,getBlockName:ye,getSettings:Lt}=M(ue(_));return{block:to(e),blockName:ye(e),allowRightClickOverrides:Lt().allowRightClickOverrides}},[e]),{canRename:Do}=Pm(Wt),rt=(0,gd.hasBlockSupport)(Wt,"__experimentalToolbar",!0),xt=`list-view-block-select-button__description-${(0,OT.useInstanceId)(DJ)}`,{expand:At,collapse:Pe,collapseAll:wt,BlockSettingsMenu:qo,listViewInstanceId:$t,expandedState:lr,setInsertedBlock:ln,treeGridElementRef:je,rootClientId:Eo}=md(),Ze=(0,NJ.__unstableUseShortcutEventMatch)();function Ve(){let ue=ie(),to=ue.includes(e),ye=to?ue[0]:e,Lt=Q(ye);return{blocksToUpdate:to?ue:[e],firstBlockClientId:ye,firstBlockRootClientId:Lt,selectedBlockClientIds:ue}}async function gt(ue){if(ue.defaultPrevented||ue.target.closest("[role=dialog]"))return;let to=[AT.BACKSPACE,AT.DELETE].includes(ue.keyCode);if(Ze("core/block-editor/unselect",ue)&&g.length>0)ue.stopPropagation(),ue.preventDefault(),a(ue,void 0);else if(to||Ze("core/block-editor/remove",ue)){let{blocksToUpdate:ye,firstBlockClientId:Lt,firstBlockRootClientId:un,selectedBlockClientIds:_r}=Ve();if(!le(ye))return;let Wc=re(Lt)??un;j(ye,!1);let mO=_r.length>0&&ie().length===0;Wc||(Wc=Y()[0]),Ct(Wc,mO)}else if(Ze("core/block-editor/paste-styles",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve(),Lt=H(ye);ze(Lt)}else if(Ze("core/block-editor/duplicate",ue)){ue.preventDefault();let{blocksToUpdate:ye,firstBlockRootClientId:Lt}=Ve();if(H(ye).every(_r=>!!_r&&(0,gd.hasBlockSupport)(_r.name,"multiple",!0)&&ce(_r.name,Lt))){let _r=await D(ye,!1);_r?.length&&Ct(_r[0],!1)}}else if(Ze("core/block-editor/insert-before",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();await W(ye[0]);let Lt=ie();Ct(Lt[0],!1)}else if(Ze("core/block-editor/insert-after",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();await z(ye.at(-1));let Lt=ie();Ct(Lt[0],!1)}else if(Ze("core/block-editor/select-all",ue)){ue.preventDefault();let{firstBlockRootClientId:ye,selectedBlockClientIds:Lt}=Ve(),un=Y(ye);if(!un.length)return;if((0,LJ.isShallowEqual)(Lt,un)&&ye&&ye!==Eo){Ct(ye,!0);return}U(un[0],un[un.length-1],null)}else if(Ze("core/block-editor/collapse-list-view",ue)){ue.preventDefault();let{firstBlockClientId:ye}=Ve(),Lt=J(ye,!1);wt(),At(Lt)}else if(Ze("core/block-editor/group",ue)){let{blocksToUpdate:ye}=Ve();if(ye.length>1&&ve(ye)){ue.preventDefault();let Lt=H(ye),un=he(),_r=(0,gd.switchToBlockType)(Lt,un);G(ye,_r),(0,MJ.speak)((0,s3.__)("Selected blocks are grouped."));let Wc=ie();Ct(Wc[0],!1)}}else if(Ze("core/block-editor/toggle-block-visibility",ue)){ue.preventDefault();let{blocksToUpdate:ye}=Ve();if(!H(ye).every(_r=>(0,gd.hasBlockSupport)(_r.name,"visibility",!0))||ye.some(_r=>K(_r)!=="default"))return;ee(ye)}else if(Ze("core/block-editor/rename",ue)){let{blocksToUpdate:ye}=Ve(),Lt=K(ye[0])==="contentOnly";ye.length===1&&Do&&!Lt&&(ue.preventDefault(),P(!0))}}let To=(0,ko.useCallback)(()=>{x(!0),se(e,!0)},[e,x,se]),cr=(0,ko.useCallback)(()=>{x(!1),se(e,!1)},[e,x,se]),ge=(0,ko.useCallback)(ue=>{a(ue,e),ue.preventDefault()},[e,a]),Ct=(0,ko.useCallback)((ue,to)=>{to&&a(void 0,ue,null,null),$g(ue,je?.current)},[a,je]),Io=(0,ko.useCallback)(ue=>{ue.preventDefault(),ue.stopPropagation(),p===!0?Pe(e):p===!1&&At(e)},[e,At,Pe,p]),Ke=(0,ko.useCallback)(ue=>{let{ownerDocument:to}=y?.current||{};!to||!to.hasFocus()||rt&&fo&&(y.current?.click(),B(new window.DOMRect(ue.clientX,ue.clientY,0,0)),ue.preventDefault())},[fo,y,rt]),te=(0,ko.useCallback)(ue=>{fo&&ue.button===2&&ue.preventDefault()},[fo]),Le=(0,ko.useMemo)(()=>{let{ownerDocument:ue}=k?.current||{};if(!(!C||!ue))return{ownerDocument:ue,getBoundingClientRect(){return C}}},[C]),ct=(0,ko.useCallback)(()=>{B(void 0)},[B]);if(bJ({isSelected:i,rowItemRef:k,selectedClientIds:g}),!ot)return null;let Gc=IJ(c,f,u),ua=PJ(xe,E),Bp=by(ot?.attributes?.metadata?.blockVisibility),jk=f>0,hf=m&&jk,cn=V("block-editor-list-view-block__mover-cell",{"is-visible":S||i}),Ep=V("block-editor-list-view-block__menu-cell",{"is-visible":S||L}),Tp;hf?Tp=2:rt||(Tp=3);let s0=V({"is-selected":i,"is-first-selected":L,"is-last-selected":T,"is-branch-selected":s,"is-synced-branch":b,"is-dragging":r,"has-single-cell":!rt,"is-synced":xe?.isSynced,"is-draggable":ne,"is-displacement-normal":t==="normal","is-displacement-up":t==="up","is-displacement-down":t==="down","is-after-dragged-blocks":o,"is-nesting":n}),a0=g.includes(e)?g:[e],Uk=i&&g.length===1;return(0,er.jsxs)(pJ,{className:s0,isDragged:r,onKeyDown:gt,onMouseEnter:To,onMouseLeave:cr,onFocus:To,onBlur:cr,level:u,position:c,rowCount:d,path:h,id:`list-view-${$t}-block-${e}`,"data-block":e,"data-expanded":X?p:void 0,ref:k,children:[(0,er.jsx)(Nm.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Tp,ref:v,"aria-selected":!!i,children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,er.jsx)(EJ,{block:ot,onClick:ge,onContextMenu:Ke,onMouseDown:te,onToggleExpanded:Io,isSelected:i,position:c,siblingBlockCount:f,level:u,ref:ue,tabIndex:Uk?0:to,onFocus:ye,isExpanded:X?p:void 0,selectedClientIds:g,ariaDescribedBy:xt}),(0,er.jsx)(TT,{id:xt,children:[Gc,ua,Bp].filter(Boolean).join(" ")})]})}),hf&&(0,er.jsx)(er.Fragment,{children:(0,er.jsxs)(Nm.__experimentalTreeGridCell,{className:cn,withoutGridItem:!0,children:[(0,er.jsx)(Nm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsx)(gE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ye})}),(0,er.jsx)(Nm.__experimentalTreeGridItem,{children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsx)(bE,{orientation:"vertical",clientIds:[e],ref:ue,tabIndex:to,onFocus:ye})})]})}),rt&&qo&&(0,er.jsx)(Nm.__experimentalTreeGridCell,{className:Ep,"aria-selected":!!i,ref:y,children:({ref:ue,tabIndex:to,onFocus:ye})=>(0,er.jsx)(qo,{clientIds:a0,block:ot,icon:ks,label:(0,s3.__)("Options"),popoverProps:{anchor:Le},toggleProps:{ref:ue,className:"block-editor-list-view-block__menu",tabIndex:to,onClick:ct,onFocus:ye,size:"small"},disableOpenOnArrowDown:!0,expand:At,expandedState:lr,setInsertedBlock:ln,__experimentalSelectBlock:Ct})}),I&&(0,er.jsx)(Tm,{clientId:e,onClose:()=>P(!1)})]})}var VJ=(0,ko.memo)(DJ);var ni=l(w(),1);function FJ(e,t,o,r){return o?.includes(e.clientId)?0:t[e.clientId]??r?1+e.innerBlocks.reduce(EBe(t,o,r),0):1}var EBe=(e,t,o)=>(r,n)=>t?.includes(n.clientId)?r:(e[n.clientId]??o)&&n.innerBlocks.length>0?r+FJ(n,e,t,o):r+1,TBe=()=>{};function zJ(e){let{blocks:t,selectBlock:o=TBe,showBlockMovers:r,selectedClientIds:n,level:i=1,path:s="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:d,parentId:f,shouldShowInnerBlocks:m=!0,isSyncedBranch:h=!1,showAppender:p=!0}=e,g=Tt(f),b=h||!!g?.isSynced,v=(0,MT.useSelect)(O=>f?O(_).canEditBlock(f):!0,[f]),{blockDropPosition:k,blockDropTargetIndex:y,firstDraggedBlockIndex:S,blockIndexes:x,expandedState:C,draggedClientIds:B}=md(),I=(0,NT.useRef)();if(!v)return null;let P=p&&i===1,E=t.filter(Boolean),L=E.length,T=P?L+1:L;return I.current=c,(0,ni.jsxs)(ni.Fragment,{children:[E.map((O,D)=>{let{clientId:U,innerBlocks:G}=O;D>0&&(I.current+=FJ(E[D-1],C,B,d));let j=!!B?.includes(U),{displacement:z,isAfterDraggedBlocks:W,isNesting:ee}=AJ({blockIndexes:x,blockDropTargetIndex:y,blockDropPosition:k,clientId:U,firstDraggedBlockIndex:S,isDragged:j}),{itemInView:se}=u,ce=se(I.current),ie=D+1,re=s.length>0?`${s}_${ie}`:`${ie}`,Q=!!G?.length,Y=Q&&m?C[U]??d:void 0,J=RJ(U,n),K=a||J&&Q,H=j||ce||J&&U===n[0]||D===0||D===L-1;return(0,ni.jsxs)(MT.AsyncModeProvider,{value:!J,children:[H&&(0,ni.jsx)(VJ,{block:O,selectBlock:o,isSelected:J,isBranchSelected:K,isDragged:j,level:i,position:ie,rowCount:T,siblingBlockCount:L,showBlockMovers:r,path:re,isExpanded:j?!1:Y,listPosition:I.current,selectedClientIds:n,isSyncedBranch:b,displacement:z,isAfterDraggedBlocks:W,isNesting:ee}),!H&&(0,ni.jsx)("tr",{children:(0,ni.jsx)("td",{className:"block-editor-list-view-placeholder"})}),Q&&Y&&!j&&(0,ni.jsx)(zJ,{parentId:U,blocks:G,selectBlock:o,showBlockMovers:r,level:i+1,path:re,listPosition:I.current+1,fixedListWindow:u,isBranchSelected:K,selectedClientIds:n,isExpanded:d,isSyncedBranch:b})]},U)}),P&&(0,ni.jsx)(LT.__experimentalTreeGridRow,{level:i,setSize:T,positionInSet:T,isExpanded:!0,children:(0,ni.jsx)(LT.__experimentalTreeGridCell,{children:O=>(0,ni.jsx)(n3,{clientId:f,nestingLevel:i,blockCount:L,...O})})})]})}var jJ=(0,NT.memo)(zJ);var Yg=l(A(),1),DT=l(Fe(),1),sc=l(R(),1),a3=l(N(),1);var Xi=l(w(),1);function UJ({draggedBlockClientId:e,listViewRef:t,blockDropTarget:o}){let r=Tt(e),n=zr({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:a}=o||{},[c,u]=(0,sc.useMemo)(()=>{if(!t.current)return[];let k=i?t.current.querySelector(`[data-block="${i}"]`):void 0,y=s?t.current.querySelector(`[data-block="${s}"]`):void 0;return[k,y]},[t,i,s]),d=u||c,f=(0,a3.isRTL)(),m=(0,sc.useCallback)((k,y)=>{if(!d)return 0;let S=d.offsetWidth,x=(0,DT.getScrollContainer)(d,"horizontal"),C=d.ownerDocument,B=x===C.body||x===C.documentElement;if(x&&!B){let I=x.getBoundingClientRect(),P=(0,a3.isRTL)()?I.right-k.right:k.left-I.left,E=x.clientWidth;if(E<S+P&&(S=E-P),!f&&k.left+y<I.left)return S-=I.left-k.left,S;if(f&&k.right-y>I.right)return S-=k.right-I.right,S}return S-y},[f,d]),h=(0,sc.useMemo)(()=>{if(!d)return{};let k=d.getBoundingClientRect();return{width:m(k,0)}},[m,d]),p=(0,sc.useMemo)(()=>{if(!d)return{};let k=(0,DT.getScrollContainer)(d),y=d.ownerDocument,S=k===y.body||k===y.documentElement;if(k&&!S){let x=k.getBoundingClientRect(),C=d.getBoundingClientRect(),B=f?x.right-C.right:C.left-x.left;if(!f&&x.left>C.left)return{transform:`translateX( ${B}px )`};if(f&&x.right<C.right)return{transform:`translateX( ${B*-1}px )`}}return{}},[f,d]),g=(0,sc.useMemo)(()=>{if(!c)return 1;let k=parseInt(c.getAttribute("aria-level"),10);return k?k+1:1},[c]),b=(0,sc.useMemo)(()=>d?d.classList.contains("is-branch-selected"):!1,[d]),v=(0,sc.useMemo)(()=>{if(!(!d||!(a==="top"||a==="bottom"||a==="inside")))return{contextElement:d,getBoundingClientRect(){let y=d.getBoundingClientRect(),S=y.left,x=0,C=(0,DT.getScrollContainer)(d,"horizontal"),B=d.ownerDocument,I=C===B.body||C===B.documentElement;if(C&&!I){let L=C.getBoundingClientRect(),T=f?C.offsetWidth-C.clientWidth:0;S<L.left+T&&(S=L.left+T)}a==="top"?x=y.top-y.height*2:x=y.top;let P=m(y,0),E=y.height;return new window.DOMRect(S,x,P,E)}}},[d,a,m,f]);return d?(0,Xi.jsx)(Yg.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,Xi.jsx)("div",{style:h,className:V("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":b}),children:(0,Xi.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":g,children:[(0,Xi.jsxs)("div",{className:V("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:p,children:[(0,Xi.jsx)(PT,{onClick:()=>{}}),(0,Xi.jsx)(Ae,{icon:r?.icon,showColors:!0,context:"list-view"}),(0,Xi.jsx)(Yg.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,Xi.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,Xi.jsx)(Yg.__experimentalTruncate,{ellipsizeMode:"auto",children:n})})})]}),(0,Xi.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}var HJ=l(Xo(),1),qg=l(N(),1),AS=l(F(),1),GJ=l(R(),1),ii=l(it(),1),WJ=l($(),1);function $J(){let{clearSelectedBlock:e,multiSelect:t,selectBlock:o}=(0,AS.useDispatch)(_),{getBlockName:r,getBlockParents:n,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:a,hasSelectedBlock:c}=(0,AS.useSelect)(_),{getBlockType:u}=(0,AS.useSelect)(WJ.store);return{updateBlockSelection:(0,GJ.useCallback)(async(f,m,h,p)=>{if(!f?.shiftKey&&f?.keyCode!==ii.ESCAPE){o(m,p);return}f.preventDefault();let g=f.type==="keydown"&&f.keyCode===ii.ESCAPE,b=f.type==="keydown"&&(f.keyCode===ii.UP||f.keyCode===ii.DOWN||f.keyCode===ii.HOME||f.keyCode===ii.END);if(!b&&!c()&&!a()){o(m,null);return}let v=s(),k=[...n(m),m];if((g||b&&!v.some(C=>k.includes(C)))&&await e(),!g){let C=i(),B=m;b&&(!c()&&!a()&&(C=m),h&&(B=h));let I=n(C),P=n(B),{start:E,end:L}=OJ(C,B,I,P);await t(E,L,null)}let y=s();if((f.keyCode===ii.HOME||f.keyCode===ii.END)&&y.length>1)return;let S=v.filter(C=>!y.includes(C)),x;if(S.length===1){let C=u(r(S[0]))?.title;C&&(x=(0,qg.sprintf)((0,qg.__)("%s deselected."),C))}else S.length>1&&(x=(0,qg.sprintf)((0,qg.__)("%s blocks deselected."),S.length));x&&(0,HJ.speak)(x,"assertive")},[e,r,u,n,i,s,a,c,t,o])}}var KJ=l(R(),1);function YJ(e){return(0,KJ.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 qJ=l(F(),1);function ZJ({blocks:e,rootClientId:t}){return(0,qJ.useSelect)(o=>{let{getDraggedBlockClientIds:r,getSelectedBlockClientIds:n,getEnabledClientIdsTree:i}=M(o(_));return{selectedClientIds:n(),draggedClientIds:r(),clientIdsTree:e??i(t)}},[e,t])}var XJ=l(R(),1),QJ=l(F(),1);function JJ({collapseAll:e,expand:t}){let{expandedBlock:o,getBlockParents:r}=(0,QJ.useSelect)(n=>{let{getBlockParents:i,getExpandedBlock:s}=M(n(_));return{expandedBlock:s(),getBlockParents:i}},[]);(0,XJ.useEffect)(()=>{if(o){let n=r(o,!1);e(),t(n)}},[e,t,o,r])}var eee=l(F(),1),Mm=l(R(),1),Dm=l(Z(),1),tee=l(N(),1);var ac=24;function IBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac;return r?e.x>n:e.x<n}function PBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac,i=r?n-e.x:e.x-n,s=Math.round(i/ac);return Math.abs(s)}function RBe(e,t){let o=[],r=e;for(;r;)o.push({...r}),r=t.find(n=>n.clientId===r.rootClientId);return o}function oee(e,t){let o=e[t+1];return o&&o.isDraggedBlock?oee(e,t+1):o}function OBe(e,t,o=1,r=!1){let n=r?t.right-o*ac:t.left+o*ac;return(r?e.x<n-ac:e.x>n+ac)&&e.y<t.bottom}var ABe=["top","bottom"];function LBe(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]=bm(t,h,ABe),b=GB(t,h);if(i===void 0||p<i||b){i=p;let v=e.indexOf(m),k=e[v-1];if(g==="top"&&k&&k.rootClientId===m.rootClientId&&!k.isDraggedBlock?(n=k,r="bottom",s=k.element.getBoundingClientRect(),a=v-1):(n=m,r=g,s=h,a=v),b)break}}if(!n)return;let c=RBe(n,e),u=r==="bottom";if(u&&n.canInsertDraggedBlocksAsChild&&(n.innerBlockCount>0&&n.isExpanded||OBe(t,s,c.length,o))){let f=n.isExpanded?0:n.innerBlockCount||0;return{rootClientId:n.clientId,clientId:n.clientId,blockIndex:f,dropPosition:"inside"}}if(u&&n.rootClientId&&IBe(t,s,c.length,o)){let f=oee(e,a),m=n.nestingLevel,h=f?f.nestingLevel:1;if(m&&h){let p=PBe(t,s,c.length,o),g=Math.max(Math.min(p,m-h),0);if(c[g]){let b=n.blockIndex;if(c[g].nestingLevel===f?.nestingLevel)b=f?.blockIndex;else for(let v=a;v>=0;v--){let k=e[v];if(k.rootClientId===c[g].rootClientId){b=k.blockIndex+1;break}}return{rootClientId:c[g].rootClientId,clientId:n.clientId,blockIndex:b,dropPosition:r}}}}if(!n.canInsertDraggedBlocksAsSibling)return;let d=u?1:0;return{rootClientId:n.rootClientId,clientId:n.clientId,blockIndex:n.blockIndex+d,dropPosition:r}}var NBe={leading:!1,trailing:!0};function ree({dropZoneElement:e,expandedState:t,setExpandedState:o}){let{getBlockRootClientId:r,getBlockIndex:n,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:a}=(0,eee.useSelect)(_),[c,u]=(0,Mm.useState)(),{rootClientId:d,blockIndex:f}=c||{},m=HB(d,f),h=(0,tee.isRTL)(),p=(0,Dm.usePrevious)(d),g=(0,Mm.useCallback)((S,x)=>{let{rootClientId:C}=x||{};C&&x?.dropPosition==="inside"&&!S[C]&&o({type:"expand",clientIds:[C]})},[o]),b=(0,Dm.useThrottle)(g,500,NBe);(0,Mm.useEffect)(()=>{if(c?.dropPosition!=="inside"||p!==c?.rootClientId){b.cancel();return}b(t,c)},[t,p,c,b]);let v=s(),k=(0,Dm.useThrottle)((0,Mm.useCallback)((S,x)=>{let C={x:S.clientX,y:S.clientY},B=!!v?.length,P=Array.from(x.querySelectorAll("[data-block]")).map(L=>{let T=L.dataset.block,O=L.dataset.expanded==="true",D=L.classList.contains("is-dragging"),U=parseInt(L.getAttribute("aria-level"),10),G=r(T);return{clientId:T,isExpanded:O,rootClientId:G,blockIndex:n(T),element:L,nestingLevel:U||void 0,isDraggedBlock:B?D:!1,innerBlockCount:i(T),canInsertDraggedBlocksAsSibling:B?a(v,G):!0,canInsertDraggedBlocksAsChild:B?a(v,T):!0}}),E=LBe(P,C,h);E&&u(E)},[a,v,i,n,r,h]),50);return{ref:(0,Dm.__experimentalUseDropZone)({dropZoneElement:e,onDrop(S){k.cancel(),c&&m(S),u(void 0)},onDragLeave(){k.cancel(),u(null)},onDragOver(S){k(S,S.currentTarget)},onDragEnd(){k.cancel(),u(void 0)}}),target:c}}var VT=l(R(),1),nee=l(F(),1);function iee({firstSelectedBlockClientId:e,setExpandedState:t}){let[o,r]=(0,VT.useState)(null),{selectedBlockParentClientIds:n}=(0,nee.useSelect)(i=>{let{getBlockParents:s}=i(_);return{selectedBlockParentClientIds:s(e,!1)}},[e]);return(0,VT.useEffect)(()=>{o!==e&&n?.length&&t({type:"expand",clientIds:n})},[e,n,o,t]),{setSelectedTreeId:r}}var Zg=l(F(),1),see=l(Z(),1);function aee({selectBlock:e}){let t=(0,Zg.useRegistry)(),{getBlockOrder:o,getBlockRootClientId:r,getBlocksByClientId:n,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:a,canInsertBlockType:c,canRemoveBlocks:u}=(0,Zg.useSelect)(_),{flashBlock:d,removeBlocks:f,replaceBlocks:m,insertBlocks:h}=(0,Zg.useDispatch)(_),p=Oh();return(0,see.useRefEffect)(g=>{function b(y,S){S&&e(void 0,y,null,null),$g(y,g)}function v(y){let S=s(),x=S.includes(y),C=x?S[0]:y,B=r(C);return{blocksToUpdate:x?S:[y],firstBlockClientId:C,firstBlockRootClientId:B,originallySelectedBlockClientIds:S}}function k(y){if(y.defaultPrevented||!g.contains(y.target.ownerDocument.activeElement))return;let x=y.target.ownerDocument.activeElement?.closest("[role=row]")?.dataset?.block;if(!x)return;let{blocksToUpdate:C,firstBlockClientId:B,firstBlockRootClientId:I,originallySelectedBlockClientIds:P}=v(x);if(C.length!==0){if(y.preventDefault(),y.type==="copy"||y.type==="cut"){C.length===1&&d(C[0]),p(y.type,C);let E=n(C);C1(y,E,t)}if(y.type==="cut"){if(!u(C))return;let E=i(B)??I;f(C,!1);let L=P.length>0&&s().length===0;E||(E=o()[0]),b(E,L)}else if(y.type==="paste"){let{__experimentalCanUserUseUnfilteredHTML:E}=a(),L=vG(y,E);if(C.length===1){let[T]=C;if(L.every(O=>c(O.name,T))){h(L,void 0,T),b(L[0]?.clientId,!1);return}}m(C,L,L.length-1,-1),b(L[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",k),g.ownerDocument.addEventListener("cut",k),g.ownerDocument.addEventListener("paste",k),()=>{g.ownerDocument.removeEventListener("copy",k),g.ownerDocument.removeEventListener("cut",k),g.ownerDocument.removeEventListener("paste",k)}},[])}var lc=l(w(),1),MBe=(e,t)=>t.type==="clear"?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce((o,r)=>({...o,[r]:t.type==="expand"}),{})}:e,lee=32;function uee({id:e,blocks:t,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:n=!1,showAppender:i=!1,blockSettingsMenu:s=IV,rootClientId:a,description:c,onSelect:u,additionalBlockContent:d},f){t&&(0,cee.default)("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});let m=(0,Xg.useInstanceId)(uee),{clientIdsTree:h,draggedClientIds:p,selectedClientIds:g}=ZJ({blocks:t,rootClientId:a}),b=YJ(h),{getBlock:v,getSelectedBlockClientIds:k}=(0,LS.useSelect)(_),{visibleBlockCount:y}=(0,LS.useSelect)(X=>{let{getGlobalBlockCount:ne,getClientIdsOfDescendants:le}=X(_),ve=p?.length>0?le(p).length+1:0;return{visibleBlockCount:ne()-ve}},[p]),{updateBlockSelection:S}=$J(),[x,C]=(0,vo.useReducer)(MBe,{}),[B,I]=(0,vo.useState)(null),{setSelectedTreeId:P}=iee({firstSelectedBlockClientId:g[0],setExpandedState:C}),E=(0,vo.useCallback)((X,ne,le)=>{S(X,ne,null,le),P(ne),u&&u(v(ne))},[P,S,u,v]),{ref:L,target:T}=ree({dropZoneElement:o,expandedState:x,setExpandedState:C}),O=(0,vo.useRef)(),D=aee({selectBlock:E}),U=(0,vo.useCallback)(X=>{let[ne]=k();ne&&X&&$g(ne,X)},[k]),G=(0,Xg.useMergeRefs)([D,U,O,L,f]),j=(0,vo.useCallback)(X=>{if(!X)return;let ne=Array.isArray(X)?X:[X];C({type:"expand",clientIds:ne})},[C]),z=(0,vo.useCallback)(X=>{X&&C({type:"collapse",clientIds:[X]})},[C]),W=(0,vo.useCallback)(()=>{C({type:"clear"})},[C]),ee=(0,vo.useCallback)(X=>{j(X?.dataset?.block)},[j]),se=(0,vo.useCallback)(X=>{z(X?.dataset?.block)},[z]),ce=(0,vo.useCallback)((X,ne,le)=>{X.shiftKey&&S(X,ne?.dataset?.block,le?.dataset?.block)},[S]);JJ({collapseAll:W,expand:j});let ie=p?.[0],{blockDropTargetIndex:re,blockDropPosition:Q,firstDraggedBlockIndex:Y}=(0,vo.useMemo)(()=>{let X,ne;if(T?.clientId){let le=b[T.clientId];X=le===void 0||T?.dropPosition==="top"?le:le+1}else T===null&&(X=null);if(ie){let le=b[ie];ne=le===void 0||T?.dropPosition==="top"?le:le+1}return{blockDropTargetIndex:X,blockDropPosition:T?.dropPosition,firstDraggedBlockIndex:ne}},[T,b,ie]),J=(0,vo.useMemo)(()=>({blockDropPosition:Q,blockDropTargetIndex:re,blockIndexes:b,draggedClientIds:p,expandedState:x,expand:j,firstDraggedBlockIndex:Y,collapse:z,collapseAll:W,BlockSettingsMenu:s,listViewInstanceId:m,AdditionalBlockContent:d,insertedBlock:B,setInsertedBlock:I,treeGridElementRef:O,rootClientId:a}),[Q,re,b,p,x,j,Y,z,W,s,m,d,B,I,a]),[K]=(0,Xg.__experimentalUseFixedWindowList)(O,lee,y,{expandedState:x,useWindowing:!0,windowOverscan:40});if(!h.length&&!i)return null;let H=c&&`block-editor-list-view-description-${m}`;return(0,lc.jsxs)(LS.AsyncModeProvider,{value:!0,children:[(0,lc.jsx)(UJ,{draggedBlockClientId:ie,listViewRef:O,blockDropTarget:T}),c&&(0,lc.jsx)(FT.VisuallyHidden,{id:H,children:c}),(0,lc.jsx)(FT.__experimentalTreeGrid,{id:e,className:V("block-editor-list-view-tree",{"is-dragging":p?.length>0&&re!==void 0}),"aria-label":(0,l3.__)("Block navigation structure"),ref:G,onCollapseRow:se,onExpandRow:ee,onFocusRow:ce,applicationAriaLabel:(0,l3.__)("Block navigation structure"),"aria-describedby":H,style:{"--wp-admin--list-view-dragged-items-height":p?.length?`${lee*(p.length-1)}px`:null},children:(0,lc.jsx)(BT.Provider,{value:J,children:(0,lc.jsx)(jJ,{blocks:h,parentId:a,selectBlock:E,showBlockMovers:r,fixedListWindow:K,selectedClientIds:g,isExpanded:n,showAppender:i})})})]})}var NS=(0,vo.forwardRef)(uee),zT=(0,vo.forwardRef)((e,t)=>(0,lc.jsx)(NS,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0}));var bd=l(w(),1);function DBe({isEnabled:e,onToggle:t,isOpen:o,innerRef:r,...n}){return(0,bd.jsx)(jT.Button,{__next40pxDefaultSize:!0,...n,ref:r,icon:sv,"aria-expanded":o,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,c3.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}function VBe({isDisabled:e,...t},o){(0,dee.default)("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});let n=(0,fee.useSelect)(i=>!!i(_).getBlockCount(),[])&&!e;return(0,bd.jsx)(jT.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:i,onToggle:s})=>(0,bd.jsx)(DBe,{...t,innerRef:o,isOpen:i,onToggle:s,isEnabled:n}),renderContent:()=>(0,bd.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,bd.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,c3.__)("List view")}),(0,bd.jsx)(zT,{})]})})}var pee=(0,mee.forwardRef)(VBe);var vee=l(R(),1),yee=l(F(),1),UT=l(Z(),1),Da=l(A(),1),u3=l(N(),1);var hee=l(R(),1);var gee=l(w(),1);function bee({genericPreviewBlock:e,style:t,className:o,activeStyle:r}){let n=Tg(o,r,t),i=(0,hee.useMemo)(()=>({name:e.name,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:n+" block-editor-block-styles__block-preview-container"},example:e}),[e,t,n]);return(0,gee.jsx)(X1,{item:i})}var Gs=l(w(),1),kee=()=>{};function FBe({clientId:e,onSwitch:t=kee,onHoverClassName:o=kee}){let r=(0,yee.useSelect)(y=>y(_).canEditBlock(e),[e]),{onSelect:n,stylesToRender:i,activeStyle:s,genericPreviewBlock:a,className:c}=Ig({clientId:e,onSwitch:t}),[u,d]=(0,vee.useState)(null),f=(0,UT.useViewportMatch)("medium","<"),m=Ro();if(!r||!i||i.length===0)return null;let h=(0,UT.debounce)(d,250),p=y=>{n(y),o(null),d(null),h.cancel()},g=y=>{if(u===y){h.cancel();return}h(y),o(y?.name??null)},b=QE(i),v=()=>s?.name!==b?.name,k=()=>{p(b)};return(0,Gs.jsx)(Da.__experimentalToolsPanel,{label:(0,u3.__)("Styles"),resetAll:k,panelId:e,hasInnerWrapper:!0,dropdownMenuProps:m,children:(0,Gs.jsx)(Da.__experimentalToolsPanelItem,{hasValue:v,label:(0,u3.__)("Variation"),onDeselect:k,isShownByDefault:!0,panelId:e,children:(0,Gs.jsxs)("div",{className:"block-editor-block-styles",children:[(0,Gs.jsx)("div",{className:"block-editor-block-styles__variants",children:i.map(y=>{let S=y.label||y.name;return(0,Gs.jsx)(Da.Button,{__next40pxDefaultSize:!0,className:V("block-editor-block-styles__item",{"is-active":s.name===y.name}),variant:"secondary",label:S,onMouseEnter:()=>g(y),onFocus:()=>g(y),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>p(y),"aria-current":s.name===y.name,children:(0,Gs.jsx)(Da.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:S})},y.name)})}),u&&!f&&(0,Gs.jsx)(Da.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,Gs.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null),children:(0,Gs.jsx)(bee,{activeStyle:s,className:c,genericPreviewBlock:a,style:u})})})]})})})}var Qg=FBe;var Cee=l(A(),1),Jg=l(N(),1);var _ee=l(A(),1),xee=l(w(),1),See={0:OL,1:jA,2:HA,3:WA,4:KA,5:qA,6:XA};function d3({level:e}){return See[e]?(0,xee.jsx)(_ee.Icon,{icon:See[e]}):null}var HT=l(w(),1),wee=[1,2,3,4,5,6],zBe={className:"block-library-heading-level-dropdown"};function Bee({options:e=wee,value:t,onChange:o}){let r=e.filter(n=>n===0||wee.includes(n)).sort((n,i)=>n-i);return(0,HT.jsx)(Cee.ToolbarDropdownMenu,{popoverProps:zBe,icon:(0,HT.jsx)(d3,{level:t}),label:(0,Jg.__)("Change level"),controls:r.map(n=>{let i=n===t;return{icon:(0,HT.jsx)(d3,{level:n}),title:n===0?(0,Jg.__)("Paragraph"):(0,Jg.sprintf)((0,Jg.__)("Heading %d"),n),isActive:i,onClick(){o(n)},role:"menuitemradio"}})})}var MS=l(N(),1),DS=l(A(),1);var cc=l(w(),1);function jBe({icon:e=yL,label:t=(0,MS.__)("Choose variation"),instructions:o=(0,MS.__)("Select a variation to start with:"),variations:r,onSelect:n,allowSkip:i}){let s=V("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,cc.jsxs)(DS.Placeholder,{icon:e,label:t,instructions:o,className:s,children:[(0,cc.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,MS.__)("Block variations"),children:r.map(a=>(0,cc.jsxs)("li",{children:[(0,cc.jsx)(DS.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,cc.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:a.title})]},a.name))}),i&&(0,cc.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,cc.jsx)(DS.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>n(),children:(0,MS.__)("Skip")})})]})}var Eee=jBe;var Ree=l(F(),1),Oee=l($(),1),tb=l(A(),1),f3=l(R(),1),m3=l(Z(),1),Aee=l(N(),1);var uc=l(N(),1),eb=l(A(),1);var kd={carousel:"carousel",grid:"grid"};var si=l(w(),1),UBe=({onBlockPatternSelect:e})=>(0,si.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,si.jsx)(eb.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,uc.__)("Choose")})}),HBe=({handlePrevious:e,handleNext:t,activeSlide:o,totalSlides:r})=>(0,si.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,si.jsx)(eb.Button,{size:"compact",icon:(0,uc.isRTL)()?Vo:Mr,label:(0,uc.__)("Previous pattern"),onClick:e,disabled:o===0,accessibleWhenDisabled:!0}),(0,si.jsx)(eb.Button,{size:"compact",icon:(0,uc.isRTL)()?Mr:Vo,label:(0,uc.__)("Next pattern"),onClick:t,disabled:o===r-1,accessibleWhenDisabled:!0})]}),GBe=({viewMode:e,setViewMode:t,handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i,onBlockPatternSelect:s})=>{let a=e===kd.carousel,c=(0,si.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,si.jsx)(eb.Button,{size:"compact",icon:_v,label:(0,uc.__)("Carousel view"),onClick:()=>t(kd.carousel),isPressed:a}),(0,si.jsx)(eb.Button,{size:"compact",icon:rv,label:(0,uc.__)("Grid view"),onClick:()=>t(kd.grid),isPressed:e===kd.grid})]});return(0,si.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[a&&(0,si.jsx)(HBe,{handlePrevious:o,handleNext:r,activeSlide:n,totalSlides:i}),c,a&&(0,si.jsx)(UBe,{onBlockPatternSelect:s})]})},Tee=GBe;var Iee=l(F(),1);function WBe(e,t,o){return(0,Iee.useSelect)(r=>{let{getBlockRootClientId:n,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=r(_),a=n(e);return o?s(a).filter(o):i(t,a)},[e,t,o])}var Pee=WBe;var zt=l(w(),1),$Be=({viewMode:e,activeSlide:t,patterns:o,onBlockPatternSelect:r,showTitles:n})=>{let i="block-editor-block-pattern-setup__container";if(e===kd.carousel){let s=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,zt.jsx)("div",{className:i,children:(0,zt.jsx)("div",{className:"carousel-container",children:o.map((a,c)=>(0,zt.jsx)(Nee,{active:c===t,className:s.get(c)||"",pattern:a},a.name))})})})}return(0,zt.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,zt.jsx)(tb.Composite,{role:"listbox",className:i,"aria-label":(0,Aee.__)("Patterns list"),children:o.map(s=>(0,zt.jsx)(Lee,{pattern:s,onSelect:r,showTitles:n},s.name))})})};function Lee({pattern:e,onSelect:t,showTitles:o}){let r="block-editor-block-pattern-setup-list",{blocks:n,description:i,viewportWidth:s=700}=e,a=(0,m3.useInstanceId)(Lee,`${r}__item-description`);return(0,zt.jsx)("div",{className:`${r}__list-item`,children:(0,zt.jsxs)(tb.Composite.Item,{render:(0,zt.jsx)("div",{"aria-describedby":i?a:void 0,"aria-label":e.title,className:`${r}__item`}),id:`${r}__pattern__${e.name}`,role:"option",onClick:()=>t(n),children:[(0,zt.jsx)(vn,{blocks:n,viewportWidth:s}),o&&(0,zt.jsx)("div",{className:`${r}__item-title`,children:e.title}),!!i&&(0,zt.jsx)(tb.VisuallyHidden,{id:a,children:i})]})})}function Nee({active:e,className:t,pattern:o,minHeight:r}){let{blocks:n,title:i,description:s}=o,a=(0,m3.useInstanceId)(Nee,"block-editor-block-pattern-setup-list__item-description");return(0,zt.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?a:void 0,children:[(0,zt.jsx)(vn,{blocks:n,minHeight:r}),!!s&&(0,zt.jsx)(tb.VisuallyHidden,{id:a,children:s})]})}var KBe=({clientId:e,blockName:t,filterPatternsFn:o,onBlockPatternSelect:r,initialViewMode:n=kd.carousel,showTitles:i=!1})=>{let[s,a]=(0,f3.useState)(n),[c,u]=(0,f3.useState)(0),{replaceBlock:d}=(0,Ree.useDispatch)(_),f=Pee(e,t,o);if(!f?.length)return null;let h=r||(p=>{let g=p.map(b=>(0,Oee.cloneBlock)(b));d(e,g)});return(0,zt.jsx)(zt.Fragment,{children:(0,zt.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,zt.jsx)($Be,{viewMode:s,activeSlide:c,patterns:f,onBlockPatternSelect:h,showTitles:i}),(0,zt.jsx)(Tee,{viewMode:s,setViewMode:a,activeSlide:c,totalSlides:f.length,handleNext:()=>{u(p=>Math.min(p+1,f.length-1))},handlePrevious:()=>{u(p=>Math.max(p-1,0))},onBlockPatternSelect:()=>{h(f[c].blocks)}})]})})},Mee=KBe;var p3=l($(),1),dc=l(N(),1),Ws=l(A(),1),GT=l(F(),1),Dee=l(R(),1);var Ao=l(w(),1),{Menu:Vm}=M(Ws.privateApis);function YBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ao.jsxs)("fieldset",{className:e,children:[(0,Ao.jsx)(Ws.VisuallyHidden,{as:"legend",children:(0,dc.__)("Transform to variation")}),r.map(n=>(0,Ao.jsx)(Ws.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,Ao.jsx)(Ae,{icon:n.icon,showColors:!0}),isPressed:o===n.name,label:o===n.name?n.title:(0,dc.sprintf)((0,dc.__)("Transform to %s"),n.title),onClick:()=>t(n.name),"aria-label":n.title,showTooltip:!0},n.name))]})}function qBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ao.jsx)("div",{className:e,children:(0,Ao.jsxs)(Vm,{children:[(0,Ao.jsx)(Vm.TriggerButton,{render:(0,Ao.jsx)(Ws.Button,{className:"block-editor-block-variation-transforms__button",__next40pxDefaultSize:!0,variant:"secondary",children:(0,dc.__)("Transform to variation")})}),(0,Ao.jsx)(Vm.Popover,{position:"bottom",children:(0,Ao.jsx)(Vm.Group,{children:r.map(n=>(0,Ao.jsxs)(Vm.RadioItem,{value:n.name,checked:o===n.name,onChange:()=>t(n.name),children:[(0,Ao.jsx)(Vm.ItemLabel,{children:n.title}),n.description&&(0,Ao.jsx)(Vm.ItemHelpText,{children:n.description})]},n.name))})})]})})}function ZBe({className:e,onSelectVariation:t,selectedValue:o,variations:r}){return(0,Ao.jsx)("div",{className:e,children:(0,Ao.jsx)(Ws.__experimentalToggleGroupControl,{label:(0,dc.__)("Transform to variation"),value:o,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,children:r.map(n=>(0,Ao.jsx)(Ws.__experimentalToggleGroupControlOptionIcon,{icon:(0,Ao.jsx)(Ae,{icon:n.icon,showColors:!0}),value:n.name,label:o===n.name?n.title:(0,dc.sprintf)((0,dc.__)("Transform to %s"),n.title)},n.name))})})}function XBe({blockClientId:e}){let{updateBlockAttributes:t}=(0,GT.useDispatch)(_),{activeBlockVariation:o,variations:r,canEdit:n,isContentOnly:i,isSection:s}=(0,GT.useSelect)(p=>{let{getActiveBlockVariation:g,getBlockVariations:b}=p(p3.store),{getBlockName:v,getBlockAttributes:k,getBlockEditingMode:y,isSectionBlock:S}=M(p(_)),{canEditBlock:x}=p(_),C=e&&v(e),{hasContentRoleAttribute:B}=M(p(p3.store)),I=B(C);return{activeBlockVariation:g(C,k(e),"transform"),variations:C&&b(C,"transform"),canEdit:x(e),isContentOnly:y(e)==="contentOnly"&&!I,isSection:S(e)}},[e]),a=o?.name,c=(0,Dee.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?YBe:ZBe;return(0,Ao.jsx)(c?m:qBe,{className:d,onSelectVariation:u,selectedValue:a,variations:r})}var WT=XBe;var Fm=l(N(),1),$T=l(A(),1);var Vee=l(w(),1),h3={top:{icon:bL,title:(0,Fm._x)("Align top","Block vertical alignment setting")},center:{icon:sL,title:(0,Fm._x)("Align middle","Block vertical alignment setting")},bottom:{icon:nL,title:(0,Fm._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:pL,title:(0,Fm._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:dL,title:(0,Fm._x)("Space between","Block vertical alignment setting")}},QBe=["top","center","bottom"],JBe="top";function eEe({value:e,onChange:t,controls:o=QBe,isCollapsed:r=!0,isToolbar:n}){function i(d){return()=>t(e===d?void 0:d)}let s=h3[e],a=h3[JBe],c=n?$T.ToolbarGroup:$T.ToolbarDropdownMenu,u=n?{isCollapsed:r}:{};return(0,Vee.jsx)(c,{icon:s?s.icon:a.icon,label:(0,Fm._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map(d=>({...h3[d],isActive:e===d,role:r?"menuitemradio":void 0,onClick:i(d)})),...u})}var g3=eEe;var b3=l(w(),1),iC=e=>(0,b3.jsx)(g3,{...e,isToolbar:!1}),Fee=e=>(0,b3.jsx)(g3,{...e,isToolbar:!0});var Bn=l(A(),1),VS=l(R(),1),qT=l(N(),1);var zee=l(A(),1);var k3=l(N(),1),jee=l(w(),1);function Uee({isLinked:e,...t}){let o=e?(0,k3.__)("Unlink radii"):(0,k3.__)("Link radii");return(0,jee.jsx)(zee.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?fn:Ci,iconSize:24,label:o})}var Hee=l(A(),1);function tEe(e){return[...e].sort((o,r)=>e.filter(n=>n===r).length-e.filter(n=>n===o).length).shift()}function Gee(e={}){if(typeof e=="string")return e;let t=Object.values(e).map(a=>{let c=(0,Hee.__experimentalParseQuantityAndUnitFromRawValue)(a);return typeof a=="string"&&c[0]===void 0?[a,""]:c}),o=t.map(a=>a[0]??""),r=t.map(a=>a[1]),n=o.every(a=>a===o[0])?o[0]:"",i=tEe(r);return n===0||n?`${n}${i||""}`:void 0}function Wee(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 $ee(e){return e?typeof e=="string"?!0:!!Object.values(e).filter(o=>!!o||o===0).length:!1}var Qi=l(A(),1),Qee=l(Z(),1),yd=l(N(),1);var zm=l(R(),1);var v3=24,Kee=8,KT={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 vd=(e,t)=>e?.includes?e==="0"||e.includes(`var:preset|${t}|`):!1;function Yee(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 qee(e,t,o){if(e===void 0)return 0;let r=parseFloat(e,10)===0?"0":Yee(e,o),n=t.findIndex(i=>String(i.slug)===r);return n!==-1?n:NaN}function y3(e,t,o){if(!vd(e,o))return e;let r=parseFloat(e,10)===0?"0":Yee(e,o);return t.find(i=>String(i.slug)===r)?.size}function Zee(e,t,o){if(!e||vd(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 ob=l(A(),1),fc=l(w(),1);function Xee({allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:o,minValue:r,parsedQuantity:n,computedUnit:i,units:s,isMixed:a,step:c,max:u,showTooltip:d,value:f,minimumCustomValue:m,onCustomValueChange:h,onCustomValueSliderChange:p,onUnitChange:g,onMouseOut:b,onMouseOver:v,setMinValue:k}){let y=(0,fc.jsx)(ob.__experimentalUnitControl,{className:"preset-input-control__unit-control",disableUnits:a,hideLabelFromVision:!0,label:t,min:r,onChange:h,onUnitChange:g,onBlur:b,onFocus:v,onMouseOut:b,onMouseOver:v,size:"__unstable-large",units:s,value:[n,i].join(""),placeholder:o,onDragStart:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDrag:()=>{e&&f?.charAt(0)==="-"&&k(0)},onDragEnd:()=>{e&&k(m)}});return(0,fc.jsxs)(fc.Fragment,{children:[d?(0,fc.jsx)(ob.Tooltip,{text:t,placement:"top",children:(0,fc.jsx)("div",{className:"preset-input-control__tooltip-wrapper",children:y})}):y,(0,fc.jsx)(ob.RangeControl,{className:"preset-input-control__custom-value-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:u,min:0,onBlur:b,onChange:p,onFocus:v,onMouseOut:b,onMouseOver:v,step:c,value:n,withInputField:!1,__next40pxDefaultSize:!0})]})}var Sd=l(w(),1);function jm({allowNegativeOnDrag:e=!1,ariaLabel:t,className:o,customValueSettings:r=KT,disableCustomValues:n,icon:i,isMixed:s,value:a,minimumCustomValue:c,onChange:u,onMouseOut:d,onMouseOver:f,onUnitChange:m,presets:h=[],presetType:p,selectedUnit:g,showTooltip:b,units:v}){let k=(0,zm.useMemo)(()=>Zee(a,h,p),[a,h,p]),y=o??"preset-input-control",S=h.slice(1,h.length-1).map((K,H)=>({value:H+1,label:void 0})),x=S.length>0,C=h.length<=Kee,B=s?(0,yd.__)("Mixed"):null,[I,P]=(0,zm.useState)(c),[E,L]=(0,zm.useState)(!n&&k!==void 0&&!vd(k,p)),T=null,O=(0,Qee.usePrevious)(k);(0,zm.useEffect)(()=>{k&&O!==k&&!vd(k,p)&&E!==!0&&L(!0)},[k,O,p,E]);let D=!C&&!E&&k!==void 0&&(!vd(k,p)||vd(k,p)&&s),U=h;D?(U=[...h,{name:s?(0,yd.__)("Mixed"):(0,yd.sprintf)((0,yd.__)("Custom (%s)"),k),slug:"custom",size:k}],T=U.length-1):s||(T=E?y3(k,h,p):qee(k,h,p));let G=U.map((K,H)=>({key:H,name:K.name})),j=vd(k,p)?y3(k,h,p):k,[z,W]=(0,Qi.__experimentalParseQuantityAndUnitFromRawValue)(j),ee=W||g||"px",se=v?.find(K=>K.value===ee),ce=se?.step??r[ee]?.steps??.1,ie=se?.max??r[ee]?.max??10,re=K=>{let X=!isNaN(parseFloat(K))?K:void 0;X!==void 0&&u(X)},Q=K=>{u([K,ee].join(""))},Y=K=>k===void 0?void 0:h[K]?.name,J=(K,H)=>{let X=parseInt(K,10);if(H==="selectList"){if(X===0&&h[0]?.slug==="0")return"0";if(X===0)return}else if(X===0)return"0";return`var:preset|${p}|${h[K]?.slug}`};return(0,Sd.jsxs)(Qi.__experimentalHStack,{className:`preset-input-control__wrapper ${y}__wrapper`,children:[i&&(0,Sd.jsx)(Qi.Icon,{className:"preset-input-control__icon",icon:i,size:v3}),(!x||E)&&(0,Sd.jsx)(Xee,{allowNegativeOnDrag:e,ariaLabel:t,allPlaceholder:B,minValue:I,parsedQuantity:z,computedUnit:ee,units:v,isMixed:s,step:ce,max:ie,showTooltip:b,value:k,minimumCustomValue:c,onCustomValueChange:re,onCustomValueSliderChange:Q,onUnitChange:m,onMouseOut:d,onMouseOver:f,setMinValue:P}),x&&C&&!E&&(0,Sd.jsx)(Qi.RangeControl,{"aria-valuenow":T,"aria-valuetext":h[T]?.name,className:"preset-input-control__preset-range",hideLabelFromVision:!0,initialPosition:0,label:t,max:h.length-1,marks:S,min:0,onBlur:d,onChange:K=>u(J(K)),onFocus:f,onMouseDown:K=>{K?.nativeEvent?.offsetX<35&&k===void 0&&u("0")},onMouseOut:d,onMouseOver:f,renderTooltipContent:Y,step:1,value:T,withInputField:!1,__next40pxDefaultSize:!0}),x&&!C&&!E&&(0,Sd.jsx)(Qi.CustomSelectControl,{className:"preset-input-control__custom-select-control",hideLabelFromVision:!0,label:t,onBlur:d,onChange:K=>{D&&K.selectedItem.key===G.length-1?L(!0):u(J(K.selectedItem.key,"selectList"))},onFocus:f,onMouseOut:d,onMouseOver:f,options:G,size:"__unstable-large",value:G.find(K=>K.key===T)||""}),x&&!n&&(0,Sd.jsx)(Qi.Button,{className:"preset-input-control__custom-toggle",icon:rN,iconSize:v3,isPressed:E,label:E?(0,yd.__)("Use preset"):(0,yd.__)("Set custom value"),onClick:()=>{L(!E)},size:"small"})]})}var rb=l(N(),1);var Jee=8,YT=[],S3={all:(0,rb.__)("Border radius"),topLeft:(0,rb.__)("Top left"),topRight:(0,rb.__)("Top right"),bottomLeft:(0,rb.__)("Bottom left"),bottomRight:(0,rb.__)("Bottom right")},_3={all:aA,topLeft:uA,topRight:dA,bottomLeft:lA,bottomRight:cA},x3=0;var mc=l(w(),1);function oEe(e){let t=e?.default??YT,o=e?.custom??YT,r=e?.theme??YT;return(0,VS.useMemo)(()=>{let n=[{name:(0,qT.__)("None"),slug:"0",size:0},...o,...r,...t];return n.length>Jee?[{name:(0,qT.__)("Default"),slug:"default",size:void 0},...n]:n},[o,r,t])}function ete(e,t){return t==="all"?Gee(e):typeof e=="string"?e:e?.[t]}function tte(e,t){return t==="all"?e.flat:e[t]}function ote(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 rte(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 ZT({onChange:e,values:t,presets:o}){let[r,n]=(0,VS.useState)(!$ee(t)||!Wee(t)),i=oEe(o),[s,a]=(0,VS.useState)({flat:typeof t=="string"?(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,Bn.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[c]=me("spacing.units"),u=(0,Bn.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem"]}),d=()=>n(!r);return(0,mc.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,mc.jsxs)(Bn.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,mc.jsx)(Bn.BaseControl.VisualLabel,{as:"legend",children:(0,qT.__)("Radius")}),(0,mc.jsx)(Uee,{onClick:d,isLinked:r})]}),r?(0,mc.jsx)(jm,{ariaLabel:S3.all,className:"components-border-radius-control",icon:_3.all,minimumCustomValue:x3,onChange:ote("all",t,e),onUnitChange:rte("all",s,a),presets:i,presetType:"border-radius",selectedUnit:tte(s,"all"),showTooltip:!0,units:u,value:ete(t,"all")}):(0,mc.jsx)(Bn.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map(f=>(0,mc.jsx)(jm,{ariaLabel:S3[f],className:"components-border-radius-control",icon:_3[f],minimumCustomValue:x3,onChange:ote(f,t,e),onUnitChange:rte(f,s,a),presets:i,presetType:"border-radius",selectedUnit:tte(s,f),showTooltip:!0,units:u,value:ete(t,f)},f))})]})}var ste=l(A(),1);var nte=l(Z(),1);var ite=l(w(),1),XT=(0,nte.createHigherOrderComponent)(e=>function(o){let[r,n,i,s,a]=me("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),c=a?[...n||[],...r||[],...i||[]]:[...n||[],...i||[]],{colors:u=c,disableCustomColors:d=!s}=o,f=u&&u.length>0||!d;return(0,ite.jsx)(e,{...o,colors:u,disableCustomColors:d,hasColorsToChoose:f})},"withColorContext");var ate=XT(ste.ColorPalette);var w3=l(N(),1),$s=l(A(),1);var yo=l(w(),1),{Tabs:nb}=M($s.privateApis),rEe=["colors","disableCustomColors","gradients","disableCustomGradients"],Va={color:"color",gradient:"gradient"};function lte({colors:e,gradients:t,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,className:i,label:s,onColorChange:a,onGradientChange:c,colorValue:u,gradientValue:d,clearable:f,showTitle:m=!0,enableAlpha:h,headingLevel:p}){let g=a&&(e&&e.length>0||!o),b=c&&(t&&t.length>0||!r);if(!g&&!b)return null;let v={[Va.color]:(0,yo.jsx)($s.ColorPalette,{value:u,onChange:b?y=>{a(y),c()}:a,colors:e,disableCustomColors:o,__experimentalIsRenderedInSidebar:n,clearable:f,enableAlpha:h,headingLevel:p}),[Va.gradient]:(0,yo.jsx)($s.GradientPicker,{value:d,onChange:g?y=>{c(y),a()}:c,gradients:t,disableCustomGradients:r,__experimentalIsRenderedInSidebar:n,clearable:f,headingLevel:p})},k=y=>(0,yo.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:v[y]});return(0,yo.jsx)($s.BaseControl,{className:V("block-editor-color-gradient-control",i),children:(0,yo.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,yo.jsxs)($s.__experimentalVStack,{spacing:1,children:[m&&(0,yo.jsx)("legend",{children:(0,yo.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,yo.jsx)($s.BaseControl.VisualLabel,{children:s})})}),g&&b&&(0,yo.jsx)("div",{children:(0,yo.jsxs)(nb,{defaultTabId:d?Va.gradient:!!g&&Va.color,children:[(0,yo.jsxs)(nb.TabList,{children:[(0,yo.jsx)(nb.Tab,{tabId:Va.color,children:(0,w3.__)("Color")}),(0,yo.jsx)(nb.Tab,{tabId:Va.gradient,children:(0,w3.__)("Gradient")})]}),(0,yo.jsx)(nb.TabPanel,{tabId:Va.color,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.color}),(0,yo.jsx)(nb.TabPanel,{tabId:Va.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1,children:v.gradient})]})}),!b&&k(Va.color),!g&&k(Va.gradient)]})})})}function nEe(e){let[t,o,r,n]=me("color.palette","color.gradients","color.custom","color.customGradient");return(0,yo.jsx)(lte,{colors:t,gradients:o,disableCustomColors:!r,disableCustomGradients:!n,...e})}function iEe(e){return rEe.every(t=>e.hasOwnProperty(t))?(0,yo.jsx)(lte,{...e}):(0,yo.jsx)(nEe,{...e})}var _d=iEe;var cte=l(w(),1);function ute({onChange:e,value:t,...o}){return(0,cte.jsx)(_d,{...o,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}var Ks=l(N(),1),dte=l(A(),1),fte=l(Xo(),1),C3=l(w(),1);Kc([Yc,Op]);function sEe({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:o,fallbackLinkColor:r,fontSize:n,isLargeText:i,textColor:s,linkColor:a,enableAlphaChecker:c=!1}){let u=e||t;if(!u)return null;let d=s||o,f=a||r;if(!d&&!f)return null;let m=[{color:d,description:(0,Ks.__)("text color")},{color:f,description:(0,Ks.__)("link color")}],h=Bt(u),p=h.alpha()<1,g=h.brightness(),b={level:"AA",size:i||i!==!1&&n>=24?"large":"small"},v="",k="";for(let y of m){if(!y.color)continue;let S=Bt(y.color),x=S.isReadable(h,b),C=S.alpha()<1;if(!x){if(p||C)continue;v=g<S.brightness()?(0,Ks.sprintf)((0,Ks.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),y.description):(0,Ks.sprintf)((0,Ks.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),y.description),k=(0,Ks.__)("This color combination may be hard for people to read.");break}C&&c&&(v=(0,Ks.__)("Transparent text may be hard for people to read."),k=(0,Ks.__)("Transparent text may be hard for people to read."))}return v?((0,fte.speak)(k),(0,C3.jsx)("div",{className:"block-editor-contrast-checker",children:(0,C3.jsx)(dte.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:v})})):null}var QT=sEe;var br=l(N(),1),FS=l(pc(),1),JT=l(R(),1),ai=l(A(),1),Fa=l(w(),1),xd=new Date;xd.setDate(20);xd.setMonth(xd.getMonth()-3);xd.getMonth()===4&&xd.setMonth(3);function pte({format:e,defaultFormat:t,onChange:o}){return(0,Fa.jsxs)(ai.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,Fa.jsx)(ai.VisuallyHidden,{as:"legend",children:(0,br.__)("Date format")}),(0,Fa.jsx)(ai.ToggleControl,{label:(0,br.__)("Default format"),help:`${(0,br.__)("Example:")}  ${(0,FS.dateI18n)(t,xd)}`,checked:!e,onChange:r=>o(r?null:t)}),e&&(0,Fa.jsx)(aEe,{format:e,onChange:o})]})}function aEe({format:e,onChange:t}){let r=[...[...new Set(["Y-m-d",(0,br._x)("n/j/Y","short date format"),(0,br._x)("n/j/Y g:i A","short date format with time"),(0,br._x)("M j, Y","medium date format"),(0,br._x)("M j, Y g:i A","medium date format with time"),(0,br._x)("F j, Y","long date format"),(0,br._x)("M j","short date format without the year")])].map((a,c)=>({key:`suggested-${c}`,name:(0,FS.dateI18n)(a,xd),format:a})),{key:"human-diff",name:(0,FS.humanTimeDiff)(xd),format:"human-diff"}],n={key:"custom",name:(0,br.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,br.__)("Enter your own date format")},[i,s]=(0,JT.useState)(()=>!!e&&!r.some(a=>a.format===e));return(0,Fa.jsxs)(ai.__experimentalVStack,{children:[(0,Fa.jsx)(ai.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,br.__)("Choose a format"),options:[...r,n],value:i?n:r.find(a=>a.format===e)??n,onChange:({selectedItem:a})=>{a===n?s(!0):(s(!1),t(a.format))}}),i&&(0,Fa.jsx)(ai.TextControl,{__next40pxDefaultSize:!0,label:(0,br.__)("Custom format"),hideLabelFromVision:!0,help:(0,JT.createInterpolateElement)((0,br.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,Fa.jsx)(ai.ExternalLink,{href:(0,br.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:a=>t(a)})]})}var Ji=l(A(),1),zS=l(N(),1),hte=l(it(),1);var gte=l(Z(),1),za=l(w(),1);function bte({id:e,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s}){let a;i==="unset"?a=(0,za.jsx)(Ji.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?a=(0,za.jsx)(Ji.DuotoneSwatch,{values:i}):a=(0,za.jsx)(we,{icon:xA});let c=(0,zS.__)("Apply duotone filter"),d=`${(0,gte.useInstanceId)(bte,"duotone-control",e)}__description`;return(0,za.jsx)(Ji.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,zS.__)("Duotone")},renderToggle:({isOpen:f,onToggle:m})=>(0,za.jsx)(Ji.ToolbarButton,{showTooltip:!0,onClick:m,"aria-haspopup":"true","aria-expanded":f,onKeyDown:p=>{!f&&p.keyCode===hte.DOWN&&(p.preventDefault(),m())},label:c,icon:a}),renderContent:()=>(0,za.jsxs)(Ji.MenuGroup,{label:(0,zS.__)("Duotone"),children:[(0,za.jsx)("p",{children:(0,zS.__)("Create a two-tone color effect without losing your original image.")}),(0,za.jsx)(Ji.DuotonePicker,{"aria-label":c,"aria-describedby":d,colorPalette:t,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:n,value:i,onChange:s})]})})}var eI=bte;var Ste=l(A(),1),_te=l(Re(),1),xte=l(R(),1),li=l(N(),1);var tr=l(N(),1);var tI=l(N(),1);function kte(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":t=(0,tI._x)("Regular","font style");break;case"italic":t=(0,tI._x)("Italic","font style");break;case"oblique":t=(0,tI._x)("Oblique","font style");break;default:t=e;break}return{name:t,value:e}}var Ys=l(N(),1);function B3(e){if(!e)return{};if(typeof e=="object")return e;let t;switch(e){case"normal":case"400":t=(0,Ys._x)("Regular","font weight");break;case"bold":case"700":t=(0,Ys._x)("Bold","font weight");break;case"100":t=(0,Ys._x)("Thin","font weight");break;case"200":t=(0,Ys._x)("Extra Light","font weight");break;case"300":t=(0,Ys._x)("Light","font weight");break;case"500":t=(0,Ys._x)("Medium","font weight");break;case"600":t=(0,Ys._x)("Semi Bold","font weight");break;case"800":t=(0,Ys._x)("Extra Bold","font weight");break;case"900":t=(0,Ys._x)("Black","font weight");break;case"1000":t=(0,Ys._x)("Extra Black","font weight");break;default:t=e;break}return{name:t,value:e}}var vte=[{name:(0,tr._x)("Regular","font style"),value:"normal"},{name:(0,tr._x)("Italic","font style"),value:"italic"}],yte=[{name:(0,tr._x)("Thin","font weight"),value:"100"},{name:(0,tr._x)("Extra Light","font weight"),value:"200"},{name:(0,tr._x)("Light","font weight"),value:"300"},{name:(0,tr._x)("Regular","font weight"),value:"400"},{name:(0,tr._x)("Medium","font weight"),value:"500"},{name:(0,tr._x)("Semi Bold","font weight"),value:"600"},{name:(0,tr._x)("Bold","font weight"),value:"700"},{name:(0,tr._x)("Extra Bold","font weight"),value:"800"},{name:(0,tr._x)("Black","font weight"),value:"900"},{name:(0,tr._x)("Extra Black","font weight"),value:"1000"}];function ib(e){let t=[],o=[],r=[],n=!e||e?.length===0,i=!1;return e?.forEach(s=>{if(typeof s.fontWeight=="string"&&/\s/.test(s.fontWeight.trim())){i=!0;let[u,d]=s.fontWeight.split(" ");u=parseInt(u.slice(0,1)),d==="1000"?d=10:d=parseInt(d.slice(0,1));for(let f=u;f<=d;f++){let m=`${f.toString()}00`;o.some(h=>h.value===m)||o.push(B3(m))}}let a=B3(typeof s.fontWeight=="number"?s.fontWeight.toString():s.fontWeight),c=kte(s.fontStyle);c&&Object.keys(c).length&&(t.some(u=>u.value===c.value)||t.push(c)),a&&Object.keys(a).length&&(o.some(u=>u.value===a.value)||i||o.push(a))}),o.some(s=>s.value>="600")||o.push({name:(0,tr._x)("Bold","font weight"),value:"700"}),t.some(s=>s.value==="italic")||t.push({name:(0,tr._x)("Italic","font style"),value:"italic"}),n&&(t=vte,o=yte),t=t.length===0?vte:t,o=o.length===0?yte:o,t.forEach(({name:s,value:a})=>{o.forEach(({name:c,value:u})=>{let d=a==="normal"?c:(0,tr.sprintf)((0,tr._x)("%1$s %2$s","font"),c,s);r.push({key:`${a}-${u}`,name:d,style:{fontStyle:a,fontWeight:u}})})}),{fontStyles:t,fontWeights:o,combinedStyleAndWeightOptions:r,isSystemFont:n,isVariableFont:i}}var wte=l(w(),1),lEe=(e,t)=>e?t?(0,li.__)("Appearance"):(0,li.__)("Font style"):(0,li.__)("Font weight");function oI(e){let{__next40pxDefaultSize:t=!1,onChange:o,hasFontStyles:r=!0,hasFontWeights:n=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:a},...c}=e,u=r||n,d=lEe(r,n),f={key:"default",name:(0,li.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:m,fontWeights:h,combinedStyleAndWeightOptions:p}=ib(i),g=()=>{let x=[f];return p&&x.push(...p),x},b=()=>{let x=[f];return m.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:B,fontWeight:void 0}})}),x},v=()=>{let x=[f];return h.forEach(({name:C,value:B})=>{x.push({key:B,name:C,style:{fontStyle:void 0,fontWeight:B}})}),x},k=(0,xte.useMemo)(()=>r&&n?g():r?b():v(),[e.options,m,h,p]),y=k.find(x=>x.style.fontStyle===s&&x.style.fontWeight===a)||k[0],S=()=>y?r?n?(0,li.sprintf)((0,li.__)("Currently selected font appearance: %s"),y.name):(0,li.sprintf)((0,li.__)("Currently selected font style: %s"),y.name):(0,li.sprintf)((0,li.__)("Currently selected font weight: %s"),y.name):(0,li.__)("No selected font appearance");return!t&&(c.size===void 0||c.size==="default")&&(0,_te.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,wte.jsx)(Ste.CustomSelectControl,{...c,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:d,describedBy:S(),options:k,value:y,onChange:({selectedItem:x})=>o(x.style)})}var Cte=l(A(),1),Bte=l(Re(),1),E3=l(N(),1);var Ete=l(w(),1);function rI({__next40pxDefaultSize:e=!1,value:t="",onChange:o,fontFamilies:r,className:n,...i}){let[s]=me("typography.fontFamilies");if(r||(r=s),!r||r.length===0)return null;let a=[{key:"",name:(0,E3.__)("Default")},...r.map(({fontFamily:u,name:d})=>({key:u,name:d||u,style:{fontFamily:u}}))];!e&&(i.size===void 0||i.size==="default")&&(0,Bte.default)("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});let c=a.find(u=>u.key===t)??"";return(0,Ete.jsx)(Cte.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,E3.__)("Font"),value:c,onChange:({selectedItem:u})=>o(u.key),options:a,className:V("block-editor-font-family-control",n),...i})}var nI=l(A(),1),Tte=l(Re(),1),Ite=l(N(),1);var Pte=l(w(),1);function iI({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n}){let[i]=me("spacing.units"),s=(0,nI.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return!e&&(n.size===void 0||n.size==="default")&&(0,Tte.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,Pte.jsx)(nI.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...n,label:(0,Ite.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:s,onChange:o})}var jS=l(N(),1),sI=l(A(),1),T3=l(w(),1),cEe=[{label:(0,jS.__)("None"),value:"none",icon:Dr},{label:(0,jS.__)("Underline"),value:"underline",icon:RA},{label:(0,jS.__)("Strikethrough"),value:"line-through",icon:IA}];function aI({value:e,onChange:t,className:o}){return(0,T3.jsx)(sI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,jS.__)("Decoration"),className:V("block-editor-text-decoration-control",o),value:e,onChange:r=>{t(r===e?void 0:r)},children:cEe.map(r=>(0,T3.jsx)(sI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var sb=l(N(),1);var lI=l(A(),1),I3=l(w(),1),uEe=[{label:(0,sb.__)("None"),value:"none",icon:Dr},{label:(0,sb.__)("Uppercase"),value:"uppercase",icon:AA},{label:(0,sb.__)("Lowercase"),value:"lowercase",icon:EA},{label:(0,sb.__)("Capitalize"),value:"capitalize",icon:CA}];function cI({className:e,value:t,onChange:o}){return(0,I3.jsx)(lI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,sb.__)("Letter case"),className:V("block-editor-text-transform-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:uEe.map(r=>(0,I3.jsx)(lI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var ab=l(N(),1);var uI=l(A(),1),P3=l(w(),1),dEe=[{label:(0,ab.__)("Horizontal"),value:"horizontal-tb",icon:CN},{label:(0,ab.__)("Vertical"),value:(0,ab.isRTL)()?"vertical-lr":"vertical-rl",icon:EN}];function dI({className:e,value:t,onChange:o}){return(0,P3.jsx)(uI.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,ab.__)("Orientation"),className:V("block-editor-writing-mode-control",e),value:t,onChange:r=>{o(r===t?void 0:r)},children:dEe.map(r=>(0,P3.jsx)(uI.__experimentalToggleGroupControlOptionIcon,{value:r.value,icon:r.icon,label:r.label},r.value))})}var Xr=l(A(),1),Rte=l(R(),1),Ote=l(N(),1);var Uo=l(w(),1),fEe=({setting:e,children:t,panelId:o,...r})=>{let n=()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()};return(0,Uo.jsx)(Xr.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:n,isShownByDefault:e.isShownByDefault!==void 0?e.isShownByDefault:!0,...r,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:o,resetAllFilter:e.resetAllFilter,children:t})},mEe=({colorValue:e,label:t})=>(0,Uo.jsxs)(Xr.__experimentalHStack,{justify:"flex-start",children:[(0,Uo.jsx)(Xr.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,Uo.jsx)(Xr.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),pEe=e=>function({onToggle:o,isOpen:r}){let{clearable:n,colorValue:i,gradientValue:s,onColorChange:a,onGradientChange:c,label:u}=e,d=(0,Rte.useRef)(void 0),f={onClick:o,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:d},m=()=>{i?a():s&&c()},h=i??s;return(0,Uo.jsxs)(Uo.Fragment,{children:[(0,Uo.jsx)(Xr.Button,{__next40pxDefaultSize:!0,...f,children:(0,Uo.jsx)(mEe,{colorValue:h,label:u})}),n&&h&&(0,Uo.jsx)(Xr.Button,{__next40pxDefaultSize:!0,label:(0,Ote.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Dr,onClick:()=>{m(),r&&o(),d.current?.focus()}})]})};function fI({colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradients:n,settings:i,__experimentalIsRenderedInSidebar:s,...a}){let c;return s&&(c={placement:"left-start",offset:36,shift:!0}),(0,Uo.jsx)(Uo.Fragment,{children:i.map((u,d)=>{let f={clearable:!1,colorValue:u.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:o,enableAlpha:r,gradientValue:u.gradientValue,gradients:n,label:u.label,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...u},m={clearable:u.clearable,label:u.label,colorValue:u.colorValue,gradientValue:u.gradientValue,onColorChange:u.onColorChange,onGradientChange:u.onGradientChange};return u&&(0,Uo.jsx)(fEe,{setting:u,...a,children:(0,Uo.jsx)(Xr.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:pEe(m),renderContent:()=>(0,Uo.jsx)(Xr.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Uo.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,Uo.jsx)(_d,{...f})})})})},d)})})}var mI=l(A(),1),Ate=l(F(),1),Lte=l(Z(),1);var R3=l(R(),1),Um=l(N(),1);function wd(){let[e,t,o,r,n,i,s,a,c,u]=me("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),d={disableCustomColors:!e,disableCustomGradients:!i};return d.colors=(0,R3.useMemo)(()=>{let f=[];return o&&o.length&&f.push({name:(0,Um._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:o}),n&&r&&r.length&&f.push({name:(0,Um._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:r}),t&&t.length&&f.push({name:(0,Um._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),f},[t,o,r,n]),d.gradients=(0,R3.useMemo)(()=>{let f=[];return a&&a.length&&f.push({name:(0,Um._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:a}),u&&c&&c.length&&f.push({name:(0,Um._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:c}),s&&s.length&&f.push({name:(0,Um._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),f},[s,a,c,u]),d.hasColorsOrGradients=!!d.colors.length||!!d.gradients.length,d}var qs=l(w(),1),hEe=["colors","disableCustomColors","gradients","disableCustomGradients"],O3=({className:e,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,children:i,settings:s,title:a,showTitle:c=!0,__experimentalIsRenderedInSidebar:u,enableAlpha:d})=>{let f=(0,Lte.useInstanceId)(O3),{batch:m}=(0,Ate.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,qs.jsxs)(mI.__experimentalToolsPanel,{className:V("block-editor-panel-color-gradient-settings",e),label:c?a:void 0,resetAll:()=>{m(()=>{s.forEach(({colorValue:h,gradientValue:p,onColorChange:g,onGradientChange:b})=>{h?g():p&&b()})})},panelId:f,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,qs.jsx)(fI,{settings:s,panelId:f,colors:t,gradients:o,disableCustomColors:r,disableCustomGradients:n,__experimentalIsRenderedInSidebar:u,enableAlpha:d}),!!i&&(0,qs.jsxs)(qs.Fragment,{children:[(0,qs.jsx)(mI.__experimentalSpacer,{marginY:4})," ",i]})]})},gEe=e=>{let t=wd();return(0,qs.jsx)(O3,{...t,...e})},bEe=e=>hEe.every(t=>e.hasOwnProperty(t))?(0,qs.jsx)(O3,{...e}):(0,qs.jsx)(gEe,{...e}),pI=bEe;var hI=l(R(),1),Hm=l(A(),1),L3=l(N(),1);var US=l(w(),1),A3=[],kEe={...KT,px:{max:1e3,steps:1},em:{max:50,steps:.1},rem:{max:50,steps:.1}};function vEe(e){let t=e?.default??A3,o=e?.custom??A3,r=e?.theme??A3;return(0,hI.useMemo)(()=>[{name:(0,L3.__)("None"),slug:"0",size:0},...o,...r,...t],[o,r,t])}function lb({label:e=(0,L3.__)("Dimension"),onChange:t,value:o}){let[r,n]=me("dimensions.dimensionSizes","spacing.units"),i=(0,Hm.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=vEe(r),[a,c]=(0,hI.useState)(()=>{let[,d]=(0,Hm.__experimentalParseQuantityAndUnitFromRawValue)(o);return d||i[0]?.value||"px"}),u=d=>{let[f,m]=(0,Hm.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(d)&&m==="px"?t((f/16).toFixed(2)+d):["em","rem"].includes(m)&&d==="px"?t(Math.round(f*16)+d):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(d)&&f>100&&t(100+d),c(d)};return(0,US.jsxs)("fieldset",{className:"block-editor-dimension-control",children:[(0,US.jsx)(Hm.BaseControl.VisualLabel,{as:"legend",children:e}),(0,US.jsx)(jm,{ariaLabel:e,className:"block-editor-dimension-control",customValueSettings:kEe,minimumCustomValue:0,onChange:t,onUnitChange:u,presets:s,presetType:"dimension",selectedUnit:a,showTooltip:!0,units:i,value:o})]})}var Mte=l(R(),1),or=l(A(),1),Dte=l(N(),1),Vte=l(Re(),1);var ja=l(w(),1),Nte={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 Fte({label:e=(0,Dte.__)("Height"),onChange:t,value:o}){(0,Vte.default)("wp.blockEditor.HeightControl",{since:"7.0",version:"7.2",alternative:"wp.blockEditor.DimensionControl"});let r=parseFloat(o),[n]=me("spacing.units"),i=(0,or.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vh","vw"]}),s=(0,Mte.useMemo)(()=>(0,or.__experimentalParseQuantityAndUnitFromRawValue)(o),[o])[1]||i[0]?.value||"px",a=u=>{t([u,s].join(""))},c=u=>{let[d,f]=(0,or.__experimentalParseQuantityAndUnitFromRawValue)(o);["em","rem"].includes(u)&&f==="px"?t((d/16).toFixed(2)+u):["em","rem"].includes(f)&&u==="px"?t(Math.round(d*16)+u):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(u)&&d>100&&t(100+u)};return(0,ja.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,ja.jsx)(or.BaseControl.VisualLabel,{as:"legend",children:e}),(0,ja.jsxs)(or.Flex,{children:[(0,ja.jsx)(or.FlexItem,{isBlock:!0,children:(0,ja.jsx)(or.__experimentalUnitControl,{value:o,units:i,onChange:t,onUnitChange:c,min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,ja.jsx)(or.FlexItem,{isBlock:!0,children:(0,ja.jsx)(or.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ja.jsx)(or.RangeControl,{__next40pxDefaultSize:!0,value:r,min:0,max:Nte[s]?.max??100,step:Nte[s]?.step??.1,withInputField:!1,onChange:a,label:e,hideLabelFromVision:!0})})})]})]})}var $S=l(A(),1);var es=l(jr()),doe=l(soe());function wEe(e,t,o,r,n,i){i===void 0&&(i=0);var s=cb(e,t,i),a=s.width,c=s.height,u=Math.min(a,o),d=Math.min(c,r);return u>d*n?{width:d*n,height:d}:{width:u,height:u/n}}function CEe(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function HS(e,t,o,r,n){n===void 0&&(n=0);var i=cb(t.width,t.height,n),s=i.width,a=i.height;return{x:aoe(e.x,s,o.width,r),y:aoe(e.y,a,o.height,r)}}function aoe(e,t,o,r){var n=t*r/2-o/2;return SI(e,-n,n)}function loe(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function coe(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function BEe(e,t,o,r,n,i,s){i===void 0&&(i=0),s===void 0&&(s=!0);var a=s?EEe:TEe,c=cb(t.width,t.height,i),u=cb(t.naturalWidth,t.naturalHeight,i),d={x:a(100,((c.width-o.width/n)/2-e.x/n)/c.width*100),y:a(100,((c.height-o.height/n)/2-e.y/n)/c.height*100),width:a(100,o.width/c.width*100/n),height:a(100,o.height/c.height*100/n)},f=Math.round(a(u.width,d.width*u.width/100)),m=Math.round(a(u.height,d.height*u.height/100)),h=u.width>=u.height*r,p=h?{width:Math.round(m*r),height:m}:{width:f,height:Math.round(f/r)},g=Fo(Fo({},p),{x:Math.round(a(u.width-p.width,d.x*u.width/100)),y:Math.round(a(u.height-p.height,d.y*u.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function EEe(e,t){return Math.min(e,Math.max(0,t))}function TEe(e,t){return t}function IEe(e,t,o,r,n,i){var s=cb(t.width,t.height,o),a=SI(r.width/s.width*(100/e.width),n,i),c={x:a*s.width/2-r.width/2-s.width*a*(e.x/100),y:a*s.height/2-r.height/2-s.height*a*(e.y/100)};return{crop:c,zoom:a}}function PEe(e,t,o){var r=CEe(t);return o.height>o.width?o.height/(e.height*r):o.width/(e.width*r)}function REe(e,t,o,r,n,i){o===void 0&&(o=0);var s=cb(t.naturalWidth,t.naturalHeight,o),a=SI(PEe(e,t,r),n,i),c=r.height>r.width?r.height/e.height:r.width/e.width,u={x:((s.width-e.width)/2-e.x)*c,y:((s.height-e.height)/2-e.y)*c};return{crop:u,zoom:a}}function uoe(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function OEe(e){return e*Math.PI/180}function cb(e,t,o){var r=OEe(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 SI(e,t,o){return Math.min(Math.max(e,t),o)}function yI(){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 AEe=`.reactEasyCrop_Container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: move;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reactEasyCrop_Image,
.reactEasyCrop_Video {
  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
}

.reactEasyCrop_Contain {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
.reactEasyCrop_Cover_Horizontal {
  width: 100%;
  height: auto;
}
.reactEasyCrop_Cover_Vertical {
  width: auto;
  height: 100%;
}

.reactEasyCrop_CropArea {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  box-shadow: 0 0 0 9999em;
  color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.reactEasyCrop_CropAreaRound {
  border-radius: 50%;
}

.reactEasyCrop_CropAreaGrid::before {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 0;
  bottom: 0;
  left: 33.33%;
  right: 33.33%;
  border-top: 0;
  border-bottom: 0;
}

.reactEasyCrop_CropAreaGrid::after {
  content: ' ';
  box-sizing: border-box;
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
  border-left: 0;
  border-right: 0;
}
`,LEe=1,NEe=3,MEe=1,foe=(function(e){IU(t,e);function t(){var o=e!==null&&e.apply(this,arguments)||this;return o.cropperRef=es.createRef(),o.imageRef=es.createRef(),o.videoRef=es.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc=typeof document<"u"?document:null,o.currentWindow=typeof window<"u"?window:null,o.resizeObserver=null,o.previousCropSize=null,o.isInitialized=!1,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!o.containerRef)){var r=!0;o.resizeObserver=new window.ResizeObserver(function(n){if(r){r=!1;return}o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(r){return r.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var r=o.computeSizes();r&&(o.previousCropSize=r,o.emitCropData(),o.setInitialCrop(r),o.isInitialized=!0),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(r){if(o.props.initialCroppedAreaPercentages){var n=IEe(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=REe(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,r,o.props.minZoom,o.props.maxZoom),i=a.crop,s=a.zoom;o.props.onCropChange(i),o.props.onZoomChange&&o.props.onZoomChange(s)}},o.computeSizes=function(){var r,n,i,s,a,c,u=o.imageRef.current||o.videoRef.current;if(u&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var d=o.containerRect.width/o.containerRect.height,f=((r=o.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((n=o.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0,m=((i=o.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((s=o.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,h=u.offsetWidth<f||u.offsetHeight<m,p=f/m,g=void 0;if(h)switch(o.state.mediaObjectFit){default:case"contain":g=d>p?{width:o.containerRect.height*p,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/p};break;case"horizontal-cover":g={width:o.containerRect.width,height:o.containerRect.width/p};break;case"vertical-cover":g={width:o.containerRect.height*p,height:o.containerRect.height};break}else g={width:u.offsetWidth,height:u.offsetHeight};o.mediaSize=Fo(Fo({},g),{naturalWidth:f,naturalHeight:m}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var b=o.props.cropSize?o.props.cropSize:wEe(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(((a=o.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((c=o.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&o.props.onCropSizeChange&&o.props.onCropSizeChange(b),o.setState({cropSize:b},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(b),b}},o.saveContainerPosition=function(){if(o.containerRef){var r=o.containerRef.getBoundingClientRect();o.containerPosition={x:r.left,y:r.top}}},o.onMouseDown=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(r)))},o.onMouseMove=function(r){return o.onDrag(t.getMousePoint(r))},o.onScroll=function(r){o.currentDoc&&(r.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(r){o.currentDoc&&(o.isTouching=!0,!(o.props.onTouchRequest&&!o.props.onTouchRequest(r))&&(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),r.touches.length===2?o.onPinchStart(r):r.touches.length===1&&o.onDragStart(t.getTouchPoint(r.touches[0]))))},o.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?o.onPinchMove(r):r.touches.length===1&&o.onDrag(t.getTouchPoint(r.touches[0]))},o.onGestureStart=function(r){o.currentDoc&&(r.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(r){if(r.preventDefault(),!o.isTouching){var n=t.getMousePoint(r),i=o.gestureZoomStart-1+r.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var s=o.gestureRotationStart+r.rotation;o.props.onRotationChange(s)}}},o.onGestureEnd=function(r){o.cleanEvents()},o.onDragStart=function(r){var n,i,s=r.x,a=r.y;o.dragStartPosition={x:s,y:a},o.dragStartCrop=Fo({},o.props.crop),(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n)},o.onDrag=function(r){var n=r.x,i=r.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&!(n===void 0||i===void 0)){var s=n-o.dragStartPosition.x,a=i-o.dragStartPosition.y,c={x:o.dragStartCrop.x+s,y:o.dragStartCrop.y+a},u=o.props.restrictPosition?HS(c,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):c;o.props.onCropChange(u)}}))},o.onDragStopped=function(){var r,n;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),(n=(r=o.props).onInteractionEnd)===null||n===void 0||n.call(r)},o.onWheel=function(r){if(o.currentWindow&&!(o.props.onWheelRequest&&!o.props.onWheelRequest(r))){r.preventDefault();var n=t.getMousePoint(r),i=(0,doe.default)(r).pixelY,s=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(s,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var a,c;return(c=(a=o.props).onInteractionStart)===null||c===void 0?void 0:c.call(a)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var a,c;return(c=(a=o.props).onInteractionEnd)===null||c===void 0?void 0:c.call(a)})},250)}},o.getPointOnContainer=function(r,n){var i=r.x,s=r.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(i-n.x),y:o.containerRect.height/2-(s-n.y)}},o.getPointOnMedia=function(r){var n=r.x,i=r.y,s=o.props,a=s.crop,c=s.zoom;return{x:(n+a.x)/c,y:(i+a.y)/c}},o.setNewZoom=function(r,n,i){var s=i===void 0?{}:i,a=s.shouldUpdatePosition,c=a===void 0?!0:a;if(!(!o.state.cropSize||!o.props.onZoomChange)){var u=SI(r,o.props.minZoom,o.props.maxZoom);if(c){var d=o.getPointOnContainer(n,o.containerPosition),f=o.getPointOnMedia(d),m={x:f.x*u-d.x,y:f.y*u-d.y},h=o.props.restrictPosition?HS(m,o.mediaSize,o.state.cropSize,u,o.props.rotation):m;o.props.onCropChange(h)}o.props.onZoomChange(u)}},o.getCropData=function(){if(!o.state.cropSize)return null;var r=o.props.restrictPosition?HS(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;return BEe(r,o.mediaSize,o.state.cropSize,o.getAspect(),o.props.zoom,o.props.rotation,o.props.restrictPosition)},o.emitCropData=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(n,i),o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.emitCropAreaChange=function(){var r=o.getCropData();if(r){var n=r.croppedAreaPercentages,i=r.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(n,i)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var r=o.props.crop;if(o.isInitialized&&o.previousCropSize){var n=Math.abs(o.previousCropSize.width-o.state.cropSize.width)>1e-6||Math.abs(o.previousCropSize.height-o.state.cropSize.height)>1e-6;if(n){var i=o.state.cropSize.width/o.previousCropSize.width,s=o.state.cropSize.height/o.previousCropSize.height;r={x:o.props.crop.x*i,y:o.props.crop.y*s}}}var a=o.props.restrictPosition?HS(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.previousCropSize=o.state.cropSize,o.props.onCropChange(a),o.emitCropData()}},o.onKeyDown=function(r){var n,i,s=o.props,a=s.crop,c=s.onCropChange,u=s.keyboardStep,d=s.zoom,f=s.rotation,m=u;if(o.state.cropSize){r.shiftKey&&(m*=.2);var h=Fo({},a);switch(r.key){case"ArrowUp":h.y-=m,r.preventDefault();break;case"ArrowDown":h.y+=m,r.preventDefault();break;case"ArrowLeft":h.x-=m,r.preventDefault();break;case"ArrowRight":h.x+=m,r.preventDefault();break;default:return}o.props.restrictPosition&&(h=HS(h,o.mediaSize,o.state.cropSize,d,f)),r.repeat||(i=(n=o.props).onInteractionStart)===null||i===void 0||i.call(n),c(h)}},o.onKeyUp=function(r){var n,i;switch(r.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":r.preventDefault();break;default:return}o.emitCropData(),(i=(n=o.props).onInteractionEnd)===null||i===void 0||i.call(n)},o}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=AEe,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var o,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(o=this.resizeObserver)===null||o===void 0||o.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(o){var r,n,i,s,a,c,u,d,f;o.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):o.aspect!==this.props.aspect?this.computeSizes():o.objectFit!==this.props.objectFit?this.computeSizes():o.zoom!==this.props.zoom?this.recomputeCropPosition():((r=o.cropSize)===null||r===void 0?void 0:r.height)!==((n=this.props.cropSize)===null||n===void 0?void 0:n.height)||((i=o.cropSize)===null||i===void 0?void 0:i.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=o.crop)===null||a===void 0?void 0:a.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=o.crop)===null||u===void 0?void 0:u.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),o.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),o.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var m=this.getObjectFit();m!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:m},this.computeSizes)},t.prototype.getAspect=function(){var o=this.props,r=o.cropSize,n=o.aspect;return r?r.width/r.height:n},t.prototype.getObjectFit=function(){var o,r,n,i;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,c=((o=this.imageRef.current)===null||o===void 0?void 0:o.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalHeight)||((i=this.videoRef.current)===null||i===void 0?void 0:i.videoHeight)||0,d=c/u;return d<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(o){var r=t.getTouchPoint(o.touches[0]),n=t.getTouchPoint(o.touches[1]);this.lastPinchDistance=loe(r,n),this.lastPinchRotation=coe(r,n),this.onDragStart(uoe(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=uoe(n,i);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=loe(n,i),c=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(c,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=coe(n,i),d=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=u})}},t.prototype.render=function(){var o=this,r,n=this.props,i=n.image,s=n.video,a=n.mediaProps,c=n.cropperProps,u=n.transform,d=n.crop,f=d.x,m=d.y,h=n.rotation,p=n.zoom,g=n.cropShape,b=n.showGrid,v=n.roundCropAreaPixels,k=n.style,y=k.containerStyle,S=k.cropAreaStyle,x=k.mediaStyle,C=n.classes,B=C.containerClassName,I=C.cropAreaClassName,P=C.mediaClassName,E=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return es.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(T){return o.containerRef=T},"data-testid":"container",style:y,className:yI("reactEasyCrop_Container",B)},i?es.createElement("img",Fo({alt:"",className:yI("reactEasyCrop_Image",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",P)},a,{src:i,ref:this.imageRef,style:Fo(Fo({},x),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):s&&es.createElement("video",Fo({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:yI("reactEasyCrop_Video",E==="contain"&&"reactEasyCrop_Contain",E==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",E==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",P)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Fo(Fo({},x),{transform:u||"translate(".concat(f,"px, ").concat(m,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(s)?s:[{src:s}]).map(function(L){return es.createElement("source",Fo({key:L.src},L))})),this.state.cropSize&&es.createElement("div",Fo({ref:this.cropperRef,style:Fo(Fo({},S),{width:v?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:v?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:yI("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",b&&"reactEasyCrop_CropAreaGrid",I)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:NEe,minZoom:LEe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:MEe},t.getMousePoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t.getTouchPoint=function(o){return{x:Number(o.clientX),y:Number(o.clientY)}},t})(es.Component);var Soe=l(R(),1);var db=l(R(),1);var moe=Object.prototype.hasOwnProperty;function poe(e,t,o){for(o of e.keys())if(Wm(o,t))return o}function Wm(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--&&Wm(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=poe(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=poe(t,n),!n)||!Wm(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(moe.call(e,o)&&++r&&!moe.call(t,o)||!(o in t)||!Wm(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var Zs=l(R(),1);var ub=1,hoe=5;var _I=e=>e>=0?e%360:(360+e%360)%360,DEe=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 goe(e){return e*Math.PI/180}function VEe(e,t,o){let r=goe(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 boe(e,t,o=0,r={horizontal:!1,vertical:!1}){try{let n=await DEe(e),i=document.createElement("canvas"),s=i.getContext("2d");if(!s)return null;let a=goe(o),{width:c,height:u}=VEe(n.width,n.height,o);i.width=c,i.height=u,s.translate(c/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-n.width/2,-n.height/2),s.drawImage(n,0,0);let d=document.createElement("canvas"),f=d.getContext("2d");return f?(d.width=t.width,d.height=t.height,f.drawImage(i,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(m=>{d.toBlob(h=>{h&&m(URL.createObjectURL(h))},"image/jpeg")})):null}catch{return null}}var $m={crop:{x:0,y:0,width:100,height:100},zoom:ub,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1}},FEe={x:0,y:0},H3={crop:FEe,croppedArea:$m.crop,croppedAreaPixels:null,zoom:$m.zoom,rotation:$m.rotation,flip:$m.flip,aspectRatio:$m.aspectRatio,mediaSize:null};function koe(){let[e,t]=(0,Zs.useState)(H3),[o,r]=(0,Zs.useState)(null),n=(0,Zs.useCallback)(u=>{t(d=>{let m={...typeof u=="function"?u(d):u};return"rotation"in m&&m.rotation!==void 0&&(m.rotation=_I(m.rotation)),{...d,...m}})},[]),i=(0,Zs.useCallback)((u=null)=>{if(!u){r(null),n(H3);return}if(typeof u=="object"){let d={...$m,...u};r(d),n(d)}},[n,r]),s=(0,Zs.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({...H3})},[o,n]),a=(0,Zs.useMemo)(()=>{if(o){let d={crop:e.croppedAreaPixels||e.croppedArea,zoom:e.zoom,rotation:_I(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Wm(d,o)===!1}let u={crop:e.croppedArea,zoom:e.zoom,rotation:_I(e.rotation),aspectRatio:e.aspectRatio,flip:e.flip};return Wm(u,$m)===!1},[e,o]),c=(0,Zs.useCallback)(async u=>e.croppedAreaPixels?boe(u,e.croppedAreaPixels,e.rotation,e.flip):null,[e.croppedAreaPixels,e.rotation,e.flip]);return(0,Zs.useMemo)(()=>({cropperState:e,setCropperState:n,resetState:o,setResetState:i,isDirty:a,reset:s,getCroppedImage:c}),[e,n,o,i,a,s,c])}var voe=l(w(),1),yoe=(0,db.createContext)({cropperState:{crop:{x:0,y:0},croppedArea:{x:0,y:0,width:100,height:100},croppedAreaPixels:null,zoom:ub,rotation:0,aspectRatio:1,flip:{horizontal:!1,vertical:!1},mediaSize:null},setCropperState:()=>{},resetState:null,setResetState:()=>{},isDirty:!1,reset:()=>{},getCroppedImage:()=>Promise.resolve(null)});function G3({children:e}){let t=koe(),o=(0,db.useMemo)(()=>({...t}),[t]);return(0,voe.jsx)(yoe.Provider,{value:o,children:e})}var GS=()=>{let e=(0,db.useContext)(yoe);if(!e)throw new Error("Missing ImageCropperContext");return e};var _oe=l(w(),1);function W3({src:e,onLoad:t,minZoom:o=ub,maxZoom:r=hoe,...n}){let{cropperState:i,setCropperState:s}=GS(),{crop:a,zoom:c,rotation:u,aspectRatio:d,flip:f}=i,m=v=>s({crop:v}),h=v=>s({zoom:v}),p=v=>s({rotation:v}),g=v=>s({mediaSize:v}),b=(0,Soe.useCallback)((v,k)=>{s({croppedArea:v,croppedAreaPixels:k})},[s]);return(0,_oe.jsx)(foe,{classes:{containerClassName:"image-cropper__container",cropAreaClassName:"image-cropper__crop-area",mediaClassName:"image-cropper__image"},minZoom:o,maxZoom:r,rotation:u,image:e,setMediaSize:g,crop:a,zoom:c,aspect:d,onCropChange:m,onZoomChange:h,onCropComplete:b,onMediaLoaded:v=>{t?.(v)},onRotationChange:p,transform:[`translate(${a.x}px, ${a.y}px)`,`rotateZ(${u}deg)`,`rotateY(${f.horizontal?180:0}deg)`,`rotateX(${f.vertical?180:0}deg)`,`scale(${c})`].join(" "),...n})}var pb=l(A(),1),mb=l(N(),1);var xoe=100,woe=300,xI={placement:"bottom-start"};var fb=l(R(),1);var wI=l(F(),1),Km=l(R(),1),hc=l(N(),1),Coe=l(Un(),1),Boe=l(Fe(),1);var zEe={crop:(0,hc.__)("Image cropped."),rotate:(0,hc.__)("Image rotated."),cropAndRotate:(0,hc.__)("Image cropped and rotated.")};function Eoe({crop:e,rotation:t,url:o,id:r,onSaveImage:n,onFinishEditing:i}){let{createErrorNotice:s,createSuccessNotice:a}=(0,wI.useDispatch)(Coe.store),[c,u]=(0,Km.useState)(!1),{editMediaEntity:d}=(0,wI.useSelect)(h=>({editMediaEntity:h(_).getSettings()?.[_0]}),[]),f=(0,Km.useCallback)(()=>{u(!1),i()},[i]),m=(0,Km.useCallback)(async()=>{if(!d){i(),s((0,hc.__)("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(zEe[p],{type:"snackbar",actions:[{label:(0,hc.__)("Undo"),onClick:()=>{n({id:r,url:o})}}]}))}catch(g){s((0,hc.sprintf)((0,hc.__)("Could not edit image. %s"),(0,Boe.__unstableStripHTML)(g.message)),{id:"image-editing-error",type:"snackbar"})}finally{u(!1),i()}},[e,t,r,o,n,s,a,i,d]);return(0,Km.useMemo)(()=>({isInProgress:c,apply:m,cancel:f}),[c,m,f])}var Xs=l(R(),1),Toe=l(ut(),1);function Ioe({url:e,naturalWidth:t,naturalHeight:o}){let[r,n]=(0,Xs.useState)(),{cropperState:i,setCropperState:s}=GS(),{zoom:a,aspectRatio:c,crop:u,croppedArea:d}=i,f=(0,Xs.useCallback)(k=>{s({zoom:k})},[s]),m=(0,Xs.useCallback)(k=>{s({aspectRatio:k})},[s]),h=t/o,p=o/t;(0,Xs.useEffect)(()=>{m(h)},[]);let[g,b]=(0,Xs.useState)(0),v=(0,Xs.useCallback)(()=>{let k=(g+90)%360,y=h,x=a!==1||!(h===c||p===c);if(g%180===90&&(y=1/h),k===0){n(),b(k),s({aspectRatio:x?c:h,crop:{x:-(u.y*y),y:u.x*y}});return}function C(P){let E=document.createElement("canvas"),L=0,T=0;k%180?(E.width=P.target.height,E.height=P.target.width):(E.width=P.target.width,E.height=P.target.height),(k===90||k===180)&&(L=E.width),(k===270||k===180)&&(T=E.height);let O=E.getContext("2d");O.translate(L,T),O.rotate(k*Math.PI/180),O.drawImage(P.target,0,0),E.toBlob(D=>{n(URL.createObjectURL(D)),b(k);let U=x?c:E.width/E.height;s({aspectRatio:U,crop:{x:-(u.y*y),y:u.x*y}})})}let B=new window.Image;B.src=e,B.onload=C;let I=(0,Toe.applyFilters)("media.crossOrigin",void 0,e);typeof I=="string"&&(B.crossOrigin=I)},[g,h,e,s,u,a,c,p,b]);return(0,Xs.useMemo)(()=>({editedUrl:r,setEditedUrl:n,crop:d,zoom:a,setZoom:f,rotation:g,rotateClockwise:v,aspect:c,setAspect:m,defaultAspect:h}),[r,d,a,f,g,v,c,m,h])}var Poe=l(w(),1),$3=(0,fb.createContext)({});$3.displayName="ImageEditingContext";var Ua=()=>(0,fb.useContext)($3);function Roe({id:e,url:t,naturalWidth:o,naturalHeight:r,onFinishEditing:n,onSaveImage:i,children:s}){let a=Ioe({url:t,naturalWidth:o,naturalHeight:r}),c=Eoe({id:e,url:t,onSaveImage:i,onFinishEditing:n,...a}),u=(0,fb.useMemo)(()=>({...a,...c}),[a,c]);return(0,Poe.jsx)($3.Provider,{value:u,children:s})}var ts=l(w(),1);function CI({aspectRatios:e,isDisabled:t,label:o,onClick:r,value:n}){return(0,ts.jsx)(pb.MenuGroup,{label:o,children:e.map(({name:i,slug:s,ratio:a})=>(0,ts.jsx)(pb.MenuItem,{disabled:t,onClick:()=>{r(a)},role:"menuitemradio",isSelected:a===n,icon:a===n?gl:void 0,children:i},s))})}function jEe(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 K3({ratio:e,...t}){return{ratio:jEe(e),...t}}function Ooe({toggleProps:e}){let{isInProgress:t,aspect:o,setAspect:r,defaultAspect:n}=Ua(),[i,s,a]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,ts.jsx)(pb.DropdownMenu,{icon:jO,label:(0,mb.__)("Aspect Ratio"),popoverProps:xI,toggleProps:e,children:({onClose:c})=>(0,ts.jsxs)(ts.Fragment,{children:[(0,ts.jsx)(CI,{isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:[{slug:"original",name:(0,mb.__)("Original"),ratio:n},...a?i.map(K3).filter(({ratio:u})=>u===1):[]]}),s?.length>0&&(0,ts.jsx)(CI,{label:(0,mb.__)("Theme"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:s}),a&&(0,ts.jsx)(CI,{label:(0,mb.__)("Landscape"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(K3).filter(({ratio:u})=>u>1)}),a&&(0,ts.jsx)(CI,{label:(0,mb.__)("Portrait"),isDisabled:t,onClick:u=>{r(u),c()},value:o,aspectRatios:i.map(K3).filter(({ratio:u})=>u<1)})]})})}var Aoe=l(A(),1),Loe=l(Z(),1);var Cd=l(w(),1);function Noe({url:e,width:t,height:o,naturalHeight:r,naturalWidth:n,borderProps:i}){let{isInProgress:s,editedUrl:a,rotation:c}=Ua(),[u,{width:d}]=(0,Loe.useResizeObserver)(),f=o||d*r/n;c%180===90&&(f=d*n/r);let m=(0,Cd.jsxs)("div",{className:V("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||d,height:f},children:[(0,Cd.jsx)(W3,{src:a||e}),s&&(0,Cd.jsx)(Aoe.Spinner,{})]});return(0,Cd.jsxs)(Cd.Fragment,{children:[u,m]})}var Bd=l(A(),1),Y3=l(N(),1);var WS=l(w(),1);function Moe(){let{isInProgress:e,zoom:t,setZoom:o}=Ua();return(0,WS.jsx)(Bd.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:xI,renderToggle:({isOpen:r,onToggle:n})=>(0,WS.jsx)(Bd.ToolbarButton,{icon:tN,label:(0,Y3.__)("Zoom"),onClick:n,"aria-expanded":r,disabled:e}),renderContent:()=>(0,WS.jsx)(Bd.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,WS.jsx)(Bd.RangeControl,{__next40pxDefaultSize:!0,label:(0,Y3.__)("Zoom"),min:xoe,max:woe,value:Math.round(t*100),onChange:r=>o(r/100)})})})}var Doe=l(A(),1),Voe=l(N(),1);var Foe=l(w(),1);function zoe(){let{isInProgress:e,rotateClockwise:t}=Ua();return(0,Foe.jsx)(Doe.ToolbarButton,{icon:XL,label:(0,Voe.__)("Rotate"),onClick:t,disabled:e})}var q3=l(A(),1),Z3=l(N(),1);var Ym=l(w(),1);function joe(){let{isInProgress:e,apply:t,cancel:o}=Ua();return(0,Ym.jsxs)(Ym.Fragment,{children:[(0,Ym.jsx)(q3.ToolbarButton,{onClick:t,disabled:e,children:(0,Z3.__)("Apply")}),(0,Ym.jsx)(q3.ToolbarButton,{onClick:o,children:(0,Z3.__)("Cancel")})]})}var ci=l(w(),1);function Uoe({id:e,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i,onSaveImage:s,onFinishEditing:a,borderProps:c}){return(0,ci.jsx)(G3,{children:(0,ci.jsxs)(Roe,{id:e,url:t,naturalWidth:i,naturalHeight:n,onSaveImage:s,onFinishEditing:a,children:[(0,ci.jsx)(Noe,{borderProps:c,url:t,width:o,height:r,naturalHeight:n,naturalWidth:i}),(0,ci.jsxs)(Mt,{children:[(0,ci.jsxs)($S.ToolbarGroup,{children:[(0,ci.jsx)(Moe,{}),(0,ci.jsx)($S.ToolbarItem,{children:u=>(0,ci.jsx)(Ooe,{toggleProps:u})}),(0,ci.jsx)(zoe,{})]}),(0,ci.jsx)($S.ToolbarGroup,{children:(0,ci.jsx)(joe,{})})]})]})})}var ui=l(A(),1),Ed=l(N(),1);var hb=l(R(),1);function Hoe(e,t,o,r,n){let[i,s]=(0,hb.useState)(t??r??""),[a,c]=(0,hb.useState)(e??o??"");return(0,hb.useEffect)(()=>{t===void 0&&r!==void 0&&s(r),e===void 0&&o!==void 0&&c(o)},[r,o]),(0,hb.useEffect)(()=>{t!==void 0&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),e!==void 0&&Number.parseInt(e)!==Number.parseInt(a)&&c(e)},[t,e]),{currentHeight:a,currentWidth:i,updateDimension:(f,m)=>{let h=m===""?void 0:parseInt(m,10);f==="width"?s(h):c(h),n({[f]:h})},updateDimensions:(f,m)=>{c(f??o),s(m??r),n({height:f,width:m})}}}var os=l(w(),1),Goe=[25,50,75,100],UEe=()=>{};function Woe(e,t,o){let r=Math.round(t*(e/100)),n=Math.round(o*(e/100));return{scaledWidth:r,scaledHeight:n}}function $oe({imageSizeHelp:e,imageWidth:t,imageHeight:o,imageSizeOptions:r=[],isResizable:n=!0,slug:i,width:s,height:a,onChange:c,onChangeImage:u=UEe}){let{currentHeight:d,currentWidth:f,updateDimension:m,updateDimensions:h}=Hoe(a,s,o,t,c),p=b=>{if(b===void 0){h();return}let{scaledWidth:v,scaledHeight:k}=Woe(b,t,o);h(k,v)},g=Goe.find(b=>{let{scaledWidth:v,scaledHeight:k}=Woe(b,t,o);return f===v&&d===k});return(0,os.jsxs)(ui.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[r&&r.length>0&&(0,os.jsx)(ui.SelectControl,{label:(0,Ed.__)("Resolution"),value:i,options:r,onChange:u,help:e,size:"__unstable-large"}),n&&(0,os.jsxs)(os.Fragment,{children:[(0,os.jsxs)(ui.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,os.jsx)(ui.__experimentalNumberControl,{label:(0,Ed.__)("Width"),value:f,min:1,onChange:b=>m("width",b),size:"__unstable-large"}),(0,os.jsx)(ui.__experimentalNumberControl,{label:(0,Ed.__)("Height"),value:d,min:1,onChange:b=>m("height",b),size:"__unstable-large"})]}),(0,os.jsx)(ui.__experimentalToggleGroupControl,{label:(0,Ed.__)("Image size presets"),hideLabelFromVision:!0,onChange:p,value:g,isBlock:!0,__next40pxDefaultSize:!0,children:Goe.map(b=>(0,os.jsx)(ui.__experimentalToggleGroupControlOption,{value:b,label:(0,Ed.sprintf)((0,Ed.__)("%d%%"),b)},b))})]})]})}var BI=l(A(),1);var qm=l(N(),1),Yoe=l(w(),1),Koe={left:ru,center:ou,right:nu,"space-between":Fp,stretch:zp};function HEe({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?Koe[r]:Koe.left,c=[{name:"left",icon:ru,title:(0,qm.__)("Justify items left"),isActive:r==="left",onClick:()=>s("left")},{name:"center",icon:ou,title:(0,qm.__)("Justify items center"),isActive:r==="center",onClick:()=>s("center")},{name:"right",icon:nu,title:(0,qm.__)("Justify items right"),isActive:r==="right",onClick:()=>s("right")},{name:"space-between",icon:Fp,title:(0,qm.__)("Space between items"),isActive:r==="space-between",onClick:()=>s("space-between")},{name:"stretch",icon:zp,title:(0,qm.__)("Stretch items"),isActive:r==="stretch",onClick:()=>s("stretch")}],u=i?BI.ToolbarGroup:BI.ToolbarDropdownMenu,d=i?{isCollapsed:t}:{};return(0,Yoe.jsx)(u,{icon:a,popoverProps:n,label:(0,qm.__)("Change items justification"),controls:c.filter(f=>e.includes(f.name)),...d})}var X3=HEe;var Q3=l(w(),1),ah=e=>(0,Q3.jsx)(X3,{...e,isToolbar:!1}),qoe=e=>(0,Q3.jsx)(X3,{...e,isToolbar:!0});var Qr=l(A(),1),Qs=l(N(),1),no=l(R(),1),zre=l(Z(),1),jre=l(Fe(),1),Ure=l(it(),1),Hre=l(Jy(),1),zI=l(F(),1),aF=l(Zp(),1);var Gre=l(Re(),1),jI=l(dn(),1);var gb=l(A(),1);var EI=l(Z(),1),TI=l(N(),1),Zoe=l(R(),1),gc=l(w(),1);function Xoe({children:e,settingsOpen:t,setSettingsOpen:o}){let r=(0,EI.useReducedMotion)(),n=r?Zoe.Fragment:gb.__unstableAnimatePresence,i=r?"div":gb.__unstableMotion.div,a=`link-control-settings-drawer-${(0,EI.useInstanceId)(Xoe)}`;return(0,gc.jsxs)(gc.Fragment,{children:[(0,gc.jsx)(gb.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":t,onClick:()=>o(!t),icon:(0,TI.isRTL)()?ev:tu,"aria-controls":a,children:(0,TI._x)("Advanced","Additional link settings")}),(0,gc.jsx)(n,{children:t&&(0,gc.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,gc.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:e})})})]})}var Qoe=Xoe;var LI=l(R(),1),iF=l(N(),1),bre=l(Re(),1);var KS=l(N(),1),cre=l(A(),1);var II=l(N(),1),Joe=l(A(),1),ere=l(R(),1);var J3=l(w(),1),GEe=({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,ere.createInterpolateElement)((0,II.sprintf)((0,II.__)("Create: <mark>%s</mark>"),e),{mark:(0,J3.jsx)("mark",{})}),(0,J3.jsx)(Joe.MenuItem,{...o,iconPosition:"left",icon:Bi,className:"block-editor-link-control__search-item",onClick:t,children:n})},tre=GEe;var bc=l(N(),1),RI=l(A(),1);var ore=l(Fe(),1),kb=l(dn(),1),rre=l(Z(),1),nre=l(Re(),1),bb=l(w(),1),PI={post:{icon:$L,label:(0,bc.__)("Post")},page:{icon:kl,label:(0,bc.__)("Page")},post_tag:{icon:xN,label:(0,bc.__)("Tag")},category:{icon:$O,label:(0,bc.__)("Category")},attachment:{icon:SA,label:(0,bc.__)("Attachment")}};function WEe({isURL:e,suggestion:t}){let o=null;return e?o=ov:t.type in PI&&(o=PI[t.type].icon,t.type==="page"&&(t.isFrontPage&&(o=JA),t.isBlogHome&&(o=DN))),o?(0,bb.jsx)(we,{className:"block-editor-link-control__search-item-icon",icon:o}):null}function $Ee(e){return e?.trim()?.length?e?.replace(/^\/?/,"/"):e}function KEe(e){return e?.trim()?.length?e?.replace(/\/$/,""):e}var YEe=(e,...t)=>(...o)=>e(...o,...t),qEe=e=>t=>t==null||t!==t?e:t;function ZEe(e){return e&&(0,rre.pipe)(kb.safeDecodeURI,kb.getPath,qEe(""),YEe(kb.filterURLForDisplay,24),KEe,$Ee)(e)}var ire=({itemProps:e,suggestion:t,searchTerm:o,onClick:r,isURL:n=!1,shouldShowType:i=!1})=>{let s=n?(0,bc.__)("Press ENTER to add this link"):ZEe(t.url);return(0,bb.jsx)(RI.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,bb.jsx)(WEe,{suggestion:t,isURL:n}),onClick:r,shortcut:i&&XEe(t),className:"block-editor-link-control__search-item",children:(0,bb.jsx)(RI.TextHighlight,{text:(0,ore.__unstableStripHTML)(t.title),highlight:o})})};function XEe(e){return e.isFrontPage?(0,bc.__)("Front page"):e.isBlogHome?(0,bc.__)("Blog home"):e.type in PI?PI[e.type].label:e.type}var sre=ire,are=e=>((0,nre.default)("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,bb.jsx)(ire,{...e}));var lre=l(N(),1),Zm="__CREATE__",eF="tel",OI="link",tF="mailto",oF="internal",vb=[OI,tF,eF,oF],rF=[{id:"opensInNewTab",title:(0,lre.__)("Open in new tab")}];var ure=l(Re(),1),Xm=l(w(),1);function dre({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:n,suggestions:i,selectedSuggestion:s,isLoading:a,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){let f=V("block-editor-link-control__search-results",{"is-loading":a}),m=i.length===1&&vb.includes(i[0].type),h=e&&!m&&!c,p=!d?.type,g=c?(0,KS.__)("Suggestions"):(0,KS.sprintf)((0,KS.__)('Search results for "%s"'),t);return(0,Xm.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,Xm.jsx)("div",{...r,className:f,"aria-label":g,children:(0,Xm.jsx)(cre.MenuGroup,{children:i.map((b,v)=>h&&Zm===b.type?(0,Xm.jsx)(tre,{searchTerm:t,buttonText:u,onClick:()=>o(b),itemProps:n(b,v),isSelected:v===s},b.type):Zm===b.type?null:(0,Xm.jsx)(sre,{itemProps:n(b,v),suggestion:b,index:v,onClick:()=>{o(b)},isSelected:v===s,isURL:vb.includes(b.type),searchTerm:t,shouldShowType:p,isFrontPage:b?.isFrontPage,isBlogHome:b?.isBlogHome},`${b.id}-${b.type}`))})})})}var fre=dre,mre=e=>((0,ure.default)("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,Xm.jsx)(dre,{...e}));var pre=l(R(),1),hre=l(F(),1);var AI=l(dn(),1);function YS(e){let t=e?.trim();if(!t)return{url:t,type:OI};let o=OI,r=(0,AI.getProtocol)(t)||"";return r.includes("mailto")?o=tF:r.includes("tel")?o=eF:t?.startsWith("#")&&(o=oF),gf(t)||bf(t)||t.startsWith("?")||r?{url:t,type:o}:{url:(0,AI.prependHTTPS)(t),type:o}}var QEe=()=>Promise.resolve([]),JEe=e=>{let{url:t,type:o}=YS(e);return Promise.resolve([{id:e,title:e,url:t,type:o}])},eTe=async(e,t,o,r,n,i)=>{let{isInitialSuggestions:s}=t,a=await o(e,t);return a.map(c=>Number(c.id)===n?(c.isFrontPage=!0,c):(Number(c.id)===i&&(c.isBlogHome=!0),c)),s||kf(e)||!r?a:a.concat({title:e,url:e,type:Zm})};function gre(e,t,o){let{fetchSearchSuggestions:r,pageOnFront:n,pageForPosts:i}=(0,hre.useSelect)(a=>{let{getSettings:c}=a(_);return{pageOnFront:c().pageOnFront,pageForPosts:c().pageForPosts,fetchSearchSuggestions:c().__experimentalFetchLinkSuggestions}},[]),s=t?JEe:QEe;return(0,pre.useCallback)((a,{isInitialSuggestions:c})=>kf(a)?s(a,{isInitialSuggestions:c}):eTe(a,{...e,isInitialSuggestions:c},r,o,n,i),[s,r,n,i,e,o])}var yb=l(w(),1),tTe=()=>Promise.resolve([]),nF=()=>{},kre=(0,LI.forwardRef)(({value:e,children:t,currentLink:o={},className:r=null,placeholder:n=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=nF,onChange:a=nF,onSelect:c=nF,showSuggestions:u=!0,renderSuggestions:d=C=>(0,yb.jsx)(fre,{...C}),fetchSuggestions:f=null,allowDirectEntry:m=!0,showInitialSuggestions:h=!1,suggestionsQuery:p={},withURLSuggestion:g=!0,createSuggestionButtonText:b,hideLabelFromVision:v=!1,suffix:k,isEntity:y=!1,customValidity:S},x)=>{let C=gre(p,m,i,g),B=u?f||C:tTe,[I,P]=(0,LI.useState)(),E=(U,G)=>{a(U),P(G)},L=U=>d({...U,withCreateSuggestion:i,createSuggestionButtonText:b,suggestionsQuery:p,handleSuggestionClick:G=>{U.handleSuggestionClick&&U.handleSuggestionClick(G),T(G)}}),T=async U=>{let G=U;if(Zm===U.type){try{G=await s(U.title),G?.url&&c(G)}catch{}return}if(m||G&&Object.keys(G).length>=1){let{id:j,url:z,kind:W,type:ee,...se}=o??{};c({...se,...G},G)}},O=n??(0,iF.__)("Search or type URL"),D=v&&n!==""?O:(0,iF.__)("Link");return(0,yb.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,yb.jsx)(Td,{disableSuggestions:o?.url===e,label:D,hideLabelFromVision:v,className:r,value:e,onChange:E,placeholder:O,__experimentalRenderSuggestions:u?L:null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:h,customValidity:S,required:!1,onSubmit:(U,G)=>{let j=U||I;!j&&!e?.trim()?.length?G.preventDefault():T(j||{url:e})},inputRef:x,suffix:k,disabled:y}),t]})}),vre=kre,yre=e=>((0,bre.default)("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,yb.jsx)(kre,{...e}));var Id=l(N(),1),Lo=l(A(),1),Cre=l(Z(),1),DI=l(dn(),1);var Bre=l(Fe(),1),VI=l(F(),1),Ere=l(Un(),1),Tre=l(Zp(),1);var Sre=l(A(),1),{Slot:_re,Fill:xre}=(0,Sre.createSlotFill)("BlockEditorLinkControlViewer");var wre=l(F(),1),NI=l(R(),1);function oTe(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 rTe(e){let[t,o]=(0,NI.useReducer)(oTe,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,wre.useSelect)(n=>{let{getSettings:i}=n(_);return{fetchRichUrlData:i().__experimentalFetchRichUrlData}},[]);return(0,NI.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 MI=rTe;var vt=l(w(),1),{Badge:nTe}=M(Lo.privateApis);function Ire({value:e,onEditClick:t,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:n}){let i=(0,VI.useSelect)(b=>b(Tre.store).get("core","showIconLabels"),[]),s=o?e?.url:null,{richData:a,isFetching:c}=MI(s),u=a&&Object.keys(a).length,d=e&&(0,DI.filterURLForDisplay)((0,DI.safeDecodeURI)(e.url),24)||"",f=!e?.url?.length,m=!f&&(0,Bre.__unstableStripHTML)(a?.title||e?.title||d),h;a?.icon?h=(0,vt.jsx)("img",{src:a?.icon,alt:""}):f?h=(0,vt.jsx)(we,{icon:oL,size:32}):h=(0,vt.jsx)(we,{icon:ov});let{createNotice:p}=(0,VI.useDispatch)(Ere.store),g=(0,Cre.useCopyToClipboard)(e.url,()=>{p("info",(0,Id.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})});return(0,vt.jsx)(Lo.Flex,{role:"group","aria-label":(0,Id.__)("Manage link"),className:V("block-editor-link-control__preview",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":f,"is-url-title":m===d}),children:(0,vt.jsxs)(Lo.Flex,{gap:0,align:"flex-start",children:[(0,vt.jsxs)(Lo.Flex,{className:"block-editor-link-control__link-information",role:"figure","aria-label":(0,Id.__)("Link information"),justify:"start",align:"flex-start",children:[e?.image?(0,vt.jsx)(Lo.Flex,{className:"block-editor-link-control__preview-image",justify:"center",children:(0,vt.jsx)("img",{src:e?.image,alt:""})}):(0,vt.jsx)(Lo.Flex,{className:V("block-editor-link-control__preview-icon",{"is-image":a?.icon}),justify:"center",children:h}),(0,vt.jsx)(Lo.Flex,{className:"block-editor-link-control__preview-details",direction:"column",gap:2,children:f?(0,vt.jsx)("span",{className:"block-editor-link-control__preview-error-notice",children:(0,Id.__)("Link is empty")}):(0,vt.jsxs)(vt.Fragment,{children:[(0,vt.jsx)(Lo.ExternalLink,{className:"block-editor-link-control__preview-title",href:e.url,children:(0,vt.jsx)(Lo.__experimentalTruncate,{numberOfLines:1,children:m})}),(0,vt.jsx)("span",{className:"block-editor-link-control__preview-info",children:(0,vt.jsx)(Lo.__experimentalTruncate,{numberOfLines:1,children:d})}),e?.badges?.length>0&&(0,vt.jsx)(Lo.__experimentalHStack,{className:"block-editor-link-control__preview-badges",alignment:"left",gap:1,children:e.badges.map((b,v)=>(0,vt.jsx)(nTe,{intent:b.intent,children:b.label},`${b.label}|${b.intent}|${v}`))})]})})]}),(0,vt.jsx)(Lo.Button,{icon:Of,label:(0,Id.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),r&&(0,vt.jsx)(Lo.Button,{icon:Ci,label:(0,Id.__)("Remove link"),onClick:n,size:"compact",showTooltip:!i}),(0,vt.jsx)(Lo.Button,{icon:nA,label:(0,Id.__)("Copy link"),ref:g,accessibleWhenDisabled:!0,disabled:f,size:"compact",showTooltip:!i}),(0,vt.jsx)(_re,{fillProps:e})]})})}var Pre=l(N(),1),FI=l(A(),1),Sb=l(w(),1),iTe=()=>{},sTe=({value:e,onChange:t=iTe,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,Sb.jsx)("div",{className:"block-editor-link-control__setting",children:s},i.id)}return null}return(0,Sb.jsx)(FI.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,Sb.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,Sb.jsx)(FI.VisuallyHidden,{as:"legend",children:(0,Pre.__)("Currently selected link settings")}),n]})},Rre=sTe;var Ore=l(N(),1),Qm=l(R(),1);function Are(e){let t=(0,Qm.useRef)(),[o,r]=(0,Qm.useState)(!1),[n,i]=(0,Qm.useState)(null),s=async function(a){r(!0),i(null);try{return t.current=aTe(Promise.resolve(e(a))),await t.current.promise}catch(c){if(c&&c.isCanceled)return;throw i(c.message||(0,Ore.__)("An unknown error occurred during creation. Please try again.")),c}finally{r(!1)}};return(0,Qm.useEffect)(()=>()=>{t.current&&t.current.cancel()},[]),{createPage:s,isCreatingPage:o,errorMessage:n}}var aTe=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 sF=l(R(),1),Mre=l(Nre(),1);function Dre(e){let[t,o]=(0,sF.useState)(e||{}),[r,n]=(0,sF.useState)(e);return(0,Mre.default)(e,r)||(n(e),o(e)),[t,o,c=>{o({...t,url:c})},c=>{o({...t,title:c})},c=>u=>{let d=Object.keys(u).reduce((f,m)=>(c.includes(m)&&(f[m]=u[m]),f),{});o({...t,...d})}]}var Pt=l(w(),1),lF=()=>{},Vre="core/block-editor",Fre="linkControlSettingsDrawer";function Jm({searchInputPlaceholder:e,value:t,settings:o=rF,onChange:r=lF,onInputChange:n,onRemove:i,onCancel:s,noDirectEntry:a=!1,showSuggestions:c=!0,showInitialSuggestions:u,forceIsEditingLink:d,createSuggestion:f,withCreateSuggestion:m,inputValue:h="",suggestionsQuery:p={},noURLSuggestion:g=!1,createSuggestionButtonText:b,hasRichPreviews:v=!1,hasTextControl:k=!1,renderControlBottom:y=null,handleEntities:S=!1}){m===void 0&&f&&(m=!0);let[x,C]=(0,no.useState)(!1),[B,I]=(0,no.useState)(void 0),{advancedSettingsPreference:P}=(0,zI.useSelect)(ge=>({advancedSettingsPreference:ge(aF.store).get(Vre,Fre)??!1}),[]),{set:E}=(0,zI.useDispatch)(aF.store),L=ge=>{E&&E(Vre,Fre,ge),C(ge)},T=P||x,O=(0,no.useRef)(!0),D=(0,no.useRef)(),U=(0,no.useRef)(),G=(0,no.useRef)(),j=(0,no.useRef)(),z=o.map(({id:ge})=>ge),[W,ee,se,ce,ie]=Dre(t),re=ge=>{se(ge),n?.(ge)},Q=S&&!!W?.id,Y=(0,zre.useInstanceId)(Jm,"link-control"),J=Q?`${Y}__help`:null,K=t&&!(0,Hre.isShallowEqualObjects)(W,t),[H,X]=(0,no.useState)(d!==void 0?d:!t||!t.url),{createPage:ne,isCreatingPage:le,errorMessage:ve}=Are(f);(0,no.useEffect)(()=>{d!==void 0&&X(d)},[d]),(0,no.useEffect)(()=>{if(O.current)return;(jre.focus.focusable.find(D.current)[0]||D.current).focus()},[H,le]),(0,no.useEffect)(()=>(O.current=!1,()=>{O.current=!0}),[]);let he=(0,no.useRef)();(0,no.useEffect)(()=>{if(he.current===void 0){he.current=h;return}he.current!==h&&(console.warn("LinkControl: The inputValue prop is uncontrolled and only sets the initial value. onInputChange is an observer for the input value. Changes to inputValue from the parent will not update the search input."),he.current=h)},[h]),(0,no.useEffect)(()=>{if(B?.type==="invalid"){let ge=G.current;ge&&typeof ge.reportValidity=="function"&&ge.reportValidity()}},[B]);let xe=t?.url?.trim()?.length>0,ze=()=>{X(!1)},ot=ge=>{let Ct={type:"invalid",message:(0,Qs.__)("Please enter a valid URL.")},Io={type:"valid"},Ke=ge?.trim();if(!Ke?.length||!kf(Ke))return Ct;if(gf(Ke)||bf(Ke))return Io;let te=(0,jI.prependHTTPS)(Ke);return(0,jI.isURL)(te)?Io:Ct},Wt=ge=>{if(!(ge&&ge.id&&ge.type&&!vb.includes(ge.type))){let Ke=ge?.url||$t,te=ot(Ke);if(te.type==="invalid"){I(te);return}let{url:Le}=YS(Ke);ge={...ge,url:Le}}ge?.kind==="taxonomy"&&ge?.url&&(j.current=ge.url);let Io=Object.keys(ge).reduce((Ke,te)=>(z.includes(te)||(Ke[te]=ge[te]),Ke),{});r({...W,...Io,title:W?.title||ge?.title}),I(void 0),ze()},fo=()=>{if(lr)return!1;let ge=$t.trim(),Ct=W&&W.id&&W.type&&!vb.includes(W.type),Io=t?.url===ge;if(Ct&&Io)return I(void 0),!0;let Ke=ot($t);return Ke.type==="invalid"?(I(Ke),!1):(I(void 0),!0)},Do=()=>{K&&r({...t,...W,url:YS($t).url}),ze(),I(void 0)},rt=()=>{fo()&&Do()},ar=ge=>{let{keyCode:Ct}=ge;Ct===Ure.ENTER&&!lr&&(ge.preventDefault(),rt())},xt=()=>{ee(t)},At=ge=>{ge.preventDefault(),ge.stopPropagation(),xt(),I(void 0),xe?ze():i?.(),s?.()},[Pe,wt]=(0,no.useState)(!1),qo=()=>{let{id:ge,kind:Ct,type:Io,...Ke}=W;ee({...Ke,id:void 0,kind:void 0,type:void 0,url:void 0}),wt(!0)};(0,no.useEffect)(()=>{Pe&&(G.current?.focus(),wt(!1))},[Pe]);let $t=W?.url!==void 0?W.url:h||"",lr=!$t?.trim()?.length;(0,no.useEffect)(()=>{I(void 0)},[$t]);let ln=!B,je=i&&t&&!H&&!le,Eo=H&&xe,Ze=xe&&k,Ve=(H||!t)&&!le,gt=lr||!ln||t&&!K,To=!!o?.length&&H&&xe,cr=(0,no.useMemo)(()=>t?.kind==="taxonomy"&&!t?.url&&j.current?{...t,url:j.current}:t,[t]);return(0,Pt.jsxs)("div",{tabIndex:-1,ref:D,className:"block-editor-link-control",children:[le&&(0,Pt.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,Pt.jsx)(Qr.Spinner,{})," ",(0,Qs.__)("Creating"),"\u2026"]}),Ve&&(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsxs)("div",{className:V({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":Ze,"has-actions":Eo}),children:[Ze&&(0,Pt.jsx)(Qr.TextControl,{ref:U,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,Qs.__)("Text"),value:W?.title,onChange:ce,onKeyDown:ar,__next40pxDefaultSize:!0}),(0,Pt.jsx)(vre,{ref:G,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:$t,withCreateSuggestion:m,onCreateSuggestion:ne,onChange:re,onSelect:Wt,showInitialSuggestions:u,allowDirectEntry:!a,showSuggestions:c,suggestionsQuery:p,withURLSuggestion:!g,createSuggestionButtonText:b,hideLabelFromVision:!Ze,isEntity:Q,customValidity:B,suffix:(0,Pt.jsx)(lTe,{isEntity:Q,showActions:Eo,isDisabled:gt,onUnlink:qo,onSubmit:rt,helpTextId:J})}),Q&&J&&(0,Pt.jsx)("p",{id:J,className:"block-editor-link-control__help",children:(0,Qs.sprintf)((0,Qs.__)("Synced with the selected %s."),W?.type||"item")})]}),ve&&(0,Pt.jsx)(Qr.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:ve})]}),t&&!H&&!le&&(0,Pt.jsx)(Ire,{value:cr,onEditClick:()=>X(!0),hasRichPreviews:v,hasUnlinkControl:je,onRemove:()=>{i(),X(!0)}},cr?.url),To&&(0,Pt.jsx)("div",{className:"block-editor-link-control__tools",children:!lr&&(0,Pt.jsx)(Qoe,{settingsOpen:T,setSettingsOpen:L,children:(0,Pt.jsx)(Rre,{value:W,settings:o,onChange:ie(z)})})}),Eo&&(0,Pt.jsxs)(Qr.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,Pt.jsx)(Qr.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:At,children:(0,Qs.__)("Cancel")}),(0,Pt.jsx)(Qr.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:gt?lF:rt,className:"block-editor-link-control__search-submit","aria-disabled":gt,children:(0,Qs.__)("Apply")})]}),!le&&y&&y()]})}function lTe({isEntity:e,showActions:t,isDisabled:o,onUnlink:r,onSubmit:n,helpTextId:i}){if(e)return(0,Pt.jsx)(Qr.Button,{icon:Ci,onClick:r,"aria-describedby":i,showTooltip:!0,label:(0,Qs.__)("Unsync and edit"),__next40pxDefaultSize:!0});if(!t)return(0,Pt.jsx)(Qr.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Pt.jsx)(Qr.Button,{onClick:o?lF:n,label:(0,Qs.__)("Submit"),icon:bl,className:"block-editor-link-control__search-submit","aria-disabled":o,size:"small"})})}Jm.ViewerFill=xre;Jm.DEFAULT_LINK_SETTINGS=rF;var UI=e=>((0,Gre.default)("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,Pt.jsx)(Jm,{...e}));UI.ViewerFill=Jm.ViewerFill;UI.DEFAULT_LINK_SETTINGS=Jm.DEFAULT_LINK_SETTINGS;var Pd=Jm;var $re=l(N(),1),Kre=l(A(),1),Yre=l(Re(),1);var qS=1.5,cF=.01,uF=10,dF="";function Wre(e){return e!==void 0&&e!==dF}var fF=l(w(),1),cTe=({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",...n})=>{let i=Wre(t),s=(d,f)=>{if(i)return d;let m=cF*uF;switch(`${d}`){case`${m}`:return qS+m;case"0":return f?d:qS-m;case"":return qS;default:return d}},a=(d,f)=>{let m=["insertText","insertFromPaste"].includes(f.payload.event.nativeEvent?.inputType),h=s(d.value,m);return{...d,value:h}},c=i?t:dF,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,Yre.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,fF.jsx)("div",{className:"block-editor-line-height-control",children:(0,fF.jsx)(Kre.__experimentalNumberControl,{...n,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:r,__unstableStateReducer:a,onChange:u,label:(0,$re.__)("Line height"),placeholder:qS,step:cF,spinFactor:uF,value:c,min:0,spinControls:"custom"})})},HI=cTe;var Ha=l(N(),1),qre=l(Xo(),1),Jr=l(A(),1),WI=l(F(),1),Zre=l(it(),1);var Xre=l(Z(),1),Qre=l(Fe(),1),Jre=l(Un(),1),ene=l(R(),1);function GI(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 rr=l(w(),1),uTe=()=>{},dTe=0,fTe=({mediaURL:e,mediaId:t,mediaIds:o,allowedTypes:r,accept:n,onError:i,onSelect:s,onSelectURL:a,onReset:c,onToggleFeaturedImage:u,useFeaturedImage:d,onFilesUpload:f=uTe,name:m=(0,Ha.__)("Replace"),createNotice:h,removeNotice:p,children:g,multiple:b=!1,addToGallery:v,handleUpload:k=!0,variant:y,popoverProps:S,renderToggle:x,className:C})=>{let{mediaUpload:B,allowedMimeTypes:I}=(0,WI.useSelect)(z=>{let{getSettings:W}=z(_),ee=W();return{mediaUpload:ee.mediaUpload,allowedMimeTypes:ee.allowedMimeTypes}},[]),P=`block-editor/media-replace-flow/error-notice/${++dTe}`,E=(0,ene.useMemo)(()=>GI(r,I,n),[r,I,n]),L=z=>{let W=(0,Qre.__unstableStripHTML)(z);if(i){i(W);return}setTimeout(()=>{h("error",W,{speak:!0,id:P,isDismissible:!0})},1e3)},T=(z,W)=>{d&&u&&u(),W(),s(z),(0,qre.speak)((0,Ha.__)("The media file has been replaced")),p(P)},O=(z,W)=>{let ee=z.target.files;if(!k)return W(),s(ee);f(ee),B({allowedTypes:r,filesList:ee,onFileChange:([se])=>{T(se,W)},onError:L})},D=z=>{z.keyCode===Zre.DOWN&&(z.preventDefault(),z.target.click())},G=b&&(!r||r.length===0?!1:r.every(z=>z==="image"||z.startsWith("image/"))),j={...S,variant:y};return(0,rr.jsx)(Jr.Dropdown,{popoverProps:j,className:C,contentClassName:V("block-editor-media-replace-flow__options",y&&`is-variant-${y}`),renderToggle:({isOpen:z,onToggle:W})=>x?x({"aria-expanded":z,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}):(0,rr.jsx)(Jr.ToolbarButton,{"aria-expanded":z,"aria-haspopup":"true",onClick:W,onKeyDown:D,children:m}),renderContent:({onClose:z})=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsxs)(Jr.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,rr.jsxs)(Ds,{children:[(0,rr.jsx)(qu,{gallery:G,addToGallery:v,multiple:b,value:b?o:t,onSelect:W=>T(W,z),allowedTypes:r,render:({open:W})=>(0,rr.jsx)(Jr.MenuItem,{icon:jp,onClick:W,children:(0,Ha.__)("Open Media Library")})}),(0,rr.jsx)(Jr.FormFileUpload,{onChange:W=>{O(W,z)},accept:E,multiple:!!b,render:({openFileDialog:W})=>(0,rr.jsx)(Jr.MenuItem,{icon:NN,onClick:()=>{W()},children:(0,Ha._x)("Upload","verb")})})]}),u&&(0,rr.jsx)(Jr.MenuItem,{icon:GL,onClick:u,isPressed:d,children:(0,Ha.__)("Use featured image")}),typeof g=="function"?g({onClose:z}):g,e&&c&&(0,rr.jsx)(Jr.MenuItem,{onClick:()=>{c(),z()},children:(0,Ha.__)("Reset")})]}),a&&(0,rr.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,rr.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,Ha.__)("Current media URL:")}),(0,rr.jsx)(Pd,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:W})=>{a(W)},searchInputPlaceholder:(0,Ha.__)("Paste or type URL")})]})]})})},_b=(0,Xre.compose)([(0,WI.withDispatch)(e=>{let{createNotice:t,removeNotice:o}=e(Jre.store);return{createNotice:t,removeNotice:o}}),(0,Jr.withFilters)("editor.MediaReplaceFlow")])(fTe);var _o=l(A(),1),So=l(N(),1),Ld=l(R(),1),pne=l(F(),1);var hne=l(Re(),1);var pF=l(N(),1),KI=l(R(),1),xb=l(A(),1);var mne=l(Re(),1);var rne=l(N(),1),nne=l(A(),1);var tne=l(A(),1),$I=l(dn(),1),mF=l(w(),1);function one({url:e,urlLabel:t,className:o}){let r=V(o,"block-editor-url-popover__link-viewer-url");return e?(0,mF.jsx)(tne.ExternalLink,{className:r,href:e,children:t||(0,$I.filterURLForDisplay)((0,$I.safeDecodeURI)(e))}):(0,mF.jsx)("span",{className:r})}var ZS=l(w(),1);function ine({className:e,linkClassName:t,onEditLinkClick:o,url:r,urlLabel:n,...i}){return(0,ZS.jsxs)("div",{className:V("block-editor-url-popover__link-viewer",e),...i,children:[(0,ZS.jsx)(one,{url:r,urlLabel:n,className:t}),o&&(0,ZS.jsx)(nne.Button,{icon:Of,label:(0,rne.__)("Edit"),onClick:o,size:"compact"})]})}var une=l(N(),1),dne=l(A(),1);var kc=l(N(),1),XS=l(R(),1),Js=l(it(),1),Tn=l(A(),1),Rd=l(Z(),1),sne=l(F(),1),ane=l(dn(),1);var Ga=l(w(),1),lne=l(jr(),1),{ValidatedInputControl:mTe}=M(Tn.privateApis);function cne(e){return typeof e=="function"}var pTe=class extends XS.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,XS.createRef)(),this.inputRef=e.inputRef||(0,XS.createRef)(),this.hasRenderedValidation={current:!1},this.updateSuggestions=(0,Rd.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,ane.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,kc.sprintf)((0,kc._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,kc.__)("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 Js.UP:{e.target.selectionStart!==0&&(e.preventDefault(),e.target.setSelectionRange(0,0));break}case Js.DOWN:{this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break}case Js.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 Js.UP:{e.preventDefault();let s=o?o-1:r.length-1;this.setState({selectedSuggestion:s});break}case Js.DOWN:{e.preventDefault();let s=o===null||o===r.length-1?0:o+1;this.setState({selectedSuggestion:s});break}case Js.TAB:{this.state.selectedSuggestion!==null&&(this.selectLink(i),this.props.speak((0,kc.__)("Link selected.")));break}case Js.ENTER:{e.preventDefault(),this.state.selectedSuggestion!==null?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e);break}}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:o,__experimentalShowInitialSuggestions:r=!1},{showSuggestions:n}){let i=n,s=e&&e.length;return!r&&!s&&(i=!1),o===!0&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,Ga.jsxs)(Ga.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){let{label:e=null,className:t,isFullWidth:o,instanceId:r,placeholder:n=(0,kc.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:a=!1,help:c=null,disabled:u=!1,customValidity:d,markWhenOptional:f}=this.props,{loading:m,showSuggestions:h,selectedSuggestion:p,suggestionsListboxId:g,suggestionOptionIdPrefix:b}=this.state,v=`url-input-control-${r}`,k={id:v,label:e,className:V("block-editor-url-input",t,{"is-full-width":o}),hideLabelFromVision:a},y={id:v,value:s,required:this.props.required??!0,type:"text",name:v,autoComplete:"off",onChange:u?()=>{}:this.onChange,onFocus:u?()=>{}:this.onFocus,placeholder:n,onKeyDown:u?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,kc.__)("URL"),"aria-expanded":h,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":p!==null?`${b}-${p}`:void 0,ref:this.inputRef,disabled:u,suffix:this.props.suffix,help:c},S={customValidity:d,...f!==void 0&&{markWhenOptional:f}};if(i)return i(k,y,m);d!==void 0&&(this.hasRenderedValidation.current=!0);let x=this.hasRenderedValidation.current?mTe:Tn.__experimentalInputControl;return(0,Ga.jsxs)(Tn.BaseControl,{...k,children:[(0,Ga.jsx)(x,{...y,...this.hasRenderedValidation.current?S:{},__next40pxDefaultSize:!0}),m&&(0,Ga.jsx)(Tn.Spinner,{})]})}renderSuggestions(){let{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:o,suggestions:r,suggestionsValue:n,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:a,loading:c}=this.state;if(!o||r.length===0)return null;let u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(f,m)=>({role:"option",tabIndex:"-1",id:`${a}-${m}`,ref:this.bindSuggestionNode(m),"aria-selected":m===i?!0:void 0});return cne(t)?t({suggestions:r,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!n?.length,currentInputValue:n}):(0,Ga.jsx)(Tn.Popover,{placement:"bottom",focusOnMount:!1,children:(0,Ga.jsx)("div",{...u,className:V("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:r.map((f,m)=>(0,lne.createElement)(Tn.Button,{__next40pxDefaultSize:!0,...d(f,m),key:f.id,className:V("block-editor-url-input__suggestion",{"is-selected":m===i}),onClick:()=>this.handleOnClick(f)},f.title))})})}},Td=(0,Rd.compose)(Rd.withSafeTimeout,Tn.withSpokenMessages,Rd.withInstanceId,(0,sne.withSelect)((e,t)=>{if(cne(t.__experimentalFetchLinkSuggestions))return;let{getSettings:o}=e(_);return{__experimentalFetchLinkSuggestions:o().__experimentalFetchLinkSuggestions}}))(pTe);var QS=l(w(),1);function fne({autocompleteRef:e,className:t,onChangeInputValue:o,value:r,...n}){return(0,QS.jsxs)("form",{className:V("block-editor-url-popover__link-editor",t),...n,children:[(0,QS.jsx)(Td,{value:r,onChange:o,autocompleteRef:e}),(0,QS.jsx)(dne.Button,{icon:bl,label:(0,une.__)("Apply"),type:"submit",size:"compact"})]})}var Od=l(w(),1),{__experimentalPopoverLegacyPositionToPlacement:hTe}=M(xb.privateApis),gTe="bottom",hF=(0,KI.forwardRef)(({additionalControls:e,children:t,renderSettings:o,placement:r,focusOnMount:n="firstElement",position:i,...s},a)=>{i!==void 0&&(0,mne.default)("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"});let c;r!==void 0?c=r:i!==void 0&&(c=hTe(i)),c=c||gTe;let[u,d]=(0,KI.useState)(!1),f=!!o&&u,m=()=>{d(!u)};return(0,Od.jsxs)(xb.Popover,{ref:a,role:"dialog","aria-modal":"true","aria-label":(0,pF.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:n,placement:c,shift:!0,variant:"toolbar",...s,children:[(0,Od.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,Od.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!o&&(0,Od.jsx)(xb.Button,{className:"block-editor-url-popover__settings-toggle",icon:zn,label:(0,pF.__)("Link settings"),onClick:m,"aria-expanded":u,size:"compact"})]})}),f&&(0,Od.jsx)("div",{className:"block-editor-url-popover__settings",children:o()}),e&&!f&&(0,Od.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})});hF.LinkEditor=fne;hF.LinkViewer=ine;var Ad=hF;var Ge=l(w(),1),bTe=()=>{},kTe=({src:e,onChange:t,onSubmit:o,onClose:r,popoverAnchor:n})=>(0,Ge.jsx)(Ad,{anchor:n,onClose:r,children:(0,Ge.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o,children:(0,Ge.jsx)(_o.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,So.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,So.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,Ge.jsx)(_o.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ge.jsx)(_o.Button,{size:"small",icon:bl,label:(0,So.__)("Apply"),type:"submit"})})})})}),vTe=({src:e,onChangeSrc:t,onSelectURL:o})=>{let[r,n]=(0,Ld.useState)(null),[i,s]=(0,Ld.useState)(!1),a=()=>{s(!0)},c=()=>{s(!1),r?.focus()},u=d=>{d.preventDefault(),e&&o&&(o(e),c())};return(0,Ge.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:a,isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:n,children:(0,So.__)("Insert from URL")}),i&&(0,Ge.jsx)(kTe,{src:e,onChange:t,onSubmit:u,onClose:c,popoverAnchor:r})]})};function yTe({value:e={},allowedTypes:t,className:o,icon:r,labels:n={},mediaPreview:i,notices:s,isAppender:a,accept:c,addToGallery:u,multiple:d=!1,handleUpload:f=!0,disableDropZone:m,disableMediaButtons:h,onError:p,onSelect:g,onCancel:b,onSelectURL:v,onToggleFeaturedImage:k,onDoubleClick:y,onFilesPreUpload:S=bTe,onHTMLDrop:x,children:C,mediaLibraryButton:B,placeholder:I,style:P}){x&&(0,hne.default)("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});let{mediaUpload:E,allowedMimeTypes:L}=(0,pne.useSelect)(Y=>{let{getSettings:J}=Y(_),K=J();return{mediaUpload:K.mediaUpload,allowedMimeTypes:K.allowedMimeTypes}},[]),[T,O]=(0,Ld.useState)("");(0,Ld.useEffect)(()=>{O(e?.src??"")},[e?.src]);let D=(0,Ld.useMemo)(()=>GI(t,L,c),[t,L,c]),U=()=>!t||t.length===0?!1:t.every(Y=>Y==="image"||Y.startsWith("image/")),G=Y=>{if(!f||typeof f=="function"&&!f(Y))return g(Y);S(Y);let J;if(d)if(u){let K=[];J=H=>{let X=(e??[]).filter(ne=>ne.id?!K.some(({id:le})=>Number(le)===Number(ne.id)):!K.some(({urlSlug:le})=>ne.url.includes(le)));g(X.concat(H)),K=H.map(ne=>{let le=ne.url.lastIndexOf("."),ve=ne.url.slice(0,le);return{id:ne.id,urlSlug:ve}})}}else J=g;else J=([K])=>g(K);E({allowedTypes:t,filesList:Y,onFileChange:J,onError:p,multiple:d})};async function j(Y){let{blocks:J}=tV(Y);if(!J?.length)return;let K=await Promise.all(J.map(H=>{let X=H.name.split("/")[1];return H.attributes.id?(H.attributes.type=X,H.attributes):new Promise((ne,le)=>{window.fetch(H.attributes.url).then(ve=>ve.blob()).then(ve=>E({filesList:[ve],additionalData:{title:H.attributes.title,alt_text:H.attributes.alt,caption:H.attributes.caption,type:X},onFileChange:([he])=>{he.id&&ne(he)},allowedTypes:t,onError:le})).catch(()=>ne(H.attributes.url))})})).catch(H=>p(H));K?.length&&g(d?K:K[0])}let z=Y=>{G(Y.target.files)},ee=I??(Y=>{let{instructions:J,title:K}=n;if(!E&&!v&&(J=(0,So.__)("To edit this block, you need permission to upload media.")),J===void 0||K===void 0){let X=t??[],[ne]=X,le=X.length===1,ve=le&&ne==="audio",he=le&&ne==="image",xe=le&&ne==="video";J===void 0&&E&&(J=(0,So.__)("Drag and drop an image or video, upload, or choose from your library."),ve?J=(0,So.__)("Drag and drop an audio file, upload, or choose from your library."):he?J=(0,So.__)("Drag and drop an image, upload, or choose from your library."):xe&&(J=(0,So.__)("Drag and drop a video, upload, or choose from your library."))),K===void 0&&(K=(0,So.__)("Media"),ve?K=(0,So.__)("Audio"):he?K=(0,So.__)("Image"):xe&&(K=(0,So.__)("Video")))}let H=V("block-editor-media-placeholder",o,{"is-appender":a});return(0,Ge.jsxs)(_o.Placeholder,{icon:r,label:K,instructions:J,className:H,notices:s,onDoubleClick:y,preview:i,style:P,children:[Y,C]})}),se=()=>m?null:(0,Ge.jsx)(_o.DropZone,{onFilesDrop:G,onDrop:j,isEligible:Y=>{let J="wp-block:core/",K=[];for(let H of Y.types)H.startsWith(J)&&K.push(H.slice(J.length));return K.every(H=>t.includes(H))&&(d?!0:K.length===1)}}),ce=()=>b&&(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,So.__)("Cancel"),variant:"link",onClick:b,children:(0,So.__)("Cancel")}),ie=()=>v&&(0,Ge.jsx)(vTe,{src:T,onChangeSrc:O,onSelectURL:v}),re=()=>k&&(0,Ge.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:k,variant:"secondary",children:(0,So.__)("Use featured image")})}),Q=()=>{let J=B??(({open:H})=>(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{H()},children:(0,So.__)("Media Library")})),K=(0,Ge.jsx)(qu,{addToGallery:u,gallery:d&&U(),multiple:d,onSelect:g,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map(({id:H})=>H):e.id,render:J});if(E&&a)return(0,Ge.jsxs)(Ge.Fragment,{children:[se(),(0,Ge.jsx)(_o.FormFileUpload,{onChange:z,accept:D,multiple:!!d,render:({openFileDialog:H})=>{let X=(0,Ge.jsxs)(Ge.Fragment,{children:[(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:H,children:(0,So._x)("Upload","verb")}),K,ie(),re(),ce()]});return ee(X)}})]});if(E){let H=(0,Ge.jsxs)(Ge.Fragment,{children:[se(),(0,Ge.jsx)(_o.FormFileUpload,{render:({openFileDialog:X})=>(0,Ge.jsx)(_o.Button,{__next40pxDefaultSize:!0,onClick:X,variant:"primary",className:V("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,So._x)("Upload","verb")}),onChange:z,accept:D,multiple:!!d}),K,ie(),re(),ce()]});return ee(H)}return ee(K)};return h?(0,Ge.jsx)(Ds,{children:se()}):(0,Ge.jsx)(Ds,{fallback:ee(ie()),children:Q()})}var gne=(0,_o.withFilters)("editor.MediaPlaceholder")(yTe);var bne=l(w(),1),STe=({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,bne.jsx)(pI,{settings:o,gradients:[],disableCustomGradients:!0,...t})},kne=STe;var pie=l(FM(),1);var hie=l(R(),1);var die=l(R(),1);var iie=l(yf(),1),nr=l(R(),1),Md=l(F(),1),lP=l(Z(),1),sie=l(dr(),1),aie=l(A(),1),lie=l($(),1),cie=l(Re(),1),Ab=l(N(),1);var vne=l(N(),1),YI=l(A(),1);var gF=l(N(),1),ep=l(A(),1);var vc=l(w(),1),_Te={placement:"bottom-start"},xTe=()=>(0,vc.jsxs)(vc.Fragment,{children:[["bold","italic","link","unknown"].map(e=>(0,vc.jsx)(ep.Slot,{name:`RichText.ToolbarControls.${e}`},e)),(0,vc.jsx)(ep.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;let o=e.map(([{props:r}])=>r).some(({isActive:r})=>r);return(0,vc.jsx)(ep.ToolbarItem,{children:r=>(0,vc.jsx)(ep.DropdownMenu,{icon:zn,label:(0,gF.__)("More"),toggleProps:{...r,className:V(r.className,{"is-pressed":o}),description:(0,gF.__)("Displays more block tools")},controls:ma(e.map(([{props:n}])=>n),"title"),popoverProps:_Te})})}})]}),bF=xTe;var Nd=l(w(),1);function wTe({popoverAnchor:e}){return(0,Nd.jsx)(YI.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,Nd.jsx)(Bg,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,vne.__)("Format tools"),children:(0,Nd.jsx)(YI.ToolbarGroup,{children:(0,Nd.jsx)(bF,{})})})})}var CTe=({inline:e,editableContentElement:t})=>e?(0,Nd.jsx)(wTe,{popoverAnchor:t}):(0,Nd.jsx)(Mt,{group:"inline",children:(0,Nd.jsx)(bF,{})}),yne=CTe;var qI=l(R(),1),Sne=l(F(),1);function _ne({html:e,value:t}){let o=(0,qI.useRef)(),r=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:n}=(0,Sne.useDispatch)(_);(0,qI.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 Bb=l(R(),1),jne=l(Z(),1);var JS=l(dr(),1),xne=l(ut(),1);var BTe=["`",'"',"'","\u201C\u201D","\u2018\u2019"],wne=e=>t=>{function o(r){let{inputType:n,data:i}=r,{value:s,onChange:a,registry:c}=e.current;if(n!=="insertText"||(0,JS.isCollapsed)(s))return;let u=(0,xne.applyFilters)("blockEditor.wrapSelectionSettings",BTe).find(([x,C])=>x===i||C===i);if(!u)return;let[d,f=d]=u,m=s.start,h=s.end+d.length,p=(0,JS.insert)(s,d,m,m);p=(0,JS.insert)(p,f,h,h);let{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:b}=c.dispatch(_);g(),a(p),b();let v={};for(let x in r)v[x]=r[x];v.data=f;let{ownerDocument:k}=t,{defaultView:y}=k,S=new y.InputEvent("input",v);window.queueMicrotask(()=>{r.target.dispatchEvent(S)}),r.preventDefault()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var ZI=l(dr(),1),wb=l($(),1);var Cne=l(dr(),1);function Bne(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,Cne.insert)(e,o)}function Ene(e){let t=e.length;for(;t--;){let o=Lv(e[t].attributes);if(o)return e[t].attributes[o]=e[t].attributes[o].toString().replace(wl,""),[e[t].clientId,o,0,0];let r=Ene(e[t].innerBlocks);if(r)return r}return[]}var Tne=e=>t=>{function o(){let{getValue:n,onReplace:i,selectionChange:s,registry:a}=e.current;if(!i)return;let c=n(),{start:u,text:d}=c;if(d.slice(u-1,u)!==" ")return;let m=d.slice(0,u).trim(),h=(0,wb.getBlockTransforms)("from").filter(({type:v})=>v==="prefix"),p=(0,wb.findTransform)(h,({prefix:v})=>m===v);if(!p)return;let g=(0,ZI.toHTMLString)({value:(0,ZI.insert)(c,wl,0,u)}),b=p.transform(g);return s(...Ene([b])),i([b]),a.dispatch(_).__unstableMarkAutomaticChange(),!0}function r(n){let{inputType:i,type:s}=n,{getValue:a,onChange:c,__unstableAllowPrefixTransformations:u,formatTypes:d,registry:f,onReplace:m}=e.current;if(i!=="insertText"&&s!=="compositionend"||u&&o())return;let h=a(),p=(0,wb.getBlockTransforms)("from").filter(y=>y.type==="input"),g=(0,wb.findTransform)(p,y=>y.regExp.test(h.text));if(g){m(g.transform()),f.dispatch(_).__unstableMarkAutomaticChange();return}let b=d.reduce((y,{__unstableInputRule:S})=>(S&&(y=S(y)),y),Bne(h)),{__unstableMarkLastChangeAsPersistent:v,__unstableMarkAutomaticChange:k}=f.dispatch(_);b!==h&&(v(),c({...b,activeFormats:h.activeFormats}),k())}return t.addEventListener("input",r),t.addEventListener("compositionend",r),()=>{t.removeEventListener("input",r),t.removeEventListener("compositionend",r)}};var Ine=e=>t=>{function o(r){if(r.inputType!=="insertReplacementText")return;let{registry:n}=e.current;n.dispatch(_).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",o),()=>{t.removeEventListener("beforeinput",o)}};var XI=l(it(),1),Pne=()=>e=>{function t(o){(XI.isKeyboardEvent.primary(o,"z")||XI.isKeyboardEvent.primary(o,"y")||XI.isKeyboardEvent.primaryShift(o,"z"))&&o.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}};var Rne=e=>t=>{let{keyboardShortcuts:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r)}};var One=e=>t=>{let{inputEvents:o}=e.current;function r(n){for(let i of o.current)i(n)}return t.addEventListener("input",r),()=>{t.removeEventListener("input",r)}};var QI=l(it(),1);var Ane=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented||n!==QI.BACKSPACE&&n!==QI.ESCAPE)return;let{registry:i}=e.current,{didAutomaticChange:s,getSettings:a}=i.select(_),{__experimentalUndo:c}=a();c&&s()&&(r.preventDefault(),c())}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var Nne=l($(),1),Wa=l(dr(),1),Mne=l(dn(),1);var ETe=l(R(),1),TTe=l($(),1),ITe=l(w(),1);function Lne(e,t){if(t?.length){let o=e.formats.length;for(;o--;)e.formats[o]=[...t,...e.formats[o]||[]]}}function JI(e){if(!(e!==!0&&e!=="p"&&e!=="li"))return e===!0?"p":e}function Cb({allowedFormats:e,disableFormats:t}){return t?Cb.EMPTY_ARRAY:e}Cb.EMPTY_ARRAY=[];var Dne=e=>t=>{function o(n){let{disableFormats:i,onChange:s,value:a,formatTypes:c,tagName:u,onReplace:d,__unstableEmbedURLOnPaste:f,preserveWhiteSpace:m,pastePlainText:h}=e.current;if(!t.contains(n.target)||n.defaultPrevented)return;let{plainText:p,html:g}=Ah(n);if(n.preventDefault(),window.console.log(`Received HTML (RichText):

`,g),window.console.log(`Received plain text (RichText):

`,p),i){s((0,Wa.insert)(a,p));return}let b=n.clipboardData.getData("rich-text")==="true";function v(x){let C=c.reduce((B,{__unstablePasteRule:I})=>(I&&B===a&&(B=I(a,{html:g,plainText:p})),B),a);if(C!==a)s(C);else{let B=(0,Wa.create)({html:x});Lne(B,a.activeFormats),s((0,Wa.insert)(a,B))}}if(b){v(g);return}if(h){s((0,Wa.insert)(a,(0,Wa.create)({text:p})));return}let k="INLINE",y=p.trim();f&&(0,Wa.isEmpty)(a)&&(0,Mne.isURL)(y)&&/^https?:/.test(y)&&(k="BLOCKS");let S=(0,Nne.pasteHandler)({HTML:g,plainText:p,mode:k,tagName:u,preserveWhiteSpace:m});typeof S=="string"?v(S):S.length>0&&d&&(0,Wa.isEmpty)(a)&&d(S,S.length-1,-1)}let{defaultView:r}=t.ownerDocument;return r.addEventListener("paste",o),()=>{r.removeEventListener("paste",o)}};var e_=l(it(),1),eP=l(dr(),1),Vne=e=>t=>{function o(r){let{keyCode:n}=r;if(r.defaultPrevented)return;let{value:i,onMerge:s,onRemove:a}=e.current;if(n===e_.DELETE||n===e_.BACKSPACE){let{start:c,end:u,text:d}=i,f=n===e_.BACKSPACE,m=i.activeFormats&&!!i.activeFormats.length;if(!(0,eP.isCollapsed)(i)||m||f&&c!==0||!f&&u!==d.length)return;s?s(!f):a&&(0,eP.isEmpty)(i)&&f&&a(!f),r.preventDefault()}}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}};var kF=l(it(),1),t_=l(dr(),1),Fne=e=>t=>{function o(i){if(i.keyCode!==kF.ENTER)return;let{onReplace:s,onSplit:a}=e.current;s&&a&&(i.__deprecatedOnSplit=!0)}function r(i){if(i.defaultPrevented||i.target!==t||i.keyCode!==kF.ENTER)return;let{value:s,onChange:a,disableLineBreaks:c,onSplitAtEnd:u,onSplitAtDoubleLineEnd:d,registry:f}=e.current;i.preventDefault();let{text:m,start:h,end:p}=s;i.shiftKey?c||a((0,t_.insert)(s,`
`)):u&&h===p&&p===m.length?u():d&&h===p&&p===m.length&&m.slice(-2)===`

`?f.batch(()=>{let g={...s};g.start=g.end-2,a((0,t_.remove)(g)),d()}):c||a((0,t_.insert)(s,`
`))}let{defaultView:n}=t.ownerDocument;return n.addEventListener("keydown",r),t.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",r),t.removeEventListener("keydown",o)}};var zne=e=>t=>{function o(){let{registry:r}=e.current;if(!r.select(_).isMultiSelecting())return;let n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}};var PTe=[wne,Tne,Ine,Pne,Rne,One,Ane,Dne,Vne,Fne,zne];function tP(e){let t=(0,Bb.useRef)(e);(0,Bb.useInsertionEffect)(()=>{t.current=e});let o=(0,Bb.useMemo)(()=>PTe.map(r=>r(t)),[t]);return(0,jne.useRefEffect)(r=>{if(!e.isSelected)return;let n=o.map(i=>i(r));return()=>{n.forEach(i=>i())}},[o,e.isSelected])}var oP=l(dr(),1),rP=l(R(),1);var Une=l(w(),1),Hne=l(jr(),1),RTe={},vF=Symbol("usesContext");function OTe({onChange:e,onFocus:t,value:o,forwardedRef:r,settings:n,isVisible:i}){let{name:s,edit:a,[vF]:c}=n,u=(0,rP.useContext)(xr),d=(0,rP.useMemo)(()=>c?Object.fromEntries(Object.entries(u).filter(([g])=>c.includes(g))):RTe,[c,u]);if(!a)return null;let f=(0,oP.getActiveFormat)(o,s),m=f!==void 0,h=(0,oP.getActiveObject)(o),p=h!==void 0&&h.type===s;return(0,Une.jsx)(a,{isActive:m,isVisible:i,activeAttributes:m?f.attributes||{}:{},isObjectActive:p,activeObjectAttributes:p?h.attributes||{}:{},value:o,onChange:e,onFocus:t,contentRef:r,context:d},s)}function nP({formatTypes:e,...t}){return e.map(o=>(0,Hne.createElement)(OTe,{settings:o,...t,key:o.name}))}var Gne=l(R(),1),Wne=l($(),1),$ne=l(Re(),1);var yF=l(w(),1);function SF(e,t){if(Eb.isEmpty(e)){let o=JI(t);return o?`<${o}></${o}>`:""}return Array.isArray(e)?((0,$ne.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/"}),Wne.children.toHTML(e)):typeof e=="string"?e:e.toHTMLString()}function o_({value:e,tagName:t,multiline:o,format:r,...n}){return e=(0,yF.jsx)(Gne.RawHTML,{children:SF(e,o)}),t?(0,yF.jsx)(t,{...n,children:e}):e}var Xne=l(R(),1),xF=l($(),1),Qne=l(dr(),1),Jne=l(Re(),1);var Kne=l(R(),1),Yne=l(Re(),1),iP=l(F(),1),qne=l(it(),1),Tb=l(dr(),1);var _F=l(w(),1);function ATe({children:e,identifier:t,tagName:o="div",value:r="",onChange:n,multiline:i,...s},a){(0,Yne.default)("wp.blockEditor.RichText multiline prop",{since:"6.1",version:"6.3",alternative:"nested blocks (InnerBlocks)",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/"});let{clientId:c}=Ie(),{getSelectionStart:u,getSelectionEnd:d}=(0,iP.useSelect)(_),{selectionChange:f}=(0,iP.useDispatch)(_),m=JI(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,_F.jsx)(o,{ref:a,children:p.map((b,v)=>(0,_F.jsx)(sP,{identifier:`${t}-${v}`,tagName:m,value:b,onChange:k=>{let y=p.slice();y[v]=k,g(y)},isSelected:void 0,onKeyDown:k=>{if(k.keyCode!==qne.ENTER)return;k.preventDefault();let{offset:y}=u(),{offset:S}=d();if(typeof y!="number"||typeof S!="number")return;let x=(0,Tb.create)({html:b});x.start=y,x.end=S;let C=(0,Tb.split)(x).map(I=>(0,Tb.toHTMLString)({value:I})),B=p.slice();B.splice(v,1,...C),g(B),f(c,`${t}-${v+1}`,0,0)},onMerge:k=>{let y=p.slice(),S=0;if(k){if(!y[v+1])return;y.splice(v,2,y[v]+y[v+1]),S=y[v].length-1}else{if(!y[v-1])return;y.splice(v-1,2,y[v-1]+y[v]),S=y[v-1].length-1}g(y),f(c,`${t}-${v-(k?0:1)}`,S,S)},...s},v))})}var Zne=(0,Kne.forwardRef)(ATe);var eie=l(w(),1);function tie(e){return(0,Xne.forwardRef)((t,o)=>{let r=t.value,n=t.onChange;Array.isArray(r)&&((0,Jne.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=xF.children.toHTML(t.value),n=s=>t.onChange(xF.children.fromDOM((0,Qne.__unstableCreateElement)(document,s).childNodes)));let i=t.multiline?Zne:e;return(0,eie.jsx)(i,{...t,value:r,onChange:n,ref:o})})}var oie=l(it(),1),Ib=l(R(),1);function wF({character:e,type:t,onUse:o}){let r=(0,Ib.useContext)(Pb),n=(0,Ib.useRef)();return n.current=o,(0,Ib.useEffect)(()=>{function i(s){oie.isKeyboardEvent[t](s,e)&&(n.current(),s.preventDefault())}return r.current.add(i),()=>{r.current.delete(i)}},[e,t]),null}var aP=l(A(),1),rie=l(it(),1),CF=l(w(),1);function BF({name:e,shortcutType:t,shortcutCharacter:o,...r}){let n,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&o&&(n=rie.displayShortcut[t](o)),(0,CF.jsx)(aP.Fill,{name:i,children:(0,CF.jsx)(aP.ToolbarButton,{...r,shortcut:n})})}var Rb=l(R(),1);function EF({inputType:e,onInput:t}){let o=(0,Rb.useContext)(Ob),r=(0,Rb.useRef)();return r.current=t,(0,Rb.useEffect)(()=>{function n(i){i.inputType===e&&(r.current(),i.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}},[e]),null}var di=l(w(),1),{useRichText:LTe}=M(sie.privateApis),Pb=(0,nr.createContext)();Pb.displayName="keyboardShortcutContext";var Ob=(0,nr.createContext)();Ob.displayName="inputEventContext";var nie=Symbol("instanceId");function uie(e){let{__unstableMobileNoFocusOnMount:t,deleteEnter:o,placeholderTextColor:r,textAlign:n,selectionColor:i,tagsToEliminate:s,disableEditingMenu:a,fontSize:c,fontFamily:u,fontWeight:d,fontStyle:f,minWidth:m,maxWidth:h,disableSuggestions:p,disableAutocorrection:g,...b}=e;return b}function sP({children:e,tagName:t="div",value:o="",onChange:r,isSelected:n,multiline:i,inlineToolbar:s,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:f,withoutInteractiveFormatting:m,onRemove:h,onMerge:p,onSplit:g,__unstableOnSplitAtEnd:b,__unstableOnSplitAtDoubleLineEnd:v,identifier:k,preserveWhiteSpace:y,__unstablePastePlainText:S,__unstableEmbedURLOnPaste:x,__unstableDisableFormats:C,disableLineBreaks:B,__unstableAllowPrefixTransformations:I,readOnly:P,...E},L){E=uie(E),g&&(0,cie.default)("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});let T=(0,lP.useInstanceId)(sP),O=(0,nr.useRef)(),[D,U]=(0,nr.useState)(null),G=Ie(),{clientId:j,isSelected:z,name:W}=G,ee=G[Rp],se=(0,nr.useContext)(xr),ce=(0,Md.useRegistry)(),ie=je=>{if(!z)return{isSelected:!1};let{getSelectionStart:Eo,getSelectionEnd:Ze}=je(_),Ve=Eo(),gt=Ze(),To;return n===void 0?To=Ve.clientId===j&&gt.clientId===j&&(k?Ve.attributeKey===k:Ve[nie]===T):n&&(To=Ve.clientId===j),{selectionStart:To?Ve.offset:void 0,selectionEnd:To?gt.offset:void 0,isSelected:To}},{selectionStart:re,selectionEnd:Q,isSelected:Y}=(0,Md.useSelect)(ie,[j,k,T,n,z]),{disableBoundBlock:J,bindingsPlaceholder:K,bindingsLabel:H}=(0,Md.useSelect)(je=>{if(!ee?.[k])return{};let{__experimentalBlockBindingsSupportedAttributes:Eo}=je(_).getSettings();if(!Eo?.[W])return{};let Ve=ee[k],gt=(0,lie.getBlockBindingsSource)(Ve.source),To={};if(gt?.usesContext?.length)for(let ct of gt.usesContext)To[ct]=se[ct];let cr=!gt?.canUserEditValue?.({select:je,context:To,args:Ve.args});if(o.length>0)return{disableBoundBlock:cr,bindingsPlaceholder:null,bindingsLabel:null};let{getBlockAttributes:ge}=je(_),Ct=ge(j),Io=null;gt?.getFieldsList&&(Io=gt.getFieldsList({select:je,context:To})?.find(Gc=>(0,iie.default)(Gc.args,Ve?.args))?.label);let Ke=Io??gt?.label,te=cr?Ke:(0,Ab.sprintf)((0,Ab.__)("Add %s"),Ke),Le=cr?Ve?.args?.key||gt?.label:(0,Ab.sprintf)((0,Ab.__)("Empty %s; start writing to edit its value"),Ve?.args?.key||gt?.label);return{disableBoundBlock:cr,bindingsPlaceholder:Ct?.placeholder||te,bindingsLabel:Le}},[ee,k,W,o,j,se]),X=!!se?.["pattern/overrides"],ne=ee?.__default?.source==="core/pattern-overrides",ve=P||J||X&&!ne,{getSelectionStart:he,getSelectionEnd:xe,getBlockRootClientId:ze}=(0,Md.useSelect)(_),{selectionChange:ot}=(0,Md.useDispatch)(_),Wt=Cb({allowedFormats:f,disableFormats:C}),fo=!Wt||Wt.length>0,Do=(0,nr.useCallback)((je,Eo)=>{let Ze={},Ve=je===void 0&&Eo===void 0,gt={clientId:j,[k?"attributeKey":nie]:k||T};if(typeof je=="number"||Ve){if(Eo===void 0&&ze(j)!==ze(xe().clientId))return;Ze.start={...gt,offset:je}}if(typeof Eo=="number"||Ve){if(je===void 0&&ze(j)!==ze(he().clientId))return;Ze.end={...gt,offset:Eo}}ot(Ze)},[j,ze,xe,he,k,T,ot]),{value:rt,getValue:ar,onChange:xt,ref:At,formatTypes:Pe}=LTe({value:o,onChange:r,selectionStart:re,selectionEnd:Q,onSelectionChange:Do,placeholder:K||d,__unstableIsSelected:Y,__unstableDisableFormats:C,preserveWhiteSpace:y,__unstableDependencies:[t],allowedFormats:Wt,withoutInteractiveFormatting:m,__unstableFormatTypeHandlerContext:(0,nr.useMemo)(()=>({richTextIdentifier:k,blockClientId:j}),[k,j])}),wt=qU({onReplace:u,completers:c,record:rt,onChange:xt});_ne({html:o,value:rt});let qo=(0,nr.useRef)(new Set),$t=(0,nr.useRef)(new Set);function lr(){O.current?.focus()}let ln=t;return(0,di.jsxs)(di.Fragment,{children:[Y&&(0,di.jsx)(Pb.Provider,{value:qo,children:(0,di.jsx)(Ob.Provider,{value:$t,children:(0,di.jsxs)(aie.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:rt,onChange:xt,onFocus:lr}),(0,di.jsx)(nP,{value:rt,onChange:xt,onFocus:lr,formatTypes:Pe,forwardedRef:O})]})})}),Y&&fo&&(0,di.jsx)(yne,{inline:s,editableContentElement:D}),(0,di.jsx)(ln,{role:"textbox","aria-multiline":!B,"aria-readonly":ve,...E,draggable:void 0,"aria-label":H||E["aria-label"]||d,...wt,ref:(0,lP.useMergeRefs)([At,L,wt.ref,E.ref,tP({registry:ce,getValue:ar,onChange:xt,__unstableAllowPrefixTransformations:I,formatTypes:Pe,onReplace:u,selectionChange:ot,isSelected:Y,disableFormats:C,value:rt,tagName:t,onSplit:g,__unstableEmbedURLOnPaste:x,pastePlainText:S,onMerge:p,onRemove:h,disableLineBreaks:B,onSplitAtEnd:b,onSplitAtDoubleLineEnd:v,keyboardShortcuts:qo,inputEvents:$t}),O,U]),contentEditable:!ve,suppressContentEditableWarning:!0,className:V("block-editor-rich-text__editable",E.className,"rich-text"),tabIndex:E.tabIndex===0&&!ve?null:E.tabIndex,"data-wp-block-attribute-key":k})]})}var r_=tie((0,nr.forwardRef)(sP));r_.Content=o_;r_.isEmpty=e=>!e||e.length===0;var TF=(0,nr.forwardRef)((e,t)=>{if(Ie()[d0]){let{children:n,tagName:i="div",value:s,onChange:a,isSelected:c,multiline:u,inlineToolbar:d,wrapperClassName:f,autocompleters:m,onReplace:h,placeholder:p,allowedFormats:g,withoutInteractiveFormatting:b,onRemove:v,onMerge:k,onSplit:y,__unstableOnSplitAtEnd:S,__unstableOnSplitAtDoubleLineEnd:x,identifier:C,preserveWhiteSpace:B,__unstablePastePlainText:I,__unstableEmbedURLOnPaste:P,__unstableDisableFormats:E,disableLineBreaks:L,__unstableAllowPrefixTransformations:T,readOnly:O,...D}=uie(e);return(0,di.jsx)(i,{ref:t,...D,dangerouslySetInnerHTML:{__html:SF(s,u)||"<br>"}})}return(0,di.jsx)(r_,{ref:t,...e,readOnly:!1})});TF.Content=o_;TF.isEmpty=e=>!e||e.length===0;var Eb=TF;var IF=l(w(),1),fie=(0,die.forwardRef)((e,t)=>(0,IF.jsx)(Eb,{ref:t,...e,__unstableDisableFormats:!0}));fie.Content=function({value:t="",tagName:o="div",...r}){return(0,IF.jsx)(o,{...r,children:t})};var mie=fie;var PF=l(w(),1),NTe=(0,hie.forwardRef)(({__experimentalVersion:e,...t},o)=>{if(e===2)return(0,PF.jsx)(mie,{ref:o,...t});let{className:r,onChange:n,...i}=t;return(0,PF.jsx)(pie.default,{ref:o,className:V("block-editor-plain-text",r),onChange:s=>n(s.target.value),...i})}),gie=NTe;var $a=l(N(),1),vie=l(R(),1),yie=l(A(),1);var bie=l(Z(),1),kie=l(A(),1),cP=l(N(),1),tp=l(w(),1);function uP({property:e,viewport:t,desc:o}){let r=(0,bie.useInstanceId)(uP),n=o||(0,cP.sprintf)((0,cP._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,tp.jsxs)(tp.Fragment,{children:[(0,tp.jsx)("span",{"aria-describedby":`rbc-desc-${r}`,children:t.label}),(0,tp.jsx)(kie.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`,children:n})]})}var Ka=l(w(),1);function MTe(e){let{title:t,property:o,toggleLabel:r,onIsResponsiveChange:n,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:a=!1,defaultLabel:c={id:"all",label:(0,$a._x)("All","screen sizes")},viewports:u=[{id:"small",label:(0,$a.__)("Small screens")},{id:"medium",label:(0,$a.__)("Medium screens")},{id:"large",label:(0,$a.__)("Large screens")}]}=e;if(!t||!o||!i)return null;let d=r||(0,$a.sprintf)((0,$a.__)("Use the same %s on all screen sizes."),o),f=(0,$a.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),m=i((0,Ka.jsx)(uP,{property:o,viewport:c}),c),h=()=>u.map(p=>(0,Ka.jsx)(vie.Fragment,{children:i((0,Ka.jsx)(uP,{property:o,viewport:p}),p)},p.id));return(0,Ka.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,Ka.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,Ka.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,Ka.jsx)(yie.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:d,checked:!a,onChange:n,help:f}),(0,Ka.jsxs)("div",{className:V("block-editor-responsive-block-control__group",{"is-responsive":a}),children:[!a&&m,a&&(s?s(u):h())]})]})]})}var Sie=MTe;var dP=l(A(),1);var _ie=l(w(),1);function xie({units:e,...t}){let[o]=me("spacing.units"),r=(0,dP.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"],units:e});return(0,_ie.jsx)(dP.__experimentalUnitControl,{units:r,...t})}var n_=l(N(),1),wie=l(R(),1),Lb=l(A(),1);var Ya=l(w(),1);function DTe({url:e,onChange:t}){let[o,r]=(0,wie.useReducer)(i=>!i,!1),n=i=>{i.preventDefault(),r()};return(0,Ya.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,Ya.jsx)(Lb.Button,{size:"compact",icon:fn,label:e?(0,n_.__)("Edit link"):(0,n_.__)("Insert link"),onClick:r,className:"components-toolbar__control",isPressed:!!e}),o&&(0,Ya.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:n,children:(0,Ya.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,Ya.jsx)(Lb.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:Xk,label:(0,n_.__)("Close"),onClick:r}),(0,Ya.jsx)(Td,{value:e||"",onChange:t,suffix:(0,Ya.jsx)(Lb.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Ya.jsx)(Lb.Button,{size:"small",icon:bl,label:(0,n_.__)("Submit"),type:"submit"})})})]})})]})}var Cie=DTe;var In=l(N(),1),rs=l(R(),1),Pie=l(Fe(),1),Ho=l(A(),1);var Rie=l(dn(),1);var yt=l(w(),1),RF="none",Bie="custom",Eie="media",Tie="attachment",Iie=["noreferrer","noopener"],Oie=({linkDestination:e,onChangeUrl:t,url:o,mediaType:r="image",mediaUrl:n,mediaLink:i,linkTarget:s,linkClass:a,rel:c,showLightboxSetting:u,lightboxEnabled:d,onSetLightbox:f,resetLightbox:m})=>{let[h,p]=(0,rs.useState)(!1),[g,b]=(0,rs.useState)(null),v=()=>{p(!0)},[k,y]=(0,rs.useState)(!1),[S,x]=(0,rs.useState)(null),C=(0,rs.useRef)(null),B=(0,rs.useRef)();(0,rs.useEffect)(()=>{if(!B.current)return;(Pie.focus.focusable.find(B.current)[0]||B.current).focus()},[k,o,d]);let I=()=>{(e===Eie||e===Tie)&&x(""),y(!0)},P=()=>{y(!1)},E=()=>{x(null),P(),p(!1)},L=Y=>{let J=Y?"_blank":void 0,K;if(J){let H=(c??"").split(" ");Iie.forEach(X=>{H.includes(X)||H.push(X)}),K=H.join(" ")}else{let H=(c??"").split(" ").filter(X=>Iie.includes(X)===!1);K=H.length?H.join(" "):void 0}return{linkTarget:J,rel:K}},T=()=>Y=>{let J=C.current;J&&J.contains(Y.target)||(p(!1),x(null),P())},O=()=>Y=>{if(S){let J=U().find(K=>K.url===S)?.linkDestination||Bie;t({href:(0,Rie.prependHTTPS)(S),linkDestination:J,lightbox:{enabled:!1}})}P(),x(null),Y.preventDefault()},D=()=>{t({linkDestination:RF,href:""})},U=()=>{let Y=[{linkDestination:Eie,title:(0,In.__)("Link to image file"),url:r==="image"?n:void 0,icon:iv}];return r==="image"&&i&&Y.push({linkDestination:Tie,title:(0,In.__)("Link to attachment page"),url:r==="image"?i:void 0,icon:kl}),Y},G=Y=>{let J=U(),K;Y?K=(J.find(H=>H.url===Y)||{linkDestination:Bie}).linkDestination:K=RF,t({linkDestination:K,href:Y})},j=Y=>{let J=L(Y);t(J)},z=Y=>{t({rel:Y})},W=Y=>{t({linkClass:Y})},ee=(0,yt.jsxs)(Ho.__experimentalVStack,{spacing:"3",children:[(0,yt.jsx)(Ho.ToggleControl,{label:(0,In.__)("Open in new tab"),onChange:j,checked:s==="_blank"}),(0,yt.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,In.__)("Link relation"),value:c??"",onChange:z,help:(0,rs.createInterpolateElement)((0,In.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,yt.jsx)(Ho.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,yt.jsx)(Ho.TextControl,{__next40pxDefaultSize:!0,label:(0,In.__)("Link CSS class"),value:a||"",onChange:W})]}),se=S!==null?S:o,ce=!d||d&&!u,ie=!se&&ce,re=(U().find(Y=>Y.linkDestination===e)||{}).title,Q=()=>{if(d&&u&&!o&&!k)return(0,yt.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,yt.jsx)(we,{icon:mx}),(0,yt.jsxs)("div",{className:"text",children:[(0,yt.jsx)("p",{children:(0,In.__)("Enlarge on click")}),(0,yt.jsx)("p",{className:"description",children:(0,In.__)("Scales the image with a lightbox effect")})]}),(0,yt.jsx)(Ho.Button,{icon:Ci,label:(0,In.__)("Disable enlarge on click"),onClick:()=>{f?.(!1)},size:"compact"})]});if(!o||k)return(0,yt.jsx)(Ad.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:se,onChangeInputValue:x,onSubmit:O(),autocompleteRef:C});if(o&&!k)return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(Ad.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:I,urlLabel:re}),(0,yt.jsx)(Ho.Button,{icon:Ci,label:(0,In.__)("Remove link"),onClick:()=>{D(),m?.()},size:"compact"})]})};return(0,yt.jsxs)(yt.Fragment,{children:[(0,yt.jsx)(Ho.ToolbarButton,{icon:fn,className:"components-toolbar__control",label:(0,In.__)("Link"),"aria-expanded":h,onClick:v,ref:b,isActive:!!o||d&&u}),h&&(0,yt.jsx)(Ad,{ref:B,anchor:g,onFocusOutside:T(),onClose:E,renderSettings:ce?()=>ee:null,additionalControls:ie&&(0,yt.jsxs)(Ho.NavigableMenu,{children:[U().map(Y=>(0,yt.jsx)(Ho.MenuItem,{icon:Y.icon,iconPosition:"left",onClick:()=>{x(null),G(Y.url),P()},children:Y.title},Y.linkDestination)),u&&(0,yt.jsx)(Ho.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:mx,info:(0,In.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:RF,href:""}),f?.(!0),P()},children:(0,In.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:Q()})]})};var Mb=l(A(),1),$ie=l(R(),1),pP=l(N(),1);var Aie=l(R(),1),AF=l(N(),1);var OF=[],VTe=new Intl.Collator("und",{numeric:!0}).compare;function fP(){let[e,t,o,r]=me("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),n=e??OF,i=t??OF,s=o&&r!==!1?o:OF;return(0,Aie.useMemo)(()=>{let a=[{name:(0,AF.__)("None"),slug:"0",size:0},...n,...i,...s];return a.every(({slug:c})=>/^[0-9]/.test(c))&&a.sort((c,u)=>VTe(c.slug,u.slug)),a.length>XU?[{name:(0,AF.__)("Default"),slug:"default",size:void 0},...a]:a},[n,i,s])}var Lie=l(R(),1),Nie=l(F(),1),mP=l(N(),1),Mie=l(A(),1);var Die=l(w(),1),FTe={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 Nb({icon:e,isMixed:t=!1,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,side:a,spacingSizes:c,type:u,value:d,...f}){let m=(0,Nie.useSelect)(S=>S(_).getSettings()?.disableCustomSpacingSizes),[h]=me("spacing.units"),p=(0,Mie.__experimentalUseCustomUnits)({availableUnits:h||["px","em","rem"]}),g=(0,Lie.useMemo)(()=>c?.map(S=>({name:S.name,slug:S.slug,size:S.size}))||[],[c]),b=(Su.includes(a)||["vertical","horizontal"].includes(a))&&s?ha[a]:"",v=s?u?.toLowerCase():u,k=(0,mP.sprintf)((0,mP._x)("%1$s %2$s","spacing"),b,v).trim(),y=p[0]?.value||"px";return(0,Die.jsx)(jm,{allowNegativeOnDrag:o<0,ariaLabel:k,className:"spacing-sizes-control",customValueSettings:FTe,disableCustomValues:m,icon:e,isMixed:t,minimumCustomValue:o,onChange:r,onMouseOut:n,onMouseOver:i,presets:g,presetType:"spacing",selectedUnit:y,units:p,value:d,...f})}var i_=l(w(),1),Vie=["vertical","horizontal"];function Fie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=d=>f=>{if(!t)return;let m={...Object.keys(a).reduce((h,p)=>(h[p]=sh(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?Vie.filter(d=>_M(n,d)):Vie;return(0,i_.jsx)(i_.Fragment,{children:u.map(d=>{let f=d==="vertical"?a.top:a.left;return(0,i_.jsx)(Nb,{icon:rC[d],label:ha[d],minimumCustomValue:e,onChange:c(d),onMouseOut:o,onMouseOver:r,side:d,spacingSizes:i,type:s,value:f,withInputField:!1},`spacing-sizes-control-${d}`)})})}var s_=l(w(),1);function zie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,sides:n,spacingSizes:i,type:s,values:a}){let c=n?.length?Su.filter(d=>n.includes(d)):Su,u=d=>f=>{let m={...Object.keys(a).reduce((h,p)=>(h[p]=sh(a[p],i),h),{})};m[d]=f,t(m)};return(0,s_.jsx)(s_.Fragment,{children:c.map(d=>(0,s_.jsx)(Nb,{icon:rC[d],label:ha[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 jie=l(w(),1);function Uie({minimumCustomValue:e,onChange:t,onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,values:c}){let u=d=>f=>{let m={...Object.keys(c).reduce((h,p)=>(h[p]=sh(c[p],s),h),{})};m[d]=f,t(m)};return(0,jie.jsx)(Nb,{label:ha[i],minimumCustomValue:e,onChange:u(i),onMouseOut:o,onMouseOver:r,showSideInLabel:n,side:i,spacingSizes:s,type:a,value:c[i],withInputField:!1})}var Hie=l(A(),1);var LF=l(N(),1),Gie=l(w(),1);function Wie({isLinked:e,...t}){let o=e?(0,LF.__)("Unlink sides"):(0,LF.__)("Link sides");return(0,Gie.jsx)(Hie.Button,{...t,size:"small",icon:e?fn:Ci,iconSize:24,label:o})}var qa=l(w(),1);function Db({inputProps:e,label:t,minimumCustomValue:o=0,onChange:r,onMouseOut:n,onMouseOver:i,showSideInLabel:s=!0,sides:a=Su,useSelect:c,values:u}){let d=fP(),f=u||QU,m=a?.length===1,h=a?.includes("horizontal")&&a?.includes("vertical")&&a?.length===2,[p,g]=(0,$ie.useState)(eH(f,a)),b=()=>{g(p===Cl.axial?Cl.custom:Cl.axial)},k={...e,minimumCustomValue:o,onChange:C=>{let B={...u,...C};r(B)},onMouseOut:n,onMouseOver:i,sides:a,spacingSizes:d,type:t,useSelect:c,values:f},y=()=>p===Cl.axial?(0,qa.jsx)(Fie,{...k}):p===Cl.custom?(0,qa.jsx)(zie,{...k}):(0,qa.jsx)(Uie,{side:p,...k,showSideInLabel:s}),S=Su.includes(p)&&s?ha[p]:"",x=(0,pP.sprintf)((0,pP._x)("%1$s %2$s","spacing"),t,S).trim();return(0,qa.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,qa.jsxs)(Mb.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,qa.jsx)(Mb.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:x}),!m&&!h&&(0,qa.jsx)(Wie,{label:t,onClick:b,isLinked:p===Cl.axial})]}),(0,qa.jsx)(Mb.__experimentalVStack,{spacing:.5,children:y()})]})}var Kie=l(Re(),1);function Yie(){return(0,Kie.default)("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}var hP=l(R(),1);function qie(e){let[t,o]=(0,hP.useState)(window.innerWidth);(0,hP.useEffect)(()=>{if(e==="Desktop")return;let i=()=>o(window.innerWidth);return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e]);let r=i=>{let s;switch(i){case"Tablet":s=781;break;case"Mobile":s=479;break;default:return null}return s<t?s:t};return(i=>{let s=i==="Mobile"?"768px":"1024px",a="40px",c="auto";switch(i){case"Tablet":case"Mobile":return{width:r(i),marginTop:a,marginBottom:a,marginLeft:c,marginRight:c,height:s,overflowY:"auto"};default:return{marginLeft:c,marginRight:c}}})(e)}var tk=l(N(),1),zd=l($(),1),zae=l(A(),1),n4=l(F(),1),jae=l(R(),1);var Vb=l(A(),1),gP=l(N(),1),Zie=l(F(),1),bP=l($(),1);var op=l(w(),1);function zTe({block:e,onNavigateToEntityRecord:t,isSyncedPattern:o,isTemplatePartBlock:r}){let n=e?.attributes||{};return(0,op.jsx)(Vb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,op.jsx)(Vb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{if(o)t({postId:n.ref,postType:"wp_block"});else if(r){let{theme:s,slug:a}=n,c=s&&a?`${s}//${a}`:null;c&&t({postId:c,postType:"wp_template_part"})}},children:(0,gP.__)("Edit original")})})}function jTe({clientId:e,editedContentOnlySection:t,editContentOnlySection:o,stopEditingContentOnlySection:r}){return(0,op.jsx)(Vb.__experimentalVStack,{className:"block-editor-block-inspector-edit-contents",expanded:!0,children:(0,op.jsx)(Vb.Button,{className:"block-editor-block-inspector-edit-contents__button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{t?r():o(e)},children:t?(0,gP.__)("Exit pattern"):(0,gP.__)("Edit pattern")})})}function Xie({clientId:e}){let{isWithinSection:t,isWithinEditedSection:o,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i}=aT(e),{block:s,onNavigateToEntityRecord:a,canEdit:c}=(0,Zie.useSelect)(m=>{let{getBlock:h,getSettings:p,canEditBlock:g}=m(_);return{block:h(e),onNavigateToEntityRecord:p().onNavigateToEntityRecord,canEdit:g(e)}},[e]);if(!c||!t&&!o)return null;let u=(0,bP.isReusableBlock)(s),d=(0,bP.isTemplatePart)(s);return(u||d)&&a?(0,op.jsx)(zTe,{block:s,onNavigateToEntityRecord:a,isSyncedPattern:u,isTemplatePartBlock:d}):(0,op.jsx)(jTe,{clientId:e,editedContentOnlySection:r,editContentOnlySection:n,stopEditingContentOnlySection:i})}var Qie=l(F(),1),Jie=l(N(),1),ese=l(A(),1),tse=l(R(),1);var ose=l(w(),1);function kP(){let e=(0,Qie.useSelect)(r=>r(_).getBlockSelectionStart(),[]),t=(0,tse.useRef)();return $f(e,t),e?(0,ose.jsx)(ese.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,Jie.__)("Skip to the selected block")}):null}var vP=l(N(),1),rse=l(F(),1);var nse=l(A(),1);var a_=l(w(),1);function NF(){let e=(0,rse.useSelect)(t=>t(_).getSelectedBlockCount(),[]);return(0,a_.jsxs)(nse.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,a_.jsx)(Ae,{icon:Cf,showColors:!0}),(0,a_.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,vP.sprintf)((0,vP._n)("%d Block","%d Blocks",e),e)})]})}var ek=l(A(),1),oa=l(R(),1),Aae=l(Zp(),1),Jb=l(F(),1);var l_=l(N(),1),yP={name:"settings",title:(0,l_.__)("Settings"),value:"settings",icon:oA},SP={name:"styles",title:(0,l_.__)("Styles"),value:"styles",icon:kN},_P={name:"content",title:(0,l_.__)("Content"),value:"content",icon:kl},yc={name:"list",title:(0,l_.__)("List View"),value:"list-view",icon:sv};var BP=l(A(),1);var c_=l(A(),1),ise=l(N(),1);var u_=l(w(),1),UTe=({initialOpen:e=!1})=>{let t=(0,c_.__experimentalUseSlotFills)(rd.slotName),o=(0,c_.__experimentalUseSlotFills)(sS.name),r=!!(t&&t.length),n=!!(o&&o.length);return!r&&!n?null:(0,u_.jsxs)(c_.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,ise.__)("Advanced"),initialOpen:e,children:[(0,u_.jsx)(fe.Slot,{group:"advanced"}),(0,u_.jsx)(sS.Slot,{})]})},xP=UTe;var Fb=l(A(),1),wP=l(F(),1),MF=l(N(),1);var d_=l(w(),1),HTe=()=>{let{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:o}=(0,wP.useSelect)(s=>{let{getBlocksByClientId:a,getSelectedBlockClientIds:c}=s(_),u=c(),d=a(u);return{selectedClientIds:u,selectedBlocks:d,hasPositionAttribute:d?.some(({attributes:f})=>!!f?.style?.position?.type)}},[]),{updateBlockAttributes:r}=(0,wP.useDispatch)(_),n=Ro();function i(){if(!e?.length||!t?.length)return;let s=Object.fromEntries(t?.map(({clientId:a,attributes:c})=>[a,{style:Me({...c?.style,position:{...c?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}]));r(e,s,!0)}return(0,d_.jsx)(Fb.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,MF.__)("Position"),resetAll:i,dropdownMenuProps:n,children:(0,d_.jsx)(Fb.__experimentalToolsPanelItem,{isShownByDefault:o,label:(0,MF.__)("Position"),hasValue:()=>o,onDeselect:i,children:(0,d_.jsx)(fe.Slot,{group:"position"})})})},GTe=()=>{let e=(0,Fb.__experimentalUseSlotFills)(Wi.position.name);return!(e&&e.length)?null:(0,d_.jsx)(HTe,{})},CP=GTe;var Za=l(w(),1),WTe=({showAdvancedControls:e=!1})=>{let t=(0,BP.__experimentalUseSlotFills)(Wi.default.name),o=(0,BP.__experimentalUseSlotFills)(Wi.position.name),r=(0,BP.__experimentalUseSlotFills)(Wi.bindings.name),n=!!t?.length||!!o?.length||!!r?.length;return(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)(fe.Slot,{}),(0,Za.jsx)(CP,{}),(0,Za.jsx)(fe.Slot,{group:"bindings"}),e&&(0,Za.jsx)("div",{children:(0,Za.jsx)(xP,{initialOpen:!n})})]})},sse=WTe;var Xb=l(N(),1),m2=l(F(),1);var y_=l($(),1),$F=l(A(),1),Zb=l(R(),1),uae=l(ut(),1),dae=l(F(),1);var WF={};Ip(WF,{AdvancedPanel:()=>ZP,BackgroundPanel:()=>o2,BorderPanel:()=>jP,ColorPanel:()=>WP,DimensionsPanel:()=>DP,FiltersPanel:()=>KP,ImageSettingsPanel:()=>tae,TypographyPanel:()=>OP,useHasBackgroundPanel:()=>v_,useHasBorderPanel:()=>zP,useHasBorderPanelControls:()=>p_,useHasColorPanel:()=>GP,useHasDimensionsPanel:()=>MP,useHasFiltersPanel:()=>Qse,useHasImageSettingsPanel:()=>eae,useHasTypographyPanel:()=>RP,useSettingsForBlockElement:()=>TP});var EP=l(R(),1),ase=l(F(),1),DF=l($(),1),rp=l(N(),1);function TP(e,t,o){let{supportedStyles:r,supports:n}=(0,ase.useSelect)(i=>({supportedStyles:M(i(DF.store)).getSupportedStyles(t,o),supports:i(DF.store).getBlockType(t)?.supports}),[t,o]);return(0,EP.useMemo)(()=>{let i={...e};return r.includes("fontSize")||(i.typography={...i.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),r.includes("fontFamily")||(i.typography={...i.typography,fontFamilies:{}}),i.color={...i.color,text:i.color?.text&&r.includes("color"),background:i.color?.background&&(r.includes("background")||r.includes("backgroundColor")),button:i.color?.button&&r.includes("buttonColor"),heading:i.color?.heading&&r.includes("headingColor"),link:i.color?.link&&r.includes("linkColor"),caption:i.color?.caption&&r.includes("captionColor")},r.includes("background")||(i.color.gradients=[],i.color.customGradient=!1),r.includes("filter")||(i.color.defaultDuotone=!1,i.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","textIndent","writingMode"].forEach(s=>{r.includes(s)||(i.typography={...i.typography,[s]:!1})}),r.includes("textIndent")&&(i.typography={...i.typography,textIndent:i.typography?.textIndent??"subsequent"}),r.includes("columnCount")||(i.typography={...i.typography,textColumns:!1}),["contentSize","wideSize"].forEach(s=>{r.includes(s)||(i.layout={...i.layout,[s]:!1})}),["padding","margin","blockGap"].forEach(s=>{r.includes(s)||(i.spacing={...i.spacing,[s]:!1});let a=Array.isArray(n?.spacing?.[s])?n?.spacing?.[s]:n?.spacing?.[s]?.sides;a?.length&&i.spacing?.[s]&&(i.spacing={...i.spacing,[s]:{...i.spacing?.[s],sides:a}})}),["aspectRatio","height","minHeight","width"].forEach(s=>{r.includes(s)||(i.dimensions={...i.dimensions,[s]:!1})}),["radius","color","style","width"].forEach(s=>{r.includes("border"+s.charAt(0).toUpperCase()+s.slice(1))||(i.border={...i.border,[s]:!1})}),["backgroundImage","backgroundSize"].forEach(s=>{r.includes(s)||(i.background={...i.background,[s]:!1})}),i.shadow=r.includes("shadow")?i.shadow:!1,i},[e,r,n])}function Xa(e){let t=e?.color?.palette?.custom,o=e?.color?.palette?.theme,r=e?.color?.palette?.default,n=e?.color?.defaultPalette;return(0,EP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,rp._x)("Theme","Indicates this palette comes from the theme."),colors:o}),n&&r&&r.length&&i.push({name:(0,rp._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&i.push({name:(0,rp._x)("Custom","Indicates this palette is created by the user."),colors:t}),i},[t,o,r,n])}function f_(e){let t=e?.color?.gradients?.custom,o=e?.color?.gradients?.theme,r=e?.color?.gradients?.default,n=e?.color?.defaultGradients;return(0,EP.useMemo)(()=>{let i=[];return o&&o.length&&i.push({name:(0,rp._x)("Theme","Indicates this palette comes from the theme."),gradients:o}),n&&r&&r.length&&i.push({name:(0,rp._x)("Default","Indicates this palette comes from WordPress."),gradients:r}),t&&t.length&&i.push({name:(0,rp._x)("Custom","Indicates this palette is created by the user."),gradients:t}),i},[t,o,r,n])}var io=l(A(),1),Mo=l(N(),1),jb=l(R(),1);var zb=l(N(),1);var lse=l(R(),1),IP=l(A(),1),VF=l(w(),1),$Te=[{label:(0,zb.__)("Align text left"),value:"left",icon:Jc},{label:(0,zb.__)("Align text center"),value:"center",icon:Sf},{label:(0,zb.__)("Align text right"),value:"right",icon:eu},{label:(0,zb.__)("Justify text"),value:"justify",icon:OO}],KTe=["left","center","right"];function PP({className:e,value:t,onChange:o,options:r=KTe}){let n=(0,lse.useMemo)(()=>$Te.filter(i=>r.includes(i.value)),[r]);return n.length?(0,VF.jsx)(IP.__experimentalToggleGroupControl,{isDeselectable:!0,__next40pxDefaultSize:!0,label:(0,zb.__)("Text alignment"),className:V("block-editor-text-alignment-control",e),value:t,onChange:i=>{o(i===t?void 0:i)},children:n.map(i=>(0,VF.jsx)(IP.__experimentalToggleGroupControlOptionIcon,{value:i.value,icon:i.icon,label:i.label},i.value))}):null}var No=l(A(),1),m_=l(N(),1);var ns=l(w(),1);function cse({__next40pxDefaultSize:e=!1,value:t,onChange:o,__unstableInputWidth:r="60px",withSlider:n=!1,hasBottomMargin:i=!1,help:s,...a}){let[c]=me("spacing.units"),u=(0,No.__experimentalUseCustomUnits)({availableUnits:c||["px","em","rem","ch","%","vw","vh"],defaultValues:{px:16,em:2,rem:2,ch:2}}),[d,f]=(0,No.__experimentalParseQuantityAndUnitFromRawValue)(t,u),m=!!f&&["em","rem","%","ch","vw","vh"].includes(f);return n?(0,ns.jsxs)(No.__experimentalView,{style:i?{marginBottom:12}:void 0,children:[(0,ns.jsx)(No.BaseControl.VisualLabel,{children:(0,m_.__)("Line indent")}),(0,ns.jsxs)(No.Flex,{children:[(0,ns.jsx)(No.FlexItem,{isBlock:!0,children:(0,ns.jsx)(No.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,m_.__)("Line indent"),labelPosition:"top",hideLabelFromVision:!0,value:t,onChange:o,size:a.size,units:u,__unstableInputWidth:r,min:0})}),n&&(0,ns.jsx)(No.FlexItem,{isBlock:!0,children:(0,ns.jsx)(No.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ns.jsx)(No.RangeControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,m_.__)("Line indent"),hideLabelFromVision:!0,value:d,withInputField:!1,onChange:h=>{o?.(h===void 0?void 0:h+(f??"px"))},min:0,max:m?10:100,step:m?.1:1,initialPosition:0})})})]}),s&&(0,ns.jsx)("p",{className:"components-base-control__help",children:s})]}):(0,ns.jsx)(No.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...a,label:(0,m_.__)("Line indent"),value:t,__unstableInputWidth:r,units:u,onChange:o,help:s})}function dse(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 use(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 YTe(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 fse(e,t,o){let r=t,n=o,{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:a}=ib(e),c=i?.some(({value:d})=>d===t),u=s?.some(({value:d})=>d?.toString()===o?.toString());return c||(r=t?YTe(i,t):a?.find(d=>d.style.fontWeight===use(s,o))?.style?.fontStyle),u||(n=o?use(s,o):a?.find(d=>d.style.fontStyle===(r||t))?.style?.fontWeight),{nearestFontStyle:r,nearestFontWeight:n}}var Je=l(w(),1),qTe=1,ZTe=6;function RP(e){let t=pse(e),o=hse(e),r=gse(e),n=bse(e),i=vse(e),s=kse(e),a=yse(e),c=xse(e),u=Sse(e),d=_se(e),f=mse(e);return t||o||r||n||i||s||f||a||c||u||d}function mse(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 pse(e){return["default","theme","custom"].some(t=>e?.typography?.fontFamilies?.[t]?.length)}function hse(e){return e?.typography?.lineHeight}function gse(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function XTe(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,Mo.__)("Appearance"):(0,Mo.__)("Font style"):(0,Mo.__)("Font weight")}function bse(e){return e?.typography?.letterSpacing}function kse(e){return e?.typography?.textTransform}function vse(e){return e?.typography?.textAlign}function yse(e){return e?.typography?.textDecoration}function Sse(e){return e?.typography?.writingMode}function _se(e){return e?.typography?.textColumns}function xse(e){return e?.typography?.textIndent}function QTe(e){let t=e?.typography?.fontSizes,o=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...o?t?.default??[]:[]]}function JTe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Ro(),s=()=>{let a=e(o);t(a)};return(0,Je.jsx)(io.__experimentalToolsPanel,{label:(0,Mo.__)("Typography"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var eIe={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,textIndent:!0,writingMode:!0,textColumns:!0};function OP({as:e=JTe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=eIe,isGlobalStyles:a=!1}){let c=te=>wn({settings:n},"",te),u=pse(n),d=c(r?.typography?.fontFamily),{fontFamilies:f,fontFamilyFaces:m}=(0,jb.useMemo)(()=>dse(n,d),[n,d]),h=te=>{let Le=f?.find(({fontFamily:cn})=>cn===te)?.slug,ct=pe(t,["typography","fontFamily"],Le?`var:preset|font-family|${Le}`:te||void 0),Gc=f?.find(({fontFamily:cn})=>cn===te)?.fontFace??[],{fontStyles:ua,fontWeights:Bp}=ib(Gc),jk=ua?.some(({value:cn})=>cn===T),hf=Bp?.some(({value:cn})=>cn?.toString()===O?.toString());if(!jk||!hf){let{nearestFontStyle:cn,nearestFontWeight:Ep}=fse(Gc,T,O);cn||Ep?ct={...ct,typography:{...ct?.typography,fontStyle:cn||void 0,fontWeight:Ep||void 0}}:(T||O)&&(ct={...ct,typography:{...ct?.typography,fontStyle:void 0,fontWeight:void 0}})}o(ct)},p=()=>!!t?.typography?.fontFamily,g=()=>h(void 0),b=mse(n),v=!n?.typography?.customFontSize,k=QTe(n),y=c(r?.typography?.fontSize),S=(()=>{let te=r?.typography?.fontSize;if(!te||typeof te!="string")return;if(te.startsWith("var:preset|font-size|"))return te.replace("var:preset|font-size|","");let Le=te.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);if(Le)return Le[1]})(),x=(te,Le)=>{let ct=Le?.slug?`var:preset|font-size|${Le?.slug}`:te;o(pe(t,["typography","fontSize"],ct||void 0))},C=()=>!!t?.typography?.fontSize,B=()=>x(void 0),I=gse(n),P=XTe(n),E=n?.typography?.fontStyle,L=n?.typography?.fontWeight,T=c(r?.typography?.fontStyle),O=c(r?.typography?.fontWeight),D=(0,jb.useCallback)(({fontStyle:te,fontWeight:Le})=>{(te!==T||Le!==O)&&o({...t,typography:{...t?.typography,fontStyle:te||void 0,fontWeight:Le||void 0}})},[T,O,o,t]),U=()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,G=(0,jb.useCallback)(()=>{D({})},[D]),j=hse(n),z=c(r?.typography?.lineHeight),W=te=>{o(pe(t,["typography","lineHeight"],te||void 0))},ee=()=>t?.typography?.lineHeight!==void 0,se=()=>W(void 0),ce=bse(n),ie=c(r?.typography?.letterSpacing),re=te=>{o(pe(t,["typography","letterSpacing"],te||void 0))},Q=()=>!!t?.typography?.letterSpacing,Y=()=>re(void 0),J=xse(n),K=c(r?.typography?.textIndent),X=(n?.typography?.textIndent??"subsequent")==="all",ne=te=>{o(pe(t,["typography","textIndent"],te||void 0))},le=te=>{o({...t,settings:{typography:{textIndent:te?"all":"subsequent"}}})},ve=()=>!!t?.typography?.textIndent,he=()=>{o(pe(t,["typography","textIndent"],void 0))},xe=X?(0,Mo.__)("Indents the first line of all paragraphs."):(0,Mo.__)("Indents the first line of each paragraph after the first one."),ze=_se(n),ot=c(r?.typography?.textColumns),Wt=te=>{o(pe(t,["typography","textColumns"],te||void 0))},fo=()=>!!t?.typography?.textColumns,Do=()=>Wt(void 0),rt=kse(n),ar=c(r?.typography?.textTransform),xt=te=>{o(pe(t,["typography","textTransform"],te||void 0))},At=()=>!!t?.typography?.textTransform,Pe=()=>xt(void 0),wt=yse(n),qo=c(r?.typography?.textDecoration),$t=te=>{o(pe(t,["typography","textDecoration"],te||void 0))},lr=()=>!!t?.typography?.textDecoration,ln=()=>$t(void 0),je=Sse(n),Eo=c(r?.typography?.writingMode),Ze=te=>{o(pe(t,["typography","writingMode"],te||void 0))},Ve=()=>!!t?.typography?.writingMode,gt=()=>Ze(void 0),To=vse(n),cr=c(r?.typography?.textAlign),ge=te=>{o(pe(t,["typography","textAlign"],te||void 0))},Ct=()=>!!t?.typography?.textAlign,Io=()=>ge(void 0),Ke=(0,jb.useCallback)(te=>({...te,typography:{}}),[]);return(0,Je.jsxs)(e,{resetAllFilter:Ke,value:t,onChange:o,panelId:i,children:[u&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Font"),hasValue:p,onDeselect:g,isShownByDefault:s.fontFamily,panelId:i,children:(0,Je.jsx)(rI,{fontFamilies:f,value:d,onChange:h,size:"__unstable-large"})}),b&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Size"),hasValue:C,onDeselect:B,isShownByDefault:s.fontSize,panelId:i,children:(0,Je.jsx)(io.FontSizePicker,{value:S||y,valueMode:S?"slug":"literal",onChange:x,fontSizes:k,disableCustomFontSizes:v,withReset:!1,withSlider:!0,size:"__unstable-large"})}),I&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:P,hasValue:U,onDeselect:G,isShownByDefault:s.fontAppearance,panelId:i,children:(0,Je.jsx)(oI,{value:{fontStyle:T,fontWeight:O},onChange:D,hasFontStyles:E,hasFontWeights:L,fontFamilyFaces:m,size:"__unstable-large"})}),j&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Line height"),hasValue:ee,onDeselect:se,isShownByDefault:s.lineHeight,panelId:i,children:(0,Je.jsx)(HI,{__unstableInputWidth:"auto",value:z,onChange:W,size:"__unstable-large"})}),ce&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Letter spacing"),hasValue:Q,onDeselect:Y,isShownByDefault:s.letterSpacing,panelId:i,children:(0,Je.jsx)(iI,{value:ie,onChange:re,size:"__unstable-large",__unstableInputWidth:"auto"})}),J&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Line indent"),hasValue:ve,onDeselect:he,isShownByDefault:s.textIndent,panelId:i,children:[(0,Je.jsx)(cse,{value:K,onChange:ne,size:"__unstable-large",__unstableInputWidth:"auto",withSlider:!0,hasBottomMargin:a}),a&&(0,Je.jsx)(io.ToggleControl,{label:(0,Mo.__)("Indent all paragraphs"),checked:X,onChange:le,help:xe})]}),ze&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Columns"),hasValue:fo,onDeselect:Do,isShownByDefault:s.textColumns,panelId:i,children:(0,Je.jsx)(io.__experimentalNumberControl,{label:(0,Mo.__)("Columns"),max:ZTe,min:qTe,onChange:Wt,size:"__unstable-large",spinControls:"custom",value:ot,initialPosition:1})}),wt&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Decoration"),hasValue:lr,onDeselect:ln,isShownByDefault:s.textDecoration,panelId:i,children:(0,Je.jsx)(aI,{value:qo,onChange:$t,size:"__unstable-large",__unstableInputWidth:"auto"})}),je&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{className:"single-column",label:(0,Mo.__)("Orientation"),hasValue:Ve,onDeselect:gt,isShownByDefault:s.writingMode,panelId:i,children:(0,Je.jsx)(dI,{value:Eo,onChange:Ze,size:"__unstable-large"})}),rt&&(0,Je.jsx)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Letter case"),hasValue:At,onDeselect:Pe,isShownByDefault:s.textTransform,panelId:i,children:(0,Je.jsx)(cI,{value:ar,onChange:xt,showNone:!0,isBlock:!0,size:"__unstable-large"})}),To&&(0,Je.jsxs)(io.__experimentalToolsPanelItem,{label:(0,Mo.__)("Text alignment"),hasValue:Ct,onDeselect:Io,isShownByDefault:s.textAlign,panelId:i,children:[(0,Je.jsx)(PP,{value:cr,onChange:ge,options:["left","center","right","justify"],size:"__unstable-large"}),cr==="justify"&&(0,Je.jsx)("div",{children:(0,Je.jsx)(io.Notice,{status:"warning",isDismissible:!1,children:(0,Mo.__)("Justified text can reduce readability. For better accessibility, use left-aligned text instead.")})})]})]})}var Zt=l(N(),1),jt=l(A(),1);var Hb=l(R(),1);var et=l(A(),1),Go=l(N(),1),Cse=l(R(),1),AP=l(F(),1);var wse=l(F(),1);function np(e,t){let{getBlockOrder:o,getBlockAttributes:r}=(0,wse.useSelect)(_);return(i,s)=>{let a=(s-1)*t+i-1,c=0;for(let u of o(e)){let{columnStart:d,rowStart:f}=r(u).style?.layout??{};(f-1)*t+d-1<a&&c++}return c}}var qt=l(w(),1);function tIe(e,t){let{orientation:o="horizontal"}=t;return e==="fill"?(0,Go.__)("Stretch to fill available space."):e==="fixed"&&o==="horizontal"?(0,Go.__)("Specify a fixed width."):e==="fixed"?(0,Go.__)("Specify a fixed height."):(0,Go.__)("Fit contents.")}function Bse({value:e={},onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{type:i,default:{type:s="default"}={}}=o??{},a=i||s;return a==="flex"?(0,qt.jsx)(oIe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):a==="grid"?(0,qt.jsx)(nIe,{childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}):null}function oIe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{selfStretch:i,flexSize:s}=e,{orientation:a="horizontal"}=o??{},c=()=>!!i,u=a==="horizontal"?(0,Go.__)("Width"):(0,Go.__)("Height"),[d]=me("spacing.units"),f=(0,et.__experimentalUseCustomUnits)({availableUnits:d||["%","px","em","rem","vh","vw"]}),m=()=>{t({selfStretch:void 0,flexSize:void 0})};return(0,Cse.useEffect)(()=>{i==="fixed"&&!s&&t({...e,selfStretch:"fit"})},[]),(0,qt.jsxs)(et.__experimentalVStack,{as:et.__experimentalToolsPanelItem,spacing:2,hasValue:c,label:u,onDeselect:m,isShownByDefault:r,panelId:n,children:[(0,qt.jsxs)(et.__experimentalToggleGroupControl,{size:"__unstable-large",label:rIe(o),value:i||"fit",help:tIe(i,o),onChange:h=>{t({selfStretch:h,flexSize:h!=="fixed"?null:s})},isBlock:!0,children:[(0,qt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fit",label:(0,Go._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,qt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Go._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,qt.jsx)(et.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,Go._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),i==="fixed"&&(0,qt.jsx)(et.__experimentalUnitControl,{size:"__unstable-large",units:f,onChange:h=>{t({selfStretch:i,flexSize:h})},value:s,min:0,label:u,hideLabelFromVision:!0})]})}function rIe(e){let{orientation:t="horizontal"}=e;return t==="horizontal"?(0,Go.__)("Width"):(0,Go.__)("Height")}function nIe({childLayout:e,onChange:t,parentLayout:o,isShownByDefault:r,panelId:n}){let{columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=e,{columnCount:u,rowCount:d}=o??{},f=(0,AP.useSelect)(x=>x(_).getBlockRootClientId(n)),{moveBlocksToPosition:m,__unstableMarkNextChangeAsNotPersistent:h}=(0,AP.useDispatch)(_),p=np(f,u||3),g=()=>!!i||!!s,b=()=>!!a||!!c,v=()=>{t({columnStart:void 0,rowStart:void 0})},k=()=>{t({columnSpan:void 0,rowSpan:void 0})},y=u?u-(i??1)+1:void 0,S=window.__experimentalEnableGridInteractivity&&d?d-(s??1)+1:void 0;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:b,label:(0,Go.__)("Grid span"),onDeselect:k,isShownByDefault:r,panelId:n,children:[(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10),B=y?Math.min(C,y):C;t({columnStart:i,rowStart:s,rowSpan:c,columnSpan:B})},value:a??1,min:1,max:y})}),(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row span"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10),B=S?Math.min(C,S):C;t({columnStart:i,rowStart:s,columnSpan:a,rowSpan:B})},value:c??1,min:1,max:S})})]}),window.__experimentalEnableGridInteractivity&&(0,qt.jsxs)(et.Flex,{as:et.__experimentalToolsPanelItem,hasValue:g,label:(0,Go.__)("Grid placement"),onDeselect:v,isShownByDefault:!1,panelId:n,children:[(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Column"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10);t({columnStart:C,rowStart:s,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(C,s))},value:i??1,min:1,max:u?u-(a??1)+1:void 0})}),(0,qt.jsx)(et.FlexItem,{style:{width:"50%"},children:(0,qt.jsx)(et.__experimentalInputControl,{size:"__unstable-large",label:(0,Go.__)("Row"),type:"number",onChange:x=>{let C=x===""?1:parseInt(x,10);t({columnStart:i,rowStart:C,columnSpan:a,rowSpan:c}),h(),m([n],f,f,p(i,C))},value:s??1,min:1,max:d?d-(c??1)+1:void 0})})]})]})}var LP=l(A(),1),Ub=l(N(),1);var FF=l(w(),1);function NP({panelId:e,value:t,onChange:o=()=>{},options:r,defaultValue:n="auto",hasValue:i,isShownByDefault:s=!0}){let a=t??"auto",[c,u,d]=me("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),f=u?.map(({name:p,ratio:g})=>({label:p,value:g})),m=c?.map(({name:p,ratio:g})=>({label:p,value:g})),h=[{label:(0,Ub._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...d?m:[],...f||[],{label:(0,Ub._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,FF.jsx)(LP.__experimentalToolsPanelItem,{hasValue:i||(()=>a!==n),label:(0,Ub.__)("Aspect ratio"),onDeselect:()=>o(void 0),isShownByDefault:s,panelId:e,children:(0,FF.jsx)(LP.SelectControl,{label:(0,Ub.__)("Aspect ratio"),value:a,options:r??h,onChange:o,size:"__unstable-large"})})}var We=l(w(),1),zF=["horizontal","vertical"];function MP(e){let t=Ise(e),o=Pse(e),r=Rse(e),n=Ose(e),i=Ase(e),s=Lse(e),a=Nse(e),c=Mse(e),u=Dse(e),d=Vse(e);return Hb.Platform.OS==="web"&&(t||o||r||n||i||s||a||c||u||d)}function Ise(e){return e?.layout?.contentSize}function Pse(e){return e?.layout?.wideSize}function Rse(e){return e?.spacing?.padding}function Ose(e){return e?.spacing?.margin}function Ase(e){return e?.spacing?.blockGap}function Lse(e){return e?.dimensions?.height}function Nse(e){return e?.dimensions?.minHeight}function Mse(e){return e?.dimensions?.width}function Dse(e){return e?.dimensions?.aspectRatio}function Vse(e){let{type:t="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=e?.parentLayout??{},n=(o==="flex"||t==="flex"||o==="grid"||t==="grid")&&r;return!!e?.layout&&n}function iIe(e){let{defaultSpacingSizes:t,spacingSizes:o}=e?.spacing||{};return t!==!1&&o?.default?.length>0||o?.theme?.length>0||o?.custom?.length>0}function Ese(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 Tse(e){return e&&typeof e=="string"?{top:e,right:e,bottom:e,left:e}:e}function sIe(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 aIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Ro(),s=()=>{let a=e(o);t(a)};return(0,We.jsx)(jt.__experimentalToolsPanel,{label:(0,Zt.__)("Dimensions"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var ea={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,aspectRatio:!0,childLayout:!0};function DP({as:e=aIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=ea,onVisualize:a=()=>{},includeLayoutControls:c=!1}){let{dimensions:u,spacing:d}=n,f=te=>te&&typeof te=="object"?Object.keys(te).reduce((Le,ct)=>(Le[ct]=wn({settings:{dimensions:u,spacing:d}},"",te[ct]),Le),{}):wn({settings:{dimensions:u,spacing:d}},"",te),m=iIe(n),h=(0,jt.__experimentalUseCustomUnits)({availableUnits:n?.spacing?.units||["%","px","em","rem","vw"]}),p=-1/0,[g,b]=(0,Hb.useState)(p),v=Ise(n)&&c,k=f(r?.layout?.contentSize),y=te=>{o(pe(t,["layout","contentSize"],te||void 0))},S=()=>!!t?.layout?.contentSize,x=()=>y(void 0),C=Pse(n)&&c,B=f(r?.layout?.wideSize),I=te=>{o(pe(t,["layout","wideSize"],te||void 0))},P=()=>!!t?.layout?.wideSize,E=()=>I(void 0),L=Rse(n),T=f(r?.spacing?.padding),O=Tse(T),D=Array.isArray(n?.spacing?.padding)?n?.spacing?.padding:n?.spacing?.padding?.sides,U=D&&D.some(te=>zF.includes(te)),G=te=>{let Le=Ese(te,D);o(pe(t,["spacing","padding"],Le))},j=()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,z=()=>G(void 0),W=()=>a("padding"),ee=Ose(n),se=f(r?.spacing?.margin),ce=Tse(se),ie=Array.isArray(n?.spacing?.margin)?n?.spacing?.margin:n?.spacing?.margin?.sides,re=ie&&ie.some(te=>zF.includes(te)),Q=te=>{let Le=Ese(te,ie);o(pe(t,["spacing","margin"],Le))},Y=()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,J=()=>Q(void 0),K=()=>a("margin"),H=Ase(n),X=Array.isArray(n?.spacing?.blockGap)?n?.spacing?.blockGap:n?.spacing?.blockGap?.sides,ne=X&&X.some(te=>zF.includes(te)),le=f(r?.spacing?.blockGap),ve=sIe(le,ne),he=te=>{o(pe(t,["spacing","blockGap"],te))},xe=te=>{te||he(null),!ne&&te?.hasOwnProperty("top")?he(te.top):he({top:te?.top,left:te?.left})},ze=()=>he(void 0),ot=()=>!!t?.spacing?.blockGap,Wt=Nse(n),fo=f(r?.dimensions?.minHeight),Do=te=>{let Le=pe(t,["dimensions","minHeight"],te);o(pe(Le,["dimensions","aspectRatio"],void 0))},rt=()=>{Do(void 0)},ar=()=>!!t?.dimensions?.minHeight,xt=Lse(n),At=f(r?.dimensions?.height),Pe=te=>{let Le=pe(t,["dimensions","height"],te);o(pe(Le,["dimensions","aspectRatio"],void 0))},wt=()=>{Pe(void 0)},qo=()=>!!t?.dimensions?.height,$t=Mse(n),lr=f(r?.dimensions?.width),ln=te=>{o(pe(t,["dimensions","width"],te))},je=()=>{ln(void 0)},Eo=()=>!!t?.dimensions?.width,Ze=Dse(n),Ve=f(r?.dimensions?.aspectRatio),gt=te=>{let Le=pe(t,["dimensions","aspectRatio"],te);o(pe(Le,["dimensions","minHeight"],void 0))},To=()=>!!t?.dimensions?.aspectRatio,cr=Vse(n),ge=r?.layout,Ct=te=>{o({...t,layout:{...te}})},Io=(0,Hb.useCallback)(te=>({...te,layout:Me({...te?.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:{...te?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...te?.dimensions,height:void 0,minHeight:void 0,aspectRatio:void 0,width:void 0}}),[]),Ke=()=>a(!1);return(0,We.jsxs)(e,{resetAllFilter:Io,value:t,onChange:o,panelId:i,children:[(v||C)&&(0,We.jsx)("span",{className:"span-columns",children:(0,Zt.__)("Set the width of the main content area.")}),v&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Zt.__)("Content width"),hasValue:S,onDeselect:x,isShownByDefault:s.contentSize??ea.contentSize,panelId:i,children:(0,We.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Content width"),labelPosition:"top",value:k||"",onChange:te=>{y(te)},units:h,prefix:(0,We.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,We.jsx)(we,{icon:_f})})})}),C&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{label:(0,Zt.__)("Wide width"),hasValue:P,onDeselect:E,isShownByDefault:s.wideSize??ea.wideSize,panelId:i,children:(0,We.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Wide width"),labelPosition:"top",value:B||"",onChange:te=>{I(te)},units:h,prefix:(0,We.jsx)(jt.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,We.jsx)(we,{icon:Lf})})})}),L&&(0,We.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:j,label:(0,Zt.__)("Padding"),onDeselect:z,isShownByDefault:s.padding??ea.padding,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,We.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:O,onChange:G,label:(0,Zt.__)("Padding"),sides:D,units:h,allowReset:!1,splitOnAxis:U,inputProps:{onMouseOver:W,onMouseOut:Ke}}),m&&(0,We.jsx)(Db,{values:O,onChange:G,label:(0,Zt.__)("Padding"),sides:D,units:h,allowReset:!1,onMouseOver:W,onMouseOut:Ke})]}),ee&&(0,We.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:Y,label:(0,Zt.__)("Margin"),onDeselect:J,isShownByDefault:s.margin??ea.margin,className:V({"tools-panel-item-spacing":m}),panelId:i,children:[!m&&(0,We.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,values:ce,onChange:Q,inputProps:{min:g,onDragStart:()=>{b(0)},onDragEnd:()=>{b(p)},onMouseOver:K,onMouseOut:Ke},label:(0,Zt.__)("Margin"),sides:ie,units:h,allowReset:!1,splitOnAxis:re}),m&&(0,We.jsx)(Db,{values:ce,onChange:Q,minimumCustomValue:-1/0,label:(0,Zt.__)("Margin"),sides:ie,units:h,allowReset:!1,onMouseOver:K,onMouseOut:Ke})]}),H&&(0,We.jsxs)(jt.__experimentalToolsPanelItem,{hasValue:ot,label:(0,Zt.__)("Block spacing"),onDeselect:ze,isShownByDefault:s.blockGap??ea.blockGap,className:V({"tools-panel-item-spacing":m,"single-column":!m&&!ne}),panelId:i,children:[!m&&(ne?(0,We.jsx)(jt.BoxControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Block spacing"),min:0,onChange:xe,units:h,sides:X,values:ve,allowReset:!1,splitOnAxis:ne}):(0,We.jsx)(jt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Block spacing"),min:0,onChange:he,units:h,value:le})),m&&(0,We.jsx)(Db,{label:(0,Zt.__)("Block spacing"),min:0,onChange:xe,showSideInLabel:!1,sides:ne?X:["top"],values:ve,allowReset:!1})]}),cr&&(0,We.jsx)(Bse,{value:ge,onChange:Ct,parentLayout:n?.parentLayout,panelId:i,isShownByDefault:s.childLayout??ea.childLayout}),Wt&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{hasValue:ar,label:(0,Zt.__)("Minimum height"),onDeselect:rt,isShownByDefault:s.minHeight??ea.minHeight,panelId:i,children:(0,We.jsx)(lb,{label:(0,Zt.__)("Minimum height"),value:fo,onChange:Do})}),xt&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{hasValue:qo,label:(0,Zt.__)("Height"),onDeselect:wt,isShownByDefault:s.height??ea.height,panelId:i,children:(0,We.jsx)(lb,{label:(0,Zt.__)("Height"),value:At,onChange:Pe})}),$t&&(0,We.jsx)(jt.__experimentalToolsPanelItem,{hasValue:Eo,label:(0,Zt.__)("Width"),onDeselect:je,isShownByDefault:s.width??ea.width,panelId:i,children:(0,We.jsx)(lb,{label:(0,Zt.__)("Width"),value:lr,onChange:ln})}),Ze&&(0,We.jsx)(NP,{hasValue:To,value:Ve,onChange:gt,panelId:i,isShownByDefault:s.aspectRatio??ea.aspectRatio})]})}var en=l(A(),1),Wb=l(R(),1),Gb=l(N(),1);var ip=l(N(),1),xo=l(A(),1),FP=l(R(),1);var Rt=l(w(),1),VP=[];function lIe({shadow:e,onShadowChange:t,settings:o}){let r=jF(o);return(0,Rt.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,Rt.jsxs)(xo.__experimentalVStack,{spacing:4,children:[(0,Rt.jsx)(xo.__experimentalHeading,{level:5,children:(0,ip.__)("Drop shadow")}),(0,Rt.jsx)(cIe,{presets:r,activeShadow:e,onSelect:t}),(0,Rt.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,Rt.jsx)(xo.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,ip.__)("Clear")})})]})})}function cIe({presets:e,activeShadow:t,onSelect:o}){return e?(0,Rt.jsx)(xo.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,ip.__)("Drop shadows"),children:e.map(({name:r,slug:n,shadow:i})=>(0,Rt.jsx)(uIe,{label:r,isActive:i===t,type:n==="unset"?"unset":"preset",onSelect:()=>o(i===t?void 0:i),shadow:i},n))}):null}function uIe({type:e,label:t,isActive:o,onSelect:r,shadow:n}){return(0,Rt.jsx)(xo.Tooltip,{text:t,children:(0,Rt.jsx)(xo.Composite.Item,{role:"option","aria-label":t,"aria-selected":o,className:V("block-editor-global-styles__shadow__item",{"is-active":o}),render:(0,Rt.jsx)("button",{className:V("block-editor-global-styles__shadow-indicator",{unset:e==="unset"}),onClick:r,style:{boxShadow:n},"aria-label":t,children:o&&(0,Rt.jsx)(we,{icon:gl})})})})}function Fse({shadow:e,onShadowChange:t,settings:o}){return(0,Rt.jsx)(xo.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:dIe(e,t),renderContent:()=>(0,Rt.jsx)(xo.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,Rt.jsx)(lIe,{shadow:e,onShadowChange:t,settings:o})})})}function dIe(e,t){return function({onToggle:r,isOpen:n}){let i=(0,FP.useRef)(void 0),s={onClick:r,className:V("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(void 0),i.current?.focus()},className:V("block-editor-global-styles__shadow-editor__remove-button",{"is-open":n}),label:(0,ip.__)("Remove")};return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(xo.Button,{__next40pxDefaultSize:!0,...s,children:(0,Rt.jsxs)(xo.__experimentalHStack,{justify:"flex-start",children:[(0,Rt.jsx)(we,{className:"block-editor-global-styles__toggle-icon",icon:iN,size:24}),(0,Rt.jsx)(xo.FlexItem,{children:(0,ip.__)("Drop shadow")})]})}),!!e&&(0,Rt.jsx)(xo.Button,{__next40pxDefaultSize:!0,size:"small",icon:Dr,...a})]})}}function jF(e){return(0,FP.useMemo)(()=>{if(!e?.shadow)return VP;let t=e?.shadow?.defaultPresets,{default:o,theme:r,custom:n}=e?.shadow?.presets??{},i={name:(0,ip.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&o||VP,...r||VP,...n||VP];return s.length&&s.unshift(i),s},[e])}var ta=l(w(),1);function zP(e){return Object.values(p_(e)).some(Boolean)}function p_(e){return{hasBorderColor:zse(e),hasBorderRadius:jse(e),hasBorderStyle:Use(e),hasBorderWidth:Hse(e),hasShadow:Gse(e)}}function zse(e){return e?.border?.color}function jse(e){return e?.border?.radius}function Use(e){return e?.border?.style}function Hse(e){return e?.border?.width}function Gse(e){let t=jF(e);return!!e?.shadow&&t.length>0}function fIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Ro();return(0,ta.jsx)(en.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}var mIe={radius:!0,color:!0,width:!0,shadow:!0};function jP({as:e=fIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,name:s,defaultControls:a=mIe}){let c=Xa(n),u=(0,Wb.useCallback)(j=>wn({settings:n},"",j),[n]),d=j=>{let W=c.flatMap(({colors:ee})=>ee).find(({color:ee})=>ee===j);return W?"var:preset|color|"+W.slug:j},f=(0,Wb.useMemo)(()=>{if((0,en.__experimentalHasSplitBorders)(r?.border)){let j={...r?.border};return["top","right","bottom","left"].forEach(z=>{j[z]={...j[z],color:u(j[z]?.color)}}),j}return{...r?.border,color:r?.border?.color?u(r?.border?.color):void 0}},[r?.border,u]),m=j=>o({...t,border:j}),h=zse(n),p=Use(n),g=Hse(n),b=jse(n),v=(0,Wb.useMemo)(()=>typeof r?.border?.radius!="object"?u(r?.border?.radius):{topLeft:u(r?.border?.radius?.topLeft),topRight:u(r?.border?.radius?.topRight),bottomLeft:u(r?.border?.radius?.bottomLeft),bottomRight:u(r?.border?.radius?.bottomRight)},[r?.border?.radius,u]),k=j=>m({...f,radius:j}),y=()=>{let j=t?.border?.radius;return typeof j=="object"?Object.entries(j).some(Boolean):!!j},S=Gse(n),x=u(r?.shadow),C=n?.shadow?.presets??{},B=C.custom??C.theme??C.default??[],I=j=>{let z=B?.find(({shadow:W})=>W===j)?.slug;o(pe(t,["shadow"],z?`var:preset|shadow|${z}`:j||void 0))},P=()=>!!t?.shadow,E=()=>I(void 0),L=()=>{if(y())return m({radius:t?.border?.radius});m(void 0)},T=j=>{let z={...j};(0,en.__experimentalHasSplitBorders)(z)?["top","right","bottom","left"].forEach(W=>{z[W]&&(z[W]={...z[W],color:d(z[W]?.color)})}):z&&(z.color=d(z.color)),m({radius:f?.radius,...z})},O=(0,Wb.useCallback)(j=>({...j,border:void 0,shadow:void 0}),[]),D=a?.color||a?.width,U=h||p||g||b,G=$b({blockName:s,hasShadowControl:S,hasBorderControl:U});return(0,ta.jsxs)(e,{resetAllFilter:O,value:t,onChange:o,panelId:i,label:G,children:[(g||h)&&(0,ta.jsx)(en.__experimentalToolsPanelItem,{hasValue:()=>(0,en.__experimentalIsDefinedBorder)(t?.border),label:(0,Gb.__)("Border"),onDeselect:()=>L(),isShownByDefault:D,panelId:i,children:(0,ta.jsx)(en.BorderBoxControl,{colors:c,enableAlpha:!0,enableStyle:p,onChange:T,popoverOffset:40,popoverPlacement:"left-start",value:f,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!S,label:(0,Gb.__)("Border")})}),b&&(0,ta.jsx)(en.__experimentalToolsPanelItem,{hasValue:y,label:(0,Gb.__)("Radius"),onDeselect:()=>k(void 0),isShownByDefault:a.radius,panelId:i,children:(0,ta.jsx)(ZT,{presets:n?.border?.radiusSizes,values:v,onChange:j=>{k(j||void 0)}})}),S&&(0,ta.jsxs)(en.__experimentalToolsPanelItem,{label:(0,Gb.__)("Shadow"),hasValue:P,onDeselect:E,isShownByDefault:a.shadow,panelId:i,children:[U?(0,ta.jsx)(en.BaseControl.VisualLabel,{as:"legend",children:(0,Gb.__)("Shadow")}):null,(0,ta.jsx)(Fse,{shadow:x,onShadowChange:I,settings:n})]})]})}var Qt=l(A(),1),HP=l(R(),1),Xt=l(N(),1);var at=l(w(),1);function GP(e){let t=$se(e),o=Zse(e),r=Kse(e),n=Dd(e),i=qse(e),s=Yse(e);return t||o||r||n||i||s}function $se(e){let t=Xa(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Kse(e){let t=Xa(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Yse(e){let t=Xa(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Dd(e){let t=Xa(e),o=f_(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function qse(e){let t=Xa(e),o=f_(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function Zse(e){let t=Xa(e),o=f_(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||o?.length>0||e?.color?.customGradient)}function UF({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,label:i}){let s=Ro(),a=()=>{let c=e(o);t(c)};return(0,at.jsx)(Qt.__experimentalToolsPanel,{label:i||(0,Xt.__)("Elements"),resetAll:a,panelId:r,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:s,children:(0,at.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:n})})}var pIe={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},hIe={placement:"left-start",offset:36,shift:!0},{Tabs:UP}=M(Qt.privateApis),gIe=({indicators:e,label:t})=>(0,at.jsxs)(Qt.__experimentalHStack,{justify:"flex-start",children:[(0,at.jsx)(Qt.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map((o,r)=>(0,at.jsx)(Qt.Flex,{expanded:!1,children:(0,at.jsx)(Qt.ColorIndicator,{colorValue:o})},r))}),(0,at.jsx)(Qt.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function Wse({isGradient:e,inheritedValue:t,userValue:o,setValue:r,colorGradientControlSettings:n}){return(0,at.jsx)(_d,{...n,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:r,onGradientChange:e?r:void 0,clearable:t===o,headingLevel:3})}function bIe({label:e,hasValue:t,resetValue:o,isShownByDefault:r,indicators:n,tabs:i,colorGradientControlSettings:s,panelId:a}){let c=i.find(m=>m.userValue!==void 0),{key:u,...d}=i[0]??{},f=(0,HP.useRef)(void 0);return(0,at.jsx)(Qt.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:o,isShownByDefault:r,panelId:a,children:(0,at.jsx)(Qt.Dropdown,{popoverProps:hIe,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:m,isOpen:h})=>{let p={onClick:m,className:V("block-editor-panel-color-gradient-settings__dropdown",{"is-open":h}),"aria-expanded":h,ref:f};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Qt.Button,{...p,__next40pxDefaultSize:!0,children:(0,at.jsx)(gIe,{indicators:n,label:e})}),t()&&(0,at.jsx)(Qt.Button,{__next40pxDefaultSize:!0,label:(0,Xt.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Dr,onClick:()=>{o(),h&&m(),f.current?.focus()}})]})},renderContent:()=>(0,at.jsx)(Qt.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,at.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[i.length===1&&(0,at.jsx)(Wse,{...d,colorGradientControlSettings:s},u),i.length>1&&(0,at.jsxs)(UP,{defaultTabId:c?.key,children:[(0,at.jsx)(UP.TabList,{children:i.map(m=>(0,at.jsx)(UP.Tab,{tabId:m.key,children:m.label},m.key))}),i.map(m=>{let{key:h,...p}=m;return(0,at.jsx)(UP.TabPanel,{tabId:h,focusable:!1,children:(0,at.jsx)(Wse,{...p,colorGradientControlSettings:s},h)},h)})]})]})})})})}function WP({as:e=UF,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=pIe,label:a,children:c}){let u=Xa(n),d=f_(n),f=n?.color?.custom,m=n?.color?.customGradient,h=u.length>0||f,p=d.length>0||m,g=H=>wn({settings:n},"",H),b=H=>{let ne=u.flatMap(({colors:le})=>le).find(({color:le})=>le===H);return ne?"var:preset|color|"+ne.slug:H},v=H=>{let ne=d.flatMap(({gradients:le})=>le).find(({gradient:le})=>le===H);return ne?"var:preset|gradient|"+ne.slug:H},k=Zse(n),y=g(r?.color?.background),S=g(t?.color?.background),x=g(r?.color?.gradient),C=g(t?.color?.gradient),B=()=>!!S||!!C,I=H=>{let X=pe(t,["color","background"],b(H));X.color.gradient=void 0,o(X)},P=H=>{let X=pe(t,["color","gradient"],v(H));X.color.background=void 0,o(X)},E=()=>{let H=pe(t,["color","background"],void 0);H.color.gradient=void 0,o(H)},L=Kse(n),T=g(r?.elements?.link?.color?.text),O=g(t?.elements?.link?.color?.text),D=H=>{o(pe(t,["elements","link","color","text"],b(H)))},U=g(r?.elements?.link?.[":hover"]?.color?.text),G=g(t?.elements?.link?.[":hover"]?.color?.text),j=H=>{o(pe(t,["elements","link",":hover","color","text"],b(H)))},z=()=>!!O||!!G,W=()=>{let H=pe(t,["elements","link",":hover","color","text"],void 0);H=pe(H,["elements","link","color","text"],void 0),o(H)},ee=$se(n),se=g(r?.color?.text),ce=g(t?.color?.text),ie=()=>!!ce,re=H=>{let X=pe(t,["color","text"],b(H));se===T&&(X=pe(X,["elements","link","color","text"],b(H))),o(X)},Q=()=>re(void 0),Y=[{name:"caption",label:(0,Xt.__)("Captions"),showPanel:Yse(n)},{name:"button",label:(0,Xt.__)("Button"),showPanel:qse(n)},{name:"heading",label:(0,Xt.__)("Heading"),showPanel:Dd(n)},{name:"h1",label:(0,Xt.__)("H1"),showPanel:Dd(n)},{name:"h2",label:(0,Xt.__)("H2"),showPanel:Dd(n)},{name:"h3",label:(0,Xt.__)("H3"),showPanel:Dd(n)},{name:"h4",label:(0,Xt.__)("H4"),showPanel:Dd(n)},{name:"h5",label:(0,Xt.__)("H5"),showPanel:Dd(n)},{name:"h6",label:(0,Xt.__)("H6"),showPanel:Dd(n)}],J=(0,HP.useCallback)(H=>({...H,color:void 0,elements:{...H?.elements,link:{...H?.elements?.link,color:void 0,":hover":{color:void 0}},...Y.reduce((X,ne)=>({...X,[ne.name]:{...H?.elements?.[ne.name],color:void 0}}),{})}}),[Y]),K=[ee&&{key:"text",label:(0,Xt.__)("Text"),hasValue:ie,resetValue:Q,isShownByDefault:s.text,indicators:[se],tabs:[{key:"text",label:(0,Xt.__)("Text"),inheritedValue:se,setValue:re,userValue:ce}]},k&&{key:"background",label:(0,Xt.__)("Background"),hasValue:B,resetValue:E,isShownByDefault:s.background,indicators:[x??y],tabs:[h&&{key:"background",label:(0,Xt.__)("Color"),inheritedValue:y,setValue:I,userValue:S},p&&{key:"gradient",label:(0,Xt.__)("Gradient"),inheritedValue:x,setValue:P,userValue:C,isGradient:!0}].filter(Boolean)},L&&{key:"link",label:(0,Xt.__)("Link"),hasValue:z,resetValue:W,isShownByDefault:s.link,indicators:[T,U],tabs:[{key:"link",label:(0,Xt.__)("Default"),inheritedValue:T,setValue:D,userValue:O},{key:"hover",label:(0,Xt.__)("Hover"),inheritedValue:U,setValue:j,userValue:G}]}].filter(Boolean);return Y.forEach(({name:H,label:X,showPanel:ne})=>{if(!ne)return;let le=g(r?.elements?.[H]?.color?.background),ve=g(r?.elements?.[H]?.color?.gradient),he=g(r?.elements?.[H]?.color?.text),xe=g(t?.elements?.[H]?.color?.background),ze=g(t?.elements?.[H]?.color?.gradient),ot=g(t?.elements?.[H]?.color?.text),Wt=()=>!!(ot||xe||ze),fo=()=>{let Pe=pe(t,["elements",H,"color","background"],void 0);Pe.elements[H].color.gradient=void 0,Pe.elements[H].color.text=void 0,o(Pe)},Do=Pe=>{o(pe(t,["elements",H,"color","text"],b(Pe)))},rt=Pe=>{let wt=pe(t,["elements",H,"color","background"],b(Pe));wt.elements[H].color.gradient=void 0,o(wt)},ar=Pe=>{let wt=pe(t,["elements",H,"color","gradient"],v(Pe));wt.elements[H].color.background=void 0,o(wt)},xt=!0,At=H!=="caption";K.push({key:H,label:X,hasValue:Wt,resetValue:fo,isShownByDefault:s[H],indicators:xt&&At?[he,ve??le]:[xt?he:ve??le],tabs:[h&&xt&&{key:"text",label:(0,Xt.__)("Text"),inheritedValue:he,setValue:Do,userValue:ot},h&&At&&{key:"background",label:(0,Xt.__)("Background"),inheritedValue:le,setValue:rt,userValue:xe},p&&At&&{key:"gradient",label:(0,Xt.__)("Gradient"),inheritedValue:ve,setValue:ar,userValue:ze,isGradient:!0}].filter(Boolean)})}),(0,at.jsxs)(e,{resetAllFilter:J,value:t,onChange:o,panelId:i,label:a,children:[K.map(H=>{let{key:X,...ne}=H;return(0,at.jsx)(bIe,{...ne,colorGradientControlSettings:{colors:u,disableCustomColors:!f,gradients:d,disableCustomGradients:!m},panelId:i},X)}),c]})}var mt=l(A(),1),Sc=l(N(),1),Kb=l(R(),1);var so=l(w(),1),$P=[];function Xse(e,{presetSetting:t,defaultSetting:o}){let r=!e?.color?.[o],n=e?.color?.[t]?.custom||$P,i=e?.color?.[t]?.theme||$P,s=e?.color?.[t]?.default||$P;return(0,Kb.useMemo)(()=>[...n,...i,...r?$P:s],[r,n,i,s])}function Qse(e){return Jse(e)}function Jse(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function kIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n}){let i=Ro(),s=()=>{let a=e(o);t(a)};return(0,so.jsx)(mt.__experimentalToolsPanel,{label:(0,Sc._x)("Filters","Name for applying graphical effects"),resetAll:s,panelId:r,dropdownMenuProps:i,children:n})}var vIe={duotone:!0},yIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,Sc.__)("Duotone")},SIe=({indicator:e,label:t})=>(0,so.jsxs)(mt.__experimentalHStack,{justify:"flex-start",children:[(0,so.jsx)(mt.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,so.jsx)(mt.Flex,{expanded:!1,children:e==="unset"||!e?(0,so.jsx)(mt.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):(0,so.jsx)(mt.DuotoneSwatch,{values:e})})}),(0,so.jsx)(mt.FlexItem,{title:t,children:t})]}),_Ie=(e,t)=>function({onToggle:r,isOpen:n}){let i=(0,Kb.useRef)(void 0),s={onClick:r,className:V("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":n}),"aria-expanded":n,ref:i},a={onClick:()=>{n&&r(),t(),i.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,Sc.__)("Reset")};return(0,so.jsxs)(so.Fragment,{children:[(0,so.jsx)(mt.Button,{__next40pxDefaultSize:!0,...s,children:(0,so.jsx)(SIe,{indicator:e,label:(0,Sc.__)("Duotone")})}),e&&(0,so.jsx)(mt.Button,{size:"small",icon:Dr,...a})]})};function KP({as:e=kIe,value:t,onChange:o,inheritedValue:r=t,settings:n,panelId:i,defaultControls:s=vIe}){let a=b=>wn({settings:n},"",b),c=Jse(n),u=Xse(n,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),d=Xse(n,{presetSetting:"palette",defaultSetting:"defaultPalette"}),f=a(r?.filter?.duotone),m=b=>{let v=u.find(({colors:y})=>y===b),k=v?`var:preset|duotone|${v.slug}`:b;o(pe(t,["filter","duotone"],k))},h=()=>!!t?.filter?.duotone,p=()=>m(void 0),g=(0,Kb.useCallback)(b=>({...b,filter:{...b.filter,duotone:void 0}}),[]);return(0,so.jsx)(e,{resetAllFilter:g,value:t,onChange:o,panelId:i,children:c&&(0,so.jsx)(mt.__experimentalToolsPanelItem,{label:(0,Sc.__)("Duotone"),hasValue:h,onDeselect:p,isShownByDefault:s.duotone,panelId:i,children:(0,so.jsx)(mt.Dropdown,{popoverProps:yIe,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:_Ie(f,p),renderContent:()=>(0,so.jsx)(mt.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,so.jsxs)(mt.MenuGroup,{label:(0,Sc.__)("Duotone"),children:[(0,so.jsx)("p",{children:(0,Sc.__)("Create a two-tone color effect without losing your original image.")}),(0,so.jsx)(mt.DuotonePicker,{colorPalette:d,duotonePalette:u,disableCustomColors:!0,disableCustomDuotone:!0,value:f,onChange:m})]})})})})})}var Yb=l(A(),1),h_=l(N(),1);var sp=l(w(),1);function eae(e,t,o){return e==="core/image"&&o?.lightbox?.allowEditing||!!t?.lightbox}function tae({onChange:e,value:t,inheritedValue:o,panelId:r}){let n=Ro(),i=()=>{e(void 0)},s=c=>{e({enabled:c})},a=!1;return o?.lightbox?.enabled&&(a=o.lightbox.enabled),(0,sp.jsx)(sp.Fragment,{children:(0,sp.jsx)(Yb.__experimentalToolsPanel,{label:(0,h_._x)("Settings","Image settings"),resetAll:i,panelId:r,dropdownMenuProps:n,children:(0,sp.jsx)(Yb.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,h_.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:r,children:(0,sp.jsx)(Yb.ToggleControl,{label:(0,h_.__)("Enlarge on click"),checked:a,onChange:s})})})})}var qb=l(A(),1),oae=l(R(),1),YP=l(N(),1);var g_=l(w(),1);function qP(e){return!(typeof e=="string"&&/<\/?\w/.test(e))}function ZP({value:e,onChange:t,inheritedValue:o=e,help:r}){let[n,i]=(0,oae.useState)(null),s=o?.css;function a(u){if(t({...e,css:u}),!qP(u)){i((0,YP.__)("The custom CSS is invalid. Do not use <> markup."));return}n&&i(null)}function c(u){let d=u?.target?.value;if(!d||!qP(d))return;let[f]=Uh([{css:d}],".for-validation-only");i(f===null?(0,YP.__)("There is an error with your CSS structure."):null)}return(0,g_.jsxs)(qb.__experimentalVStack,{spacing:3,children:[n&&(0,g_.jsx)(qb.Notice,{status:"error",onRemove:()=>i(null),children:n}),(0,g_.jsx)(qb.TextareaControl,{label:(0,YP.__)("Additional CSS"),value:s,onChange:u=>a(u),onBlur:c,className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1,help:r})]})}var e2=l(A(),1),t2=l(R(),1),GF=l(N(),1);var Be=l(A(),1);var Ot=l(N(),1),nae=l(Un(),1),HF=l(dn(),1),_c=l(R(),1),b_=l(F(),1),iae=l(Fe(),1),sae=l(F5(),1);var Te=l(w(),1),XP="image",xIe={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},JP=()=>{},QP=e=>{window.requestAnimationFrame(()=>{let[t]=iae.focus.tabbable.find(e?.current);t&&t.focus()})};function wIe(e){return e==="cover"||e===void 0?(0,Ot.__)("Image covers the space evenly."):e==="contain"?(0,Ot.__)("Image is contained without distortion."):(0,Ot.__)("Image has a fixed width.")}var CIe=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}%`},BIe=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 aae({as:e="span",imgUrl:t,toggleProps:o={},filename:r,label:n,onToggleCallback:i=JP}){let{isOpen:s,...a}=o;(0,_c.useEffect)(()=>{typeof s<"u"&&i(s)},[s,i]);let c=()=>(0,Te.jsxs)(Be.__experimentalHStack,{className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[(0,Te.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:t?`url(${t})`:void 0}}),(0,Te.jsxs)(Be.FlexBlock,{children:[(0,Te.jsx)(Be.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:n}),(0,Te.jsx)(Be.VisuallyHidden,{as:"span",children:t?(0,Ot.sprintf)((0,Ot.__)("Background image: %s"),r||n):(0,Ot.__)("No background image selected")})]})]});return e==="button"?(0,Te.jsx)(Be.Button,{__next40pxDefaultSize:!0,...a,children:c()}):c()}function EIe({label:e,filename:t,url:o,children:r,onToggle:n=JP,hasImageValue:i,onReset:s,containerRef:a}){if(!i)return;let c=e||(0,HF.getFilename)(o)||(0,Ot.__)("Image");return(0,Te.jsx)(Be.Dropdown,{popoverProps:xIe,renderToggle:({onToggle:u,isOpen:d})=>{let f={onClick:u,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":d,"aria-label":(0,Ot.__)("Background size, position and repeat options."),isOpen:d};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(aae,{imgUrl:o,filename:t,label:c,toggleProps:f,as:"button",onToggleCallback:n}),s&&(0,Te.jsx)(Be.Button,{__next40pxDefaultSize:!0,label:(0,Ot.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Dr,onClick:()=>{s(),d&&u(),QP(a)}})]})},renderContent:()=>(0,Te.jsx)(Be.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:r})})}function TIe(){return(0,Te.jsx)(Be.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,Te.jsx)(Be.Spinner,{})})}function rae({onChange:e,style:t,inheritedValue:o,onRemoveImage:r=JP,onResetImage:n=JP,displayInPanel:i,defaultValues:s,containerRef:a}){let[c,u]=(0,_c.useState)(!1),{getSettings:d}=(0,b_.useSelect)(_),{id:f,title:m,url:h}=t?.background?.backgroundImage||{...o?.background?.backgroundImage},{createErrorNotice:p}=(0,b_.useDispatch)(nae.store),g=B=>{p(B,{type:"snackbar"}),u(!1)},b=()=>e(pe(t,["background","backgroundImage"],void 0)),v=B=>{if(!B||!B.url){b(),u(!1);return}if((0,sae.isBlobURL)(B.url)){u(!0);return}if(B.media_type&&B.media_type!==XP||!B.media_type&&B.type&&B.type!==XP){g((0,Ot.__)("Only images can be used as a background image."));return}let I=t?.background?.backgroundSize||s?.backgroundSize,P=t?.background?.backgroundPosition;e(pe(t,["background"],{...t?.background,backgroundImage:{url:B.url,id:B.id,source:"file",title:B.title||void 0},backgroundPosition:!P&&(I==="auto"||!I)?"50% 0":P,backgroundSize:I})),u(!1),QP(a)},k=B=>{d().mediaUpload({allowedTypes:[XP],filesList:B,onFileChange([I]){v(I)},onError:g,multiple:!1})},y=ap(t),S=()=>e(pe(t,["background"],{backgroundImage:"none"})),x=!y&&ap(o),C=m||(0,HF.getFilename)(h)||(0,Ot.__)("Image");return(0,Te.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[c&&(0,Te.jsx)(TIe,{}),(0,Te.jsx)(_b,{mediaId:f,mediaURL:h,allowedTypes:[XP],accept:"image/*",onSelect:v,popoverProps:{className:V({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,Te.jsx)(aae,{imgUrl:h,filename:m,label:C}),renderToggle:B=>(0,Te.jsx)(Be.Button,{...B,__next40pxDefaultSize:!0}),onError:g,onReset:()=>{QP(a),n()},children:x&&(0,Te.jsx)(Be.MenuItem,{onClick:()=>{QP(a),S(),r()},children:(0,Ot.__)("Remove")})}),(0,Te.jsx)(Be.DropZone,{onFilesDrop:k,label:(0,Ot.__)("Drop to upload")})]})}function IIe({onChange:e,style:t,inheritedValue:o,defaultValues:r}){let n=t?.background?.backgroundSize||o?.background?.backgroundSize,i=t?.background?.backgroundRepeat||o?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||o?.background?.backgroundImage?.url,a=t?.background?.backgroundImage?.id,c=t?.background?.backgroundPosition||o?.background?.backgroundPosition,u=t?.background?.backgroundAttachment||o?.background?.backgroundAttachment,d=!n&&a?r?.backgroundSize:n||"auto";d=["cover","contain","auto"].includes(d)?d:"auto";let f=!(i==="no-repeat"||d==="cover"&&i===void 0),m=v=>{let k=i,y=c;v==="contain"&&(k="no-repeat",y=void 0),v==="cover"&&(k=void 0,y=void 0),(d==="cover"||d==="contain")&&v==="auto"&&(k=void 0,t?.background?.backgroundImage?.id&&(y="50% 0")),!v&&d==="auto"&&(v="auto"),e(pe(t,["background"],{...t?.background,backgroundPosition:y,backgroundRepeat:k,backgroundSize:v}))},h=v=>{e(pe(t,["background","backgroundPosition"],CIe(v)))},p=()=>e(pe(t,["background","backgroundRepeat"],f===!0?"no-repeat":"repeat")),g=()=>e(pe(t,["background","backgroundAttachment"],u==="fixed"?"scroll":"fixed")),b=!c&&a&&n==="contain"?r?.backgroundPosition:c;return(0,Te.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(Be.FocalPointPicker,{label:(0,Ot.__)("Focal point"),url:s,value:BIe(b),onChange:h}),(0,Te.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Fixed background"),checked:u==="fixed",onChange:g}),(0,Te.jsxs)(Be.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Ot.__)("Size"),value:d,onChange:m,isBlock:!0,help:wIe(n||r?.backgroundSize),children:[(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Ot._x)("Cover","Size option for background image control")},"cover"),(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Ot._x)("Contain","Size option for background image control")},"contain"),(0,Te.jsx)(Be.__experimentalToggleGroupControlOption,{value:"auto",label:(0,Ot._x)("Tile","Size option for background image control")},"tile")]}),(0,Te.jsxs)(Be.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,Te.jsx)(Be.__experimentalUnitControl,{"aria-label":(0,Ot.__)("Background image width"),onChange:m,value:n,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,Ot.__)("Auto"),disabled:d!=="auto"||d===void 0}),(0,Te.jsx)(Be.ToggleControl,{label:(0,Ot.__)("Repeat"),checked:f,onChange:p,disabled:d==="cover"})]})]})}function lae({value:e,onChange:t,inheritedValue:o=e,settings:r,defaultValues:n={}}){let{globalStyles:i,_links:s}=(0,b_.useSelect)(v=>{let{getSettings:k}=v(_),y=k();return{globalStyles:y[xi],_links:y[y0]}},[]),a=(0,_c.useMemo)(()=>{let v={background:{}};return o?.background?(Object.entries(o?.background).forEach(([k,y])=>{v.background[k]=Pg(y,{styles:i,_links:s})}),v):o},[i,s,o]),c=()=>t(pe(e,["background"],{})),{title:u,url:d}=e?.background?.backgroundImage||{...a?.background?.backgroundImage},f=ap(e)||ap(a),m=e?.background?.backgroundImage||o?.background?.backgroundImage,h=f&&m!=="none"&&(r?.background?.backgroundSize||r?.background?.backgroundPosition||r?.background?.backgroundRepeat),[p,g]=(0,_c.useState)(!1),b=(0,_c.useRef)();return(0,Te.jsx)("div",{ref:b,className:V("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":p}),children:h?(0,Te.jsx)(EIe,{label:u,filename:u,url:d,onToggle:g,hasImageValue:f,onReset:c,containerRef:b,children:(0,Te.jsxs)(Be.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,Te.jsx)(rae,{onChange:t,style:e,inheritedValue:a,displayInPanel:!0,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),defaultValues:n,containerRef:b}),(0,Te.jsx)(IIe,{onChange:t,style:e,defaultValues:n,inheritedValue:a})]})}):(0,Te.jsx)(rae,{onChange:t,style:e,inheritedValue:a,defaultValues:n,onResetImage:()=>{g(!1),c()},onRemoveImage:()=>g(!1),containerRef:b})})}var k_=l(w(),1),PIe={backgroundImage:!0};function v_(e){return t2.Platform.OS==="web"&&e?.background?.backgroundImage}function ap(e){return!!e?.background?.backgroundImage?.id||typeof e?.background?.backgroundImage=="string"||!!e?.background?.backgroundImage?.url}function RIe({resetAllFilter:e,onChange:t,value:o,panelId:r,children:n,headerLabel:i}){let s=Ro();return(0,k_.jsx)(e2.__experimentalToolsPanel,{label:i,resetAll:()=>{let c=e(o);t(c)},panelId:r,dropdownMenuProps:s,children:n})}function o2({as:e=RIe,value:t,onChange:o,inheritedValue:r,settings:n,panelId:i,defaultControls:s=PIe,defaultValues:a={},headerLabel:c=(0,GF.__)("Background")}){let u=v_(n),d=()=>o(pe(t,["background"],{})),f=(0,t2.useCallback)(m=>({...m,background:{}}),[]);return(0,k_.jsx)(e,{resetAllFilter:f,value:t,onChange:o,panelId:i,headerLabel:c,children:u&&(0,k_.jsx)(e2.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,GF.__)("Image"),onDeselect:d,isShownByDefault:s.backgroundImage,panelId:i,children:(0,k_.jsx)(lae,{value:t,onChange:o,settings:n,inheritedValue:r,defaultControls:s,defaultValues:a})})})}var n2=l(N(),1),KF=l(w(),1),cp="__experimentalBorder",S_="shadow",cae=(e,t,o)=>{let r;return e.some(n=>n.colors.some(i=>i[t]===o?(r=i,!0):!1)),r},lp=({colors:e,namedColor:t,customColor:o})=>{if(t){let n=cae(e,"slug",t);if(n)return n}if(!o)return{color:void 0};let r=cae(e,"color",o);return r||{color:o}};function r2(e){let t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function fae(e){if((0,$F.__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:Me(r),borderColor:o}}function mae(e){return(0,$F.__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 OIe({label:e,children:t,resetAllFilter:o}){let r=(0,Zb.useCallback)(n=>{let i=mae(n),s=o(i);return{...n,...fae(s)}},[o]);return(0,KF.jsx)(fe,{group:"border",resetAllFilter:r,label:e,children:t})}function pae({clientId:e,name:t,setAttributes:o,settings:r}){let n=zP(r),{style:i,borderColor:s}=(0,dae.useSelect)(d=>{if(!n)return{};let{style:f,borderColor:m}=d(_).getBlockAttributes(e)||{};return{style:f,borderColor:m}},[e,n]),a=(0,Zb.useMemo)(()=>mae({style:i,borderColor:s}),[i,s]),c=d=>{o(fae(d))};if(!n)return null;let u={...(0,y_.getBlockSupport)(t,[cp,"__experimentalDefaultControls"]),...(0,y_.getBlockSupport)(t,[S_,"__experimentalDefaultControls"])};return(0,KF.jsx)(jP,{as:OIe,panelId:e,settings:r,value:a,onChange:c,defaultControls:u})}function i2(e,t="any"){if(Zb.Platform.OS!=="web")return!1;let o=(0,y_.getBlockSupport)(e,cp);return o===!0?!0:t==="any"?!!(o?.color||o?.radius||o?.width||o?.style):!!o?.[t]}function $b({blockName:e,hasBorderControl:t,hasShadowControl:o}={}){let r=is(e),n=p_(r);return!t&&!o&&e&&(t=n?.hasBorderColor||n?.hasBorderStyle||n?.hasBorderWidth||n?.hasBorderRadius,o=n?.hasShadow),t&&o?(0,n2.__)("Border & Shadow"):o?(0,n2.__)("Shadow"):(0,n2.__)("Border")}function AIe(e){return!i2(e,"color")||e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}}function hae(e,t,o){if(!i2(t,"color")||Ue(t,cp,"color"))return e;let r=YF(o),n=V(e.className,r);return e.className=n||void 0,e}function YF(e){let{borderColor:t,style:o}=e,r=_i("border-color",t);return V({"has-border-color":t||o?.border?.color,[r]:!!r})}function LIe({name:e,borderColor:t,style:o}){let{colors:r}=wd();if(!i2(e,"color")||Ue(e,cp,"color"))return{};let{color:n}=lp({colors:r,namedColor:t}),{color:i}=lp({colors:r,namedColor:r2(o?.border?.top?.color)}),{color:s}=lp({colors:r,namedColor:r2(o?.border?.right?.color)}),{color:a}=lp({colors:r,namedColor:r2(o?.border?.bottom?.color)}),{color:c}=lp({colors:r,namedColor:r2(o?.border?.left?.color)});return hae({style:Me({borderTopColor:i||n,borderRightColor:s||n,borderBottomColor:a||n,borderLeftColor:c||n})||{}},e,{borderColor:t,style:o})}var qF={useBlockProps:LIe,addSaveProps:hae,attributeKeys:["borderColor","style"],hasSupport(e){return i2(e,"color")}};(0,uae.addFilter)("blocks.registerBlockType","core/border/addAttributes",AIe);var JF=l(ut(),1),xc=l($(),1),Vd=l(R(),1),Bae=l(F(),1);var XF=l($(),1),gae=l(F(),1),bae=l(R(),1);var QF=l(w(),1),up="background",ZF={backgroundSize:"cover",backgroundPosition:"50% 50%"};function s2(e,t="any"){let o=(0,XF.getBlockSupport)(e,up);return o===!0?!0:t==="any"?!!o?.backgroundImage||!!o?.backgroundSize||!!o?.backgroundRepeat:!!o?.[t]}function a2(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:ZF.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:ZF.backgroundPosition}),t}function NIe({name:e,style:t}){if(!s2(e)||!t?.background?.backgroundImage)return;let o=a2(t?.background);if(o)return{style:{...o}}}function kae(e){return ap(e)?"has-background":""}function MIe({children:e}){let t=(0,bae.useCallback)(o=>({...o,style:{...o.style,background:void 0}}),[]);return(0,QF.jsx)(fe,{group:"background",resetAllFilter:t,children:e})}function vae({clientId:e,name:t,setAttributes:o,settings:r}){let{style:n,inheritedValue:i}=(0,gae.useSelect)(u=>{let{getBlockAttributes:d,getSettings:f}=u(_),m=f();return{style:d(e)?.style,inheritedValue:m[xi]?.blocks?.[t]}},[e,t]);if(!v_(r)||!s2(t,"backgroundImage"))return null;let s=u=>{o({style:Me(u)})},a={...r,background:{...r.background,backgroundSize:r?.background?.backgroundSize&&s2(t,"backgroundSize")}},c=(0,XF.getBlockSupport)(t,[up,"defaultControls"]);return(0,QF.jsx)(o2,{inheritedValue:i,as:MIe,panelId:e,defaultValues:ZF,settings:a,onChange:s,defaultControls:c,value:n})}var yae={useBlockProps:NIe,attributeKeys:["style"],hasSupport:s2};var __=l(R(),1),_ae=l(F(),1),xae=l($(),1);var wae=l(w(),1);function l2(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Sae(e,t){if(!e||!t)return{};let o=oi(t,"color.text",{fallback:!0}),r=oi(t,"color.background",{fallback:!0}),n=e.querySelector(o)||e,i=e.querySelector(r)||e,s=e.querySelector("a"),a=l2(n,"color"),c=s&&s.textContent?l2(s,"color"):void 0,u=i,d=l2(u,"background-color");for(;d==="rgba(0, 0, 0, 0)"&&u.parentNode&&u.parentNode.nodeType===u.parentNode.ELEMENT_NODE;)u=u.parentNode,d=l2(u,"background-color");return{textColor:a,backgroundColor:d,linkColor:c}}function DIe(e,t){return Object.keys(t).some(r=>e[r]!==t[r])?t:e}function Cae({clientId:e,name:t}){let o=Xe(e),[r,n]=(0,__.useReducer)(DIe,{}),i=(0,_ae.useSelect)(s=>t?s(xae.store).getBlockType(t):void 0,[t]);return(0,__.useLayoutEffect)(()=>{!o||!i||window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>n(Sae(o,i))))}),(0,__.useLayoutEffect)(()=>{if(!o||!i)return;let s=new window.MutationObserver(()=>{n(Sae(o,i))});return s.observe(o,{attributes:!0,attributeFilter:["class","style"]}),()=>{s.disconnect()}},[o,i]),(0,wae.jsx)(QT,{backgroundColor:r.backgroundColor,textColor:r.textColor,linkColor:r.linkColor,enableAlphaChecker:!0})}var c2=l(w(),1),ir="color",u2=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t&&(t.link===!0||t.gradient===!0||t.background!==!1||t.text!==!1)},VIe=e=>{if(Vd.Platform.OS!=="web")return!1;let t=(0,xc.getBlockSupport)(e,ir);return t!==null&&typeof t=="object"&&!!t.link},e4=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t!==null&&typeof t=="object"&&!!t.gradients},FIe=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t&&t.background!==!1},zIe=e=>{let t=(0,xc.getBlockSupport)(e,ir);return t&&t.text!==!1};function jIe(e){return u2(e)&&(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),e4(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}})),e}function Eae(e,t,o){if(!u2(t)||Ue(t,ir))return e;let r=e4(t),{backgroundColor:n,textColor:i,gradient:s,style:a}=o,c=g=>!Ue(t,ir,g),u=c("text")?_i("color",i):void 0,d=c("gradients")?th(s):void 0,f=c("background")?_i("background-color",n):void 0,m=c("background")||c("gradients"),h=n||a?.color?.background||r&&(s||a?.color?.gradient),p=V(e.className,u,d,{[f]:(!r||!a?.color?.gradient)&&!!f,"has-text-color":c("text")&&(i||a?.color?.text),"has-background":m&&h,"has-link-color":c("link")&&a?.elements?.link?.color});return e.className=p||void 0,e}function Tae(e){let t=e?.color?.text,o=t?.startsWith("var:preset|color|")?t.substring(17):void 0,r=e?.color?.background,n=r?.startsWith("var:preset|color|")?r.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,a={...e};return a.color={...a.color,text:o?void 0:t,background:n?void 0:r,gradient:s?void 0:i},{style:Me(a),textColor:o,backgroundColor:n,gradient:s}}function Iae(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function UIe({children:e,resetAllFilter:t}){let o=(0,Vd.useCallback)(r=>{let n=Iae(r),i=t(n);return{...r,...Tae(i)}},[t]);return(0,c2.jsx)(fe,{group:"color",resetAllFilter:o,children:e})}function d2({clientId:e,name:t,setAttributes:o,settings:r,asWrapper:n,label:i,defaultControls:s}){let a=GP(r),{style:c,textColor:u,backgroundColor:d,gradient:f}=(0,Bae.useSelect)(b=>{if(!a)return{};let{style:v,textColor:k,backgroundColor:y,gradient:S}=b(_).getBlockAttributes(e)||{};return{style:v,textColor:k,backgroundColor:y,gradient:S}},[e,a]),m=(0,Vd.useMemo)(()=>Iae({style:c,textColor:u,backgroundColor:d,gradient:f}),[c,u,d,f]),h=b=>{o(Tae(b))};if(!a)return null;s=s||(0,xc.getBlockSupport)(t,[ir,"__experimentalDefaultControls"]);let p=Vd.Platform.OS==="web"&&!m?.color?.gradient&&(r?.color?.text||r?.color?.link)&&(0,xc.getBlockSupport)(t,[ir,"enableContrastChecker"])!==!1;return(0,c2.jsx)(WP,{as:n||UIe,panelId:e,settings:r,value:m,onChange:h,defaultControls:s,label:i,enableContrastChecker:(0,xc.getBlockSupport)(t,[ir,"enableContrastChecker"])!==!1,children:p&&(0,c2.jsx)(Cae,{clientId:e,name:t})})}function HIe({name:e,backgroundColor:t,textColor:o,gradient:r,style:n}){let[i,s,a]=me("color.palette.custom","color.palette.theme","color.palette.default"),c=(0,Vd.useMemo)(()=>[...i||[],...s||[],...a||[]],[i,s,a]);if(!u2(e)||Ue(e,ir))return{};let u={};o&&!Ue(e,ir,"text")&&(u.color=da(c,o)?.color),t&&!Ue(e,ir,"background")&&(u.backgroundColor=da(c,t)?.color);let d=Eae({style:u},e,{textColor:o,backgroundColor:t,gradient:r,style:n}),f=t||n?.color?.background||r||n?.color?.gradient;return{...d,className:V(d.className,!f&&kae(n))}}var t4={useBlockProps:HIe,addSaveProps:Eae,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:u2},GIe={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function WIe(e,t,o,r){let n=e.name,i={linkColor:VIe(n),textColor:zIe(n),backgroundColor:FIe(n),gradient:e4(n)};return f2(i,GIe,e,t,o,r)}(0,JF.addFilter)("blocks.registerBlockType","core/color/addAttribute",jIe);(0,JF.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",WIe);var kr=l(w(),1);function $Ie({blockName:e,clientId:t,contentClientIds:o}){let r=is(e),{updateBlockAttributes:n}=(0,m2.useDispatch)(_),{hasButtons:i,hasHeading:s}=(0,m2.useSelect)(c=>{let u=c(_).getBlockNamesByClientId(o);return{hasButtons:u.includes("core/buttons"),hasHeading:u.includes("core/heading")}},[o]);return(0,kr.jsx)(d2,{clientId:t,name:e,settings:r,setAttributes:c=>{n(t,c)},asWrapper:UF,label:(0,Xb.__)("Color"),defaultControls:{text:!0,background:!0,button:i,heading:s}})}var KIe=({blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:r,contentClientIds:n})=>{let i=$b({blockName:e});return(0,kr.jsxs)(kr.Fragment,{children:[o&&(0,kr.jsx)(Qg,{clientId:t}),r&&(0,kr.jsx)($Ie,{blockName:e,clientId:t,contentClientIds:n}),!r&&(0,kr.jsxs)(kr.Fragment,{children:[(0,kr.jsx)(fe.Slot,{group:"color",label:(0,Xb.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,kr.jsx)(fe.Slot,{group:"background",label:(0,Xb.__)("Background image")}),(0,kr.jsx)(fe.Slot,{group:"filter"}),(0,kr.jsx)(fe.Slot,{group:"typography",label:(0,Xb.__)("Typography")}),(0,kr.jsx)(fe.Slot,{group:"dimensions",label:(0,Xb.__)("Dimensions")}),(0,kr.jsx)(fe.Slot,{group:"border",label:i}),(0,kr.jsx)(fe.Slot,{group:"styles"})]})]})},Pae=KIe;var Rae=l(A(),1),Oae=l(N(),1);var p2=l($(),1),h2=l(F(),1),fi=l(A(),1);var ss=l(w(),1);function g2({clientIds:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){return e.length?(0,ss.jsx)(fi.__experimentalVStack,{spacing:1,children:e.map(n=>(0,ss.jsx)(YIe,{onSelect:t,onSwitchToListView:o,hasListViewTab:r,clientId:n},n))}):null}function YIe({clientId:e,onSelect:t,onSwitchToListView:o,hasListViewTab:r}){let n=Tt(e),{isSelected:i,childBlocks:s,hasListViewSupport:a,blockName:c}=(0,h2.useSelect)(p=>{let{isBlockSelected:g,hasSelectedInnerBlock:b,getBlockOrder:v,getBlockName:k}=p(_),y=k(e);return{isSelected:g(e)||b(e,!0),childBlocks:v(e),hasListViewSupport:y==="core/navigation"||(0,p2.hasBlockSupport)(y,"listView"),blockName:y}},[e]),d=(0,p2.getBlockType)(c)?.title||c,{selectBlock:f}=(0,h2.useDispatch)(_),h=s&&s.length>0&&r&&a;return(0,ss.jsx)(fi.Button,{__next40pxDefaultSize:!0,className:"block-editor-block-quick-navigation__item",isPressed:i,onClick:async()=>{await f(e),h&&o&&o(e),t&&t(e)},children:(0,ss.jsxs)(fi.Flex,{children:[(0,ss.jsx)(fi.FlexItem,{children:(0,ss.jsx)(Ae,{icon:n?.icon})}),(0,ss.jsx)(fi.FlexBlock,{style:{textAlign:"left"},children:(0,ss.jsx)(fi.__experimentalTruncate,{children:d})}),h&&(0,ss.jsx)(fi.FlexItem,{children:(0,ss.jsx)(we,{icon:Vo,size:24})})]})})}var Qb=l(w(),1),qIe=({contentClientIds:e,onSwitchToListView:t,hasListViewTab:o})=>{if(!e||e.length===0)return null;let r=window?.__experimentalContentOnlyInspectorFields;return(0,Qb.jsx)(Qb.Fragment,{children:!r&&(0,Qb.jsx)(Rae.PanelBody,{title:(0,Oae.__)("Content"),children:(0,Qb.jsx)(g2,{clientIds:e,onSwitchToListView:t,hasListViewTab:o})})})},b2=qIe;var Wo=l(w(),1),{Tabs:Fd}=M(ek.privateApis);function o4({blockName:e,clientId:t,hasBlockStyles:o,tabs:r,isSectionBlock:n,contentClientIds:i}){let s=(0,oa.useRef)(null),a=(0,Jb.useSelect)(S=>S(Aae.store).get("core","showIconLabels"),[]),{requestedTab:c}=(0,Jb.useSelect)(S=>({requestedTab:M(S(_)).getRequestedInspectorTab()})),[u,d]=(0,oa.useState)(()=>c?.tabName??r[0]?.name),f=(0,oa.useRef)(!1),m=(0,oa.useRef)(!1),{__unstableSetOpenListViewPanel:h,__unstableIncrementListViewExpandRevision:p,__unstableSetAllListViewPanelsOpen:g}=(0,Jb.useDispatch)(_),{clearRequestedInspectorTab:b}=M((0,Jb.useDispatch)(_));(0,oa.useEffect)(()=>{f.current=!1},[t]),(0,oa.useEffect)(()=>{c&&(d(c.tabName),c.tabName===yc.name&&c.options?.openPanel&&(h(c.options.openPanel),p()),m.current=!0,f.current=!0,b())},[c,h,p,b]),(0,oa.useEffect)(()=>{u===yc.name&&!f.current&&(g(),p())},[t,u,g,p]),(0,oa.useEffect)(()=>{if(!r?.length||f.current&&r.some(x=>x.name===u))return;let S=r[0]?.name;u!==S&&d(S)},[r,u]);let v=S=>{d(S),f.current=!0,S===yc.name&&!m.current&&(g(),p()),m.current=!1},k=r.some(S=>S.name===yc.name),y=S=>{k&&(h(S),p(),m.current=!0,v(yc.name))};return(0,Wo.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,Wo.jsxs)(Fd,{selectedTabId:u,onSelect:v,children:[(0,Wo.jsx)(Fd.TabList,{children:r.map(S=>a?(0,Wo.jsx)(Fd.Tab,{tabId:S.name,children:S.title},S.name):(0,Wo.jsx)(ek.Tooltip,{text:S.title,children:(0,Wo.jsx)(Fd.Tab,{tabId:S.name,"aria-label":S.title,children:(0,Wo.jsx)(ek.Icon,{icon:S.icon})})},S.name))}),(0,Wo.jsxs)(Fd.TabPanel,{tabId:_P.name,focusable:!1,children:[(0,Wo.jsx)(b2,{contentClientIds:i,onSwitchToListView:y,hasListViewTab:k}),(0,Wo.jsx)(fe.Slot,{group:"content"})]}),(0,Wo.jsxs)(Fd.TabPanel,{tabId:yc.name,focusable:!1,children:[(0,Wo.jsx)(fe.Slot,{group:"list",ref:s}),(0,Wo.jsx)(tE,{listViewRef:s})]}),(0,Wo.jsx)(Fd.TabPanel,{tabId:yP.name,focusable:!1,children:(0,Wo.jsx)(sse,{showAdvancedControls:!!e})}),(0,Wo.jsx)(Fd.TabPanel,{tabId:SP.name,focusable:!1,children:(0,Wo.jsx)(Pae,{blockName:e,clientId:t,hasBlockStyles:o,isSectionBlock:n,contentClientIds:i})})]},t)})}var mi=l(A(),1),Lae=l(F(),1);var ZIe=[];function XIe(e,t={}){return t[e]!==void 0?t[e]:t.default!==void 0?t.default:!0}function Nae(e,t,o,r){let n=[],{bindings:i,border:s,color:a,content:c,default:u,dimensions:d,list:f,position:m,styles:h,typography:p,effects:g}=Wi,b=(0,mi.__experimentalUseSlotFills)(f.name),v=!!b&&b.length,k=(0,mi.__experimentalUseSlotFills)(c.name),y=!!k&&k.length,x=[...(0,mi.__experimentalUseSlotFills)(s.name)||[],...(0,mi.__experimentalUseSlotFills)(a.name)||[],...(0,mi.__experimentalUseSlotFills)(d.name)||[],...(0,mi.__experimentalUseSlotFills)(h.name)||[],...(0,mi.__experimentalUseSlotFills)(p.name)||[],...(0,mi.__experimentalUseSlotFills)(g.name)||[]].length,C=[...(0,mi.__experimentalUseSlotFills)(rd.slotName)||[],...(0,mi.__experimentalUseSlotFills)(i.name)||[]],B=[...(0,mi.__experimentalUseSlotFills)(u.name)||[],...(0,mi.__experimentalUseSlotFills)(m.name)||[],...v&&x>1?C:[]],I=window?.__experimentalContentOnlyInspectorFields,P=y||!I&&t?.length;P&&n.push(_P),v&&n.push(yc),(B.length||C.length&&(P||v))&&n.push(yP);let{tabSettings:E,isPreviewMode:L}=(0,Lae.useSelect)(O=>{let D=O(_).getSettings();return{tabSettings:D.blockInspectorTabs,isPreviewMode:D.isPreviewMode}},[]);return!L&&(r||x)&&n.push(SP),XIe(e,E)?n:ZIe}var Mae=l(A(),1);var r4=l(w(),1),{Fill:QIe,Slot:JIe}=(0,Mae.createSlotFill)(Symbol("InspectorControlsLastItem")),Dae=e=>Ie()[bs]?(0,r4.jsx)(QIe,{...e}):null;Dae.Slot=function(t){return(0,r4.jsx)(JIe,{...t})};var k2=Dae;var Vae=l(F(),1);function Fae(e){return(0,Vae.useSelect)(t=>{if(e){let o=t(_).getSettings().blockInspectorAnimation,r=o?.animationParent,{getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=t(_),s=n();return!i(s,r,!0)[0]&&e.name!==r?null:o?.[e.name]}return null},[e])}var _e=l(w(),1);function Uae({blockName:e,showAdvancedControls:t=!0,showPositionControls:o=!0,showBindingsControls:r=!0}){let n=$b({blockName:e});return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(fe.Slot,{}),(0,_e.jsx)(fe.Slot,{group:"color",label:(0,tk.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,_e.jsx)(fe.Slot,{group:"background",label:(0,tk.__)("Background image")}),(0,_e.jsx)(fe.Slot,{group:"typography",label:(0,tk.__)("Typography")}),(0,_e.jsx)(fe.Slot,{group:"dimensions",label:(0,tk.__)("Dimensions")}),(0,_e.jsx)(fe.Slot,{group:"border",label:n}),(0,_e.jsx)(fe.Slot,{group:"styles"}),o&&(0,_e.jsx)(CP,{}),r&&(0,_e.jsx)(fe.Slot,{group:"bindings"}),t&&(0,_e.jsx)("div",{children:(0,_e.jsx)(xP,{})})]})}function ePe(){let{selectedBlockCount:e,renderedBlockName:t,renderedBlockClientId:o,blockType:r,isSectionBlock:n,isSectionBlockInSelection:i,hasBlockStyles:s,editedContentOnlySection:a}=(0,n4.useSelect)(g=>{let{getSelectedBlockClientId:b,getSelectedBlockClientIds:v,getSelectedBlockCount:k,getBlockName:y,getParentSectionBlock:S,isSectionBlock:x,getEditedContentOnlySection:C,isWithinEditedContentOnlySection:B}=M(g(_)),{getBlockStyles:I}=g(zd.store),P=b(),L=B(P)?P:S(P)||P,T=L&&y(L),O=T&&(0,zd.getBlockType)(T),U=v().some(z=>x(z)),G=T&&I(T),j=G&&G.length>0;return{selectedBlockCount:k(),renderedBlockClientId:L,renderedBlockName:T,blockType:O,isSectionBlockInSelection:U,isSectionBlock:x(L),hasBlockStyles:j,editedContentOnlySection:C()}},[]),c=(0,n4.useSelect)(g=>{if(!n||!o)return[];let{getClientIdsOfDescendants:b,getBlockName:v,getBlockEditingMode:k}=M(g(_)),y=b(o),S=new Set;return y.forEach(x=>{let C=v(x);(C==="core/navigation"||(0,zd.hasBlockSupport)(C,"listView"))&&b(x).forEach(I=>S.add(I))}),y.filter(x=>!S.has(x)&&k(x)==="contentOnly")},[n,o]),u=Nae(r?.name,c,n,s),d=u?.length>1,f=Fae(r),m=e>1;if(m&&!i)return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,_e.jsx)(NF,{}),d?(0,_e.jsx)(o4,{tabs:u}):(0,_e.jsx)(Uae,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(m&&i)return(0,_e.jsx)("div",{className:"block-editor-block-inspector",children:(0,_e.jsx)(NF,{})});let h=t===(0,zd.getUnregisteredTypeHandlerName)();return!r||!o||h?(0,_e.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,tk.__)("No block selected.")}):(0,_e.jsx)(tPe,{animate:f,wrapper:g=>(0,_e.jsx)(oPe,{blockInspectorAnimationSettings:f,renderedBlockClientId:o,children:g}),children:(0,_e.jsx)(rPe,{renderedBlockClientId:o,blockName:r.name,isSectionBlock:n,availableTabs:u,contentClientIds:c,hasBlockStyles:s,editedContentOnlySection:a})})}var tPe=({animate:e,wrapper:t,children:o})=>e?t(o):o,oPe=({blockInspectorAnimationSettings:e,renderedBlockClientId:t,children:o})=>{let r=e&&e.enterDirection==="leftToRight"?-50:50;return(0,_e.jsx)(zae.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:r,opacity:0},children:o},t)},rPe=({renderedBlockClientId:e,blockName:t,isSectionBlock:o,availableTabs:r,contentClientIds:n,hasBlockStyles:i,editedContentOnlySection:s})=>{let a=(0,jae.useRef)(null),c=r?.length>1,u=s&&s!==e,d=Tt(s),f=Tt(e),m=f.isSynced;return(0,_e.jsxs)("div",{className:"block-editor-block-inspector",children:[u&&(0,_e.jsx)(yy,{...d,className:d?.isSynced&&"is-synced",parentClientId:s}),(0,_e.jsx)(yy,{...f,allowParentNavigation:!0,className:m&&"is-synced",isChild:u,clientId:e}),(0,_e.jsx)(u9,{clientId:e}),(0,_e.jsx)(Xie,{clientId:e}),(0,_e.jsx)(WT,{blockClientId:e}),c&&(0,_e.jsx)(_e.Fragment,{children:(0,_e.jsx)(o4,{hasBlockStyles:i,clientId:e,blockName:t,tabs:r,isSectionBlock:o,contentClientIds:n})}),!c&&(0,_e.jsxs)(_e.Fragment,{children:[i&&(0,_e.jsx)(Qg,{clientId:e}),(0,_e.jsx)(b2,{contentClientIds:n}),(0,_e.jsx)(fe.Slot,{group:"content"}),(0,_e.jsx)(fe.Slot,{group:"list",ref:a}),(0,_e.jsx)(tE,{listViewRef:a}),!o&&(0,_e.jsx)(Uae,{blockName:t})]}),(0,_e.jsx)(k2.Slot,{}),(0,_e.jsx)(kP,{},"back")]})},Hae=ePe;var i4=l(Re(),1);var Gae=l(w(),1),Wae=()=>((0,i4.default)("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),xy());function $ae(e){return(0,i4.default)("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,Gae.jsx)("div",{...e,ref:xy()})}var Kae=l(F(),1),s4=l(R(),1);var a4=l(w(),1),nPe=()=>{};function iPe({rootClientId:e,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:a,__experimentalFilterValue:c,onPatternCategorySelection:u,onSelect:d=nPe,shouldFocusBlock:f=!1,onClose:m},h){let{destinationRootClientId:p}=(0,Kae.useSelect)(g=>{let{getBlockRootClientId:b}=g(_);return{destinationRootClientId:e||b(t)||void 0}},[t,e]);return(0,a4.jsx)(W5,{onSelect:d,rootClientId:p,clientId:t,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:n,__experimentalInsertionIndex:i,__experimentalFilterValue:c,onPatternCategorySelection:u,__experimentalInitialTab:s,__experimentalInitialCategory:a,shouldFocusBlock:f,ref:h,onClose:m})}var l4=(0,s4.forwardRef)(iPe);function sPe(e,t){return(0,a4.jsx)(l4,{...e,onPatternCategorySelection:void 0,ref:t})}var Yae=(0,s4.forwardRef)(sPe);var qae=l(Re(),1);function Zae(){return(0,qae.default)("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}var Xae=l(Z(),1),x_=l(Fe(),1),Qae=l(F(),1),jd=l(it(),1);var Jae=l(w(),1),aPe=window.navigator.userAgent.indexOf("Trident")!==-1,lPe=new Set([jd.UP,jd.DOWN,jd.LEFT,jd.RIGHT]),cPe=.75;function c4(){let e=(0,Qae.useSelect)(t=>t(_).hasSelectedBlock(),[]);return(0,Xae.useRefEffect)(t=>{if(!e)return;let{ownerDocument:o}=t,{defaultView:r}=o,n,i,s;function a(){n||(n=r.requestAnimationFrame(()=>{m(),n=null}))}function c(g){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame(()=>{u(g),i=null})}function u({keyCode:g}){if(!h())return;let b=(0,x_.computeCaretRect)(r);if(!b)return;if(!s){s=b;return}if(lPe.has(g)){s=b;return}let v=b.top-s.top;if(v===0)return;let k=(0,x_.getScrollContainer)(t);if(!k)return;let y=k===o.body||k===o.documentElement,S=y?r.scrollY:k.scrollTop,x=y?0:k.getBoundingClientRect().top,C=y?s.top/r.innerHeight:(s.top-x)/(r.innerHeight-x);if(S===0&&C<cPe&&p()){s=b;return}let B=y?r.innerHeight:k.clientHeight;if(s.top+s.height>x+B||s.top<x){s=b;return}y?r.scrollBy(0,v):k.scrollTop+=v}function d(){o.addEventListener("selectionchange",f)}function f(){o.removeEventListener("selectionchange",f),m()}function m(){h()&&(s=(0,x_.computeCaretRect)(r))}function h(){return t.contains(o.activeElement)&&o.activeElement.isContentEditable}function p(){let g=t.querySelectorAll('[contenteditable="true"]');return g[g.length-1]===o.activeElement}return r.addEventListener("scroll",a,!0),r.addEventListener("resize",a,!0),t.addEventListener("keydown",c),t.addEventListener("keyup",u),t.addEventListener("mousedown",d),t.addEventListener("touchstart",d),()=>{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",c),t.removeEventListener("keyup",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",d),o.removeEventListener("selectionchange",f),r.cancelAnimationFrame(n),r.cancelAnimationFrame(i)}},[e])}function uPe({children:e}){return(0,Jae.jsx)("div",{ref:c4(),className:"block-editor__typewriter",children:e})}var dPe=aPe?e=>e.children:uPe,ele=dPe;var dp=l(R(),1),u4=l(Re(),1);var d4=l(w(),1),v2=(0,dp.createContext)({});v2.displayName="RenderedRefsContext";function fPe(e,t,o){let r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(o),r}function f4({children:e,uniqueId:t,blockName:o=""}){let r=(0,dp.useContext)(v2),{name:n}=Ie();o=o||n;let i=(0,dp.useMemo)(()=>fPe(r,o,t),[r,o,t]);return(0,d4.jsx)(v2.Provider,{value:i,children:e})}function m4(e,t=""){let o=(0,dp.useContext)(v2),{name:r}=Ie();return t=t||r,!!o[t]?.has(e)}var tle=e=>((0,u4.default)("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,d4.jsx)(f4,{...e})),ole=(...e)=>((0,u4.default)("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),m4(...e));var S2=l(A(),1),p4=l(N(),1),h4=l(R(),1),nle=l(pc(),1);var pi=l(A(),1);var rle=l(N(),1),wc=l(w(),1);function y2({title:e,help:t,actions:o=[],onClose:r}){return(0,wc.jsxs)(pi.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,wc.jsxs)(pi.__experimentalHStack,{alignment:"center",children:[(0,wc.jsx)(pi.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,wc.jsx)(pi.__experimentalSpacer,{}),o.map(({label:n,icon:i,onClick:s})=>(0,wc.jsx)(pi.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,wc.jsx)(pi.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,rle.__)("Close"),icon:wf,onClick:r})]}),t&&(0,wc.jsx)(pi.__experimentalText,{children:t})]})}var ok=l(w(),1);function mPe({onClose:e,onChange:t,showPopoverHeaderActions:o,isCompact:r,currentDate:n,title:i,...s},a){let c={startOfWeek:(0,nle.getSettings)().l10n.startOfWeek,onChange:t,currentDate:r?void 0:n,currentTime:r?n:void 0,...s},u=r?S2.TimePicker:S2.DateTimePicker;return(0,ok.jsxs)("div",{ref:a,className:"block-editor-publish-date-time-picker",children:[(0,ok.jsx)(y2,{title:i||(0,p4.__)("Publish"),actions:o?[{label:(0,p4.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,ok.jsx)(u,{...c})]})}var g4=(0,h4.forwardRef)(mPe);function pPe(e,t){return(0,ok.jsx)(g4,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}var ile=(0,h4.forwardRef)(pPe);var _2=l(F(),1),sle=l(R(),1);function ao(e){let t=Ie(),{clientId:o=""}=t,{setBlockEditingMode:r,unsetBlockEditingMode:n}=(0,_2.useDispatch)(_),i=(0,_2.useSelect)(s=>o?null:s(_).getBlockEditingMode(),[o]);return(0,sle.useEffect)(()=>(e&&r(o,e),()=>{e&&n(o)}),[o,e,r,n]),o?t[u0]:i}var ale=l(Re(),1),lle=l(R(),1);function hPe(){return(0,ale.default)("wp.blockEditor.ToolSelector",{since:"6.9",hint:"The ToolSelector component no longer renders anything."}),null}var cle=(0,lle.forwardRef)(hPe);var C_=l(w(),1),Me=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=Object.entries(e).map(([o,r])=>[o,Me(r)]).filter(([,o])=>o!==void 0);return t.length?Object.fromEntries(t):void 0};function f2(e,t,o,r,n,i){if(Object.values(e??{}).every(c=>!c)||i.length===1&&o.innerBlocks.length===r.length)return o;let s=r[0]?.attributes;if(i.length>1&&r.length>1)if(r[n])s=r[n]?.attributes;else return o;let a=o;return Object.entries(e).forEach(([c,u])=>{u&&t[c].forEach(d=>{let f=yl(s,d);f&&(a={...a,attributes:pe(a.attributes,d,f)})})}),a}function Ue(e,t,o){let n=(0,ule.getBlockSupport)(e,t)?.__experimentalSkipSerialization;return Array.isArray(n)?n.includes(o):n}var Cc=new WeakMap;function Qn({id:e,css:t}){return tc({id:e,css:t})}function tc({id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i}={}){let{setStyleOverride:s,deleteStyleOverride:a}=M((0,x2.useDispatch)(_)),c=(0,x2.useRegistry)(),u=(0,as.useId)();(0,as.useEffect)(()=>{if(!t&&!o)return;let d=e||u,f={id:e,css:t,assets:o,__unstableType:r,variation:n,clientId:i};return Cc.get(c)||Cc.set(c,[]),Cc.get(c).push([d,f]),window.queueMicrotask(()=>{Cc.get(c)?.length&&c.batch(()=>{Cc.get(c).forEach(m=>{s(...m)}),Cc.set(c,[])})}),()=>{Cc.get(c)?.find(([h])=>h===d)?Cc.set(c,Cc.get(c).filter(([h])=>h!==d)):a(d)}},[e,t,i,o,r,u,s,a,c,n])}function is(e,t){let[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,y,S,x,C,B,I,P,E,L,T,O,D,U,G,j,z,W,ee,se,ce,ie,re,Q,Y,J,K,H,X,ne,le,ve,he,xe,ze,ot,Wt,fo,Do,rt,ar,xt,At,Pe,wt]=me("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),qo=(0,as.useMemo)(()=>({background:{backgroundImage:o,backgroundSize:r},color:{palette:{custom:J,theme:H,default:X},gradients:{custom:ze,theme:ot,default:Wt},duotone:{custom:ve,theme:he,default:xe},defaultGradients:fo,defaultPalette:ne,defaultDuotone:le,custom:Y,customGradient:Do,customDuotone:K,background:rt,link:ar,heading:At,button:Pe,text:xt},typography:{fontFamilies:{custom:n,default:i,theme:s},fontSizes:{custom:c,default:u,theme:d},customFontSize:f,defaultFontSizes:a,fontStyle:m,fontWeight:h,lineHeight:p,textAlign:g,textColumns:b,textDecoration:v,textIndent:k,textTransform:S,letterSpacing:x,writingMode:y},spacing:{spacingSizes:{custom:L,default:T,theme:O},customSpacingSize:E,defaultSpacingSizes:P,padding:C,margin:B,blockGap:I,units:D},border:{color:se,radius:ce,style:ie,width:re,radiusSizes:Q},dimensions:{aspectRatio:U,height:G,minHeight:j,width:z,dimensionSizes:W},layout:ee,parentLayout:t,shadow:wt}),[o,r,n,i,s,a,c,u,d,f,m,h,p,g,b,v,k,S,x,y,C,B,I,P,E,L,T,O,D,U,G,j,z,W,ee,t,se,ce,ie,re,Q,Y,J,K,H,X,ne,le,ve,he,xe,ze,ot,Wt,fo,Do,rt,ar,xt,At,Pe,wt]);return TP(qo,e)}function dle(e){e=e.map(o=>({...o,Edit:(0,as.memo)(o.edit)}));let t=(0,b4.createHigherOrderComponent)(o=>function(n){let i=Ie();return[...e.map((s,a)=>{let{Edit:c,hasSupport:u,attributeKeys:d=[],shareWithChildBlocks:f,supportsPatternEditing:m}=s;if(!(m&&i[$c]||i[bs]||i[Pp]&&f)||!u(n.name))return null;let p={};for(let g of d)n.attributes[g]&&(p[g]=n.attributes[g]);return(0,C_.jsx)(c,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...p},a)}),(0,C_.jsx)(o,{...n},"edit")]},"withBlockEditHooks");(0,w_.addFilter)("editor.BlockEdit","core/editor/hooks",t)}function gPe({index:e,useBlockProps:t,setAllWrapperProps:o,...r}){let n=t(r),i=s=>o(a=>{let c=[...a];return c[e]=s,c});return(0,as.useEffect)(()=>(i(n),()=>{i(void 0)})),null}var bPe=(0,as.memo)(gPe);function fle(e){let t=(0,b4.createHigherOrderComponent)(o=>function(n){let[i,s]=(0,as.useState)(Array(e.length).fill(void 0));return[...e.map((a,c)=>{let{hasSupport:u,attributeKeys:d=[],useBlockProps:f,isMatch:m}=a,h={};for(let p of d)n.attributes[p]&&(h[p]=n.attributes[p]);return!Object.keys(h).length||!u(n.name)||m&&!m(h)?null:(0,C_.jsx)(bPe,{index:c,useBlockProps:f,setAllWrapperProps:s,name:n.name,clientId:n.clientId,...h},c)}),(0,C_.jsx)(o,{...n,wrapperProps:i.filter(Boolean).reduce((a,c)=>({...a,...c,className:V(a.className,c.className),style:{...a.style,...c.style}}),n.wrapperProps||{})},"edit")]},"withBlockListBlockHooks");(0,w_.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}function mle(e){function t(o,r,n){return e.reduce((i,s)=>{let{hasSupport:a,attributeKeys:c=[],addSaveProps:u}=s,d={};for(let f of c)n[f]&&(d[f]=n[f]);return!Object.keys(d).length||!a(r)?i:u(i,r,d)},o)}(0,w_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",t,0),(0,w_.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",o=>(o.hasOwnProperty("className")&&!o.className&&delete o.className,o))}var ple=l($(),1),hle=l(ut(),1);function kPe(e){let{apiVersion:t=1}=e;return t<2&&(0,ple.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}(0,hle.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",kPe);function gle(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})})};vPe=e;let t=new window.MutationObserver(o=>{o.forEach(r=>{[r.addedNodes,r.target].forEach(n=>{(n instanceof window.NodeList?n:[n]).forEach(s=>{let a=s;a.querySelectorAll&&(a.querySelectorAll("source,script,video,link").forEach(c=>{gle(c)}),["SOURCE","SCRIPT","VIDEO","LINK"].includes(a.nodeName)&&gle(a))})})})});e()}var vPe;var ble=l(ut(),1),ls=l($(),1);var k4=l(w(),1),v4=["left","center","right","wide","full"],yPe=["wide","full"];function y4(e,t=!0,o=!0){let r;return Array.isArray(e)?r=v4.filter(n=>e.includes(n)):e===!0?r=[...v4]:r=[],!o||e===!0&&!t?r.filter(n=>!yPe.includes(n)):r}function SPe(e){return"type"in(e.attributes?.align??{})||(0,ls.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...v4,""]}}),e}function _Pe({name:e,align:t,setAttributes:o}){let r=y4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0)),n=Hv(r).map(({name:a})=>a),i=ao();return!n.length||i!=="default"?null:(0,k4.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,k4.jsx)(cC,{value:t,onChange:a=>{a||(0,ls.getBlockType)(e)?.attributes?.align?.default&&(a=""),o({align:a})},controls:n})})}var w2={shareWithChildBlocks:!0,edit:_Pe,useBlockProps:xPe,addSaveProps:wPe,attributeKeys:["align"],hasSupport(e){return(0,ls.hasBlockSupport)(e,"align",!1)}};function xPe({name:e,align:t}){let o=y4((0,ls.getBlockSupport)(e,"align"),(0,ls.hasBlockSupport)(e,"alignWide",!0));return Hv(o).some(n=>n.name===t)?{"data-align":t}:{}}function wPe(e,t,o){let{align:r}=o,n=(0,ls.getBlockSupport)(t,"align"),i=(0,ls.hasBlockSupport)(t,"alignWide",!0);return y4(n,i).includes(r)&&(e.className=V(`align${r}`,e.className)),e}(0,ble.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",SPe);var kle=l(ut(),1);function CPe(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}(0,kle.addFilter)("blocks.registerBlockType","core/lock/addAttribute",CPe);var C4=l(ut(),1),ak=l($(),1);var B_=l(A(),1),E2=l(N(),1),Ple=l(R(),1),Rle=l(F(),1),T2=l($(),1);var Pn=l(A(),1),Ele=l(R(),1),sk=l(N(),1),Tle=l(F(),1);var x4=l($(),1),wle=l(F(),1),ik=l(A(),1),ra=l(N(),1),C2=l(R(),1),Cle=l(Z(),1),Ble=l(Xo(),1);var S4=l(R(),1),Sle=l(Z(),1),_le=l(A(),1);var vle=l(A(),1);var rk=l(w(),1);function BPe({blockTypes:e,value:t,onItemChange:o}){return(0,rk.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map(r=>(0,rk.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,rk.jsx)(vle.CheckboxControl,{label:r.title,checked:t.includes(r.name),onChange:(...n)=>o(r,...n)}),(0,rk.jsx)(Ae,{icon:r.icon})]},r.name))})}var yle=BPe;var nk=l(w(),1);function xle({title:e,blockTypes:t,selectedBlockTypes:o,onChange:r}){let n=(0,Sle.useInstanceId)(xle),i=(0,S4.useCallback)((f,m)=>{r(m?[...o,f]:o.filter(({name:h})=>h!==f.name))},[o,r]),s=(0,S4.useCallback)(f=>{r(f?[...o,...t.filter(m=>!o.find(({name:h})=>h===m.name))]:o.filter(m=>!t.find(({name:h})=>h===m.name)))},[t,o,r]);if(!t.length)return null;let a=t.map(({name:f})=>f).filter(f=>(o??[]).some(m=>m.name===f)),c="block-editor-block-manager__category-title-"+n,u=a.length===t.length,d=!u&&a.length>0;return(0,nk.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,nk.jsx)(_le.CheckboxControl,{checked:u,onChange:s,className:"block-editor-block-manager__category-title",indeterminate:d,label:(0,nk.jsx)("span",{id:c,children:e})}),(0,nk.jsx)(yle,{blockTypes:t,value:a,onItemChange:i})]})}var _4=xle;var Bc=l(w(),1);function B2({blockTypes:e,selectedBlockTypes:t,onChange:o,showSelectAll:r=!0}){let n=(0,Cle.useDebounce)(Ble.speak,500),[i,s]=(0,C2.useState)(""),{categories:a,isMatchingSearchTerm:c}=(0,wle.useSelect)(m=>({categories:m(x4.store).getCategories(),isMatchingSearchTerm:m(x4.store).isMatchingSearchTerm}),[]),u=e.filter(m=>!i||c(m,i)),d=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,C2.useEffect)(()=>{if(!i)return;let m=u.length,h=(0,ra.sprintf)((0,ra._n)("%d result found.","%d results found.",m),m);n(h)},[u?.length,i,n]),(0,Bc.jsxs)(ik.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,Bc.jsx)(ik.SearchControl,{label:(0,ra.__)("Search for a block"),placeholder:(0,ra.__)("Search for a block"),value:i,onChange:m=>s(m),className:"block-editor-block-manager__search"}),r&&(0,Bc.jsx)(ik.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,ra.__)("Select all"),checked:f,onChange:()=>{o(f?[]:e)},indeterminate:d}),(0,Bc.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,ra.__)("Available block types"),className:"block-editor-block-manager__results",children:[u.length===0&&(0,Bc.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,ra.__)("No blocks found.")}),a.map(m=>(0,Bc.jsx)(_4,{title:m.title,blockTypes:u.filter(h=>h.category===m.slug),selectedBlockTypes:t,onChange:o},m.slug)),(0,Bc.jsx)(_4,{title:(0,ra.__)("Uncategorized"),blockTypes:u.filter(({category:m})=>!m),selectedBlockTypes:t,onChange:o})]})]})}var na=l(w(),1);function Ile({clientId:e,blockTypes:t,selectedBlockTypes:o,onClose:r}){let[n,i]=(0,Ele.useState)(o),{updateBlockAttributes:s}=(0,Tle.useDispatch)(_),a=()=>{let c=n.length===t.length,u=n.map(({name:d})=>d);s(e,{allowedBlocks:c?void 0:u}),r()};return(0,na.jsx)(Pn.Modal,{title:(0,sk._x)("Manage allowed blocks","modal title"),onRequestClose:r,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,na.jsxs)(Pn.__experimentalVStack,{as:"form",onSubmit:c=>{c.preventDefault(),a()},spacing:"4",children:[(0,na.jsx)(Pn.__experimentalText,{children:(0,sk.__)("Select which blocks can be added inside this container.")}),(0,na.jsx)(B2,{blockTypes:t,selectedBlockTypes:n,onChange:c=>{i(c)}}),(0,na.jsxs)(Pn.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,na.jsx)(Pn.FlexItem,{children:(0,na.jsx)(Pn.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,sk.__)("Cancel")})}),(0,na.jsx)(Pn.FlexItem,{children:(0,na.jsx)(Pn.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,sk.__)("Apply")})})]})]})})}var fp=l(w(),1);function Ole({clientId:e}){let[t,o]=(0,Ple.useState)(!1),{blockTypes:r,selectedBlockNames:n}=(0,Rle.useSelect)(a=>{let{getBlockAttributes:c}=a(_);return{blockTypes:a(T2.store).getBlockTypes(),selectedBlockNames:c(e)?.allowedBlocks}},[e]),i=r.filter(a=>(0,T2.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,fp.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,fp.jsxs)(B_.BaseControl,{help:(0,E2.__)("Specify which blocks are allowed inside this container."),children:[(0,fp.jsx)(B_.BaseControl.VisualLabel,{children:(0,E2.__)("Allowed Blocks")}),(0,fp.jsx)(B_.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,E2.__)("Manage allowed blocks")})]}),t&&(0,fp.jsx)(Ile,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>o(!1)})]})}var w4=l(w(),1);function EPe({clientId:e}){return ao()==="contentOnly"?null:(0,w4.jsx)(sS.Fill,{children:(0,w4.jsx)(Ole,{clientId:e})})}var Ale={edit:EPe,attributeKeys:["allowedBlocks"],hasSupport(e){return(0,ak.hasBlockSupport)(e,"allowedBlocks")}};function TPe(e){return e?.attributes?.allowedBlocks?.type||(0,ak.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}(0,C4.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",TPe);function IPe(e,t,o,r){if(!(0,ak.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,ak.getBlockType)(e.name)?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:n}};let a=n.filter(c=>s.includes(c));return{...e,attributes:{...e.attributes,allowedBlocks:a}}}(0,C4.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",IPe);var Lle=l(ut(),1),I2=l(A(),1),lk=l(N(),1),P2=l($(),1),Nle=l(R(),1);var Qa=l(w(),1),PPe=/[\s#]/g;function RPe(e){return"type"in(e.attributes?.anchor??{})||(0,P2.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string"}}),e}function OPe({anchor:e,setAttributes:t}){if(ao()!=="default")return null;let r=Nle.Platform.OS==="web";return(0,Qa.jsx)(fe,{group:"advanced",children:(0,Qa.jsx)(I2.TextControl,{__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,lk.__)("HTML anchor"),help:(0,Qa.jsxs)(Qa.Fragment,{children:[(0,lk.__)("Enter a word or two\u2014without spaces\u2014to make a unique web address just for this block, called an \u201Canchor\u201D. Then, you\u2019ll be able to link directly to this section of your page."),r&&(0,Qa.jsxs)(Qa.Fragment,{children:[" ",(0,Qa.jsx)(I2.ExternalLink,{href:(0,lk.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,lk.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:r?null:(0,lk.__)("Add an anchor"),onChange:n=>{n=n.replace(PPe,"-"),t({anchor:n!==""?n:void 0})},autoCapitalize:"none",autoComplete:"off"})})}var B4={addSaveProps:APe,edit:OPe,attributeKeys:["anchor"],hasSupport(e){return(0,P2.hasBlockSupport)(e,"anchor")}};function APe(e,t,o){return(0,P2.hasBlockSupport)(t,"anchor")&&(e.id=o.anchor===""?null:o.anchor),e}(0,Lle.addFilter)("blocks.registerBlockType","core/anchor/attribute",RPe);var Mle=l(ut(),1),R2=l($(),1);function LPe(e){return e?.attributes?.ariaLabel?.type||(0,R2.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}function NPe(e,t,o){return(0,R2.hasBlockSupport)(t,"ariaLabel")&&!Ue(t,"ariaLabel","ariaLabel")&&(e["aria-label"]=o.ariaLabel===""?null:o.ariaLabel),e}var Dle={addSaveProps:NPe,attributeKeys:["ariaLabel"],hasSupport(e){return(0,R2.hasBlockSupport)(e,"ariaLabel")}};(0,Mle.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",LPe);var Bk=l($(),1),OR=l(A(),1),$de=l(F(),1);var Fle=l(jr(),1),Vle={};function E4(e,t){let o=Fle.useRef(Vle);return o.current===Vle&&(o.current=e(t)),o}function T4(e,...t){let o=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>o.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${o} for the full message.`}var O2=l(jr(),1);function I4(e,t,o,r){let n=E4(jle).current;return MPe(n,e,t,o,r)&&Ule(n,[e,t,o,r]),n.callback}function zle(e){let t=E4(jle).current;return DPe(t,e)&&Ule(t,e),t.callback}function jle(){return{callback:null,cleanup:null,refs:[]}}function MPe(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function DPe(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function Ule(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 Wle=l(jr(),1);var Hle=l(jr(),1),VPe=parseInt(Hle.version,10);function Gle(e){return VPe>=e}function P4(e){if(!Wle.isValidElement(e))return null;let t=e,o=t.props;return(Gle(19)?o?.ref:t.ref)??null}function E_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function $le(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 Kle(e,t){return typeof e=="function"?e(t):e}function Yle(e,t){return typeof e=="function"?e(t):e}var I_={};function ck(e,t,o,r,n){let i={...R4(e,I_)};return t&&(i=T_(i,t)),o&&(i=T_(i,o)),r&&(i=T_(i,r)),n&&(i=T_(i,n)),i}function qle(e){if(e.length===0)return I_;if(e.length===1)return R4(e[0],I_);let t={...R4(e[0],I_)};for(let o=1;o<e.length;o+=1)t=T_(t,e[o]);return t}function T_(e,t){return Zle(t)?t(e):FPe(e,t)}function FPe(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=E_(e.style,r);break}case"className":{e[o]=O4(e.className,r);break}default:zPe(o,r)?e[o]=jPe(e[o],r):e[o]=r}}return e}function zPe(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 Zle(e){return typeof e=="function"}function R4(e,t){return Zle(e)?e(t):e??I_}function jPe(e,t){return t?e?o=>{if(HPe(o)){let n=o;UPe(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let r=t(o);return e?.(o),r}:t:e}function UPe(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function O4(e,t){return t?e?t+" "+e:t:e}function HPe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var GPe=Object.freeze([]),Ud=Object.freeze({});var A4=l(jr(),1);function Xle(e,t,o={}){let r=t.render,n=WPe(t,o);if(o.enabled===!1)return null;let i=o.state??Ud;return $Pe(e,r,n,i)}function WPe(e,t={}){let{className:o,style:r,render:n}=e,{state:i=Ud,ref:s,props:a,stateAttributesMapping:c,enabled:u=!0}=t,d=u?Kle(o,i):void 0,f=u?Yle(r,i):void 0,m=u?$le(i,c):Ud,h=u?E_(m,Array.isArray(a)?qle(a):a)??Ud:Ud;return typeof document<"u"&&(u?Array.isArray(s)?h.ref=zle([h.ref,P4(n),...s]):h.ref=I4(h.ref,P4(n),s):I4(null,null)),u?(d!==void 0&&(h.className=O4(h.className,d)),f!==void 0&&(h.style=E_(h.style,f)),h):Ud}function $Pe(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=ck(o,t.props);return n.ref=o.ref,O2.cloneElement(t,n)}if(e&&typeof e=="string")return KPe(e,o);throw new Error(T4(8))}function KPe(e,t){return e==="button"?(0,A4.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,A4.createElement)("img",{alt:"",...t,key:t.key}):O2.createElement(e,t)}function A2(e){return Xle(e.defaultTagName??"div",e,e)}var Jle=l(R(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var Qle={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"},L4=(0,Jle.forwardRef)(function({children:t,intent:o="none",render:r,className:n,...i},s){return A2({render:r,defaultTagName:"span",ref:s,props:ck(i,{className:V(Qle.badge,Qle[`is-${o}-intent`],n),children:t})})});var ece=l(R(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var YPe={stack:"_19ce0419607e1896__stack"},qPe={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)"},De=(0,ece.forwardRef)(function({direction:t,gap:o,align:r,justify:n,wrap:i,render:s,...a},c){let u={gap:o&&qPe[o],alignItems:r,justifyContent:n,flexDirection:t,flexWrap:i};return A2({render:s,ref:c,props:ck(a,{style:u,className:YPe.stack})})});var N4=l(N(),1);var Ut="isAny",Ht="isNone",Ir="isAll",Pr="isNotAll",tn="between",on="inThePast",Rn="over",Jt="is",eo="isNot",Hd="lessThan",Gd="greaterThan",Wd="lessThanOrEqual",$d="greaterThanOrEqual",Kd="before",Yd="after",qd="beforeInc",Zd="afterInc",Ja="contains",el="notContains",tl="startsWith",Xd="on",Qd="notOn";var Hht={asc:(0,N4.__)("Sort ascending"),desc:(0,N4.__)("Sort descending")};var tce=l(CO(),1),{lock:Wht,unlock:St}=(0,tce.__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 P_=l(R(),1),ZPe=[];function On({elements:e,getElements:t}){let o=Array.isArray(e)&&e.length>0?e:ZPe,[r,n]=(0,P_.useState)(o),[i,s]=(0,P_.useState)(!1);return(0,P_.useEffect)(()=>{if(!t){n(o);return}let a=!1;return s(!0),t().then(c=>{if(!a){let u=Array.isArray(c)&&c.length>0?c:o;n(u)}}).catch(()=>{a||n(o)}).finally(()=>{a||s(!1)}),()=>{a=!0}},[t,o]),{elements:r,isLoading:i}}var XPe=Math.pow(10,8)*24*60*60*1e3,Yht=-XPe,L2=6048e5,oce=864e5;var QPe=3600;var rce=QPe*24,qht=rce*7,JPe=rce*365.2425,e2e=JPe/12,Zht=e2e*3,M4=Symbol.for("constructDateFrom");function $o(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&M4 in e?e[M4](t):e instanceof Date?new e.constructor(t):new Date(t)}function lt(e,t){return $o(t||e,e)}function N2(e,t,o){let r=lt(e,o?.in);return isNaN(t)?$o(o?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function M2(e,t,o){let r=lt(e,o?.in);if(isNaN(t))return $o(o?.in||e,NaN);if(!t)return r;let n=r.getDate(),i=$o(o?.in||e,r.getTime());i.setMonth(r.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),n),r)}var t2e={};function Jd(){return t2e}function Ec(e,t){let o=Jd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=lt(e,t?.in),i=n.getDay(),s=(i<r?7:0)+i-r;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function mp(e,t){return Ec(e,{...t,weekStartsOn:1})}function D2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=$o(o,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let i=mp(n),s=$o(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let a=mp(s);return o.getTime()>=i.getTime()?r+1:o.getTime()>=a.getTime()?r:r-1}function D4(e){let t=lt(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function nce(e,...t){let o=$o.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function V4(e,t){let o=lt(e,t?.in);return o.setHours(0,0,0,0),o}function ice(e,t,o){let[r,n]=nce(o?.in,e,t),i=V4(r),s=V4(n),a=+i-D4(i),c=+s-D4(s);return Math.round((a-c)/oce)}function sce(e,t){let o=D2(e,t),r=$o(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),mp(r)}function ace(e,t,o){return N2(e,t*7,o)}function lce(e,t,o){return M2(e,t*12,o)}function cce(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function uk(e){return!(!cce(e)&&typeof e!="number"||isNaN(+lt(e)))}function uce(e,t){let o=lt(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function V2(e,t){let o=lt(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}var o2e={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"}},dce=(e,t,o)=>{let r,n=o2e[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 F2(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var r2e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},n2e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},i2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fce={date:F2({formats:r2e,defaultWidth:"full"}),time:F2({formats:n2e,defaultWidth:"full"}),dateTime:F2({formats:i2e,defaultWidth:"full"})};var s2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mce=(e,t,o,r)=>s2e[e];function dk(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 a2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},l2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},c2e={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"]},u2e={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"]},d2e={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"}},f2e={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"}},m2e=(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"},pce={ordinalNumber:m2e,era:dk({values:a2e,defaultWidth:"wide"}),quarter:dk({values:l2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:dk({values:c2e,defaultWidth:"wide"}),day:dk({values:u2e,defaultWidth:"wide"}),dayPeriod:dk({values:d2e,defaultWidth:"wide",formattingValues:f2e,defaultFormattingWidth:"wide"})};function fk(e){return(t,o={})=>{let r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?h2e(a,f=>f.test(s)):p2e(a,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=o.valueCallback?o.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function p2e(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function h2e(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function hce(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 g2e=/^(\d+)(th|st|nd|rd)?/i,b2e=/\d+/i,k2e={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},v2e={any:[/^b/i,/^(a|c)/i]},y2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},S2e={any:[/1/i,/2/i,/3/i,/4/i]},_2e={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},x2e={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]},w2e={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},C2e={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]},B2e={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},E2e={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}},gce={ordinalNumber:hce({matchPattern:g2e,parsePattern:b2e,valueCallback:e=>parseInt(e,10)}),era:fk({matchPatterns:k2e,defaultMatchWidth:"wide",parsePatterns:v2e,defaultParseWidth:"any"}),quarter:fk({matchPatterns:y2e,defaultMatchWidth:"wide",parsePatterns:S2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:fk({matchPatterns:_2e,defaultMatchWidth:"wide",parsePatterns:x2e,defaultParseWidth:"any"}),day:fk({matchPatterns:w2e,defaultMatchWidth:"wide",parsePatterns:C2e,defaultParseWidth:"any"}),dayPeriod:fk({matchPatterns:B2e,defaultMatchWidth:"any",parsePatterns:E2e,defaultParseWidth:"any"})};var F4={code:"en-US",formatDistance:dce,formatLong:fce,formatRelative:mce,localize:pce,match:gce,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bce(e,t){let o=lt(e,t?.in);return ice(o,V2(o))+1}function kce(e,t){let o=lt(e,t?.in),r=+mp(o)-+sce(o);return Math.round(r/L2)+1}function z2(e,t){let o=lt(e,t?.in),r=o.getFullYear(),n=Jd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=$o(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);let a=Ec(s,t),c=$o(t?.in||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);let u=Ec(c,t);return+o>=+a?r+1:+o>=+u?r:r-1}function vce(e,t){let o=Jd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=z2(e,t),i=$o(t?.in||e,0);return i.setFullYear(n,0,r),i.setHours(0,0,0,0),Ec(i,t)}function yce(e,t){let o=lt(e,t?.in),r=+Ec(o,t)-+vce(o,t);return Math.round(r/L2)+1}function $e(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Tc={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return $e(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):$e(o+1,2)},d(e,t){return $e(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 $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),n=Math.trunc(r*Math.pow(10,o-3));return $e(n,t.length)}};var mk={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},z4={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 Tc.y(e,t)},Y:function(e,t,o,r){let n=z2(e,r),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return $e(s,2)}return t==="Yo"?o.ordinalNumber(i,{unit:"year"}):$e(i,t.length)},R:function(e,t){let o=D2(e);return $e(o,t.length)},u:function(e,t){let o=e.getFullYear();return $e(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 $e(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 $e(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 Tc.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 $e(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=yce(e,r);return t==="wo"?o.ordinalNumber(n,{unit:"week"}):$e(n,t.length)},I:function(e,t,o){let r=kce(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Tc.d(e,t)},D:function(e,t,o){let r=bce(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):$e(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 $e(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 $e(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 $e(n,t.length);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),n;switch(r===12?n=mk.noon:r===0?n=mk.midnight:n=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),n;switch(r>=17?n=mk.evening:r>=12?n=mk.afternoon:r>=4?n=mk.morning:n=mk.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});default:return o.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return Tc.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Tc.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tc.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Tc.s(e,t)},S:function(e,t){return Tc.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return _ce(r);case"XXXX":case"XX":return pp(r);default:return pp(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return _ce(r);case"xxxx":case"xx":return pp(r);default:return pp(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sce(r,":");default:return"GMT"+pp(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sce(r,":");default:return"GMT"+pp(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return $e(r,t.length)},T:function(e,t,o){return $e(+e,t.length)}};function Sce(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+$e(i,2)}function _ce(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):pp(e,t)}function pp(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),n=$e(Math.trunc(r/60),2),i=$e(r%60,2);return o+n+t+i}var xce=(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"})}},wce=(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"})}},T2e=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],n=o[2];if(!n)return xce(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}}",xce(r,t)).replace("{{time}}",wce(n,t))},Cce={p:wce,P:T2e};var I2e=/^D+$/,P2e=/^Y+$/,R2e=["D","DD","YY","YYYY"];function Bce(e){return I2e.test(e)}function Ece(e){return P2e.test(e)}function Tce(e,t,o){let r=O2e(e,t,o);if(console.warn(r),R2e.includes(e))throw new RangeError(r)}function O2e(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 A2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,N2e=/^'([^]*?)'?$/,M2e=/''/g,D2e=/[a-zA-Z]/;function j4(e,t,o){let r=Jd(),n=o?.locale??r.locale??F4,i=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=lt(e,o?.in);if(!uk(a))throw new RangeError("Invalid time value");let c=t.match(L2e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Cce[f];return m(d,n.formatLong)}return d}).join("").match(A2e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:V2e(d)};if(z4[f])return{isToken:!0,value:d};if(f.match(D2e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(a,c));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!o?.useAdditionalWeekYearTokens&&Ece(f)||!o?.useAdditionalDayOfYearTokens&&Bce(f))&&Tce(f,t,String(e));let m=z4[f[0]];return m(a,f,n.localize,u)}).join("")}function V2e(e){let t=e.match(N2e);return t?t[1].replace(M2e,"'"):e}function hp(e,t,o){return N2(e,-t,o)}function j2(e,t,o){return M2(e,-t,o)}function Ice(e,t,o){return ace(e,-t,o)}function U2(e,t,o){return lce(e,-t,o)}var de=l(N(),1),lo=l(R(),1),rn=l(pc(),1);var U4=l(w(),1),wo={Name:(0,U4.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,U4.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Pce(e,t){switch(t){case"days":return hp(new Date,e);case"weeks":return Ice(new Date,e);case"months":return j2(new Date,e);case"years":return U2(new Date,e);default:return new Date}}var Rce={label:(0,de.__)("Is none of"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),wo),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"},Oce=[{name:Ut,label:(0,de.__)("Includes"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),wo),filter(e,t,o){if(!o?.length)return!0;let r=t.getValue({item:e});return Array.isArray(r)?o.some(n=>r.includes(n)):typeof r=="string"?o.includes(r):!1},selection:"multi"},{name:Ht,...Rce},{name:Ir,label:(0,de.__)("Includes all"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(o=>o.label).join(", ")),wo),filter(e,t,o){return o?.length?o.every(r=>t.getValue({item:e})?.includes(r)):!0},selection:"multi"},{name:Pr,...Rce},{name:tn,label:(0,de.__)("Between (inc)"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),wo),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:on,label:(0,de.__)("In the past"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),wo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Pce(o.value,o.unit),n=(0,rn.getDate)(t.getValue({item:e}));return n>=r&&n<=new Date},selection:"custom"},{name:Rn,label:(0,de.__)("Over"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),wo),filter(e,t,o){if(o?.value===void 0||o?.unit===void 0)return!0;let r=Pce(o.value,o.unit);return(0,rn.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:Jt,label:(0,de.__)("Is"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===t.getValue({item:e})||o===void 0},selection:"single"},{name:eo,label:(0,de.__)("Is not"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o!==t.getValue({item:e})},selection:"single"},{name:Hd,label:(0,de.__)("Less than"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<o},selection:"single"},{name:Gd,label:(0,de.__)("Greater than"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>o},selection:"single"},{name:Wd,label:(0,de.__)("Less than or equal"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})<=o},selection:"single"},{name:$d,label:(0,de.__)("Greater than or equal"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){return o===void 0?!0:t.getValue({item:e})>=o},selection:"single"},{name:Kd,label:(0,de.__)("Before"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:Yd,label:(0,de.__)("After"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:qd,label:(0,de.__)("Before (inc)"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:Zd,label:(0,de.__)("After (inc)"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o);return(0,rn.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:Ja,label:(0,de.__)("Contains"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:el,label:(0,de.__)("Doesn't contain"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=t.getValue({item:e});return typeof r=="string"&&o&&!r.toLowerCase().includes(String(o).toLowerCase())},selection:"single"},{name:tl,label:(0,de.__)("Starts with"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),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:Xd,label:(0,de.__)("On"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o),n=(0,rn.getDate)(t.getValue({item:e}));return r.getTime()===n.getTime()},selection:"single"},{name:Qd,label:(0,de.__)("Not on"),filterText:(e,t)=>(0,lo.createInterpolateElement)((0,de.sprintf)((0,de.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),wo),filter(e,t,o){if(o===void 0)return!0;let r=(0,rn.getDate)(o),n=(0,rn.getDate)(t.getValue({item:e}));return r.getTime()!==n.getTime()},selection:"single"}],Ace=e=>Oce.find(t=>t.name===e),Lce=()=>Oce.map(e=>e.name);var Nce=l(A(),1),Mce=l(R(),1);function pt(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 Dce=l(w(),1),{ValidatedCheckboxControl:F2e}=St(Nce.privateApis);function Vce({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,label:c,description:u,isValid:d}=e,f=(0,Mce.useCallback)(()=>{t(a({item:o,value:!s({item:o})}))},[o,s,t,a]);return(0,Dce.jsx)(F2e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:pt(d,i),hidden:r,label:c,help:u,checked:s({item:o}),onChange:f})}var H2=l(A(),1),Fce=l(R(),1);var H4=l(w(),1),{ValidatedComboboxControl:z2e}=St(H2.privateApis);function G2({data:e,field:t,onChange:o,hideLabelFromVision:r,validity:n}){let{label:i,description:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Fce.useCallback)(g=>o(u({item:e,value:g??""})),[e,o,u]),{elements:h,isLoading:p}=On({elements:t.elements,getElements:t.getElements});return p?(0,H4.jsx)(H2.Spinner,{}):(0,H4.jsx)(z2e,{required:!!t.isValid?.required,customValidity:pt(d,n),label:i,value:f,help:s,placeholder:a,options:h,onChange:m,hideLabelFromVision:r,allowReset:!0,expandOnFocus:!0})}var Y2=l(A(),1),cs=l(R(),1),K2=l(N(),1),hi=l(pc(),1);var hk=l(A(),1),G4=l(R(),1),ol=l(N(),1);var pk=l(w(),1),j2e={[on]:[{value:"days",label:(0,ol.__)("Days")},{value:"weeks",label:(0,ol.__)("Weeks")},{value:"months",label:(0,ol.__)("Months")},{value:"years",label:(0,ol.__)("Years")}],[Rn]:[{value:"days",label:(0,ol.__)("Days ago")},{value:"weeks",label:(0,ol.__)("Weeks ago")},{value:"months",label:(0,ol.__)("Months ago")},{value:"years",label:(0,ol.__)("Years ago")}]};function W2({className:e,data:t,field:o,onChange:r,hideLabelFromVision:n,operator:i}){let s=j2e[i===on?"inThePast":"over"],{id:a,label:c,getValue:u,setValue:d}=o,f=u({item:t}),{value:m="",unit:h=s[0].value}=f&&typeof f=="object"?f:{},p=(0,G4.useCallback)(b=>r(d({item:t,value:{value:Number(b),unit:h}})),[r,d,t,h]),g=(0,G4.useCallback)(b=>r(d({item:t,value:{value:m,unit:b}})),[r,d,t,m]);return(0,pk.jsx)(hk.BaseControl,{id:a,className:V(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,pk.jsxs)(De,{direction:"row",gap:"sm",children:[(0,pk.jsx)(hk.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:p}),(0,pk.jsx)(hk.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,ol.__)("Unit"),value:h,options:s,onChange:g,hideLabelFromVision:!0})]})})}var zce=l(pc(),1);function $2(e){if(!e)return null;let t=(0,zce.getDate)(e);return t&&uk(t)?t:null}var ef=l(w(),1),{DateCalendar:U2e,ValidatedInputControl:H2e}=St(Y2.privateApis),G2e=e=>e?(0,hi.dateI18n)("Y-m-d\\TH:i",(0,hi.getDate)(e)):"";function W2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,description:c,setValue:u,getValue:d,isValid:f}=t,m=d({item:e}),h=typeof m=="string"?m:void 0,[p,g]=(0,cs.useState)(()=>$2(h)||new Date),b=(0,cs.useRef)(null),v=(0,cs.useRef)(void 0),k=(0,cs.useRef)(null),y=(0,cs.useCallback)(E=>o(u({item:e,value:E})),[e,o,u]);(0,cs.useEffect)(()=>()=>{v.current&&clearTimeout(v.current)},[]);let S=(0,cs.useCallback)(E=>{let L;if(E){let T=(0,hi.dateI18n)("Y-m-d",E),O;h?O=(0,hi.dateI18n)("H:i",(0,hi.getDate)(h)):O=(0,hi.dateI18n)("H:i",E),L=(0,hi.getDate)(`${T}T${O}`).toISOString(),y(L),v.current&&clearTimeout(v.current)}else y(void 0);k.current=b.current&&b.current.ownerDocument.activeElement,v.current=setTimeout(()=>{b.current&&(b.current.focus(),b.current.blur(),y(L),k.current&&k.current instanceof HTMLElement&&k.current.focus())},0)},[y,h]),x=(0,cs.useCallback)(E=>{if(E){let L=(0,hi.getDate)(E);y(L.toISOString());let T=$2(L.toISOString());T&&g(T)}else y(void 0)},[y]),{format:C}=t,B=C.weekStartsOn??(0,hi.getSettings)().l10n.startOfWeek,{timezone:{string:I}}=(0,hi.getSettings)(),P=a;return f?.required&&!n&&!r?P=`${a} (${(0,K2.__)("Required")})`:!f?.required&&n&&!r&&(P=`${a} (${(0,K2.__)("Optional")})`),(0,ef.jsx)(Y2.BaseControl,{id:s,label:P,help:c,hideLabelFromVision:r,children:(0,ef.jsxs)(De,{direction:"column",gap:"lg",children:[(0,ef.jsx)(U2e,{style:{width:"100%"},selected:h&&$2(h)||void 0,onSelect:S,month:p,onMonthChange:g,timeZone:I||void 0,weekStartsOn:B}),(0,ef.jsx)(H2e,{ref:b,__next40pxDefaultSize:!0,required:!!f?.required,customValidity:pt(f,i),type:"datetime-local",label:(0,K2.__)("Date time"),hideLabelFromVision:!0,value:G2e(h),onChange:x})]})})}function jce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===on||i===Rn?(0,ef.jsx)(W2,{className:"dataviews-controls__datetime",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):(0,ef.jsx)(W2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var Or=l(A(),1),tt=l(R(),1),Ko=l(N(),1),Rr=l(pc(),1);var ht=l(w(),1),{DateCalendar:$2e,DateRangeCalendar:K2e}=St(Or.privateApis),Y2e=[{id:"today",label:(0,Ko.__)("Today"),getValue:()=>(0,Rr.getDate)(null)},{id:"yesterday",label:(0,Ko.__)("Yesterday"),getValue:()=>{let e=(0,Rr.getDate)(null);return hp(e,1)}},{id:"past-week",label:(0,Ko.__)("Past week"),getValue:()=>{let e=(0,Rr.getDate)(null);return hp(e,7)}},{id:"past-month",label:(0,Ko.__)("Past month"),getValue:()=>{let e=(0,Rr.getDate)(null);return j2(e,1)}}],q2e=[{id:"last-7-days",label:(0,Ko.__)("Last 7 days"),getValue:()=>{let e=(0,Rr.getDate)(null);return[hp(e,7),e]}},{id:"last-30-days",label:(0,Ko.__)("Last 30 days"),getValue:()=>{let e=(0,Rr.getDate)(null);return[hp(e,30),e]}},{id:"month-to-date",label:(0,Ko.__)("Month to date"),getValue:()=>{let e=(0,Rr.getDate)(null);return[uce(e),e]}},{id:"last-year",label:(0,Ko.__)("Last year"),getValue:()=>{let e=(0,Rr.getDate)(null);return[U2(e,1),e]}},{id:"year-to-date",label:(0,Ko.__)("Year to date"),getValue:()=>{let e=(0,Rr.getDate)(null);return[V2(e),e]}}],gk=e=>{if(!e)return null;let t=(0,Rr.getDate)(e);return t&&uk(t)?t:null},W4=e=>e?typeof e=="string"?e:j4(e,"yyyy-MM-dd"):"";function Uce({field:e,validity:t,inputRefs:o,isTouched:r,setIsTouched:n,children:i}){let{isValid:s}=e,[a,c]=(0,tt.useState)(void 0),u=(0,tt.useCallback)(()=>{let f=Array.isArray(o)?o:[o];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[o]);return(0,tt.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=t?pt(s,t):void 0;for(let h of f){let p=h.current;p&&p.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[o,s,t]),(0,tt.useEffect)(()=>{let f=Array.isArray(o)?o:[o],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[o,n]),(0,tt.useEffect)(()=>{if(!r)return;let f=t?pt(s,t):void 0;f?c(f):u()},[r,s,t,u]),(0,ht.jsxs)("div",{onBlur:f=>{r||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,ht.jsx)("div",{"aria-live":"polite",children:a&&(0,ht.jsxs)("p",{className:V("components-validated-control__indicator",a.type==="invalid"?"is-invalid":void 0),children:[(0,ht.jsx)(Or.Icon,{className:"components-validated-control__indicator-icon",icon:Pf,size:16,fill:"currentColor"}),a.message]})})]})}function Z2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,setValue:c,getValue:u,isValid:d,format:f}=t,[m,h]=(0,tt.useState)(null),p=f.weekStartsOn??(0,Rr.getSettings)().l10n.startOfWeek,g=u({item:e}),b=typeof g=="string"?g:void 0,[v,k]=(0,tt.useState)(()=>gk(b)||new Date),[y,S]=(0,tt.useState)(!1),x=(0,tt.useRef)(null),C=(0,tt.useCallback)(T=>o(c({item:e,value:T})),[e,o,c]),B=(0,tt.useCallback)(T=>{let O=T?j4(T,"yyyy-MM-dd"):void 0;C(O),h(null),S(!0)},[C]),I=(0,tt.useCallback)(T=>{let O=T.getValue(),D=W4(O);k(O),C(D),h(T.id),S(!0)},[C]),P=(0,tt.useCallback)(T=>{if(C(T),T){let O=gk(T);O&&k(O)}h(null),S(!0)},[C]),{timezone:{string:E}}=(0,Rr.getSettings)(),L=a;return d?.required&&!n?L=`${a} (${(0,Ko.__)("Required")})`:!d?.required&&n&&(L=`${a} (${(0,Ko.__)("Optional")})`),(0,ht.jsx)(Uce,{field:t,validity:i,inputRefs:x,isTouched:y,setIsTouched:S,children:(0,ht.jsx)(Or.BaseControl,{id:s,className:"dataviews-controls__date",label:L,hideLabelFromVision:r,children:(0,ht.jsxs)(De,{direction:"column",gap:"lg",children:[(0,ht.jsxs)(De,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[Y2e.map(T=>{let O=m===T.id;return(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:O,size:"small",onClick:()=>I(T),children:T.label},T.id)}),(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,Ko.__)("Custom")})]}),(0,ht.jsx)(Or.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:x,type:"date",label:(0,Ko.__)("Date"),hideLabelFromVision:!0,value:b,onChange:P,required:!!t.isValid?.required}),(0,ht.jsx)($2e,{style:{width:"100%"},selected:b&&gk(b)||void 0,onSelect:B,month:v,onMonthChange:k,timeZone:E||void 0,weekStartsOn:p})]})})})}function X2e({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{id:s,label:a,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(D=>typeof D=="string")&&(f=m);let h=d.weekStartsOn??(0,Rr.getSettings)().l10n.startOfWeek,p=(0,tt.useCallback)(D=>{o(u({item:e,value:D}))},[e,o,u]),[g,b]=(0,tt.useState)(null),v=(0,tt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[D,U]=f;return{from:gk(D)||void 0,to:gk(U)||void 0}},[f]),[k,y]=(0,tt.useState)(()=>v.from||new Date),[S,x]=(0,tt.useState)(!1),C=(0,tt.useRef)(null),B=(0,tt.useRef)(null),I=(0,tt.useCallback)((D,U)=>{D&&U?p([W4(D),W4(U)]):!D&&!U&&p(void 0)},[p]),P=(0,tt.useCallback)(D=>{I(D?.from,D?.to),b(null),x(!0)},[I]),E=(0,tt.useCallback)(D=>{let[U,G]=D.getValue();y(U),I(U,G),b(D.id),x(!0)},[I]),L=(0,tt.useCallback)((D,U)=>{let[G,j]=f||[void 0,void 0];if(I(D==="from"?U:G,D==="to"?U:j),U){let ee=gk(U);ee&&y(ee)}b(null),x(!0)},[f,I]),{timezone:T}=(0,Rr.getSettings)(),O=a;return t.isValid?.required&&!n?O=`${a} (${(0,Ko.__)("Required")})`:!t.isValid?.required&&n&&(O=`${a} (${(0,Ko.__)("Optional")})`),(0,ht.jsx)(Uce,{field:t,validity:i,inputRefs:[C,B],isTouched:S,setIsTouched:x,children:(0,ht.jsx)(Or.BaseControl,{id:s,className:"dataviews-controls__date",label:O,hideLabelFromVision:r,children:(0,ht.jsxs)(De,{direction:"column",gap:"lg",children:[(0,ht.jsxs)(De,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[q2e.map(D=>{let U=g===D.id;return(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:U,size:"small",onClick:()=>E(D),children:D.label},D.id)}),(0,ht.jsx)(Or.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",accessibleWhenDisabled:!1,disabled:!!g,children:(0,Ko.__)("Custom")})]}),(0,ht.jsxs)(De,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,ht.jsx)(Or.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,Ko.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:D=>L("from",D),required:!!t.isValid?.required}),(0,ht.jsx)(Or.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:B,type:"date",label:(0,Ko.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:D=>L("to",D),required:!!t.isValid?.required})]}),(0,ht.jsx)(K2e,{style:{width:"100%"},selected:v,onSelect:P,month:k,onMonthChange:y,timeZone:T.string||void 0,weekStartsOn:h})]})})})}function Hce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){return i===on||i===Rn?(0,ht.jsx)(W2,{className:"dataviews-controls__date",data:e,field:t,onChange:o,hideLabelFromVision:r,operator:i}):i===tn?(0,ht.jsx)(X2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s}):(0,ht.jsx)(Z2e,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s})}var q2=l(A(),1),Gce=l(R(),1);var $4=l(w(),1),{ValidatedSelectControl:Q2e}=St(q2.privateApis);function Z2({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{type:s,label:a,description:c,getValue:u,setValue:d,isValid:f}=t,m=s==="array",h=u({item:e})??(m?[]:""),p=(0,Gce.useCallback)(v=>o(d({item:e,value:v})),[e,o,d]),{elements:g,isLoading:b}=On({elements:t.elements,getElements:t.getElements});return b?(0,$4.jsx)(q2.Spinner,{}):(0,$4.jsx)(Q2e,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(f,i),label:a,value:h,help:c,options:g,onChange:p,__next40pxDefaultSize:!0,hideLabelFromVision:r,multiple:m})}var K4=l(w(),1),J2e=10;function Wce(e){let{field:t}=e,{elements:o}=On({elements:t.elements,getElements:t.getElements});return o.length>=J2e?(0,K4.jsx)(G2,{...e}):(0,K4.jsx)(Z2,{...e})}var Q2=l(A(),1);var $ce=l(A(),1),Kce=l(R(),1);var Yce=l(w(),1),{ValidatedInputControl:eRe}=St($ce.privateApis);function rl({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,type:i,prefix:s,suffix:a,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:p}=t,g=m({item:e}),b=(0,Kce.useCallback)(v=>o(h({item:e,value:v})),[e,h,o]);return(0,Yce.jsx)(eRe,{required:!!p.required,markWhenOptional:n,customValidity:pt(p,c),label:u,placeholder:d,value:g??"",help:f,onChange:b,hideLabelFromVision:r,type:i,prefix:s,suffix:a,pattern:p.pattern?p.pattern.constraint:void 0,minLength:p.minLength?p.minLength.constraint:void 0,maxLength:p.maxLength?p.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var X2=l(w(),1);function qce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,X2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"email",prefix:(0,X2.jsx)(Q2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,X2.jsx)(Q2.Icon,{icon:gA})})})}var eR=l(A(),1);var J2=l(w(),1);function Zce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,J2.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"tel",prefix:(0,J2.jsx)(eR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,J2.jsx)(eR.Icon,{icon:cv})})})}var oR=l(A(),1);var tR=l(w(),1);function Xce({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){return(0,tR.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:"url",prefix:(0,tR.jsx)(oR.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,tR.jsx)(oR.Icon,{icon:fn})})})}var Ic=l(A(),1),R_=l(R(),1),rR=l(N(),1);var tf=l(w(),1),{ValidatedNumberControl:tRe}=St(Ic.privateApis);function Qce(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function oRe({value:e,onChange:t,hideLabelFromVision:o,step:r}){let[n="",i=""]=e,s=(0,R_.useCallback)(c=>t([Qce(c),i]),[t,i]),a=(0,R_.useCallback)(c=>t([n,Qce(c)]),[t,n]);return(0,tf.jsx)(Ic.BaseControl,{help:(0,rR.__)("The max. value must be greater than the min. value."),children:(0,tf.jsxs)(Ic.Flex,{direction:"row",gap:4,children:[(0,tf.jsx)(Ic.__experimentalNumberControl,{label:(0,rR.__)("Min."),value:n,max:i?Number(i)-r:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r}),(0,tf.jsx)(Ic.__experimentalNumberControl,{label:(0,rR.__)("Max."),value:i,min:n?Number(n)+r:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:r})]})})}function nR({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,operator:i,validity:s}){let a=t.format?.decimals??0,c=Math.pow(10,Math.abs(a)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,p=f({item:e})??"",g=(0,R_.useCallback)(v=>{o(m({item:e,value:["",void 0].includes(v)?void 0:Number(v)}))},[e,o,m]),b=(0,R_.useCallback)(v=>{o(m({item:e,value:v}))},[e,o,m]);if(i===tn){let v=["",""];return Array.isArray(p)&&p.length===2&&p.every(k=>typeof k=="number"||k==="")&&(v=p),(0,tf.jsx)(oRe,{value:v,onChange:b,hideLabelFromVision:r,step:c})}return(0,tf.jsx)(tRe,{required:!!h.required,markWhenOptional:n,customValidity:pt(h,s),label:u,help:d,value:p,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var Jce=l(w(),1);function eue(e){return(0,Jce.jsx)(nR,{...e})}var tue=l(w(),1);function oue(e){return(0,tue.jsx)(nR,{...e})}var iR=l(A(),1),rue=l(R(),1);var Y4=l(w(),1),{ValidatedRadioControl:rRe}=St(iR.privateApis);function nue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=On({elements:t.elements,getElements:t.getElements}),h=c({item:e}),p=(0,rue.useCallback)(g=>o(u({item:e,value:g})),[e,o,u]);return m?(0,Y4.jsx)(iR.Spinner,{}):(0,Y4.jsx)(rRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(d,i),label:s,help:a,onChange:p,options:f,selected:h,hideLabelFromVision:r})}var q4=l(R(),1);var iue=l(w(),1);function sue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{prefix:a,suffix:c}=i||{};return(0,iue.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:s,prefix:a?(0,q4.createElement)(a):void 0,suffix:c?(0,q4.createElement)(c):void 0})}var aue=l(A(),1),lue=l(R(),1);var cue=l(w(),1),{ValidatedToggleControl:nRe}=St(aue.privateApis);function uue({field:e,onChange:t,data:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,description:a,getValue:c,setValue:u,isValid:d}=e,f=(0,lue.useCallback)(()=>{t(u({item:o,value:!c({item:o})}))},[t,u,o,c]);return(0,cue.jsx)(nRe,{required:!!d.required,markWhenOptional:n,customValidity:pt(d,i),hidden:r,label:s,help:a,checked:c({item:o}),onChange:f})}var due=l(A(),1),fue=l(R(),1);var mue=l(w(),1),{ValidatedTextareaControl:iRe}=St(due.privateApis);function pue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,config:i,validity:s}){let{rows:a=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),p=(0,fue.useCallback)(g=>o(f({item:e,value:g})),[e,o,f]);return(0,mue.jsx)(iRe,{required:!!m.required,markWhenOptional:n,customValidity:pt(m,s),label:c,placeholder:u,value:h??"",help:d,onChange:p,rows:a,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:r})}var bk=l(A(),1),hue=l(R(),1);var sR=l(w(),1),{ValidatedToggleGroupControl:sRe}=St(bk.privateApis);function gue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{getValue:s,setValue:a,isValid:c}=t,u=s({item:e}),d=(0,hue.useCallback)(p=>o(a({item:e,value:p})),[e,o,a]),{elements:f,isLoading:m}=On({elements:t.elements,getElements:t.getElements});if(m)return(0,sR.jsx)(bk.Spinner,{});if(f.length===0)return null;let h=f.find(p=>p.value===u);return(0,sR.jsx)(sRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:r,children:f.map(p=>(0,sR.jsx)(bk.__experimentalToggleGroupControlOption,{label:p.label,value:p.value},p.value))})}var aR=l(A(),1),lR=l(R(),1);var O_=l(w(),1),{ValidatedFormTokenField:aRe}=St(aR.privateApis);function bue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),{elements:m,isLoading:h}=On({elements:t.elements,getElements:t.getElements}),p=(0,lR.useMemo)(()=>Array.isArray(f)?f.map(b=>m?.find(k=>k.value===b)||{value:b,label:b}):[],[f,m]),g=(0,lR.useCallback)(b=>{let v=b.map(k=>typeof k=="object"&&"value"in k?k.value:k);o(u({item:e,value:v}))},[o,u,e]);return h?(0,O_.jsx)(aR.Spinner,{}):(0,O_.jsx)(aRe,{required:!!d?.required,markWhenOptional:n,customValidity:pt(d,i),label:r?void 0:s,value:p,onChange:g,placeholder:a,suggestions:m?.map(b=>b.value),__experimentalValidateInput:b=>t.isValid?.elements&&m?m.some(v=>v.value===b||v.label===b):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:b=>typeof b=="object"&&"label"in b?b.label:typeof b=="string"&&m&&m.find(k=>k.value===b)?.label||b,__experimentalRenderItem:({item:b})=>{if(typeof b=="string"&&m){let v=m.find(k=>k.value===b);return(0,O_.jsx)("span",{children:v?.label||b})}return(0,O_.jsx)("span",{children:b})}})}var An=l(A(),1),Z4=l(R(),1),kue=l(N(),1);var Pc=l(w(),1),{ValidatedInputControl:lRe}=St(An.privateApis),cRe=({color:e,onColorChange:t})=>{let o=e&&Bt(e).isValid()?e:"#ffffff";return(0,Pc.jsx)(An.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:r})=>(0,Pc.jsx)(An.Button,{onClick:r,"aria-label":(0,kue.__)("Open color picker"),size:"small",icon:()=>(0,Pc.jsx)(An.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,Pc.jsx)(An.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Pc.jsx)(An.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function vue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{label:s,placeholder:a,description:c,setValue:u,isValid:d}=t,f=t.getValue({item:e})||"",m=(0,Z4.useCallback)(p=>{o(u({item:e,value:p}))},[e,o,u]),h=(0,Z4.useCallback)(p=>{o(u({item:e,value:p||""}))},[e,o,u]);return(0,Pc.jsx)(lRe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:pt(d,i),label:s,placeholder:a,value:f,help:c,onChange:h,hideLabelFromVision:r,type:"text",prefix:(0,Pc.jsx)(An.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Pc.jsx)(cRe,{color:f,onColorChange:m})})})}var uR=l(A(),1),dR=l(R(),1),X4=l(N(),1);var cR=l(w(),1);function yue({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let[s,a]=(0,dR.useState)(!1),c=(0,dR.useCallback)(()=>{a(u=>!u)},[]);return(0,cR.jsx)(rl,{data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,cR.jsx)(uR.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,cR.jsx)(uR.Button,{icon:s?vs:Af,onClick:c,size:"small",label:s?(0,X4.__)("Hide password"):(0,X4.__)("Show password")})})})}function fR(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var _ue=l(w(),1),Sue={adaptiveSelect:Wce,array:bue,checkbox:Vce,color:vue,combobox:G2,datetime:jce,date:Hce,email:qce,telephone:Zce,url:Xce,integer:eue,number:oue,password:yue,radio:nue,select:Z2,text:sue,toggle:uue,textarea:pue,toggleGroup:gue};function uRe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function dRe(e){let{control:t,...o}=e,r=mR(t);return r===null?null:function(i){return(0,_ue.jsx)(r,{...i,config:o})}}function xue(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?mR(e.Edit):uRe(e.Edit)?dRe(e.Edit):fR(e)&&e.type!=="array"?mR("adaptiveSelect"):t===null?null:mR(t)}function mR(e){return Object.keys(Sue).includes(e)?Sue[e]:null}function fRe(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 wue=fRe;var mRe=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},Cue=mRe;var pRe=e=>({value:t})=>{let o=e.split("."),r={},n=r;for(let i of o.slice(0,-1))n[i]={},n=n[i];return n[o.at(-1)]=t,r},Bue=pRe;var Tue=l(N(),1);function pR({item:e,field:t}){let{elements:o,isLoading:r}=On({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 Eue=l(w(),1);function co({item:e,field:t}){return t.hasElements?(0,Eue.jsx)(pR,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var nl=(e,t,o)=>o==="asc"?e.localeCompare(t):t.localeCompare(e);function uo(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)}function il(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length>=t.isValid.minLength.constraint}function sl(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:String(o).length<=t.isValid.maxLength.constraint}function al(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let o=new RegExp(t.isValid.pattern.constraint),r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:o.test(String(r))}catch{return!1}}function _t(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 hRe({item:e,field:t}){return t.getValue({item:e})}var nn=hRe;var gRe=/^[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 bRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!gRe.test(o)?(0,Tue.__)("Value must be a valid email address."):null}var Iue={type:"email",render:co,Edit:"email",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t,custom:bRe}};var Pue=l(N(),1);var kk=(e,t,o)=>o==="asc"?e-t:t-e;function hR(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 gR(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 Rue={separatorThousand:","};function kRe({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=Rue: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 vRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Number.isInteger(o)?(0,Pue.__)("Value must be an integer."):null}var Oue={type:"integer",render:co,Edit:"integer",sort:kk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo,Hd,Gd,Wd,$d,tn],validOperators:[Jt,eo,Hd,Gd,Wd,$d,tn,Ut,Ht,Ir,Pr],format:Rue,getValueFormatted:kRe,validate:{required:uo,min:hR,max:gR,elements:_t,custom:vRe}};var Aue=l(N(),1);var Lue={separatorThousand:",",separatorDecimal:".",decimals:2};function yRe({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=Lue:r=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=r,a=o.toFixed(s),[c,u]=a.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function SRe(e){return e===""||e===void 0||e===null}function _Re(e,t){let o=t.getValue({item:e});return!SRe(o)&&!Number.isFinite(o)?(0,Aue.__)("Value must be a number."):null}var Nue={type:"number",render:co,Edit:"number",sort:kk,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo,Hd,Gd,Wd,$d,tn],validOperators:[Jt,eo,Hd,Gd,Wd,$d,tn,Ut,Ht,Ir,Pr],format:Lue,getValueFormatted:yRe,validate:{required:uo,min:hR,max:gR,elements:_t,custom:_Re}};var Mue={type:"text",render:co,Edit:"text",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var gp=l(pc(),1);var Due={datetime:(0,gp.getSettings)().formats.datetime,weekStartsOn:(0,gp.getSettings)().l10n.startOfWeek};function xRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="datetime"?r=Due:r=t.format,(0,gp.dateI18n)(r.datetime,(0,gp.getDate)(o))}var wRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},Vue={type:"datetime",render:co,Edit:"datetime",sort:wRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn],validOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn],format:Due,getValueFormatted:xRe,validate:{required:uo,elements:_t}};var bp=l(pc(),1);var Fue={date:(0,bp.getSettings)().formats.date,weekStartsOn:(0,bp.getSettings)().l10n.startOfWeek};function CRe({item:e,field:t}){let o=t.getValue({item:e});if(["",void 0,null].includes(o))return"";let r;return t.type!=="date"?r=Fue:r=t.format,(0,bp.dateI18n)(r.date,(0,bp.getDate)(o))}var BRe=(e,t,o)=>{let r=new Date(e).getTime(),n=new Date(t).getTime();return o==="asc"?r-n:n-r},zue={type:"date",render:co,Edit:"date",sort:BRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn,tn],validOperators:[Xd,Qd,Kd,Yd,qd,Zd,on,Rn,tn],format:Fue,getValueFormatted:CRe,validate:{required:uo,elements:_t}};var bR=l(N(),1);function jue(e,t){return t.getValue({item:e})===!0}function ERe({item:e,field:t}){let o=t.getValue({item:e});return o===!0?(0,bR.__)("True"):o===!1?(0,bR.__)("False"):""}function TRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&![!0,!1].includes(o)?(0,bR.__)("Value must be true, false, or undefined"):null}var IRe=(e,t,o)=>{let r=!!e;return r===!!t?0:o==="asc"?r?1:-1:r?-1:1},Uue={type:"boolean",render:co,Edit:"checkbox",sort:IRe,validate:{required:jue,elements:_t,custom:TRe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo],validOperators:[Jt,eo],format:{},getValueFormatted:ERe};var Hue={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:nn,validate:{}};var Q4=l(N(),1);function Gue(e,t){let o=t.getValue({item:e});return Array.isArray(o)&&o.length>0&&o.every(r=>![void 0,"",null].includes(r))}function Wue({item:e,field:t}){let o=t.getValue({item:e});return(Array.isArray(o)?o:[]).join(", ")}function PRe({item:e,field:t}){return Wue({item:e,field:t})}function RRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Array.isArray(o)?(0,Q4.__)("Value must be an array."):o.every(r=>typeof r=="string")?null:(0,Q4.__)("Every value must be a string.")}var ORe=(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)},$ue={type:"array",render:PRe,Edit:"array",sort:ORe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Ut,Ht,Ir,Pr],format:{},getValueFormatted:Wue,validate:{required:Gue,elements:_t,custom:RRe}};function ARe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Kue={type:"password",render:co,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:ARe,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var Yue={type:"telephone",render:co,Edit:"telephone",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var que=l(N(),1);var vk=l(w(),1);function LRe({item:e,field:t}){if(t.hasElements)return(0,vk.jsx)(pR,{item:e,field:t});let o=nn({item:e,field:t});return!o||!Bt(o).isValid()?o:(0,vk.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,vk.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:o,border:"1px solid #ddd",flexShrink:0}}),(0,vk.jsx)("span",{children:o})]})}function NRe(e,t){let o=t.getValue({item:e});return![void 0,"",null].includes(o)&&!Bt(o).isValid()?(0,que.__)("Value must be a valid color."):null}var MRe=(e,t,o)=>{let r=Bt(e),n=Bt(t);if(!r.isValid()&&!n.isValid())return 0;if(!r.isValid())return o==="asc"?1:-1;if(!n.isValid())return o==="asc"?-1:1;let i=r.toHsl(),s=n.toHsl();return i.h!==s.h?o==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?o==="asc"?i.s-s.s:s.s-i.s:o==="asc"?i.l-s.l:s.l-i.l},Zue={type:"color",render:LRe,Edit:"color",sort:MRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ut,Ht],format:{},getValueFormatted:nn,validate:{required:uo,elements:_t,custom:NRe}};var Xue={type:"url",render:co,Edit:"url",sort:nl,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ut,Ht],validOperators:[Jt,eo,Ja,el,tl,Ut,Ht,Ir,Pr],format:{},getValueFormatted:nn,validate:{required:uo,pattern:al,minLength:il,maxLength:sl,elements:_t}};var DRe=(e,t,o)=>typeof e=="number"&&typeof t=="number"?kk(e,t,o):nl(e,t,o),Que={render:co,Edit:null,sort:DRe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Jt,eo],validOperators:Lce(),format:{},getValueFormatted:nn,validate:{required:uo,elements:_t}};function Jue(e,t){let o;e.isValid?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let r;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(r={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let s;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(s={constraint:e.isValid.minLength,validate:t.validate.minLength});let a;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(a={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:o,elements:r,min:n,max:i,minLength:s,maxLength:a,pattern:c,custom:u}}function ede(e){return e.validOperators.reduce((t,o)=>{let r=Ace(o);return r?.filter&&(t[o]=r.filter),t},{})}function VRe(e,t){return{...t.format,...e.format}}var tde=VRe;function FRe(e){let t=[Iue,Oue,Nue,Mue,Vue,zue,Uue,Hue,$ue,Kue,Yue,Zue,Xue].find(o=>o?.type===e);return t||Que}function A_(e){return e.map(t=>{let o=FRe(t.type),r=t.getValue||Cue(t.id),n=function(i,s,a){let c=r({item:i}),u=r({item:s});return t.sort?t.sort(c,u,a):o.sort(c,u,a)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:r,setValue:t.setValue||Bue(t.id),elements:t.elements,getElements:t.getElements,hasElements:fR(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:o.type,render:t.render??o.render,Edit:xue(t,o.Edit),sort:n,enableSorting:t.enableSorting??o.enableSorting,enableGlobalSearch:t.enableGlobalSearch??o.enableGlobalSearch,isValid:Jue(t,o),filterBy:wue(t,o.defaultOperators,o.validOperators),filter:ede(o),format:tde(t,o),getValueFormatted:t.getValueFormatted??o.getValueFormatted}})}var sz=l(R(),1);var ode=l(R(),1),rde=l(w(),1),J4=(0,ode.createContext)({fields:[]});J4.displayName="DataFormContext";function nde({fields:e,children:t}){return(0,rde.jsx)(J4.Provider,{value:{fields:e},children:t})}var us=J4;var ER=l(R(),1);var vR=l(R(),1),L_=l(A(),1);var Ar={type:"regular",labelPosition:"top"},zRe=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 ide(e){let t=Ar;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let o=e.summary??[],r=Array.isArray(o)?o:[o];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:r,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let o=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:zRe(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 sde(e){let t=ide(e?.layout),o=(e.fields??[]).map(r=>{if(typeof r=="string")return{id:r,layout:t};let n=r.layout?ide(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:sde({fields:r.children,layout:Ar}).fields}}});return{layout:t,fields:o}}var kR=sde;var Gt=l(w(),1);function jRe({title:e}){return(0,Gt.jsx)(De,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,Gt.jsx)(De,{direction:"row",align:"center",children:(0,Gt.jsx)(L_.__experimentalHeading,{level:2,size:13,children:e})})})}function ade({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,vR.useContext)(us),a=t.layout,c=(0,vR.useMemo)(()=>({layout:Ar,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&t.label&&(0,Gt.jsx)(jRe,{title:t.label}),(0,Gt.jsx)(Ln,{data:e,form:c,onChange:o,validity:i?.children})]});let u=a.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,Gt.jsxs)(De,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,Gt.jsx)("div",{className:V("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label})}),(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,Gt.jsx)(d.render,{item:e,field:d}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,Gt.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[!r&&u!=="none"&&(0,Gt.jsx)(L_.BaseControl.VisualLabel,{children:d.label}),(0,Gt.jsx)(d.render,{item:e,field:d})]})}):(0,Gt.jsx)(d.Edit,{data:e,field:d,onChange:o,hideLabelFromVision:u==="none"?!0:r,markWhenOptional:n,validity:i})})}var tz=l(MV(),1),kp=l(A(),1),oz=l(N(),1),ia=l(R(),1),xR=l(Z(),1);var Sk=l(A(),1),yk=l(N(),1);var fde=l(Z(),1),mde=l(R(),1);function URe(e,t){return V("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var lde=URe;var yR=l(A(),1);var N_=l(w(),1);function HRe(e,t,o){return e?(0,N_.jsx)(yR.Tooltip,{text:t,placement:"top",children:(0,N_.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,N_.jsx)(yR.Icon,{icon:Pf,size:16}),o]})}):o}var cde=HRe;function ude(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=ude(o);if(r)return r}}var dde=ude;var gi=l(w(),1);function M_({data:e,field:t,fieldLabel:o,summaryFields:r,validity:n,touched:i,disabled:s,onClick:a,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=dde(n),m=i&&!!f,h=lde(u,m),p=cde(m,f,o),g=V("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),b=(0,fde.useInstanceId)(M_,"dataforms-layouts-panel__field-control"),v=m?(0,yk.sprintf)((0,yk._x)("Edit %s (has errors)","field"),o||""):(0,yk.sprintf)((0,yk._x)("Edit %s","field"),o||""),k=(0,mde.useRef)(null);return(0,gi.jsxs)("div",{ref:k,className:g,onClick:s?void 0:()=>{let x=k.current?.ownerDocument.defaultView?.getSelection();x&&x.toString().length>0||a()},onKeyDown:s?void 0:x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a())},children:[u!=="none"&&(0,gi.jsx)("span",{className:h,children:p}),u==="none"&&m&&(0,gi.jsx)(Sk.Tooltip,{text:f,placement:"top",children:(0,gi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,gi.jsx)(Sk.Icon,{icon:Pf,size:16})})}),(0,gi.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:r.length>1?(0,gi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:r.map(x=>(0,gi.jsx)("span",{style:{width:"100%"},children:(0,gi.jsx)(x.render,{item:e,field:x})},x.id))}):r.map(x=>(0,gi.jsx)(x.render,{item:e,field:x},x.id))}),!s&&(0,gi.jsx)(Sk.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:v,showTooltip:!1,icon:Of,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var pde=l(MV(),1),ez=l(yf(),1),ll=l(R(),1),sn=l(N(),1);function hde(e){return e?Object.values(e).every(t=>Object.entries(t).every(([o,r])=>o==="children"&&r&&typeof r=="object"?hde(r):r.type!=="invalid"&&r.type!=="validating")):!0}function GRe(e,t){let o=kR(e);if(o.fields.length===0)return[];let r=new Map;t.forEach(s=>{r.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=r.get(s.id);if(d){let[f]=A_([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let a=r.get(s.id);if(!a)return null;let[c]=A_([a]);return{id:s.id,children:[],field:c}}return o.fields.map(n).filter(s=>s!==null)}function _k(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 gde(e,t,o){if(!e||t.length===0)return e;let r={...e},n=r;for(let a=0;a<t.length-1;a++){let c=t[a];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[o],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(r).length!==0)return r}function WRe(e,t,o){let{elementsCounterRef:r,setFormValidity:n,path:i,item:s}=o,a=(r.current[t.id]||0)+1;r.current[t.id]=a,e.then(c=>{if(a===r.current[t.id]){if(!Array.isArray(c)){n(u=>_k(u,{elements:{type:"invalid",message:(0,sn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>_k(u,{elements:{type:"invalid",message:(0,sn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>gde(u,[...i,t.id],"elements"))}}).catch(c=>{if(a!==r.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,sn.__)("Unknown error when running elements validation asynchronously."),n(d=>_k(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function $Re(e,t,o){let{customCounterRef:r,setFormValidity:n,path:i}=o,s=(r.current[t.id]||0)+1;r.current[t.id]=s,e.then(a=>{if(s===r.current[t.id]){if(a===null){n(c=>gde(c,[...i,t.id],"custom"));return}if(typeof a=="string"){n(c=>_k(c,{custom:{type:"invalid",message:a}},[...i,t.id]));return}n(c=>_k(c,{custom:{type:"invalid",message:(0,sn.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(a=>{if(s!==r.current[t.id])return;let c;a instanceof Error?c=a.message:c=String(a)||(0,sn.__)("Unknown error when running custom validation asynchronously."),n(u=>_k(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function bde(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,sn.__)("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,sn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,sn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,sn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,sn.__)("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,sn.__)("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,pde.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,sn.__)("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"&&(WRe(t.field.getElements(),t,o),n.elements={type:"validating",message:(0,sn.__)("Validating\u2026")}),r instanceof Promise&&($Re(r,t,o),n.custom={type:"validating",message:(0,sn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(a=>{i[a.id]=bde(e,a,{...o,path:[...o.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([a,c])=>{c!==void 0&&(s[a]=c)}),Object.keys(s).length===0?void 0:{children:s}}}function kde(e,t){let o=e?.field?.getValue({item:t});if(e.children.length===0)return o;let r=e.children.map(n=>kde(n,t));return r?{value:o,children:r}:o}function KRe(e,t,o){let[r,n]=(0,ll.useState)(),i=(0,ll.useRef)({}),s=(0,ll.useRef)({}),a=(0,ll.useRef)({}),c=(0,ll.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=GRe(o,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let p=kde(h,e);if(a.current.hasOwnProperty(h.id)&&(0,ez.default)(a.current[h.id],p)){m.push(h.id);return}a.current[h.id]=p;let g=bde(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,ez.default)(h,p)?h:p})},[e,t,o]);return(0,ll.useEffect)(()=>{c()},[c]),{validity:r,isValid:hde(r)}}var vde=KRe;var yde=l(R(),1);function of(e,t){(0,yde.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(r=>{r.reportValidity()})},[t,e])}var Sde=l(R(),1);function YRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var SR=(e,t)=>Array.isArray(e)&&e.length>0?YRe(e).map(r=>t.find(n=>n.id===r)).filter(r=>r!==void 0):[];var qRe=(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 ZRe(e){let{fields:t}=(0,Sde.useContext)(us),o=e.layout,r=SR(o.summary,t),n=qRe(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 _R=ZRe;var an=l(w(),1);function XRe({data:e,field:t,onChange:o,fieldLabel:r,onClose:n,touched:i}){let{fields:s}=(0,ia.useContext)(us),[a,c]=(0,ia.useState)({}),u=(0,ia.useMemo)(()=>(0,tz.default)(e,a,{arrayMerge:(k,y)=>y}),[e,a]),d=(0,ia.useMemo)(()=>({layout:Ar,fields:t.children?t.children:[{id:t.id,layout:Ar}]}),[t]),f=s.map(k=>({...k,Edit:k.Edit===null?void 0:k.Edit,isValid:{required:k.isValid.required?.constraint,elements:k.isValid.elements?.constraint,min:k.isValid.min?.constraint,max:k.isValid.max?.constraint,pattern:k.isValid.pattern?.constraint,minLength:k.isValid.minLength?.constraint,maxLength:k.isValid.maxLength?.constraint}})),{validity:m}=vde(u,f,d),h=()=>{o(a),n()},p=k=>{c(y=>(0,tz.default)(y,k,{arrayMerge:(S,x)=>x}))},g=(0,xR.useFocusOnMount)("firstInputElement"),b=(0,ia.useRef)(null),v=(0,xR.useMergeRefs)([g,b]);return of(b,i),(0,an.jsxs)(kp.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:r,size:"medium",children:[(0,an.jsx)("div",{ref:v,children:(0,an.jsx)(Ln,{data:u,form:d,onChange:p,validity:m,children:(k,y,S,x)=>(0,an.jsx)(k,{data:u,field:y,onChange:p,hideLabelFromVision:d.fields.length<2,markWhenOptional:x,validity:S},y.id)})}),(0,an.jsxs)(De,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,an.jsx)(kp.__experimentalSpacer,{style:{flex:1}}),(0,an.jsx)(kp.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,oz.__)("Cancel")}),(0,an.jsx)(kp.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,oz.__)("Apply")})]})]})}function QRe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,ia.useState)(!1),[s,a]=(0,ia.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=_R(t);if(!c)return null;let f=()=>{a(!1),i(!0)};return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(M_,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:r,touched:n,disabled:c.readOnly===!0,onClick:()=>a(!0),"aria-expanded":s}),s&&(0,an.jsx)(XRe,{data:e,field:t,onChange:o,fieldLabel:u??"",onClose:f,touched:n})]})}var _de=QRe;var rf=l(A(),1),xde=l(N(),1),Rc=l(R(),1);var wde=l(Z(),1);var Lr=l(w(),1);function JRe({title:e,onClose:t}){return(0,Lr.jsx)(De,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Lr.jsxs)(De,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Lr.jsx)(rf.__experimentalHeading,{level:2,size:13,children:e}),(0,Lr.jsx)(rf.__experimentalSpacer,{style:{flex:1}}),t&&(0,Lr.jsx)(rf.Button,{label:(0,xde.__)("Close"),icon:wf,onClick:t,size:"small"})]})})}function eOe({touched:e,children:t}){let o=(0,Rc.useRef)(null);return of(o,e),(0,Lr.jsx)("div",{ref:o,children:t})}function tOe({data:e,field:t,onChange:o,validity:r}){let[n,i]=(0,Rc.useState)(!1),[s,a]=(0,Rc.useState)(null),c=(0,Rc.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,wde.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Rc.useMemo)(()=>({layout:Ar,fields:t.children?t.children:[{id:t.id,layout:Ar}]}),[t]),m=(0,Rc.useMemo)(()=>{if(r!==void 0)return t.children?r?.children:{[t.id]:r}},[r,t]),{fieldDefinition:h,fieldLabel:p,summaryFields:g}=_R(t);return h?(0,Lr.jsx)("div",{ref:a,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Lr.jsx)(rf.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:v})=>(0,Lr.jsx)(M_,{data:e,field:t,fieldLabel:p,summaryFields:g,validity:r,touched:n,disabled:h.readOnly===!0,onClick:v,"aria-expanded":b}),renderContent:({onClose:b})=>(0,Lr.jsx)(eOe,{touched:n,children:(0,Lr.jsxs)("div",{ref:u,...d,children:[(0,Lr.jsx)(JRe,{title:p,onClose:b}),(0,Lr.jsx)(Ln,{data:e,form:f,onChange:o,validity:m,children:(v,k,y,S)=>(0,Lr.jsx)(v,{data:e,field:k,onChange:o,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:S,validity:y},k.id)})]})})})}):null}var Cde=tOe;var rz=l(w(),1);function Bde({data:e,field:t,onChange:o,validity:r}){return t.layout.openAs==="modal"?(0,rz.jsx)(_de,{data:e,field:t,onChange:o,validity:r}):(0,rz.jsx)(Cde,{data:e,field:t,onChange:o,validity:r})}var nf=l(A(),1),Ide=l(Z(),1),Nn=l(R(),1),nz=l(N(),1);var wR=l(N(),1),Ede=l(w(),1);function Tde(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+=Tde(r);return t}function CR({validity:e}){let t=Tde(e);return t===0?null:(0,Ede.jsx)(L4,{intent:"high",children:(0,wR.sprintf)((0,wR._n)("%d field needs attention","%d fields need attention",t),t)})}var vr=l(w(),1);function oOe(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 iz({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let{fields:s}=(0,Nn.useContext)(us),a=t.layout,c=(0,Nn.useRef)(null),u=(0,Ide.useInstanceId)(iz,"dataforms-layouts-card-card-body"),d=(0,Nn.useMemo)(()=>({layout:Ar,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=a,[h,p]=(0,Nn.useState)(f),[g,b]=(0,Nn.useState)(!1);(0,Nn.useEffect)(()=>{p(f)},[f]);let v=(0,Nn.useCallback)(()=>{p(T=>(T&&b(!0),!T))},[]),k=m?h:!0,y=(0,Nn.useCallback)(()=>{b(!0)},[b]);of(c,k&&g);let x=SR(a.summary,s).filter(T=>oOe(T,a.summary,k)),C=g&&a.isCollapsible?(0,vr.jsx)(CR,{validity:i}):null,B={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},I=t.label,P,E;if(t.children)P=!!I&&a.withHeader,E=(0,vr.jsxs)(vr.Fragment,{children:[t.description&&(0,vr.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,vr.jsx)(Ln,{data:e,form:d,onChange:o,validity:i?.children})]});else{let T=s.find(D=>D.id===t.id);if(!T||!T.Edit)return null;let O=vp("regular")?.component;if(!O)return null;I=T.label,P=!!I&&a.withHeader,E=(0,vr.jsx)(O,{data:e,field:t,onChange:o,hideLabelFromVision:r||P,markWhenOptional:n,validity:i})}let L={blockStart:P?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,vr.jsxs)(nf.Card,{className:"dataforms-layouts-card__field",size:B,children:[P&&(0,vr.jsxs)(nf.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:m?v:void 0,style:{cursor:m?"pointer":void 0},isBorderless:!0,children:[(0,vr.jsxs)("div",{style:{height:m?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,vr.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:I}),C,x.length>0&&a.withHeader&&(0,vr.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:x.map(T=>(0,vr.jsx)(T.render,{item:e,field:T},T.id))})]}),m&&(0,vr.jsx)(nf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:k?xf:zn,"aria-expanded":k,"aria-controls":u,"aria-label":k?(0,nz.__)("Collapse"):(0,nz.__)("Expand")})]}),(k||!P)&&(0,vr.jsx)(nf.CardBody,{id:u,size:L,className:"dataforms-layouts-card__field-control",ref:c,onBlur:y,children:E})]})}var Pde=l(A(),1);var sr=l(w(),1);function rOe({title:e}){return(0,sr.jsx)(De,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,sr.jsx)(De,{direction:"row",align:"center",children:(0,sr.jsx)(Pde.__experimentalHeading,{level:2,size:13,children:e})})})}var nOe=({children:e})=>(0,sr.jsx)(sr.Fragment,{children:e});function Rde({data:e,field:t,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Ar,fields:t.children};return(0,sr.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,sr.jsx)(rOe,{title:t.label}),(0,sr.jsx)(De,{direction:"row",align:s.alignment,gap:"lg",children:(0,sr.jsx)(Ln,{data:e,form:c,onChange:o,validity:i?.children,as:nOe,children:(u,d,f)=>(0,sr.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,sr.jsx)(u,{data:e,field:d,onChange:o,hideLabelFromVision:r,markWhenOptional:n,validity:f})},d.id)})})]})}let a=vp("regular")?.component;return a?(0,sr.jsx)(sr.Fragment,{children:(0,sr.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,sr.jsx)(a,{data:e,field:t,onChange:o,markWhenOptional:n,validity:i})})}):null}var Mn=l(R(),1),Ode=l(N(),1);var Oc=l(w(),1);function Ade({data:e,field:t,onChange:o,validity:r}){let{fields:n}=(0,Mn.useContext)(us),i=(0,Mn.useRef)(null),s=(0,Mn.useRef)(null),[a,c]=(0,Mn.useState)(!1),[u,d]=(0,Mn.useState)(!1),f=(0,Mn.useMemo)(()=>({layout:Ar,fields:t.children??[]}),[t]);(0,Mn.useEffect)(()=>{let b=i.current;if(!b)return;let v=()=>{let k=b.open;k||c(!0),d(k)};return b.addEventListener("toggle",v),()=>{b.removeEventListener("toggle",v)}},[]),of(s,u&&a);let m=(0,Mn.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",p=h?n.find(b=>b.id===h):void 0,g;return p&&p.render?g=(0,Oc.jsx)(p.render,{item:e,field:p}):g=t.label||(0,Ode.__)("More details"),(0,Oc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Oc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Oc.jsxs)(De,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[g,a&&(0,Oc.jsx)(CR,{validity:r})]})}),(0,Oc.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Oc.jsx)(Ln,{data:e,form:f,onChange:o,validity:r?.children})})]})}var yp=l(w(),1),iOe=[{type:"regular",component:ade,wrapper:({children:e})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Bde,wrapper:({children:e})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:iz,wrapper:({children:e})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Rde,wrapper:({children:e,layout:t})=>(0,yp.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,yp.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,yp.jsx)(De,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Ade}];function vp(e){return iOe.find(t=>t.type===e)}var BR=l(w(),1),sOe=({children:e})=>(0,BR.jsx)(De,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Ln({data:e,form:t,onChange:o,validity:r,children:n,as:i}){let{fields:s}=(0,ER.useContext)(us),a=(0,ER.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function c(d){return s.find(f=>f.id===d.id)}let u=i??vp(t.layout.type)?.wrapper??sOe;return(0,BR.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=vp(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,r?.[d.id],a):(0,BR.jsx)(f,{data:e,field:d,onChange:o,markWhenOptional:a,validity:r?.[d.id]},d.id)})})}var az=l(w(),1);function D_({data:e,form:t,fields:o,onChange:r,validity:n}){let i=(0,sz.useMemo)(()=>kR(t),[t]),s=(0,sz.useMemo)(()=>A_(o),[o]);return t.fields?(0,az.jsx)(nde,{fields:s,children:(0,az.jsx)(Ln,{data:e,form:i,onChange:r,validity:n})}):null}var sf=l(R(),1),Kde=l(N(),1);var wk=l(A(),1);var lz=l(N(),1);var Lde=l(Z(),1);function xk({isControl:e}={isControl:!1}){return(0,Lde.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:e?35:259}}}var TR=l(w(),1);function Nde({fields:e,visibleFields:t,onToggleField:o}){let{popoverProps:r}=xk();return!e||e.length===0?null:(0,TR.jsx)(wk.DropdownMenu,{icon:ks,label:(0,lz.__)("Options"),popoverProps:r,toggleProps:{size:"small"},children:({onClose:n})=>(0,TR.jsx)(wk.MenuGroup,{label:(0,lz.__)("Show / Hide"),children:e.map(i=>{let s=t.includes(i.id);return(0,TR.jsx)(wk.MenuItem,{isSelected:s,onClick:()=>{o(i.id),n()},role:"menuitemcheckbox",icon:s?gl:null,children:i.label},i.id)})})})}var IR=l(A(),1),Mde=l(Z(),1),Dde=l(F(),1),Ac=l(R(),1),Vde=l(dr(),1);var sa=l(w(),1),{useRichText:aOe}=M(Vde.privateApis);function Fde({data:e,field:t,hideLabelFromVision:o,onChange:r,config:n={}}){let i=(0,Dde.useRegistry)(),s=t.getValue({item:e}),a=t.config||{},{clientId:c}=n,[u,d]=(0,Ac.useState)({start:void 0,end:void 0}),[f,m]=(0,Ac.useState)(!1),h=(0,Ac.useRef)(),p=(0,Ac.useRef)(new Set),g=(0,Ac.useRef)(new Set),b=Cb({allowedFormats:a?.allowedFormats,disableFormats:a?.disableFormats});function v(){h.current?.focus()}let{value:k,getValue:y,onChange:S,ref:x,formatTypes:C}=aOe({value:s,onChange(P){r(t.setValue({item:e,value:P}))},selectionStart:u.start,selectionEnd:u.end,onSelectionChange:(P,E)=>d({start:P,end:E}),__unstableIsSelected:f,preserveWhiteSpace:!!a?.preserveWhiteSpace,placeholder:a?.placeholder,__unstableDisableFormats:a?.disableFormats,allowedFormats:b,withoutInteractiveFormatting:a?.withoutInteractiveFormatting,__unstableFormatTypeHandlerContext:(0,Ac.useMemo)(()=>({richTextIdentifier:t.id,blockClientId:c}),[t.id,c])}),{baseControlProps:B,controlProps:I}=(0,IR.useBaseControlProps)({hideLabelFromVision:o??t.hideLabelFromVision,label:t.label});return(0,sa.jsxs)(sa.Fragment,{children:[f&&(0,sa.jsx)(Pb.Provider,{value:g,children:(0,sa.jsx)(Ob.Provider,{value:p,children:(0,sa.jsx)("div",{children:(0,sa.jsx)(nP,{value:k,onChange:S,onFocus:v,formatTypes:C,forwardedRef:h,isVisible:!1})})})}),(0,sa.jsx)(IR.BaseControl,{...B,children:(0,sa.jsx)("div",{className:"block-editor-content-only-controls__rich-text",role:"textbox","aria-multiline":!a?.disableLineBreaks,ref:(0,Mde.useMergeRefs)([x,tP({registry:i,getValue:y,onChange:S,formatTypes:C,selectionChange:d,isSelected:f,disableFormats:a?.disableFormats,value:k,tagName:"div",disableLineBreaks:a?.disableLineBreaks,keyboardShortcuts:g,inputEvents:p}),h]),onFocus:()=>m(!0),onBlur:()=>m(!1),contentEditable:!0,...I})})]})}var Sp=l(A(),1),zde=l(F(),1),Ck=l(N(),1);var Co=l(w(),1);function lOe({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,Co.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,Co.jsx)("img",{alt:"",width:24,height:24,src:o.media_type==="image"?o.source_url:o.poster})});if(n.length===1){let a=t.getValue({item:e})?.url;if(n[0]==="image"&&a)return(0,Co.jsx)("div",{className:"block-editor-content-only-controls__media-thumbnail",children:(0,Co.jsx)("img",{alt:"",width:24,height:24,src:a})});let c;if(n[0]==="image"?c=iv:n[0]==="video"?c=FN:n[0]==="audio"?c=HO:c=jp,c)return(0,Co.jsx)(Sp.Icon,{icon:c,size:24})}return(0,Co.jsx)(Sp.Icon,{icon:jp,size:24})}function jde({data:e,field:t,onChange:o,config:r={}}){let{popoverProps:n}=xk({isControl:!0}),i=t.getValue({item:e}),{allowedTypes:s=[],multiple:a=!1,useFeaturedImage:c=!1}=r,u=i?.id,d=i?.url,f=(0,zde.useSelect)(h=>{if(!u)return;let g=h(_).getSettings()[x0];if(g)return g(h,u)},[u]),m;if(s.length===1){let h=s[0];h==="image"?m=(0,Ck.__)("Choose an image\u2026"):h==="video"?m=(0,Ck.__)("Choose a video\u2026"):h==="application"?m=(0,Ck.__)("Choose a file\u2026"):m=(0,Ck.__)("Choose a media item\u2026")}else m=(0,Ck.__)("Choose a media item\u2026");return(0,Co.jsx)(Ds,{children:(0,Co.jsx)(_b,{className:"block-editor-content-only-controls__media-replace-flow",allowedTypes:s,mediaId:u,mediaURL:d,multiple:a,popoverProps:n,onReset:()=>{o(t.setValue({item:e,value:{}}))},...c&&{useFeaturedImage:!!i?.featuredImage,onToggleFeaturedImage:()=>{o(t.setValue({item:e,value:{featuredImage:!i?.featuredImage}}))}},onSelect:h=>{if(h.id&&h.url){let p={...h,mediaType:h.media_type};c&&(p.featuredImage=!1),o(t.setValue({item:e,value:p}))}},renderToggle:h=>(0,Co.jsx)(Sp.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__media",...h,children:(0,Co.jsxs)(Sp.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__media-row",children:[d&&(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)(lOe,{attachment:f,field:t,data:e,config:r}),(0,Co.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:f?.title?.raw&&f?.title?.raw!==""?f?.title?.raw:d})]}),!d&&(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)("span",{className:"block-editor-content-only-controls__media-placeholder",style:{width:"24px",height:"24px"}}),(0,Co.jsx)("span",{className:"block-editor-content-only-controls__media-title",children:m})]})]})})})})}var Lc=l(A(),1),RR=l(R(),1),Ude=l(N(),1);var Hde=l(dn(),1);var yr=l(w(),1),cz="noreferrer noopener",Gde="_blank",PR="nofollow";function cOe({rel:e="",url:t="",opensInNewTab:o,nofollow:r}){let n,i=e;if(o)n=Gde,i=i?.includes(cz)?i:i+` ${cz}`;else{let s=new RegExp(`\\b${cz}\\s*`,"g");i=i?.replace(s,"").trim()}if(r)i=i?.includes(PR)?i:(i+` ${PR}`).trim();else{let s=new RegExp(`\\b${PR}\\s*`,"g");i=i?.replace(s,"").trim()}return{url:(0,Hde.prependHTTP)(t),linkTarget:n,rel:i||void 0}}function Wde({data:e,field:t,onChange:o}){let[r,n]=(0,RR.useState)(!1),{popoverProps:i}=xk({isControl:!0}),s=t.getValue({item:e}),a=s?.url,c=s?.rel||"",d=s?.linkTarget===Gde,f=c===PR,m=(0,RR.useMemo)(()=>({url:a,opensInNewTab:d,nofollow:f}),[a,d,f]);return(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Lc.Button,{__next40pxDefaultSize:!0,className:"block-editor-content-only-controls__link",onClick:()=>{n(!0)},children:(0,yr.jsxs)(Lc.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr",className:"block-editor-content-only-controls__link-row",children:[a&&(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Lc.Icon,{icon:fn,size:24}),(0,yr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:a})]}),!a&&(0,yr.jsxs)(yr.Fragment,{children:[(0,yr.jsx)(Lc.Icon,{icon:fn,size:24,style:{opacity:.3}}),(0,yr.jsx)("span",{className:"block-editor-content-only-controls__link-title",children:(0,Ude.__)("Link")})]})]})}),r&&(0,yr.jsx)(Lc.Popover,{onClose:()=>{n(!1)},...i??{},children:(0,yr.jsx)(Pd,{value:m,onChange:h=>{let p=cOe({rel:c,...h});o(t.setValue({item:e,value:p}))},onRemove:()=>{o(t.setValue({item:e,value:{}}))}})})]})}var Sr=l(w(),1),{fieldsKey:Yde,formKey:uz}=M(Bk.privateApis);function dz(e,t={}){return function(r){return(0,Sr.jsx)(e,{...r,config:t})}}function uOe({clientId:e,blockType:t,setAttributes:o,isCollapsed:r=!1}){let n=zr({clientId:e,context:"list-view"}),i=Tt(e),s=t?.[Yde],a=(0,sf.useContext)(xr),c=(0,$de.useSelect)(p=>{let g=p(_).getBlockAttributes(e);if(!g?.metadata?.bindings)return g;let{getBlockBindingsSource:b}=M(p(Bk.store));return Object.entries(g.metadata.bindings).reduce((v,[k,y])=>{let S=b(y.source);if(!S)return v;let x=S.getValues({select:p,context:a,bindings:{[k]:y}});return{...v,...x}},g)},[a,e]),u=(0,sf.useMemo)(()=>r?{...t?.[uz],fields:[t?.[uz]?.fields?.[0]]}:t?.[uz],[t,r]),[d,f]=(0,sf.useState)(u),m=(0,sf.useMemo)(()=>s?.length?s.map(p=>{let g={...p};return typeof p.Edit=="string"&&p.Edit==="rich-text"?g.Edit=dz(Fde,{clientId:e}):typeof p.Edit=="string"&&p.Edit==="link"?g.Edit=dz(Wde):typeof p.Edit=="object"&&p.Edit.control==="media"&&(g.Edit=dz(jde,{...p.Edit})),g}):[],[s,e]);if(!s?.length)return null;let h=p=>{f(g=>g.fields?.includes(p)?{...g,fields:g.fields.filter(b=>b!==p)}:{...g,fields:[...g.fields||[],p]})};return(0,Sr.jsxs)("div",{className:"block-editor-block-fields__container",children:[(0,Sr.jsx)("div",{className:"block-editor-block-fields__header",children:(0,Sr.jsxs)(OR.__experimentalHStack,{spacing:1,children:[r&&(0,Sr.jsxs)(Sr.Fragment,{children:[(0,Sr.jsx)(Ae,{className:"block-editor-block-fields__header-icon",icon:i?.icon}),(0,Sr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Sr.jsx)(OR.__experimentalTruncate,{numberOfLines:1,children:n})}),(0,Sr.jsx)(Nde,{fields:m,visibleFields:d.fields,onToggleField:h})]}),!r&&(0,Sr.jsx)("h2",{className:"block-editor-block-fields__header-title",children:(0,Kde.__)("Content")})]})}),(0,Sr.jsx)(D_,{data:c,fields:m,form:d,onChange:o})]})}function dOe(e){return!!(window?.__experimentalContentOnlyInspectorFields&&(0,Bk.getBlockType)(e)?.[Yde])}function fOe(e){let{blockType:t,isSelectionWithinCurrentSection:o}=(0,sf.useContext)(ur);return(0,Sr.jsx)(Sm,{group:"content",children:(0,Sr.jsx)(uOe,{...e,blockType:t,isCollapsed:o})})}var qde={edit:fOe,hasSupport:dOe,attributeKeys:[],supportsPatternEditing:!0};var pz=l(ut(),1),Zde=l(A(),1),fz=l(N(),1),V_=l($(),1);var mz=l(w(),1);function mOe(e){return(0,V_.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e}function pOe({className:e,setAttributes:t}){return ao()!=="default"?null:(0,mz.jsx)(fe,{group:"advanced",children:(0,mz.jsx)(Zde.TextControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,fz.__)("Additional CSS class(es)"),value:e||"",onChange:r=>{t({className:r!==""?r:void 0})},help:(0,fz.__)("Separate multiple classes with spaces.")})})}var hz={edit:pOe,addSaveProps:hOe,attributeKeys:["className"],hasSupport(e){return(0,V_.hasBlockSupport)(e,"customClassName",!0)}};function hOe(e,t,o){return(0,V_.hasBlockSupport)(t,"customClassName",!0)&&o.className&&(e.className=V(e.className,o.className)),e}function gOe(e,t,o,r){if(!(0,V_.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,pz.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",mOe);(0,pz.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",gOe);var Xde=l(ut(),1),F_=l($(),1);function bOe(e,t){return(0,F_.hasBlockSupport)(t,"className",!0)&&(typeof e.className=="string"?e.className=[...new Set([(0,F_.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,F_.getBlockDefaultClassName)(t.name)),e}(0,Xde.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",bOe);var Ife=l(R(),1),Pfe=l(ut(),1),Dc=l($(),1),Rfe=l(Z(),1),Pk=l(Uv(),1);var xz=l($(),1),VR=l(R(),1),gfe=l(F(),1);var kOe=l($(),1);var vOe=l(w(),1),Qde="typography.lineHeight";var Jde=l(ut(),1),AR=l($(),1),efe=l(XE(),1),tfe=l(A(),1);var z_="typography.__experimentalFontFamily",{kebabCase:yOe}=M(tfe.privateApis);function SOe(e){return(0,AR.hasBlockSupport)(e,z_)&&(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}})),e}function ofe(e,t,o){if(!(0,AR.hasBlockSupport)(t,z_)||Ue(t,ds,"fontFamily")||!o?.fontFamily)return e;let r=new efe.default(e.className);r.add(`has-${yOe(o?.fontFamily)}-font-family`);let n=r.value;return e.className=n||void 0,e}function _Oe({name:e,fontFamily:t}){return ofe({},e,{fontFamily:t})}var gz={useBlockProps:_Oe,addSaveProps:ofe,attributeKeys:["fontFamily"],hasSupport(e){return(0,AR.hasBlockSupport)(e,z_)}};(0,Jde.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",SOe);var bz=l(ut(),1),Ek=l($(),1),rfe=l(XE(),1);var xOe=l(w(),1),_p="typography.fontSize";function wOe(e){return(0,Ek.hasBlockSupport)(e,_p)&&(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}})),e}function nfe(e,t,o){if(!(0,Ek.hasBlockSupport)(t,_p)||Ue(t,ds,"fontSize"))return e;let r=new rfe.default(e.className);r.add(hu(o.fontSize));let n=r.value;return e.className=n||void 0,e}function COe({name:e,fontSize:t,style:o}){let[r,n,i]=me("typography.fontSizes","typography.fluid","layout");if(!(0,Ek.hasBlockSupport)(e,_p)||Ue(e,ds,"fontSize")||!t&&!o?.typography?.fontSize)return;let s;if(o?.typography?.fontSize&&(s={style:{fontSize:ec({size:o.typography.fontSize},{typography:{fluid:n},layout:i})}}),t&&(s={style:{fontSize:oh(r,t,o?.typography?.fontSize).size}}),!!s)return nfe(s,e,{fontSize:t})}var kz={useBlockProps:COe,addSaveProps:nfe,attributeKeys:["fontSize","style"],hasSupport(e){return(0,Ek.hasBlockSupport)(e,_p)}},BOe={fontSize:[["fontSize"],["style","typography","fontSize"]]};function EOe(e,t,o,r){let n=e.name,i={fontSize:(0,Ek.hasBlockSupport)(n,_p)};return f2(i,BOe,e,t,o,r)}(0,bz.addFilter)("blocks.registerBlockType","core/font/addAttribute",wOe);(0,bz.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",EOe);var LR=l(N(),1),Tk=l($(),1);var vz=l(w(),1),Ik="typography.textAlign",TOe=[{icon:Jc,title:(0,LR.__)("Align text left"),align:"left"},{icon:Sf,title:(0,LR.__)("Align text center"),align:"center"},{icon:eu,title:(0,LR.__)("Align text right"),align:"right"}],ife=["left","center","right"],IOe=[];function yz(e){return Array.isArray(e)?ife.filter(t=>e.includes(t)):e===!0?ife:IOe}function POe({style:e,name:t,setAttributes:o}){let n=is(t)?.typography?.textAlign,i=ao();if(!n||i!=="default")return null;let s=yz((0,Tk.getBlockSupport)(t,Ik));if(!s.length)return null;let a=TOe.filter(u=>s.includes(u.align)),c=u=>{let d={...e,typography:{...e?.typography,textAlign:u}};o({style:Me(d)})};return(0,vz.jsx)(Mt,{group:"block",children:(0,vz.jsx)($w,{value:e?.typography?.textAlign,onChange:c,alignmentControls:a})})}var NR={edit:POe,useBlockProps:ROe,addSaveProps:OOe,attributeKeys:["style"],hasSupport(e){return(0,Tk.hasBlockSupport)(e,Ik,!1)}};function ROe({name:e,style:t}){if(!t?.typography?.textAlign||!yz((0,Tk.getBlockSupport)(e,Ik)).length||Ue(e,ds,"textAlign"))return null;let r=t.typography.textAlign;return{className:V({[`has-text-align-${r}`]:r})}}function OOe(e,t,o){if(!o?.style?.typography?.textAlign)return e;let{textAlign:r}=o.style.typography,n=(0,Tk.getBlockSupport)(t,Ik);return yz(n).includes(r)&&!Ue(t,ds,"textAlign")&&(e.className=V(`has-text-align-${r}`,e.className)),e}var _z=l(ut(),1),af=l($(),1),xp=l(R(),1),mfe=l(F(),1),j_=l(N(),1),MR=l(A(),1),pfe=l(Z(),1);function AOe(e,t){let o=e.scrollHeight>e.clientHeight,r=0,n=2400,i=r,s=window.getComputedStyle(e),a=parseFloat(s.paddingLeft)||0,c=parseFloat(s.paddingRight)||0,u=document.createRange();u.selectNodeContents(e);let d=e,f=e.parentElement;if(f){let h=window.getComputedStyle(f);h?.display==="flex"&&(d=f,a+=parseFloat(h.paddingLeft)||0,c+=parseFloat(h.paddingRight)||0)}let m=d.clientHeight;for(;r<=n;){let h=Math.floor((r+n)/2);t(h);let g=u.getBoundingClientRect().width,b=e.scrollWidth<=d.clientWidth&&g<=d.clientWidth-a-c,v=o||e.scrollHeight<=d.clientHeight||e.scrollHeight<=m;d.clientHeight>m&&(m=d.clientHeight),b&&v?(i=h,r=h+1):n=h-1}return u.detach(),i}function sfe(e,t){if(!e)return;t(0);let o=AOe(e,t);return t(o),o}var afe=l(R(),1),lfe=l(N(),1),cfe=l(A(),1),ufe=l(Xo(),1),Sz=l(w(),1);function dfe(){let e=(0,lfe.__)("The text may be too small to read. Consider using a larger container or less text.");return(0,afe.useEffect)(()=>{(0,ufe.speak)(e)},[e]),(0,Sz.jsx)("div",{className:"block-editor-fit-text-size-warning",children:(0,Sz.jsx)(cfe.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:e})})}var Dn=l(w(),1),LOe={},NOe=12,Nc="typography.fitText";function MOe(e){return!(0,af.hasBlockSupport)(e,Nc)||e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}}function DOe({fitText:e,name:t,clientId:o}){let[r,n]=(0,xp.useState)(null),i=(0,af.hasBlockSupport)(t,Nc),s=Xe(o),{blockAttributes:a,parentId:c,blockMode:u}=(0,mfe.useSelect)(f=>{if(!o||!i||!e)return LOe;let m=f(_).getBlockMode(o);return m==="html"?{blockMode:m}:{blockAttributes:f(_).getBlockAttributes(o),parentId:f(_).getBlockRootClientId(o),blockMode:m}},[o,i,e]),d=(0,xp.useCallback)(()=>{if(!s||!i||!e)return;let f=`fit-text-${o}`,m=s.ownerDocument.getElementById(f);m||(m=s.ownerDocument.createElement("style"),m.id=f,s.ownerDocument.head.appendChild(m));let h=`#block-${o}`,g=sfe(s,b=>{b===0?m.textContent="":m.textContent=`${h} { font-size: ${b}px !important; }`});n(g)},[s,o,i,e]);return(0,xp.useEffect)(()=>{if(!e||!s||!o||!i||u==="html")return;let f=s,m=f.style.visibility,h=null,p=null,g=null;h=window.requestAnimationFrame(()=>{f.style.visibility="hidden",p=window.requestAnimationFrame(()=>{d(),g=setTimeout(()=>{f.style.visibility=m},10)})});let b;return window.ResizeObserver&&f.parentElement&&(b=new window.ResizeObserver(d),b.observe(f.parentElement),b.observe(f)),()=>{h!==null&&window.cancelAnimationFrame(h),p!==null&&window.cancelAnimationFrame(p),g!==null&&clearTimeout(g),b&&b.disconnect();let v=`fit-text-${o}`,k=f.ownerDocument.getElementById(v);k&&k.remove()}},[e,o,c,d,s,i,u]),(0,xp.useEffect)(()=>{if(e&&s&&i&&u!=="html"){let f=window.requestAnimationFrame(()=>{s&&d()});return()=>window.cancelAnimationFrame(f)}},[a,e,d,s,i,u]),{fontSize:r}}function ffe({clientId:e,fitText:t=!1,setAttributes:o,name:r,fontSize:n,style:i,warning:s}){return(0,af.hasBlockSupport)(r,Nc)?(0,Dn.jsx)(fe,{group:"typography",children:(0,Dn.jsxs)(MR.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,j_.__)("Fit text"),onDeselect:()=>o({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:[(0,Dn.jsx)(MR.ToggleControl,{label:(0,j_.__)("Fit text"),checked:t,onChange:()=>{let a=!t||void 0,c={fitText:a};a&&(n&&(c.fontSize=void 0),i?.typography?.fontSize&&(c.style={...i,typography:{...i?.typography,fontSize:void 0}})),o(c)},help:t?(0,j_.__)("Text will resize to fit its container."):(0,j_.__)("The text will resize to fit its container, resetting other font size settings.")}),s]})}):null}function VOe(e,t,o){if(!(0,af.hasBlockSupport)(t,Nc))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 FOe({name:e,fitText:t}){return t&&(0,af.hasBlockSupport)(e,Nc)?{className:"has-fit-text"}:{}}(0,_z.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",MOe);var zOe=e=>(0,af.hasBlockSupport)(e,Nc);function jOe({fitText:e,name:t,clientId:o,children:r}){let{fontSize:n}=DOe({fitText:e,name:t,clientId:o});return r(n)}var UOe=(0,pfe.createHigherOrderComponent)(e=>function(o){let{name:r,attributes:n,clientId:i,isSelected:s,setAttributes:a}=o,{fitText:c}=n;return(0,af.hasBlockSupport)(r,Nc)?(0,Dn.jsxs)(Dn.Fragment,{children:[(0,Dn.jsx)(e,{...o}),c&&(0,Dn.jsx)(jOe,{fitText:c,name:r,clientId:i,children:d=>s&&(0,Dn.jsx)(ffe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style,warning:d<NOe&&(0,Dn.jsx)(dfe,{})})}),!c&&s&&(0,Dn.jsx)(ffe,{clientId:i,fitText:c,setAttributes:a,name:r,fontSize:n.fontSize,style:n.style})]}):(0,Dn.jsx)(e,{...o})},"addFitTextControl");(0,_z.addFilter)("editor.BlockEdit","core/fit-text/add-fit-text-control",UOe);var DR={useBlockProps:FOe,addSaveProps:VOe,attributeKeys:["fitText","fontSize","style"],hasSupport:zOe,edit:()=>null};var wz=l(w(),1);function hfe(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.includes(o)))}var HOe="typography.__experimentalLetterSpacing",GOe="typography.__experimentalTextTransform",WOe="typography.__experimentalTextDecoration",$Oe="typography.textIndent",KOe="typography.textColumns",YOe="typography.__experimentalFontStyle",qOe="typography.__experimentalFontWeight",ZOe="typography.__experimentalWritingMode",ds="typography",bfe=[Qde,_p,YOe,qOe,z_,Ik,KOe,WOe,$Oe,ZOe,GOe,HOe,Nc];function kfe(e){let t={...hfe(e,["fontFamily"])},o=e?.typography?.fontSize,r=e?.typography?.fontFamily,n=typeof o=="string"&&o?.startsWith("var:preset|font-size|")?o.substring(21):void 0,i=r?.startsWith("var:preset|font-family|")?r.substring(23):void 0;return t.typography={...hfe(t.typography,["fontFamily"]),fontSize:n?void 0:o},{style:Me(t),fontFamily:i,fontSize:n}}function vfe(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function XOe({children:e,resetAllFilter:t}){let o=(0,VR.useCallback)(r=>{let n=vfe(r),i=t(n);return{...r,...kfe(i)}},[t]);return(0,wz.jsx)(fe,{group:"typography",resetAllFilter:o,children:e})}function yfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=RP(r),{style:i,fontFamily:s,fontSize:a,fitText:c}=(0,gfe.useSelect)(m=>{if(!n)return{};let{style:h,fontFamily:p,fontSize:g,fitText:b}=m(_).getBlockAttributes(e)||{};return{style:h,fontFamily:p,fontSize:g,fitText:b}},[e,n]),u=(0,VR.useMemo)(()=>vfe({style:i,fontFamily:s,fontSize:a}),[i,a,s]),d=m=>{let h=kfe(m);(h.fontSize||h.style?.typography?.fontSize)&&c&&(h.fitText=void 0),o(h)};if(!n)return null;let f=(0,xz.getBlockSupport)(t,[ds,"__experimentalDefaultControls"]);return(0,wz.jsx)(OP,{as:XOe,panelId:e,settings:r,value:u,onChange:d,defaultControls:f})}var cf=l(R(),1),zR=l(F(),1),FR=l($(),1),Cfe=l(Re(),1);var cl=l(R(),1),Sfe=l(Jy(),1);var U_=l(w(),1);function _fe({clientId:e,value:t,computeStyle:o,forceShow:r}){let n=Xe(e),[i,s]=(0,cl.useReducer)(()=>o(n));(0,cl.useEffect)(()=>{n&&r&&s()},[n,r]),(0,cl.useEffect)(()=>{if(!n)return;let d=new window.MutationObserver(s);return d.observe(n,{attributes:!0,attributeFilter:["style","class"]}),()=>{d.disconnect()}},[n]);let a=(0,cl.useRef)(t),[c,u]=(0,cl.useState)(!1);return(0,cl.useEffect)(()=>{if((0,Sfe.isShallowEqual)(t,a.current)||r)return;u(!0),a.current=t;let d=setTimeout(()=>{u(!1)},400);return()=>{u(!1),clearTimeout(d)}},[t,r]),!c&&!r?null:(0,U_.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,U_.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})})}function lf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function xfe({clientId:e,value:t,forceShow:o}){return(0,U_.jsx)(_fe,{clientId:e,value:t?.spacing?.margin,computeStyle:r=>{let n=lf(r,"margin-top"),i=lf(r,"margin-right"),s=lf(r,"margin-bottom"),a=lf(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 wfe({clientId:e,value:t,forceShow:o}){return(0,U_.jsx)(_fe,{clientId:e,value:t?.spacing?.padding,computeStyle:r=>({borderTopWidth:lf(r,"padding-top"),borderRightWidth:lf(r,"padding-right"),borderBottomWidth:lf(r,"padding-bottom"),borderLeftWidth:lf(r,"padding-left")}),forceShow:o})}var Mc=l(w(),1),ul="dimensions",H_="spacing";function QOe(){let[e,t]=(0,cf.useState)(!1),{hideBlockInterface:o,showBlockInterface:r}=M((0,zR.useDispatch)(_));return(0,cf.useEffect)(()=>{e?o():r()},[e,r,o]),[e,t]}function JOe({children:e,resetAllFilter:t}){let o=(0,cf.useCallback)(r=>{let n=r.style,i=t(n);return{...r,style:i}},[t]);return(0,Mc.jsx)(fe,{group:"dimensions",resetAllFilter:o,children:e})}function Bfe({clientId:e,name:t,setAttributes:o,settings:r}){let n=MP(r),i=(0,zR.useSelect)(m=>{if(n)return m(_).getBlockAttributes(e)?.style},[e,n]),[s,a]=QOe(),c=m=>{o({style:Me(m)})};if(!n)return null;let u=(0,FR.getBlockSupport)(t,[ul,"__experimentalDefaultControls"]),d=(0,FR.getBlockSupport)(t,[H_,"__experimentalDefaultControls"]),f={...u,...d};return(0,Mc.jsxs)(Mc.Fragment,{children:[(0,Mc.jsx)(DP,{as:JOe,panelId:e,settings:r,value:i,onChange:c,defaultControls:f,onVisualize:a}),!!r?.spacing?.padding&&s==="padding"&&(0,Mc.jsx)(wfe,{forceShow:s==="padding",clientId:e,value:i}),!!r?.spacing?.margin&&s==="margin"&&(0,Mc.jsx)(xfe,{forceShow:s==="margin",clientId:e,value:i})]})}function Efe(e,t="any"){if(cf.Platform.OS!=="web")return!1;let o=(0,FR.getBlockSupport)(e,ul);return o===!0?!0:t==="any"?!!(o?.aspectRatio||o?.height||o?.minHeight||o?.width):!!o?.[t]}var Tfe={useBlockProps:eAe,attributeKeys:["height","minHeight","width","style"],hasSupport(e){return Efe(e)}};function eAe({name:e,height:t,minHeight:o,style:r}){if(!Efe(e,"aspectRatio")||Ue(e,ul,"aspectRatio"))return{};let n=V({"has-aspect-ratio":!!r?.dimensions?.aspectRatio}),i={};return r?.dimensions?.aspectRatio?(i.minHeight="unset",i.height="unset"):(o||r?.dimensions?.minHeight||t||r?.dimensions?.height)&&(i.aspectRatio="unset"),{className:n,style:i}}function Cz(){(0,Cfe.default)("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}var dl=l(w(),1),tAe=[...bfe,cp,ir,ul,up,H_,S_],Ez=e=>tAe.some(t=>(0,Dc.hasBlockSupport)(e,t));function bi(e={}){let t={};return(0,Pk.getCSSRules)(e).forEach(o=>{t[o.key]=o.value}),t}function oAe(e){return!Ez(e)&&!(0,Dc.hasBlockSupport)(e,"customCSS",!0)||e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e}var Ofe={[`${cp}.__experimentalSkipSerialization`]:["border"],[`${ir}.__experimentalSkipSerialization`]:[ir],[`${ds}.__experimentalSkipSerialization`]:[ds],[`${ul}.__experimentalSkipSerialization`]:[ul],[`${H_}.__experimentalSkipSerialization`]:[H_],[`${S_}.__experimentalSkipSerialization`]:[S_]},rAe={...Ofe,[`${ul}.aspectRatio`]:[`${ul}.aspectRatio`],[`${up}`]:[up]},nAe={[`${ul}.aspectRatio`]:!0,[`${up}`]:!0},iAe={gradients:"gradient"};function Bz(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;Bz(r[i],[s],!0)}else n.length===1&&delete r[n[0]]}),r}function Afe(e,t,o,r=rAe){if(!Ez(t))return e;let{style:n}=o;return Object.entries(r).forEach(([i,s])=>{let a=nAe[i]||(0,Dc.getBlockSupport)(t,i);a===!0&&(n=Bz(n,s)),Array.isArray(a)&&a.forEach(c=>{let u=iAe[c]||c;n=Bz(n,[[...s,u]])})}),e.style={...bi(n),...e.style},e}function sAe({clientId:e,name:t,setAttributes:o,__unstableParentLayout:r}){let n=is(t,r),i=ao(),s={clientId:e,name:t,setAttributes:o,settings:{...n,typography:{...n.typography,textAlign:!1}}};return i!=="default"?null:(0,dl.jsxs)(dl.Fragment,{children:[(0,dl.jsx)(d2,{...s}),(0,dl.jsx)(vae,{...s}),(0,dl.jsx)(yfe,{...s}),(0,dl.jsx)(pae,{...s}),(0,dl.jsx)(Bfe,{...s})]})}var jR={edit:sAe,hasSupport:Ez,addSaveProps:Afe,attributeKeys:["style"],useBlockProps:cAe},aAe=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],lAe={};function cAe({name:e,style:t}){let o=(0,Rfe.useInstanceId)(lAe,"wp-elements"),r=`.${o}`,n=t?.elements,i=(0,Ife.useMemo)(()=>{if(!n)return;let s=[];return aAe.forEach(({elementType:a,pseudo:c,elements:u})=>{if(Ue(e,ir,a))return;let f=n?.[a];if(f){let m=bg(r,Dc.__EXPERIMENTAL_ELEMENTS[a]);s.push((0,Pk.compileCSS)(f,{selector:m})),c&&c.forEach(h=>{f[h]&&s.push((0,Pk.compileCSS)(f[h],{selector:bg(r,`${Dc.__EXPERIMENTAL_ELEMENTS[a]}${h}`)}))})}u&&u.forEach(m=>{n[m]&&s.push((0,Pk.compileCSS)(n[m],{selector:bg(r,Dc.__EXPERIMENTAL_ELEMENTS[m])}))})}),s.length>0?s.join(""):void 0},[r,n,e]);return Qn({css:i}),Afe({className:o},e,{style:t},Ofe)}(0,Pfe.addFilter)("blocks.registerBlockType","core/style/addAttribute",oAe);var Lfe=l(ut(),1),Nfe=l($(),1),uAe=e=>(0,Nfe.hasBlockSupport)(e,"__experimentalSettings",!1);function dAe(e){return uAe(e)&&(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}})),e}(0,Lfe.addFilter)("blocks.registerBlockType","core/settings/addAttribute",dAe);var uf=l($(),1),Vfe=l(Z(),1),Ffe=l(ut(),1),G_=l(R(),1);function fAe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(o=>{let r=Bt(o).toRgb();t.r.push(r.r/255),t.g.push(r.g/255),t.b.push(r.b/255),t.a.push(r.a)}),t}function Mfe(e){return`${e}{filter:none}`}function Dfe(e,t){return`${e}{filter:url(#${t})}`}function UR(e,t){let o=fAe(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}var Vc=l(w(),1),Tz=[],mAe=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");Kc([Yc]);function Iz({presetSetting:e,defaultSetting:t}){let[o,r,n,i]=me(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,G_.useMemo)(()=>[...r||Tz,...n||Tz,...o&&i||Tz],[o,r,n,i])}function zfe(e,t){if(!e)return;let o=t?.find(({slug:r})=>e===`var:preset|duotone|${r}`);return o?o.colors:void 0}function pAe(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 hAe({style:e,setAttributes:t,name:o}){let r=e?.color?.duotone,n=is(o),i=ao(),s=Iz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=Iz({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=me("color.custom","color.customDuotone"),d=!c,f=!u||a?.length===0&&d;if(s?.length===0&&f||i!=="default")return null;let m=r==="unset"||Array.isArray(r)?r:zfe(r,s);return(0,Vc.jsxs)(Vc.Fragment,{children:[(0,Vc.jsx)(fe,{group:"filter",children:(0,Vc.jsx)(KP,{value:{filter:{duotone:m}},onChange:h=>{let p={...e,color:{...h?.filter}};t({style:Me(p)})},settings:n})}),(0,Vc.jsx)(Mt,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,Vc.jsx)(eI,{duotonePalette:s,colorPalette:a,disableCustomDuotone:f,disableCustomColors:d,value:m,onChange:h=>{let p=pAe(h,s),g={...e,color:{...e?.color,duotone:p??h}};t({style:Me(g)})},settings:n})})]})}var Pz={shareWithChildBlocks:!0,edit:hAe,useBlockProps:vAe,attributeKeys:["style"],hasSupport(e){return(0,uf.hasBlockSupport)(e,"filter.duotone")}};function gAe(e){return(0,uf.hasBlockSupport)(e,"filter.duotone")&&(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}})),e}function bAe({clientId:e,id:t,selector:o,attribute:r}){let n=Iz({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(r),s=i?void 0:zfe(r,n),a=typeof r=="string"&&s,c=typeof r=="string"&&!a,u=null;a?u=s:(c||i)&&(u=r);let m=o.split(",").map(g=>`.${t}${g.trim()}`).join(", "),h=Array.isArray(u)||u==="unset";tc(h?{css:u!=="unset"?Dfe(m,t):Mfe(m),__unstableType:"presets"}:void 0),tc(h?{assets:u!=="unset"?UR(t,u):"",__unstableType:"svgs"}:void 0);let p=Xe(e);(0,G_.useEffect)(()=>{if(h&&p&&mAe){let g=p.style.display;p.style.setProperty("display","inline-block"),p.offsetHeight,p.style.setProperty("display",g)}},[h,p,u])}var kAe={};function vAe({clientId:e,name:t,style:o}){let r=(0,Vfe.useInstanceId)(kAe),n=(0,G_.useMemo)(()=>{let c=(0,uf.getBlockType)(t);if(c){if(!(0,uf.getBlockSupport)(c,"filter.duotone",!1))return null;let d=(0,uf.getBlockSupport)(c,"color.__experimentalDuotone",!1);if(d){let f=oi(c);return typeof d=="string"?bg(f,d):f}return oi(c,"filter.duotone",{fallback:!0})}},[t]),i=o?.color?.duotone,s=`wp-duotone-${r}`,a=n&&i;return bAe({clientId:e,id:s,selector:n,attribute:i}),{className:a?s:""}}(0,Ffe.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",gAe);var GR=l(R(),1),W_=l(F(),1),jfe=l(Z(),1),$_=l($(),1),K_=l(N(),1);var Ufe=l(Un(),1);var HR=l(w(),1),yAe={},SAe={};function _Ae({blockName:e,setAttributes:t,style:o}){if(ao()!=="default")return null;let n=(0,$_.getBlockType)(e);function i(a){let c=a?.css?.trim()?a.css:void 0;t({style:Me({...a,css:c})})}let s=(0,K_.sprintf)((0,K_.__)("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,HR.jsx)(fe,{group:"advanced",children:(0,HR.jsx)(ZP,{value:o,onChange:i,inheritedValue:o,help:s})})}var xAe="custom-css-edit-warning";function wAe({clientId:e,name:t,setAttributes:o}){let{style:r,canEditCSS:n}=(0,W_.useSelect)(i=>{let{getBlockAttributes:s,getSettings:a}=i(_);return{style:s(e)?.style||SAe,canEditCSS:a().canEditCSS}},[e]);return n?(0,HR.jsx)(_Ae,{blockName:t,setAttributes:o,style:r}):null}function CAe({style:e}){let t=e?.css,o=typeof t=="string"&&t.trim().length>0&&qP(t),r=(0,W_.useSelect)(u=>u(_).getSettings().canEditCSS,[]),{createWarningNotice:n}=(0,W_.useDispatch)(Ufe.store),i=!!t?.trim();(0,GR.useEffect)(()=>{!r&&i&&n((0,K_.__)("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:xAe,isDismissible:!0})},[r,i,n]);let s=(0,jfe.useInstanceId)(yAe,"wp-custom-css"),a=`.${s}`,c=(0,GR.useMemo)(()=>{if(o)return CS(t,a)},[t,a,o]);return Qn({css:c}),o?{className:`has-custom-css ${s}`}:{}}function BAe(e,t,o){if(!(0,$_.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 WR={edit:wAe,useBlockProps:CAe,addSaveProps:BAe,attributeKeys:["style"],hasSupport(e){return(0,$_.hasBlockSupport)(e,"customCSS",!0)}};var $R=l(Z(),1),Oz=l(ut(),1),Fc=l($(),1),KR=l(F(),1),fl=l(A(),1),Rk=l(N(),1);var Yo=l(w(),1),EAe="is-style-",Az="layout",{kebabCase:Rz}=M(fl.privateApis);function Lz(e){return(0,Fc.hasBlockSupport)(e,"layout")||(0,Fc.hasBlockSupport)(e,"__experimentalLayout")}function YR(e={},t=""){let{layout:o}=e,{default:r}=(0,Fc.getBlockSupport)(t,Az)||{},n=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||r||{},i=[];if(Hn[n?.type||"default"]?.className){let a=Hn[n?.type||"default"]?.className,c=t.split("/"),d=`wp-block-${c[0]==="core"?c.pop():c.join("-")}-${a}`;i.push(a,d)}return(0,KR.useSelect)(a=>!n?.inherit&&!n?.contentSize&&n?.type!=="constrained"?!1:a(_).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments,[n?.contentSize,n?.inherit,n?.type])&&i.push("has-global-padding"),n?.orientation&&i.push(`is-${Rz(n.orientation)}`),n?.justifyContent&&i.push(`is-content-justification-${Rz(n.justifyContent)}`),n?.flexWrap&&n.flexWrap==="nowrap"&&i.push("is-nowrap"),i}function Nz(e={},t,o){let{layout:r={},style:n={}}=e,i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||{},s=xs(i?.type||"default"),[a]=me("spacing.blockGap"),c=a!==null;return s?.getLayoutStyle?.({blockName:t,selector:o,layout:r,style:n,hasBlockGapSupport:c})}function TAe({layout:e,setAttributes:t,name:o,clientId:r}){let n=is(o),{layout:i}=n,{themeSupportsLayout:s}=(0,KR.useSelect)(T=>{let{getSettings:O}=T(_);return{themeSupportsLayout:O().supportsLayout}},[]);if(ao()!=="default")return null;let c=(0,Fc.getBlockSupport)(o,Az,{}),u={...i,...c},{allowSwitching:d,allowEditing:f=!0,allowInheriting:m=!0,default:h}=u;if(!f)return null;let p={...c,...e},{type:g,default:{type:b="default"}={}}=p,v=g||b,k=!!(m&&(!v||v==="default"||v==="constrained"||p.inherit)),y=e||h||{},{inherit:S=!1,contentSize:x=null}=y;if((v==="default"||v==="constrained")&&!s)return null;let C=xs(v),B=xs("constrained"),I=!y.type&&(x||S),P=!!S||!!x,E=T=>t({layout:{type:T}}),L=T=>t({layout:T});return(0,Yo.jsxs)(Yo.Fragment,{children:[(0,Yo.jsx)(fe,{children:(0,Yo.jsxs)(fl.PanelBody,{title:(0,Rk.__)("Layout"),children:[k&&(0,Yo.jsx)(Yo.Fragment,{children:(0,Yo.jsx)(fl.ToggleControl,{label:(0,Rk.__)("Inner blocks use content width"),checked:C?.name==="constrained"||P,onChange:()=>t({layout:{type:C?.name==="constrained"||P?"default":"constrained"}}),help:C?.name==="constrained"||P?(0,Rk.__)("Nested blocks use content width with options for full and wide widths."):(0,Rk.__)("Nested blocks will fill the width of this container.")})}),!S&&d&&(0,Yo.jsx)(IAe,{type:v,onChange:E}),C&&C.name!=="default"&&(0,Yo.jsx)(C.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r}),B&&I&&(0,Yo.jsx)(B.inspectorControls,{layout:y,onChange:L,layoutBlockSupport:u,name:o,clientId:r})]})}),!S&&C&&(0,Yo.jsx)(C.toolBarControls,{layout:y,onChange:L,layoutBlockSupport:c,name:o,clientId:r})]})}var Hfe={shareWithChildBlocks:!0,edit:TAe,attributeKeys:["layout"],hasSupport(e){return Lz(e)}};function IAe({type:e,onChange:t}){return(0,Yo.jsx)(fl.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Rk.__)("Layout type"),hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:fH().map(({name:o,label:r})=>(0,Yo.jsx)(fl.__experimentalToggleGroupControlOption,{value:o,label:r},o))})}function PAe(e){return"type"in(e.attributes?.layout??{})||Lz(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e}function RAe({block:e,props:t,blockGapSupport:o,globalBlockGapValue:r,layoutClasses:n}){let{name:i,attributes:s}=t,a=(0,$R.useInstanceId)(e),{layout:c}=s,{default:u}=(0,Fc.getBlockSupport)(i,Az)||{},d=c?.inherit||c?.contentSize||c?.wideSize?{...c,type:"constrained"}:c||u||{},f=`wp-container-${Rz(i)}-is-layout-`,m=`.${f}${a}`,h=o!==null,g=xs(d?.type||"default")?.getLayoutStyle?.({blockName:i,selector:m,layout:d,style:s?.style,hasBlockGapSupport:h,globalBlockGapValue:r}),b=V({[`${f}${a}`]:!!g},n);return Qn({css:g}),(0,Yo.jsx)(e,{...t,__unstableLayoutClassNames:b})}var OAe=(0,$R.createHigherOrderComponent)(e=>function(o){let{clientId:r,name:n,attributes:i}=o,s=Lz(n),a=YR(i,n),c=(0,KR.useSelect)(u=>{if(!s)return;let{getSettings:d,getBlockSettings:f}=M(u(_)),m=d(),{disableLayoutStyles:h}=m;if(h)return;let[p]=f(r,"spacing.blockGap"),g=m[xi],b,v=i?.className;if(v?.includes(EAe)){let{getBlockStyles:y}=u(Fc.store),S=y(n),x=jV(v,S);b=x?g?.blocks?.[n]?.variations?.[x]?.spacing?.blockGap:void 0}let k=b??g?.blocks?.[n]?.spacing?.blockGap??g?.spacing?.blockGap;return{blockGapSupport:p,globalBlockGapValue:k}},[s,r,i?.className,n]);return c?(0,Yo.jsx)(RAe,{block:e,props:o,layoutClasses:a,...c}):(0,Yo.jsx)(e,{...o,__unstableLayoutClassNames:s?a:void 0})},"withLayoutStyles");(0,Oz.addFilter)("blocks.registerBlockType","core/layout/addAttribute",PAe);(0,Oz.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",OAe);var Xfe=l(Z(),1),zz=l(F(),1),Qfe=l(R(),1);var fs=l(R(),1),df=l(F(),1),Wfe=l(Z(),1);function q_(e,t){return Array.from({length:t},(o,r)=>e+r)}var aa=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 Bo(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Y_(e,t){let o=[];for(let r of e.split(" ")){let n=o[o.length-1],i=n?n.end+t:0,s=i+parseFloat(r);o.push({start:i,end:s})}return o}function zc(e,t,o="start"){return e.reduce((r,n,i)=>Math.abs(n[o]-t)<Math.abs(e[r][o]-t)?i:r,0)}function AAe(e,t){let o=parseFloat(Bo(e,"column-gap")),r=parseFloat(Bo(e,"row-gap")),n=Y_(Bo(e,"grid-template-columns"),o),i=Y_(Bo(e,"grid-template-rows"),r),s=zc(n,t.left)+1,a=zc(i,t.top)+1,c=zc(n,t.right,"end")+1,u=zc(i,t.bottom,"end")+1;return new aa({columnStart:s,columnEnd:c,rowStart:a,rowEnd:u})}function Gfe(e){return AAe(e.parentElement,new window.DOMRect(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight))}function Mz(e){let t=Bo(e,"grid-template-columns"),o=Bo(e,"grid-template-rows"),r=Bo(e,"border-top-width"),n=Bo(e,"border-right-width"),i=Bo(e,"border-bottom-width"),s=Bo(e,"border-left-width"),a=Bo(e,"padding-top"),c=Bo(e,"padding-right"),u=Bo(e,"padding-bottom"),d=Bo(e,"padding-left"),f=t.split(" ").length,m=o.split(" ").length,h=f*m;return{numColumns:f,numRows:m,numItems:h,currentColor:Bo(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:o,gap:Bo(e,"gap"),inset:`
				calc(${a} + ${r})
				calc(${c} + ${n})
				calc(${u} + ${i})
				calc(${d} + ${s})
			`}}}var ki=l(w(),1);function Z_({clientId:e,contentRef:t,parentLayout:o,childGridClientId:r}){let n=(0,df.useSelect)(a=>a(_).getSettings().isDistractionFree,[]),i=Xe(e);if(n||!i)return null;let s=o?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,ki.jsx)(LAe,{gridClientId:e,gridElement:i,isManualGrid:s,ref:t,childGridClientId:r})}var LAe=(0,fs.forwardRef)(({gridClientId:e,gridElement:t,isManualGrid:o,childGridClientId:r},n)=>{let[i,s]=(0,fs.useState)(()=>Mz(t)),[a,c]=(0,fs.useState)(!1),u=Xe(r),d=(0,fs.useMemo)(()=>u?Gfe(u):null,[u]);return(0,fs.useEffect)(()=>{let f=()=>s(Mz(t)),m=new window.ResizeObserver(f);m.observe(t,{box:"border-box"});let h=new window.ResizeObserver(f);return h.observe(t),()=>{m.disconnect(),h.disconnect()}},[t]),(0,fs.useEffect)(()=>{function f(){c(!0)}function m(){c(!1)}return document.addEventListener("drag",f),document.addEventListener("dragend",m),()=>{document.removeEventListener("drag",f),document.removeEventListener("dragend",m)}},[]),(0,ki.jsx)(Hi,{className:V("block-editor-grid-visualizer",{"is-dropping-allowed":a}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,ki.jsx)("div",{ref:n,className:"block-editor-grid-visualizer__grid",style:i.style,children:o?(0,ki.jsx)(MAe,{gridClientId:e,gridInfo:i,childGridRect:d}):(0,ki.jsx)(NAe,{gridInfo:i,childGridRect:d})})})});function NAe({gridInfo:e,childGridRect:t}){return q_(1,e.numRows).map(o=>q_(1,e.numColumns).map(r=>{let n=e.currentColor;return t?.contains(r,o)&&(n="transparent"),(0,ki.jsx)($fe,{color:n},`${o}-${r}`)}))}function MAe({gridClientId:e,gridInfo:t,childGridRect:o}){let[r,n]=(0,fs.useState)(null),i=(0,df.useSelect)(a=>{let{getBlockOrder:c,getBlockStyles:u}=M(a(_)),d=c(e);return u(d)},[e]),s=(0,fs.useMemo)(()=>{let a=[];for(let c of Object.values(i)){let{columnStart:u,rowStart:d,columnSpan:f=1,rowSpan:m=1}=c?.layout??{};!u||!d||a.push(new aa({columnStart:u,rowStart:d,columnSpan:f,rowSpan:m}))}return a},[i]);return q_(1,t.numRows).map(a=>q_(1,t.numColumns).map(c=>{let u=o?.contains(c,a),d=t.currentColor;u&&(d="transparent");let f=s.some(h=>h.contains(c,a)),m=r?.contains(c,a)??!1;return(0,ki.jsx)($fe,{color:d,className:m&&"is-highlighted",children:f&&!u?(0,ki.jsx)(DAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n}):(0,ki.jsx)(VAe,{column:c,row:a,gridClientId:e,gridInfo:t,setHighlightedRect:n})},`${a}-${c}`)}))}function $fe({color:e,children:t,className:o}){return(0,ki.jsx)("div",{className:V("block-editor-grid-visualizer__cell",o),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function Kfe(e,t,o,r,n){let{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:a,getBlockName:c}=(0,df.useSelect)(_),{updateBlockAttributes:u,moveBlocksToPosition:d,__unstableMarkNextChangeAsNotPersistent:f}=(0,df.useDispatch)(_),m=np(o,r.numColumns);return FAe({validateDrag(h){let p=c(h);if(!a(p,o))return!1;let g=i(h),b=new aa({columnStart:e,rowStart:t,columnSpan:g.style?.layout?.columnSpan,rowSpan:g.style?.layout?.rowSpan});return new aa({columnSpan:r.numColumns,rowSpan:r.numRows}).containsRect(b)},onDragEnter(h){let p=i(h);n(new aa({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 DAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){return(0,ki.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:Kfe(e,t,o,r,n)})}function VAe({column:e,row:t,gridClientId:o,gridInfo:r,setHighlightedRect:n}){let{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,df.useDispatch)(_),c=np(o,r.numColumns);return(0,ki.jsx)(Qu,{rootClientId:o,className:"block-editor-grid-visualizer__appender",ref:Kfe(e,t,o,r,n),style:{color:r.currentColor},onSelect:u=>{u&&(i(u.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),a(),s([u.clientId],o,o,c(e,t)))}})}function FAe({validateDrag:e,onDragEnter:t,onDragLeave:o,onDrop:r}){let{getDraggedBlockClientIds:n}=(0,df.useSelect)(_);return(0,Wfe.__experimentalUseDropZone)({onDragEnter(){let[i]=n();i&&e(i)&&t(i)},onDragLeave(){o()},onDrop(){let[i]=n();i&&e(i)&&r(i)}})}var Yfe=l(A(),1),X_=l(R(),1);var qR=l(w(),1);function Dz({clientId:e,bounds:t,onChange:o,parentLayout:r}){let n=Xe(e),i=n?.parentElement,{isManualPlacement:s}=r;return!n||!i?null:(0,qR.jsx)(zAe,{clientId:e,bounds:t,blockElement:n,rootBlockElement:i,onChange:o,isManualGrid:s&&window.__experimentalEnableGridInteractivity})}function zAe({clientId:e,bounds:t,blockElement:o,rootBlockElement:r,onChange:n,isManualGrid:i}){let[s,a]=(0,X_.useState)(null),[c,u]=(0,X_.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,X_.useEffect)(()=>{let h=new window.ResizeObserver(()=>{let p=o.getBoundingClientRect(),g=r.getBoundingClientRect(),b=p.top>g.top,v=p.bottom<g.bottom,k=p.left>g.left,y=p.right<g.right;u({top:(i||!v)&&b,bottom:v,left:(i||!y)&&k,right:y})});return h.observe(o),()=>h.disconnect()},[o,r,i]);let d={right:"left",left:"right"},f={top:"flex-end",bottom:"flex-start"},m={display:"flex",justifyContent:"center",alignItems:"center",...d[s]&&{justifyContent:d[s]},...f[s]&&{alignItems:f[s]}};return(0,qR.jsx)(Hi,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:m,children:(0,qR.jsx)(Yfe.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:c.bottom,bottomLeft:!1,bottomRight:!1,left:c.left,right:c.right,top:c.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:h,pointerId:p})=>{h.setPointerCapture(p)},onResizeStart:(h,p)=>{a(p)},onResizeStop:(h,p,g)=>{let b=parseFloat(Bo(r,"column-gap")),v=parseFloat(Bo(r,"row-gap")),k=Y_(Bo(r,"grid-template-columns"),b),y=Y_(Bo(r,"grid-template-rows"),v),S=new window.DOMRect(o.offsetLeft+g.offsetLeft,o.offsetTop+g.offsetTop,g.offsetWidth,g.offsetHeight),x=zc(k,S.left)+1,C=zc(y,S.top)+1,B=zc(k,S.right,"end")+1,I=zc(y,S.bottom,"end")+1;n({columnSpan:B-x+1,rowSpan:I-C+1,columnStart:i?x:void 0,rowStart:i?C:void 0})}})})}var ms=l(N(),1),Ok=l(A(),1);var qfe=l(F(),1),Zfe=l(Z(),1);var Nr=l(w(),1);function Vz({layout:e,parentLayout:t,onChange:o,gridClientId:r,blockClientId:n}){let{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,qfe.useDispatch)(_),a=e?.columnStart??1,c=e?.rowStart??1,u=e?.columnSpan??1,d=e?.rowSpan??1,f=a+u-1,m=c+d-1,h=t?.columnCount,p=t?.rowCount,g=np(r,h);return(0,Nr.jsx)(Mt,{group:"parent",children:(0,Nr.jsxs)(Ok.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,Nr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,Nr.jsx)(Q_,{icon:(0,ms.isRTL)()?Vo:Mr,label:(0,ms.__)("Move left"),description:(0,ms.__)("Move left"),isDisabled:a<=1,onClick:()=>{o({columnStart:a-1}),s(),i([n],r,r,g(a-1,c))}})}),(0,Nr.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,Nr.jsx)(Q_,{className:"is-up-button",icon:xf,label:(0,ms.__)("Move up"),description:(0,ms.__)("Move up"),isDisabled:c<=1,onClick:()=>{o({rowStart:c-1}),s(),i([n],r,r,g(a,c-1))}}),(0,Nr.jsx)(Q_,{className:"is-down-button",icon:zn,label:(0,ms.__)("Move down"),description:(0,ms.__)("Move down"),isDisabled:p&&m>=p,onClick:()=>{o({rowStart:c+1}),s(),i([n],r,r,g(a,c+1))}})]}),(0,Nr.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,Nr.jsx)(Q_,{icon:(0,ms.isRTL)()?Mr:Vo,label:(0,ms.__)("Move right"),description:(0,ms.__)("Move right"),isDisabled:h&&f>=h,onClick:()=>{o({columnStart:a+1}),s(),i([n],r,r,g(a+1,c))}})})]})})}function Q_({className:e,icon:t,label:o,isDisabled:r,onClick:n,description:i}){let a=`block-editor-grid-item-mover-button__description-${(0,Zfe.useInstanceId)(Q_)}`;return(0,Nr.jsxs)(Nr.Fragment,{children:[(0,Nr.jsx)(Ok.ToolbarButton,{className:V("block-editor-grid-item-mover-button",e),icon:t,label:o,"aria-describedby":a,onClick:r?null:n,disabled:r,accessibleWhenDisabled:!0}),(0,Nr.jsx)(Ok.VisuallyHidden,{id:a,children:i})]})}var J_=l(F(),1),XR=l(R(),1),ZR=l(Z(),1);function Fz({clientId:e}){let{gridLayout:t,blockOrder:o,selectedBlockLayout:r}=(0,J_.useSelect)(m=>{let{getBlockAttributes:h,getBlockOrder:p}=m(_),g=m(_).getSelectedBlock();return{gridLayout:h(e).layout??{},blockOrder:p(e),selectedBlockLayout:g?.attributes.style?.layout}},[e]),{getBlockAttributes:n,getBlockRootClientId:i}=(0,J_.useSelect)(_),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:a}=(0,J_.useDispatch)(_),c=(0,XR.useMemo)(()=>r?new aa(r):null,[r]),u=(0,ZR.usePrevious)(c),d=(0,ZR.usePrevious)(t.isManualPlacement),f=(0,ZR.usePrevious)(o);(0,XR.useEffect)(()=>{let m={};if(t.isManualPlacement){let h=[];for(let g of o){let{columnStart:b,rowStart:v,columnSpan:k=1,rowSpan:y=1}=n(g).style?.layout??{};!b||!v||h.push(new aa({columnStart:b,rowStart:v,columnSpan:k,rowSpan:y}))}for(let g of o){let b=n(g),{columnStart:v,rowStart:k,columnSpan:y=1,rowSpan:S=1}=b.style?.layout??{};if(v&&k)continue;let[x,C]=jAe(h,t.columnCount,y,S,u?.columnEnd,u?.rowEnd);h.push(new aa({columnStart:x,rowStart:C,columnSpan:y,rowSpan:S})),m[g]={style:{...b.style,layout:{...b.style?.layout,columnStart:x,rowStart:C}}}}let p=Math.max(...h.map(g=>g.rowEnd));(!t.rowCount||t.rowCount<p)&&(m[e]={layout:{...t,rowCount:p}});for(let g of f??[])if(!o.includes(g)){let b=i(g);if(b===null||n(b)?.layout?.type==="grid")continue;let k=n(g),{columnStart:y,rowStart:S,columnSpan:x,rowSpan:C,...B}=k.style?.layout??{};if(y||S||x||C){let I=Object.keys(B).length===0;m[g]=pe(k,["style","layout"],I?void 0:B)}}}else{if(d===!0)for(let h of o){let p=n(h),{columnStart:g,rowStart:b,...v}=p.style?.layout??{};if(g||b){let k=Object.keys(v).length===0;m[h]=pe(p,["style","layout"],k?void 0:v)}}t.rowCount&&(m[e]={layout:{...t,rowCount:void 0}})}Object.keys(m).length&&(a(),s(Object.keys(m),m,!0))},[e,t,f,o,u,d,a,n,i,s])}function jAe(e,t,o,r,n=1,i=1){for(let s=i;;s++)for(let a=s===i?n:1;a<=t;a++){let c=new aa({columnStart:a,rowStart:s,columnSpan:o,rowSpan:r});if(!e.some(u=>u.intersectsRect(c)))return[a,s]}}var jc=l(w(),1),UAe={};function HAe({style:e}){let t=(0,zz.useSelect)(g=>!g(_).getSettings().disableLayoutStyles),o=e?.layout??{},{selfStretch:r,flexSize:n,columnStart:i,rowStart:s,columnSpan:a,rowSpan:c}=o,u=Uf()||{},{columnCount:d,minimumColumnWidth:f}=u,m=(0,Xfe.useInstanceId)(UAe),h=`.wp-container-content-${m}`,p="";if(t&&(r==="fixed"&&n?p=`${h} {
				flex-basis: ${n};
				box-sizing: border-box;
			}`:r==="fill"?p=`${h} {
				flex-grow: 1;
			}`:i&&a?p=`${h} {
				grid-column: ${i} / span ${a};
			}`:i?p=`${h} {
				grid-column: ${i};
			}`:a&&(p=`${h} {
				grid-column: span ${a};
			}`),s&&c?p+=`${h} {
				grid-row: ${s} / span ${c};
			}`:s?p+=`${h} {
				grid-row: ${s};
			}`:c&&(p+=`${h} {
				grid-row: span ${c};
			}`),(a||i)&&(f||!d))){let g=parseFloat(f);isNaN(g)&&(g=12);let b=f?.replace(g,"");["px","rem","em"].includes(b)||(b="rem");let v=2;a&&i?v=a+i-1:a?v=a:v=i;let k=b==="px"?24:1.5,y=v*g+(v-1)*k,S=g*2+k-1,x=a&&a>1?"1/-1":"auto";p+=`@container (max-width: ${Math.max(y,S)}${b}) {
				${h} {
					grid-column: ${x};
					grid-row: auto;
				}
			}`}if(Qn({css:p}),!!p)return{className:`wp-container-content-${m}`}}function GAe({clientId:e,style:t,setAttributes:o}){let r=Uf()||{},{type:n="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=r;return n!=="grid"?null:(0,jc.jsx)(WAe,{clientId:e,style:t,setAttributes:o,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:r})}function WAe({clientId:e,style:t,setAttributes:o,allowSizingOnChildren:r,isManualPlacement:n,parentLayout:i}){let{rootClientId:s,isVisible:a,parentBlockVisibility:c,blockBlockVisibility:u,deviceType:d,isChildBlockAGrid:f}=(0,zz.useSelect)(y=>{let{getBlockRootClientId:S,getBlockEditingMode:x,getTemplateLock:C,getBlockAttributes:B,getSettings:I}=y(_),P=S(e);if(C(P)||x(P)!=="default")return{rootClientId:P,isVisible:!1};let E=B(P),L=B(e),T=I();return{rootClientId:P,isVisible:!0,parentBlockVisibility:E?.metadata?.blockVisibility,blockBlockVisibility:L?.metadata?.blockVisibility,deviceType:T?.[wi]?.toLowerCase()||Et.desktop.value,isChildBlockAGrid:L?.layout?.type==="grid"}},[e]),{isBlockCurrentlyHidden:m}=Mi({blockVisibility:c,deviceType:d}),{isBlockCurrentlyHidden:h}=Mi({blockVisibility:u,deviceType:d}),[p,g]=(0,Qfe.useState)(),b=f?e:void 0;if(!a||m)return null;let v=r&&!h;function k(y){o({style:{...t,layout:{...t?.layout,...y}}})}return(0,jc.jsxs)(jc.Fragment,{children:[(0,jc.jsx)(Z_,{clientId:s,contentRef:g,parentLayout:i,childGridClientId:b}),v&&(0,jc.jsx)(Dz,{clientId:e,bounds:p,onChange:k,parentLayout:i}),n&&window.__experimentalEnableGridInteractivity&&(0,jc.jsx)(Vz,{layout:t?.layout,parentLayout:i,onChange:k,gridClientId:s,blockClientId:e})]})}var jz={useBlockProps:HAe,edit:GAe,attributeKeys:["style"],hasSupport(){return!0}};var Hz=l(ut(),1),Uz=l($(),1),Jfe="metadata";function $Ae(e){return e?.attributes?.[Jfe]?.type||(e.attributes={...e.attributes,[Jfe]:{type:"object"}}),e}function KAe(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,Uz.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=n.name),n.blockVisibility!==void 0&&!e.attributes?.metadata?.blockVisibility&&(0,Uz.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,Hz.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",$Ae);(0,Hz.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",KAe);var Gz=l(N(),1),QR=l(R(),1),JR=l(A(),1),eO=l($(),1),Ak=l(F(),1);var ff=l(w(),1),YAe={};function qAe({name:e,clientId:t,metadata:{ignoredHookedBlocks:o=[]}={}}){let r=(0,Ak.useSelect)(h=>h(eO.store).getBlockTypes(),[]),n=(0,QR.useMemo)(()=>r?.filter(({name:h,blockHooks:p})=>p&&e in p||o.includes(h)),[r,e,o]),i=(0,Ak.useSelect)(h=>{let{getBlocks:p,getBlockRootClientId:g,getGlobalBlockCount:b}=h(_),v=g(t),k=n.reduce((y,S)=>{if(b(S.name)===0)return y;let x=S?.blockHooks?.[e],C;switch(x){case"before":case"after":C=p(v);break;case"first_child":case"last_child":C=p(t);break;case void 0:C=[...p(v),...p(t)];break}let B=C?.find(I=>I.name===S.name);return B?{...y,[S.name]:B.clientId}:y},{});return Object.values(k).length>0?k:YAe},[n,e,t]),{getBlockIndex:s,getBlockCount:a,getBlockRootClientId:c}=(0,Ak.useSelect)(_),{insertBlock:u,removeBlock:d}=(0,Ak.useDispatch)(_);if(!n.length)return null;let f=n.reduce((h,p)=>{let[g]=p.name.split("/");return h[g]||(h[g]=[]),h[g].push(p),h},{}),m=(h,p)=>{let g=s(t),b=a(t),v=c(t);switch(p){case"before":case"after":u(h,p==="after"?g+1:g,v,!1);break;case"first_child":case"last_child":u(h,p==="first_child"?0:b,t,!1);break;case void 0:u(h,g+1,v,!1);break}};return(0,ff.jsx)(fe,{children:(0,ff.jsxs)(JR.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,Gz.__)("Plugins"),initialOpen:!0,children:[(0,ff.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,Gz.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(f).map(h=>(0,ff.jsxs)(QR.Fragment,{children:[(0,ff.jsx)("h3",{children:h}),f[h].map(p=>{let g=p.name in i;return(0,ff.jsx)(JR.ToggleControl,{checked:g,label:p.title,onChange:()=>{if(!g){let b=p.blockHooks[e];m((0,eO.createBlock)(p.name),b);return}d(i[p.name],!1)}},p.title)})]},h))]})})}var eme={edit:qAe,attributeKeys:["metadata"],hasSupport(){return!0}};var Wz=l(N(),1),tme=l($(),1),Lk=l(A(),1),ome=l(F(),1),rme=l(R(),1),nme=l(Z(),1);var mf=l(w(),1),ZAe=()=>(0,nme.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},XAe=({name:e,metadata:t})=>{let o=(0,rme.useContext)(xr),{removeAllBlockBindings:r}=El(),n=ZAe(),{bindableAttributes:i,hasCompatibleFields:s}=(0,ome.useSelect)(c=>{let{__experimentalBlockBindingsSupportedAttributes:u}=c(_).getSettings(),{getAllBlockBindingsSources:d,getBlockBindingsSourceFieldsList:f}=M(c(tme.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,mf.jsx)(fe,{group:"bindings",children:(0,mf.jsxs)(Lk.__experimentalToolsPanel,{label:(0,Wz.__)("Attributes"),resetAll:()=>{r()},dropdownMenuProps:n,className:"block-editor-bindings__panel",children:[(0,mf.jsx)(Lk.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:i.map(c=>(0,mf.jsx)($v,{attribute:c,blockName:e,binding:a?.[c]},c))}),(0,mf.jsx)(Lk.__experimentalText,{as:"div",variant:"muted",children:(0,mf.jsx)("p",{children:(0,Wz.__)("Attributes connected to custom fields or other dynamic data.")})})]})})},ime={edit:XAe,attributeKeys:["metadata"],hasSupport(e){return!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)}};var sme=l(N(),1),ame=l(A(),1),rO=l(F(),1),e0=l($(),1),lme=l(R(),1);var tO=l(F(),1);function oO(e){let{isOpened:t,expandRevision:o}=(0,tO.useSelect)(i=>{let{isListViewPanelOpened:s,getListViewExpandRevision:a}=M(i(_));return{isOpened:s(e),expandRevision:a()}},[e]),{__unstableToggleListViewPanel:r}=(0,tO.useDispatch)(_);return{isOpened:t,expandRevision:o,handleToggle:i=>{r(e,i)}}}var Nk=l(w(),1),QAe="listView";function cme(e){return(0,e0.hasBlockSupport)(e,QAe)}function JAe({clientId:e,name:t}){let{isSelectionWithinCurrentSection:o}=(0,lme.useContext)(ur),{isOpened:r,expandRevision:n,handleToggle:i}=oO(e),{openListViewContentPanel:s}=M((0,rO.useDispatch)(_)),a=cme(t),{hasChildren:c,isNestedListView:u}=(0,rO.useSelect)(h=>{let{getBlockCount:p,getBlockParents:g,getBlockName:b}=h(_),k=g(e,!1).find(y=>{let S=b(y);return S==="core/navigation"||(0,e0.hasBlockSupport)(S,"listView")});return{hasChildren:!!p(e),isNestedListView:k}},[e]),f=(0,e0.getBlockType)(t)?.title||t;return!a||u?null:(0,Nk.jsx)(Sm,{group:"list",children:(0,Nk.jsxs)(ame.PanelBody,{title:o?f:void 0,opened:r,onToggle:i,children:[!c&&(0,Nk.jsx)("p",{className:"block-editor-block-inspector__no-blocks",children:(0,sme.__)("No items yet.")}),(0,Nk.jsx)(NS,{rootClientId:e,isExpanded:!0,description:f,showAppender:!0,onSelect:s},`${e}-${n}`)]})})}var ume={edit:JAe,hasSupport:cme,attributeKeys:[],supportsPatternEditing:!0};var dme=l(ut(),1),fme=l($(),1);function eLe(e){return e.__experimentalLabel||(0,fme.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,dme.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",eLe);var mme=l(Z(),1),pme=l(ut(),1),hme=l(F(),1);var ps=l(w(),1);function tLe(e){Fz(e)}function oLe({clientId:e,layout:t}){let{isVisible:o,blockVisibility:r,deviceType:n,isAnyAncestorHidden:i}=(0,hme.useSelect)(a=>{let{isBlockSelected:c,hasSelectedInnerBlock:u,isDraggingBlocks:d,getTemplateLock:f,getBlockEditingMode:m,getBlockAttributes:h,getSettings:p}=a(_);if(!d()&&!c(e)||f(e)||m(e)!=="default"||u(e))return{isVisible:!1};let{isBlockParentHiddenAtViewport:g}=M(a(_)),b=h(e),k=p()?.[wi]?.toLowerCase()||Et.desktop.value;return{isVisible:!0,blockVisibility:b?.metadata?.blockVisibility,deviceType:k,isAnyAncestorHidden:g(e,k)}},[e]),{isBlockCurrentlyHidden:s}=Mi({blockVisibility:r,deviceType:n});return(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(tLe,{clientId:e}),o&&!s&&!i&&(0,ps.jsx)(Z_,{clientId:e,parentLayout:t})]})}var rLe=(0,mme.createHigherOrderComponent)(e=>function(o){return o.attributes.layout?.type!=="grid"?(0,ps.jsx)(e,{...o},"edit"):(0,ps.jsxs)(ps.Fragment,{children:[(0,ps.jsx)(oLe,{clientId:o.clientId,layout:o.attributes.layout}),(0,ps.jsx)(e,{...o},"edit")]})},"addGridVisualizerToBlockEdit");(0,pme.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",rLe);var t0=l($(),1),bme=l(A(),1),kme=l(F(),1);var iO=l(R(),1),vme=l(N(),1);function gme(e){let t=[],o=[];return Object.entries(e).forEach(([r,n])=>{if(!n.autoGenerateControl)return;let i=nLe(r,n);i&&(t.push(i),o.push(r))}),{fields:t,form:{fields:o}}}function nLe(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 nO=l(w(),1);function iLe(e){return e?Object.values(e).some(t=>t?.autoGenerateControl):!1}function sLe({name:e,clientId:t,setAttributes:o}){let r=ao(),n=(0,iO.useContext)(xr),i=(0,kme.useSelect)(u=>{let d=u(_).getBlockAttributes(t);if(!d?.metadata?.bindings)return d;let{getBlockBindingsSource:f}=M(u(t0.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,t0.getBlockType)(e),{fields:a,form:c}=(0,iO.useMemo)(()=>s?.attributes?gme(s.attributes):{fields:[],form:{fields:[]}},[s?.attributes]);return r!=="default"||!a||a.length===0?null:(0,nO.jsx)(fe,{children:(0,nO.jsx)(bme.PanelBody,{title:(0,vme.__)("Settings"),children:(0,nO.jsx)(D_,{data:i,fields:a,form:c,onChange:o})})})}var yme={edit:sLe,attributeKeys:[],hasSupport(e){let t=(0,t0.getBlockType)(e);return iLe(t?.attributes)}};function $z(e){let{style:t}=e,o=t?.dimensions||{},r=bi({dimensions:o});return{className:o.aspectRatio?"has-aspect-ratio":void 0,style:r}}function sO(e){let t=e.style?.border||{};return{className:YF(e)||void 0,style:bi({border:t})}}function Kz(e){let{colors:t}=wd(),o=sO(e),{borderColor:r}=e;if(r){let n=lp({colors:t,namedColor:r});o.style.borderColor=n.color}return o}function Yz(e){let t=e.style?.shadow||"";return{style:bi({shadow:t})}}var qz=l(R(),1);function aO(e){let{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=_i("background-color",t),s=_i("color",o),a=th(r),c=a||n?.color?.gradient,u=V(s,a,{[i]:!c&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":n?.elements?.link?.color}),d=n?.color||{},f=bi({color:d});return{className:u||void 0,style:f}}function Zz(e){let{backgroundColor:t,textColor:o,gradient:r}=e,[n,i,s,a,c,u]=me("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),d=(0,qz.useMemo)(()=>[...n||[],...i||[],...s||[]],[n,i,s]),f=(0,qz.useMemo)(()=>[...a||[],...c||[],...u||[]],[a,c,u]),m=aO(e);if(t){let h=da(d,t);m.style.backgroundColor=h.color}if(r&&(m.style.background=Gw(f,r)),o){let h=da(d,o);m.style.color=h.color}return m}function Xz(e){let{style:t}=e,o=t?.spacing||{};return{style:bi({spacing:o})}}var Sme=l(A(),1);var{kebabCase:aLe}=M(Sme.privateApis);function Qz(e,t){let o=e?.style?.typography||{};o={...o,fontSize:ec({size:e?.style?.typography?.fontSize},t)};let r=bi({typography:o}),n=e?.fontFamily?`has-${aLe(e.fontFamily)}-font-family`:"",i=e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"";return{className:V(n,i,hu(e?.fontSize)),style:r}}var lO=l(R(),1);function Jz(e){let[t,o]=(0,lO.useState)(e);return(0,lO.useEffect)(()=>{e&&o(e)},[e]),t}dle([w2,NR,B4,hz,jR,WR,Pz,DR,uV,Hfe,eme,ime,jz,Ale,qde,ume,yme].filter(Boolean));fle([w2,NR,yae,jR,t4,Tfe,Pz,gz,kz,DR,qF,WR,uV,ZX,jz]);mle([w2,NR,B4,Dle,hz,qF,WR,DR,t4,jR,gz,kz]);var _me={button:"wp-element-button",caption:"wp-element-caption"},lLe=e=>_me[e]?_me[e]:"";var xme=()=>"";var Mk=l(R(),1),o0=l($(),1),t6=l(dr(),1);var wme=l(w(),1);function o6(e,t,o){if(e==null||e===!1)return;if(Array.isArray(e))return e6(e,t,o);switch(typeof e){case"string":case"number":return}let{type:r,props:n}=e;switch(r){case Mk.StrictMode:case Mk.Fragment:return e6(n.children,t,o);case Mk.RawHTML:return;case tS.Content:return Cme(t,o);case o_:t.push(n.value);return}switch(typeof r){case"string":return typeof n.children<"u"?e6(n.children,t,o):void 0;case"function":let i=r.prototype&&typeof r.prototype.render=="function"?new r(n).render():r(n);return o6(i,t,o)}}function e6(e,...t){e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++)o6(e[o],...t)}function Cme(e,t){for(let o=0;o<t.length;o++){let{name:r,attributes:n,innerBlocks:i}=t[o],s=(0,o0.getSaveElement)(r,n,(0,wme.jsx)(tS.Content,{}));o6(s,e,i)}}function Bme(e=[]){o0.__unstableGetBlockProps.skipFilters=!0;let t=[];return Cme(t,e),o0.__unstableGetBlockProps.skipFilters=!1,t.map(o=>o instanceof t6.RichTextData?o:t6.RichTextData.fromHTMLString(o))}var Eme=l(A(),1);var r6=l(w(),1);function Tme({clientId:e,resizableBoxProps:t,...o}){return(0,r6.jsx)(Hi,{clientId:e,__unstablePopoverSlot:"block-toolbar",...o,children:(0,r6.jsx)(Eme.ResizableBox,{...t})})}var n0=l(R(),1),cO=l(F(),1),la=l(A(),1),r0=l(N(),1);var hs=l(w(),1);function Ime({rules:e}){let[t,o]=(0,n0.useState)(!1),{clientIds:r,selectPrevious:n,message:i}=(0,cO.useSelect)(p=>M(p(_)).getRemovalPromptData()),{clearBlockRemovalPrompt:s,setBlockRemovalRules:a,privateRemoveBlocks:c}=M((0,cO.useDispatch)(_));if((0,n0.useEffect)(()=>(a(e),()=>{a()}),[e,a]),(0,n0.useEffect)(()=>{o(!1)},[r]),!i)return;let u=typeof i=="object"&&i!==null,d=u?i.description:i,f=u&&i.requireConfirmation,m=f&&!t,h=()=>{c(r,n,!0),s()};return(0,hs.jsx)(la.Modal,{title:(0,r0.__)("Confirm deletion"),onRequestClose:s,size:"medium",children:(0,hs.jsxs)(la.__experimentalVStack,{spacing:4,children:[(0,hs.jsxs)("div",{children:[(0,hs.jsx)("p",{children:d}),u&&(i.warning||i.subtext)&&(0,hs.jsxs)("p",{children:[i.warning&&(0,hs.jsx)("strong",{children:i.warning}),i.warning&&i.subtext&&" ",i.subtext]})]}),f&&(0,hs.jsx)(la.CheckboxControl,{label:(0,r0.__)("I understand the consequences"),checked:t,onChange:o}),(0,hs.jsxs)(la.__experimentalHStack,{justify:"right",children:[(0,hs.jsx)(la.Button,{variant:"tertiary",onClick:s,__next40pxDefaultSize:!0,children:(0,r0.__)("Cancel")}),(0,hs.jsx)(la.Button,{variant:"primary",onClick:h,disabled:m,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,r0.__)("Delete")})]})]})})}var n6=l(R(),1);var Dk=l(A(),1),Rme=l(R(),1),Vn=l(N(),1),uO=l(w(),1),Pme=[{value:"fill",label:(0,Vn._x)("Fill","Scale option for dimensions control"),help:(0,Vn.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,Vn._x)("Contain","Scale option for dimensions control"),help:(0,Vn.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,Vn._x)("Cover","Scale option for dimensions control"),help:(0,Vn.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,Vn._x)("None","Scale option for dimensions control"),help:(0,Vn.__)("Do not adjust the sizing of the content. Content that is too large will be clipped, and content that is too small will have additional padding.")},{value:"scale-down",label:(0,Vn._x)("Scale down","Scale option for dimensions control"),help:(0,Vn.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function Ome({panelId:e,value:t,onChange:o,options:r=Pme,defaultValue:n=Pme[0].value,isShownByDefault:i=!0}){let s=t??"fill",a=(0,Rme.useMemo)(()=>r.reduce((c,u)=>(c[u.value]=u.help,c),{}),[r]);return(0,uO.jsx)(Dk.__experimentalToolsPanelItem,{label:(0,Vn._x)("Scale","Image scaling options"),isShownByDefault:i,hasValue:()=>s!==n,onDeselect:()=>o(n),panelId:e,children:(0,uO.jsx)(Dk.__experimentalToggleGroupControl,{label:(0,Vn._x)("Scale","Image scaling options"),isBlock:!0,help:a[s],value:s,onChange:o,size:"__unstable-large",children:r.map(c=>(0,uO.jsx)(Dk.__experimentalToggleGroupControlOption,{...c},c.value))})})}var Vk=l(A(),1),wp=l(N(),1),Uc=l(w(),1);function Ame({panelId:e,value:t={},onChange:o=()=>{},units:r,isShownByDefault:n=!0}){let i=t.width==="auto"?"":t.width??"",s=t.height==="auto"?"":t.height??"",a=c=>u=>{let d={...t};u?d[c]=u:delete d[c],o(d)};return(0,Uc.jsxs)(Uc.Fragment,{children:[(0,Uc.jsx)(Vk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,wp.__)("Width"),isShownByDefault:n,hasValue:()=>i!=="",onDeselect:a("width"),panelId:e,children:(0,Uc.jsx)(Vk.__experimentalUnitControl,{label:(0,wp.__)("Width"),placeholder:(0,wp.__)("Auto"),labelPosition:"top",units:r,min:0,value:i,onChange:a("width"),size:"__unstable-large"})}),(0,Uc.jsx)(Vk.__experimentalToolsPanelItem,{style:{gridColumn:"span 1"},label:(0,wp.__)("Height"),isShownByDefault:n,hasValue:()=>s!=="",onDeselect:a("height"),panelId:e,children:(0,Uc.jsx)(Vk.__experimentalUnitControl,{label:(0,wp.__)("Height"),placeholder:(0,wp.__)("Auto"),labelPosition:"top",units:r,min:0,value:s,onChange:a("height"),size:"__unstable-large"})})]})}var pf=l(w(),1);function cLe({panelId:e,value:t={},onChange:o=()=>{},aspectRatioOptions:r,defaultAspectRatio:n="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:a,tools:c=["aspectRatio","widthHeight","scale"]}){let u=t.width===void 0||t.width==="auto"?null:t.width,d=t.height===void 0||t.height==="auto"?null:t.height,f=t.aspectRatio===void 0||t.aspectRatio==="auto"?null:t.aspectRatio,m=t.scale===void 0||t.scale==="fill"?null:t.scale,[h,p]=(0,n6.useState)(m),[g,b]=(0,n6.useState)(f),v=u&&d?"custom":g,k=f||u&&d;return(0,pf.jsxs)(pf.Fragment,{children:[c.includes("aspectRatio")&&(0,pf.jsx)(NP,{panelId:e,options:r,defaultValue:n,value:v,onChange:y=>{let S={...t};y=y==="auto"?null:y,b(y),y?S.aspectRatio=y:delete S.aspectRatio,y?h?S.scale=h:(S.scale=s,p(s)):delete S.scale,y!=="custom"&&u&&d&&delete S.height,o(S)}}),c.includes("widthHeight")&&(0,pf.jsx)(Ame,{panelId:e,units:a,value:{width:u,height:d},onChange:({width:y,height:S})=>{let x={...t};y=y==="auto"?null:y,S=S==="auto"?null:S,y?x.width=y:delete x.width,S?x.height=S:delete x.height,y&&S?delete x.aspectRatio:g&&(x.aspectRatio=g),!g&&!!y!=!!S?delete x.scale:h?x.scale=h:(x.scale=s,p(s)),o(x)}}),c.includes("scale")&&k&&(0,pf.jsx)(Ome,{panelId:e,options:i,defaultValue:s,value:h,onChange:y=>{let S={...t};y=y==="fill"?null:y,p(y),y?S.scale=y:delete S.scale,o(S)}})]})}var Lme=cLe;var dO=l(A(),1),Hc=l(N(),1),i6=l(w(),1),Nme=[{label:(0,Hc._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,Hc._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,Hc._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,Hc._x)("Full Size","Image size option for resolution control"),value:"full"}];function Mme({panelId:e,value:t,onChange:o,options:r=Nme,defaultValue:n=Nme[0].value,isShownByDefault:i=!0,resetAllFilter:s}){let a=t??n;return(0,i6.jsx)(dO.__experimentalToolsPanelItem,{hasValue:()=>a!==n,label:(0,Hc.__)("Resolution"),onDeselect:()=>o(n),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,i6.jsx)(dO.SelectControl,{label:(0,Hc.__)("Resolution"),value:a,options:r,onChange:o,help:(0,Hc.__)("Select the size of the source image."),size:"__unstable-large"})})}var Cp=l(N(),1),Fk=l(A(),1),Vme=l(F(),1);var ca=l(N(),1),Dme={a:(0,ca.__)("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,ca.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,ca.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,ca.__)("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,ca.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,ca.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,ca.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,ca.__)("The <main> element should be used for the primary content of your document only."),nav:(0,ca.__)("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,ca.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};var i0=l(w(),1);function Fme({tagName:e,onChange:t,clientId:o,options:r=[{label:(0,Cp.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]}){let n=!!o&&r.some(a=>a.value==="main"),i=(0,Vme.useSelect)(a=>{if(!n)return!1;let{getClientIdsWithDescendants:c,getBlockAttributes:u}=a(_);return c().some(d=>d===o?!1:u(d)?.tagName==="main")},[o,n]),s=r.map(a=>a.value==="main"&&i&&e!=="main"?{...a,disabled:!0,label:(0,Cp.sprintf)((0,Cp.__)("%s (Already in use)"),a.label)}:a);return(0,i0.jsxs)(Fk.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,i0.jsx)(Fk.SelectControl,{__next40pxDefaultSize:!0,label:(0,Cp.__)("HTML element"),options:s,value:e,onChange:t,help:Dme[e]}),e==="main"&&i&&(0,i0.jsx)(Fk.Notice,{status:"warning",isDismissible:!1,children:(0,Cp.__)("Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element.")})]})}var gs=l(A(),1),zk=l(R(),1),fO=l(N(),1);var Fn=l(A(),1);var zme=l(Fe(),1);var vi=l(w(),1),{Badge:uLe}=M(Fn.privateApis);function jme({title:e,url:t,image:o,badges:r}){return(0,vi.jsxs)(Fn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,vi.jsx)(Fn.FlexItem,{className:"link-preview-button__content",children:(0,vi.jsxs)(Fn.__experimentalHStack,{alignment:"top",children:[o&&(0,vi.jsx)(Fn.FlexItem,{className:"link-preview-button__image-container",children:(0,vi.jsx)("img",{className:"link-preview-button__image",src:o,alt:""})}),(0,vi.jsxs)(Fn.__experimentalVStack,{className:"link-preview-button__details",alignment:"topLeft",children:[(0,vi.jsx)(Fn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__title",children:(0,zme.__unstableStripHTML)(e)}),t&&(0,vi.jsx)(Fn.__experimentalTruncate,{numberOfLines:1,className:"link-preview-button__hint",children:t}),r&&r.length>0&&(0,vi.jsx)(Fn.__experimentalHStack,{className:"link-preview-button__badges",alignment:"left",children:r.map(n=>(0,vi.jsx)(uLe,{intent:n.intent,children:n.label},`${n.label}|${n.intent}`))})]})]})}),(0,vi.jsx)(we,{icon:zn,className:"link-preview-button__icon"})]})}var yi=l(w(),1);function s6({preview:e,onSelect:t,suggestionsQuery:o,label:r,help:n}){let[i,s]=(0,zk.useState)(!1),a=(0,zk.useId)(),c=`link-picker-title-${a}`,u=`link-picker-description-${a}`,d=(0,zk.useRef)(null),{baseControlProps:f,controlProps:m}=(0,gs.useBaseControlProps)({help:n}),h=p=>{if(s(!1),p){let g={url:p.url,kind:p.kind,type:p.type,id:p.id,title:p.title};t(g)}};return(0,yi.jsxs)(gs.BaseControl,{...f,children:[(0,yi.jsx)(gs.BaseControl.VisualLabel,{children:r}),(0,yi.jsxs)(gs.Button,{ref:d,onClick:()=>s(!i),"aria-haspopup":"dialog","aria-expanded":i,"aria-describedby":m["aria-describedby"],variant:"secondary",__next40pxDefaultSize:!0,className:"link-preview-button",children:[r&&(0,yi.jsxs)(gs.VisuallyHidden,{children:[r,":"]}),(0,yi.jsx)(jme,{title:e.title||(0,fO.__)("Add link"),url:e.url,image:e.image,badges:e.badges})]}),i&&(0,yi.jsx)(gs.Popover,{anchor:d.current,onClose:()=>s(!1),placement:"left-start",offset:36,shift:!0,children:(0,yi.jsxs)("div",{role:"dialog","aria-labelledby":c,"aria-describedby":u,children:[(0,yi.jsxs)(gs.VisuallyHidden,{children:[(0,yi.jsx)("h2",{id:c,children:(0,fO.__)("Select a link")}),(0,yi.jsx)("p",{id:u,children:(0,fO.__)("Search for and add a link to the navigation item.")})]}),(0,yi.jsx)(Pd,{value:null,onChange:h,suggestionsQuery:o,showInitialSuggestions:!0,forceIsEditingLink:!0,settings:[]})]})})]})}var a6={};T6(a6,{...WF,ExperimentalBlockCanvas:r3,BlockCanvasCover:xT,ExperimentalBlockEditorProvider:Ph,getDuotoneFilter:UR,getRichTextValues:Bme,PrivateQuickInserter:IB,extractWords:Yw,getNormalizedSearchTerms:Fv,normalizeString:Vv,PrivateListView:NS,ResizableBoxPopover:Tme,InspectorControlsLastItem:k2,useHasBlockToolbar:qE,cleanEmptyObject:Me,usePrivateStyleOverride:tc,BlockQuickNavigation:g2,LayoutStyle:pH,BlockManager:B2,BlockRemovalWarningModal:Ime,useLayoutClasses:YR,useLayoutStyles:Nz,DimensionsTool:Lme,ResolutionTool:Mme,TabbedSidebar:CB,TextAlignmentControl:PP,usesContextKey:vF,useFlashEditableBlocks:o1,HTMLElementControl:Fme,useZoomOut:Gy,globalStylesDataKey:xi,globalStylesLinksDataKey:y0,selectBlockPatternsKey:qc,requiresWrapperOnCopy:VD,PrivateRichText:r_,PrivateInserterLibrary:l4,reusableBlocksSelectKey:S0,PrivateBlockPopover:pm,PrivatePublishDateTimePicker:g4,useSpacingSizes:fP,useBlockDisplayTitle:zr,__unstableBlockStyleVariationOverridesWithConfig:UV,setBackgroundStyleDefaults:a2,sectionRootClientIdKey:Zc,CommentIconSlotFill:CE,CommentIconToolbarSlotFill:UE,mediaEditKey:_0,getMediaSelectKey:x0,deviceTypeKey:wi,isIsolatedEditorKey:Xc,isNavigationOverlayContextKey:w0,mediaUploadOnSuccessKey:C0,useBlockElement:Xe,useBlockElementRef:$f,LinkPicker:s6,useRemoteUrlData:MI,PrivateBlockContext:ur,useListViewPanelState:oO,isHashLink:gf,isRelativePath:bf});return qme(dLe);})();
/*! Bundled license information:

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

normalize-wheel/src/isEventSupported.js:
  (**
   * Checks if an event is supported in the current execution environment.
   *
   * NOTE: This will not work correctly for non-generic events such as `change`,
   * `reset`, `load`, `error`, and `select`.
   *
   * Borrows from Modernizr.
   *
   * @param {string} eventNameSuffix Event name, e.g. "click".
   * @param {?boolean} capture Check if the capture phase is supported.
   * @return {boolean} True if the event is supported.
   * @internal
   * @license Modernizr 3.0.0pre (Custom Build) | MIT
   *)
*/;
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/core-data.min.js?ver=89931f90e4df5eb5f8a3 
"use strict";var wp;(wp||={}).coreData=(()=>{var Nh=Object.create;var Bn=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var Bh=Object.getOwnPropertyNames;var jh=Object.getPrototypeOf,Fh=Object.prototype.hasOwnProperty;var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bt=(t,e)=>{for(var r in e)Bn(t,r,{get:e[r],enumerable:!0})},Hc=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Bh(e))!Fh.call(t,o)&&o!==r&&Bn(t,o,{get:()=>e[o],enumerable:!(n=Vh(e,o))||n.enumerable});return t};var w=(t,e,r)=>(r=t!=null?Nh(jh(t)):{},Hc(e||!t||!t.__esModule?Bn(r,"default",{value:t,enumerable:!0}):r,t)),Yh=t=>Hc(Bn({},"__esModule",{value:!0}),t);var W=z((m_,qc)=>{qc.exports=window.wp.data});var Qe=z((y_,Wc)=>{"use strict";Wc.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(o of e.entries())if(!r.has(o[0]))return!1;for(o of e.entries())if(!t(o[1],r.get(o[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(o of e.entries())if(!r.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(e[o]!==r[o])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var jn=z((E_,Jc)=>{Jc.exports=window.wp.compose});var Xc=z((w_,Qc)=>{Qc.exports=window.wp.undoManager});var sa=z((q_,oa)=>{"use strict";function Tt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tt=function(e){return typeof e}:Tt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tt(t)}function Wh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ra(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jh(t,e,r){return e&&ra(t.prototype,e),r&&ra(t,r),t}function na(t,e){var r=t._map,n=t._arrayTreeMap,o=t._objectTreeMap;if(r.has(e))return r.get(e);for(var s=Object.keys(e).sort(),i=Array.isArray(e)?n:o,c=0;c<s.length;c++){var a=s[c];if(i=i.get(a),i===void 0)return;var u=e[a];if(i=i.get(u),i===void 0)return}var l=i.get("_ekm_value");if(l)return r.delete(l[0]),l[0]=e,i.set("_ekm_value",l),r.set(e,l),l}var Qh=(function(){function t(e){if(Wh(this,t),this.clear(),e instanceof t){var r=[];e.forEach(function(o,s){r.push([s,o])}),e=r}if(e!=null)for(var n=0;n<e.length;n++)this.set(e[n][0],e[n][1])}return Jh(t,[{key:"set",value:function(r,n){if(r===null||Tt(r)!=="object")return this._map.set(r,n),this;for(var o=Object.keys(r).sort(),s=[r,n],i=Array.isArray(r)?this._arrayTreeMap:this._objectTreeMap,c=0;c<o.length;c++){var a=o[c];i.has(a)||i.set(a,new t),i=i.get(a);var u=r[a];i.has(u)||i.set(u,new t),i=i.get(u)}var l=i.get("_ekm_value");return l&&this._map.delete(l[0]),i.set("_ekm_value",s),this._map.set(r,s),this}},{key:"get",value:function(r){if(r===null||Tt(r)!=="object")return this._map.get(r);var n=na(this,r);if(n)return n[1]}},{key:"has",value:function(r){return r===null||Tt(r)!=="object"?this._map.has(r):na(this,r)!==void 0}},{key:"delete",value:function(r){return this.has(r)?(this.set(r,void 0),!0):!1}},{key:"forEach",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(s,i){i!==null&&Tt(i)==="object"&&(s=s[1]),r.call(o,s,i,n)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),t})();oa.exports=Qh});var Ze=z((W_,ia)=>{ia.exports=window.wp.url});var Ae=z((yS,ma)=>{ma.exports=window.wp.apiFetch});var nr=z((ES,ya)=>{ya.exports=window.wp.blocks});var _s=z((wS,Ea)=>{Ea.exports=window.wp.i18n});var Ai=z((ob,pu)=>{pu.exports=window.wp.privateApis});var Co=z((ab,_u)=>{_u.exports=window.wp.hooks});var Ar=z((gv,ed)=>{ed.exports=window.wp.blockEditor});var bn=z((Nv,gd)=>{gd.exports=window.wp.richText});var er=z((XC,pf)=>{pf.exports=window.wp.deprecated});var kc=z((xR,Of)=>{Of.exports=window.wp.htmlEntities});var We=z((XR,Qf)=>{Qf.exports=window.wp.element});var eh=z((eT,Zf)=>{Zf.exports=window.ReactJSXRuntime});var gh=z((ET,ph)=>{ph.exports=window.wp.warning});var p_={};bt(p_,{EntityProvider:()=>rh,__experimentalFetchLinkSuggestions:()=>Lf,__experimentalFetchUrlData:()=>Mf,__experimentalUseEntityRecord:()=>lh,__experimentalUseEntityRecords:()=>fh,__experimentalUseResourcePermissions:()=>_h,fetchBlockPatterns:()=>Uc,privateApis:()=>Lh,store:()=>q,useEntityBlockEditor:()=>Th,useEntityId:()=>Nr,useEntityProp:()=>xh,useEntityRecord:()=>Nc,useEntityRecords:()=>ss,useResourcePermissions:()=>wh});var ds=w(W(),1);var gc=w(Qe(),1),df=w(jn(),1),In=w(W(),1),ff=w(Xc(),1);var Zc=w(Qe(),1);function fs(t,e){if(!t)return e;let r=!1,n={};for(let o in e)(0,Zc.default)(t[o],e[o])?n[o]=t[o]:(r=!0,n[o]=e[o]);if(!r)return t;for(let o in t)n.hasOwnProperty(o)||(n[o]=t[o]);return n}function Gh(t){return typeof t=="string"?t.split(","):Array.isArray(t)?t:null}var ie=Gh;var $h=t=>e=>(r,n)=>r===void 0||t(n)?e(r,n):r,Br=$h;var zh=t=>(...e)=>async({resolveSelect:r})=>{await r[t](...e)},vt=zh;var Kh=t=>e=>(r={},n)=>{let o=n[t];if(o===void 0)return r;let s=e(r[o],n);return s===r[o]?r:{...r,[o]:s}},Fn=Kh;var Hh=t=>e=>(r,n)=>e(r,t(n)),jr=Hh;function qh(t){let e=new WeakMap;return r=>{let n;return e.has(r)?n=e.get(r):(n=t(r),r!==null&&typeof r=="object"&&e.set(r,n)),n}}var hs=qh;function ps(t,e){return(t.rawAttributes||[]).includes(e)}function Xe(t,e,r){if(!t||typeof t!="object")return t;let n=Array.isArray(e)?e:e.split(".");return n.reduce((o,s,i)=>(o[s]===void 0&&(Number.isInteger(n[i+1])?o[s]=[]:o[s]={}),i===n.length-1&&(o[s]=r),o[s]),t),t}function gs(t,e,r){if(!t||typeof t!="object"||typeof e!="string"&&!Array.isArray(e))return t;let n=Array.isArray(e)?e:e.split("."),o=t;return n.forEach(s=>{o=o?.[s]}),o!==void 0?o:r}function Fr(t){return/^\s*\d+\s*$/.test(t)}var Ct=["create","read","update","delete"];function Yr(t){let e={};if(!t)return e;let r={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(let[n,o]of Object.entries(r))e[n]=t.includes(o);return e}function Rt(t,e,r){return(typeof e=="object"?[t,e.kind,e.name,e.id]:[t,e,r]).filter(Boolean).join("/")}var Gr=Symbol("RECEIVE_INTERMEDIATE_RESULTS");function ms(t,e,r){return{type:"RECEIVE_ITEMS",items:t,persistedEdits:e,meta:r}}function ea(t,e,r,n=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(r)?r:[r],kind:t,name:e,invalidateCache:n}}function ta(t,e={},r,n){return{...ms(t,r,n),query:e}}var la=w(sa(),1),ua=w(W(),1);var ca=w(Ze(),1);function Xh(t){let e={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},r=Object.keys(t).sort();for(let n=0;n<r.length;n++){let o=r[n],s=t[o];switch(o){case"page":e[o]=Number(s);break;case"per_page":e.perPage=Number(s);break;case"context":e.context=s;break;default:o==="_fields"&&(e.fields=ie(s)??[],s=e.fields.join()),o==="include"&&(typeof s=="number"&&(s=s.toString()),e.include=(ie(s)??[]).map(Number),s=e.include.join()),e.stableKey+=(e.stableKey?"&":"")+(0,ca.addQueryArgs)("",{[o]:s}).slice(1)}}return e}var et=hs(Xh);var aa=new WeakMap;function Zh(t,e){let{stableKey:r,page:n,perPage:o,include:s,fields:i,context:c}=et(e),a;if(t.queries?.[c]?.[r]&&(a=t.queries[c][r].itemIds),!a)return null;let u=o===-1?0:(n-1)*o,l=o===-1?a.length:Math.min(u+o,a.length),d=[];for(let f=u;f<l;f++){let h=a[f];if(Array.isArray(s)&&!s.includes(h)||h===void 0)continue;if(!t.items[c]?.hasOwnProperty(h))return null;let p=t.items[c][h],g;if(Array.isArray(i)){g={};for(let m=0;m<i.length;m++){let y=i[m].split("."),E=p;y.forEach(_=>{E=E?.[_]}),Xe(g,y,E)}}else{if(!t.itemIsComplete[c]?.[h])return null;g=p}d.push(g)}return d}var ys=(0,ua.createSelector)((t,e={})=>{let r=aa.get(t);if(r){let o=r.get(e);if(o!==void 0)return o}else r=new la.default,aa.set(t,r);let n=Zh(t,e);return r.set(e,n),n});function Es(t,e={}){let{stableKey:r,context:n}=et(e);return t.queries?.[n]?.[r]?.meta?.totalItems??null}function da(t,e={}){let{stableKey:r,context:n}=et(e);return t.queries?.[n]?.[r]?.meta?.totalPages??null}var cf=w(W(),1),af=w(jn(),1);var tt=function(){return tt=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},tt.apply(this,arguments)};function fa(t){return t.toLowerCase()}var ep=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],tp=/[^A-Z0-9]+/gi;function Yn(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,n=r===void 0?ep:r,o=e.stripRegexp,s=o===void 0?tp:o,i=e.transform,c=i===void 0?fa:i,a=e.delimiter,u=a===void 0?" ":a,l=ha(ha(t,n,"$1\0$2"),s,"\0"),d=0,f=l.length;l.charAt(d)==="\0";)d++;for(;l.charAt(f-1)==="\0";)f--;return l.slice(d,f).split("\0").map(c).join(u)}function ha(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(n,o){return n.replace(o,r)},t)}function ws(t,e){var r=t.charAt(0),n=t.substr(1).toLowerCase();return e>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function $r(t,e){return e===void 0&&(e={}),Yn(t,tt({delimiter:"",transform:ws},e))}function rp(t,e){return e===0?t.toLowerCase():ws(t,e)}function Gn(t,e){return e===void 0&&(e={}),$r(t,tt({transform:rp},e))}function pa(t){return t.charAt(0).toUpperCase()+t.substr(1)}function np(t){return pa(t.toLowerCase())}function ga(t,e){return e===void 0&&(e={}),Yn(t,tt({delimiter:" ",transform:np},e))}var xn=w(Ae(),1),Ho=w(nr(),1),B=w(_s(),1);var Or=w(W(),1);var C={};bt(C,{AbsolutePosition:()=>so,AbstractConnector:()=>Xs,AbstractStruct:()=>br,AbstractType:()=>F,Array:()=>Ft,ContentAny:()=>ft,ContentBinary:()=>zt,ContentDeleted:()=>vr,ContentDoc:()=>Kt,ContentEmbed:()=>Ke,ContentFormat:()=>Y,ContentJSON:()=>gn,ContentString:()=>Te,ContentType:()=>we,Doc:()=>Me,GC:()=>oe,ID:()=>$e,Item:()=>k,Map:()=>Yt,PermanentUserData:()=>ei,RelativePosition:()=>_r,Skip:()=>X,Snapshot:()=>ln,Text:()=>Sr,Transaction:()=>co,UndoManager:()=>Vt,UpdateDecoderV1:()=>he,UpdateDecoderV2:()=>ae,UpdateEncoderV1:()=>Ne,UpdateEncoderV2:()=>ge,XmlElement:()=>$t,XmlFragment:()=>Gt,XmlHook:()=>pn,XmlText:()=>go,YArrayEvent:()=>uo,YEvent:()=>jt,YMapEvent:()=>fo,YTextEvent:()=>ho,YXmlEvent:()=>po,applyUpdate:()=>fi,applyUpdateV2:()=>Be,cleanupYTextFormatting:()=>ou,compareIDs:()=>Ut,compareRelativePositions:()=>wg,convertUpdateFormatV1ToV2:()=>jg,convertUpdateFormatV2ToV1:()=>Fl,createAbsolutePositionFromRelativePosition:()=>Eg,createDeleteSet:()=>yo,createDeleteSetFromStructStore:()=>li,createDocFromSnapshot:()=>Rg,createID:()=>R,createRelativePositionFromJSON:()=>ug,createRelativePositionFromTypeIndex:()=>fg,createSnapshot:()=>Ei,decodeRelativePosition:()=>mg,decodeSnapshot:()=>bg,decodeSnapshotV2:()=>Il,decodeStateVector:()=>pi,decodeUpdate:()=>Ug,decodeUpdateV2:()=>Pl,diffUpdate:()=>Ng,diffUpdateV2:()=>wi,emptySnapshot:()=>vg,encodeRelativePosition:()=>pg,encodeSnapshot:()=>Sg,encodeSnapshotV2:()=>xl,encodeStateAsUpdate:()=>hi,encodeStateAsUpdateV2:()=>ht,encodeStateVector:()=>mi,encodeStateVectorFromUpdate:()=>Lg,encodeStateVectorFromUpdateV2:()=>Nl,equalDeleteSets:()=>vl,equalSnapshots:()=>_g,findIndexSS:()=>Ee,findRootTypeKey:()=>yi,getItem:()=>Lt,getItemCleanEnd:()=>ni,getItemCleanStart:()=>ne,getState:()=>L,getTypeChildren:()=>$g,isDeleted:()=>Ht,isParentOf:()=>an,iterateDeletedStructs:()=>Pt,logType:()=>ag,logUpdate:()=>Og,logUpdateV2:()=>Ll,mergeDeleteSets:()=>Mt,mergeUpdates:()=>Ml,mergeUpdatesV2:()=>Bt,obfuscateUpdate:()=>Vg,obfuscateUpdateV2:()=>Bg,parseUpdateMeta:()=>Pg,parseUpdateMetaV2:()=>Vl,readUpdate:()=>og,readUpdateV2:()=>di,relativePositionToJSON:()=>lg,snapshot:()=>Cg,snapshotContainsUpdate:()=>xg,transact:()=>D,tryGc:()=>Dg,typeListToArraySnapshot:()=>zg,typeMapGetAllSnapshot:()=>Zl,typeMapGetSnapshot:()=>qg});var V=()=>new Map,$n=t=>{let e=V();return t.forEach((r,n)=>{e.set(n,r)}),e},K=(t,e,r)=>{let n=t.get(e);return n===void 0&&t.set(e,n=r()),n},wa=(t,e)=>{let r=[];for(let[n,o]of t)r.push(e(o,n));return r},_a=(t,e)=>{for(let[r,n]of t)if(e(n,r))return!0;return!1};var De=()=>new Set;var zn=t=>t[t.length-1];var Sa=(t,e)=>{for(let r=0;r<e.length;r++)t.push(e[r])},ve=Array.from;var ba=(t,e)=>{for(let r=0;r<t.length;r++)if(e(t[r],r,t))return!0;return!1};var va=(t,e)=>{let r=new Array(t);for(let n=0;n<t;n++)r[n]=e(n,r);return r};var xt=Array.isArray;var rt=class{constructor(){this._observers=V()}on(e,r){return K(this._observers,e,De).add(r),r}once(e,r){let n=(...o)=>{this.off(e,n),r(...o)};this.on(e,n)}off(e,r){let n=this._observers.get(e);n!==void 0&&(n.delete(r),n.size===0&&this._observers.delete(e))}emit(e,r){return ve((this._observers.get(e)||V()).values()).forEach(n=>n(...r))}destroy(){this._observers=V()}},sr=class{constructor(){this._observers=V()}on(e,r){K(this._observers,e,De).add(r)}once(e,r){let n=(...o)=>{this.off(e,n),r(...o)};this.on(e,n)}off(e,r){let n=this._observers.get(e);n!==void 0&&(n.delete(r),n.size===0&&this._observers.delete(e))}emit(e,r){return ve((this._observers.get(e)||V()).values()).forEach(n=>n(...r))}destroy(){this._observers=V()}};var fe=Math.floor;var ir=Math.abs;var Kn=(t,e)=>t<e?t:e,Ge=(t,e)=>t>e?t:e,SS=Number.isNaN;var Hn=t=>t!==0?t<0:1/t<0;var bs=Number.MAX_SAFE_INTEGER,bS=Number.MIN_SAFE_INTEGER,vS=1<<31;var Ca=Number.isInteger||(t=>typeof t=="number"&&isFinite(t)&&fe(t)===t),CS=Number.isNaN,RS=Number.parseInt;var vs=String.fromCharCode,TS=String.fromCodePoint,xS=vs(65535),op=t=>t.toLowerCase(),sp=/^\s*/g,ip=t=>t.replace(sp,""),cp=/([A-Z])/g,Cs=(t,e)=>ip(t.replace(cp,r=>`${e}${op(r)}`));var ap=t=>{let e=unescape(encodeURIComponent(t)),r=e.length,n=new Uint8Array(r);for(let o=0;o<r;o++)n[o]=e.codePointAt(o);return n},ar=typeof TextEncoder<"u"?new TextEncoder:null,lp=t=>ar.encode(t),Ta=ar?lp:ap;var cr=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});cr&&cr.decode(new Uint8Array).length===1&&(cr=null);var xa=(t,e)=>va(e,()=>t).join("");var It=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}},Ce=()=>new It;var up=t=>{let e=t.cpos;for(let r=0;r<t.bufs.length;r++)e+=t.bufs[r].length;return e};var re=t=>{let e=new Uint8Array(up(t)),r=0;for(let n=0;n<t.bufs.length;n++){let o=t.bufs[n];e.set(o,r),r+=o.length}return e.set(new Uint8Array(t.cbuf.buffer,0,t.cpos),r),e},dp=(t,e)=>{let r=t.cbuf.length;r-t.cpos<e&&(t.bufs.push(new Uint8Array(t.cbuf.buffer,0,t.cpos)),t.cbuf=new Uint8Array(Ge(r,e)*2),t.cpos=0)},H=(t,e)=>{let r=t.cbuf.length;t.cpos===r&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(r*2),t.cpos=0),t.cbuf[t.cpos++]=e};var fr=H;var v=(t,e)=>{for(;e>127;)H(t,128|127&e),e=fe(e/128);H(t,127&e)},Wr=(t,e)=>{let r=Hn(e);for(r&&(e=-e),H(t,(e>63?128:0)|(r?64:0)|63&e),e=fe(e/64);e>0;)H(t,(e>127?128:0)|127&e),e=fe(e/128)},Rs=new Uint8Array(3e4),fp=Rs.length/3,hp=(t,e)=>{if(e.length<fp){let r=ar.encodeInto(e,Rs).written||0;v(t,r);for(let n=0;n<r;n++)H(t,Rs[n])}else J(t,Ta(e))},pp=(t,e)=>{let r=unescape(encodeURIComponent(e)),n=r.length;v(t,n);for(let o=0;o<n;o++)H(t,r.codePointAt(o))},nt=ar&&ar.encodeInto?hp:pp;var Oa=(t,e)=>hr(t,re(e)),hr=(t,e)=>{let r=t.cbuf.length,n=t.cpos,o=Kn(r-n,e.length),s=e.length-o;t.cbuf.set(e.subarray(0,o),n),t.cpos+=o,s>0&&(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(Ge(r*2,s)),t.cbuf.set(e.subarray(o)),t.cpos=s)},J=(t,e)=>{v(t,e.byteLength),hr(t,e)},Ts=(t,e)=>{dp(t,e);let r=new DataView(t.cbuf.buffer,t.cpos,e);return t.cpos+=e,r},gp=(t,e)=>Ts(t,4).setFloat32(0,e,!1),mp=(t,e)=>Ts(t,8).setFloat64(0,e,!1),yp=(t,e)=>Ts(t,8).setBigInt64(0,e,!1);var Aa=new DataView(new ArrayBuffer(4)),Ep=t=>(Aa.setFloat32(0,t),Aa.getFloat32(0)===t),ur=(t,e)=>{switch(typeof e){case"string":H(t,119),nt(t,e);break;case"number":Ca(e)&&ir(e)<=2147483647?(H(t,125),Wr(t,e)):Ep(e)?(H(t,124),gp(t,e)):(H(t,123),mp(t,e));break;case"bigint":H(t,122),yp(t,e);break;case"object":if(e===null)H(t,126);else if(xt(e)){H(t,117),v(t,e.length);for(let r=0;r<e.length;r++)ur(t,e[r])}else if(e instanceof Uint8Array)H(t,116),J(t,e);else{H(t,118);let r=Object.keys(e);v(t,r.length);for(let n=0;n<r.length;n++){let o=r[n];nt(t,o),ur(t,e[o])}}break;case"boolean":H(t,e?120:121);break;default:H(t,127)}},qr=class extends It{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&v(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}};var Da=t=>{t.count>0&&(Wr(t.encoder,t.count===1?t.s:-t.s),t.count>1&&v(t.encoder,t.count-2))},At=class{constructor(){this.encoder=new It,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Da(this),this.count=1,this.s=e)}toUint8Array(){return Da(this),re(this.encoder)}};var ka=t=>{if(t.count>0){let e=t.diff*2+(t.count===1?0:1);Wr(t.encoder,e),t.count>1&&v(t.encoder,t.count-2)}},dr=class{constructor(){this.encoder=new It,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(ka(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return ka(this),re(this.encoder)}},qn=class{constructor(){this.sarr=[],this.s="",this.lensE=new At}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){let e=new It;return this.sarr.push(this.s),this.s="",nt(e,this.sarr.join("")),hr(e,this.lensE.toUint8Array()),re(e)}};var ke=t=>new Error(t),Re=()=>{throw ke("Method unimplemented")},ce=()=>{throw ke("Unexpected case")};var La=ke("Unexpected end of array"),Pa=ke("Integer out of Range"),pr=class{constructor(e){this.arr=e,this.pos=0}},G=t=>new pr(t),Is=t=>t.pos!==t.arr.length;var wp=(t,e)=>{let r=new Uint8Array(t.arr.buffer,t.pos+t.arr.byteOffset,e);return t.pos+=e,r},Q=t=>wp(t,T(t));var Dt=t=>t.arr[t.pos++];var T=t=>{let e=0,r=1,n=t.arr.length;for(;t.pos<n;){let o=t.arr[t.pos++];if(e=e+(o&127)*r,r*=128,o<128)return e;if(e>bs)throw Pa}throw La},Qr=t=>{let e=t.arr[t.pos++],r=e&63,n=64,o=(e&64)>0?-1:1;if((e&128)===0)return o*r;let s=t.arr.length;for(;t.pos<s;){if(e=t.arr[t.pos++],r=r+(e&127)*n,n*=128,e<128)return o*r;if(r>bs)throw Pa}throw La};var _p=t=>{let e=T(t);if(e===0)return"";{let r=String.fromCodePoint(Dt(t));if(--e<100)for(;e--;)r+=String.fromCodePoint(Dt(t));else for(;e>0;){let n=e<1e4?e:1e4,o=t.arr.subarray(t.pos,t.pos+n);t.pos+=n,r+=String.fromCodePoint.apply(null,o),e-=n}return decodeURIComponent(escape(r))}},Sp=t=>cr.decode(Q(t)),st=cr?Sp:_p;var As=(t,e)=>{let r=new DataView(t.arr.buffer,t.arr.byteOffset+t.pos,e);return t.pos+=e,r},bp=t=>As(t,4).getFloat32(0,!1),vp=t=>As(t,8).getFloat64(0,!1),Cp=t=>As(t,8).getBigInt64(0,!1);var Rp=[t=>{},t=>null,Qr,bp,vp,Cp,t=>!1,t=>!0,st,t=>{let e=T(t),r={};for(let n=0;n<e;n++){let o=st(t);r[o]=gr(t)}return r},t=>{let e=T(t),r=[];for(let n=0;n<e;n++)r.push(gr(t));return r},Q],gr=t=>Rp[127-Dt(t)](t),Jr=class extends pr{constructor(e,r){super(e),this.reader=r,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),Is(this)?this.count=T(this)+1:this.count=-1),this.count--,this.s}};var kt=class extends pr{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=Qr(this);let e=Hn(this.s);this.count=1,e&&(this.s=-this.s,this.count=T(this)+2)}return this.count--,this.s}};var mr=class extends pr{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){let e=Qr(this),r=e&1;this.diff=fe(e/2),this.count=1,r&&(this.count=T(this)+2)}return this.s+=this.diff,this.count--,this.s}},Wn=class{constructor(e){this.decoder=new kt(e),this.str=st(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),r=this.str.slice(this.spos,e);return this.spos=e,r}};var DS=crypto.subtle,Ma=crypto.getRandomValues.bind(crypto);var ks=()=>Ma(new Uint32Array(1))[0];var Tp="10000000-1000-4000-8000"+-1e11,Na=()=>Tp.replace(/[018]/g,t=>(t^ks()&15>>t/4).toString(16));var it=Date.now;var Us=t=>new Promise(t);var US=Promise.all.bind(Promise);var Ls=t=>t===void 0?null:t;var Ps=class{constructor(){this.map=new Map}setItem(e,r){this.map.set(e,r)}getItem(e){return this.map.get(e)}},Va=new Ps,Dp=!0;try{typeof localStorage<"u"&&localStorage&&(Va=localStorage,Dp=!1)}catch{}var Ba=Va;var Fa=Object.assign,Ya=Object.keys,Ga=(t,e)=>{for(let r in t)e(t[r],r)};var Ms=t=>Ya(t).length,ja=t=>Ya(t).length;var $a=t=>{for(let e in t)return!1;return!0},Op=(t,e)=>{for(let r in t)if(!e(t[r],r))return!1;return!0},Ns=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Vs=(t,e)=>t===e||ja(t)===ja(e)&&Op(t,(r,n)=>(r!==void 0||Ns(e,n))&&e[n]===r),Up=Object.freeze,Bs=t=>{for(let e in t){let r=t[e];(typeof r=="object"||typeof r=="function")&&Bs(t[e])}return Up(t)};var Zr=(t,e,r=0)=>{try{for(;r<t.length;r++)t[r](...e)}finally{r<t.length&&Zr(t,e,r+1)}};var js=t=>t,Lp=(t,e)=>t===e;var Xr=(t,e)=>{if(t==null||e==null)return Lp(t,e);if(t.constructor!==e.constructor)return!1;if(t===e)return!0;switch(t.constructor){case ArrayBuffer:t=new Uint8Array(t),e=new Uint8Array(e);case Uint8Array:{if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;break}case Set:{if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;break}case Map:{if(t.size!==e.size)return!1;for(let r of t.keys())if(!e.has(r)||!Xr(t.get(r),e.get(r)))return!1;break}case Object:if(Ms(t)!==Ms(e))return!1;for(let r in t)if(!Ns(t,r)||!Xr(t[r],e[r]))return!1;break;case Array:if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Xr(t[r],e[r]))return!1;break;default:return!1}return!0},Ka=(t,e)=>e.includes(t);var yr=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",Jn=typeof window<"u"&&typeof document<"u"&&!yr,LS=typeof navigator<"u"?/Mac/.test(navigator.platform):!1,Oe,Pp=[],Mp=()=>{if(Oe===void 0)if(yr){Oe=V();let t=process.argv,e=null;for(let r=0;r<t.length;r++){let n=t[r];n[0]==="-"?(e!==null&&Oe.set(e,""),e=n):e!==null?(Oe.set(e,n),e=null):Pp.push(n)}e!==null&&Oe.set(e,"")}else typeof location=="object"?(Oe=V(),(location.search||"?").slice(1).split("&").forEach(t=>{if(t.length!==0){let[e,r]=t.split("=");Oe.set(`--${Cs(e,"-")}`,r),Oe.set(`-${Cs(e,"-")}`,r)}})):Oe=V();return Oe},Ys=t=>Mp().has(t);var en=t=>yr?Ls(process.env[t.toUpperCase().replaceAll("-","_")]):Ls(Ba.getItem(t));var Ha=t=>Ys("--"+t)||en(t)!==null,PS=Ha("production"),Np=yr&&Ka(process.env.FORCE_COLOR,["true","1","2"]),qa=Np||!Ys("--no-colors")&&!Ha("no-color")&&(!yr||process.stdout.isTTY)&&(!yr||Ys("--color")||en("COLORTERM")!==null||(en("TERM")||"").includes("color"));var Wa=t=>new Uint8Array(t),Vp=(t,e,r)=>new Uint8Array(t,e,r);var Bp=t=>{let e="";for(let r=0;r<t.byteLength;r++)e+=vs(t[r]);return btoa(e)},jp=t=>Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("base64"),Fp=t=>{let e=atob(t),r=Wa(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r},Yp=t=>{let e=Buffer.from(t,"base64");return Vp(e.buffer,e.byteOffset,e.byteLength)},Ja=Jn?Bp:jp,Qa=Jn?Fp:Yp;var Xa=t=>{let e=Wa(t.byteLength);return e.set(t),e};var $s=class{constructor(e,r){this.left=e,this.right=r}},Ue=(t,e)=>new $s(t,e);var Ot=typeof document<"u"?document:{};var MS=typeof DOMParser<"u"?new DOMParser:null;var el=t=>wa(t,(e,r)=>`${r}:${e};`).join("");var NS=Ot.ELEMENT_NODE,VS=Ot.TEXT_NODE,BS=Ot.CDATA_SECTION_NODE,jS=Ot.COMMENT_NODE,FS=Ot.DOCUMENT_NODE,YS=Ot.DOCUMENT_TYPE_NODE,GS=Ot.DOCUMENT_FRAGMENT_NODE;var Le=Symbol;var tn=Le(),rn=Le(),zs=Le(),Ks=Le(),Hs=Le(),nn=Le(),qs=Le(),Er=Le(),Ws=Le(),tl=t=>{t.length===1&&t[0]?.constructor===Function&&(t=t[0]());let e=[],r=[],n=0;for(;n<t.length;n++){let o=t[n];if(o===void 0)break;if(o.constructor===String||o.constructor===Number)e.push(o);else if(o.constructor===Object)break}for(n>0&&r.push(e.join(""));n<t.length;n++){let o=t[n];o instanceof Symbol||r.push(o)}return r};var $S=it();var Hp={[tn]:Ue("font-weight","bold"),[rn]:Ue("font-weight","normal"),[zs]:Ue("color","blue"),[Hs]:Ue("color","green"),[Ks]:Ue("color","grey"),[nn]:Ue("color","red"),[qs]:Ue("color","purple"),[Er]:Ue("color","orange"),[Ws]:Ue("color","black")},qp=t=>{t.length===1&&t[0]?.constructor===Function&&(t=t[0]());let e=[],r=[],n=V(),o=[],s=0;for(;s<t.length;s++){let i=t[s],c=Hp[i];if(c!==void 0)n.set(c.left,c.right);else{if(i===void 0)break;if(i.constructor===String||i.constructor===Number){let a=el(n);s>0||a.length>0?(e.push("%c"+i),r.push(a)):e.push(i)}else break}}for(s>0&&(o=r,o.unshift(e.join("")));s<t.length;s++){let i=t[s];i instanceof Symbol||o.push(i)}return o},rl=qa?qp:tl,Qn=(...t)=>{console.log(...rl(t)),nl.forEach(e=>e.print(t))},Js=(...t)=>{console.warn(...rl(t)),t.unshift(Er),nl.forEach(e=>e.print(t))};var nl=De();var ol=t=>({[Symbol.iterator](){return this},next:t}),sl=(t,e)=>ol(()=>{let r;do r=t.next();while(!r.done&&!e(r.value));return r}),Xn=(t,e)=>ol(()=>{let{done:r,value:n}=t.next();return{done:r,value:r?void 0:e(n)}});var Xs=class extends rt{constructor(e,r){super(),this.doc=e,this.awareness=r}},sn=class{constructor(e,r){this.clock=e,this.len=r}},ut=class{constructor(){this.clients=new Map}},Pt=(t,e,r)=>e.clients.forEach((n,o)=>{let s=t.doc.store.clients.get(o);if(s!=null){let i=s[s.length-1],c=i.id.clock+i.length;for(let a=0,u=n[a];a<n.length&&u.clock<c;u=n[++a])Dl(t,s,u.clock,u.len,r)}}),Zp=(t,e)=>{let r=0,n=t.length-1;for(;r<=n;){let o=fe((r+n)/2),s=t[o],i=s.clock;if(i<=e){if(e<i+s.len)return o;r=o+1}else n=o-1}return null},Ht=(t,e)=>{let r=t.clients.get(e.client);return r!==void 0&&Zp(r,e.clock)!==null},ai=t=>{t.clients.forEach(e=>{e.sort((o,s)=>o.clock-s.clock);let r,n;for(r=1,n=1;r<e.length;r++){let o=e[n-1],s=e[r];o.clock+o.len>=s.clock?o.len=Ge(o.len,s.clock+s.len-o.clock):(n<r&&(e[n]=s),n++)}e.length=n})},Mt=t=>{let e=new ut;for(let r=0;r<t.length;r++)t[r].clients.forEach((n,o)=>{if(!e.clients.has(o)){let s=n.slice();for(let i=r+1;i<t.length;i++)Sa(s,t[i].clients.get(o)||[]);e.clients.set(o,s)}});return ai(e),e},cn=(t,e,r,n)=>{K(t.clients,e,()=>[]).push(new sn(r,n))},yo=()=>new ut,li=t=>{let e=yo();return t.clients.forEach((r,n)=>{let o=[];for(let s=0;s<r.length;s++){let i=r[s];if(i.deleted){let c=i.id.clock,a=i.length;if(s+1<r.length)for(let u=r[s+1];s+1<r.length&&u.deleted;u=r[++s+1])a+=u.length;o.push(new sn(c,a))}}o.length>0&&e.clients.set(n,o)}),e},Pe=(t,e)=>{v(t.restEncoder,e.clients.size),ve(e.clients.entries()).sort((r,n)=>n[0]-r[0]).forEach(([r,n])=>{t.resetDsCurVal(),v(t.restEncoder,r);let o=n.length;v(t.restEncoder,o);for(let s=0;s<o;s++){let i=n[s];t.writeDsClock(i.clock),t.writeDsLen(i.len)}})},ze=t=>{let e=new ut,r=T(t.restDecoder);for(let n=0;n<r;n++){t.resetDsCurVal();let o=T(t.restDecoder),s=T(t.restDecoder);if(s>0){let i=K(e.clients,o,()=>[]);for(let c=0;c<s;c++)i.push(new sn(t.readDsClock(),t.readDsLen()))}}return e},al=(t,e,r)=>{let n=new ut,o=T(t.restDecoder);for(let s=0;s<o;s++){t.resetDsCurVal();let i=T(t.restDecoder),c=T(t.restDecoder),a=r.clients.get(i)||[],u=L(r,i);for(let l=0;l<c;l++){let d=t.readDsClock(),f=d+t.readDsLen();if(d<u){u<f&&cn(n,i,u,f-u);let h=Ee(a,d),p=a[h];for(!p.deleted&&p.id.clock<d&&(a.splice(h+1,0,mo(e,p,d-p.id.clock)),h++);h<a.length&&(p=a[h++],p.id.clock<f);)p.deleted||(f<p.id.clock+p.length&&a.splice(h,0,mo(e,p,f-p.id.clock)),p.delete(e))}else cn(n,i,d,f-d)}}if(n.clients.size>0){let s=new ge;return v(s.restEncoder,0),Pe(s,n),s.toUint8Array()}return null},vl=(t,e)=>{if(t.clients.size!==e.clients.size)return!1;for(let[r,n]of t.clients.entries()){let o=e.clients.get(r);if(o===void 0||n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s],c=o[s];if(i.clock!==c.clock||i.len!==c.len)return!1}}return!0},Cl=ks,Me=class t extends rt{constructor({guid:e=Na(),collectionid:r=null,gc:n=!0,gcFilter:o=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=n,this.gcFilter=o,this.clientID=Cl(),this.guid=e,this.collectionid=r,this.share=new Map,this.store=new io,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=Us(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});let a=()=>Us(u=>{let l=d=>{(d===void 0||d===!0)&&(this.off("sync",l),u())};this.on("sync",l)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=a()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=a()}load(){let e=this._item;e!==null&&!this.shouldLoad&&D(e.parent.doc,r=>{r.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(ve(this.subdocs).map(e=>e.guid))}transact(e,r=null){return D(this,e,r)}get(e,r=F){let n=K(this.share,e,()=>{let s=new r;return s._integrate(this,null),s}),o=n.constructor;if(r!==F&&o!==r)if(o===F){let s=new r;s._map=n._map,n._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=n._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=n._length,this.share.set(e,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${e} has already been defined with a different constructor`);return n}getArray(e=""){return this.get(e,Ft)}getText(e=""){return this.get(e,Sr)}getMap(e=""){return this.get(e,Yt)}getXmlElement(e=""){return this.get(e,$t)}getXmlFragment(e=""){return this.get(e,Gt)}toJSON(){let e={};return this.share.forEach((r,n)=>{e[n]=r.toJSON()}),e}destroy(){this.isDestroyed=!0,ve(this.subdocs).forEach(r=>r.destroy());let e=this._item;if(e!==null){this._item=null;let r=e.content;r.doc=new t({guid:this.guid,...r.opts,shouldLoad:!1}),r.doc._item=e,D(e.parent.doc,n=>{let o=r.doc;e.deleted||n.subdocsAdded.add(o),n.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}},Nt=class{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return T(this.restDecoder)}readDsLen(){return T(this.restDecoder)}},he=class extends Nt{readLeftID(){return R(T(this.restDecoder),T(this.restDecoder))}readRightID(){return R(T(this.restDecoder),T(this.restDecoder))}readClient(){return T(this.restDecoder)}readInfo(){return Dt(this.restDecoder)}readString(){return st(this.restDecoder)}readParentInfo(){return T(this.restDecoder)===1}readTypeRef(){return T(this.restDecoder)}readLen(){return T(this.restDecoder)}readAny(){return gr(this.restDecoder)}readBuf(){return Xa(Q(this.restDecoder))}readJSON(){return JSON.parse(st(this.restDecoder))}readKey(){return st(this.restDecoder)}},oo=class{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=T(this.restDecoder),this.dsCurrVal}readDsLen(){let e=T(this.restDecoder)+1;return this.dsCurrVal+=e,e}},ae=class extends oo{constructor(e){super(e),this.keys=[],T(e),this.keyClockDecoder=new mr(Q(e)),this.clientDecoder=new kt(Q(e)),this.leftClockDecoder=new mr(Q(e)),this.rightClockDecoder=new mr(Q(e)),this.infoDecoder=new Jr(Q(e),Dt),this.stringDecoder=new Wn(Q(e)),this.parentInfoDecoder=new Jr(Q(e),Dt),this.typeRefDecoder=new kt(Q(e)),this.lenDecoder=new kt(Q(e))}readLeftID(){return new $e(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new $e(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return gr(this.restDecoder)}readBuf(){return Q(this.restDecoder)}readJSON(){return gr(this.restDecoder)}readKey(){let e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{let r=this.stringDecoder.read();return this.keys.push(r),r}}},dt=class{constructor(){this.restEncoder=Ce()}toUint8Array(){return re(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){v(this.restEncoder,e)}writeDsLen(e){v(this.restEncoder,e)}},Ne=class extends dt{writeLeftID(e){v(this.restEncoder,e.client),v(this.restEncoder,e.clock)}writeRightID(e){v(this.restEncoder,e.client),v(this.restEncoder,e.clock)}writeClient(e){v(this.restEncoder,e)}writeInfo(e){fr(this.restEncoder,e)}writeString(e){nt(this.restEncoder,e)}writeParentInfo(e){v(this.restEncoder,e?1:0)}writeTypeRef(e){v(this.restEncoder,e)}writeLen(e){v(this.restEncoder,e)}writeAny(e){ur(this.restEncoder,e)}writeBuf(e){J(this.restEncoder,e)}writeJSON(e){nt(this.restEncoder,JSON.stringify(e))}writeKey(e){nt(this.restEncoder,e)}},wr=class{constructor(){this.restEncoder=Ce(),this.dsCurrVal=0}toUint8Array(){return re(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){let r=e-this.dsCurrVal;this.dsCurrVal=e,v(this.restEncoder,r)}writeDsLen(e){e===0&&ce(),v(this.restEncoder,e-1),this.dsCurrVal+=e}},ge=class extends wr{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new dr,this.clientEncoder=new At,this.leftClockEncoder=new dr,this.rightClockEncoder=new dr,this.infoEncoder=new qr(fr),this.stringEncoder=new qn,this.parentInfoEncoder=new qr(fr),this.typeRefEncoder=new At,this.lenEncoder=new At}toUint8Array(){let e=Ce();return v(e,0),J(e,this.keyClockEncoder.toUint8Array()),J(e,this.clientEncoder.toUint8Array()),J(e,this.leftClockEncoder.toUint8Array()),J(e,this.rightClockEncoder.toUint8Array()),J(e,re(this.infoEncoder)),J(e,this.stringEncoder.toUint8Array()),J(e,re(this.parentInfoEncoder)),J(e,this.typeRefEncoder.toUint8Array()),J(e,this.lenEncoder.toUint8Array()),hr(e,re(this.restEncoder)),re(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){ur(this.restEncoder,e)}writeBuf(e){J(this.restEncoder,e)}writeJSON(e){ur(this.restEncoder,e)}writeKey(e){let r=this.keyMap.get(e);r===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(r)}},eg=(t,e,r,n)=>{n=Ge(n,e[0].id.clock);let o=Ee(e,n);v(t.restEncoder,e.length-o),t.writeClient(r),v(t.restEncoder,n);let s=e[o];s.write(t,n-s.id.clock);for(let i=o+1;i<e.length;i++)e[i].write(t,0)},ui=(t,e,r)=>{let n=new Map;r.forEach((o,s)=>{L(e,s)>o&&n.set(s,o)}),mn(e).forEach((o,s)=>{r.has(s)||n.set(s,0)}),v(t.restEncoder,n.size),ve(n.entries()).sort((o,s)=>s[0]-o[0]).forEach(([o,s])=>{eg(t,e.clients.get(o),o,s)})},tg=(t,e)=>{let r=V(),n=T(t.restDecoder);for(let o=0;o<n;o++){let s=T(t.restDecoder),i=new Array(s),c=t.readClient(),a=T(t.restDecoder);r.set(c,{i:0,refs:i});for(let u=0;u<s;u++){let l=t.readInfo();switch(31&l){case 0:{let d=t.readLen();i[u]=new oe(R(c,a),d),a+=d;break}case 10:{let d=T(t.restDecoder);i[u]=new X(R(c,a),d),a+=d;break}default:{let d=(l&192)===0,f=new k(R(c,a),null,(l&128)===128?t.readLeftID():null,null,(l&64)===64?t.readRightID():null,d?t.readParentInfo()?e.get(t.readString()):t.readLeftID():null,d&&(l&32)===32?t.readString():null,cu(t,l));i[u]=f,a+=f.length}}}}return r},rg=(t,e,r)=>{let n=[],o=ve(r.keys()).sort((h,p)=>h-p);if(o.length===0)return null;let s=()=>{if(o.length===0)return null;let h=r.get(o[o.length-1]);for(;h.refs.length===h.i;)if(o.pop(),o.length>0)h=r.get(o[o.length-1]);else return null;return h},i=s();if(i===null)return null;let c=new io,a=new Map,u=(h,p)=>{let g=a.get(h);(g==null||g>p)&&a.set(h,p)},l=i.refs[i.i++],d=new Map,f=()=>{for(let h of n){let p=h.id.client,g=r.get(p);g?(g.i--,c.clients.set(p,g.refs.slice(g.i)),r.delete(p),g.i=0,g.refs=[]):c.clients.set(p,[h]),o=o.filter(m=>m!==p)}n.length=0};for(;;){if(l.constructor!==X){let p=K(d,l.id.client,()=>L(e,l.id.client))-l.id.clock;if(p<0)n.push(l),u(l.id.client,l.id.clock-1),f();else{let g=l.getMissing(t,e);if(g!==null){n.push(l);let m=r.get(g)||{refs:[],i:0};if(m.refs.length===m.i)u(g,L(e,g)),f();else{l=m.refs[m.i++];continue}}else(p===0||p<l.length)&&(l.integrate(t,p),d.set(l.id.client,l.id.clock+l.length))}}if(n.length>0)l=n.pop();else if(i!==null&&i.i<i.refs.length)l=i.refs[i.i++];else{if(i=s(),i===null)break;l=i.refs[i.i++]}}if(c.clients.size>0){let h=new ge;return ui(h,c,new Map),v(h.restEncoder,0),{missing:a,update:h.toUint8Array()}}return null},ng=(t,e)=>ui(t,e.doc.store,e.beforeState),di=(t,e,r,n=new ae(t))=>D(e,o=>{o.local=!1;let s=!1,i=o.doc,c=i.store,a=tg(n,i),u=rg(o,c,a),l=c.pendingStructs;if(l){for(let[f,h]of l.missing)if(h<L(c,f)){s=!0;break}if(u){for(let[f,h]of u.missing){let p=l.missing.get(f);(p==null||p>h)&&l.missing.set(f,h)}l.update=Bt([l.update,u.update])}}else c.pendingStructs=u;let d=al(n,o,c);if(c.pendingDs){let f=new ae(G(c.pendingDs));T(f.restDecoder);let h=al(f,o,c);d&&h?c.pendingDs=Bt([d,h]):c.pendingDs=d||h}else c.pendingDs=d;if(s){let f=c.pendingStructs.update;c.pendingStructs=null,Be(o.doc,f)}},r,!1),og=(t,e,r)=>di(t,e,r,new he(t)),Be=(t,e,r,n=ae)=>{let o=G(e);di(o,t,r,new n(o))},fi=(t,e,r)=>Be(t,e,r,he),sg=(t,e,r=new Map)=>{ui(t,e.store,r),Pe(t,li(e.store))},ht=(t,e=new Uint8Array([0]),r=new ge)=>{let n=pi(e);sg(r,t,n);let o=[r.toUint8Array()];if(t.store.pendingDs&&o.push(t.store.pendingDs),t.store.pendingStructs&&o.push(wi(t.store.pendingStructs.update,e)),o.length>1){if(r.constructor===Ne)return Ml(o.map((s,i)=>i===0?s:Fl(s)));if(r.constructor===ge)return Bt(o)}return o[0]},hi=(t,e)=>ht(t,e,new Ne),Rl=t=>{let e=new Map,r=T(t.restDecoder);for(let n=0;n<r;n++){let o=T(t.restDecoder),s=T(t.restDecoder);e.set(o,s)}return e},pi=t=>Rl(new Nt(G(t))),gi=(t,e)=>(v(t.restEncoder,e.size),ve(e.entries()).sort((r,n)=>n[0]-r[0]).forEach(([r,n])=>{v(t.restEncoder,r),v(t.restEncoder,n)}),t),ig=(t,e)=>gi(t,mn(e.store)),cg=(t,e=new wr)=>(t instanceof Map?gi(e,t):ig(e,t),e.toUint8Array()),mi=t=>cg(t,new dt),Zs=class{constructor(){this.l=[]}},ll=()=>new Zs,ul=(t,e)=>t.l.push(e),dl=(t,e)=>{let r=t.l,n=r.length;t.l=r.filter(o=>e!==o),n===t.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Tl=(t,e,r)=>Zr(t.l,[e,r]),$e=class{constructor(e,r){this.client=e,this.clock=r}},Ut=(t,e)=>t===e||t!==null&&e!==null&&t.client===e.client&&t.clock===e.clock,R=(t,e)=>new $e(t,e),fl=(t,e)=>{v(t,e.client),v(t,e.clock)},hl=t=>R(T(t),T(t)),yi=t=>{for(let[e,r]of t.doc.share.entries())if(r===t)return e;throw ce()},an=(t,e)=>{for(;e!==null;){if(e.parent===t)return!0;e=e.parent._item}return!1},ag=t=>{let e=[],r=t._start;for(;r;)e.push(r),r=r.right;console.log("Children: ",e),console.log("Children content: ",e.filter(n=>!n.deleted).map(n=>n.content))},ei=class{constructor(e,r=e.getMap("users")){let n=new Map;this.yusers=r,this.doc=e,this.clients=new Map,this.dss=n;let o=(s,i)=>{let c=s.get("ds"),a=s.get("ids"),u=l=>this.clients.set(l,i);c.observe(l=>{l.changes.added.forEach(d=>{d.content.getContent().forEach(f=>{f instanceof Uint8Array&&this.dss.set(i,Mt([this.dss.get(i)||yo(),ze(new Nt(G(f)))]))})})}),this.dss.set(i,Mt(c.map(l=>ze(new Nt(G(l)))))),a.observe(l=>l.changes.added.forEach(d=>d.content.getContent().forEach(u))),a.forEach(u)};r.observe(s=>{s.keysChanged.forEach(i=>o(r.get(i),i))}),r.forEach(o)}setUserMapping(e,r,n,{filter:o=()=>!0}={}){let s=this.yusers,i=s.get(n);i||(i=new Yt,i.set("ids",new Ft),i.set("ds",new Ft),s.set(n,i)),i.get("ids").push([r]),s.observe(c=>{setTimeout(()=>{let a=s.get(n);if(a!==i){i=a,this.clients.forEach((d,f)=>{n===d&&i.get("ids").push([f])});let u=new dt,l=this.dss.get(n);l&&(Pe(u,l),i.get("ds").push([u.toUint8Array()]))}},0)}),e.on("afterTransaction",c=>{setTimeout(()=>{let a=i.get("ds"),u=c.deleteSet;if(c.local&&u.clients.size>0&&o(c,u)){let l=new dt;Pe(l,u),a.push([l.toUint8Array()])}})})}getUserByClientId(e){return this.clients.get(e)||null}getUserByDeletedId(e){for(let[r,n]of this.dss.entries())if(Ht(n,e))return r;return null}},_r=class{constructor(e,r,n,o=0){this.type=e,this.tname=r,this.item=n,this.assoc=o}},lg=t=>{let e={};return t.type&&(e.type=t.type),t.tname&&(e.tname=t.tname),t.item&&(e.item=t.item),t.assoc!=null&&(e.assoc=t.assoc),e},ug=t=>new _r(t.type==null?null:R(t.type.client,t.type.clock),t.tname??null,t.item==null?null:R(t.item.client,t.item.clock),t.assoc==null?0:t.assoc),so=class{constructor(e,r,n=0){this.type=e,this.index=r,this.assoc=n}},dg=(t,e,r=0)=>new so(t,e,r),Zn=(t,e,r)=>{let n=null,o=null;return t._item===null?o=yi(t):n=R(t._item.id.client,t._item.id.clock),new _r(n,o,e,r)},fg=(t,e,r=0)=>{let n=t._start;if(r<0){if(e===0)return Zn(t,null,r);e--}for(;n!==null;){if(!n.deleted&&n.countable){if(n.length>e)return Zn(t,R(n.id.client,n.id.clock+e),r);e-=n.length}if(n.right===null&&r<0)return Zn(t,n.lastId,r);n=n.right}return Zn(t,null,r)},hg=(t,e)=>{let{type:r,tname:n,item:o,assoc:s}=e;if(o!==null)v(t,0),fl(t,o);else if(n!==null)fr(t,1),nt(t,n);else if(r!==null)fr(t,2),fl(t,r);else throw ce();return Wr(t,s),t},pg=t=>{let e=Ce();return hg(e,t),re(e)},gg=t=>{let e=null,r=null,n=null;switch(T(t)){case 0:n=hl(t);break;case 1:r=st(t);break;case 2:e=hl(t)}let o=Is(t)?Qr(t):0;return new _r(e,r,n,o)},mg=t=>gg(G(t)),yg=(t,e)=>{let r=Lt(t,e),n=e.clock-r.id.clock;return{item:r,diff:n}},Eg=(t,e,r=!0)=>{let n=e.store,o=t.item,s=t.type,i=t.tname,c=t.assoc,a=null,u=0;if(o!==null){if(L(n,o.client)<=o.clock)return null;let l=r?ii(n,o):yg(n,o),d=l.item;if(!(d instanceof k))return null;if(a=d.parent,a._item===null||!a._item.deleted){u=d.deleted||!d.countable?0:l.diff+(c>=0?0:1);let f=d.left;for(;f!==null;)!f.deleted&&f.countable&&(u+=f.length),f=f.left}}else{if(i!==null)a=e.get(i);else if(s!==null){if(L(n,s.client)<=s.clock)return null;let{item:l}=r?ii(n,s):{item:Lt(n,s)};if(l instanceof k&&l.content instanceof we)a=l.content.type;else return null}else throw ce();c>=0?u=a._length:u=0}return dg(a,u,t.assoc)},wg=(t,e)=>t===e||t!==null&&e!==null&&t.tname===e.tname&&Ut(t.item,e.item)&&Ut(t.type,e.type)&&t.assoc===e.assoc,ln=class{constructor(e,r){this.ds=e,this.sv=r}},_g=(t,e)=>{let r=t.ds.clients,n=e.ds.clients,o=t.sv,s=e.sv;if(o.size!==s.size||r.size!==n.size)return!1;for(let[i,c]of o.entries())if(s.get(i)!==c)return!1;for(let[i,c]of r.entries()){let a=n.get(i)||[];if(c.length!==a.length)return!1;for(let u=0;u<c.length;u++){let l=c[u],d=a[u];if(l.clock!==d.clock||l.len!==d.len)return!1}}return!0},xl=(t,e=new wr)=>(Pe(e,t.ds),gi(e,t.sv),e.toUint8Array()),Sg=t=>xl(t,new dt),Il=(t,e=new oo(G(t)))=>new ln(ze(e),Rl(e)),bg=t=>Il(t,new Nt(G(t))),Ei=(t,e)=>new ln(t,e),vg=Ei(yo(),new Map),Cg=t=>Ei(li(t.store),mn(t.store)),ct=(t,e)=>e===void 0?!t.deleted:e.sv.has(t.id.client)&&(e.sv.get(t.id.client)||0)>t.id.clock&&!Ht(e.ds,t.id),ti=(t,e)=>{let r=K(t.meta,ti,De),n=t.doc.store;r.has(e)||(e.sv.forEach((o,s)=>{o<L(n,s)&&ne(t,R(s,o))}),Pt(t,e.ds,o=>{}),r.add(e))},Rg=(t,e,r=new Me)=>{if(t.gc)throw new Error("Garbage-collection must be disabled in `originDoc`!");let{sv:n,ds:o}=e,s=new ge;return t.transact(i=>{let c=0;n.forEach(a=>{a>0&&c++}),v(s.restEncoder,c);for(let[a,u]of n){if(u===0)continue;u<L(t.store,a)&&ne(i,R(a,u));let l=t.store.clients.get(a)||[],d=Ee(l,u-1);v(s.restEncoder,d+1),s.writeClient(a),v(s.restEncoder,0);for(let f=0;f<=d;f++)l[f].write(s,0)}Pe(s,o)}),Be(r,s.toUint8Array(),"snapshot"),r},Tg=(t,e,r=ae)=>{let n=new r(G(e)),o=new Ve(n,!1);for(let i=o.curr;i!==null;i=o.next())if((t.sv.get(i.id.client)||0)<i.id.clock+i.length)return!1;let s=Mt([t.ds,ze(n)]);return vl(t.ds,s)},xg=(t,e)=>Tg(t,e,he),io=class{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}},mn=t=>{let e=new Map;return t.clients.forEach((r,n)=>{let o=r[r.length-1];e.set(n,o.id.clock+o.length)}),e},L=(t,e)=>{let r=t.clients.get(e);if(r===void 0)return 0;let n=r[r.length-1];return n.id.clock+n.length},Al=(t,e)=>{let r=t.clients.get(e.id.client);if(r===void 0)r=[],t.clients.set(e.id.client,r);else{let n=r[r.length-1];if(n.id.clock+n.length!==e.id.clock)throw ce()}r.push(e)},Ee=(t,e)=>{let r=0,n=t.length-1,o=t[n],s=o.id.clock;if(s===e)return n;let i=fe(e/(s+o.length-1)*n);for(;r<=n;){if(o=t[i],s=o.id.clock,s<=e){if(e<s+o.length)return i;r=i+1}else n=i-1;i=fe((r+n)/2)}throw ce()},Ig=(t,e)=>{let r=t.clients.get(e.client);return r[Ee(r,e.clock)]},Lt=Ig,ri=(t,e,r)=>{let n=Ee(e,r),o=e[n];return o.id.clock<r&&o instanceof k?(e.splice(n+1,0,mo(t,o,r-o.id.clock)),n+1):n},ne=(t,e)=>{let r=t.doc.store.clients.get(e.client);return r[ri(t,r,e.clock)]},ni=(t,e,r)=>{let n=e.clients.get(r.client),o=Ee(n,r.clock),s=n[o];return r.clock!==s.id.clock+s.length-1&&s.constructor!==oe&&n.splice(o+1,0,mo(t,s,r.clock-s.id.clock+1)),s},Ag=(t,e,r)=>{let n=t.clients.get(e.id.client);n[Ee(n,e.id.clock)]=r},Dl=(t,e,r,n,o)=>{if(n===0)return;let s=r+n,i=ri(t,e,r),c;do c=e[i++],s<c.id.clock+c.length&&ri(t,e,s),o(c);while(i<e.length&&e[i].id.clock<s)},co=class{constructor(e,r,n){this.doc=e,this.deleteSet=new ut,this.beforeState=mn(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=r,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}},pl=(t,e)=>e.deleteSet.clients.size===0&&!_a(e.afterState,(r,n)=>e.beforeState.get(n)!==r)?!1:(ai(e.deleteSet),ng(t,e),Pe(t,e.deleteSet),!0),gl=(t,e,r)=>{let n=e._item;(n===null||n.id.clock<(t.beforeState.get(n.id.client)||0)&&!n.deleted)&&K(t.changed,e,De).add(r)},ro=(t,e)=>{let r=t[e],n=t[e-1],o=e;for(;o>0;r=n,n=t[--o-1]){if(n.deleted===r.deleted&&n.constructor===r.constructor&&n.mergeWith(r)){r instanceof k&&r.parentSub!==null&&r.parent._map.get(r.parentSub)===r&&r.parent._map.set(r.parentSub,n);continue}break}let s=e-o;return s&&t.splice(e+1-s,s),s},kl=(t,e,r)=>{for(let[n,o]of t.clients.entries()){let s=e.clients.get(n);for(let i=o.length-1;i>=0;i--){let c=o[i],a=c.clock+c.len;for(let u=Ee(s,c.clock),l=s[u];u<s.length&&l.id.clock<a;l=s[++u]){let d=s[u];if(c.clock+c.len<=d.id.clock)break;d instanceof k&&d.deleted&&!d.keep&&r(d)&&d.gc(e,!1)}}}},Ol=(t,e)=>{t.clients.forEach((r,n)=>{let o=e.clients.get(n);for(let s=r.length-1;s>=0;s--){let i=r[s],c=Kn(o.length-1,1+Ee(o,i.clock+i.len-1));for(let a=c,u=o[a];a>0&&u.id.clock>=i.clock;u=o[a])a-=1+ro(o,a)}})},Dg=(t,e,r)=>{kl(t,e,r),Ol(t,e)},Ul=(t,e)=>{if(e<t.length){let r=t[e],n=r.doc,o=n.store,s=r.deleteSet,i=r._mergeStructs;try{ai(s),r.afterState=mn(r.doc.store),n.emit("beforeObserverCalls",[r,n]);let c=[];r.changed.forEach((a,u)=>c.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(r,a)})),c.push(()=>{r.changedParentTypes.forEach((a,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(a=a.filter(l=>l.target._item===null||!l.target._item.deleted),a.forEach(l=>{l.currentTarget=u,l._path=null}),a.sort((l,d)=>l.path.length-d.path.length),c.push(()=>{Tl(u._dEH,a,r)}))}),c.push(()=>n.emit("afterTransaction",[r,n])),c.push(()=>{r._needFormattingCleanup&&Xg(r)})}),Zr(c,[])}finally{n.gc&&kl(s,o,n.gcFilter),Ol(s,o),r.afterState.forEach((l,d)=>{let f=r.beforeState.get(d)||0;if(f!==l){let h=o.clients.get(d),p=Ge(Ee(h,f),1);for(let g=h.length-1;g>=p;)g-=1+ro(h,g)}});for(let l=i.length-1;l>=0;l--){let{client:d,clock:f}=i[l].id,h=o.clients.get(d),p=Ee(h,f);p+1<h.length&&ro(h,p+1)>1||p>0&&ro(h,p)}if(!r.local&&r.afterState.get(n.clientID)!==r.beforeState.get(n.clientID)&&(Qn(Er,tn,"[yjs] ",rn,nn,"Changed the client-id because another client seems to be using it."),n.clientID=Cl()),n.emit("afterTransactionCleanup",[r,n]),n._observers.has("update")){let l=new Ne;pl(l,r)&&n.emit("update",[l.toUint8Array(),r.origin,n,r])}if(n._observers.has("updateV2")){let l=new ge;pl(l,r)&&n.emit("updateV2",[l.toUint8Array(),r.origin,n,r])}let{subdocsAdded:c,subdocsLoaded:a,subdocsRemoved:u}=r;(c.size>0||u.size>0||a.size>0)&&(c.forEach(l=>{l.clientID=n.clientID,l.collectionid==null&&(l.collectionid=n.collectionid),n.subdocs.add(l)}),u.forEach(l=>n.subdocs.delete(l)),n.emit("subdocs",[{loaded:a,added:c,removed:u},n,r]),u.forEach(l=>l.destroy())),t.length<=e+1?(n._transactionCleanups=[],n.emit("afterAllTransactions",[n,t])):Ul(t,e+1)}}},D=(t,e,r=null,n=!0)=>{let o=t._transactionCleanups,s=!1,i=null;t._transaction===null&&(s=!0,t._transaction=new co(t,r,n),o.push(t._transaction),o.length===1&&t.emit("beforeAllTransactions",[t]),t.emit("beforeTransaction",[t._transaction,t]));try{i=e(t._transaction)}finally{if(s){let c=t._transaction===o[0];t._transaction=null,c&&Ul(o,0)}}return i},oi=class{constructor(e,r){this.insertions=r,this.deletions=e,this.meta=new Map}},ml=(t,e,r)=>{Pt(t,r.deletions,n=>{n instanceof k&&e.scope.some(o=>o===t.doc||an(o,n))&&Ci(n,!1)})},yl=(t,e,r)=>{let n=null,o=t.doc,s=t.scope;D(o,c=>{for(;e.length>0&&t.currStackItem===null;){let a=o.store,u=e.pop(),l=new Set,d=[],f=!1;Pt(c,u.insertions,h=>{if(h instanceof k){if(h.redone!==null){let{item:p,diff:g}=ii(a,h.id);g>0&&(p=ne(c,R(p.id.client,p.id.clock+g))),h=p}!h.deleted&&s.some(p=>p===c.doc||an(p,h))&&d.push(h)}}),Pt(c,u.deletions,h=>{h instanceof k&&s.some(p=>p===c.doc||an(p,h))&&!Ht(u.insertions,h.id)&&l.add(h)}),l.forEach(h=>{f=iu(c,h,l,u.insertions,t.ignoreRemoteMapChanges,t)!==null||f});for(let h=d.length-1;h>=0;h--){let p=d[h];t.deleteFilter(p)&&(p.delete(c),f=!0)}t.currStackItem=f?u:null}c.changed.forEach((a,u)=>{a.has(null)&&u._searchMarker&&(u._searchMarker.length=0)}),n=c},t);let i=t.currStackItem;if(i!=null){let c=n.changedParentTypes;t.emit("stack-item-popped",[{stackItem:i,type:r,changedParentTypes:c,origin:t},t]),t.currStackItem=null}return i},Vt=class extends rt{constructor(e,{captureTimeout:r=500,captureTransaction:n=a=>!0,deleteFilter:o=()=>!0,trackedOrigins:s=new Set([null]),ignoreRemoteMapChanges:i=!1,doc:c=xt(e)?e[0].doc:e instanceof Me?e:e.doc}={}){super(),this.scope=[],this.doc=c,this.addToScope(e),this.deleteFilter=o,s.add(this),this.trackedOrigins=s,this.captureTransaction=n,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=i,this.captureTimeout=r,this.afterTransactionHandler=a=>{if(!this.captureTransaction(a)||!this.scope.some(m=>a.changedParentTypes.has(m)||m===this.doc)||!this.trackedOrigins.has(a.origin)&&(!a.origin||!this.trackedOrigins.has(a.origin.constructor)))return;let u=this.undoing,l=this.redoing,d=u?this.redoStack:this.undoStack;u?this.stopCapturing():l||this.clear(!1,!0);let f=new ut;a.afterState.forEach((m,y)=>{let E=a.beforeState.get(y)||0,_=m-E;_>0&&cn(f,y,E,_)});let h=it(),p=!1;if(this.lastChange>0&&h-this.lastChange<this.captureTimeout&&d.length>0&&!u&&!l){let m=d[d.length-1];m.deletions=Mt([m.deletions,a.deleteSet]),m.insertions=Mt([m.insertions,f])}else d.push(new oi(a.deleteSet,f)),p=!0;!u&&!l&&(this.lastChange=h),Pt(a,a.deleteSet,m=>{m instanceof k&&this.scope.some(y=>y===a.doc||an(y,m))&&Ci(m,!0)});let g=[{stackItem:d[d.length-1],origin:a.origin,type:u?"redo":"undo",changedParentTypes:a.changedParentTypes},this];p?this.emit("stack-item-added",g):this.emit("stack-item-updated",g)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(e){let r=new Set(this.scope);e=xt(e)?e:[e],e.forEach(n=>{r.has(n)||(r.add(n),(n instanceof F?n.doc!==this.doc:n!==this.doc)&&Js("[yjs#509] Not same Y.Doc"),this.scope.push(n))})}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,r=!0){(e&&this.canUndo()||r&&this.canRedo())&&this.doc.transact(n=>{e&&(this.undoStack.forEach(o=>ml(n,this,o)),this.undoStack=[]),r&&(this.redoStack.forEach(o=>ml(n,this,o)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:e,redoStackCleared:r}])})}stopCapturing(){this.lastChange=0}undo(){this.undoing=!0;let e;try{e=yl(this,this.undoStack,"undo")}finally{this.undoing=!1}return e}redo(){this.redoing=!0;let e;try{e=yl(this,this.redoStack,"redo")}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}};function*kg(t){let e=T(t.restDecoder);for(let r=0;r<e;r++){let n=T(t.restDecoder),o=t.readClient(),s=T(t.restDecoder);for(let i=0;i<n;i++){let c=t.readInfo();if(c===10){let a=T(t.restDecoder);yield new X(R(o,s),a),s+=a}else if((31&c)!==0){let a=(c&192)===0,u=new k(R(o,s),null,(c&128)===128?t.readLeftID():null,null,(c&64)===64?t.readRightID():null,a?t.readParentInfo()?t.readString():t.readLeftID():null,a&&(c&32)===32?t.readString():null,cu(t,c));yield u,s+=u.length}else{let a=t.readLen();yield new oe(R(o,s),a),s+=a}}}}var Ve=class{constructor(e,r){this.gen=kg(e),this.curr=null,this.done=!1,this.filterSkips=r,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&this.curr!==null&&this.curr.constructor===X);return this.curr}},Og=t=>Ll(t,he),Ll=(t,e=ae)=>{let r=[],n=new e(G(t)),o=new Ve(n,!1);for(let i=o.curr;i!==null;i=o.next())r.push(i);Qn("Structs: ",r);let s=ze(n);Qn("DeleteSet: ",s)},Ug=t=>Pl(t,he),Pl=(t,e=ae)=>{let r=[],n=new e(G(t)),o=new Ve(n,!1);for(let s=o.curr;s!==null;s=o.next())r.push(s);return{structs:r,ds:ze(n)}},un=class{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}},Ml=t=>Bt(t,he,Ne),Nl=(t,e=wr,r=ae)=>{let n=new e,o=new Ve(new r(G(t)),!1),s=o.curr;if(s!==null){let i=0,c=s.id.client,a=s.id.clock!==0,u=a?0:s.id.clock+s.length;for(;s!==null;s=o.next())c!==s.id.client&&(u!==0&&(i++,v(n.restEncoder,c),v(n.restEncoder,u)),c=s.id.client,u=0,a=s.id.clock!==0),s.constructor===X&&(a=!0),a||(u=s.id.clock+s.length);u!==0&&(i++,v(n.restEncoder,c),v(n.restEncoder,u));let l=Ce();return v(l,i),Oa(l,n.restEncoder),n.restEncoder=l,n.toUint8Array()}else return v(n.restEncoder,0),n.toUint8Array()},Lg=t=>Nl(t,dt,he),Vl=(t,e=ae)=>{let r=new Map,n=new Map,o=new Ve(new e(G(t)),!1),s=o.curr;if(s!==null){let i=s.id.client,c=s.id.clock;for(r.set(i,c);s!==null;s=o.next())i!==s.id.client&&(n.set(i,c),r.set(s.id.client,s.id.clock),i=s.id.client),c=s.id.clock+s.length;n.set(i,c)}return{from:r,to:n}},Pg=t=>Vl(t,he),Mg=(t,e)=>{if(t.constructor===oe){let{client:r,clock:n}=t.id;return new oe(R(r,n+e),t.length-e)}else if(t.constructor===X){let{client:r,clock:n}=t.id;return new X(R(r,n+e),t.length-e)}else{let r=t,{client:n,clock:o}=r.id;return new k(R(n,o+e),null,R(n,o+e-1),null,r.rightOrigin,r.parent,r.parentSub,r.content.splice(e))}},Bt=(t,e=ae,r=ge)=>{if(t.length===1)return t[0];let n=t.map(l=>new e(G(l))),o=n.map(l=>new Ve(l,!0)),s=null,i=new r,c=new un(i);for(;o=o.filter(f=>f.curr!==null),o.sort((f,h)=>{if(f.curr.id.client===h.curr.id.client){let p=f.curr.id.clock-h.curr.id.clock;return p===0?f.curr.constructor===h.curr.constructor?0:f.curr.constructor===X?1:-1:p}else return h.curr.id.client-f.curr.id.client}),o.length!==0;){let l=o[0],d=l.curr.id.client;if(s!==null){let f=l.curr,h=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=l.next(),h=!0;if(f===null||f.id.client!==d||h&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(d!==s.struct.id.client)at(c,s.struct,s.offset),s={struct:f,offset:0},l.next();else if(s.struct.id.clock+s.struct.length<f.id.clock)if(s.struct.constructor===X)s.struct.length=f.id.clock+f.length-s.struct.id.clock;else{at(c,s.struct,s.offset);let p=f.id.clock-s.struct.id.clock-s.struct.length;s={struct:new X(R(d,s.struct.id.clock+s.struct.length),p),offset:0}}else{let p=s.struct.id.clock+s.struct.length-f.id.clock;p>0&&(s.struct.constructor===X?s.struct.length-=p:f=Mg(f,p)),s.struct.mergeWith(f)||(at(c,s.struct,s.offset),s={struct:f,offset:0},l.next())}}else s={struct:l.curr,offset:0},l.next();for(let f=l.curr;f!==null&&f.id.client===d&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==X;f=l.next())at(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(at(c,s.struct,s.offset),s=null),_i(c);let a=n.map(l=>ze(l)),u=Mt(a);return Pe(i,u),i.toUint8Array()},wi=(t,e,r=ae,n=ge)=>{let o=pi(e),s=new n,i=new un(s),c=new r(G(t)),a=new Ve(c,!1);for(;a.curr;){let l=a.curr,d=l.id.client,f=o.get(d)||0;if(a.curr.constructor===X){a.next();continue}if(l.id.clock+l.length>f)for(at(i,l,Ge(f-l.id.clock,0)),a.next();a.curr&&a.curr.id.client===d;)at(i,a.curr,0),a.next();else for(;a.curr&&a.curr.id.client===d&&a.curr.id.clock+a.curr.length<=f;)a.next()}_i(i);let u=ze(c);return Pe(s,u),s.toUint8Array()},Ng=(t,e)=>wi(t,e,he,Ne),Bl=t=>{t.written>0&&(t.clientStructs.push({written:t.written,restEncoder:re(t.encoder.restEncoder)}),t.encoder.restEncoder=Ce(),t.written=0)},at=(t,e,r)=>{t.written>0&&t.currClient!==e.id.client&&Bl(t),t.written===0&&(t.currClient=e.id.client,t.encoder.writeClient(e.id.client),v(t.encoder.restEncoder,e.id.clock+r)),e.write(t.encoder,r),t.written++},_i=t=>{Bl(t);let e=t.encoder.restEncoder;v(e,t.clientStructs.length);for(let r=0;r<t.clientStructs.length;r++){let n=t.clientStructs[r];v(e,n.written),hr(e,n.restEncoder)}},Eo=(t,e,r,n)=>{let o=new r(G(t)),s=new Ve(o,!1),i=new n,c=new un(i);for(let u=s.curr;u!==null;u=s.next())at(c,e(u),0);_i(c);let a=ze(o);return Pe(i,a),i.toUint8Array()},jl=({formatting:t=!0,subdocs:e=!0,yxml:r=!0}={})=>{let n=0,o=V(),s=V(),i=V(),c=V();return c.set(null,null),a=>{switch(a.constructor){case oe:case X:return a;case k:{let u=a,l=u.content;switch(l.constructor){case vr:break;case we:{if(r){let d=l.type;d instanceof $t&&(d.nodeName=K(s,d.nodeName,()=>"node-"+n)),d instanceof pn&&(d.hookName=K(s,d.hookName,()=>"hook-"+n))}break}case ft:{let d=l;d.arr=d.arr.map(()=>n);break}case zt:{let d=l;d.content=new Uint8Array([n]);break}case Kt:{let d=l;e&&(d.opts={},d.doc.guid=n+"");break}case Ke:{let d=l;d.embed={};break}case Y:{let d=l;t&&(d.key=K(i,d.key,()=>n+""),d.value=K(c,d.value,()=>({i:n})));break}case gn:{let d=l;d.arr=d.arr.map(()=>n);break}case Te:{let d=l;d.str=xa(n%10+"",d.str.length);break}default:ce()}return u.parentSub&&(u.parentSub=K(o,u.parentSub,()=>n+"")),n++,a}default:ce()}}},Vg=(t,e)=>Eo(t,jl(e),he,Ne),Bg=(t,e)=>Eo(t,jl(e),ae,ge),jg=t=>Eo(t,js,he,ge),Fl=t=>Eo(t,js,ae,Ne),El="You must not compute changes after the event-handler fired.",jt=class{constructor(e,r){this.target=e,this.currentTarget=e,this.transaction=r,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=Fg(this.currentTarget,this.target))}deletes(e){return Ht(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw ke(El);let e=new Map,r=this.target;this.transaction.changed.get(r).forEach(o=>{if(o!==null){let s=r._map.get(o),i,c;if(this.adds(s)){let a=s.left;for(;a!==null&&this.adds(a);)a=a.left;if(this.deletes(s))if(a!==null&&this.deletes(a))i="delete",c=zn(a.content.getContent());else return;else a!==null&&this.deletes(a)?(i="update",c=zn(a.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=zn(s.content.getContent());else return;e.set(o,{action:i,oldValue:c})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw ke(El);let r=this.target,n=De(),o=De(),s=[];if(e={added:n,deleted:o,delta:s,keys:this.keys},this.transaction.changed.get(r).has(null)){let c=null,a=()=>{c&&s.push(c)};for(let u=r._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(a(),c={delete:0}),c.delete+=u.length,o.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(a(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),n.add(u)):((c===null||c.retain===void 0)&&(a(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&a()}this._changes=e}return e}},Fg=(t,e)=>{let r=[];for(;e._item!==null&&e!==t;){if(e._item.parentSub!==null)r.unshift(e._item.parentSub);else{let n=0,o=e._item.parent._start;for(;o!==e._item&&o!==null;)!o.deleted&&o.countable&&(n+=o.length),o=o.right;r.unshift(n)}e=e._item.parent}return r},Z=()=>{Js("Invalid access: Add Yjs type to a document before reading data.")},Yl=80,Si=0,si=class{constructor(e,r){e.marker=!0,this.p=e,this.index=r,this.timestamp=Si++}},Yg=t=>{t.timestamp=Si++},Gl=(t,e,r)=>{t.p.marker=!1,t.p=e,e.marker=!0,t.index=r,t.timestamp=Si++},Gg=(t,e,r)=>{if(t.length>=Yl){let n=t.reduce((o,s)=>o.timestamp<s.timestamp?o:s);return Gl(n,e,r),n}else{let n=new si(e,r);return t.push(n),n}},wo=(t,e)=>{if(t._start===null||e===0||t._searchMarker===null)return null;let r=t._searchMarker.length===0?null:t._searchMarker.reduce((s,i)=>ir(e-s.index)<ir(e-i.index)?s:i),n=t._start,o=0;for(r!==null&&(n=r.p,o=r.index,Yg(r));n.right!==null&&o<e;){if(!n.deleted&&n.countable){if(e<o+n.length)break;o+=n.length}n=n.right}for(;n.left!==null&&o>e;)n=n.left,!n.deleted&&n.countable&&(o-=n.length);for(;n.left!==null&&n.left.id.client===n.id.client&&n.left.id.clock+n.left.length===n.id.clock;)n=n.left,!n.deleted&&n.countable&&(o-=n.length);return r!==null&&ir(r.index-o)<n.parent.length/Yl?(Gl(r,n,o),r):Gg(t._searchMarker,n,o)},dn=(t,e,r)=>{for(let n=t.length-1;n>=0;n--){let o=t[n];if(r>0){let s=o.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(o.index-=s.length);if(s===null||s.marker===!0){t.splice(n,1);continue}o.p=s,s.marker=!0}(e<o.index||r>0&&e===o.index)&&(o.index=Ge(e,o.index+r))}},$g=t=>{t.doc??Z();let e=t._start,r=[];for(;e;)r.push(e),e=e.right;return r},_o=(t,e,r)=>{let n=t,o=e.changedParentTypes;for(;K(o,t,()=>[]).push(r),t._item!==null;)t=t._item.parent;Tl(n._eH,r,e)},F=class{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=ll(),this._dEH=ll(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,r){this.doc=e,this._item=r}_copy(){throw Re()}clone(){throw Re()}_write(e){}get _first(){let e=this._start;for(;e!==null&&e.deleted;)e=e.right;return e}_callObserver(e,r){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){ul(this._eH,e)}observeDeep(e){ul(this._dEH,e)}unobserve(e){dl(this._eH,e)}unobserveDeep(e){dl(this._dEH,e)}toJSON(){}},$l=(t,e,r)=>{t.doc??Z(),e<0&&(e=t._length+e),r<0&&(r=t._length+r);let n=r-e,o=[],s=t._start;for(;s!==null&&n>0;){if(s.countable&&!s.deleted){let i=s.content.getContent();if(i.length<=e)e-=i.length;else{for(let c=e;c<i.length&&n>0;c++)o.push(i[c]),n--;e=0}}s=s.right}return o},zl=t=>{t.doc??Z();let e=[],r=t._start;for(;r!==null;){if(r.countable&&!r.deleted){let n=r.content.getContent();for(let o=0;o<n.length;o++)e.push(n[o])}r=r.right}return e},zg=(t,e)=>{let r=[],n=t._start;for(;n!==null;){if(n.countable&&ct(n,e)){let o=n.content.getContent();for(let s=0;s<o.length;s++)r.push(o[s])}n=n.right}return r},fn=(t,e)=>{let r=0,n=t._start;for(t.doc??Z();n!==null;){if(n.countable&&!n.deleted){let o=n.content.getContent();for(let s=0;s<o.length;s++)e(o[s],r++,t)}n=n.right}},Kl=(t,e)=>{let r=[];return fn(t,(n,o)=>{r.push(e(n,o,t))}),r},Kg=t=>{let e=t._start,r=null,n=0;return{[Symbol.iterator](){return this},next:()=>{if(r===null){for(;e!==null&&e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};r=e.content.getContent(),n=0,e=e.right}let o=r[n++];return r.length<=n&&(r=null),{done:!1,value:o}}}},Hl=(t,e)=>{t.doc??Z();let r=wo(t,e),n=t._start;for(r!==null&&(n=r.p,e-=r.index);n!==null;n=n.right)if(!n.deleted&&n.countable){if(e<n.length)return n.content.getContent()[e];e-=n.length}},ao=(t,e,r,n)=>{let o=r,s=t.doc,i=s.clientID,c=s.store,a=r===null?e._start:r.right,u=[],l=()=>{u.length>0&&(o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new ft(u)),o.integrate(t,0),u=[])};n.forEach(d=>{if(d===null)u.push(d);else switch(d.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(d);break;default:switch(l(),d.constructor){case Uint8Array:case ArrayBuffer:o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new zt(new Uint8Array(d))),o.integrate(t,0);break;case Me:o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new Kt(d)),o.integrate(t,0);break;default:if(d instanceof F)o=new k(R(i,L(c,i)),o,o&&o.lastId,a,a&&a.id,e,null,new we(d)),o.integrate(t,0);else throw new Error("Unexpected content type in insert operation")}}}),l()},ql=()=>ke("Length exceeded!"),Wl=(t,e,r,n)=>{if(r>e._length)throw ql();if(r===0)return e._searchMarker&&dn(e._searchMarker,r,n.length),ao(t,e,null,n);let o=r,s=wo(e,r),i=e._start;for(s!==null&&(i=s.p,r-=s.index,r===0&&(i=i.prev,r+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(r<=i.length){r<i.length&&ne(t,R(i.id.client,i.id.clock+r));break}r-=i.length}return e._searchMarker&&dn(e._searchMarker,o,n.length),ao(t,e,i,n)},Hg=(t,e,r)=>{let o=(e._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:e._start}).p;if(o)for(;o.right;)o=o.right;return ao(t,e,o,r)},Jl=(t,e,r,n)=>{if(n===0)return;let o=r,s=n,i=wo(e,r),c=e._start;for(i!==null&&(c=i.p,r-=i.index);c!==null&&r>0;c=c.right)!c.deleted&&c.countable&&(r<c.length&&ne(t,R(c.id.client,c.id.clock+r)),r-=c.length);for(;n>0&&c!==null;)c.deleted||(n<c.length&&ne(t,R(c.id.client,c.id.clock+n)),c.delete(t),n-=c.length),c=c.right;if(n>0)throw ql();e._searchMarker&&dn(e._searchMarker,o,-s+n)},lo=(t,e,r)=>{let n=e._map.get(r);n!==void 0&&n.delete(t)},bi=(t,e,r,n)=>{let o=e._map.get(r)||null,s=t.doc,i=s.clientID,c;if(n==null)c=new ft([n]);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:c=new ft([n]);break;case Uint8Array:c=new zt(n);break;case Me:c=new Kt(n);break;default:if(n instanceof F)c=new we(n);else throw new Error("Unexpected content type")}new k(R(i,L(s.store,i)),o,o&&o.lastId,null,null,e,r,c).integrate(t,0)},vi=(t,e)=>{t.doc??Z();let r=t._map.get(e);return r!==void 0&&!r.deleted?r.content.getContent()[r.length-1]:void 0},Ql=t=>{let e={};return t.doc??Z(),t._map.forEach((r,n)=>{r.deleted||(e[n]=r.content.getContent()[r.length-1])}),e},Xl=(t,e)=>{t.doc??Z();let r=t._map.get(e);return r!==void 0&&!r.deleted},qg=(t,e,r)=>{let n=t._map.get(e)||null;for(;n!==null&&(!r.sv.has(n.id.client)||n.id.clock>=(r.sv.get(n.id.client)||0));)n=n.left;return n!==null&&ct(n,r)?n.content.getContent()[n.length-1]:void 0},Zl=(t,e)=>{let r={};return t._map.forEach((n,o)=>{let s=n;for(;s!==null&&(!e.sv.has(s.id.client)||s.id.clock>=(e.sv.get(s.id.client)||0));)s=s.left;s!==null&&ct(s,e)&&(r[o]=s.content.getContent()[s.length-1])}),r},eo=t=>(t.doc??Z(),sl(t._map.entries(),e=>!e[1].deleted)),uo=class extends jt{},Ft=class t extends F{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){let r=new t;return r.push(e),r}_integrate(e,r){super._integrate(e,r),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return e.insert(0,this.toArray().map(r=>r instanceof F?r.clone():r)),e}get length(){return this.doc??Z(),this._length}_callObserver(e,r){super._callObserver(e,r),_o(this,e,new uo(this,e))}insert(e,r){this.doc!==null?D(this.doc,n=>{Wl(n,this,e,r)}):this._prelimContent.splice(e,0,...r)}push(e){this.doc!==null?D(this.doc,r=>{Hg(r,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,r=1){this.doc!==null?D(this.doc,n=>{Jl(n,this,e,r)}):this._prelimContent.splice(e,r)}get(e){return Hl(this,e)}toArray(){return zl(this)}slice(e=0,r=this.length){return $l(this,e,r)}toJSON(){return this.map(e=>e instanceof F?e.toJSON():e)}map(e){return Kl(this,e)}forEach(e){fn(this,e)}[Symbol.iterator](){return Kg(this)}_write(e){e.writeTypeRef(gm)}},Wg=t=>new Ft,fo=class extends jt{constructor(e,r,n){super(e,r),this.keysChanged=n}},Yt=class t extends F{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,r){super._integrate(e,r),this._prelimContent.forEach((n,o)=>{this.set(o,n)}),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return this.forEach((r,n)=>{e.set(n,r instanceof F?r.clone():r)}),e}_callObserver(e,r){_o(this,e,new fo(this,e,r))}toJSON(){this.doc??Z();let e={};return this._map.forEach((r,n)=>{if(!r.deleted){let o=r.content.getContent()[r.length-1];e[n]=o instanceof F?o.toJSON():o}}),e}get size(){return[...eo(this)].length}keys(){return Xn(eo(this),e=>e[0])}values(){return Xn(eo(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return Xn(eo(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??Z(),this._map.forEach((r,n)=>{r.deleted||e(r.content.getContent()[r.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?D(this.doc,r=>{lo(r,this,e)}):this._prelimContent.delete(e)}set(e,r){return this.doc!==null?D(this.doc,n=>{bi(n,this,e,r)}):this._prelimContent.set(e,r),r}get(e){return vi(this,e)}has(e){return Xl(this,e)}clear(){this.doc!==null?D(this.doc,e=>{this.forEach(function(r,n,o){lo(e,o,n)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(mm)}},Jg=t=>new Yt,lt=(t,e)=>t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&Vs(t,e),hn=class{constructor(e,r,n,o){this.left=e,this.right=r,this.index=n,this.currentAttributes=o}forward(){this.right===null&&ce(),this.right.content.constructor===Y?this.right.deleted||Cr(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}},wl=(t,e,r)=>{for(;e.right!==null&&r>0;)e.right.content.constructor===Y?e.right.deleted||Cr(e.currentAttributes,e.right.content):e.right.deleted||(r<e.right.length&&ne(t,R(e.right.id.client,e.right.id.clock+r)),e.index+=e.right.length,r-=e.right.length),e.left=e.right,e.right=e.right.right;return e},to=(t,e,r,n)=>{let o=new Map,s=n?wo(e,r):null;if(s){let i=new hn(s.p.left,s.p,s.index,o);return wl(t,i,r-s.index)}else{let i=new hn(null,e._start,0,o);return wl(t,i,r)}},eu=(t,e,r,n)=>{for(;r.right!==null&&(r.right.deleted===!0||r.right.content.constructor===Y&&lt(n.get(r.right.content.key),r.right.content.value));)r.right.deleted||n.delete(r.right.content.key),r.forward();let o=t.doc,s=o.clientID;n.forEach((i,c)=>{let a=r.left,u=r.right,l=new k(R(s,L(o.store,s)),a,a&&a.lastId,u,u&&u.id,e,null,new Y(c,i));l.integrate(t,0),r.right=l,r.forward()})},Cr=(t,e)=>{let{key:r,value:n}=e;n===null?t.delete(r):t.set(r,n)},tu=(t,e)=>{for(;t.right!==null;){if(!(t.right.deleted||t.right.content.constructor===Y&&lt(e[t.right.content.key]??null,t.right.content.value)))break;t.forward()}},ru=(t,e,r,n)=>{let o=t.doc,s=o.clientID,i=new Map;for(let c in n){let a=n[c],u=r.currentAttributes.get(c)??null;if(!lt(u,a)){i.set(c,u);let{left:l,right:d}=r;r.right=new k(R(s,L(o.store,s)),l,l&&l.lastId,d,d&&d.id,e,null,new Y(c,a)),r.right.integrate(t,0),r.forward()}}return i},Qs=(t,e,r,n,o)=>{r.currentAttributes.forEach((f,h)=>{o[h]===void 0&&(o[h]=null)});let s=t.doc,i=s.clientID;tu(r,o);let c=ru(t,e,r,o),a=n.constructor===String?new Te(n):n instanceof F?new we(n):new Ke(n),{left:u,right:l,index:d}=r;e._searchMarker&&dn(e._searchMarker,r.index,a.getLength()),l=new k(R(i,L(s.store,i)),u,u&&u.lastId,l,l&&l.id,e,null,a),l.integrate(t,0),r.right=l,r.index=d,r.forward(),eu(t,e,r,c)},_l=(t,e,r,n,o)=>{let s=t.doc,i=s.clientID;tu(r,o);let c=ru(t,e,r,o);e:for(;r.right!==null&&(n>0||c.size>0&&(r.right.deleted||r.right.content.constructor===Y));){if(!r.right.deleted)switch(r.right.content.constructor){case Y:{let{key:a,value:u}=r.right.content,l=o[a];if(l!==void 0){if(lt(l,u))c.delete(a);else{if(n===0)break e;c.set(a,u)}r.right.delete(t)}else r.currentAttributes.set(a,u);break}default:n<r.right.length&&ne(t,R(r.right.id.client,r.right.id.clock+n)),n-=r.right.length;break}r.forward()}if(n>0){let a="";for(;n>0;n--)a+=`
`;r.right=new k(R(i,L(s.store,i)),r.left,r.left&&r.left.lastId,r.right,r.right&&r.right.id,e,null,new Te(a)),r.right.integrate(t,0),r.forward()}eu(t,e,r,c)},nu=(t,e,r,n,o)=>{let s=e,i=V();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===Y){let u=s.content;i.set(u.key,u)}s=s.right}let c=0,a=!1;for(;e!==s;){if(r===e&&(a=!0),!e.deleted){let u=e.content;if(u.constructor===Y){let{key:l,value:d}=u,f=n.get(l)??null;(i.get(l)!==u||f===d)&&(e.delete(t),c++,!a&&(o.get(l)??null)===d&&f!==d&&(f===null?o.delete(l):o.set(l,f))),!a&&!e.deleted&&Cr(o,u)}}e=e.right}return c},Qg=(t,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;let r=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===Y){let n=e.content.key;r.has(n)?e.delete(t):r.add(n)}e=e.left}},ou=t=>{let e=0;return D(t.doc,r=>{let n=t._start,o=t._start,s=V(),i=$n(s);for(;o;)o.deleted===!1&&(o.content.constructor===Y?Cr(i,o.content):(e+=nu(r,n,o,s,i),s=$n(i),n=o)),o=o.right}),e},Xg=t=>{let e=new Set,r=t.doc;for(let[n,o]of t.afterState.entries()){let s=t.beforeState.get(n)||0;o!==s&&Dl(t,r.store.clients.get(n),s,o,i=>{!i.deleted&&i.content.constructor===Y&&i.constructor!==oe&&e.add(i.parent)})}D(r,n=>{Pt(t,t.deleteSet,o=>{if(o instanceof oe||!o.parent._hasFormatting||e.has(o.parent))return;let s=o.parent;o.content.constructor===Y?e.add(s):Qg(n,o)});for(let o of e)ou(o)})},Sl=(t,e,r)=>{let n=r,o=$n(e.currentAttributes),s=e.right;for(;r>0&&e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case we:case Ke:case Te:r<e.right.length&&ne(t,R(e.right.id.client,e.right.id.clock+r)),r-=e.right.length,e.right.delete(t);break}e.forward()}s&&nu(t,s,e.right,o,e.currentAttributes);let i=(e.left||e.right).parent;return i._searchMarker&&dn(i._searchMarker,e.index,-n+r),e},ho=class extends jt{constructor(e,r,n){super(e,r),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(o=>{o===null?this.childListChanged=!0:this.keysChanged.add(o)})}get changes(){if(this._changes===null){let e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(this._delta===null){let e=this.target.doc,r=[];D(e,n=>{let o=new Map,s=new Map,i=this.target._start,c=null,a={},u="",l=0,d=0,f=()=>{if(c!==null){let h=null;switch(c){case"delete":d>0&&(h={delete:d}),d=0;break;case"insert":(typeof u=="object"||u.length>0)&&(h={insert:u},o.size>0&&(h.attributes={},o.forEach((p,g)=>{p!==null&&(h.attributes[g]=p)}))),u="";break;case"retain":l>0&&(h={retain:l},$a(a)||(h.attributes=Fa({},a))),l=0;break}h&&r.push(h),c=null}};for(;i!==null;){switch(i.content.constructor){case we:case Ke:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),d+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),l+=1);break;case Te:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),d+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),l+=i.length);break;case Y:{let{key:h,value:p}=i.content;if(this.adds(i)){if(!this.deletes(i)){let g=o.get(h)??null;lt(g,p)?p!==null&&i.delete(n):(c==="retain"&&f(),lt(p,s.get(h)??null)?delete a[h]:a[h]=p)}}else if(this.deletes(i)){s.set(h,p);let g=o.get(h)??null;lt(g,p)||(c==="retain"&&f(),a[h]=g)}else if(!i.deleted){s.set(h,p);let g=a[h];g!==void 0&&(lt(g,p)?g!==null&&i.delete(n):(c==="retain"&&f(),p===null?delete a[h]:a[h]=p))}i.deleted||(c==="insert"&&f(),Cr(o,i.content));break}}i=i.right}for(f();r.length>0;){let h=r[r.length-1];if(h.retain!==void 0&&h.attributes===void 0)r.pop();else break}}),this._delta=r}return this._delta}},Sr=class t extends F{constructor(e){super(),this._pending=e!==void 0?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Z(),this._length}_integrate(e,r){super._integrate(e,r);try{this._pending.forEach(n=>n())}catch(n){console.error(n)}this._pending=null}_copy(){return new t}clone(){let e=new t;return e.applyDelta(this.toDelta()),e}_callObserver(e,r){super._callObserver(e,r);let n=new ho(this,e,r);_o(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??Z();let e="",r=this._start;for(;r!==null;)!r.deleted&&r.countable&&r.content.constructor===Te&&(e+=r.content.str),r=r.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:r=!0}={}){this.doc!==null?D(this.doc,n=>{let o=new hn(null,this._start,0,new Map);for(let s=0;s<e.length;s++){let i=e[s];if(i.insert!==void 0){let c=!r&&typeof i.insert=="string"&&s===e.length-1&&o.right===null&&i.insert.slice(-1)===`
`?i.insert.slice(0,-1):i.insert;(typeof c!="string"||c.length>0)&&Qs(n,this,o,c,i.attributes||{})}else i.retain!==void 0?_l(n,this,o,i.retain,i.attributes||{}):i.delete!==void 0&&Sl(n,o,i.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,r,n){this.doc??Z();let o=[],s=new Map,i=this.doc,c="",a=this._start;function u(){if(c.length>0){let d={},f=!1;s.forEach((p,g)=>{f=!0,d[g]=p});let h={insert:c};f&&(h.attributes=d),o.push(h),c=""}}let l=()=>{for(;a!==null;){if(ct(a,e)||r!==void 0&&ct(a,r))switch(a.content.constructor){case Te:{let d=s.get("ychange");e!==void 0&&!ct(a,e)?(d===void 0||d.user!==a.id.client||d.type!=="removed")&&(u(),s.set("ychange",n?n("removed",a.id):{type:"removed"})):r!==void 0&&!ct(a,r)?(d===void 0||d.user!==a.id.client||d.type!=="added")&&(u(),s.set("ychange",n?n("added",a.id):{type:"added"})):d!==void 0&&(u(),s.delete("ychange")),c+=a.content.str;break}case we:case Ke:{u();let d={insert:a.content.getContent()[0]};if(s.size>0){let f={};d.attributes=f,s.forEach((h,p)=>{f[p]=h})}o.push(d);break}case Y:ct(a,e)&&(u(),Cr(s,a.content));break}a=a.right}u()};return e||r?D(i,d=>{e&&ti(d,e),r&&ti(d,r),l()},"cleanup"):l(),o}insert(e,r,n){if(r.length<=0)return;let o=this.doc;o!==null?D(o,s=>{let i=to(s,this,e,!n);n||(n={},i.currentAttributes.forEach((c,a)=>{n[a]=c})),Qs(s,this,i,r,n)}):this._pending.push(()=>this.insert(e,r,n))}insertEmbed(e,r,n){let o=this.doc;o!==null?D(o,s=>{let i=to(s,this,e,!n);Qs(s,this,i,r,n||{})}):this._pending.push(()=>this.insertEmbed(e,r,n||{}))}delete(e,r){if(r===0)return;let n=this.doc;n!==null?D(n,o=>{Sl(o,to(o,this,e,!0),r)}):this._pending.push(()=>this.delete(e,r))}format(e,r,n){if(r===0)return;let o=this.doc;o!==null?D(o,s=>{let i=to(s,this,e,!1);i.right!==null&&_l(s,this,i,r,n)}):this._pending.push(()=>this.format(e,r,n))}removeAttribute(e){this.doc!==null?D(this.doc,r=>{lo(r,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,r){this.doc!==null?D(this.doc,n=>{bi(n,this,e,r)}):this._pending.push(()=>this.setAttribute(e,r))}getAttribute(e){return vi(this,e)}getAttributes(){return Ql(this)}_write(e){e.writeTypeRef(ym)}},Zg=t=>new Sr,on=class{constructor(e,r=()=>!0){this._filter=r,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??Z()}[Symbol.iterator](){return this}next(){let e=this._currentNode,r=e&&e.content&&e.content.type;if(e!==null&&(!this._firstCall||e.deleted||!this._filter(r)))do if(r=e.content.type,!e.deleted&&(r.constructor===$t||r.constructor===Gt)&&r._start!==null)e=r._start;else for(;e!==null;){let n=e.next;if(n!==null){e=n;break}else e.parent===this._root?e=null:e=e.parent._item}while(e!==null&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}},Gt=class t extends F{constructor(){super(),this._prelimContent=[]}get firstChild(){let e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,r){super._integrate(e,r),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new t}clone(){let e=new t;return e.insert(0,this.toArray().map(r=>r instanceof F?r.clone():r)),e}get length(){return this.doc??Z(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new on(this,e)}querySelector(e){e=e.toUpperCase();let n=new on(this,o=>o.nodeName&&o.nodeName.toUpperCase()===e).next();return n.done?null:n.value}querySelectorAll(e){return e=e.toUpperCase(),ve(new on(this,r=>r.nodeName&&r.nodeName.toUpperCase()===e))}_callObserver(e,r){_o(this,e,new po(this,r,e))}toString(){return Kl(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,r={},n){let o=e.createDocumentFragment();return n!==void 0&&n._createAssociation(o,this),fn(this,s=>{o.insertBefore(s.toDOM(e,r,n),null)}),o}insert(e,r){this.doc!==null?D(this.doc,n=>{Wl(n,this,e,r)}):this._prelimContent.splice(e,0,...r)}insertAfter(e,r){if(this.doc!==null)D(this.doc,n=>{let o=e&&e instanceof F?e._item:e;ao(n,this,o,r)});else{let n=this._prelimContent,o=e===null?0:n.findIndex(s=>s===e)+1;if(o===0&&e!==null)throw ke("Reference item not found");n.splice(o,0,...r)}}delete(e,r=1){this.doc!==null?D(this.doc,n=>{Jl(n,this,e,r)}):this._prelimContent.splice(e,r)}toArray(){return zl(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Hl(this,e)}slice(e=0,r=this.length){return $l(this,e,r)}forEach(e){fn(this,e)}_write(e){e.writeTypeRef(wm)}},em=t=>new Gt,$t=class t extends Gt{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,r){super._integrate(e,r),this._prelimAttrs.forEach((n,o)=>{this.setAttribute(o,n)}),this._prelimAttrs=null}_copy(){return new t(this.nodeName)}clone(){let e=new t(this.nodeName),r=this.getAttributes();return Ga(r,(n,o)=>{e.setAttribute(o,n)}),e.insert(0,this.toArray().map(n=>n instanceof F?n.clone():n)),e}toString(){let e=this.getAttributes(),r=[],n=[];for(let c in e)n.push(c);n.sort();let o=n.length;for(let c=0;c<o;c++){let a=n[c];r.push(a+'="'+e[a]+'"')}let s=this.nodeName.toLocaleLowerCase(),i=r.length>0?" "+r.join(" "):"";return`<${s}${i}>${super.toString()}</${s}>`}removeAttribute(e){this.doc!==null?D(this.doc,r=>{lo(r,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,r){this.doc!==null?D(this.doc,n=>{bi(n,this,e,r)}):this._prelimAttrs.set(e,r)}getAttribute(e){return vi(this,e)}hasAttribute(e){return Xl(this,e)}getAttributes(e){return e?Zl(this,e):Ql(this)}toDOM(e=document,r={},n){let o=e.createElement(this.nodeName),s=this.getAttributes();for(let i in s){let c=s[i];typeof c=="string"&&o.setAttribute(i,c)}return fn(this,i=>{o.appendChild(i.toDOM(e,r,n))}),n!==void 0&&n._createAssociation(o,this),o}_write(e){e.writeTypeRef(Em),e.writeKey(this.nodeName)}},tm=t=>new $t(t.readKey()),po=class extends jt{constructor(e,r,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,r.forEach(o=>{o===null?this.childListChanged=!0:this.attributesChanged.add(o)})}},pn=class t extends Yt{constructor(e){super(),this.hookName=e}_copy(){return new t(this.hookName)}clone(){let e=new t(this.hookName);return this.forEach((r,n)=>{e.set(n,r)}),e}toDOM(e=document,r={},n){let o=r[this.hookName],s;return o!==void 0?s=o.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),n!==void 0&&n._createAssociation(s,this),s}_write(e){e.writeTypeRef(_m),e.writeKey(this.hookName)}},rm=t=>new pn(t.readKey()),go=class t extends Sr{get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new t}clone(){let e=new t;return e.applyDelta(this.toDelta()),e}toDOM(e=document,r,n){let o=e.createTextNode(this.toString());return n!==void 0&&n._createAssociation(o,this),o}toString(){return this.toDelta().map(e=>{let r=[];for(let o in e.attributes){let s=[];for(let i in e.attributes[o])s.push({key:i,value:e.attributes[o][i]});s.sort((i,c)=>i.key<c.key?-1:1),r.push({nodeName:o,attrs:s})}r.sort((o,s)=>o.nodeName<s.nodeName?-1:1);let n="";for(let o=0;o<r.length;o++){let s=r[o];n+=`<${s.nodeName}`;for(let i=0;i<s.attrs.length;i++){let c=s.attrs[i];n+=` ${c.key}="${c.value}"`}n+=">"}n+=e.insert;for(let o=r.length-1;o>=0;o--)n+=`</${r[o].nodeName}>`;return n}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(Sm)}},nm=t=>new go,br=class{constructor(e,r){this.id=e,this.length=r}get deleted(){throw Re()}mergeWith(e){return!1}write(e,r,n){throw Re()}integrate(e,r){throw Re()}},om=0,oe=class extends br{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,r){r>0&&(this.id.clock+=r,this.length-=r),Al(e.doc.store,this)}write(e,r){e.writeInfo(om),e.writeLen(this.length-r)}getMissing(e,r){return null}},zt=class t{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new t(this.content)}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeBuf(this.content)}getRef(){return 3}},sm=t=>new zt(t.readBuf()),vr=class t{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new t(this.len)}splice(e){let r=new t(this.len-e);return this.len=e,r}mergeWith(e){return this.len+=e.len,!0}integrate(e,r){cn(e.deleteSet,r.id.client,r.id.clock,this.len),r.markDeleted()}delete(e){}gc(e){}write(e,r){e.writeLen(this.len-r)}getRef(){return 1}},im=t=>new vr(t.readLen()),su=(t,e)=>new Me({guid:t,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1}),Kt=class t{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;let r={};this.opts=r,e.gc||(r.gc=!1),e.autoLoad&&(r.autoLoad=!0),e.meta!==null&&(r.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new t(su(this.doc.guid,this.opts))}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){this.doc._item=r,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,r){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}},cm=t=>new Kt(su(t.readString(),t.readAny())),Ke=class t{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new t(this.embed)}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeJSON(this.embed)}getRef(){return 5}},am=t=>new Ke(t.readJSON()),Y=class t{constructor(e,r){this.key=e,this.value=r}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new t(this.key,this.value)}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){let n=r.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,r){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}},lm=t=>new Y(t.readKey(),t.readJSON()),gn=class t{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new t(this.arr)}splice(e){let r=new t(this.arr.slice(e));return this.arr=this.arr.slice(0,e),r}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){let n=this.arr.length;e.writeLen(n-r);for(let o=r;o<n;o++){let s=this.arr[o];e.writeString(s===void 0?"undefined":JSON.stringify(s))}}getRef(){return 2}},um=t=>{let e=t.readLen(),r=[];for(let n=0;n<e;n++){let o=t.readString();o==="undefined"?r.push(void 0):r.push(JSON.parse(o))}return new gn(r)},dm=en("node_env")==="development",ft=class t{constructor(e){this.arr=e,dm&&Bs(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new t(this.arr)}splice(e){let r=new t(this.arr.slice(e));return this.arr=this.arr.slice(0,e),r}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){let n=this.arr.length;e.writeLen(n-r);for(let o=r;o<n;o++){let s=this.arr[o];e.writeAny(s)}}getRef(){return 8}},fm=t=>{let e=t.readLen(),r=[];for(let n=0;n<e;n++)r.push(t.readAny());return new ft(r)},Te=class t{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new t(this.str)}splice(e){let r=new t(this.str.slice(e));this.str=this.str.slice(0,e);let n=this.str.charCodeAt(e-1);return n>=55296&&n<=56319&&(this.str=this.str.slice(0,e-1)+"\uFFFD",r.str="\uFFFD"+r.str.slice(1)),r}mergeWith(e){return this.str+=e.str,!0}integrate(e,r){}delete(e){}gc(e){}write(e,r){e.writeString(r===0?this.str:this.str.slice(r))}getRef(){return 4}},hm=t=>new Te(t.readString()),pm=[Wg,Jg,Zg,tm,em,rm,nm],gm=0,mm=1,ym=2,Em=3,wm=4,_m=5,Sm=6,we=class t{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new t(this.type._copy())}splice(e){throw Re()}mergeWith(e){return!1}integrate(e,r){this.type._integrate(e.doc,r)}delete(e){let r=this.type._start;for(;r!==null;)r.deleted?r.id.clock<(e.beforeState.get(r.id.client)||0)&&e._mergeStructs.push(r):r.delete(e),r=r.right;this.type._map.forEach(n=>{n.deleted?n.id.clock<(e.beforeState.get(n.id.client)||0)&&e._mergeStructs.push(n):n.delete(e)}),e.changed.delete(this.type)}gc(e){let r=this.type._start;for(;r!==null;)r.gc(e,!0),r=r.right;this.type._start=null,this.type._map.forEach(n=>{for(;n!==null;)n.gc(e,!0),n=n.left}),this.type._map=new Map}write(e,r){this.type._write(e)}getRef(){return 7}},bm=t=>new we(pm[t.readTypeRef()](t)),ii=(t,e)=>{let r=e,n=0,o;do n>0&&(r=R(r.client,r.clock+n)),o=Lt(t,r),n=r.clock-o.id.clock,r=o.redone;while(r!==null&&o instanceof k);return{item:o,diff:n}},Ci=(t,e)=>{for(;t!==null&&t.keep!==e;)t.keep=e,t=t.parent._item},mo=(t,e,r)=>{let{client:n,clock:o}=e.id,s=new k(R(n,o+r),e,R(n,o+r-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(r));return e.deleted&&s.markDeleted(),e.keep&&(s.keep=!0),e.redone!==null&&(s.redone=R(e.redone.client,e.redone.clock+r)),e.right=s,s.right!==null&&(s.right.left=s),t._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),e.length=r,s},bl=(t,e)=>ba(t,r=>Ht(r.deletions,e)),iu=(t,e,r,n,o,s)=>{let i=t.doc,c=i.store,a=i.clientID,u=e.redone;if(u!==null)return ne(t,u);let l=e.parent._item,d=null,f;if(l!==null&&l.deleted===!0){if(l.redone===null&&(!r.has(l)||iu(t,l,r,n,o,s)===null))return null;for(;l.redone!==null;)l=ne(t,l.redone)}let h=l===null?e.parent:l.content.type;if(e.parentSub===null){for(d=e.left,f=e;d!==null;){let y=d;for(;y!==null&&y.parent._item!==l;)y=y.redone===null?null:ne(t,y.redone);if(y!==null&&y.parent._item===l){d=y;break}d=d.left}for(;f!==null;){let y=f;for(;y!==null&&y.parent._item!==l;)y=y.redone===null?null:ne(t,y.redone);if(y!==null&&y.parent._item===l){f=y;break}f=f.right}}else if(f=null,e.right&&!o){for(d=e;d!==null&&d.right!==null&&(d.right.redone||Ht(n,d.right.id)||bl(s.undoStack,d.right.id)||bl(s.redoStack,d.right.id));)for(d=d.right;d.redone;)d=ne(t,d.redone);if(d&&d.right!==null)return null}else d=h._map.get(e.parentSub)||null;let p=L(c,a),g=R(a,p),m=new k(g,d,d&&d.lastId,f,f&&f.id,h,e.parentSub,e.content.copy());return e.redone=g,Ci(m,!0),m.integrate(t,0),m},k=class t extends br{constructor(e,r,n,o,s,i,c,a){super(e,a.getLength()),this.origin=n,this.left=r,this.right=o,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=a,this.info=this.content.isCountable()?2:0}set marker(e){(this.info&8)>0!==e&&(this.info^=8)}get marker(){return(this.info&8)>0}get keep(){return(this.info&1)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(this.info&2)>0}get deleted(){return(this.info&4)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(e,r){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=L(r,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=L(r,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===$e&&this.id.client!==this.parent.client&&this.parent.clock>=L(r,this.parent.client))return this.parent.client;if(this.origin&&(this.left=ni(e,r,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=ne(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===oe||this.right&&this.right.constructor===oe)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===t?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===t&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===$e){let n=Lt(r,this.parent);n.constructor===oe?this.parent=null:this.parent=n.content.type}return null}integrate(e,r){if(r>0&&(this.id.clock+=r,this.left=ni(e,e.doc.store,R(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(r),this.length-=r),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let n=this.left,o;if(n!==null)o=n.right;else if(this.parentSub!==null)for(o=this.parent._map.get(this.parentSub)||null;o!==null&&o.left!==null;)o=o.left;else o=this.parent._start;let s=new Set,i=new Set;for(;o!==null&&o!==this.right;){if(i.add(o),s.add(o),Ut(this.origin,o.origin)){if(o.id.client<this.id.client)n=o,s.clear();else if(Ut(this.rightOrigin,o.rightOrigin))break}else if(o.origin!==null&&i.has(Lt(e.doc.store,o.origin)))s.has(Lt(e.doc.store,o.origin))||(n=o,s.clear());else break;o=o.right}this.left=n}if(this.left!==null){let n=this.left.right;this.right=n,this.left.right=this}else{let n;if(this.parentSub!==null)for(n=this.parent._map.get(this.parentSub)||null;n!==null&&n.left!==null;)n=n.left;else n=this.parent._start,this.parent._start=this;this.right=n}this.right!==null?this.right.left=this:this.parentSub!==null&&(this.parent._map.set(this.parentSub,this),this.left!==null&&this.left.delete(e)),this.parentSub===null&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Al(e.doc.store,this),this.content.integrate(e,this),gl(e,this.parent,this.parentSub),(this.parent._item!==null&&this.parent._item.deleted||this.parentSub!==null&&this.right!==null)&&this.delete(e)}else new oe(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&&e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:R(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&Ut(e.origin,this.lastId)&&this.right===e&&Ut(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&this.redone===null&&e.redone===null&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){let r=this.parent._searchMarker;return r&&r.forEach(n=>{n.p===e&&(n.p=this,!this.deleted&&this.countable&&(n.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,this.right!==null&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){let r=this.parent;this.countable&&this.parentSub===null&&(r._length-=this.length),this.markDeleted(),cn(e.deleteSet,this.id.client,this.id.clock,this.length),gl(e,r,this.parentSub),this.content.delete(e)}}gc(e,r){if(!this.deleted)throw ce();this.content.gc(e),r?Ag(e,this,new oe(this.id,this.length)):this.content=new vr(this.length)}write(e,r){let n=r>0?R(this.id.client,this.id.clock+r-1):this.origin,o=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&31|(n===null?0:128)|(o===null?0:64)|(s===null?0:32);if(e.writeInfo(i),n!==null&&e.writeLeftID(n),o!==null&&e.writeRightID(o),n===null&&o===null){let c=this.parent;if(c._item!==void 0){let a=c._item;if(a===null){let u=yi(c);e.writeParentInfo(!0),e.writeString(u)}else e.writeParentInfo(!1),e.writeLeftID(a.id)}else c.constructor===String?(e.writeParentInfo(!0),e.writeString(c)):c.constructor===$e?(e.writeParentInfo(!1),e.writeLeftID(c)):ce();s!==null&&e.writeString(s)}this.content.write(e,r)}},cu=(t,e)=>vm[e&31](t),vm=[()=>{ce()},im,um,sm,hm,am,lm,bm,fm,cm,()=>{ce()}],Cm=10,X=class extends br{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,r){ce()}write(e,r){e.writeInfo(Cm),v(e.restEncoder,this.length-r)}getMissing(e,r){return null}},au=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},lu="__ $YJS$ __";au[lu]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");au[lu]=!0;var Ri=3e4,qt=class extends sr{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{let r=it();this.getLocalState()!==null&&Ri/2<=r-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());let n=[];this.meta.forEach((o,s)=>{s!==this.clientID&&Ri<=r-o.lastUpdated&&this.states.has(s)&&n.push(s)}),n.length>0&&Ti(this,n,"timeout")},fe(Ri/10)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){let r=this.clientID,n=this.meta.get(r),o=n===void 0?0:n.clock+1,s=this.states.get(r);e===null?this.states.delete(r):this.states.set(r,e),this.meta.set(r,{clock:o,lastUpdated:it()});let i=[],c=[],a=[],u=[];e===null?u.push(r):s==null?e!=null&&i.push(r):(c.push(r),Xr(s,e)||a.push(r)),(i.length>0||a.length>0||u.length>0)&&this.emit("change",[{added:i,updated:a,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(e,r){let n=this.getLocalState();n!==null&&this.setLocalState({...n,[e]:r})}getStates(){return this.states}},Ti=(t,e,r)=>{let n=[];for(let o=0;o<e.length;o++){let s=e[o];if(t.states.has(s)){if(t.states.delete(s),s===t.clientID){let i=t.meta.get(s);t.meta.set(s,{clock:i.clock+1,lastUpdated:it()})}n.push(s)}}n.length>0&&(t.emit("change",[{added:[],updated:[],removed:n},r]),t.emit("update",[{added:[],updated:[],removed:n},r]))};var uu=1,So="fromPersistence",bo="document",Rr="state",Wt="savedAt",du="savedBy",fu="version",vo="gutenberg",xi="syncManager",hu="gutenberg-undo-ignored";var Tr=(t=>(t.AUTHENTICATION_FAILED="authentication-failed",t.CONNECTION_EXPIRED="connection-expired",t.CONNECTION_LIMIT_EXCEEDED="connection-limit-exceeded",t.DOCUMENT_SIZE_LIMIT_EXCEEDED="document-size-limit-exceeded",t.UNKNOWN_ERROR="unknown-error",t))(Tr||{}),Ii=class extends Error{constructor(t="unknown-error",e){super(e),this.code=t,this.name="ConnectionError"}};var gu=w(Ai(),1),{lock:mu,unlock:sb}=(0,gu.__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/sync");function yu(t){return function(...e){let r=performance.now(),n=t.apply(this,e),o=performance.now();return console.log(`[SyncManager][performance]: ${t.name} took ${(o-r).toFixed(2)} ms`),n}}function Eu(t){return((...e)=>t(...e))}function wu(t){return function(...e){setTimeout(()=>{t.apply(this,e)},0)}}var Fu=w(Co(),1);var Mu=w(Co(),1);var Su=0,bu=1,Rm=2,vu=(t,e)=>{v(t,Su);let r=mi(e);J(t,r)},Tm=(t,e,r)=>{v(t,bu),J(t,hi(e,r))},xm=(t,e,r)=>Tm(e,r,Q(t)),Cu=(t,e,r,n)=>{try{fi(e,Q(t),r)}catch(o){n?.(o),console.error("Caught error while handling a Yjs update",o)}};var Im=Cu,Di=(t,e,r,n,o)=>{let s=T(t);switch(s){case Su:xm(t,e,r);break;case bu:Cu(t,r,n,o);break;case Rm:Im(t,r,n,o);break;default:throw new Error("Unknown message type")}return s};var ki=w(Co(),1),Oi=3,Ru=[2e3,4e3,8e3,12e3],Tu=[1e3,2e3,4e3,8e3],xu=3e4,Iu=15e3,Ui=1*1024*1024,yn=50,Li=(0,ki.applyFilters)("sync.pollingManager.pollingInterval",4e3),Au=(0,ki.applyFilters)("sync.pollingManager.pollingIntervalWithCollaborators",1e3),Du=25*1e3;var le=(t=>(t.COMPACTION="compaction",t.SYNC_STEP_1="sync_step1",t.SYNC_STEP_2="sync_step2",t.UPDATE="update",t))(le||{});var Pi=w(Ae(),1);var ku="/wp-sync/v1/updates";function Dm(t){let e="",r=t.byteLength;for(let n=0;n<r;n++)e+=String.fromCharCode(t[n]);return globalThis.btoa(e)}function Mi(t){let e=globalThis.atob(t),r=e.length,n=new Uint8Array(r);for(let o=0;o<r;o++)n[o]=e.charCodeAt(o);return n}function xr(t,e){return{data:Dm(t),type:e}}function Ou(t=[],e=!0){let r=e,n=[...t];return{add(o){n.push(o)},addBulk(o){o.length!==0&&n.push(...o)},clear(){n.splice(0,n.length)},get(){return r?[]:n.splice(0,n.length)},pause(){r=!0},restore(o){let s=o.filter(i=>i.type!==le.COMPACTION);s.length!==0&&n.unshift(...s)},resume(){r=!1},size(){return n.length}}}async function Uu(t){let e=await(0,Pi.default)({body:JSON.stringify(t),headers:{"Content-Type":"application/json"},method:"POST",parse:!1,path:ku});if(!e.ok)throw new Error(`Sync update failed with status ${e.status}`);return await e.json()}function Ni(t){t.rooms.length!==0&&(0,Pi.default)({body:JSON.stringify(t),headers:{"Content-Type":"application/json"},keepalive:!0,method:"POST",parse:!1,path:ku}).catch(()=>{})}function Lu(t,e){let r=parseInt(String(t),10);return isNaN(r)?e:r}function Pu(t,e,r){if(t.length===0)return{window:[],nextOffset:0};let n=(e%t.length+t.length)%t.length;return{window:[...t.slice(n),...t.slice(0,n)].slice(0,Math.max(0,r)),nextOffset:(n+Math.max(0,r))%t.length}}var wn="polling-manager";function km(t){return t?.data?.status===403}function Om(t,e){let r=typeof t.message=="string"?t.message:"",n=[...e].sort((o,s)=>s.length-o.length);for(let o of n)if(r.includes(o))return o;return null}function Um(t,e){let r=Om(t,e.map(n=>n.room));if(r){let n=P.get(r);n&&(n.log("Permission denied, unregistering room",{error:t},"error",!0),_n(r,{sendDisconnectSignal:!1}));for(let o of e){if(o.room===r||!P.has(o.room))continue;let s=P.get(o.room);o.updates.length>0&&s.updateQueue.restore(o.updates)}}else{let n=[...P.keys()];for(let o of n){let s=P.get(o);s&&(s.log("Permission denied, unregistering room",{error:t},"error",!0),_n(o,{sendDisconnectSignal:!1}))}}}var P=new Map;function Lm(t){let e=t.filter(r=>[le.COMPACTION,le.UPDATE].includes(r.type)).map(r=>Mi(r.data));return xr(Bt(e),le.COMPACTION)}function Pm(t){let e=Ce();return vu(e,t),xr(re(e),le.SYNC_STEP_1)}function Mm(t,e){let r=G(e),n=Ce();return Di(r,n,t,wn),xr(re(n),le.SYNC_STEP_2)}function Nm(t,e){let r=e.getStates(),n=new Set,o=new Set,s=new Set(Array.from(r.keys()).filter(i=>!t[i]));Object.entries(t).forEach(([i,c])=>{let a=Number(i);if(a===e.clientID)return;if(c===null){r.delete(a),s.add(a);return}if(!r.has(a)){r.set(a,c),n.add(a);return}let u=r.get(a);JSON.stringify(u)!==JSON.stringify(c)&&(r.set(a,c),o.add(a))}),n.size+o.size>0&&e.emit("change",[{added:Array.from(n),updated:Array.from(o),removed:[]}]),s.size>0&&Ti(e,Array.from(s),wn)}function Vm(t,e,r){let n=Mi(t.data);switch(t.type){case le.SYNC_STEP_1:return Mm(e,n);case le.SYNC_STEP_2:{let o=G(n),s=Ce();Di(o,s,e,wn),r();return}case le.COMPACTION:case le.UPDATE:Be(e,n,wn)}}function Bm(t,e){if(!e.isPrimaryRoom||Vi)return!1;Vi=!0;let r=(0,Mu.applyFilters)("sync.pollingProvider.maxClientsPerRoom",Oi,e.room),n=Object.keys(t).length,o=Lu(r,Oi);return n>o?(e.log("Connection limit exceeded",{clientCount:n,maxClientsPerRoom:o,room:e.room}),!0):!1}var Io=!1,Jt=0,Vi=!1,To=!1,Ro=!1,En=document.visibilityState==="visible",xo=!1,Bi=!1,He=Li,pt=null,ji=0;function Nu(){Bi=!0}function Vu(){let t=Array.from(P.entries()).map(([e,r])=>({after:0,awareness:null,client_id:r.clientId,room:e,updates:[]}));for(let e=0;e<t.length;e+=yn)Ni({rooms:t.slice(e,e+yn)})}function Bu(){let t=En;En=document.visibilityState==="visible",En&&!t&&pt&&(clearTimeout(pt),pt=null,Ao())}function jm(){let t=Array.from(P.values());if(t.length<=yn)return t;let e=t.find(i=>i.isPrimaryRoom),r=t.filter(i=>i!==e),n=yn-(e?1:0),{window:o,nextOffset:s}=Pu(r,ji,n);return ji=s,e?[e,...o]:o}function Ao(){xo=!0,pt=null;async function t(){if(P.size===0){xo=!1;return}Bi=!1;let e=jm(),r={rooms:e.map(n=>({after:n.endCursor??0,awareness:n.localAwarenessState,client_id:n.clientId,room:n.room,updates:n.updateQueue.get()}))};e.forEach(n=>{n.onStatusChange({status:"connecting"})});try{let{rooms:n}=await Uu(r);Jt=0,To=!1,e.forEach(o=>{P.get(o.room)===o&&o.onStatusChange({status:"connected"})}),Ro=!1,n.forEach(o=>{if(!P.has(o.room))return;let s=P.get(o.room);if(s.endCursor=o.end_cursor,Bm(o.awareness,s)){s.onStatusChange({status:"disconnected",error:new Ii(Tr.CONNECTION_LIMIT_EXCEEDED,"Connection limit exceeded")}),_n(o.room);return}s.processAwarenessUpdate(o.awareness),s.isPrimaryRoom&&Object.keys(o.awareness).length>1&&(Ro=!0,P.forEach(c=>{c.updateQueue.resume()}));let i=[];for(let c of o.updates)try{let a=s.processDocUpdate(c);a&&i.push(a)}catch(a){s.log("Failed to apply sync update",{error:a,update:c},"error",!0)}s.updateQueue.addBulk(i),o.should_compact?(s.log("Server requested compaction update"),s.updateQueue.clear(),s.updateQueue.add(s.createCompactionUpdate())):o.compaction_request&&(s.log("Server requested (old) compaction update"),s.updateQueue.add(Lm(o.compaction_request)))}),En&&Ro?He=Au:En?He=Li:He=Du}catch(n){if(km(n)){if(Um(n,r.rooms),P.size===0){xo=!1;return}}else{Jt++;let o=Ro?Tu:Ru;Jt<=o.length?He=o[Jt-1]:He=xu,To&&(He=Iu,To=!1);for(let s of r.rooms){if(!P.has(s.room))continue;let i=P.get(s.room);s.updates.length>0&&i.endCursor>0?(i.updateQueue.clear(),i.updateQueue.add(i.createCompactionUpdate())):s.updates.length>0&&i.updateQueue.restore(s.updates),i.log("Error posting sync update, will retry with backoff",{error:n,nextPoll:He},"error",!0)}if(!Bi){let s=Jt>o.length;e.forEach(i=>{P.get(i.room)===i&&i.onStatusChange({status:"disconnected",canManuallyRetry:!0,consecutiveFailures:Jt,backgroundRetriesFailed:s,willAutoRetryInMs:He})})}}}pt=setTimeout(Ao,He)}t()}function Fm({room:t,doc:e,awareness:r,log:n,onSync:o,onStatusChange:s}){if(P.has(t))return;let i=Ou([Pm(e)]),c=P.size===0;function a(){d.localAwarenessState=r.getLocalState()??{}}function u(f,h){if(wn!==h){if(f.byteLength>Ui){let p=P.get(t);if(!p)return;p.log("Document size limit exceeded",{maxUpdateSizeInBytes:Ui,updateSizeInBytes:f.byteLength}),p.onStatusChange({status:"disconnected",error:new Ii(Tr.DOCUMENT_SIZE_LIMIT_EXCEEDED,"Document size limit exceeded")}),_n(t)}i.add(xr(f,le.UPDATE))}}function l(){e.off("updateV2",u),r.off("change",a),i.clear()}let d={clientId:e.clientID,createCompactionUpdate:()=>xr(ht(e),le.COMPACTION),endCursor:0,isPrimaryRoom:c,localAwarenessState:r.getLocalState()??{},log:n,onStatusChange:s,processAwarenessUpdate:f=>Nm(f,r),processDocUpdate:f=>Vm(f,e,o),room:t,unregister:l,updateQueue:i};e.on("updateV2",u),r.on("change",a),P.set(t,d),Io||(window.addEventListener("beforeunload",Nu),window.addEventListener("pagehide",Vu),document.addEventListener("visibilitychange",Bu),Io=!0),xo||Ao()}function _n(t,{sendDisconnectSignal:e=!0}={}){let r=P.get(t);if(r){if(e){let n=[{after:0,awareness:null,client_id:r.clientId,room:t,updates:[]}];Ni({rooms:n})}r.unregister(),P.delete(t)}P.size===0&&Io&&(window.removeEventListener("beforeunload",Nu),window.removeEventListener("pagehide",Vu),document.removeEventListener("visibilitychange",Bu),Io=!1,Vi=!1,Jt=0,ji=0)}function Ym(){To=!0,pt&&(clearTimeout(pt),pt=null,Ao())}var Sn={registerRoom:Fm,retryNow:Ym,unregisterRoom:_n};var Gm=class extends rt{constructor(t){super(),this.options=t,this.log("Initializing",{room:t.room}),this.awareness=t.awareness??new qt(t.ydoc),this.connect()}awareness;status="disconnected";synced=!1;connect(){this.log("Connecting"),Sn.registerRoom({room:this.options.room,doc:this.options.ydoc,awareness:this.awareness,log:this.log,onStatusChange:this.emitStatus,onSync:this.onSync})}destroy(){this.disconnect(),super.destroy()}disconnect(){this.log("Disconnecting"),Sn.unregisterRoom(this.options.room),this.emitStatus({status:"disconnected"})}emitStatus=t=>{let{status:e}=t,r=e==="disconnected"?t.error:void 0;this.status===e&&!r||e==="connecting"&&this.status!=="disconnected"||(this.log("Status change",{status:e,error:r}),this.status=e,this.emit("status",[t]))};log=(t,e={},r="log",n=!1)=>{if(!this.options.debug&&!n)return;(console[r]||console.log)(`[${this.constructor.name}]: ${t}`,{room:this.options.room,...e})};onSync=()=>{this.synced||(this.synced=!0,this.log("Synced"))}};function ju(){return async({awareness:t,objectType:e,objectId:r,ydoc:n})=>{let o=r?`${e}:${r}`:e,s=new Gm({awareness:t,room:o,ydoc:n});return{destroy:()=>s.destroy(),on:(i,c)=>{s.on(i,c)}}}}var Ir=null;function $m(){return[ju()]}function zm(t){return typeof t=="function"}function Fi(){if(Ir)return Ir;if(!window._wpCollaborationEnabled)return[];let t=(0,Fu.applyFilters)("sync.providers",$m());return Array.isArray(t)?(Ir=t.filter(zm),Ir):(Ir=[],Ir)}var Yu=(t,e)=>{let r=e==="undo"?t.undoStack:t.redoStack;for(;r.length>0;){let n=r.pop(),o=e==="undo"?n.undoStack:n.redoStack,s=o.pop(),i=!1;if(e==="undo"?(n.undoStack=[s],i=n.undo()!==null,n.undoStack=o):(n.redoStack=[s],i=n.redo()!==null,n.redoStack=o),i)return s}return null},Gu=class extends sr{constructor(t=[],e={}){super(),this.docs=new Map,this.trackedOrigins=e.trackedOrigins||new Set([null]),e.trackedOrigins=this.trackedOrigins,this._defaultOpts=e,this.undoStack=[],this.redoStack=[],this.addToScope(t)}addToScope(t){t=xt(t)?t:[t],t.forEach(e=>{let r=e.doc,n=K(this.docs,r,()=>{let o=new Vt([e],this._defaultOpts);return o.on("stack-cleared",({undoStackCleared:s,redoStackCleared:i})=>{this.clear(s,i)}),r.on("destroy",()=>{this.docs.delete(r),this.undoStack=this.undoStack.filter(s=>s.doc!==r),this.redoStack=this.redoStack.filter(s=>s.doc!==r)}),o.on("stack-item-added",s=>{(s.type==="undo"?this.undoStack:this.redoStack).push(o),this.emit("stack-item-added",[{...s,ydoc:r},this])}),o.on("stack-item-updated",s=>{this.emit("stack-item-updated",[{...s,ydoc:r},this])}),o.on("stack-item-popped",s=>{this.emit("stack-item-popped",[{...s,ydoc:r},this])}),o});n.scope.every(o=>o!==e)&&n.scope.push(e)})}addTrackedOrigin(t){this.trackedOrigins.add(t)}removeTrackedOrigin(t){this.trackedOrigins.delete(t)}undo(){return Yu(this,"undo")}redo(){return Yu(this,"redo")}clear(t=!0,e=!0){(t&&this.canUndo()||e&&this.canRedo())&&(this.docs.forEach(r=>{t&&(this.undoStack=[]),e&&(this.redoStack=[]),r.clear(t,e)}),this.emit("stack-cleared",[{undoStackCleared:t,redoStackCleared:e}]))}stopCapturing(){this.docs.forEach(t=>{t.stopCapturing()})}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.docs.forEach(t=>t.destroy()),super.destroy()}};function $u(){let t=new Gu([],{captureTimeout:500,trackedOrigins:new Set([vo])});return{addRecord(e,r=!1){},addToScope(e,r){if(e.doc===null)return;let n=e.doc;t.addToScope(e);let{addUndoMeta:o,restoreUndoMeta:s}=r;t.on("stack-item-added",i=>{o(n,i.stackItem.meta)}),t.on("stack-item-popped",i=>{s(n,i.stackItem.meta)})},undo(){if(t.canUndo())return t.undo(),[]},redo(){if(t.canRedo())return t.redo(),[]},hasUndo(){return t.canUndo()},hasRedo(){return t.canRedo()},stopCapturing(){t.stopCapturing()}}}function Do(t={}){let e=new Map(Object.entries(t));return new Me({meta:e})}function Yi(t){t.getMap(Rr).set(fu,uu)}function Gi(t){let e=t.getMap(Rr);e.set(Wt,Date.now()),e.set(du,t.clientID)}function zu(){return Math.floor(Math.random()*1e9)}function Ku(t){return JSON.stringify({document:Ja(ht(t)),updateId:zu()})}function Hu(t){try{let{document:e}=JSON.parse(t),r={[So]:!0},n=Do(r),o=Qa(e);return Be(n,o),n.clientID=zu(),n}catch{return null}}function gt(t,e){return`${t}_${e}`}function qu(t=!1){let e=t?yu:Eu,r=new Map,n=new Map,o;function s(g,m,y,E={}){t&&console.log(`[SyncManager][${g}]: ${m}`,{...E,entityId:y})}async function i(g,m,y,E,_){let S=Fi(),b=gt(m,y);if(S.length===0){s("loadEntity","no providers, skipping",b);return}if(n.has(b)){s("loadEntity","already loaded",b);return}if(g.shouldSync?.(m,y)===!1){s("loadEntity","shouldSync false, skipping",b);return}s("loadEntity","loading",b),_={addUndoMeta:e(_.addUndoMeta),editRecord:e(_.editRecord),getEditedRecord:e(_.getEditedRecord),onStatusChange:e(_.onStatusChange),persistCRDTDoc:e(_.persistCRDTDoc),refetchRecord:e(_.refetchRecord),restoreUndoMeta:e(_.restoreUndoMeta)};let I=Do({objectType:m}),O=I.getMap(bo),U=I.getMap(Rr),$=Date.now(),j=()=>{s("loadEntity","unloading",b),Ph.forEach(rr=>rr.destroy()),_.onStatusChange(null),O.unobserveDeep(Ie),U.unobserve(be),I.destroy(),n.delete(b)},de=g.createAwareness?.(I,y),Ie=(rr,St)=>{St.local&&!(St.origin instanceof Vt)||p.updateEntityRecord(m,y)},be=(rr,St)=>{St.local||rr.keysChanged.forEach(Mh=>{if(Mh===Wt){let Kc=U.get(Wt);typeof Kc=="number"&&Kc>$&&(s("loadEntity","refetching record",b),_.refetchRecord().catch(()=>{}))}})};o||(o=$u());let{addUndoMeta:Vr,restoreUndoMeta:tr}=_;o.addToScope(O,{addUndoMeta:Vr,restoreUndoMeta:tr});let Vn={awareness:de,handlers:_,objectId:y,objectType:m,syncConfig:g,unload:j,ydoc:I};n.set(b,Vn),s("loadEntity","connecting",b);let Ph=await Promise.all(S.map(async rr=>{let St=await rr({objectType:m,objectId:y,ydoc:I,awareness:de});return St.on("status",_.onStatusChange),St}));O.observeDeep(Ie),U.observe(be),Yi(I),p.applyPersistedCrdtDoc(m,y,E)}async function c(g,m,y){let E=Fi(),_=gt(m,null);if(E.length===0){s("loadCollection","no providers, skipping",_);return}if(r.has(m)){s("loadCollection","already loaded",_);return}if(g.shouldSync?.(m,null)===!1){s("loadCollection","shouldSync false, skipping",_);return}s("loadCollection","loading",_);let S=Do({collection:!0,objectType:m}),b=S.getMap(Rr),I=Date.now(),O=()=>{s("loadCollection","unloading",_),de.forEach(Ie=>Ie.destroy()),y.onStatusChange(null),b.unobserve(U),S.destroy(),r.delete(m)},U=(Ie,be)=>{be.local||Ie.keysChanged.forEach(Vr=>{if(Vr===Wt){let tr=b.get(Wt);typeof tr=="number"&&tr>I&&y.refetchRecords().catch(()=>{})}})},$=g.createAwareness?.(S),j={awareness:$,handlers:y,syncConfig:g,unload:O,ydoc:S};r.set(m,j),s("loadCollection","connecting",_);let de=await Promise.all(E.map(async Ie=>{let be=await Ie({awareness:$,objectType:m,objectId:null,ydoc:S});return be.on("status",y.onStatusChange),be}));b.observe(U),Yi(S)}function a(g,m){let y=gt(g,m);s("unloadEntity","unloading",y),n.get(y)?.unload(),d(g,null,{},origin,{isSave:!0})}function u(g,m){let y=gt(g,m),E=n.get(y);if(!(!E||!E.awareness))return E.awareness}function l(g,m,y){let E=gt(g,m),_=n.get(E);if(!_){s("applyPersistedCrdtDoc","no entity state",E);return}let{handlers:S,syncConfig:{applyChangesToCRDTDoc:b,getChangesFromCRDTDoc:I,getPersistedCRDTDoc:O},ydoc:U}=_,$=O?.(y),j=$?Hu($):null;if(!j){s("applyPersistedCrdtDoc","no persisted doc",E),U.transact(()=>{b(U,y),S.persistCRDTDoc()},xi);return}let de=ht(j);Be(U,de);let Ie=I(j,y),be=Object.keys(Ie);if(j.destroy(),be.length===0){s("applyPersistedCrdtDoc","valid persisted doc",E);return}s("applyPersistedCrdtDoc","invalidated keys",E,{invalidatedKeys:be});let Vr=be.reduce((tr,Vn)=>Object.assign(tr,{[Vn]:y[Vn]}),{});U.transact(()=>{b(U,Vr),S.persistCRDTDoc()},xi)}function d(g,m,y,E,_={}){let{isSave:S=!1,isNewUndoLevel:b=!1}=_,I=gt(g,m),O=n.get(I),U=r.get(g);if(O){let{syncConfig:$,ydoc:j}=O;b&&o&&o.stopCapturing?.(),j.transact(()=>{s("updateCRDTDoc","applying changes",I,{changedKeys:Object.keys(y)}),$.applyChangesToCRDTDoc(j,y),S&&Gi(j)},E)}U&&S&&U.ydoc.transact(()=>{Gi(U.ydoc)},E)}async function f(g,m){let y=gt(g,m),E=n.get(y);if(!E){s("updateEntityRecord","no entity state",y);return}let{handlers:_,syncConfig:S,ydoc:b}=E,I=S.getChangesFromCRDTDoc(b,await _.getEditedRecord()),O=Object.keys(I);O.length!==0&&(s("updateEntityRecord","changes",y,{changedKeys:O}),_.editRecord(I))}async function h(g,m){let y=gt(g,m),E=n.get(y);return E?.ydoc?(await new Promise(_=>setTimeout(_,0)),Ku(E.ydoc)):null}let p={applyPersistedCrdtDoc:e(l),updateEntityRecord:e(f)};return{createPersistedCRDTDoc:e(h),getAwareness:u,load:e(i),loadCollection:e(c),get undoManager(){return o},unload:e(a),update:e(wu(d))}}var Qt=class{diff(e,r,n={}){let o;typeof n=="function"?(o=n,n={}):"callback"in n&&(o=n.callback);let s=this.castInput(e,n),i=this.castInput(r,n),c=this.removeEmpty(this.tokenize(s,n)),a=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(c,a,n,o)}diffWithOptionsObj(e,r,n,o){var s;let i=E=>{if(E=this.postProcess(E,n),o){setTimeout(function(){o(E)},0);return}else return E},c=r.length,a=e.length,u=1,l=c+a;n.maxEditLength!=null&&(l=Math.min(l,n.maxEditLength));let d=(s=n.timeout)!==null&&s!==void 0?s:1/0,f=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],r,e,0,n);if(h[0].oldPos+1>=a&&p+1>=c)return i(this.buildValues(h[0].lastComponent,r,e));let g=-1/0,m=1/0,y=()=>{for(let E=Math.max(g,-u);E<=Math.min(m,u);E+=2){let _,S=h[E-1],b=h[E+1];S&&(h[E-1]=void 0);let I=!1;if(b){let U=b.oldPos-E;I=b&&0<=U&&U<c}let O=S&&S.oldPos+1<a;if(!I&&!O){h[E]=void 0;continue}if(!O||I&&S.oldPos<b.oldPos?_=this.addToPath(b,!0,!1,0,n):_=this.addToPath(S,!1,!0,1,n),p=this.extractCommon(_,r,e,E,n),_.oldPos+1>=a&&p+1>=c)return i(this.buildValues(_.lastComponent,r,e))||!0;h[E]=_,_.oldPos+1>=a&&(m=Math.min(m,E-1)),p+1>=c&&(g=Math.max(g,E+1))}u++};if(o)(function E(){setTimeout(function(){if(u>l||Date.now()>f)return o(void 0);y()||E()},0)})();else for(;u<=l&&Date.now()<=f;){let E=y();if(E)return E}}addToPath(e,r,n,o,s){let i=e.lastComponent;return i&&!s.oneChangePerToken&&i.added===r&&i.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:i.count+1,added:r,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:i}}}extractCommon(e,r,n,o,s){let i=r.length,c=n.length,a=e.oldPos,u=a-o,l=0;for(;u+1<i&&a+1<c&&this.equals(n[a+1],r[u+1],s);)u++,a++,l++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!s.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,u}equals(e,r,n){return n.comparator?n.comparator(e,r):e===r||!!n.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let n=0;n<e.length;n++)e[n]&&r.push(e[n]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,n){let o=[],s;for(;e;)o.push(e),s=e.previousComponent,delete e.previousComponent,e=s;o.reverse();let i=o.length,c=0,a=0,u=0;for(;c<i;c++){let l=o[c];if(l.removed)l.value=this.join(n.slice(u,u+l.count)),u+=l.count;else{if(!l.added&&this.useLongestToken){let d=r.slice(a,a+l.count);d=d.map(function(f,h){let p=n[u+h];return p.length>f.length?p:f}),l.value=this.join(d)}else l.value=this.join(r.slice(a,a+l.count));a+=l.count,l.added||(u+=l.count)}}return o}};var $i=class extends Qt{},Wu=new $i;function ko(t,e,r){return Wu.diff(t,e,r)}var zi=class extends Qt{constructor(){super(...arguments),this.tokenize=Km}equals(e,r,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
`))&&(e=e.trim()),(!n.newlineIsToken||!r.includes(`
`))&&(r=r.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
`)&&(e=e.slice(0,-1)),r.endsWith(`
`)&&(r=r.slice(0,-1))),super.equals(e,r,n)}},Ju=new zi;function Ki(t,e,r){return Ju.diff(t,e,r)}function Km(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,`
`));let r=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let o=0;o<n.length;o++){let s=n[o];o%2&&!e.newlineIsToken?r[r.length-1]+=s:r.push(s)}return r}var Oo=w(Qe(),1);var Qu=w(Qe(),1);function Hm(t){return JSON.parse(JSON.stringify(t))}var Hi;(t=>{function e(s={},i={},c=!1){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});let a=Hm(i);c||(a=Object.keys(a).reduce((u,l)=>((a[l]!==null||a[l]!==void 0)&&(u[l]=a[l]),u),{}));for(let u in s)s[u]!==void 0&&i[u]===void 0&&(a[u]=s[u]);return Object.keys(a).length>0?a:void 0}t.compose=e;function r(s={},i={}){typeof s!="object"&&(s={}),typeof i!="object"&&(i={});let c=Object.keys(s).concat(Object.keys(i)).reduce((a,u)=>((0,Qu.default)(s[u],i[u])||(a[u]=i[u]===void 0?null:i[u]),a),{});return Object.keys(c).length>0?c:void 0}t.diff=r;function n(s={},i={}){s=s||{};let c=Object.keys(i).reduce((a,u)=>(i[u]!==s[u]&&s[u]!==void 0&&(a[u]=i[u]),a),{});return Object.keys(s).reduce((a,u)=>(s[u]!==i[u]&&i[u]===void 0&&(a[u]=null),a),c)}t.invert=n;function o(s,i,c=!1){if(typeof s!="object")return i;if(typeof i!="object")return;if(!c)return i;let a=Object.keys(i).reduce((u,l)=>(s[l]===void 0&&(u[l]=i[l]),u),{});return Object.keys(a).length>0?a:void 0}t.transform=o})(Hi||(Hi={}));var Xt=Hi;var qi;(t=>{function e(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}t.length=e})(qi||(qi={}));var _e=qi;var se=class{ops;index;offset;constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);let e=this.ops[this.index];if(e){let r=this.offset,n=_e.length(e);if(t>=n-r?(t=n-r,this.index+=1,this.offset=0):this.offset+=t,typeof e.delete=="number")return{delete:t};let o={};return e.attributes&&(o.attributes=e.attributes),typeof e.retain=="number"?o.retain=t:typeof e.retain=="object"&&e.retain!==null?o.retain=e.retain:typeof e.insert=="string"?o.insert=e.insert.substr(r,t):o.insert=e.insert,o}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?_e.length(this.ops[this.index])-this.offset:1/0}peekType(){let t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index)}else return[];let t=this.offset,e=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=t,this.index=e,[r].concat(n)}};function qm(t){return JSON.parse(JSON.stringify(t))}var Wm="\0",Jm=1e4;function Wi(t){return t.map(e=>({...e,count:e.value.length}))}var Xu=(t,e)=>{if(typeof t!="object"||t===null)throw new Error(`cannot retain a ${typeof t}`);if(typeof e!="object"||e===null)throw new Error(`cannot retain a ${typeof e}`);let r=Object.keys(t)[0];if(!r||r!==Object.keys(e)[0])throw new Error(`embed types not matched: ${r} != ${Object.keys(e)[0]}`);return[r,t[r],e[r]]},Qm=class ue{static Op=_e;static OpIterator=se;static AttributeMap=Xt;static handlers={};static registerEmbed(e,r){this.handlers[e]=r}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){let r=this.handlers[e];if(!r)throw new Error(`no handlers for embed type "${e}"`);return r}ops;constructor(e){Array.isArray(e)?this.ops=e:e!=null&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}insert(e,r){let n={};return typeof e=="string"&&e.length===0?this:(n.insert=e,r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,r){if(typeof e=="number"&&e<=0)return this;let n={retain:e};return r!=null&&typeof r=="object"&&Object.keys(r).length>0&&(n.attributes=r),this.push(n)}push(e){let r=this.ops.length,n=this.ops[r-1];if(e=qm(e),typeof n=="object"){if(typeof e.delete=="number"&&typeof n.delete=="number")return this.ops[r-1]={delete:n.delete+e.delete},this;if(typeof n.delete=="number"&&e.insert!==null&&e.insert!==void 0&&(r-=1,n=this.ops[r-1],typeof n!="object"))return this.ops.unshift(e),this;if((0,Oo.default)(e.attributes,n.attributes)){if(typeof e.insert=="string"&&typeof n.insert=="string")return this.ops[r-1]={insert:n.insert+e.insert},typeof e.attributes=="object"&&(this.ops[r-1].attributes=e.attributes),this;if(typeof e.retain=="number"&&typeof n.retain=="number")return this.ops[r-1]={retain:n.retain+e.retain},typeof e.attributes=="object"&&(this.ops[r-1].attributes=e.attributes),this}}return r===this.ops.length?this.ops.push(e):this.ops.splice(r,0,e),this}chop(){let e=this.ops[this.ops.length-1];return e&&typeof e.retain=="number"&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){let r=[],n=[];return this.forEach(o=>{(e(o)?r:n).push(o)}),[r,n]}reduce(e,r){return this.ops.reduce(e,r)}changeLength(){return this.reduce((e,r)=>r.insert?e+_e.length(r):r.delete?e-r.delete:e,0)}length(){return this.reduce((e,r)=>e+_e.length(r),0)}slice(e=0,r=1/0){let n=[],o=new se(this.ops),s=0;for(;s<r&&o.hasNext();){let i;s<e?i=o.next(e-s):(i=o.next(r-s),n.push(i)),s+=_e.length(i)}return new ue(n)}compose(e){let r=new se(this.ops),n=new se(e.ops),o=[],s=n.peek();if(s!=null&&typeof s.retain=="number"&&(s.attributes===null||s.attributes===void 0)){let c=s.retain;for(;r.peekType()==="insert"&&r.peekLength()<=c;)c-=r.peekLength(),o.push(r.next());s.retain-c>0&&n.next(s.retain-c)}let i=new ue(o);for(;r.hasNext()||n.hasNext();)if(n.peekType()==="insert")i.push(n.next());else if(r.peekType()==="delete")i.push(r.next());else{let c=Math.min(r.peekLength(),n.peekLength()),a=r.next(c),u=n.next(c);if(u.retain){let l={};if(typeof a.retain=="number")l.retain=typeof u.retain=="number"?c:u.retain;else if(typeof u.retain=="number")a.retain===null||a.retain===void 0?l.insert=a.insert:l.retain=a.retain;else{let f=a.retain===null||a.retain===void 0?"insert":"retain",[h,p,g]=Xu(a[f],u.retain),m=ue.getHandler(h);l[f]={[h]:m.compose(p,g,f==="retain")}}let d=Xt.compose(a.attributes,u.attributes,typeof a.retain=="number");if(d&&(l.attributes=d),i.push(l),!n.hasNext()&&(0,Oo.default)(i.ops[i.ops.length-1],l)){let f=new ue(r.rest());return i.concat(f).chop()}}else typeof u.delete=="number"&&(typeof a.retain=="number"||typeof a.retain=="object"&&a.retain!==null)&&i.push(u)}return i.chop()}concat(e){let r=new ue(this.ops.slice());return e.ops.length>0&&(r.push(e.ops[0]),r.ops=r.ops.concat(e.ops.slice(1))),r}diff(e){if(this.ops===e.ops)return new ue;let r=this.deltasToStrings(e),n=Wi(ko(r[0],r[1])),o=new se(this.ops),s=new se(e.ops);return this.convertChangesToDelta(n,o,s).chop()}eachLine(e,r=`
`){let n=new se(this.ops),o=new ue,s=0;for(;n.hasNext();){if(n.peekType()!=="insert")return;let i=n.peek(),c=_e.length(i)-n.peekLength(),a=typeof i.insert=="string"?i.insert.indexOf(r,c)-c:-1;if(a<0)o.push(n.next());else if(a>0)o.push(n.next(a));else{if(e(o,n.next(1).attributes||{},s)===!1)return;s+=1,o=new ue}}o.length()>0&&e(o,{},s)}invert(e){let r=new ue;return this.reduce((n,o)=>{if(o.insert)r.delete(_e.length(o));else{if(typeof o.retain=="number"&&(o.attributes===null||o.attributes===void 0))return r.retain(o.retain),n+o.retain;if(o.delete||typeof o.retain=="number"){let s=o.delete||o.retain;return e.slice(n,n+s).forEach(c=>{o.delete?r.push(c):o.retain&&o.attributes&&r.retain(_e.length(c),Xt.invert(o.attributes,c.attributes))}),n+s}else if(typeof o.retain=="object"&&o.retain!==null){let s=e.slice(n,n+1),i=new se(s.ops).next(),[c,a,u]=Xu(o.retain,i.insert),l=ue.getHandler(c);return r.retain({[c]:l.invert(a,u)},Xt.invert(o.attributes,i.attributes)),n+1}}return n},0),r.chop()}transform(e,r=!1){if(r=!!r,typeof e=="number")return this.transformPosition(e,r);let n=e,o=new se(this.ops),s=new se(n.ops),i=new ue;for(;o.hasNext()||s.hasNext();)if(o.peekType()==="insert"&&(r||s.peekType()!=="insert"))i.retain(_e.length(o.next()));else if(s.peekType()==="insert")i.push(s.next());else{let c=Math.min(o.peekLength(),s.peekLength()),a=o.next(c),u=s.next(c);if(a.delete)continue;if(u.delete)i.push(u);else{let l=a.retain,d=u.retain,f=typeof d=="object"&&d!==null?d:c;if(typeof l=="object"&&l!==null&&typeof d=="object"&&d!==null){let h=Object.keys(l)[0];if(h===Object.keys(d)[0]){let p=ue.getHandler(h);p&&(f={[h]:p.transform(l[h],d[h],r)})}}i.retain(f,Xt.transform(a.attributes,u.attributes,r))}}return i.chop()}transformPosition(e,r=!1){r=!!r;let n=new se(this.ops),o=0;for(;n.hasNext()&&o<=e;){let s=n.peekLength(),i=n.peekType();if(n.next(),i==="delete"){e-=Math.min(s,e-o);continue}else i==="insert"&&(o<e||!r)&&(e+=s);o+=s}return e}diffWithCursor(e,r){if(this.ops===e.ops)return new ue;let n=this.deltasToStrings(e);if(Math.max(...n.map(d=>d.length))>Jm){let d=Wi(Ki(n[0],n[1])),f=new se(this.ops),h=new se(e.ops);return this.convertChangesToDelta(d,f,h).chop()}else if(r===null)return this.diff(e);let s=Wi(ko(n[0],n[1])),i=0,c=[];for(let d=0;d<s.length;d++){let f=s[d],h=i,p=i+(f.count??0),g=r>h&&r<=p,m=!f.added&&!f.removed,y=f.removed&&!f.added,E=s[d+1],_=E&&E.added&&!E.removed;if(m&&g&&_){let S=this.tryMoveInsertionToCursor(f,E,r,h);if(S){c.push(...S),d++,i=p;continue}}if(y){let S=this.tryMoveDeletionToCursor(f,c,r,i);if(S){c.pop(),c.push(...S),i+=f.count??0;continue}}c.push(f),f.added||(i+=f.count??0)}s=c;let a=new se(this.ops),u=new se(e.ops);return this.convertChangesToDelta(s,a,u).chop()}tryMoveInsertionToCursor(e,r,n,o){let s=r.value,i=s.length,c=n-o-i;if(!(e.value.substring(c,c+s.length)===s))return null;let l=e.value.substring(0,c),d=e.value.substring(c),f=[];return l.length>0&&f.push({value:l,count:l.length,added:!1,removed:!1}),f.push(r),d.length>0&&f.push({value:d,count:d.length,added:!1,removed:!1}),f}tryMoveDeletionToCursor(e,r,n,o){let s=r[r.length-1];if(!s||s.added||s.removed)return null;let i=o-(s.count??0),c=o;if(n<i||n>=c)return null;let a=e.value,u=n-i;if(!(s.value.substring(u,u+a.length)===a))return null;let f=s.value.substring(0,u),h=s.value.substring(u),p=e.count??0,g=h.substring(p),m=[];return f.length>0&&m.push({value:f,count:f.length,added:!1,removed:!1}),m.push(e),g.length>0&&m.push({value:g,count:g.length,added:!1,removed:!1}),m}deltasToStrings(e){return[this,e].map(r=>r.map(n=>{if(n.insert!==null||n.insert!==void 0)return typeof n.insert=="string"?n.insert:Wm;let o=r===e?"on":"with";throw new Error("diff() called "+o+" non-document")}).join(""))}convertChangesToDelta(e,r,n){let o=new ue;return e.forEach(s=>{let i=s.count??0;for(;i>0;){let c=0;if(s.added)c=Math.min(n.peekLength(),i),o.push(n.next(c));else if(s.removed)c=Math.min(i,r.peekLength()),r.next(c),o.delete(c);else{c=Math.min(r.peekLength(),n.peekLength(),i);let a=r.next(c),u=n.next(c);(0,Oo.default)(a.insert,u.insert)?o.retain(c,Xt.diff(a.attributes,u.attributes)):o.push(u).delete(c)}i-=c}}),o}},Zu=Qm;var Uo={};mu(Uo,{ConnectionErrorCode:Tr,createSyncManager:qu,Delta:Zu,CRDT_DOC_META_PERSISTENCE_KEY:So,CRDT_RECORD_MAP_KEY:bo,LOCAL_EDITOR_ORIGIN:vo,LOCAL_UNDO_IGNORED_ORIGIN:hu,retrySyncConnection:()=>Sn.retryNow()});var Od=w(Ar(),1);var ud=w(W(),1);var td=100,rd=5,nd=5e3;function Xm(){let t=window.navigator.userAgent,e="Unknown";return t.includes("Firefox")?e="Firefox":t.includes("Edg")?e="Microsoft Edge":t.includes("Chrome")&&!t.includes("Edg")?e="Chrome":t.includes("Safari")&&!t.includes("Chrome")?e="Safari":t.includes("MSIE")||t.includes("Trident")?e="Internet Explorer":(t.includes("Opera")||t.includes("OPR"))&&(e="Opera"),e}function od(t,e,r){if(t.size!==e.size)return!1;for(let[n,o]of t.entries())if(!e.has(n)||!r(o,e.get(n)))return!1;return!0}function sd(t,e){return!t||!e?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.entries(t).every(([r,n])=>n===e[r])}function id(t){let{avatar_urls:e,id:r,name:n,slug:o}=t;return{avatar_urls:e,browserType:Xm(),enteredAt:Date.now(),id:r,name:n,slug:o}}function cd(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:null}function Ji(t){return Object.keys(t)}var ad=class extends qt{getStates(){return super.getStates()}getLocalStateField(t){let e=this.getLocalState();return cd(e,t)}setLocalStateField(t,e){super.setLocalStateField(t,e)}};var Zm=class extends ad{setLocalStateField(t,e){this.isFieldEqual(t,e,this.getLocalStateField(t)??void 0)||super.setLocalStateField(t,e)}isFieldEqual(t,e,r){if(["clientId","isConnected","isMe"].includes(t))return e===r;if(t in this.equalityFieldChecks){let n=this.equalityFieldChecks[t];return n(e,r)}throw new Error(`No equality check implemented for awareness state field "${t.toString()}".`)}isStateEqual(t,e){return[...new Set([...Ji(t),...Ji(e)])].every(r=>{let n=t[r],o=e[r];return this.isFieldEqual(r,n,o)})}},ld=class extends Zm{hasSetupRun=!1;disconnectedCollaborators=new Set;seenStates=new Map;previousSnapshot=new Map;stateSubscriptions=[];myThrottledState={};throttleTimeouts=new Map;setUp=()=>{this.hasSetupRun||(this.hasSetupRun=!0,this.onSetUp(),this.on("change",({added:t,removed:e,updated:r})=>{[...t,...r].forEach(n=>{this.disconnectedCollaborators.delete(n)}),e.forEach(n=>{this.disconnectedCollaborators.add(n),setTimeout(()=>{this.disconnectedCollaborators.delete(n),this.updateSubscribers(!0)},nd)}),this.updateSubscribers()}))};getCurrentState(){return Array.from(this.previousSnapshot.values())}getSeenStates(){return this.seenStates}onStateChange(t){return this.stateSubscriptions.push(t),()=>{this.stateSubscriptions=this.stateSubscriptions.filter(e=>e!==t)}}setThrottledLocalStateField(t,e,r){this.setLocalStateField(t,e),this.throttleTimeouts.set(t,setTimeout(()=>{this.throttleTimeouts.delete(t),this.myThrottledState[t]&&(this.setLocalStateField(t,this.myThrottledState[t]),delete this.myThrottledState[t])},r))}setConnectionStatus(t){t?this.disconnectedCollaborators.delete(this.clientID):this.disconnectedCollaborators.add(this.clientID),this.updateSubscribers(!0)}updateSubscribers(t=!1){if(!this.stateSubscriptions.length)return;let e=this.getStates();this.seenStates=new Map([...this.seenStates.entries(),...e.entries()]);let r=new Map([...this.disconnectedCollaborators,...e.keys()].filter(n=>Object.keys(this.seenStates.get(n)??{}).length>0).map(n=>{let o=this.seenStates.get(n),s=!this.disconnectedCollaborators.has(n),i=n===this.clientID,c=i?this.myThrottledState:{},a={...o,...c,clientId:n,isConnected:s,isMe:i};return[n,a]}));!t&&od(this.previousSnapshot,r,this.isStateEqual.bind(this))||(this.previousSnapshot=r,this.stateSubscriptions.forEach(n=>{n(Array.from(r.values()))}))}};var x="core";var Qi=class extends ld{onSetUp(){this.setCurrentCollaboratorInfo()}async setCurrentCollaboratorInfo(){let t=await(0,ud.resolveSelect)(x).getCurrentUser(),e=id(t);this.setLocalStateField("collaboratorInfo",e)}},Xi={collaboratorInfo:sd},dd=class extends Qi{equalityFieldChecks=Xi};var fd=w(W(),1);var hd=w(Ar(),1);function Zi(t){let e=[],r=t;for(;r;){let n=r.parent;if(!n||!(n instanceof C.Array))return null;let o=-1;for(let i=0;i<n.length;i++)if(n.get(i)===r){o=i;break}if(o===-1)return null;e.unshift(o);let s=n.parent;if(s instanceof C.Map&&s.get("clientId")!==void 0)r=s;else break}return e}function ec(t){if(t.length===0)return null;let{getBlocks:e}=(0,fd.select)(hd.store),n=ey(e(),e);for(let o=0;o<t.length;o++){let s=n[t[o]];if(!s)return null;if(o===t.length-1)return s.clientId;n=s.innerBlocks}return null}function ey(t,e){let r=pd(t,"core/post-content");return r?e(r.clientId):t}function pd(t,e){for(let r of t){if(r.name===e)return r;if(r.innerBlocks?.length){let n=pd(r.innerBlocks,e);if(n)return n}}return null}var mt=w(bn(),1);var md=w(Ai(),1),{lock:yd,unlock:Se}=(0,md.__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/core-data");var{ConnectionErrorCode:Ed,createSyncManager:ty,Delta:tc,CRDT_DOC_META_PERSISTENCE_KEY:wd,CRDT_RECORD_MAP_KEY:qe,LOCAL_EDITOR_ORIGIN:_d,LOCAL_UNDO_IGNORED_ORIGIN:rc,retrySyncConnection:Sd}=Se(Uo),Lo;function pe(){return Lo||(Lo=ty(),Lo)}function yt(t,e){return t.getMap(e)}function Po(t={}){return new C.Map(Object.entries(t))}function vd(t){return t instanceof C.Map}function vn(t,e){let n=yt(e,qe).get("blocks");return n instanceof C.Array?Rd(t,n):null}var bd=57344;function Cd(t){for(let r=bd;r<bd+16;r++){let n=String.fromCharCode(r);if(!t.includes(n))return n}return null}function Mo(t,e){if(!t.includes("<")&&!t.includes("&"))return e;let r=Cd(t);if(!r)return e;let n=t.slice(0,e)+r+t.slice(e),s=(0,mt.create)({html:n}).text.indexOf(r);return s===-1?e:s}function No(t,e){if(!t.includes("<")&&!t.includes("&"))return e;let r=Cd(t);if(!r)return e;let n=(0,mt.create)({html:t}),o=(0,mt.create)({text:r});n.formats[e]&&(o.formats[0]=n.formats[e]);let s=(0,mt.insert)(n,o,e,e),c=(0,mt.toHTMLString)({value:s}).indexOf(r);return c===-1?e:c}function Rd(t,e){for(let r of e){if(r.get("clientId")===t)return r;let n=r.get("innerBlocks");if(n&&n.length>0){let o=Rd(t,n);if(o)return o}}return null}var Td=w(W(),1);var xd=w(Ar(),1);var Dr=(t=>(t.None="none",t.Cursor="cursor",t.SelectionInOneBlock="selection-in-one-block",t.SelectionInMultipleBlocks="selection-in-multiple-blocks",t.WholeBlock="whole-block",t))(Dr||{}),kr=(t=>(t.Forward="f",t.Backward="b",t))(kr||{});function Id(t,e,r,n){let{selectionDirection:o}=n??{},i=yt(r,qe).get("blocks"),c=Object.keys(t).length===0,a={type:"none"};if(c||!i)return a;let u=t.clientId===e.clientId,l=u&&t.offset===e.offset;if(u&&t.offset===void 0&&e.offset===void 0){let p=Ad(t.clientId),g=p?ny(p,i):null;return g?{type:"whole-block",blockPosition:g}:a}else if(l){let p=Cn(t,i);return p?{type:"cursor",cursorPosition:p}:a}else if(u){let p=Cn(t,i),g=Cn(e,i);return!p||!g?a:{type:"selection-in-one-block",cursorStartPosition:p,cursorEndPosition:g,selectionDirection:o}}let f=Cn(t,i),h=Cn(e,i);return!f||!h?a:{type:"selection-in-multiple-blocks",cursorStartPosition:f,cursorEndPosition:h,selectionDirection:o}}function Cn(t,e){let r=Ad(t.clientId),n=r?ry(r,e):null;if(!n||!t.attributeKey||t.offset===void 0)return null;let s=n.get("attributes")?.get(t.attributeKey);return s instanceof C.Text?{relativePosition:C.createRelativePositionFromTypeIndex(s,No(s.toString(),t.offset)),absoluteOffset:t.offset}:null}function Ad(t){let{getBlockIndex:e,getBlockRootClientId:r,getBlockName:n}=(0,Td.select)(xd.store),o=[],s=t;for(;s;){let i=e(s);if(i===-1)return null;o.unshift(i);let c=r(s);if(!c||n(c)==="core/post-content")break;s=c}return o.length>0?o:null}function ry(t,e){let r=e;for(let n=0;n<t.length;n++){if(t[n]>=r.length)return null;let o=r.get(t[n]);if(!o)return null;if(n===t.length-1)return o;r=o.get("innerBlocks")??new C.Array}return null}function ny(t,e){let r=e;for(let n=0;n<t.length;n++){if(t[n]>=r.length)return null;if(n===t.length-1)return C.createRelativePositionFromTypeIndex(r,t[n]);r=r.get(t[n])?.get("innerBlocks")??new C.Array}return null}function Dd(t,e){if(t.type!==e.type)return!1;switch(t.type){case"none":return!0;case"cursor":return Rn(t.cursorPosition,e.cursorPosition);case"selection-in-one-block":return Rn(t.cursorStartPosition,e.cursorStartPosition)&&Rn(t.cursorEndPosition,e.cursorEndPosition)&&t.selectionDirection===e.selectionDirection;case"selection-in-multiple-blocks":return Rn(t.cursorStartPosition,e.cursorStartPosition)&&Rn(t.cursorEndPosition,e.cursorEndPosition)&&t.selectionDirection===e.selectionDirection;case"whole-block":return C.compareRelativePositions(t.blockPosition,e.blockPosition);default:return!1}}function Rn(t,e){let r=C.compareRelativePositions(t.relativePosition,e.relativePosition),n=t.absoluteOffset===e.absoluteOffset;return r&&n}var Ud=class extends Qi{constructor(t,e,r,n){super(t),this.kind=e,this.name=r,this.postId=n}equalityFieldChecks={...Xi,editorState:this.areEditorStatesEqual};onSetUp(){super.onSetUp(),this.subscribeToCollaboratorSelectionChanges()}subscribeToCollaboratorSelectionChanges(){let{getSelectionStart:t,getSelectionEnd:e,getSelectedBlocksInitialCaretPosition:r}=(0,Or.select)(Od.store),n=t(),o=e(),s=null,i=null;(0,Or.subscribe)(()=>{let c=t(),a=e();if(c===n&&a===o)return;i||(i={start:n,end:o}),n=c,o=a;let u=r();this.updateSelectionInEntityRecord(n,o,u),s&&clearTimeout(s),s=setTimeout(()=>{let l={};i&&(l.selectionDirection=oy(i.start,i.end,n,o),i=null);let d=Id(n,o,this.doc,l);this.setThrottledLocalStateField("editorState",{selection:d},td)},rd)})}async updateSelectionInEntityRecord(t,e,r){let n={selection:{selectionStart:t,selectionEnd:e,initialPosition:r}},o={undoIgnore:!0};(0,Or.dispatch)(x).editEntityRecord(this.kind,this.name,this.postId,n,o)}areEditorStatesEqual(t,e){return!t||!e?t===e:!t.selection||!e.selection?t.selection===e.selection:Dd(t.selection,e.selection)}convertSelectionStateToAbsolute(t){if(t.type===Dr.None)return{richTextOffset:null,localClientId:null};if(t.type===Dr.WholeBlock){let i=C.createAbsolutePositionFromRelativePosition(t.blockPosition,this.doc),c=null;if(i&&i.type instanceof C.Array){let u=i.type.get(i.index);if(u instanceof C.Map){let l=Zi(u);c=l?ec(l):null}}return{richTextOffset:null,localClientId:c}}let e="cursorPosition"in t?t.cursorPosition:t.cursorStartPosition,r=C.createAbsolutePositionFromRelativePosition(e.relativePosition,this.doc);if(!r)return{richTextOffset:null,localClientId:null};let n=r.type.parent?.parent,o=n instanceof C.Map?Zi(n):null,s=o?ec(o):null;return{richTextOffset:Mo(r.type.toString(),r.index),localClientId:s}}isYItem(t){return"content"in t}getDebugData(){let t=this.doc,e=Object.fromEntries(Array.from(t.share,([o,s])=>[o,s.toJSON()])),r=new Map(Array.from(this.getSeenStates().entries()).map(([o,s])=>[String(o),{name:s.collaboratorInfo.name,wpUserId:s.collaboratorInfo.id}])),n={};return t.store.clients.forEach((o,s)=>{let i=o.filter(this.isYItem);n[s]=i.map(c=>{let{left:a,right:u,...l}=c;return{...l,left:a?{id:a.id,length:a.length,origin:a.origin,content:a.content}:null,right:u?{id:u.id,length:u.length,origin:u.origin,content:u.content}:null}})}),{doc:e,clients:n,collaboratorMap:Object.fromEntries(r)}}};function oy(t,e,r,n){let o=!kd(t,r),s=!kd(e,n);return o&&!s?kr.Backward:kr.Forward}function kd(t,e){return t.clientId===e.clientId&&t.attributeKey===e.attributeKey&&t.offset===e.offset}var Xd=w(Qe(),1),Zd=w(nr(),1);var Vo,sy=new Uint8Array(16);function nc(){if(!Vo&&(Vo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Vo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vo(sy)}var ee=[];for(let t=0;t<256;++t)ee.push((t+256).toString(16).slice(1));function Ld(t,e=0){return ee[t[e+0]]+ee[t[e+1]]+ee[t[e+2]]+ee[t[e+3]]+"-"+ee[t[e+4]]+ee[t[e+5]]+"-"+ee[t[e+6]]+ee[t[e+7]]+"-"+ee[t[e+8]]+ee[t[e+9]]+"-"+ee[t[e+10]]+ee[t[e+11]]+ee[t[e+12]]+ee[t[e+13]]+ee[t[e+14]]+ee[t[e+15]]}var iy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oc={randomUUID:iy};function cy(t,e,r){if(oc.randomUUID&&!e&&!t)return oc.randomUUID();t=t||{};let n=t.random||(t.rng||nc)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let o=0;o<16;++o)e[r+o]=n[o];return e}return Ld(n)}var Tn=cy;var jo=w(Qe(),1),Nd=w(nr(),1),Vd=w(bn(),1);var Pd=w(bn(),1),ay=500;function ly(t){let e=new Map;return function(r){let n=e.get(r);if(n)return n;let o=Pd.RichTextData.fromHTMLString(r);return e.size>=t&&e.delete(e.keys().next().value),e.set(r,o),o}}var Md=ly(ay);var sc=new WeakMap;function cc(t){if(t instanceof Vd.RichTextData)return t.valueOf();if(Array.isArray(t))return t.map(cc);if(t&&typeof t=="object"){let e={};for(let[r,n]of Object.entries(t))e[r]=cc(n);return e}return t}function uy(t,e){let r={...e};for(let[n,o]of Object.entries(e)){if(hy(t,n)){delete r[n];continue}r[n]=cc(o)}return r}function Bd(t){return t.map(e=>{let{name:r,innerBlocks:n,attributes:o,...s}=e;return delete s.validationIssues,{...s,name:r,attributes:uy(r,o),innerBlocks:Bd(n)}})}function ac(t,e){if(t?.type==="rich-text"&&typeof e=="string")return Md(e);if(Array.isArray(e))return e.map(r=>ac(t,r));if(e&&typeof e=="object"){let r={};for(let[n,o]of Object.entries(e))r[n]=ac(t?.query?.[n],o);return r}return e}function uc(t){return t.map(e=>{let{name:r,innerBlocks:n,attributes:o,...s}=e,i={...o};for(let[c,a]of Object.entries(o)){let u=Fo(r,c);u&&(i[c]=ac(u,a))}return{...s,name:r,attributes:i,innerBlocks:uc(n??[])}})}function lc(t,e){let r=e.toJSON(),n={innerBlocks:null,clientId:null},o=(0,jo.default)(Object.assign({},t,n),Object.assign({},r,n)),s=t.innerBlocks||[],i=e.get("innerBlocks");return o&&s.length===i?.length&&s.every((c,a)=>lc(c,i.get(a)))}function jd(t,e){return new C.Map(Object.entries(e).map(([r,n])=>[r,Fd(t,r,n)]))}function Fd(t,e,r){return Gd(t,e)?new C.Text(r?.toString()??""):r}function Yd(t){return Po(Object.fromEntries(Object.entries(t).map(([e,r])=>{switch(e){case"attributes":return[e,jd(t.name,r)];case"innerBlocks":{let n=new C.Array;return Array.isArray(r)?(n.insert(0,r.map(o=>Yd(o))),[e,n]):[e,n]}default:return[e,r]}})))}function dc(t,e,r){sc.has(e)||sc.set(e,Bd(e));let n=sc.get(e)??[],o=Math.min(n.length??0,t.length),s=0,i=0;for(;s<o&&lc(n[s],t.get(s));s++);for(;i<o-s&&lc(n[n.length-i-1],t.get(t.length-i-1));i++);let c=o-s-i,a=Math.max(0,n.length-t.length),u=Math.max(0,t.length-n.length);for(let d=0;d<c;d++,s++){let f=n[s],h=t.get(s);Object.entries(f).forEach(([p,g])=>{switch(p){case"attributes":{let m=h.get(p);if(!m){h.set(p,jd(f.name,g));break}Object.entries(g).forEach(([y,E])=>{let _=m?.get(y);(!fy(f.name,y,_)||!(0,jo.default)(_,E))&&dy(f.name,y,E,m,r)}),m.forEach((y,E)=>{g.hasOwnProperty(E)||m.delete(E)});break}case"innerBlocks":{let m=h.get(p);m instanceof C.Array||(m=new C.Array,h.set(p,m)),dc(m,g??[],r);break}default:(0,jo.default)(f[p],h.get(p))||h.set(p,g)}}),h.forEach((p,g)=>{f.hasOwnProperty(g)||h.delete(g)})}t.delete(s,u);for(let d=0;d<a;d++,s++){let f=[Yd(n[s])];t.insert(s,f)}let l=new Set;for(let d=0;d<t.length;d++){let f=t.get(d),h=f.get("clientId");h&&(l.has(h)&&(h=Tn(),f.set("clientId",h)),l.add(h))}}function dy(t,e,r,n,o){let s=Gd(t,e),i=n.get(e);s&&typeof r=="string"&&n.has(e)&&i instanceof C.Text?fc(i,r,o):n.set(e,Fd(t,e,r))}var Bo;function Fo(t,e){if(!Bo){Bo=new Map;for(let r of(0,Nd.getBlockTypes)())Bo.set(r.name,new Map(Object.entries(r.attributes??{}).map(([n,o])=>{let{role:s,type:i,query:c}=o;return[n,{role:s,type:i,query:c}]})))}return Bo.get(t)?.get(e)}function fy(t,e,r){let n=Fo(t,e)?.type;return n==="rich-text"?r instanceof C.Text:n==="string"?typeof r=="string":!0}function hy(t,e){return Fo(t,e)?.role==="local"}function Gd(t,e){return Fo(t,e)?.type==="rich-text"}var ic;function fc(t,e,r=null){ic||(ic=new C.Doc);let n=ic.getText("temporary-text");n.delete(0,n.length),n.insert(0,e);let o=new tc(t.toDelta()),s=new tc(n.toDelta()),i=o.diffWithCursor(s,r);t.applyDelta(i.ops)}var Go=w(W(),1),hc=w(Ar(),1),Hd=w(nr(),1);var py=5,Ur=(t=>(t.RelativeSelection="RelativeSelection",t.BlockSelection="BlockSelection",t))(Ur||{});function zd(t,e=py){let r=[],n=()=>r.slice(0),o=i=>{if(!i?.selectionStart?.clientId||!i?.selectionEnd?.clientId)return;let{selectionStart:c,selectionEnd:a}=i,u=$d(c,t),l=$d(a,t);s({start:u,end:l})},s=i=>{let c=i.start.clientId,a=i.end.clientId;r=r.filter(u=>!(u.start.clientId===c&&u.end.clientId===a)),r.unshift(i),r.length>e+1&&(r=r.slice(0,e+1))};return{getSelectionHistory:n,updateSelection:o}}function $d(t,e){let r=t.clientId,o=vn(r,e)?.get("attributes"),s=t.attributeKey,i=s?o?.get(s):void 0;if(!(i instanceof C.Text)||!(s&&r))return{type:"BlockSelection",clientId:r};let u=t.offset??0,l=C.createRelativePositionFromTypeIndex(i,No(i.toString(),u));return{type:"RelativeSelection",attributeKey:s,relativePosition:l,clientId:r,offset:u}}var Kd=new WeakMap;function qd(t){let e=Kd.get(t);return e||(e=zd(t),Kd.set(t,e)),e}function $o(t){return qd(t).getSelectionHistory()}function Wd(t,e){return qd(t).updateSelection(e)}function Yo(t,e){if(t.type===Ur.RelativeSelection){let{relativePosition:r,attributeKey:n,clientId:o}=t,s=C.createAbsolutePositionFromRelativePosition(r,e);if(s)return{clientId:o,attributeKey:n,offset:Mo(s.type.toString(),s.index)}}else if(t.type===Ur.BlockSelection)return{clientId:t.clientId,attributeKey:void 0,offset:void 0};return null}function gy(t,e){let{start:r,end:n}=t,o=vn(r.clientId,e),s=vn(n.clientId,e);if(!o||!s)return null;let i=Yo(r,e),c=Yo(n,e);return i===null||c===null?null:{selectionStart:i,selectionEnd:c}}function my(t,e){for(let r of e){let n=gy(r,t);if(n!==null)return n}return null}function Jd(t,e){let r=my(e,t);if(r===null)return;let{getBlock:n}=(0,Go.select)(hc.store),{resetSelection:o}=(0,Go.dispatch)(hc.store),{selectionStart:s,selectionEnd:i}=r;if(s.clientId===i.clientId){let a=n(s.clientId),u=a&&(0,Hd.isUnmodifiedBlock)(a);if(s.offset===0&&i.offset===0&&u&&!s.attributeKey&&!i.attributeKey){let d={clientId:s.clientId},f={clientId:i.clientId};o(d,f,0)}else o(s,i,0)}else o(i,i,0)}function Qd(t,e){if(e.length===0)return null;let{start:r,end:n}=e[0];if(r.type===Ur.BlockSelection||n.type===Ur.BlockSelection)return null;let o=Yo(r,t),s=Yo(n,t);if(!o||!s)return null;let i=o.offset!==r.offset,c=s.offset!==n.offset;return!i&&!c?null:{selectionStart:o,selectionEnd:s}}var Ko="_crdt_document",ef=new Set([Ko]);function yy(t,e){let r=yt(t,qe);Object.entries(e).forEach(([n,o])=>{if(typeof o!="function"){let s=r.get(n);zo(r,n,s,o)}})}function tf(t,e,r){let n=yt(t,qe);if(Object.keys(e).forEach(o=>{if(!r.has(o))return;let s=e[o];if(typeof s!="function")switch(o){case"blocks":{if(!s){n.set(o,void 0);break}let i=n.get(o);i instanceof C.Array||(i=new C.Array,n.set(o,i));let c=e.selection?.selectionStart?.offset??null;dc(i,s,c);break}case"content":case"excerpt":case"title":{let i=n.get(o),c=pc(s);if(o==="title"&&!i?.toString()&&c==="Auto Draft"&&(c=""),i instanceof C.Text)fc(i,c??"");else{let a=new C.Text(c??"");n.set(o,a)}break}case"meta":{let i=n.get("meta");vd(i)||(i=Po(),n.set("meta",i)),Object.entries(s??{}).forEach(([c,a])=>{ef.has(c)||zo(i,c,i.get(c),a)});break}case"slug":{if(!s)break;let i=n.get(o);zo(n,o,i,s);break}default:{let i=n.get(o);zo(n,o,i,s)}}}),e.selection){let o=e.selection;setTimeout(()=>{Wd(t,o)},0)}}function Ey(t){return yt(t,qe).toJSON()}function rf(t,e,r){let n=yt(t,qe),o={},s=Object.fromEntries(Object.entries(n.toJSON()).filter(([a,u])=>{if(!r.has(a))return!1;let l=e[a];switch(a){case"blocks":{if(t.meta?.get(wd)&&e.content){let d=n.get("blocks")?.toJSON()??[];return(0,Zd.__unstableSerializeAndClean)(d).trim()!==pc(e.content)}return!0}case"date":return l===null||e.modified===l?!1:Lr(l,u);case"meta":{let d=l??{};o=Object.fromEntries(Object.entries(u??{}).filter(([h])=>ef.has(h)?!1:h in d));let f={...d,...o};return Lr(l,f)}case"status":return u==="auto-draft"?!1:Lr(l,u);case"content":case"excerpt":case"title":return Lr(pc(l),u);default:return Lr(l,u)}}));s.blocks&&(s.blocks=uc(s.blocks)),typeof s.meta=="object"&&(s.meta={...e.meta,...o});let i=$o(t),c=Qd(t,i);return c&&(s.selection={...c,initialPosition:0}),s}var nf={applyChangesToCRDTDoc:yy,createAwareness:t=>new dd(t),getChangesFromCRDTDoc:Ey},of={applyChangesToCRDTDoc:()=>{},getChangesFromCRDTDoc:()=>({}),shouldSync:(t,e)=>e===null};function pc(t){if(typeof t=="string")return t;if(t&&typeof t=="object"&&"raw"in t&&typeof t.raw=="string")return t.raw}function Lr(t,e){return!(0,Xd.default)(t,e)}function zo(t,e,r,n){if(n===void 0){t.delete(e);return}Lr(r,n)&&t.set(e,n)}var M="id",wy=["title","excerpt","content"],_y={blocks:{read:t=>(0,Ho.parse)(t.content?.raw??""),write:t=>({content:(0,Ho.__unstableSerializeAndClean)(t.blocks)})}},qo=[{label:(0,B.__)("Base"),kind:"root",key:!1,name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","image_sizes","image_size_threshold","image_output_formats","jpeg_interlaced","png_interlaced","gif_interlaced","name","site_icon","site_icon_url","site_logo","timezone_string","url","page_for_posts","page_on_front","show_on_front"].join(",")},plural:"__unstableBases"},{label:(0,B.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes"},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:(0,B.__)("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:(0,B.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:(0,B.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:(0,B.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:(0,B.__)("Widget types")},{label:(0,B.__)("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",getTitle:t=>t?.name||t?.slug,baseURLParams:{context:"edit"},plural:"users",supportsPagination:!0},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:(0,B.__)("Comment"),supportsPagination:!0,syncConfig:of},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:(0,B.__)("Menu"),supportsPagination:!0},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:(0,B.__)("Menu Item"),rawAttributes:["title"],supportsPagination:!0},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:(0,B.__)("Menu Location"),key:"name"},{label:(0,B.__)("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:()=>(0,B.__)("Custom Styles"),getRevisionsUrl:(t,e)=>`/wp/v2/global-styles/${t}/revisions${e?"/"+e:""}`,supportsPagination:!0},{label:(0,B.__)("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:(0,B.__)("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:(0,B.__)("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"},{label:(0,B.__)("Registered Templates"),name:"registeredTemplate",kind:"root",baseURL:"/wp/v2/registered-templates",key:"id"},{label:(0,B.__)("Font Collections"),name:"fontCollection",kind:"root",baseURL:"/wp/v2/font-collections",baseURLParams:{context:"view"},plural:"fontCollections",key:"slug"},{label:(0,B.__)("Icons"),name:"icon",kind:"root",baseURL:"/wp/v2/icons",baseURLParams:{context:"view"},plural:"icons",key:"name"}],sf={root:{media:{since:"6.9",alternative:{kind:"postType",name:"attachment"}}}},Wo=[{kind:"postType",loadEntities:by},{kind:"taxonomy",loadEntities:vy},{kind:"root",name:"site",plural:"sites",loadEntities:Cy}],Sy=async(t,e,r,n)=>{let o={};if(!n&&t?.status==="auto-draft"&&(!e.status&&!o.status&&(o.status="draft"),(!e.title||e.title==="Auto Draft")&&!o.title&&(!t?.title||t?.title==="Auto Draft")&&(o.title="")),t){let s=`postType/${r}`,i=t.id,c=await pe()?.createPersistedCRDTDoc(s,i);c&&(o.meta={...e.meta,[Ko]:c})}return o};async function by(){let t=(0,xn.default)({path:"/wp/v2/types?context=view"}),e=window._wpCollaborationEnabled?(0,xn.default)({path:"/wp/v2/taxonomies?context=view"}):Promise.resolve({}),[r,n]=await Promise.all([t,e]);return Object.entries(r??{}).map(([o,s])=>{let i=["wp_template","wp_template_part"].includes(o),c=s?.rest_namespace??"wp/v2",a=new Set(["author","blocks","content","comment_status","date","excerpt","featured_media","format","meta","ping_status","slug","status","sticky","template","title",...s.taxonomies?.map(l=>n?.[l]?.rest_base)?.filter(Boolean)??[]]),u={kind:"postType",baseURL:`/${c}/${s.rest_base}`,baseURLParams:{context:"edit"},name:o,label:s.name,transientEdits:{..._y,selection:!0},mergedEdits:{meta:!0},rawAttributes:wy,getTitle:l=>l?.title?.rendered||l?.title||(i?ga(l.slug??""):String(l.id)),__unstablePrePersist:(l,d)=>Sy(l,d,o,i),__unstable_rest_base:s.rest_base,supportsPagination:!0,getRevisionsUrl:(l,d)=>`/${c}/${s.rest_base}/${l}/revisions${d?"/"+d:""}`,revisionKey:i&&!window?.__experimentalTemplateActivate?"wp_id":M};return u.syncConfig={applyChangesToCRDTDoc:(l,d)=>tf(l,d,a),createAwareness:(l,d)=>{let f="postType",h=parseInt(d,10);return new Ud(l,f,o,h)},getChangesFromCRDTDoc:(l,d)=>rf(l,d,a),getPersistedCRDTDoc:l=>l?.meta?.[Ko]||null},u})}async function vy(){let t=await(0,xn.default)({path:"/wp/v2/taxonomies?context=view"});return Object.entries(t??{}).map(([e,r])=>{let o={kind:"taxonomy",baseURL:`/${r?.rest_namespace??"wp/v2"}/${r.rest_base}`,baseURLParams:{context:"edit"},name:e,label:r.name,getTitle:s=>s?.name,supportsPagination:!0};return o.syncConfig=nf,o})}async function Cy(){let t={label:(0,B.__)("Site"),name:"site",kind:"root",key:!1,baseURL:"/wp/v2/settings",meta:{}},e=await(0,xn.default)({path:t.baseURL,method:"OPTIONS"}),r={};return Object.entries(e?.schema?.properties??{}).forEach(([n,o])=>{typeof o=="object"&&o.title&&(r[n]=o.title)}),[{...t,meta:{labels:r}}]}var Zt=(t,e,r="get")=>{let n=t==="root"?"":$r(t),o=$r(e);return`${r}${n}${o}`};function lf(t){let{query:e}=t;return e?et(e).context:"default"}function Ry(t,e,r,n){if(r===1&&n===-1)return e;let s=(r-1)*n,i=Math.max(t?.length??0,s+e.length),c=new Array(i);for(let a=0;a<i;a++){let u=a>=s&&a<s+n;c[a]=u?e[a-s]:t?.[a]}return c}function uf(t,e){return Object.fromEntries(Object.entries(t).filter(([r])=>!e.some(n=>Number.isInteger(n)?n===+r:n===r)))}function Ty(t={},e){switch(e.type){case"RECEIVE_ITEMS":{let r=lf(e),n=e.key||M,o=Array.isArray(e.items)?e.items:[e.items];return{...t,[r]:{...t[r],...Object.fromEntries(o.map(s=>[s?.[n],fs(t?.[r]?.[s?.[n]],s)]))}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(t).map(([r,n])=>[r,uf(n,e.itemIds)]))}return t}function xy(t={},e){switch(e.type){case"RECEIVE_ITEMS":{let r=lf(e),{query:n,key:o=M}=e,s=Array.isArray(e.items)?e.items:[e.items],i=n?et(n):{},c=!n||!Array.isArray(i.fields);return{...t,[r]:{...t[r],...s.reduce((a,u)=>{let l=u?.[o];return a[l]=t?.[r]?.[l]||c,a},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(t).map(([r,n])=>[r,uf(n,e.itemIds)]))}return t}var Iy=(0,af.compose)([Br(t=>"query"in t),jr(t=>t.query?{...t,...et(t.query)}:t),Fn("context"),Fn("stableKey")])((t={},e)=>{if(e.type!=="RECEIVE_ITEMS"||!Array.isArray(e.items))return t;let r=e.key??M;return{itemIds:Ry(t?.itemIds||[],e.items.map(n=>n?.[r]).filter(Boolean),e.page,e.perPage),meta:e.meta}}),Ay=(t={},e)=>{switch(e.type){case"RECEIVE_ITEMS":return Iy(t,e);case"REMOVE_ITEMS":let r=e.itemIds.reduce((n,o)=>(n[o]=!0,n),{});return Object.fromEntries(Object.entries(t).map(([n,o])=>[n,Object.fromEntries(Object.entries(o).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!r[c])}]))]));default:return t}},Jo=(0,cf.combineReducers)({items:Ty,itemIsComplete:xy,queries:Ay});function Dy(t={byId:{},queries:{}},e){return e.type==="RECEIVE_USER_QUERY"?{byId:{...t.byId,...e.users.reduce((r,n)=>({...r,[n.id]:n}),{})},queries:{...t.queries,[e.queryID]:e.users.map(r=>r.id)}}:t}function ky(t={},e){return e.type==="RECEIVE_CURRENT_USER"?e.currentUser:t}function Oy(t=void 0,e){return e.type==="RECEIVE_CURRENT_THEME"?e.currentTheme.stylesheet:t}function Uy(t=void 0,e){return e.type==="RECEIVE_CURRENT_GLOBAL_STYLES_ID"?e.id:t}function Ly(t={},e){return e.type==="RECEIVE_THEME_GLOBAL_STYLES"?{...t,[e.stylesheet]:e.globalStyles}:t}function Py(t={},e){return e.type==="RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS"?{...t,[e.stylesheet]:e.variations}:t}var My=t=>(e,r)=>{if(r.type==="UNDO"||r.type==="REDO"){let{record:n}=r,o=e;return n.forEach(({id:{kind:s,name:i,recordId:c},changes:a})=>{o=t(o,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(a).reduce((u,[l,d])=>(u[l]=r.type==="UNDO"?d.from:d.to,u),{})})}),o}return t(e,r)};function Ny(t){return(0,df.compose)([My,Br(e=>e.name&&e.kind&&e.name===t.name&&e.kind===t.kind),jr(e=>({key:t.key||M,...e}))])((0,In.combineReducers)({queriedData:Jo,edits:(e={},r)=>{switch(r.type){case"RECEIVE_ITEMS":if((r?.query?.context??"default")!=="default")return e;let o={...e},s=Array.isArray(r.items)?r.items:[r.items];for(let c of s){let a=c?.[r.key],u=o[a];if(!u)continue;let l=Object.keys(u).reduce((d,f)=>(!(0,gc.default)(u[f],c[f]?.raw??c[f])&&(!r.persistedEdits||!(0,gc.default)(u[f],r.persistedEdits[f]))&&(d[f]=u[f]),d),{});Object.keys(l).length?o[a]=l:delete o[a]}return o;case"EDIT_ENTITY_RECORD":let i={...e[r.recordId],...r.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...e,[r.recordId]:i}}return e},saving:(e={},r)=>{switch(r.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...e,[r.recordId]:{pending:r.type==="SAVE_ENTITY_RECORD_START",error:r.error,isAutosave:r.isAutosave}}}return e},deleting:(e={},r)=>{switch(r.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...e,[r.recordId]:{pending:r.type==="DELETE_ENTITY_RECORD_START",error:r.error}}}return e},revisions:(e={},r)=>{if(r.type==="RECEIVE_ITEM_REVISIONS"){let n=r.recordKey;delete r.recordKey;let o=Jo(e[n],{...r,type:"RECEIVE_ITEMS"});return{...e,[n]:o}}return r.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(e).filter(([n])=>!r.itemIds.some(o=>Number.isInteger(o)?o===+n:o===n))):e}}))}function Vy(t=qo,e){return e.type==="ADD_ENTITIES"?[...t,...e.entities]:t}var By=(t={},e)=>{let r=Vy(t.config,e),n=t.reducer;if(!n||r!==t.config){let s=r.reduce((i,c)=>{let{kind:a}=c;return i[a]||(i[a]=[]),i[a].push(c),i},{});n=(0,In.combineReducers)(Object.fromEntries(Object.entries(s).map(([i,c])=>{let a=(0,In.combineReducers)(Object.fromEntries(c.map(u=>[u.name,Ny(u)])));return[i,a]})))}let o=n(t.records,e);return o===t.records&&r===t.config&&n===t.reducer?t:{reducer:n,records:o,config:r}};function jy(t=(0,ff.createUndoManager)()){return t}function Fy(t={},e){switch(e.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return t}function Yy(t={},e){if(e.type==="RECEIVE_EMBED_PREVIEW"){let{url:r,preview:n}=e;return{...t,[r]:n}}return t}function Gy(t={},e){switch(e.type){case"RECEIVE_USER_PERMISSION":return{...t,[e.key]:e.isAllowed};case"RECEIVE_USER_PERMISSIONS":return{...t,...e.permissions}}return t}function $y(t={},e){if(e.type==="RECEIVE_AUTOSAVES"){let{postId:r,autosaves:n}=e;return{...t,[r]:n}}return t}function zy(t=[],e){return e.type==="RECEIVE_BLOCK_PATTERNS"?e.patterns:t}function Ky(t=[],e){return e.type==="RECEIVE_BLOCK_PATTERN_CATEGORIES"?e.categories:t}function Hy(t=[],e){return e.type==="RECEIVE_USER_PATTERN_CATEGORIES"?e.patternCategories:t}function qy(t=null,e){return e.type==="RECEIVE_NAVIGATION_FALLBACK_ID"?e.fallbackId:t}function Wy(t={},e){return e.type==="RECEIVE_THEME_GLOBAL_STYLE_REVISIONS"?{...t,[e.currentId]:e.revisions}:t}function Jy(t={},e){return e.type==="RECEIVE_DEFAULT_TEMPLATE"?{...t,[JSON.stringify(e.query)]:e.templateId}:t}function Qy(t={},e){return e.type==="RECEIVE_REGISTERED_POST_META"?{...t,[e.postType]:e.registeredPostMeta}:t}function Xy(t=null,e){return e.type==="RECEIVE_EDITOR_SETTINGS"?e.settings:t}function Zy(t=null,e){return e.type==="RECEIVE_EDITOR_ASSETS"?e.assets:t}function eE(t={},e){switch(e.type){case"SET_SYNC_CONNECTION_STATUS":{let r=`${e.kind}/${e.name}:${e.key}`;return{...t,[r]:e.status}}case"CLEAR_SYNC_CONNECTION_STATUS":{let r=`${e.kind}/${e.name}:${e.key}`,{[r]:n,...o}=t;return o}}return t}function tE(t=!0,e){switch(e.type){case"SET_COLLABORATION_SUPPORTED":return e.supported;case"SET_SYNC_CONNECTION_STATUS":return Ed.DOCUMENT_SIZE_LIMIT_EXCEEDED===e.status?.error?.code?!1:t}return t}var hf=(0,In.combineReducers)({users:Dy,currentTheme:Oy,currentGlobalStylesId:Uy,currentUser:ky,themeGlobalStyleVariations:Py,themeBaseGlobalStyles:Ly,themeGlobalStyleRevisions:Wy,entities:By,editsReference:Fy,undoManager:jy,embedPreviews:Yy,userPermissions:Gy,autosaves:$y,blockPatterns:zy,blockPatternCategories:Ky,userPatternCategories:Hy,navigationFallbackId:qy,defaultTemplates:Jy,registeredPostMeta:Qy,editorSettings:Xy,editorAssets:Zy,syncConnectionStatuses:eE,collaborationSupported:tE});var bc={};bt(bc,{__experimentalGetCurrentGlobalStylesId:()=>Cf,__experimentalGetCurrentThemeBaseGlobalStyles:()=>YE,__experimentalGetCurrentThemeGlobalStylesVariations:()=>GE,__experimentalGetDirtyEntityRecords:()=>CE,__experimentalGetEntitiesBeingSaved:()=>RE,__experimentalGetEntityRecordNoResolver:()=>_E,canUser:()=>Rf,canUserEditEntityRecord:()=>NE,getAuthors:()=>gE,getAutosave:()=>BE,getAutosaves:()=>VE,getBlockPatternCategories:()=>zE,getBlockPatterns:()=>$E,getCurrentTheme:()=>Zo,getCurrentThemeGlobalStylesRevisions:()=>HE,getCurrentUser:()=>mE,getDefaultTemplateId:()=>Ec,getEditedEntityRecord:()=>_c,getEmbedPreview:()=>PE,getEntitiesByKind:()=>yE,getEntitiesConfig:()=>_f,getEntity:()=>EE,getEntityConfig:()=>Pr,getEntityRecord:()=>xe,getEntityRecordEdits:()=>wc,getEntityRecordNonTransientEdits:()=>bf,getEntityRecords:()=>Xo,getEntityRecordsTotalItems:()=>bE,getEntityRecordsTotalPages:()=>vE,getLastEntityDeleteError:()=>AE,getLastEntitySaveError:()=>IE,getRawEntityRecord:()=>Sf,getRedoEdit:()=>kE,getReferenceByDistinctEdits:()=>FE,getRevision:()=>WE,getRevisions:()=>qE,getThemeSupports:()=>LE,getUndoEdit:()=>DE,getUserPatternCategories:()=>KE,getUserQueryResults:()=>wf,hasEditsForEntityRecord:()=>vf,hasEntityRecord:()=>wE,hasEntityRecords:()=>SE,hasFetchedAutosaves:()=>jE,hasRedo:()=>UE,hasUndo:()=>OE,isAutosavingEntityRecord:()=>TE,isDeletingEntityRecord:()=>xE,isPreviewEmbedFallback:()=>ME,isRequestingEmbedPreview:()=>pE,isSavingEntityRecord:()=>Sc});var me=w(W(),1),Ef=w(Ze(),1),Et=w(er(),1);var yc={};bt(yc,{getBlockPatternsForPostType:()=>nE,getEditorAssets:()=>uE,getEditorSettings:()=>lE,getEntityRecordPermissions:()=>oE,getEntityRecordsPermissions:()=>mf,getHomePage:()=>iE,getNavigationFallbackId:()=>rE,getPostsPageId:()=>cE,getRegisteredPostMeta:()=>sE,getSyncConnectionStatus:()=>fE,getTemplateId:()=>aE,getUndoManager:()=>Qo,isCollaborationSupported:()=>dE});var je=w(W(),1);var gf=w(er(),1);var mc=!1;function A(t,e,r,{alternativeFunctionName:n,isShorthandSelector:o=!1}={}){let s=sf[t]?.[e];if(s){if(!mc){let{alternative:i}=s,c=o?`'${r}'`:`The '${t}', '${e}' entity (used via '${r}')`,a=`the '${i.kind}', '${i.name}' entity`;n&&(a+=` via the '${n}' function`),(0,gf.default)(c,{...s,alternative:a})}mc=!0,setTimeout(()=>{mc=!1},0)}}function Qo(t){return pe()?.undoManager??t.undoManager}function rE(t){return t.navigationFallbackId}var nE=(0,je.createRegistrySelector)(t=>(0,je.createSelector)((e,r)=>t(x).getBlockPatterns().filter(({postTypes:n})=>!n||Array.isArray(n)&&n.includes(r)),()=>[t(x).getBlockPatterns()])),mf=(0,je.createRegistrySelector)(t=>(0,je.createSelector)((e,r,n,o)=>(Array.isArray(o)?o:[o]).map(i=>({delete:t(x).canUser("delete",{kind:r,name:n,id:i}),update:t(x).canUser("update",{kind:r,name:n,id:i})})),e=>[e.userPermissions]));function oE(t,e,r,n){return A(e,r,"getEntityRecordPermissions"),mf(t,e,r,n)[0]}function sE(t,e){return t.registeredPostMeta?.[e]??{}}function yf(t){return!t||!["number","string"].includes(typeof t)||Number(t)===0?null:t.toString()}var iE=(0,je.createRegistrySelector)(t=>(0,je.createSelector)(()=>{let e=t(x).getEntityRecord("root","__unstableBase");if(!e)return null;let r=e?.show_on_front==="page"?yf(e.page_on_front):null;if(r)return{postType:"page",postId:r};let n=t(x).getDefaultTemplateId({slug:"front-page"});return n?{postType:"wp_template",postId:n}:null},e=>[xe(e,"root","site"),xe(e,"root","__unstableBase"),Ec(e,{slug:"front-page"})])),cE=(0,je.createRegistrySelector)(t=>()=>{let e=t(x).getEntityRecord("root","__unstableBase");return e?.show_on_front==="page"?yf(e.page_for_posts):null}),aE=(0,je.createRegistrySelector)(t=>(e,r,n)=>{let o=Se(t(x)).getHomePage();if(!o)return;if(r==="page"&&r===o?.postType&&n.toString()===o?.postId){let u=t(x).getEntityRecords("postType","wp_template",{per_page:-1});if(!u)return;let l=u.find(({slug:d})=>d==="front-page")?.id;if(l)return l}let s=t(x).getEditedEntityRecord("postType",r,n);if(!s)return;let i=Se(t(x)).getPostsPageId();if(r==="page"&&i===n.toString())return t(x).getDefaultTemplateId({slug:"home"});let c=s.template;if(c){let u=t(x).getEntityRecords("postType","wp_template",{per_page:-1})?.find(({slug:l})=>l===c);if(u)return u.id}let a;return s.slug?a=r==="page"?`${r}-${s.slug}`:`single-${r}-${s.slug}`:a=r==="page"?"page":`single-${r}`,t(x).getDefaultTemplateId({slug:a})});function lE(t){return t.editorSettings}function uE(t){return t.editorAssets}function dE(t){return t.collaborationSupported}function fE(t){if(!t.syncConnectionStatuses)return;let e=["disconnected","connecting","connected"],r;for(let n of Object.values(t.syncConnectionStatuses))(!r||e.indexOf(n.status)<e.indexOf(r.status))&&(r=n);return r}var hE={},pE=(0,me.createRegistrySelector)(t=>(e,r)=>t(x).isResolving("getEmbedPreview",[r]));function gE(t,e){(0,Et.default)("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});let r=(0,Ef.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e);return wf(t,r)}function mE(t){return t.currentUser}var wf=(0,me.createSelector)((t,e)=>(t.users.queries[e]??[]).map(n=>t.users.byId[n]),(t,e)=>[t.users.queries[e],t.users.byId]);function yE(t,e){return(0,Et.default)("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),_f(t,e)}var _f=(0,me.createSelector)((t,e)=>t.entities.config.filter(r=>r.kind===e),(t,e)=>t.entities.config);function EE(t,e,r){return(0,Et.default)("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Pr(t,e,r)}function Pr(t,e,r){return A(e,r,"getEntityConfig"),t.entities.config?.find(n=>n.kind===e&&n.name===r)}var xe=(0,me.createSelector)(((t,e,r,n,o)=>{A(e,r,"getEntityRecord");let s=t.entities.records?.[e]?.[r]?.queriedData;if(!s)return;let i=o?.context??"default";if(!o||!o._fields)return s.itemIsComplete[i]?.[n]?s.items[i][n]:void 0;let c=s.items[i]?.[n];if(!c)return c;let a={},u=ie(o._fields)??[];for(let l=0;l<u.length;l++){let d=u[l].split("."),f=c;d.forEach(h=>{f=f?.[h]}),Xe(a,d,f)}return a}),(t,e,r,n,o)=>{let s=o?.context??"default",i=t.entities.records?.[e]?.[r]?.queriedData;return[i?.items[s]?.[n],i?.itemIsComplete[s]?.[n]]});xe.__unstableNormalizeArgs=t=>{let e=[...t],r=e?.[2];return e[2]=Fr(r)?Number(r):r,e};function wE(t,e,r,n,o){let s=t.entities.records?.[e]?.[r]?.queriedData;if(!s)return!1;let i=o?.context??"default";if(!o||!o._fields)return!!s.itemIsComplete[i]?.[n];let c=s.items[i]?.[n];if(!c)return!1;let a=ie(o._fields)??[];for(let u=0;u<a.length;u++){let l=a[u].split("."),d=c;for(let f=0;f<l.length;f++){let h=l[f];if(!d||!Object.hasOwn(d,h))return!1;d=d[h]}}return!0}function _E(t,e,r,n){return xe(t,e,r,n)}var Sf=(0,me.createSelector)((t,e,r,n)=>{A(e,r,"getRawEntityRecord");let o=xe(t,e,r,n);return o&&Object.keys(o).reduce((s,i)=>(ps(Pr(t,e,r),i)?s[i]=o[i]?.raw!==void 0?o[i]?.raw:o[i]:s[i]=o[i],s),{})},(t,e,r,n,o)=>{let s=o?.context??"default";return[t.entities.config,t.entities.records?.[e]?.[r]?.queriedData?.items[s]?.[n],t.entities.records?.[e]?.[r]?.queriedData?.itemIsComplete[s]?.[n]]});function SE(t,e,r,n){return A(e,r,"hasEntityRecords"),Array.isArray(Xo(t,e,r,n))}var Xo=((t,e,r,n)=>{A(e,r,"getEntityRecords");let o=t.entities.records?.[e]?.[r]?.queriedData;return o?ys(o,n):null}),bE=(t,e,r,n)=>{A(e,r,"getEntityRecordsTotalItems");let o=t.entities.records?.[e]?.[r]?.queriedData;return o?Es(o,n):null},vE=(t,e,r,n)=>{A(e,r,"getEntityRecordsTotalPages");let o=t.entities.records?.[e]?.[r]?.queriedData;if(!o)return null;if(n?.per_page===-1)return 1;let s=Es(o,n);return s&&(n?.per_page?Math.ceil(s/n.per_page):da(o,n))},CE=(0,me.createSelector)(t=>{let{entities:{records:e}}=t,r=[];return Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(o=>{let s=Object.keys(e[n][o].edits).filter(i=>xe(t,n,o,i)&&vf(t,n,o,i));if(s.length){let i=Pr(t,n,o);s.forEach(c=>{let a=_c(t,n,o,c);r.push({key:a?a[i.key||M]:void 0,title:i?.getTitle?.(a)||"",name:o,kind:n})})}})}),r},t=>[t.entities.records]),RE=(0,me.createSelector)(t=>{let{entities:{records:e}}=t,r=[];return Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(o=>{let s=Object.keys(e[n][o].saving).filter(i=>Sc(t,n,o,i));if(s.length){let i=Pr(t,n,o);s.forEach(c=>{let a=_c(t,n,o,c);r.push({key:a?a[i.key||M]:void 0,title:i?.getTitle?.(a)||"",name:o,kind:n})})}})}),r},t=>[t.entities.records]);function wc(t,e,r,n){return A(e,r,"getEntityRecordEdits"),t.entities.records?.[e]?.[r]?.edits?.[n]}var bf=(0,me.createSelector)((t,e,r,n)=>{A(e,r,"getEntityRecordNonTransientEdits");let{transientEdits:o}=Pr(t,e,r)||{},s=wc(t,e,r,n)||{};return o?Object.keys(s).reduce((i,c)=>(o[c]||(i[c]=s[c]),i),{}):s},(t,e,r,n)=>[t.entities.config,t.entities.records?.[e]?.[r]?.edits?.[n]]);function vf(t,e,r,n){return A(e,r,"hasEditsForEntityRecord"),Sc(t,e,r,n)||Object.keys(bf(t,e,r,n)).length>0}var _c=(0,me.createSelector)((t,e,r,n)=>{A(e,r,"getEditedEntityRecord");let o=Sf(t,e,r,n),s=wc(t,e,r,n);return!o&&!s?!1:{...o,...s}},(t,e,r,n,o)=>{let s=o?.context??"default";return[t.entities.config,t.entities.records?.[e]?.[r]?.queriedData.items[s]?.[n],t.entities.records?.[e]?.[r]?.queriedData.itemIsComplete[s]?.[n],t.entities.records?.[e]?.[r]?.edits?.[n]]});function TE(t,e,r,n){A(e,r,"isAutosavingEntityRecord");let{pending:o,isAutosave:s}=t.entities.records?.[e]?.[r]?.saving?.[n]??{};return!!(o&&s)}function Sc(t,e,r,n){return A(e,r,"isSavingEntityRecord"),t.entities.records?.[e]?.[r]?.saving?.[n]?.pending??!1}function xE(t,e,r,n){return A(e,r,"isDeletingEntityRecord"),t.entities.records?.[e]?.[r]?.deleting?.[n]?.pending??!1}function IE(t,e,r,n){return A(e,r,"getLastEntitySaveError"),t.entities.records?.[e]?.[r]?.saving?.[n]?.error}function AE(t,e,r,n){return A(e,r,"getLastEntityDeleteError"),t.entities.records?.[e]?.[r]?.deleting?.[n]?.error}function DE(t){(0,Et.default)("select( 'core' ).getUndoEdit()",{since:"6.3"})}function kE(t){(0,Et.default)("select( 'core' ).getRedoEdit()",{since:"6.3"})}function OE(t){return Qo(t).hasUndo()}function UE(t){return Qo(t).hasRedo()}function Zo(t){return t.currentTheme?xe(t,"root","theme",t.currentTheme):null}function Cf(t){return t.currentGlobalStylesId}function LE(t){return Zo(t)?.theme_supports??hE}function PE(t,e){return t.embedPreviews[e]}function ME(t,e){let r=t.embedPreviews[e],n='<a href="'+e+'">'+e+"</a>";return r?r.html===n:!1}function Rf(t,e,r,n){let o=typeof r=="object";if(o&&(!r.kind||!r.name))return!1;o&&A(r.kind,r.name,"canUser");let s=Rt(e,r,n);return t.userPermissions[s]}function NE(t,e,r,n){return(0,Et.default)("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),Rf(t,"update",{kind:e,name:r,id:n})}function VE(t,e,r){return t.autosaves[r]}function BE(t,e,r,n){return n===void 0?void 0:t.autosaves[r]?.find(s=>s.author===n)}var jE=(0,me.createRegistrySelector)(t=>(e,r,n)=>t(x).hasFinishedResolution("getAutosaves",[r,n]));function FE(t){return t.editsReference}function YE(t){let e=Zo(t);return e?t.themeBaseGlobalStyles[e.stylesheet]:null}function GE(t){let e=Zo(t);return e?t.themeGlobalStyleVariations[e.stylesheet]:null}function $E(t){return t.blockPatterns}function zE(t){return t.blockPatternCategories}function KE(t){return t.userPatternCategories}function HE(t){(0,Et.default)("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});let e=Cf(t);return e?t.themeGlobalStyleRevisions[e]:null}function Ec(t,e){return t.defaultTemplates[JSON.stringify(e)]}var qE=(t,e,r,n,o)=>{A(e,r,"getRevisions");let s=t.entities.records?.[e]?.[r]?.revisions?.[n];return s?ys(s,o):null},WE=(0,me.createSelector)((t,e,r,n,o,s)=>{A(e,r,"getRevision");let i=t.entities.records?.[e]?.[r]?.revisions?.[n];if(!i)return;let c=s?.context??"default";if(!s||!s._fields)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;let a=i.items[c]?.[o];if(!a)return a;let u={},l=ie(s._fields)??[];for(let d=0;d<l.length;d++){let f=l[d].split("."),h=a;f.forEach(p=>{h=h?.[p]}),Xe(u,f,h)}return u},(t,e,r,n,o,s)=>{let i=s?.context??"default",c=t.entities.records?.[e]?.[r]?.revisions?.[n];return[c?.items?.[i]?.[o],c?.itemIsComplete?.[i]?.[o]]});var Ac={};bt(Ac,{__experimentalBatch:()=>pw,__experimentalReceiveCurrentGlobalStylesId:()=>nw,__experimentalReceiveThemeBaseGlobalStyles:()=>ow,__experimentalReceiveThemeGlobalStyleVariations:()=>sw,__experimentalSaveSpecifiedEntityEdits:()=>mw,__unstableCreateUndoLevel:()=>hw,addEntities:()=>ew,clearEntityRecordEdits:()=>uw,deleteEntityRecord:()=>xc,editEntityRecord:()=>lw,receiveAutosaves:()=>ww,receiveCurrentTheme:()=>rw,receiveCurrentUser:()=>ZE,receiveDefaultTemplateId:()=>Sw,receiveEmbedPreview:()=>aw,receiveEntityRecords:()=>tw,receiveNavigationFallbackId:()=>_w,receiveRevisions:()=>bw,receiveThemeGlobalStyleRevisions:()=>cw,receiveThemeSupports:()=>iw,receiveUploadPermissions:()=>yw,receiveUserPermission:()=>Df,receiveUserPermissions:()=>Ew,receiveUserQuery:()=>XE,redo:()=>fw,saveEditedEntityRecord:()=>gw,saveEntityRecord:()=>Ic,undo:()=>dw});var If=w(Qe(),1);var Tc=w(Ae(),1),Af=w(Ze(),1),es=w(er(),1);var Cc=w(Ae(),1),vc=null;function JE(t,e){let r=[...t],n=[];for(;r.length;)n.push(r.splice(0,e));return n}async function Tf(t){vc===null&&(vc=(await(0,Cc.default)({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);let e=[];for(let r of JE(t,vc)){let n=await(0,Cc.default)({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:r.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}}),o;n.failed?o=n.responses.map(s=>({error:s?.body})):o=n.responses.map(s=>{let i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),e.push(...o)}return e}function Rc(t=Tf){let e=0,r=[],n=new QE;return{add(o){let s=++e;n.add(s);let i=c=>new Promise((a,u)=>{r.push({input:c,resolve:a,reject:u}),n.delete(s)});return typeof o=="function"?Promise.resolve(o(i)).finally(()=>{n.delete(s)}):i(o)},async run(){n.size&&await new Promise(i=>{let c=n.subscribe(()=>{n.size||(c(),i(void 0))})});let o;try{if(o=await t(r.map(({input:i})=>i)),o.length!==r.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(let{reject:c}of r)c(i);throw i}let s=!0;return o.forEach((i,c)=>{let a=r[c];i?.error?(a?.reject(i.error),s=!1):a?.resolve(i?.output??i)}),r=[],s}}}var QE=class{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(e=>e()),this}delete(t){let e=this.set.delete(t);return this.subscribers.forEach(r=>r()),e}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}};function xf(t){return t.status==="auto-draft"?{...t,title:""}:t}function XE(t,e){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(e)?e:[e],queryID:t}}function ZE(t){return{type:"RECEIVE_CURRENT_USER",currentUser:t}}function ew(t){return{type:"ADD_ENTITIES",entities:t}}function tw(t,e,r,n=void 0,o=!1,s=void 0,i=void 0){t==="postType"&&(r=Array.isArray(r)?r.map(xf):xf(r));let c;return n?c=ta(r,n,s,i):c=ms(r,s,i),{...c,kind:t,name:e,invalidateCache:o}}function rw(t){return{type:"RECEIVE_CURRENT_THEME",currentTheme:t}}function nw(t){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:t}}function ow(t,e){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:t,globalStyles:e}}function sw(t,e){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:t,variations:e}}function iw(){return(0,es.default)("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function cw(t,e){return(0,es.default)("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:t,revisions:e}}function aw(t,e){return{type:"RECEIVE_EMBED_PREVIEW",url:t,preview:e}}var xc=(t,e,r,n,{__unstableFetch:o=Tc.default,throwOnError:s=!1}={})=>async({dispatch:i,resolveSelect:c})=>{A(t,e,"deleteEntityRecord");let u=(await c.getEntitiesConfig(t)).find(h=>h.kind===t&&h.name===e),l,d=!1;if(!u)return;let f=await i.__unstableAcquireStoreLock(x,["entities","records",t,e,r],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:t,name:e,recordId:r});let h=!1,{baseURL:p}=u;t==="postType"&&e==="wp_template"&&(r&&typeof r=="string"&&!/^\d+$/.test(r)||!window?.__experimentalTemplateActivate)&&(p=p.slice(0,p.lastIndexOf("/"))+"/templates");try{let g=`${p}/${r}`;if(n&&(g=(0,Af.addQueryArgs)(g,n)),d=await o({path:g,method:"DELETE"}),await i(ea(t,e,r,!0)),u.syncConfig){let m=`${t}/${e}`,y=r;pe()?.unload(m,y)}}catch(g){h=!0,l=g}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:t,name:e,recordId:r,error:l}),h&&s)throw l;return d}finally{i.__unstableReleaseStoreLock(f)}},lw=(t,e,r,n,o={})=>({select:s,dispatch:i})=>{A(t,e,"editEntityRecord");let c=s.getEntityConfig(t,e);if(!c)throw new Error(`The entity being edited (${t}, ${e}) does not have a loaded config.`);let{mergedEdits:a={}}=c,u=s.getRawEntityRecord(t,e,r),l=s.getEditedEntityRecord(t,e,r),d=Object.keys(n).reduce((h,p)=>(h[p]=a[p]?{...l[p],...n[p]}:n[p],h),{}),f={kind:t,name:e,recordId:r,edits:Object.keys(n).reduce((h,p)=>{let g=u[p],m=d[p];return h[p]=(0,If.default)(g,m)?void 0:m,h},{})};if(c.syncConfig){let h=`${t}/${e}`,p=r,g=o.undoIgnore?!1:!o.isCached,m=o.undoIgnore?rc:_d;pe()?.update(h,p,d,m,{isNewUndoLevel:g})}o.undoIgnore||s.getUndoManager().addRecord([{id:{kind:t,name:e,recordId:r},changes:Object.keys(n).reduce((h,p)=>(h[p]={from:l[p],to:n[p]},h),{})}],o.isCached),i({type:"EDIT_ENTITY_RECORD",...f})},uw=(t,e,r)=>({select:n,dispatch:o})=>{let s=n.getEntityConfig(t,e);if(A(t,e,"clearEntityRecordEdits"),!s)throw new Error(`The entity being edited (${t}, ${e}) does not have a loaded config.`);let i=n.getEntityRecordEdits(t,e,r);if(!i)return;let c=Object.keys(i).reduce((a,u)=>(a[u]=void 0,a),{});o({type:"EDIT_ENTITY_RECORD",kind:t,name:e,recordId:r,edits:c})},dw=()=>({select:t,dispatch:e})=>{let r=t.getUndoManager().undo();r&&e({type:"UNDO",record:r})},fw=()=>({select:t,dispatch:e})=>{let r=t.getUndoManager().redo();r&&e({type:"REDO",record:r})},hw=()=>({select:t})=>{t.getUndoManager().addRecord()},Ic=(t,e,r,{isAutosave:n=!1,__unstableFetch:o=Tc.default,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:a})=>{A(t,e,"saveEntityRecord");let l=(await c.getEntitiesConfig(t)).find(g=>g.kind===t&&g.name===e);if(!l)return;let d=l.key??M,f=r[d],h=!!d&&!f,p=await a.__unstableAcquireStoreLock(x,["entities","records",t,e,f||Tn()],{exclusive:!0});try{for(let[_,S]of Object.entries(r))if(typeof S=="function"){let b=S(i.getEditedEntityRecord(t,e,f));a.editEntityRecord(t,e,f,{[_]:b},{undoIgnore:!0}),r[_]=b}a({type:"SAVE_ENTITY_RECORD_START",kind:t,name:e,recordId:f,isAutosave:n});let g,m,y=!1,{baseURL:E}=l;t==="postType"&&e==="wp_template"&&(f&&typeof f=="string"&&!/^\d+$/.test(f)||!window?.__experimentalTemplateActivate)&&(E=E.slice(0,E.lastIndexOf("/"))+"/templates");try{let _=`${E}${f?"/"+f:""}`,S=h?{}:i.getRawEntityRecord(t,e,f);if(n){let b=i.getCurrentUser(),I=b?b.id:void 0,O=await c.getAutosave(S.type,S.id,I),U={...S,...O,...r};if(U=Object.keys(U).reduce(($,j)=>(["title","excerpt","content","meta"].includes(j)&&($[j]=U[j]),$),{status:U.status==="auto-draft"?"draft":void 0}),g=await o({path:`${_}/autosaves`,method:"POST",data:U}),S.id===g.id){let $={...S,...U,...g};$=Object.keys($).reduce((j,de)=>(["title","excerpt","content"].includes(de)?j[de]=$[de]:de==="status"?j[de]=S.status==="auto-draft"&&$.status==="draft"?$.status:S.status:j[de]=S[de],j),{}),a.receiveEntityRecords(t,e,$,void 0,!0)}else a.receiveAutosaves(S.id,g)}else{let b=r;l.__unstablePrePersist&&(b={...b,...await l.__unstablePrePersist(S,b)}),g=await o({path:_,method:f?"PUT":"POST",data:b}),a.receiveEntityRecords(t,e,g,void 0,!0,b),l.syncConfig&&pe()?.update(`${t}/${e}`,f,g,rc,{isSave:!0})}}catch(_){y=!0,m=_}if(a({type:"SAVE_ENTITY_RECORD_FINISH",kind:t,name:e,recordId:f,error:m,isAutosave:n}),y&&s)throw m;return g}finally{a.__unstableReleaseStoreLock(p)}},pw=t=>async({dispatch:e})=>{let r=Rc(),n={saveEntityRecord(i,c,a,u){return r.add(l=>e.saveEntityRecord(i,c,a,{...u,__unstableFetch:l}))},saveEditedEntityRecord(i,c,a,u){return r.add(l=>e.saveEditedEntityRecord(i,c,a,{...u,__unstableFetch:l}))},deleteEntityRecord(i,c,a,u,l){return r.add(d=>e.deleteEntityRecord(i,c,a,u,{...l,__unstableFetch:d}))}},o=t.map(i=>i(n)),[,...s]=await Promise.all([r.run(),...o]);return s},gw=(t,e,r,n)=>async({select:o,dispatch:s,resolveSelect:i})=>{if(A(t,e,"saveEditedEntityRecord"),!o.hasEditsForEntityRecord(t,e,r))return;let a=(await i.getEntitiesConfig(t)).find(f=>f.kind===t&&f.name===e);if(!a)return;let u=a.key||M,l=o.getEntityRecordNonTransientEdits(t,e,r),d={[u]:r,...l};return await s.saveEntityRecord(t,e,d,n)},mw=(t,e,r,n,o)=>async({select:s,dispatch:i,resolveSelect:c})=>{if(A(t,e,"__experimentalSaveSpecifiedEntityEdits"),!s.hasEditsForEntityRecord(t,e,r))return;let a=s.getEntityRecordNonTransientEdits(t,e,r),u={};for(let h of n)Xe(u,h,gs(a,h));let f=(await c.getEntitiesConfig(t)).find(h=>h.kind===t&&h.name===e)?.key||M;return r&&(u[f]=r),await i.saveEntityRecord(t,e,u,o)};function yw(t){return(0,es.default)("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),Df("create/media",t)}function Df(t,e){return{type:"RECEIVE_USER_PERMISSION",key:t,isAllowed:e}}function Ew(t){return{type:"RECEIVE_USER_PERMISSIONS",permissions:t}}function ww(t,e){return{type:"RECEIVE_AUTOSAVES",postId:t,autosaves:Array.isArray(e)?e:[e]}}function _w(t){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:t}}function Sw(t,e){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:t,templateId:e}}var bw=(t,e,r,n,o,s=!1,i)=>async({dispatch:c,resolveSelect:a})=>{A(t,e,"receiveRevisions");let l=(await a.getEntitiesConfig(t)).find(f=>f.kind===t&&f.name===e),d=l&&l?.revisionKey?l.revisionKey:M;c({type:"RECEIVE_ITEM_REVISIONS",key:d,items:n,recordKey:r,meta:i,query:o,kind:t,name:e,invalidateCache:s})};var Dc={};bt(Dc,{editMediaEntity:()=>Cw,receiveEditorAssets:()=>Tw,receiveEditorSettings:()=>Rw,receiveRegisteredPostMeta:()=>vw,setCollaborationSupported:()=>xw,setSyncConnectionStatus:()=>Iw});var kf=w(Ae(),1);function vw(t,e){return{type:"RECEIVE_REGISTERED_POST_META",postType:t,registeredPostMeta:e}}var Cw=(t,e={},{__unstableFetch:r=kf.default,throwOnError:n=!1}={})=>async({dispatch:o,resolveSelect:s})=>{if(!t)return;let i="postType",c="attachment",u=(await s.getEntitiesConfig(i)).find(p=>p.kind===i&&p.name===c);if(!u)return;let l=await o.__unstableAcquireStoreLock(x,["entities","records",i,c,t],{exclusive:!0}),d,f,h=!1;try{o({type:"SAVE_ENTITY_RECORD_START",kind:i,name:c,recordId:t});try{let p=`${u.baseURL}/${t}/edit`,g=await r({path:p,method:"POST",data:{...e}});g&&(o.receiveEntityRecords(i,c,g,void 0,!0,void 0,void 0),d=g)}catch(p){f=p,h=!0}if(o({type:"SAVE_ENTITY_RECORD_FINISH",kind:i,name:c,recordId:t,error:f}),h&&n)throw f;return d}finally{o.__unstableReleaseStoreLock(l)}};function Rw(t){return{type:"RECEIVE_EDITOR_SETTINGS",settings:t}}function Tw(t){return{type:"RECEIVE_EDITOR_ASSETS",assets:t}}var xw=t=>({dispatch:e})=>{e({type:"SET_COLLABORATION_SUPPORTED",supported:t})};function Iw(t,e,r,n){return n?{type:"SET_SYNC_CONNECTION_STATUS",kind:t,name:e,key:r,status:n}:{type:"CLEAR_SYNC_CONNECTION_STATUS",kind:t,name:e,key:r}}var Lc={};bt(Lc,{__experimentalGetCurrentGlobalStylesId:()=>Gw,__experimentalGetCurrentThemeBaseGlobalStyles:()=>$w,__experimentalGetCurrentThemeGlobalStylesVariations:()=>zw,canUser:()=>Bf,canUserEditEntityRecord:()=>jw,getAuthors:()=>kw,getAutosave:()=>Yw,getAutosaves:()=>Fw,getBlockPatternCategories:()=>Hw,getBlockPatterns:()=>Kw,getCurrentTheme:()=>Nw,getCurrentThemeGlobalStylesRevisions:()=>jf,getCurrentUser:()=>Ow,getDefaultTemplateId:()=>Ff,getEditedEntityRecord:()=>Lw,getEditorAssets:()=>e_,getEditorSettings:()=>Zw,getEmbedPreview:()=>Bw,getEntitiesConfig:()=>Xw,getEntityRecord:()=>ts,getEntityRecords:()=>Un,getEntityRecordsTotalItems:()=>Pw,getEntityRecordsTotalPages:()=>Mw,getNavigationFallbackId:()=>Ww,getRawEntityRecord:()=>Uw,getRegisteredPostMeta:()=>Qw,getRevision:()=>Jw,getRevisions:()=>Yf,getThemeSupports:()=>Vw,getUserPatternCategories:()=>qw});var Ye=w(Ze(),1),Vf=w(kc(),1),N=w(Ae(),1);var Nf=w(Ae(),1);var An=w(Ae(),1),Dn=w(Ze(),1),kn=w(kc(),1),On=w(_s(),1);async function Lf(t,e={},r={}){let n=e.isInitialSuggestions&&e.initialSuggestionsSearchOptions?{...e,...e.initialSuggestionsSearchOptions}:e,{type:o,subtype:s,page:i,perPage:c=e.isInitialSuggestions?3:20}=n,{disablePostFormats:a=!1}=r,u=[];(!o||o==="post")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/search",{search:t,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(h=>({id:h.id,url:h.url,title:(0,kn.decodeEntities)(h.title||"")||(0,On.__)("(no title)"),type:h.subtype||h.type,kind:"post-type"}))).catch(()=>[])),(!o||o==="term")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/search",{search:t,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(h=>({id:h.id,url:h.url,title:(0,kn.decodeEntities)(h.title||"")||(0,On.__)("(no title)"),type:h.subtype||h.type,kind:"taxonomy"}))).catch(()=>[])),!a&&(!o||o==="post-format")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/search",{search:t,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(h=>({id:h.id,url:h.url,title:(0,kn.decodeEntities)(h.title||"")||(0,On.__)("(no title)"),type:h.subtype||h.type,kind:"taxonomy"}))).catch(()=>[])),(!o||o==="attachment")&&u.push((0,An.default)({path:(0,Dn.addQueryArgs)("/wp/v2/media",{search:t,page:i,per_page:c})}).then(f=>f.map(h=>({id:h.id,url:h.source_url,title:(0,kn.decodeEntities)(h.title.rendered||"")||(0,On.__)("(no title)"),type:h.type,kind:"media"}))).catch(()=>[]));let d=(await Promise.all(u)).flat();return d=d.filter(f=>!!f.id),d=Aw(d,t),d=d.slice(0,c),d}function Aw(t,e){let r=Uf(e),n={};for(let o of t)if(o.title){let s=Uf(o.title),i=s.filter(l=>r.some(d=>l===d)),c=s.filter(l=>r.some(d=>l!==d&&l.includes(d))),a=i.length/s.length*10,u=c.length/s.length;n[o.id]=a+u}else n[o.id]=0;return t.sort((o,s)=>n[s.id]-n[o.id])}function Uf(t){return t.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}var Pf=w(Ae(),1),Fe=w(Ze(),1),Oc=new Map,Dw=async(t,e={})=>{let r="/wp-block-editor/v1/url-details",n={url:(0,Fe.prependHTTP)(t)};if(!(0,Fe.isURL)(t))return Promise.reject(`${t} is not a valid URL.`);let o=(0,Fe.getProtocol)(t);return!o||!(0,Fe.isValidProtocol)(o)||!o.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(t)?Promise.reject(`${t} does not have a valid protocol. URLs must be "http" based`):Oc.has(t)?Oc.get(t):(0,Pf.default)({path:(0,Fe.addQueryArgs)(r,n),...e}).then(s=>(Oc.set(t,s),s))},Mf=Dw;async function Uc(){let t=await(0,Nf.default)({path:"/wp/v2/block-patterns/patterns"});return t?t.map(e=>Object.fromEntries(Object.entries(e).map(([r,n])=>[Gn(r),n]))):[]}var kw=t=>async({dispatch:e})=>{let r=(0,Ye.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t),n=await(0,N.default)({path:r});e.receiveUserQuery(r,n)},Ow=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp/v2/users/me"});t.receiveCurrentUser(e)},ts=(t,e,r="",n)=>async({select:o,dispatch:s,registry:i,resolveSelect:c})=>{let u=(await c.getEntitiesConfig(t)).find(d=>d.name===e&&d.kind===t);if(!u)return;let l=await s.__unstableAcquireStoreLock(x,["entities","records",t,e,r],{exclusive:!1});try{if(n!==void 0&&n._fields&&(n={...n,_fields:[...new Set([...ie(n._fields)||[],u.key||M])].join()}),n!==void 0&&n._fields&&o.hasEntityRecord(t,e,r,n))return;let{baseURL:d}=u;t==="postType"&&e==="wp_template"&&(r&&typeof r=="string"&&!/^\d+$/.test(r)||!window?.__experimentalTemplateActivate)&&(d=d.slice(0,d.lastIndexOf("/"))+"/templates");let f=(0,Ye.addQueryArgs)(d+(r?"/"+r:""),{...u.baseURLParams,...n}),h=await(0,N.default)({path:f,parse:!1}),p=await h.json(),g=Yr(h.headers?.get("allow")),m=[],y={};for(let E of Ct)y[Rt(E,{kind:t,name:e,id:r})]=g[E],m.push([E,{kind:t,name:e,id:r}]);if(u.syncConfig&&Fr(r)&&!n){let E=`${t}/${e}`,_=r,S={...p};Object.entries(u.transientEdits??{}).filter(([b,I])=>S[b]===void 0&&I&&typeof I=="object"&&"read"in I&&typeof I.read=="function").forEach(([b,I])=>{S[b]=I.read(S)}),pe()?.load(u.syncConfig,E,_,S,{editRecord:(b,I={})=>{Object.keys(b).length&&s({type:"EDIT_ENTITY_RECORD",kind:t,name:e,recordId:r,edits:b,meta:{undo:void 0},options:I})},getEditedRecord:async()=>await c.getEditedEntityRecord(t,e,r),onStatusChange:b=>{s.setSyncConnectionStatus(t,e,r,b)},refetchRecord:async()=>{s.receiveEntityRecords(t,e,await(0,N.default)({path:f,parse:!0}),n)},persistCRDTDoc:()=>{c.getEditedEntityRecord(t,e,r).then(b=>{let{meta:I,status:O}=b;O==="auto-draft"||!I||s.saveEntityRecord(t,e,b)})},addUndoMeta:(b,I)=>{let O=$o(b);O&&I.set("selectionHistory",O)},restoreUndoMeta:(b,I)=>{let O=I.get("selectionHistory");O&&setTimeout(()=>{Jd(O,b)},0)}})}i.batch(()=>{s.receiveEntityRecords(t,e,p,n),s.receiveUserPermissions(y),s.finishResolutions("canUser",m)})}finally{s.__unstableReleaseStoreLock(l)}};ts.shouldInvalidate=(t,e,r)=>e==="root"&&r==="site"&&(t.type==="RECEIVE_ITEMS"&&t.persistedEdits&&t.persistedEdits.status!=="auto-draft"||t.type==="REMOVE_ITEMS")&&t.kind==="postType"&&t.name==="wp_template";var Uw=vt("getEntityRecord"),Lw=vt("getEntityRecord"),Un=(t,e,r={})=>async({dispatch:n,registry:o,resolveSelect:s})=>{let c=(await s.getEntitiesConfig(t)).find(f=>f.name===e&&f.kind===t);if(!c)return;let a=await n.__unstableAcquireStoreLock(x,["entities","records",t,e],{exclusive:!1}),u={...r},l=c.key||M;function d(f,h){let p=Object.fromEntries(Object.entries(h).filter(([g,m])=>["context","_fields"].includes(g)&&!!m));return f.filter(g=>g?.[l]).map(g=>[t,e,g[l],Object.keys(p).length>0?p:void 0])}try{r._fields&&(r={...r,_fields:[...new Set([...ie(r._fields)||[],l])].join()});let{baseURL:f}=c,{combinedTemplates:h=!0}=r;t==="postType"&&e==="wp_template"&&h&&(f=f.slice(0,f.lastIndexOf("/"))+"/templates");let p=(0,Ye.addQueryArgs)(f,{...c.baseURLParams,...r}),g=[],m;if(c.supportsPagination&&r.per_page!==-1){let y=await(0,N.default)({path:p,parse:!1});g=Object.values(await y.json()),m={totalItems:parseInt(y.headers.get("X-WP-Total")),totalPages:parseInt(y.headers.get("X-WP-TotalPages"))}}else if(r.per_page===-1&&r[Gr]===!0){let y=1,E;do{let _=await(0,N.default)({path:(0,Ye.addQueryArgs)(p,{page:y,per_page:100}),parse:!1}),S=Object.values(await _.json());E=parseInt(_.headers.get("X-WP-TotalPages")),m||(m={totalItems:parseInt(_.headers.get("X-WP-Total")),totalPages:1}),g.push(...S),o.batch(()=>{n.receiveEntityRecords(t,e,g,r,!1,void 0,m),n.finishResolutions("getEntityRecord",d(S,u))}),y++}while(y<=E)}else g=Object.values(await(0,N.default)({path:p})),m={totalItems:g.length,totalPages:1};if(c.syncConfig&&r.per_page===-1){let y=`${t}/${e}`;pe()?.loadCollection(c.syncConfig,y,{onStatusChange:E=>{n.setSyncConnectionStatus(t,e,null,E)},refetchRecords:async()=>{n.receiveEntityRecords(t,e,await(0,N.default)({path:p,parse:!0}),r)}})}r._fields&&(g=g.map(y=>(r._fields.split(",").forEach(E=>{y.hasOwnProperty(E)||(y[E]=void 0)}),y))),o.batch(()=>{n.receiveEntityRecords(t,e,g,r,!1,void 0,m);let y=g.filter(S=>!!S?.[l]&&!!S?._links?.self?.[0]?.targetHints?.allow).map(S=>({id:S[l],permissions:Yr(S._links.self[0].targetHints.allow)})),E=[],_={};for(let S of y)for(let b of Ct)E.push([b,{kind:t,name:e,id:S.id}]),_[Rt(b,{kind:t,name:e,id:S.id})]=S.permissions[b];y.length>0&&(n.receiveUserPermissions(_),n.finishResolutions("canUser",E)),n.finishResolutions("getEntityRecord",d(g,u)),n.__unstableReleaseStoreLock(a)})}catch{n.__unstableReleaseStoreLock(a)}};Un.shouldInvalidate=(t,e,r)=>(t.type==="RECEIVE_ITEMS"||t.type==="REMOVE_ITEMS")&&t.invalidateCache&&e===t.kind&&r===t.name;var Pw=vt("getEntityRecords"),Mw=vt("getEntityRecords"),Nw=()=>async({dispatch:t,resolveSelect:e})=>{let r=await e.getEntityRecords("root","theme",{status:"active"});t.receiveCurrentTheme(r[0])},Vw=vt("getCurrentTheme"),Bw=t=>async({dispatch:e})=>{try{let r=await(0,N.default)({path:(0,Ye.addQueryArgs)("/oembed/1.0/proxy",{url:t})});e.receiveEmbedPreview(t,r)}catch{e.receiveEmbedPreview(t,!1)}},Bf=(t,e,r)=>async({dispatch:n,registry:o,resolveSelect:s})=>{if(!Ct.includes(t))throw new Error(`'${t}' is not a valid action.`);let{hasStartedResolution:i}=o.select(x);for(let l of Ct){if(l===t)continue;if(i("canUser",[l,e,r]))return}let c=null;if(typeof e=="object"){if(!e.kind||!e.name)throw new Error("The entity resource object is not valid.");let d=(await s.getEntitiesConfig(e.kind)).find(f=>f.name===e.name&&f.kind===e.kind);if(!d)return;c=d.baseURL+(e.id?"/"+e.id:"")}else c=`/wp/v2/${e}`+(r?"/"+r:"");let a;try{a=await(0,N.default)({path:c,method:"OPTIONS",parse:!1})}catch{return}let u=Yr(a.headers?.get("allow"));o.batch(()=>{for(let l of Ct){let d=Rt(l,e,r);n.receiveUserPermission(d,u[l]),l!==t&&n.finishResolution("canUser",[l,e,r])}})},jw=(t,e,r)=>async({dispatch:n})=>{await n(Bf("update",{kind:t,name:e,id:r}))},Fw=(t,e)=>async({dispatch:r,resolveSelect:n})=>{let{rest_base:o,rest_namespace:s="wp/v2",supports:i}=await n.getPostType(t);if(!i?.autosave)return;let c=await(0,N.default)({path:`/${s}/${o}/${e}/autosaves?context=edit`});c&&c.length&&r.receiveAutosaves(e,c)},Yw=(t,e)=>async({resolveSelect:r})=>{await r.getAutosaves(t,e)},Gw=()=>async({dispatch:t,resolveSelect:e})=>{let n=(await e.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!n)return;let o=n.match(/\/(\d+)(?:\?|$)/),s=o?Number(o[1]):null;s&&t.__experimentalReceiveCurrentGlobalStylesId(s)},$w=()=>async({resolveSelect:t,dispatch:e})=>{let r=await t.getCurrentTheme(),n=await(0,N.default)({path:`/wp/v2/global-styles/themes/${r.stylesheet}?context=view`});e.__experimentalReceiveThemeBaseGlobalStyles(r.stylesheet,n)},zw=()=>async({resolveSelect:t,dispatch:e})=>{let r=await t.getCurrentTheme(),n=await(0,N.default)({path:`/wp/v2/global-styles/themes/${r.stylesheet}/variations?context=view`});e.__experimentalReceiveThemeGlobalStyleVariations(r.stylesheet,n)},jf=()=>async({resolveSelect:t,dispatch:e})=>{let r=await t.__experimentalGetCurrentGlobalStylesId(),o=(r?await t.getEntityRecord("root","globalStyles",r):void 0)?._links?.["version-history"]?.[0]?.href;if(o){let i=(await(0,N.default)({url:o}))?.map(c=>Object.fromEntries(Object.entries(c).map(([a,u])=>[Gn(a),u])));e.receiveThemeGlobalStyleRevisions(r,i)}};jf.shouldInvalidate=t=>t.type==="SAVE_ENTITY_RECORD_FINISH"&&t.kind==="root"&&!t.error&&t.name==="globalStyles";var Kw=()=>async({dispatch:t})=>{let e=await Uc();t({type:"RECEIVE_BLOCK_PATTERNS",patterns:e})},Hw=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp/v2/block-patterns/categories"});t({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:e})},qw=()=>async({dispatch:t,resolveSelect:e})=>{let n=(await e.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(o=>({...o,label:(0,Vf.decodeEntities)(o.name),name:o.slug}))||[];t({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:n})},Ww=()=>async({dispatch:t,select:e,registry:r})=>{let n=await(0,N.default)({path:(0,Ye.addQueryArgs)("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),o=n?._embedded?.self;r.batch(()=>{if(t.receiveNavigationFallbackId(n?.id),!o)return;let i=!e.getEntityRecord("postType","wp_navigation",n.id);t.receiveEntityRecords("postType","wp_navigation",o,void 0,i),t.finishResolution("getEntityRecord",["postType","wp_navigation",n.id])})},Ff=t=>async({dispatch:e,registry:r,resolveSelect:n})=>{let o=await(0,N.default)({path:(0,Ye.addQueryArgs)("/wp/v2/templates/lookup",t)});await n.getEntitiesConfig("postType");let s=window?.__experimentalTemplateActivate&&o?.wp_id||o?.id;s&&(o.id=s,r.batch(()=>{e.receiveDefaultTemplateId(t,s),e.receiveEntityRecords("postType",o.type,o),e.finishResolution("getEntityRecord",["postType",o.type,s])}))};Ff.shouldInvalidate=t=>t.type==="RECEIVE_ITEMS"&&t.kind==="root"&&t.name==="site";var Yf=(t,e,r,n={})=>async({dispatch:o,registry:s,resolveSelect:i})=>{let a=(await i.getEntitiesConfig(t)).find(p=>p.name===e&&p.kind===t);if(!a)return;n._fields&&(n={...n,_fields:[...new Set([...ie(n._fields)||[],a.revisionKey||M])].join()});let u=(0,Ye.addQueryArgs)(a.getRevisionsUrl(r),n),l,d,f={},h=a.supportsPagination&&n.per_page!==-1;try{d=await(0,N.default)({path:u,parse:!h})}catch{return}d&&(h?(l=Object.values(await d.json()),f.totalItems=parseInt(d.headers.get("X-WP-Total"))):l=Object.values(d),n._fields&&(l=l.map(p=>(n._fields.split(",").forEach(g=>{p.hasOwnProperty(g)||(p[g]=void 0)}),p))),s.batch(()=>{if(o.receiveRevisions(t,e,r,l,n,!1,f),!n?._fields&&!n.context){let p=a.revisionKey||M,g=l.filter(m=>m[p]).map(m=>[t,e,r,m[p]]);o.finishResolutions("getRevision",g)}}))};Yf.shouldInvalidate=(t,e,r,n)=>t.type==="SAVE_ENTITY_RECORD_FINISH"&&r===t.name&&e===t.kind&&!t.error&&n===t.recordId;var Jw=(t,e,r,n,o)=>async({dispatch:s,resolveSelect:i})=>{let a=(await i.getEntitiesConfig(t)).find(d=>d.name===e&&d.kind===t);if(!a)return;o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...ie(o._fields)||[],a.revisionKey||M])].join()});let u=(0,Ye.addQueryArgs)(a.getRevisionsUrl(r,n),o),l;try{l=await(0,N.default)({path:u})}catch{return}l&&s.receiveRevisions(t,e,r,l,o)},Qw=t=>async({dispatch:e,resolveSelect:r})=>{let n;try{let{rest_namespace:o="wp/v2",rest_base:s}=await r.getPostType(t)||{};n=await(0,N.default)({path:`${o}/${s}/?context=edit`,method:"OPTIONS"})}catch{return}n&&e.receiveRegisteredPostMeta(t,n?.schema?.properties?.meta?.properties)},Xw=t=>async({dispatch:e})=>{let r=Wo.find(n=>n.kind===t);if(r)try{let n=await r.loadEntities();if(!n.length)return;e.addEntities(n)}catch{}},Zw=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp-block-editor/v1/settings"});t.receiveEditorSettings(e)},e_=()=>async({dispatch:t})=>{let e=await(0,N.default)({path:"/wp-block-editor/v1/assets"});t.receiveEditorAssets(e)};function Pc(t,e){let r={...t},n=r;for(let o of e)n.children={...n.children,[o]:{locks:[],children:{},...n.children[o]}},n=n.children[o];return r}function Ln(t,e){let r=t;for(let n of e){let o=r.children[n];if(!o)return null;r=o}return r}function*Gf(t,e){let r=t;yield r;for(let n of e){let o=r.children[n];if(!o)break;yield o,r=o}}function*$f(t){let e=Object.values(t.children);for(;e.length;){let r=e.pop();yield r,e.push(...Object.values(r.children))}}function Mc({exclusive:t},e){return!!(t&&e.length||!t&&e.filter(r=>r.exclusive).length)}var t_={requests:[],tree:{locks:[],children:{}}};function Pn(t=t_,e){switch(e.type){case"ENQUEUE_LOCK_REQUEST":{let{request:r}=e;return{...t,requests:[r,...t.requests]}}case"GRANT_LOCK_REQUEST":{let{lock:r,request:n}=e,{store:o,path:s}=n,i=[o,...s],c=Pc(t.tree,i),a=Ln(c,i);return a.locks=[...a.locks,r],{...t,requests:t.requests.filter(u=>u!==n),tree:c}}case"RELEASE_LOCK":{let{lock:r}=e,n=[r.store,...r.path],o=Pc(t.tree,n),s=Ln(o,n);return s.locks=s.locks.filter(i=>i!==r),{...t,tree:o}}}return t}function zf(t){return t.requests}function Kf(t,e,r,{exclusive:n}){let o=[e,...r],s=t.tree;for(let c of Gf(s,o))if(Mc({exclusive:n},c.locks))return!1;let i=Ln(s,o);if(!i)return!0;for(let c of $f(i))if(Mc({exclusive:n},c.locks))return!1;return!0}function Hf(){let t=Pn(void 0,{type:"@@INIT"});function e(){for(let o of zf(t)){let{store:s,path:i,exclusive:c,notifyAcquired:a}=o;if(Kf(t,s,i,{exclusive:c})){let u={store:s,path:i,exclusive:c};t=Pn(t,{type:"GRANT_LOCK_REQUEST",lock:u,request:o}),a(u)}}}function r(o,s,i){return new Promise(c=>{t=Pn(t,{type:"ENQUEUE_LOCK_REQUEST",request:{store:o,path:s,exclusive:i,notifyAcquired:c}}),e()})}function n(o){t=Pn(t,{type:"RELEASE_LOCK",lock:o}),e()}return{acquire:r,release:n}}function qf(){let t=Hf();function e(n,o,{exclusive:s}){return()=>t.acquire(n,o,s)}function r(n){return()=>t.release(n)}return{__unstableAcquireStoreLock:e,__unstableReleaseStoreLock:r}}var Wf,Jf;var rs=w(We(),1);var Xf=w(We(),1),wt=(0,Xf.createContext)({});wt.displayName="EntityContext";var th=w(eh(),1);function rh({kind:t,type:e,id:r,revisionId:n,children:o}){let s=(0,rs.useContext)(wt),i=(0,rs.useMemo)(()=>({...s,...t&&{[t]:{...s?.[t],[e]:r}},...n!==void 0&&{revisionId:n}}),[s,t,e,r,n]);return(0,th.jsx)(wt.Provider,{value:i,children:o})}var ns=w(W(),1),ch=w(er(),1),ah=w(We(),1);var sh=w(W(),1);function nh(t,e){var r=0,n,o;e=e||{};function s(){var i=n,c=arguments.length,a,u;e:for(;i;){if(i.args.length!==arguments.length){i=i.next;continue}for(u=0;u<c;u++)if(i.args[u]!==arguments[u]){i=i.next;continue e}return i!==n&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n,i.prev=null,n.prev=i,n=i),i.val}for(a=new Array(c),u=0;u<c;u++)a[u]=arguments[u];return i={args:a,val:t.apply(null,a)},n?(n.prev=i,i.next=n):o=i,r===e.maxSize?(o=o.prev,o.next=null):r++,n=i,i.val}return s.clear=function(){n=null,o=null,r=0},s}var oh=nh;var te=(t=>(t.Idle="IDLE",t.Resolving="RESOLVING",t.Error="ERROR",t.Success="SUCCESS",t))(te||{});var r_=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function Mr(t,e){return(0,sh.useSelect)((r,n)=>t(s=>n_(r(s)),n),e)}var n_=oh((t=>{let e={};for(let r in t)r_.includes(r)||Object.defineProperty(e,r,{get:()=>(...n)=>{let o=t[r](...n),s=t.getResolutionState(r,n)?.status,i;switch(s){case"resolving":i=te.Resolving;break;case"finished":i=te.Success;break;case"error":i=te.Error;break;case void 0:i=te.Idle;break}return{data:o,status:i,isResolving:i===te.Resolving,hasStarted:i!==te.Idle,hasResolved:i===te.Success||i===te.Error}}});return e}));var ih={};function Nc(t,e,r,n={enabled:!0}){let{editEntityRecord:o,saveEditedEntityRecord:s}=(0,ns.useDispatch)(q),i=(0,ah.useMemo)(()=>({edit:(f,h={})=>o(t,e,r,f,h),save:(f={})=>s(t,e,r,{throwOnError:!0,...f})}),[o,t,e,r,s]),{editedRecord:c,hasEdits:a,edits:u}=(0,ns.useSelect)(f=>n.enabled?{editedRecord:f(q).getEditedEntityRecord(t,e,r),hasEdits:f(q).hasEditsForEntityRecord(t,e,r),edits:f(q).getEntityRecordNonTransientEdits(t,e,r)}:{editedRecord:ih,hasEdits:!1,edits:ih},[t,e,r,n.enabled]),{data:l,...d}=Mr(f=>n.enabled?f(q).getEntityRecord(t,e,r):{data:null},[t,e,r,n.enabled]);return{record:l,editedRecord:c,hasEdits:a,edits:u,...d,...i}}function lh(t,e,r,n){return(0,ch.default)("wp.data.__experimentalUseEntityRecord",{alternative:"wp.data.useEntityRecord",since:"6.1"}),Nc(t,e,r,n)}var uh=w(Ze(),1),dh=w(er(),1),os=w(W(),1),Vc=w(We(),1);var o_=[];function ss(t,e,r={},n={enabled:!0}){let o=(0,uh.addQueryArgs)("",r),{data:s,...i}=Mr(u=>n.enabled?u(q).getEntityRecords(t,e,r):{data:o_},[t,e,o,n.enabled]),{totalItems:c,totalPages:a}=(0,os.useSelect)(u=>n.enabled?{totalItems:u(q).getEntityRecordsTotalItems(t,e,r),totalPages:u(q).getEntityRecordsTotalPages(t,e,r)}:{totalItems:null,totalPages:null},[t,e,o,n.enabled]);return{records:s,totalItems:c,totalPages:a,...i}}function fh(t,e,r,n){return(0,dh.default)("wp.data.__experimentalUseEntityRecords",{alternative:"wp.data.useEntityRecords",since:"6.1"}),ss(t,e,r,n)}function hh(t,e,r={},n={enabled:!0}){let o=(0,os.useSelect)(l=>l(q).getEntityConfig(t,e),[t,e]),{records:s,...i}=ss(t,e,{...r,...r._fields?{_fields:[...new Set([...ie(r._fields)||[],"_links"])].join()}:{}},n),c=(0,Vc.useMemo)(()=>s?.map(l=>l[o?.key??"id"])??[],[s,o?.key]),a=(0,os.useSelect)(l=>{let{getEntityRecordsPermissions:d}=Se(l(q));return d(t,e,c)},[c,t,e]);return{records:(0,Vc.useMemo)(()=>s?.map((l,d)=>({...l,permissions:a[d]}))??[],[s,a]),...i}}var mh=w(er(),1),yh=w(gh(),1);function Eh(t,e){let r=typeof t=="object",n=r?JSON.stringify(t):t;return r&&typeof e<"u"&&(0,yh.default)("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),Mr(o=>{let s=r?!!t.id:!!e,{canUser:i}=o(q),c=i("create",r?{kind:t.kind,name:t.name}:t);if(!s){let p=i("read",t),g=c.isResolving||p.isResolving,m=c.hasResolved&&p.hasResolved,y=te.Idle;return g?y=te.Resolving:m&&(y=te.Success),{status:y,isResolving:g,hasResolved:m,canCreate:c.hasResolved&&c.data,canRead:p.hasResolved&&p.data}}let a=i("read",t,e),u=i("update",t,e),l=i("delete",t,e),d=a.isResolving||c.isResolving||u.isResolving||l.isResolving,f=a.hasResolved&&c.hasResolved&&u.hasResolved&&l.hasResolved,h=te.Idle;return d?h=te.Resolving:f&&(h=te.Success),{status:h,isResolving:d,hasResolved:f,canRead:f&&a.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&l.data}},[n,e])}var wh=Eh;function _h(t,e){return(0,mh.default)("wp.data.__experimentalUseResourcePermissions",{alternative:"wp.data.useResourcePermissions",since:"6.1"}),Eh(t,e)}var Mn=w(We(),1),is=w(W(),1),cs=w(nr(),1);var Sh=w(We(),1);function Nr(t,e){return(0,Sh.useContext)(wt)?.[t]?.[e]}var _t=w(bn(),1);var bh=w(Ar(),1);var Bc,jc=new WeakMap;function vh(t){if(Bc||(Bc=Se(bh.privateApis)),!jc.has(t)){let e=Bc.getRichTextValues([t]);jc.set(t,e)}return jc.get(t)}var Fc=new WeakMap;function s_(t){if(!Fc.has(t)){let e=[];for(let r of vh(t))r&&r.replacements.forEach(({type:n,attributes:o})=>{n==="core/footnote"&&e.push(o["data-fn"])});Fc.set(t,e)}return Fc.get(t)}function Ch(t){return t.flatMap(s_)}var Yc={};function Gc(t,e){let r={blocks:t};if(!e||e.footnotes===void 0)return r;let n=Ch(t),o=e.footnotes?JSON.parse(e.footnotes):[];if(o.map(l=>l.id).join("")===n.join(""))return r;let i=n.map(l=>o.find(d=>d.id===l)||Yc[l]||{id:l,content:""});function c(l){if(!l||Array.isArray(l)||typeof l!="object")return l;l={...l};for(let d in l){let f=l[d];if(Array.isArray(f)){l[d]=f.map(c);continue}if(typeof f!="string"&&!(f instanceof _t.RichTextData))continue;let h=typeof f=="string"?_t.RichTextData.fromHTMLString(f):new _t.RichTextData(f),p=!1;h.replacements.forEach(g=>{if(g.type==="core/footnote"){let m=g.attributes["data-fn"],y=n.indexOf(m),E=(0,_t.create)({html:g.innerHTML});E.text=String(y+1),E.formats=Array.from({length:E.text.length},()=>E.formats[0]),E.replacements=Array.from({length:E.text.length},()=>E.replacements[0]),g.innerHTML=(0,_t.toHTMLString)({value:E}),p=!0}}),p&&(l[d]=typeof f=="string"?h.toHTMLString():h)}return l}function a(l){return l.map(d=>({...d,attributes:c(d.attributes),innerBlocks:a(d.innerBlocks)}))}let u=a(t);return Yc={...Yc,...o.reduce((l,d)=>(n.includes(d.id)||(l[d.id]=d),l),{})},{meta:{...e,footnotes:JSON.stringify(i)},blocks:u}}var i_=[],Rh=new Map;function Th(t,e,{id:r}={}){let n=Nr(t,e),o=r??n,{content:s,editedBlocks:i,meta:c}=(0,is.useSelect)(h=>{if(!o)return{};let{getEditedEntityRecord:p}=h(x),g=p(t,e,o);return{editedBlocks:g.blocks,content:g.content,meta:g.meta}},[t,e,o]),{__unstableCreateUndoLevel:a,editEntityRecord:u}=(0,is.useDispatch)(x),l=(0,Mn.useMemo)(()=>{if(!o)return;if(i)return i;if(!s||typeof s!="string")return i_;let h=`${t}:${e}:${o}`,p=Rh.get(h),g;return p&&p.content===s?g=p.blocks:(g=(0,cs.parse)(s),Rh.set(h,{content:s,blocks:g})),g},[t,e,o,i,s]),d=(0,Mn.useCallback)((h,p)=>{if(l===h)return a(t,e,o);let{selection:m,...y}=p,E={selection:m,content:({blocks:_=[]})=>(0,cs.__unstableSerializeAndClean)(_),...Gc(h,c)};u(t,e,o,E,{isCached:!1,...y})},[t,e,o,l,c,a,u]),f=(0,Mn.useCallback)((h,p)=>{let{selection:g,...m}=p,y={selection:g,...Gc(h,c)};u(t,e,o,y,{isCached:!0,...m})},[t,e,o,c,u]);return[l,f,d]}var as=w(We(),1),ls=w(W(),1);function xh(t,e,r,n){let o=Nr(t,e),s=n??o,c=(0,as.useContext)(wt)?.revisionId,{value:a,fullValue:u}=(0,ls.useSelect)(f=>{if(c){let y=f(x).getRevisions(t,e,s,{per_page:-1,context:"edit",_fields:"id,date,author,meta,title.raw,excerpt.raw,content.raw"}),_=f(x).getEntityConfig(t,e)?.revisionKey||M,S=y?.find(b=>b[_]===c);return S?{value:S[r]?.raw??S[r],fullValue:S[r]}:{}}let{getEntityRecord:h,getEditedEntityRecord:p}=f(x),g=h(t,e,s),m=p(t,e,s);return g&&m?{value:m[r],fullValue:g[r]}:{}},[t,e,s,r,c]),{editEntityRecord:l}=(0,ls.useDispatch)(x),d=(0,as.useCallback)(f=>{c||l(t,e,s,{[r]:f})},[l,t,e,s,r,c]);return[a,d,u]}var us=w(jn(),1),Je=w(We(),1);var c_={richTextOffset:null,localClientId:null},$c={activeCollaborators:[],resolveSelection:()=>c_,getDebugData:()=>({doc:{},clients:{},collaboratorMap:{}}),isCurrentCollaboratorDisconnected:!1};function Ih(t,e){let r=e??t.getCurrentState();return{activeCollaborators:r,resolveSelection:n=>t.convertSelectionStateToAbsolute(n),getDebugData:()=>t.getDebugData(),isCurrentCollaboratorDisconnected:r.find(n=>n.isMe)?.isConnected===!1}}function Nn(t,e){let[r,n]=(0,Je.useState)($c);return(0,Je.useEffect)(()=>{if(t===null||e===null){n($c);return}let o=`postType/${e}`,s=t.toString(),i=pe()?.getAwareness(o,s);if(!i){n($c);return}return i.setUp(),n(Ih(i)),i?.onStateChange(a=>{n(Ih(i,a))})},[t,e]),r}function Ah(t,e){return Nn(t,e).activeCollaborators}function Dh(t,e){return Nn(t,e).resolveSelection}function a_(t,e){let[r,n]=(0,Je.useState)(null);return(0,Je.useEffect)(()=>{if(t===null||e===null){n(null);return}let o=pe()?.getAwareness(`postType/${e}`,t.toString());if(!o){n(null);return}o.setUp();let s=o.doc.getMap("state"),i=o.doc.getMap("document"),c=Date.now(),a=u=>{if(u.keysChanged.has("savedAt")){let l=s.get("savedAt"),d=s.get("savedBy");if(typeof l=="number"&&typeof d=="number"&&l>c){let f=i.get("status");n({savedAt:l,savedByClientId:d,postStatus:f})}}};return s.observe(a),()=>{s.unobserve(a)}},[t,e]),r}function kh(t,e,r){let{activeCollaborators:n}=Nn(t,e),o=(0,us.usePrevious)(n);(0,Je.useEffect)(()=>{if(!o||o.length===0)return;let s=new Map(o.map(c=>[c.clientId,c])),i=n.find(c=>c.isMe);for(let c of n)!s.has(c.clientId)&&!c.isMe&&r(c,i)},[n,o,r])}function Oh(t,e,r){let{activeCollaborators:n}=Nn(t,e),o=(0,us.usePrevious)(n);(0,Je.useEffect)(()=>{if(!o||o.length===0)return;let s=new Map(n.map(i=>[i.clientId,i]));for(let i of o){if(i.isMe||!i.isConnected)continue;s.get(i.clientId)?.isConnected||r(i)}},[n,o,r])}function Uh(t,e,r){let{activeCollaborators:n}=Nn(t,e),o=a_(t,e),s=(0,us.usePrevious)(o);(0,Je.useEffect)(()=>{if(!o||s&&o.savedAt===s.savedAt)return;let i=n.find(c=>c.clientId===o.savedByClientId&&!c.isMe);i&&r(o,i,s??null)},[o,s,n,r])}var l_={useEntityRecordsWithPermissions:hh,RECEIVE_INTERMEDIATE_RESULTS:Gr,retrySyncConnection:Sd,useActiveCollaborators:Ah,useResolvedSelection:Dh,useOnCollaboratorJoin:kh,useOnCollaboratorLeave:Oh,useOnPostSave:Uh,SelectionType:Dr,SelectionDirection:kr},Lh={};yd(Lh,l_);var zc=[...qo,...Wo.filter(t=>!!t.name)],u_=zc.reduce((t,e)=>{let{kind:r,name:n,plural:o}=e,s=Zt(r,n);if(t[s]=(i,c,a)=>(A(r,n,s,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecord"}),xe(i,r,n,c,a)),o){let i=Zt(r,o,"get");t[i]=(c,a)=>(A(r,n,i,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecords"}),Xo(c,r,n,a))}return t},{}),d_=zc.reduce((t,e)=>{let{kind:r,name:n,plural:o}=e,s=Zt(r,n);if(t[s]=(i,c)=>(A(r,n,s,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecord"}),ts(r,n,i,c)),o){let i=Zt(r,o,"get");t[i]=(...c)=>(A(r,o,i,{isShorthandSelector:!0,alternativeFunctionName:"getEntityRecords"}),Un(r,n,...c)),t[i].shouldInvalidate=c=>Un.shouldInvalidate(c,r,n)}return t},{}),f_=zc.reduce((t,e)=>{let{kind:r,name:n}=e,o=Zt(r,n,"save");t[o]=(i,c)=>(A(r,n,o,{isShorthandSelector:!0,alternativeFunctionName:"saveEntityRecord"}),Ic(r,n,i,c));let s=Zt(r,n,"delete");return t[s]=(i,c,a)=>(A(r,n,s,{isShorthandSelector:!0,alternativeFunctionName:"deleteEntityRecord"}),xc(r,n,i,c,a)),t},{}),h_=()=>({reducer:hf,actions:{...Wf,...Ac,...f_,...qf()},selectors:{...Jf,...bc,...u_},resolvers:{...Lc,...d_}}),q=(0,ds.createReduxStore)(x,h_());Se(q).registerPrivateSelectors(yc);Se(q).registerPrivateActions(Dc);(0,ds.register)(q);return Yh(p_);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/media-utils.min.js?ver=85f1375ab5f23cd5d13c 
"use strict";var wp;(wp||={}).mediaUtils=(()=>{var Qb=Object.create;var Ci=Object.defineProperty;var Jb=Object.getOwnPropertyDescriptor;var ex=Object.getOwnPropertyNames;var tx=Object.getPrototypeOf,rx=Object.prototype.hasOwnProperty;var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ox=(e,t)=>{for(var r in t)Ci(e,r,{get:t[r],enumerable:!0})},md=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ex(t))!rx.call(e,n)&&n!==r&&Ci(e,n,{get:()=>t[n],enumerable:!(o=Jb(t,n))||o.enumerable});return e};var u=(e,t,r)=>(r=e!=null?Qb(tx(e)):{},md(t||!e||!e.__esModule?Ci(r,"default",{value:e,enumerable:!0}):r,e)),nx=e=>md(Ci({},"__esModule",{value:!0}),e);var z=Oe((O_,pd)=>{pd.exports=window.wp.element});var j=Oe((A_,vd)=>{vd.exports=window.wp.i18n});var ll=Oe((N_,wd)=>{wd.exports=window.wp.blob});var ul=Oe((D_,yd)=>{yd.exports=window.wp.apiFetch});var Pn=Oe((lS,Ad)=>{Ad.exports=window.wp.coreData});var qt=Oe((uS,Id)=>{Id.exports=window.wp.data});var G=Oe((cS,Pd)=>{Pd.exports=window.wp.components});var le=Oe((dS,Rd)=>{Rd.exports=window.wp.primitives});var P=Oe((fS,Vd)=>{Vd.exports=window.ReactJSXRuntime});var bt=Oe((bC,Nd)=>{Nd.exports=window.wp.compose});var ue=Oe((xC,Dd)=>{Dd.exports=window.React});var Zd=Oe((YC,Kd)=>{Kd.exports=window.ReactDOM});var Qd=Oe(Xd=>{"use strict";var jo=ue();function Cx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ex=typeof Object.is=="function"?Object.is:Cx,Tx=jo.useState,Ox=jo.useEffect,Ax=jo.useLayoutEffect,Ix=jo.useDebugValue;function Px(e,t){var r=t(),o=Tx({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return Ax(function(){n.value=r,n.getSnapshot=t,mu(n)&&i({inst:n})},[e,r,t]),Ox(function(){return mu(n)&&i({inst:n}),e(function(){mu(n)&&i({inst:n})})},[e]),Ix(r),r}function mu(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ex(e,r)}catch{return!0}}function Rx(e,t){return t()}var Vx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Rx:Px;Xd.useSyncExternalStore=jo.useSyncExternalStore!==void 0?jo.useSyncExternalStore:Vx});var ef=Oe(($C,Jd)=>{"use strict";Jd.exports=Qd()});var pu=Oe((QC,of)=>{of.exports=window.wp.privateApis});var hu=Oe((s2,pf)=>{pf.exports=window.wp.keycodes});var Up=Oe((AR,os)=>{var zp={\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"},Wp=Object.keys(zp).join("|"),Mw=new RegExp(Wp,"g"),Fw=new RegExp(Wp,"");function Lw(e){return zp[e]}var Gp=function(e){return e.replace(Mw,Lw)},Bw=function(e){return!!e.match(Fw)};os.exports=Gp;os.exports.has=Bw;os.exports.remove=Gp});var rv=Oe((MR,tv)=>{"use strict";tv.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var Or=Oe((rD,kv)=>{kv.exports=window.wp.date});var sh=Oe((GD,ah)=>{ah.exports=window.wp.warning});var ol=Oe((wL,gb)=>{gb.exports=window.wp.url});var jb=Oe((YL,Bb)=>{Bb.exports=window.wp.notices});var E_={};ox(E_,{MediaUpload:()=>xd,privateApis:()=>dd,transformAttachment:()=>kr,uploadMedia:()=>Vi,validateFileSize:()=>Pi,validateMimeType:()=>Oi,validateMimeTypeForUser:()=>Ii});var gd=u(z(),1),bd=u(j(),1),ix=[],ax=()=>{let{wp:e}=window;return e.media.view.MediaFrame.Select.extend({featuredImageToolbar(t){this.createSelectToolbar(t,{text:e.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){let t=this.state("featured-image").get("selection"),r=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(r),r.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.FeaturedImage,new e.media.controller.EditImage({model:this.options.editImage})])}})},sx=()=>{let{wp:e}=window;return e.media.view.MediaFrame.Select.extend({createStates(){let t=this.options;this.options.states||this.states.add([new e.media.controller.Library({library:e.media.query(t.library),multiple:t.multiple,title:t.title,priority:20,filterable:"uploaded"}),new e.media.controller.EditImage({model:t.editImage})])}})},lx=()=>{let{wp:e}=window;return e.media.view.MediaFrame.Post.extend({galleryToolbar(){let t=this.state().get("editing");this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:t?e.media.view.l10n.updateGallery:e.media.view.l10n.insertGallery,priority:80,requires:{library:!0},click(){let r=this.controller,o=r.state();r.close(),o.trigger("update",o.get("library")),r.setState(r.options.state),r.reset()}}}}))},editState(){let t=this.state("gallery").get("selection"),r=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(r),r.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.Library({id:"gallery",title:e.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:e.media.query({type:"image",...this.options.library})}),new e.media.controller.EditImage({model:this.options.editImage}),new e.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new e.media.controller.GalleryAdd])}})},hd=e=>["sizes","mime","type","subtype","id","url","alt","link","caption"].reduce((r,o)=>(e?.hasOwnProperty(o)&&(r[o]=e[o]),r),{}),Ei=e=>{let{wp:t}=window;return t.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"})},ux=class extends gd.Component{constructor(){super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this)}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){let{addToGallery:e=!1,allowedTypes:t,multiple:r=!1,value:o=ix}=this.props;if(o===this.lastGalleryValue)return;let{wp:n}=window;this.lastGalleryValue=o,this.frame&&this.frame.remove();let i;e?i="gallery-library":i=o&&o.length?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=lx());let a=Ei(o),s=new n.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:r});this.frame=new this.GalleryDetailsMediaFrame({mimeType:t,state:i,multiple:r,selection:s,editing:!!o?.length}),n.media.frame=this.frame,this.initializeListeners()}buildAndSetFeatureImageFrame(){let{wp:e}=window,{value:t,multiple:r,allowedTypes:o}=this.props,n=ax(),i=Ei(t),a=new e.media.model.Selection(i.models,{props:i.props.toJSON()});this.frame=new n({mimeType:o,state:"featured-image",multiple:r,selection:a,editing:t}),e.media.frame=this.frame,e.media.view.settings.post={...e.media.view.settings.post,featuredImageId:t||-1}}buildAndSetSingleMediaFrame(){let{wp:e}=window,{allowedTypes:t,multiple:r=!1,title:o=(0,bd.__)("Select or Upload Media"),value:n}=this.props,i={title:o,multiple:r};t&&(i.library={type:t}),this.frame&&this.frame.remove();let a=sx(),s=Ei(n),l=new e.media.model.Selection(s.models,{props:s.props.toJSON()});this.frame=new a({mimeType:t,multiple:r,selection:l,...i}),e.media.frame=this.frame}componentWillUnmount(){this.frame?.remove()}onUpdate(e){let{onSelect:t,multiple:r=!1}=this.props,o=this.frame.state(),n=e||o.get("selection");!n||!n.models.length||t(r?n.models.map(i=>hd(i.toJSON())):hd(n.models[0].toJSON()))}onSelect(){let{onSelect:e,multiple:t=!1}=this.props,r=this.frame.state().get("selection").toJSON();e(t?r:r[0])}onOpen(){let{wp:e}=window,{value:t}=this.props;if(this.updateCollection(),this.props.mode&&this.frame.content.mode(this.props.mode),!(Array.isArray(t)?!!t?.length:!!t))return;let o=this.props.gallery,n=this.frame.state().get("selection"),i=Array.isArray(t)?t:[t];o||i.forEach(s=>{n.add(e.media.attachment(s))});let a=Ei(i);a.more().done(function(){o&&a?.models?.length&&n.add(a.models)})}onClose(){let{onClose:e}=this.props;e&&e(),this.frame.detach()}updateCollection(){let e=this.frame.content.get();if(e&&e.collection){let t=e.collection;t.toArray().forEach(r=>r.trigger("destroy",r)),t.mirroring._hasMore=!0,t.more()}}openModal(){let{gallery:e=!1,unstableFeaturedImageFlow:t=!1,modalClass:r}=this.props;e?this.buildAndSetGalleryFrame():this.buildAndSetSingleMediaFrame(),r&&this.frame.$el.addClass(r),t&&this.buildAndSetFeatureImageFrame(),this.initializeListeners(),this.frame.open()}render(){return this.props.render({open:this.openModal})}},xd=ux;var In=u(j(),1),Ri=u(ll(),1);var _d=u(ul(),1);function cx(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}function An(e,t,r){if(cx(r))for(let[o,n]of Object.entries(r))An(e,`${t}[${o}]`,n);else r!==void 0&&e.append(t,String(r))}function kr(e){let{alt_text:t,source_url:r,...o}=e;return{...o,alt:e.alt_text,caption:e.caption?.raw??"",title:e.title.raw,url:e.source_url,poster:e._embedded?.["wp:featuredmedia"]?.[0]?.source_url||void 0}}async function Sd(e,t={},r){let o=new FormData;o.append("file",e,e.name||e.type.replace("/","."));for(let[n,i]of Object.entries(t))An(o,n,i);return kr(await(0,_d.default)({path:"/wp/v2/media?_embed=wp:featuredmedia",body:o,method:"POST",signal:r}))}var Ti=u(j(),1);var Wt=class extends Error{code;file;constructor({code:e,message:t,file:r,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=r}};function Oi(e,t){if(!t)return;let r=t.some(o=>o.includes("/")?o===e.type:e.type.startsWith(`${o}/`));if(e.type&&!r)throw new Wt({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,Ti.sprintf)((0,Ti.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}var Ai=u(j(),1);function Cd(e){return e?Object.entries(e).flatMap(([t,r])=>{let[o]=r.split("/"),n=t.split("|");return[r,...n.map(i=>`${o}/${i}`)]}):null}function Ii(e,t){let r=Cd(t);if(!r)return;let o=r.includes(e.type);if(e.type&&!o)throw new Wt({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,Ai.sprintf)((0,Ai.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}var Bo=u(j(),1);function Pi(e,t){if(e.size<=0)throw new Wt({code:"EMPTY_FILE",message:(0,Bo.sprintf)((0,Bo.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new Wt({code:"SIZE_ABOVE_LIMIT",message:(0,Bo.sprintf)((0,Bo.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Vi({wpAllowedMimeTypes:e,allowedTypes:t,additionalData:r={},filesList:o,maxUploadFileSize:n,onError:i,onFileChange:a,signal:s,multiple:l=!0}){if(!l&&o.length>1){i?.(new Error((0,In.__)("Only one file can be used here.")));return}let c=[],f=[],p=(d,m)=>{window.__clientSideMediaProcessing||f[d]?.url&&(0,Ri.revokeBlobURL)(f[d].url),f[d]=m,a?.(f.filter(v=>v!==null))};for(let d of o){try{Ii(d,e)}catch(m){i?.(m);continue}try{Oi(d,t)}catch(m){i?.(m);continue}try{Pi(d,n)}catch(m){i?.(m);continue}c.push(d),window.__clientSideMediaProcessing||(f.push({url:(0,Ri.createBlobURL)(d)}),a?.(f))}c.map(async(d,m)=>{try{let v=await Sd(d,r,s);p(m,v)}catch(v){p(m,null);let _;typeof v=="object"&&v!==null&&"message"in v?_=typeof v.message=="string"?v.message:String(v.message):_=(0,In.sprintf)((0,In.__)("Error while uploading file %s to the media library."),d.name),i?.(new Wt({code:"GENERAL",message:_,file:d,cause:v instanceof Error?v:void 0}))}})}var Ni=u(j(),1);var Ed=u(ul(),1);async function Td(e,t,r={},o){let n=new FormData;n.append("file",e,e.name||e.type.replace("/","."));for(let[i,a]of Object.entries(r))An(n,i,a);return kr(await(0,Ed.default)({path:`/wp/v2/media/${t}/sideload`,body:n,method:"POST",signal:o}))}var dx=()=>{};async function Od({file:e,attachmentId:t,additionalData:r={},signal:o,onFileChange:n,onError:i=dx}){try{let a=await Td(e,t,r,o);n?.([a])}catch(a){let s;a instanceof Error?s=a.message:s=(0,Ni.sprintf)((0,Ni.__)("Error while sideloading file %s to the server."),e.name),i(new Wt({code:"GENERAL",message:s,file:e,cause:a instanceof Error?a:void 0}))}}var gt=u(z(),1),$e=u(j(),1),yi=u(Pn(),1),_i=u(qt(),1),mo=u(G(),1);var Di=u(le(),1),cl=u(P(),1),dl=(0,cl.jsx)(Di.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cl.jsx)(Di.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 ki=u(le(),1),fl=u(P(),1),ml=(0,fl.jsx)(ki.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fl.jsx)(ki.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var Mi=u(le(),1),pl=u(P(),1),vl=(0,pl.jsx)(Mi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pl.jsx)(Mi.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 Fi=u(le(),1),hl=u(P(),1),gl=(0,hl.jsx)(Fi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hl.jsx)(Fi.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var Li=u(le(),1),bl=u(P(),1),xl=(0,bl.jsx)(Li.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bl.jsx)(Li.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 Bi=u(le(),1),wl=u(P(),1),ji=(0,wl.jsx)(Bi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wl.jsx)(Bi.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.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})});var Hi=u(le(),1),yl=u(P(),1),zi=(0,yl.jsx)(Hi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yl.jsx)(Hi.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 Wi=u(le(),1),_l=u(P(),1),Rn=(0,_l.jsx)(Wi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_l.jsx)(Wi.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Gi=u(le(),1),Sl=u(P(),1),Cl=(0,Sl.jsx)(Gi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Sl.jsx)(Gi.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 Ui=u(le(),1),El=u(P(),1),Tl=(0,El.jsx)(Ui.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,El.jsx)(Ui.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 Yi=u(le(),1),Ol=u(P(),1),Al=(0,Ol.jsx)(Yi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ol.jsx)(Yi.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})});var qi=u(le(),1),Il=u(P(),1),Pl=(0,Il.jsx)(qi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Il.jsx)(qi.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 $i=u(le(),1),Rl=u(P(),1),Vl=(0,Rl.jsx)($i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Rl.jsx)($i.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 Ki=u(le(),1),Nl=u(P(),1),Dl=(0,Nl.jsx)(Ki.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Nl.jsx)(Ki.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 Zi=u(le(),1),kl=u(P(),1),Ml=(0,kl.jsx)(Zi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kl.jsx)(Zi.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})});var Xi=u(le(),1),Fl=u(P(),1),Ll=(0,Fl.jsx)(Xi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Fl.jsx)(Xi.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});var Qi=u(le(),1),Bl=u(P(),1),Vn=(0,Bl.jsx)(Qi.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Bl.jsx)(Qi.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var Ji=u(le(),1),jl=u(P(),1),Hl=(0,jl.jsx)(Ji.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,jl.jsx)(Ji.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 ea=u(le(),1),zl=u(P(),1),Wl=(0,zl.jsx)(ea.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zl.jsx)(ea.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 ta=u(le(),1),Gl=u(P(),1),Ul=(0,Gl.jsx)(ta.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Gl.jsx)(ta.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 ra=u(le(),1),Yl=u(P(),1),Nn=(0,Yl.jsx)(ra.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yl.jsx)(ra.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var oa=u(le(),1),ql=u(P(),1),na=(0,ql.jsx)(oa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ql.jsx)(oa.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});var ia=u(le(),1),$l=u(P(),1),aa=(0,$l.jsx)(ia.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$l.jsx)(ia.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});var sa=u(le(),1),Kl=u(P(),1),Zl=(0,Kl.jsx)(sa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Kl.jsx)(sa.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})});var la=u(le(),1),Xl=u(P(),1),Ql=(0,Xl.jsx)(la.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Xl.jsx)(la.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 ua=u(le(),1),Jl=u(P(),1),eu=(0,Jl.jsx)(ua.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Jl.jsx)(ua.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 ca=u(le(),1),tu=u(P(),1),Dn=(0,tu.jsx)(ca.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tu.jsx)(ca.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 da=u(le(),1),ru=u(P(),1),ou=(0,ru.jsx)(da.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ru.jsx)(da.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 fa=u(le(),1),nu=u(P(),1),iu=(0,nu.jsx)(fa.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nu.jsx)(fa.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 Md=u(ue(),1),kd={};function au(e,t){let r=Md.useRef(kd);return r.current===kd&&(r.current=e(t)),r}function su(e,...t){let r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${r} for the full message.`}var pa=u(ue(),1);function lu(e,t,r,o){let n=au(Ld).current;return fx(n,e,t,r,o)&&Bd(n,[e,t,r,o]),n.callback}function Fd(e){let t=au(Ld).current;return mx(t,e)&&Bd(t,e),t.callback}function Ld(){return{callback:null,cleanup:null,refs:[]}}function fx(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function mx(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function Bd(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){let o=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 a=i(r);typeof a=="function"&&(o[n]=a);break}case"object":{i.current=r;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 a=o[n];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}default:}}}}}}var zd=u(ue(),1);var jd=u(ue(),1),px=parseInt(jd.version,10);function Hd(e){return px>=e}function uu(e){if(!zd.isValidElement(e))return null;let t=e,r=t.props;return(Hd(19)?r?.ref:t.ref)??null}function kn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Wd(e,t){let r={};for(let o in e){let n=e[o];if(t?.hasOwnProperty(o)){let i=t[o](n);i!=null&&Object.assign(r,i);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function Gd(e,t){return typeof e=="function"?e(t):e}function Ud(e,t){return typeof e=="function"?e(t):e}var Fn={};function ma(e,t,r,o,n){let i={...cu(e,Fn)};return t&&(i=Mn(i,t)),r&&(i=Mn(i,r)),o&&(i=Mn(i,o)),n&&(i=Mn(i,n)),i}function Yd(e){if(e.length===0)return Fn;if(e.length===1)return cu(e[0],Fn);let t={...cu(e[0],Fn)};for(let r=1;r<e.length;r+=1)t=Mn(t,e[r]);return t}function Mn(e,t){return qd(t)?t(e):vx(e,t)}function vx(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=kn(e.style,o);break}case"className":{e[r]=du(e.className,o);break}default:hx(r,o)?e[r]=gx(e[r],o):e[r]=o}}return e}function hx(e,t){let r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function qd(e){return typeof e=="function"}function cu(e,t){return qd(e)?e(t):e??Fn}function gx(e,t){return t?e?r=>{if(xx(r)){let n=r;bx(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let o=t(r);return e?.(r),o}:t:e}function bx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function du(e,t){return t?e?t+" "+e:t:e}function xx(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var wx=Object.freeze([]),Mr=Object.freeze({});var fu=u(ue(),1);function $d(e,t,r={}){let o=t.render,n=yx(t,r);if(r.enabled===!1)return null;let i=r.state??Mr;return _x(e,o,n,i)}function yx(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Mr,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,f=c?Gd(r,i):void 0,p=c?Ud(o,i):void 0,d=c?Wd(i,l):Mr,m=c?kn(d,Array.isArray(s)?Yd(s):s)??Mr:Mr;return typeof document<"u"&&(c?Array.isArray(a)?m.ref=Fd([m.ref,uu(n),...a]):m.ref=lu(m.ref,uu(n),a):lu(null,null)),c?(f!==void 0&&(m.className=du(m.className,f)),p!==void 0&&(m.style=kn(m.style,p)),m):Mr}function _x(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=ma(r,t.props);return n.ref=r.ref,pa.cloneElement(t,n)}if(e&&typeof e=="string")return Sx(e,r);throw new Error(su(8))}function Sx(e,t){return e==="button"?(0,fu.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,fu.createElement)("img",{alt:"",...t,key:t.key}):pa.createElement(e,t)}function tf(e){return $d(e.defaultTagName??"div",e,e)}function rf(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=rf(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Nx(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=rf(e))&&(o&&(o+=" "),o+=t);return o}var Y=Nx;var nf=u(z(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var Dx={stack:"_19ce0419607e1896__stack"},kx={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)"},L=(0,nf.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:a,...s},l){let c={gap:r&&kx[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return tf({render:a,ref:l,props:ma(s,{style:c,className:Dx.stack})})});var xa=u(z(),1);var vu=u(j(),1);var _e="isAny",Se="isNone",ot="isAll",nt="isNotAll",ct="between",dt="inThePast",xt="over",Ce="is",Ee="isNot",Fr="lessThan",Lr="greaterThan",Br="lessThanOrEqual",jr="greaterThanOrEqual",Hr="before",zr="after",Wr="beforeInc",Gr="afterInc",$t="contains",Kt="notContains",Zt="startsWith",Ur="on",Yr="notOn",va=["asc","desc"],af={asc:"\u2191",desc:"\u2193"},ha={asc:"ascending",desc:"descending"},ga={asc:(0,vu.__)("Sort ascending"),desc:(0,vu.__)("Sort descending")},sf={asc:gl,desc:dl},ba="table",lf="grid",uf="list",cf="activity",df="pickerGrid",ff="pickerTable";var mf=(0,xa.createContext)({view:{type:ba},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,xa.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,hasInfiniteScrollHandler:!1,config:{perPageSizes:[]}});mf.displayName="DataViewsContext";var q=mf;var xr=u(j(),1);var xo=u(j(),1),Aa=u(G(),1),wt=u(z(),1),Su=u(hu(),1);var vf=u(G(),1),hf=u(j(),1),gf=u(P(),1);function qr({selection:e,onChangeSelection:t,item:r,getItemId:o,titleField:n,disabled:i,...a}){let s=o(r),l=!i&&e.includes(s),c=n?.getValue?.({item:r})||(0,hf.__)("(no title)");return(0,gf.jsx)(vf.CheckboxControl,{className:"dataviews-selection-checkbox","aria-label":c,"aria-disabled":i,checked:l,onChange:()=>{i||t(e.includes(s)?e.filter(f=>s!==f):[...e,s])},...a})}var go=u(G(),1),wf=u(j(),1),zo=u(z(),1);var yf=u(qt(),1),gu=u(bt(),1);var bf=u(pu(),1),{lock:u2,unlock:Z}=(0,bf.__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 be=u(P(),1),{Menu:Ho,kebabCase:Mx}=Z(go.privateApis);function Fx({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,be.jsx)(go.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function Lx({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,be.jsx)(Ho.Item,{disabled:e.disabled,onClick:t,children:(0,be.jsx)(Ho.ItemLabel,{children:o})})}function Ln({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t),n=typeof e.modalHeader=="function"?e.modalHeader(t):e.modalHeader;return(0,be.jsx)(go.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${Mx(e.id)}`,children:(0,be.jsx)(e.RenderModal,{items:t,closeModal:r})})}function bu({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,zo.useMemo)(()=>e.reduce((s,l)=>((l.isPrimary?s.primaryActions:s.regularActions).push(l),s),{primaryActions:[],regularActions:[]}),[e]),a=s=>s.map(l=>(0,be.jsx)(Lx,{action:l,onClick:()=>{if("RenderModal"in l){o(l);return}l.callback([t],{registry:r})},items:[t]},l.id));return(0,be.jsxs)(Ho.Group,{children:[a(n),a(i)]})}function Wo({item:e,actions:t,isCompact:r}){let o=(0,yf.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,zo.useMemo)(()=>{let s=t.filter(c=>!c.isEligible||c.isEligible(e));return{primaryActions:s.filter(c=>c.isPrimary),eligibleActions:s}},[t,e]),a=(0,gu.useViewportMatch)("medium","<");return r?(0,be.jsx)(xf,{item:e,actions:i,isSmall:!0,registry:o}):(0,be.jsxs)(L,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,be.jsx)(xu,{item:e,actions:n,registry:o}),(n.length<i.length||a)&&(0,be.jsx)(xf,{item:e,actions:i,registry:o})]})}function xf({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,zo.useState)(null);return(0,be.jsxs)(be.Fragment,{children:[(0,be.jsxs)(Ho,{placement:"bottom-end",children:[(0,be.jsx)(Ho.TriggerButton,{render:(0,be.jsx)(go.Button,{size:r?"small":"compact",icon:Nn,label:(0,wf.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,be.jsx)(Ho.Popover,{children:(0,be.jsx)(bu,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,be.jsx)(Ln,{action:n,items:[e],closeModal:()=>i(null)})]})}function xu({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,zo.useState)(null);return(0,gu.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,be.jsxs)(be.Fragment,{children:[t.map(s=>(0,be.jsx)(Fx,{action:s,onClick:()=>{if("RenderModal"in s){i(s);return}s.callback([e],{registry:r})},items:[e],variant:o},s.id)),!!n&&(0,be.jsx)(Ln,{action:n,items:[e],closeModal:()=>i(null)})]})}var yu=u(G(),1),wu=u(j(),1),bo=u(z(),1),Bx=u(qt(),1);var jx=u(bt(),1);var $r=u(j(),1);function _f(e,t,r){return e>0?(0,$r.sprintf)((0,$r._n)("%d Item selected","%d Items selected",e),e):r>t?(0,$r.sprintf)((0,$r._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r):(0,$r.sprintf)((0,$r._n)("%d Item","%d Items",t),t)}var wa=u(P(),1);function ya(e,t){return(0,bo.useMemo)(()=>e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t))),[e,t])}function _a(e,t){return(0,bo.useMemo)(()=>t.some(r=>e.some(o=>o.supportsBulk&&(!o.isEligible||o.isEligible(r)))),[e,t])}function Sa({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n}){let i=(0,bo.useMemo)(()=>r.filter(l=>o.some(c=>c.supportsBulk&&(!c.isEligible||c.isEligible(l)))),[r,o]),a=r.filter(l=>e.includes(n(l))&&i.includes(l)),s=a.length===i.length;return(0,wa.jsx)(yu.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:s,indeterminate:!s&&!!a.length,onChange:()=>{t(s?[]:i.map(l=>n(l)))},"aria-label":s?(0,wu.__)("Deselect all"):(0,wu.__)("Select all")})}var hr=u(j(),1);var gr=u(G(),1),Kr=u(z(),1);function Ca(e,t){let r=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean);return t.filter(o=>!r.includes(o.id)&&o.type!=="media"&&o.enableHiding!==!1)}var J=u(P(),1),{Menu:ce}=Z(gr.privateApis);function Hx({children:e}){return Kr.Children.toArray(e).filter(Boolean).map((t,r)=>(0,J.jsxs)(Kr.Fragment,{children:[r>0&&(0,J.jsx)(ce.Separator,{}),t]},r))}var zx=(0,Kr.forwardRef)(function({fieldId:t,view:r,fields:o,onChangeView:n,onHide:i,setOpenedFilter:a,canMove:s=!0,canInsertLeft:l=!0,canInsertRight:c=!0},f){let p=r.fields??[],d=p?.indexOf(t),m=r.sort?.field===t,v=!1,_=!1,h=!1,b=[],y=o.find(S=>S.id===t),{setIsShowingFilter:A}=(0,Kr.useContext)(q);if(!y)return null;v=y.enableHiding!==!1,_=y.enableSorting!==!1;let V=y.header;if(b=!!y.filterBy&&y.filterBy?.operators||[],h=!r.filters?.some(S=>t===S.field)&&!!(y.hasElements||y.Edit)&&y.filterBy!==!1&&!y.filterBy?.isPrimary,!_&&!s&&!v&&!h)return V;let R=Ca(r,o).filter(S=>!p.includes(S.id)),M=(l||c)&&!!R.length,k=(0,hr.isRTL)();return(0,J.jsxs)(ce,{children:[(0,J.jsxs)(ce.TriggerButton,{render:(0,J.jsx)(gr.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:f,variant:"tertiary"}),children:[V,r.sort&&m&&(0,J.jsx)("span",{"aria-hidden":"true",children:af[r.sort.direction]})]}),(0,J.jsx)(ce.Popover,{style:{minWidth:"240px"},children:(0,J.jsxs)(Hx,{children:[_&&(0,J.jsx)(ce.Group,{children:va.map(S=>{let I=r.sort&&m&&r.sort.direction===S,N=`${t}-${S}`;return(0,J.jsx)(ce.RadioItem,{name:"view-table-sorting",value:N,checked:I,onChange:()=>{n({...r,sort:{field:t,direction:S},showLevels:!1})},children:(0,J.jsx)(ce.ItemLabel,{children:ga[S]})},N)})}),h&&(0,J.jsx)(ce.Group,{children:(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:Vn}),onClick:()=>{a(t),A(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:b[0]}]})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Add filter")})})}),(s||v||M)&&y&&(0,J.jsxs)(ce.Group,{children:[s&&(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:ml}),disabled:k?d>=p.length-1:d<1,onClick:()=>{let S=k?d+1:d-1,I=[...p];I.splice(d,1),I.splice(S,0,t),n({...r,fields:I})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Move left")})}),s&&(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:vl}),disabled:k?d<1:d>=p.length-1,onClick:()=>{let S=k?d-1:d+1,I=[...p];I.splice(d,1),I.splice(S,0,t),n({...r,fields:I})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Move right")})}),l&&!!R.length&&(0,J.jsxs)(ce,{children:[(0,J.jsx)(ce.SubmenuTriggerItem,{children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Insert left")})}),(0,J.jsx)(ce.Popover,{children:R.map(S=>{let I=k?d+1:d;return(0,J.jsx)(ce.Item,{onClick:()=>{n({...r,fields:[...p.slice(0,I),S.id,...p.slice(I)]})},children:(0,J.jsx)(ce.ItemLabel,{children:S.label})},S.id)})})]}),c&&!!R.length&&(0,J.jsxs)(ce,{children:[(0,J.jsx)(ce.SubmenuTriggerItem,{children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Insert right")})}),(0,J.jsx)(ce.Popover,{children:R.map(S=>{let I=k?d:d+1;return(0,J.jsx)(ce.Item,{onClick:()=>{n({...r,fields:[...p.slice(0,I),S.id,...p.slice(I)]})},children:(0,J.jsx)(ce.ItemLabel,{children:S.label})},S.id)})})]}),v&&y&&(0,J.jsx)(ce.Item,{prefix:(0,J.jsx)(gr.Icon,{icon:Dn}),onClick:()=>{i(y),n({...r,fields:p.filter(S=>S!==t)})},children:(0,J.jsx)(ce.ItemLabel,{children:(0,hr.__)("Hide column")})})]})]})})]})}),Wx=zx,Go=Wx;var Sf=u(z(),1),_u=u(P(),1);function Gx({item:e,isItemClickable:t,onClickItem:r,className:o}){return!t(e)||!r?{className:o}:{className:o?`${o} ${o}--clickable`:void 0,role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),r(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===""||n.key===" ")&&(n.stopPropagation(),r(e))}}}function Zr({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...a}){if(!t(e))return(0,_u.jsx)("div",{className:n,...a,children:i});if(o){let l=o({item:e,className:`${n} ${n}--clickable`,...a,children:i});return(0,Sf.cloneElement)(l,{onClick:c=>{c.stopPropagation(),l.props.onClick&&l.props.onClick(c)},onKeyDown:c=>{(c.key==="Enter"||c.key===""||c.key===" ")&&(c.stopPropagation(),l.props.onKeyDown&&l.props.onKeyDown(c))}})}let s=Gx({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,_u.jsx)("div",{...s,...a,children:i})}var Xt=u(P(),1);function Ux({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:a,isItemClickable:s}){return(0,Xt.jsxs)(L,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,Xt.jsx)(Zr,{item:e,isItemClickable:s,onClickItem:i,renderItemLink:a,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":s(e)&&(i||a)&&r?r.getValue?.({item:e}):void 0,children:(0,Xt.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,Xt.jsxs)(L,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,Xt.jsxs)(Zr,{item:e,isItemClickable:s,onClickItem:i,renderItemLink:a,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[t!==void 0&&t>0&&(0,Xt.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,Xt.jsx)(r.render,{item:e,field:r})]}),n&&(0,Xt.jsx)(n.render,{item:e,field:n})]})]})}var Ea=Ux;var Cf=u(bt(),1),Uo=u(z(),1),Ef=u(j(),1),Yx=e=>(0,Ef.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function Tf({scrollContainerRef:e,enabled:t=!1}){let[r,o]=(0,Uo.useState)(!1),n=(0,Cf.useDebounce)((0,Uo.useCallback)(()=>{let i=e.current;i&&o(Yx(i))},[e,o]),200);return(0,Uo.useEffect)(()=>typeof window>"u"||!t||!e.current?()=>{}:(n(),e.current.addEventListener("scroll",n),window.addEventListener("resize",n),()=>{e.current?.removeEventListener("scroll",n),window.removeEventListener("resize",n)}),[e,t]),r}function kt(e,t){return e.reduce((r,o)=>{let n=t.getValue({item:o});return r.has(n)||r.set(n,[]),r.get(n)?.push(o),r},new Map)}var Xr=u(G(),1),Af=u(j(),1),If=u(z(),1);var Tt=u(P(),1);function Of({field:e,isVisible:t,onToggleVisibility:r}){return(0,Tt.jsx)(Xr.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,Tt.jsxs)(L,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,Tt.jsx)("div",{style:{height:24,width:24},children:t&&(0,Tt.jsx)(Xr.Icon,{icon:Rn})}),(0,Tt.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function qx(e){return!!e}function Ta({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,If.useContext)(q),n=Ca(t,r);if(!n?.length)return null;let i=r.find(v=>v.id===t.titleField),a=r.find(v=>v.id===t.mediaField),s=r.find(v=>v.id===t.descriptionField),l=[{field:i,isVisibleFlag:"showTitle"},{field:a,isVisibleFlag:"showMedia"},{field:s,isVisibleFlag:"showDescription"}].filter(({field:v})=>qx(v)),c=t.fields??[],f=n.filter(v=>c.includes(v.id)).length,p=l.filter(({isVisibleFlag:v})=>t[v]??!0),d=p.length+f,m=d===1&&p.length===1;return(0,Tt.jsxs)(L,{direction:"column",className:"dataviews-field-control",children:[e&&(0,Tt.jsx)(Xr.BaseControl.VisualLabel,{children:(0,Af.__)("Properties")}),(0,Tt.jsx)(L,{direction:"column",className:"dataviews-view-config__properties",children:(0,Tt.jsxs)(Xr.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"medium",children:[l.map(({field:v,isVisibleFlag:_})=>{let h=t[_]??!0,b=m&&h?{...v,enableHiding:!1}:v;return(0,Tt.jsx)(Of,{field:b,isVisible:h,onToggleVisibility:()=>{o({...t,[_]:!h})}},v.id)}),n.map(v=>{let _=c.includes(v.id),h=d===1&&_?{...v,enableHiding:!1}:v;return(0,Tt.jsx)(Of,{field:h,isVisible:_,onToggleVisibility:()=>{o({...t,fields:_?c.filter(b=>b!==v.id):[...c,v.id]})}},v.id)})]})})]})}var Oa=u(z(),1);function Qt(e,t={delay:400}){let[r,o]=(0,Oa.useState)(!1);return(0,Oa.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>{o(!0)},t.delay);return()=>{clearTimeout(n),o(!1)}},[e,t.delay]),r}var K=u(P(),1);function Rf(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function $x({item:e,fields:t,column:r,align:o}){let n=t.find(a=>a.id===r);if(!n)return null;let i=Y("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,K.jsx)("div",{className:i,children:(0,K.jsx)(n.render,{item:e,field:n})})}function Pf({hasBulkActions:e,item:t,level:r,actions:o,fields:n,id:i,view:a,titleField:s,mediaField:l,descriptionField:c,selection:f,getItemId:p,isItemClickable:d,onClickItem:m,renderItemLink:v,onChangeSelection:_,isActionsColumnSticky:h,posinset:b}){let{paginationInfo:y}=(0,wt.useContext)(q),A=ya(o,t),V=A&&f.includes(i),{showTitle:R=!0,showMedia:M=!0,showDescription:k=!0,infiniteScrollEnabled:S}=a,I=(0,wt.useRef)(!1),N=a.fields??[],g=s&&R||l&&M||c&&k;return(0,K.jsxs)("tr",{className:Y("dataviews-view-table__row",{"is-selected":A&&V,"has-bulk-actions":A}),onTouchStart:()=>{I.current=!0},"aria-setsize":S?y.totalItems:void 0,"aria-posinset":b,role:S?"article":void 0,onMouseDown:E=>{let T=(0,Su.isAppleOS)()?E.metaKey:E.ctrlKey;E.button===0&&T&&window.navigator.userAgent.toLowerCase().includes("firefox")&&E?.preventDefault()},onClick:E=>{if(!A)return;((0,Su.isAppleOS)()?E.metaKey:E.ctrlKey)&&!I.current&&document.getSelection()?.type!=="Range"&&_(f.includes(i)?f.filter(w=>i!==w):[...f,i])},children:[e&&(0,K.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,K.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,K.jsx)(qr,{item:t,selection:f,onChangeSelection:_,getItemId:p,titleField:s,disabled:!A})})}),g&&(0,K.jsx)("td",{children:(0,K.jsx)(Ea,{item:t,level:r,titleField:R?s:void 0,mediaField:M?l:void 0,descriptionField:k?c:void 0,isItemClickable:d,onClickItem:m,renderItemLink:v})}),N.map(E=>{let{width:T,maxWidth:w,minWidth:O,align:x}=a.layout?.styles?.[E]??{},C=n.find(D=>D.id===E),F=Rf(x,C?.type);return(0,K.jsx)("td",{style:{width:T,maxWidth:w,minWidth:O},children:(0,K.jsx)($x,{fields:n,item:t,column:E,align:F})},E)}),!!o?.length&&(0,K.jsx)("td",{className:Y("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":h}),onClick:E=>E.stopPropagation(),children:(0,K.jsx)(Wo,{item:t,actions:o})})]})}function Kx({actions:e,data:t,fields:r,getItemId:o,getItemLevel:n,isLoading:i=!1,onChangeView:a,onChangeSelection:s,selection:l,setOpenedFilter:c,onClickItem:f,isItemClickable:p,renderItemLink:d,view:m,className:v,empty:_}){let{containerRef:h}=(0,wt.useContext)(q),b=Qt(i),y=(0,wt.useRef)(new Map),A=(0,wt.useRef)(void 0),[V,R]=(0,wt.useState)(),[M,k]=(0,wt.useState)(null);(0,wt.useEffect)(()=>{A.current&&(A.current.focus(),A.current=void 0)});let S=(0,wt.useId)(),I=Tf({scrollContainerRef:h,enabled:!!e?.length}),N=_a(e,t);if(V){A.current=V,R(void 0);return}let g=$=>{let Ne=y.current.get($.id),tt=Ne?y.current.get(Ne.fallback):void 0;R(tt?.node)},E=$=>{$.preventDefault(),$.stopPropagation();let Ne={getBoundingClientRect:()=>({x:$.clientX,y:$.clientY,top:$.clientY,left:$.clientX,right:$.clientX,bottom:$.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{k(Ne)})},T=!!t?.length,w=r.find($=>$.id===m.titleField),O=r.find($=>$.id===m.mediaField),x=r.find($=>$.id===m.descriptionField),C=m.groupBy?.field?r.find($=>$.id===m.groupBy?.field):null,F=C?kt(t,C):null,{showTitle:D=!0,showMedia:W=!0,showDescription:Q=!0}=m,ge=w&&D||O&&W||x&&Q,et=m.fields??[],Et=($,Ne)=>tt=>{tt?y.current.set($,{node:tt,fallback:et[Ne>0?Ne-1:1]}):y.current.delete($)},Dr=m.infiniteScrollEnabled&&!F,po=(0,xo.isRTL)();return T?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)("table",{className:Y("dataviews-view-table",v,{[`has-${m.layout?.density}-density`]:m.layout?.density&&["compact","comfortable"].includes(m.layout.density),"has-bulk-actions":N,"is-refreshing":!Dr&&b}),"aria-busy":i,"aria-describedby":S,role:Dr?"feed":void 0,inert:!Dr&&i?"true":void 0,children:[(0,K.jsxs)("colgroup",{children:[N&&(0,K.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),ge&&(0,K.jsx)("col",{className:"dataviews-view-table__col-first-data"}),et.map(($,Ne)=>(0,K.jsx)("col",{className:Y(`dataviews-view-table__col-${$}`,{"dataviews-view-table__col-first-data":!ge&&Ne===0})},`col-${$}`)),!!e?.length&&(0,K.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),M&&(0,K.jsx)(Aa.Popover,{anchor:M,onClose:()=>k(null),placement:"bottom-start",children:(0,K.jsx)(Ta,{showLabel:!1})}),(0,K.jsx)("thead",{onContextMenu:E,children:(0,K.jsxs)("tr",{className:"dataviews-view-table__row",children:[N&&(0,K.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:E,children:(0,K.jsx)(Sa,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o})}),ge&&(0,K.jsx)("th",{scope:"col",children:w&&(0,K.jsx)(Go,{ref:Et(w.id,0),fieldId:w.id,view:m,fields:r,onChangeView:a,onHide:g,setOpenedFilter:c,canMove:!1,canInsertLeft:po?m.layout?.enableMoving??!0:!1,canInsertRight:po?!1:m.layout?.enableMoving??!0})}),et.map(($,Ne)=>{let{width:tt,maxWidth:vo,minWidth:Cn,align:En}=m.layout?.styles?.[$]??{},Tn=r.find(sl=>sl.id===$),Si=Rf(En,Tn?.type),On=m.layout?.enableMoving??!0;return(0,K.jsx)("th",{style:{width:tt,maxWidth:vo,minWidth:Cn,textAlign:Si},"aria-sort":m.sort?.direction&&m.sort?.field===$?ha[m.sort.direction]:void 0,scope:"col",children:(0,K.jsx)(Go,{ref:Et($,Ne),fieldId:$,view:m,fields:r,onChangeView:a,onHide:g,setOpenedFilter:c,canMove:On,canInsertLeft:On,canInsertRight:On})},$)}),!!e?.length&&(0,K.jsx)("th",{className:Y("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!I}),children:(0,K.jsx)("span",{className:"dataviews-view-table-header",children:(0,xo.__)("Actions")})})]})}),T&&C&&F?Array.from(F.entries()).map(([$,Ne])=>(0,K.jsxs)("tbody",{children:[(0,K.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,K.jsx)("td",{colSpan:et.length+(ge?1:0)+(N?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:m.groupBy?.showLabel===!1?$:(0,xo.sprintf)((0,xo.__)("%1$s: %2$s"),C.label,$)})}),Ne.map((tt,vo)=>(0,K.jsx)(Pf,{item:tt,level:m.showLevels&&typeof n=="function"?n(tt):void 0,hasBulkActions:N,actions:e,fields:r,id:o(tt)||vo.toString(),view:m,titleField:w,mediaField:O,descriptionField:x,selection:l,getItemId:o,onChangeSelection:s,onClickItem:f,renderItemLink:d,isItemClickable:p,isActionsColumnSticky:!I},o(tt)))]},`group-${$}`)):(0,K.jsx)("tbody",{children:T&&t.map(($,Ne)=>(0,K.jsx)(Pf,{item:$,level:m.showLevels&&typeof n=="function"?n($):void 0,hasBulkActions:N,actions:e,fields:r,id:o($)||Ne.toString(),view:m,titleField:w,mediaField:O,descriptionField:x,selection:l,getItemId:o,onChangeSelection:s,onClickItem:f,renderItemLink:d,isItemClickable:p,isActionsColumnSticky:!I,posinset:Dr?Ne+1:void 0},o($)))})]}),Dr&&i&&(0,K.jsx)("div",{className:"dataviews-loading",id:S,children:(0,K.jsx)("p",{className:"dataviews-loading-more",children:(0,K.jsx)(Aa.Spinner,{})})})]}):(0,K.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":b}),id:S,children:_})}var Vf=Kx;var Mf=u(G(),1),Ra=u(j(),1);var Ot=u(G(),1);var Bn=u(j(),1),Df=u(bt(),1),kf=u(hu(),1),Pa=u(z(),1);var Zx=u(G(),1),Xx=u(j(),1),Ia=u(z(),1);var Qx=u(P(),1),Jx=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],e0=Jx[2].value;function Nf(){let e=(0,Ia.useContext)(q),t=e.view;return(0,Ia.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??e0,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var ie=u(P(),1),{Badge:t0}=Z(Ot.privateApis);function r0(e,t){let r=[];for(let o=0,n=e.length;o<n;o+=t)r.push(e.slice(o,o+t));return r}var o0=(0,Pa.forwardRef)(function e({view:t,selection:r,onChangeSelection:o,onClickItem:n,isItemClickable:i,renderItemLink:a,getItemId:s,item:l,actions:c,mediaField:f,titleField:p,descriptionField:d,regularFields:m,badgeFields:v,hasBulkActions:_,config:h,...b},y){let{showTitle:A=!0,showMedia:V=!0,showDescription:R=!0}=t,M=ya(c,l),k=s(l),S=(0,Df.useInstanceId)(e),I=r.includes(k),N=(0,ie.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),g=V&&f?.render,E=g?(0,ie.jsx)(f.render,{item:l,field:f,config:h}):N,T=A&&p?.render?(0,ie.jsx)(p.render,{item:l,field:p}):null,w,O;return i(l)&&n&&(T?(w={"aria-labelledby":`dataviews-view-grid__title-field-${S}`},O={id:`dataviews-view-grid__title-field-${S}`}):w={"aria-label":(0,Bn.__)("Navigate to item")}),(0,ie.jsxs)(L,{direction:"column",...b,ref:y,className:Y(b.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":M&&I}),onClickCapture:x=>{if(b.onClickCapture?.(x),(0,kf.isAppleOS)()?x.metaKey:x.ctrlKey){if(x.stopPropagation(),x.preventDefault(),!M)return;o(r.includes(k)?r.filter(C=>k!==C):[...r,k])}},children:[(0,ie.jsx)(Zr,{item:l,isItemClickable:i,onClickItem:n,renderItemLink:a,className:Y("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!g}),...w,children:E}),_&&(0,ie.jsx)(qr,{item:l,selection:r,onChangeSelection:o,getItemId:s,titleField:p,disabled:!M}),!!c?.length&&(0,ie.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,ie.jsx)(Wo,{item:l,actions:c,isCompact:!0})}),A&&(0,ie.jsx)("div",{className:"dataviews-view-grid__title",children:(0,ie.jsx)(Zr,{item:l,isItemClickable:i,onClickItem:n,renderItemLink:a,className:"dataviews-view-grid__title-field dataviews-title-field",...O,title:p?.getValueFormatted({item:l,field:p})||void 0,children:T})}),(0,ie.jsxs)(L,{direction:"column",gap:"xs",children:[R&&d?.render&&(0,ie.jsx)(d.render,{item:l,field:d}),!!v?.length&&(0,ie.jsx)(L,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:v.map(x=>(0,ie.jsx)(t0,{className:"dataviews-view-grid__field-value",children:(0,ie.jsx)(x.render,{item:l,field:x})},x.id))}),!!m?.length&&(0,ie.jsx)(L,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:m.map(x=>(0,ie.jsx)(Ot.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(Ot.Tooltip,{text:x.label,children:(0,ie.jsx)(Ot.FlexItem,{className:"dataviews-view-grid__field-name",children:x.header})}),(0,ie.jsx)(Ot.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,ie.jsx)(x.render,{item:l,field:x})})]})},x.id))})]})]})});function Cu({data:e,isInfiniteScroll:t,className:r,inert:o,isLoading:n,view:i,fields:a,selection:s,onChangeSelection:l,onClickItem:c,isItemClickable:f,renderItemLink:p,getItemId:d,actions:m}){let{paginationInfo:v,resizeObserverRef:_}=(0,Pa.useContext)(q),h=Nf(),b=_a(m,e),y=a.find(N=>N.id===i?.titleField),A=a.find(N=>N.id===i?.mediaField),V=a.find(N=>N.id===i?.descriptionField),R=i.fields??[],{regularFields:M,badgeFields:k}=R.reduce((N,g)=>{let E=a.find(w=>w.id===g);if(!E)return N;let T=i.layout?.badgeFields?.includes(g)?"badgeFields":"regularFields";return N[T].push(E),N},{regularFields:[],badgeFields:[]}),S="900px",I=Math.ceil(e.length/h);return(0,ie.jsx)(Ot.Composite,{role:t?"feed":"grid",className:Y("dataviews-view-grid",r),focusWrap:!0,"aria-busy":n,"aria-rowcount":t?void 0:I,ref:_,inert:o,children:r0(e,h).map((N,g)=>(0,ie.jsx)(Ot.Composite.Row,{render:(0,ie.jsx)("div",{role:"row","aria-rowindex":g+1,"aria-label":(0,Bn.sprintf)((0,Bn.__)("Row %d"),g+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${h}, minmax(0, 1fr) )`}}),children:N.map((E,T)=>{let w=g*h+T;return(0,ie.jsx)(Ot.Composite.Item,{render:O=>(0,ie.jsx)(o0,{...O,role:t?"article":"gridcell","aria-setsize":t?v.totalItems:void 0,"aria-posinset":t?w+1:void 0,view:i,selection:s,onChangeSelection:l,onClickItem:c,isItemClickable:f,renderItemLink:p,getItemId:d,item:E,actions:m,mediaField:A,titleField:y,descriptionField:V,regularFields:M,badgeFields:k,hasBulkActions:b,config:{sizes:S}})},d(E))})},g))})}var At=u(P(),1);function n0({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,onClickItem:a,isItemClickable:s,renderItemLink:l,selection:c,view:f,className:p,empty:d}){let m=Qt(!!n),v=!!t?.length,_=f.groupBy?.field?r.find(A=>A.id===f.groupBy?.field):null,h=_?kt(t,_):null,b=f.infiniteScrollEnabled&&!h;if(!v)return(0,At.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":m}),children:d});let y={className:Y(p,{"is-refreshing":!b&&m}),inert:!b&&n?"true":void 0,isLoading:n,view:f,fields:r,selection:c,onChangeSelection:i,onClickItem:a,isItemClickable:s,renderItemLink:l,getItemId:o,actions:e};return(0,At.jsxs)(At.Fragment,{children:[v&&_&&h&&(0,At.jsx)(L,{direction:"column",gap:"lg",children:Array.from(h.entries()).map(([A,V])=>(0,At.jsxs)(L,{direction:"column",gap:"sm",children:[(0,At.jsx)("h3",{className:"dataviews-view-grid__group-header",children:f.groupBy?.showLabel===!1?A:(0,Ra.sprintf)((0,Ra.__)("%1$s: %2$s"),_.label,A)}),(0,At.jsx)(Cu,{...y,data:V,isInfiniteScroll:!1})]},A))}),!h&&(0,At.jsx)(Cu,{...y,data:t,isInfiniteScroll:!!b}),b&&n&&(0,At.jsx)("p",{className:"dataviews-loading-more",children:(0,At.jsx)(Mf.Spinner,{})})]})}var Ff=n0;var Va=u(bt(),1),We=u(G(),1),Le=u(z(),1),jn=u(j(),1);var Au=u(qt(),1);var U=u(P(),1),{Menu:Eu}=Z(We.privateApis);function Tu(e){return`${e}-item-wrapper`}function i0(e,t){return`${e}-primary-action-${t}`}function Ou(e){return`${e}-dropdown`}function a0({idPrefix:e,primaryAction:t,item:r}){let o=(0,Au.useRegistry)(),[n,i]=(0,Le.useState)(!1),a=i0(e,t.id),s=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,U.jsx)("div",{role:"gridcell",children:(0,U.jsx)(We.Composite.Item,{id:a,render:(0,U.jsx)(We.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:s,size:"small",onClick:()=>i(!0)}),children:n&&(0,U.jsx)(Ln,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,U.jsx)("div",{role:"gridcell",children:(0,U.jsx)(We.Composite.Item,{id:a,render:(0,U.jsx)(We.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:s})})},t.id)}function Lf({view:e,actions:t,idPrefix:r,isSelected:o,item:n,titleField:i,mediaField:a,descriptionField:s,onSelect:l,otherFields:c,onDropdownTriggerKeyDown:f,posinset:p}){let{showTitle:d=!0,showMedia:m=!0,showDescription:v=!0,infiniteScrollEnabled:_}=e,h=(0,Le.useRef)(null),b=`${r}-label`,y=`${r}-description`,A=(0,Au.useRegistry)(),[V,R]=(0,Le.useState)(!1),[M,k]=(0,Le.useState)(null),S=({type:x})=>{R(x==="mouseenter")},{paginationInfo:I}=(0,Le.useContext)(q);(0,Le.useEffect)(()=>{o&&h.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:N,eligibleActions:g}=(0,Le.useMemo)(()=>{let x=t.filter(F=>!F.isEligible||F.isEligible(n));return{primaryAction:x.filter(F=>F.isPrimary)[0],eligibleActions:x}},[t,n]),E=N&&t.length===1,T=m&&a?.render?(0,U.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,U.jsx)(a.render,{item:n,field:a,config:{sizes:"52px"}})}):null,w=d&&i?.render?(0,U.jsx)(i.render,{item:n,field:i}):null,O=g?.length>0&&(0,U.jsxs)(L,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[N&&(0,U.jsx)(a0,{idPrefix:r,primaryAction:N,item:n}),!E&&(0,U.jsxs)("div",{role:"gridcell",children:[(0,U.jsxs)(Eu,{placement:"bottom-end",children:[(0,U.jsx)(Eu.TriggerButton,{render:(0,U.jsx)(We.Composite.Item,{id:Ou(r),render:(0,U.jsx)(We.Button,{size:"small",icon:Nn,label:(0,jn.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:f})})}),(0,U.jsx)(Eu.Popover,{children:(0,U.jsx)(bu,{actions:g,item:n,registry:A,setActiveModalAction:k})})]}),!!M&&(0,U.jsx)(Ln,{action:M,items:[n],closeModal:()=>k(null)})]})]});return(0,U.jsx)(We.Composite.Row,{ref:h,render:(0,U.jsx)("div",{"aria-posinset":p,"aria-setsize":_?I.totalItems:void 0}),role:_?"article":"row",className:Y({"is-selected":o,"is-hovered":V}),onMouseEnter:S,onMouseLeave:S,children:(0,U.jsxs)(L,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,U.jsx)("div",{role:"gridcell",children:(0,U.jsx)(We.Composite.Item,{id:Tu(r),"aria-pressed":o,"aria-labelledby":b,"aria-describedby":y,className:"dataviews-view-list__item",onClick:()=>l(n)})}),(0,U.jsxs)(L,{direction:"row",gap:"md",justify:"start",align:"flex-start",style:{flex:1,minWidth:0},children:[T,(0,U.jsxs)(L,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,U.jsxs)(L,{direction:"row",align:"center",children:[(0,U.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:b,children:w}),O]}),v&&s?.render&&(0,U.jsx)("div",{className:"dataviews-view-list__field",children:(0,U.jsx)(s.render,{item:n,field:s})}),(0,U.jsx)("div",{className:"dataviews-view-list__fields",id:y,children:c.map(x=>(0,U.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,U.jsx)(We.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:x.label}),(0,U.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,U.jsx)(x.render,{item:n,field:x})})]},x.id))})]})]})]})})}function s0(e){return!!e}function Iu(e){let{actions:t,data:r,fields:o,getItemId:n,isLoading:i,onChangeSelection:a,selection:s,view:l,className:c,empty:f}=e,p=(0,Va.useInstanceId)(Iu,"view-list"),d=Qt(!!i),m=r?.findLast(x=>s.includes(n(x))),v=o.find(x=>x.id===l.titleField),_=o.find(x=>x.id===l.mediaField),h=o.find(x=>x.id===l.descriptionField),b=(l?.fields??[]).map(x=>o.find(C=>x===C.id)).filter(s0),y=x=>a([n(x)]),A=(0,Le.useCallback)(x=>`${p}-${n(x)}`,[p,n]),V=(0,Le.useCallback)((x,C)=>C.startsWith(A(x)),[A]),[R,M]=(0,Le.useState)(void 0);(0,Le.useEffect)(()=>{m&&M(Tu(A(m)))},[m,A]);let k=r.findIndex(x=>V(x,R??"")),S=(0,Va.usePrevious)(k),I=k!==-1,N=(0,Le.useCallback)((x,C)=>{let F=Math.min(r.length-1,Math.max(0,x));if(!r[F])return;let D=A(r[F]),W=C(D);M(W),document.getElementById(W)?.focus()},[r,A]);(0,Le.useEffect)(()=>{!I&&(S!==void 0&&S!==-1)&&N(S,Tu)},[I,N,S]);let g=(0,Le.useCallback)(x=>{x.key==="ArrowDown"&&(x.preventDefault(),N(k+1,Ou)),x.key==="ArrowUp"&&(x.preventDefault(),N(k-1,Ou))},[N,k]),E=!!r?.length,T=l.groupBy?.field?o.find(x=>x.id===l.groupBy?.field):null,w=E&&T?kt(r,T):null,O=l.infiniteScrollEnabled&&!w;return E?E&&T&&w?(0,U.jsx)(We.Composite,{id:`${p}`,render:(0,U.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:R,setActiveId:M,children:(0,U.jsx)(L,{direction:"column",gap:"lg",className:Y("dataviews-view-list",c),children:Array.from(w.entries()).map(([x,C])=>(0,U.jsxs)(L,{direction:"column",gap:"sm",children:[(0,U.jsx)("h3",{className:"dataviews-view-list__group-header",children:l.groupBy?.showLabel===!1?x:(0,jn.sprintf)((0,jn.__)("%1$s: %2$s"),T.label,x)}),C.map(F=>{let D=A(F);return(0,U.jsx)(Lf,{view:l,idPrefix:D,actions:t,item:F,isSelected:F===m,onSelect:y,mediaField:_,titleField:v,descriptionField:h,otherFields:b,onDropdownTriggerKeyDown:g},D)})]},x))})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(We.Composite,{id:p,render:(0,U.jsx)("div",{}),className:Y("dataviews-view-list",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density),"is-refreshing":!O&&d}),role:l.infiniteScrollEnabled?"feed":"grid",activeId:R,setActiveId:M,inert:!O&&i?"true":void 0,children:r.map((x,C)=>{let F=A(x);return(0,U.jsx)(Lf,{view:l,idPrefix:F,actions:t,item:x,isSelected:x===m,onSelect:y,mediaField:_,titleField:v,descriptionField:h,otherFields:b,onDropdownTriggerKeyDown:g,posinset:l.infiniteScrollEnabled?C+1:void 0},F)})}),O&&i&&(0,U.jsx)("p",{className:"dataviews-loading-more",children:(0,U.jsx)(We.Spinner,{})})]}):(0,U.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":d}),children:f})}var Yf=u(G(),1);var Na=u(j(),1),Bf=u(z(),1);var Yo=u(P(),1);function jf({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,Bf.createInterpolateElement)((0,Na.sprintf)((0,Na.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,Yo.jsx)(r.render,{item:t[0],field:r})}):(0,Yo.jsx)(r.render,{item:t[0],field:r});return(0,Yo.jsxs)(L,{direction:"column",className:"dataviews-view-activity__group",children:[(0,Yo.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var Hf=u(G(),1),wo=u(z(),1),zf=u(qt(),1),Wf=u(bt(),1);var De=u(P(),1);function l0(e){let{view:t,actions:r,item:o,titleField:n,mediaField:i,descriptionField:a,otherFields:s,posinset:l,onClickItem:c,renderItemLink:f,isItemClickable:p}=e,{showTitle:d=!0,showMedia:m=!0,showDescription:v=!0,infiniteScrollEnabled:_}=t,h=(0,wo.useRef)(null),b=(0,zf.useRegistry)(),{paginationInfo:y}=(0,wo.useContext)(q),{primaryActions:A,eligibleActions:V}=(0,wo.useMemo)(()=>{let g=r.filter(T=>!T.isEligible||T.isEligible(o));return{primaryActions:g.filter(T=>T.isPrimary),eligibleActions:g}},[r,o]),R=(0,Wf.useViewportMatch)("medium","<"),M=t.layout?.density??"balanced",k=m&&M!=="compact"&&i?.render?(0,De.jsx)(i.render,{item:o,field:i,config:{sizes:M==="comfortable"?"32px":"24px"}}):null,S=(0,De.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:k||(0,De.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),I=d&&n?.render?(0,De.jsx)(n.render,{item:o,field:n}):null,N=(0,wo.useMemo)(()=>M==="comfortable"?"md":"sm",[M]);return(0,De.jsx)("div",{ref:h,role:_?"article":void 0,"aria-posinset":l,"aria-setsize":_?y.totalItems:void 0,className:Y("dataviews-view-activity__item",M==="compact"&&"is-compact",M==="balanced"&&"is-balanced",M==="comfortable"&&"is-comfortable"),children:(0,De.jsxs)(L,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,De.jsx)(L,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:S}),(0,De.jsxs)(L,{direction:"column",gap:N,align:"flex-start",className:"dataviews-view-activity__item-content",children:[I&&(0,De.jsx)(Zr,{item:o,isItemClickable:p,onClickItem:c,renderItemLink:f,className:"dataviews-view-activity__item-title",children:I}),v&&a&&(0,De.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,De.jsx)(a.render,{item:o,field:a})}),(0,De.jsx)("div",{className:"dataviews-view-activity__item-fields",children:s.map(g=>(0,De.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,De.jsx)(Hf.VisuallyHidden,{as:"span",className:"dataviews-view-activity__item-field-label",children:g.label}),(0,De.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,De.jsx)(g.render,{item:o,field:g})})]},g.id))}),!!A?.length&&(0,De.jsx)(xu,{item:o,actions:A,registry:b,buttonVariant:"secondary"})]}),(A.length<V.length||R&&V.length>0)&&(0,De.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,De.jsx)(Wo,{item:o,actions:V,isCompact:!0})})]})})}var Gf=l0;var Uf=u(ue(),1);function u0(e){return!!e}function Pu(e){let{data:t,fields:r,getItemId:o,view:n}=e,i=r.find(c=>c.id===n.titleField),a=r.find(c=>c.id===n.mediaField),s=r.find(c=>c.id===n.descriptionField),l=(n?.fields??[]).map(c=>r.find(f=>c===f.id)).filter(u0);return t.map((c,f)=>(0,Uf.createElement)(Gf,{...e,key:o(c),item:c,mediaField:a,titleField:i,descriptionField:s,otherFields:l,posinset:n.infiniteScrollEnabled?f+1:void 0}))}var It=u(P(),1);function qf(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:a}=e,s=Qt(!!n),l=!!r?.length,c=i.groupBy?.field?o.find(_=>_.id===i.groupBy?.field):null,f=l&&c?kt(r,c):null,p=i.infiniteScrollEnabled&&!f;if(!l)return(0,It.jsx)("div",{className:Y("dataviews-no-results",{"is-refreshing":s}),children:t});let d=!p&&!!n,m=Y("dataviews-view-activity",a,{"is-refreshing":!p&&s}),v=f?Array.from(f.entries()):[];return l&&c&&f?(0,It.jsx)(L,{direction:"column",gap:"sm",className:m,inert:d?"true":void 0,children:v.map(([_,h])=>(0,It.jsx)(jf,{groupName:_,groupData:h,groupField:c,showLabel:i.groupBy?.showLabel!==!1,children:(0,It.jsx)(Pu,{...e,data:h})},_))}):(0,It.jsxs)(It.Fragment,{children:[(0,It.jsx)("div",{className:m,role:i.infiniteScrollEnabled?"feed":void 0,inert:d?"true":void 0,children:(0,It.jsx)(Pu,{...e})}),p&&n&&(0,It.jsx)("p",{className:"dataviews-loading-more",children:(0,It.jsx)(Yf.Spinner,{})})]})}var yt=u(G(),1),Wn=u(j(),1),Jf=u(bt(),1),em=u(z(),1);var Da=u(G(),1),Kf=u(qt(),1),yo=u(z(),1);var Vu=u(j(),1);var Hn=u(G(),1),qo=u(z(),1),Pt=u(j(),1);var br=u(P(),1);function Ru(){let{view:e,onChangeView:t,paginationInfo:{totalItems:r=0,totalPages:o}}=(0,qo.useContext)(q);if(!r||!o||e.infiniteScrollEnabled)return null;let n=e.page??1,i=Array.from(Array(o)).map((a,s)=>{let l=s+1;return{value:l.toString(),label:l.toString(),"aria-label":n===l?(0,Pt.sprintf)((0,Pt.__)("Page %1$d of %2$d"),n,o):l.toString()}});return!!r&&o!==1&&(0,br.jsxs)(L,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,br.jsx)(L,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,qo.createInterpolateElement)((0,Pt.sprintf)((0,Pt._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,br.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,br.jsx)(Hn.SelectControl,{"aria-label":(0,Pt.__)("Current page"),value:n.toString(),options:i,onChange:a=>{t({...e,page:+a})},size:"small",variant:"minimal"})})}),(0,br.jsxs)(L,{direction:"row",gap:"xs",align:"center",children:[(0,br.jsx)(Hn.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,Pt.__)("Previous page"),icon:(0,Pt.isRTL)()?na:aa,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,br.jsx)(Hn.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,Pt.__)("Next page"),icon:(0,Pt.isRTL)()?aa:na,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var $f=(0,qo.memo)(Ru);var Mt=u(P(),1),c0=[];function zn(e){return(0,yo.useMemo)(()=>e?.every(t=>t.supportsBulk),[e])}function d0({selection:e,selectedItems:t,onChangeSelection:r,data:o,getItemId:n}){let i=t.length===o.length;return(0,Mt.jsx)(Da.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:i,indeterminate:!i&&!!t.length,onChange:()=>{if(i)r(e.filter(a=>!o.some(s=>a===n(s))));else{let a=new Set([...e,...o.map(s=>n(s))]);r(Array.from(a))}},"aria-label":i?(0,Vu.__)("Deselect all"):(0,Vu.__)("Select all")})}function f0({actions:e,items:t,selection:r}){let o=(0,Kf.useRegistry)(),[n,i]=(0,yo.useState)(null);return(0,Mt.jsx)(L,{direction:"row",gap:"xs",children:e.map(a=>{if(!("callback"in a))return null;let{id:s,label:l,icon:c,isPrimary:f,callback:p}=a,d=typeof l=="string"?l:l(t),m=f?"primary":"tertiary",v=s===n;return(0,Mt.jsx)(Da.Button,{accessibleWhenDisabled:!0,icon:c,disabled:v||!r?.length,isBusy:v,onClick:async()=>{i(s),await p(t,{registry:o}),i(null)},size:"compact",variant:m,children:d},s)})})}function Nu(){let{data:e,selection:t,onChangeSelection:r,getItemId:o,actions:n=c0,paginationInfo:i}=(0,yo.useContext)(q),a=zn(n),s=_f(t.length,e.length,i.totalItems),l=(0,yo.useMemo)(()=>e.filter(c=>t.includes(o(c))),[t,o,e]);return(0,Mt.jsxs)(L,{direction:"row",justify:"space-between",align:"center",className:"dataviews-footer",gap:"sm",children:[(0,Mt.jsxs)(L,{direction:"row",className:"dataviews-picker-footer__bulk-selection",gap:"md",align:"center",children:[a&&(0,Mt.jsx)(d0,{selection:t,selectedItems:l,onChangeSelection:r,data:e,getItemId:o}),(0,Mt.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:s})]}),(0,Mt.jsx)($f,{}),!!n?.length&&(0,Mt.jsx)("div",{className:"dataviews-picker-footer__actions",children:(0,Mt.jsx)(f0,{actions:n,items:l,selection:t})})]})}var Zf=u(z(),1);var Xf=u(P(),1),Du=(0,Zf.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,Xf.jsx)("div",{ref:o,className:Y("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var X=u(P(),1),{Badge:m0}=Z(yt.privateApis);function Qf({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,mediaField:a,titleField:s,descriptionField:l,regularFields:c,badgeFields:f,config:p,posinset:d,setsize:m}){let{showTitle:v=!0,showMedia:_=!0,showDescription:h=!0}=e,b=n(i),y=r.includes(b),A=a?.render?(0,X.jsx)(a.render,{item:i,field:a,config:p}):null,V=v&&s?.render?(0,X.jsx)(s.render,{item:i,field:s}):null;return(0,X.jsxs)(yt.Composite.Item,{"aria-label":s?s.getValue({item:i})||(0,Wn.__)("(no title)"):void 0,render:({children:R,...M})=>(0,X.jsx)(L,{direction:"column",children:R,...M}),role:"option","aria-posinset":d,"aria-setsize":m,className:Y("dataviews-view-picker-grid__card",{"is-selected":y}),"aria-selected":y,onClick:()=>{if(y)o(r.filter(R=>b!==R));else{let R=t?[...r,b]:[b];o(R)}},children:[_&&A&&(0,X.jsx)("div",{className:"dataviews-view-picker-grid__media",children:A}),_&&A&&(0,X.jsx)(qr,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:s,disabled:!1,"aria-hidden":!0,tabIndex:-1}),v&&(0,X.jsx)(L,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,X.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:V})}),(0,X.jsxs)(L,{direction:"column",gap:"xs",children:[h&&l?.render&&(0,X.jsx)(l.render,{item:i,field:l}),!!f?.length&&(0,X.jsx)(L,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:f.map(R=>(0,X.jsx)(m0,{className:"dataviews-view-picker-grid__field-value",children:(0,X.jsx)(R.render,{item:i,field:R})},R.id))}),!!c?.length&&(0,X.jsx)(L,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:c.map(R=>(0,X.jsx)(yt.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(yt.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:R.header}),(0,X.jsx)(yt.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,X.jsx)(R.render,{item:i,field:R})})]})},R.id))})]})]},b)}function tm({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,Jf.useInstanceId)(tm,"dataviews-view-picker-grid-group__header");return(0,X.jsxs)(L,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,X.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,Wn.sprintf)((0,Wn.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function p0({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,selection:a,view:s,className:l,empty:c}){let{resizeObserverRef:f,paginationInfo:p,itemListLabel:d}=(0,em.useContext)(q),m=r.find(T=>T.id===s?.titleField),v=r.find(T=>T.id===s?.mediaField),_=r.find(T=>T.id===s?.descriptionField),h=s.fields??[],{regularFields:b,badgeFields:y}=h.reduce((T,w)=>{let O=r.find(C=>C.id===w);if(!O)return T;let x=s.layout?.badgeFields?.includes(w)?"badgeFields":"regularFields";return T[x].push(O),T},{regularFields:[],badgeFields:[]}),A=!!t?.length,V=s.layout?.previewSize,R=zn(e),M="900px",k=s.groupBy?.field?r.find(T=>T.id===s.groupBy?.field):null,S=k?kt(t,k):null,I=s.infiniteScrollEnabled&&!S,N=s?.page??1,g=s?.perPage??0,E=I?p?.totalItems:void 0;return(0,X.jsxs)(X.Fragment,{children:[A&&k&&S&&(0,X.jsx)(yt.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":R,className:Y("dataviews-view-picker-grid",l),"aria-label":d,render:({children:T,...w})=>(0,X.jsx)(L,{direction:"column",gap:"lg",children:T,...w}),children:Array.from(S.entries()).map(([T,w])=>(0,X.jsx)(tm,{groupName:T,groupField:k,showLabel:s.groupBy?.showLabel!==!1,children:(0,X.jsx)(Du,{previewSize:V,style:{gridTemplateColumns:V&&`repeat(auto-fill, minmax(${V}px, 1fr))`},"aria-busy":n,ref:f,children:w.map(O=>{let x=(N-1)*g+t.indexOf(O)+1;return(0,X.jsx)(Qf,{view:s,multiselect:R,selection:a,onChangeSelection:i,getItemId:o,item:O,mediaField:v,titleField:m,descriptionField:_,regularFields:b,badgeFields:y,config:{sizes:M},posinset:x,setsize:E},o(O))})})},T))}),A&&!S&&(0,X.jsx)(yt.Composite,{render:(0,X.jsx)(Du,{className:Y("dataviews-view-picker-grid",l),previewSize:V,"aria-busy":n,ref:f}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":R,"aria-label":d,children:t.map((T,w)=>{let O=I?w+1:void 0;return I||(O=(N-1)*g+w+1),(0,X.jsx)(Qf,{view:s,multiselect:R,selection:a,onChangeSelection:i,getItemId:o,item:T,mediaField:v,titleField:m,descriptionField:_,regularFields:b,badgeFields:y,config:{sizes:M},posinset:O,setsize:E},o(T))})}),!A&&(0,X.jsx)("div",{className:Y({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,X.jsx)("p",{children:(0,X.jsx)(yt.Spinner,{})}):c}),A&&n&&(0,X.jsx)("p",{className:"dataviews-loading-more",children:(0,X.jsx)(yt.Spinner,{})})]})}var rm=p0;var ka=u(j(),1),_o=u(G(),1),Ft=u(z(),1);var ee=u(P(),1);function v0({item:e,fields:t,column:r,align:o}){let n=t.find(a=>a.id===r);if(!n)return null;let i=Y("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,ee.jsx)("div",{className:i,children:(0,ee.jsx)(n.render,{item:e,field:n})})}function om({item:e,fields:t,id:r,view:o,titleField:n,mediaField:i,descriptionField:a,selection:s,getItemId:l,onChangeSelection:c,multiselect:f,posinset:p}){let{paginationInfo:d}=(0,Ft.useContext)(q),m=s.includes(r),[v,_]=(0,Ft.useState)(!1),{showTitle:h=!0,showMedia:b=!0,showDescription:y=!0,infiniteScrollEnabled:A}=o,V=()=>{_(!0)},R=()=>{_(!1)},M=o.fields??[],k=n&&h||i&&b||a&&y;return(0,ee.jsxs)(_o.Composite.Item,{render:({children:S,...I})=>(0,ee.jsx)("tr",{className:Y("dataviews-view-table__row",{"is-selected":m,"is-hovered":v}),onMouseEnter:V,onMouseLeave:R,children:S,...I}),"aria-selected":m,"aria-setsize":d.totalItems||void 0,"aria-posinset":p,role:A?"article":"option",onClick:()=>{if(m)c(s.filter(S=>r!==S));else{let S=f?[...s,r]:[r];c(S)}},children:[(0,ee.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,ee.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,ee.jsx)(qr,{item:e,selection:s,onChangeSelection:c,getItemId:l,titleField:n,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),k&&(0,ee.jsx)("td",{role:"presentation",children:(0,ee.jsx)(Ea,{item:e,titleField:h?n:void 0,mediaField:b?i:void 0,descriptionField:y?a:void 0,isItemClickable:()=>!1})}),M.map(S=>{let{width:I,maxWidth:N,minWidth:g,align:E}=o.layout?.styles?.[S]??{};return(0,ee.jsx)("td",{style:{width:I,maxWidth:N,minWidth:g},role:"presentation",children:(0,ee.jsx)(v0,{fields:t,item:e,column:S,align:E})},S)})]},r)}function h0({actions:e,data:t,fields:r,getItemId:o,isLoading:n=!1,onChangeView:i,onChangeSelection:a,selection:s,setOpenedFilter:l,view:c,className:f,empty:p}){let d=(0,Ft.useRef)(new Map),m=(0,Ft.useRef)(void 0),[v,_]=(0,Ft.useState)(),h=zn(e)??!1;(0,Ft.useEffect)(()=>{m.current&&(m.current.focus(),m.current=void 0)});let b=(0,Ft.useId)();if(v){m.current=v,_(void 0);return}let y=x=>{let C=d.current.get(x.id),F=C?d.current.get(C.fallback):void 0;_(F?.node)},A=!!t?.length,V=r.find(x=>x.id===c.titleField),R=r.find(x=>x.id===c.mediaField),M=r.find(x=>x.id===c.descriptionField),k=c.groupBy?.field?r.find(x=>x.id===c.groupBy?.field):null,S=k?kt(t,k):null,{showTitle:I=!0,showMedia:N=!0,showDescription:g=!0}=c,E=V&&I||R&&N||M&&g,T=c.fields??[],w=(x,C)=>F=>{F?d.current.set(x,{node:F,fallback:T[C>0?C-1:1]}):d.current.delete(x)},O=c.infiniteScrollEnabled&&!S;return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("table",{className:Y("dataviews-view-table","dataviews-view-picker-table",f,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density)}),"aria-busy":n,"aria-describedby":b,role:O?"feed":"listbox",children:[(0,ee.jsx)("thead",{role:"presentation",children:(0,ee.jsxs)("tr",{className:"dataviews-view-table__row",role:"presentation",children:[(0,ee.jsx)("th",{className:"dataviews-view-table__checkbox-column",children:h&&(0,ee.jsx)(Sa,{selection:s,onChangeSelection:a,data:t,actions:e,getItemId:o})}),E&&(0,ee.jsx)("th",{children:V&&(0,ee.jsx)(Go,{ref:w(V.id,0),fieldId:V.id,view:c,fields:r,onChangeView:i,onHide:y,setOpenedFilter:l,canMove:!1})}),T.map((x,C)=>{let{width:F,maxWidth:D,minWidth:W,align:Q}=c.layout?.styles?.[x]??{};return(0,ee.jsx)("th",{style:{width:F,maxWidth:D,minWidth:W,textAlign:Q},"aria-sort":c.sort?.direction&&c.sort?.field===x?ha[c.sort.direction]:void 0,scope:"col",children:(0,ee.jsx)(Go,{ref:w(x,C),fieldId:x,view:c,fields:r,onChangeView:i,onHide:y,setOpenedFilter:l,canMove:c.layout?.enableMoving??!0})},x)})]})}),A&&k&&S?Array.from(S.entries()).map(([x,C])=>(0,ee.jsxs)(_o.Composite,{virtualFocus:!0,orientation:"vertical",render:(0,ee.jsx)("tbody",{role:"group"}),children:[(0,ee.jsx)("tr",{className:"dataviews-view-table__group-header-row",role:"presentation",children:(0,ee.jsx)("td",{colSpan:T.length+(E?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:c.groupBy?.showLabel===!1?x:(0,ka.sprintf)((0,ka.__)("%1$s: %2$s"),k.label,x)})}),C.map((F,D)=>(0,ee.jsx)(om,{item:F,fields:r,id:o(F)||D.toString(),view:c,titleField:V,mediaField:R,descriptionField:M,selection:s,getItemId:o,onChangeSelection:a,multiselect:h},o(F)))]},`group-${x}`)):(0,ee.jsx)(_o.Composite,{render:(0,ee.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:A&&t.map((x,C)=>(0,ee.jsx)(om,{item:x,fields:r,id:o(x)||C.toString(),view:c,titleField:V,mediaField:R,descriptionField:M,selection:s,getItemId:o,onChangeSelection:a,multiselect:h,posinset:C+1},o(x)))})]}),(0,ee.jsxs)("div",{className:Y({"dataviews-loading":n,"dataviews-no-results":!A&&!n}),id:b,children:[!A&&(n?(0,ee.jsx)("p",{children:(0,ee.jsx)(_o.Spinner,{})}):p),A&&n&&(0,ee.jsx)("p",{className:"dataviews-loading-more",children:(0,ee.jsx)(_o.Spinner,{})})]})]})}var nm=h0;var im=u(G(),1),am=u(j(),1),sm=u(z(),1);var lm=u(P(),1),g0=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function ku(){let e=(0,sm.useContext)(q),t=e.view,r=g0.filter(a=>e.containerWidth>=a.breakpoint),o=t.layout?.previewSize??230,n=r.map((a,s)=>({...a,index:s})).filter(a=>a.value<=o).sort((a,s)=>s.value-a.value)[0]?.index??0,i=r.map((a,s)=>({value:s}));return(0,lm.jsx)(im.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,am.__)("Preview size"),value:n,min:0,max:r.length-1,withInputField:!1,onChange:(a=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:r[a].value}})},step:1,marks:i})}var $o=u(G(),1),Ko=u(j(),1),um=u(z(),1);var Zo=u(P(),1);function Gn(){let e=(0,um.useContext)(q),t=e.view;return(0,Zo.jsxs)($o.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,Ko.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,Zo.jsx)($o.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,Ko._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,Zo.jsx)($o.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,Ko._x)("Balanced","Density option for DataView layout")},"balanced"),(0,Zo.jsx)($o.__experimentalToggleGroupControlOption,{value:"compact",label:(0,Ko._x)("Compact","Density option for DataView layout")},"compact")]})}var Qr=[{type:ba,label:(0,xr.__)("Table"),component:Vf,icon:ji,viewConfigOptions:Gn},{type:lf,label:(0,xr.__)("Grid"),component:Ff,icon:zi,viewConfigOptions:ku},{type:uf,label:(0,xr.__)("List"),component:Iu,icon:(0,xr.isRTL)()?Ml:Ll,viewConfigOptions:Gn},{type:cf,label:(0,xr.__)("Activity"),component:qf,icon:Zl,viewConfigOptions:Gn},{type:df,label:(0,xr.__)("Grid"),component:rm,icon:zi,viewConfigOptions:ku,isPicker:!0},{type:ff,label:(0,xr.__)("Table"),component:nm,icon:ji,viewConfigOptions:Gn,isPicker:!0}];var fn=u(z(),1);var Gt=u(G(),1),Ar=u(j(),1),ps=u(z(),1);function Un(...e){}function Mu(e,t){if(b0(e)){let r=x0(t)?t():t;return e(r)}return e}function b0(e){return typeof e=="function"}function x0(e){return typeof e=="function"}function _t(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Jr(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function Yn(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Fu(e,t){let r={...e};for(let o of t)_t(r,o)&&delete r[o];return r}function Lu(e,t){let r={};for(let o of t)_t(e,o)&&(r[o]=e[o]);return r}function qn(e){return e}function Ke(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function Bu(e){return Object.keys(e)}function ju(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function So(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function Ze(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function te(...e){for(let t of e)if(t!==void 0)return t}var cm=u(ue(),1);function dm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function w0(e){return!e||!(0,cm.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function fm(e){return w0(e)?{...e.props}.ref||e.ref:null}function mm(e,t){let r={...e};for(let o in t){if(!_t(t,o))continue;if(o==="className"){let i="className";r[i]=e[i]?`${e[i]} ${t[i]}`:t[i];continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(typeof n=="function"&&o.startsWith("on")){let i=e[o];if(typeof i=="function"){r[o]=(...a)=>{n(...a),i(...a)};continue}}r[o]=n}return r}var eo=y0();function y0(){var e;return typeof window<"u"&&!!((e=window.document)!=null&&e.createElement)}function wr(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function Co(e,t=!1){var r;let{activeElement:o}=wr(e);if(!o?.nodeName)return null;if(Hu(o)&&((r=o.contentDocument)!=null&&r.body))return Co(o.contentDocument.body,t);if(t){let n=o.getAttribute("aria-activedescendant");if(n){let i=wr(o).getElementById(n);if(i)return i}}return o}function Jt(e,t){return e===t||e.contains(t)}function Hu(e){return e.tagName==="IFRAME"}function yr(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?_0.indexOf(e.type)!==-1:!1}var _0=["button","color","file","image","reset","submit"];function zu(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function ft(e){try{let t=e instanceof HTMLInputElement&&e.selectionStart!==null,r=e.tagName==="TEXTAREA";return t||r||!1}catch{return!1}}function $n(e){return e.isContentEditable||ft(e)}function Wu(e){if(ft(e))return e.value;if(e.isContentEditable){let t=wr(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function Xo(e){let t=0,r=0;if(ft(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=wr(e).getSelection();if(o?.rangeCount&&o.anchorNode&&Jt(e,o.anchorNode)&&o.focusNode&&Jt(e,o.focusNode)){let n=o.getRangeAt(0),i=n.cloneRange();i.selectNodeContents(e),i.setEnd(n.startContainer,n.startOffset),t=i.toString().length,i.setEnd(n.endContainer,n.endOffset),r=i.toString().length}}return{start:t,end:r}}function Gu(e,t){let r=["dialog","menu","listbox","tree","grid"],o=e?.getAttribute("role");return o&&r.indexOf(o)!==-1?o:t}function Qo(e){if(!e)return null;let t=r=>r==="auto"||r==="scroll";if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return Qo(e.parentElement)||document.scrollingElement||document.body}function Kn(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Uu(e,t){let r=e.map((n,i)=>[i,n]),o=!1;return r.sort(([n,i],[a,s])=>{let l=t(i),c=t(s);return l===c||!l||!c?0:S0(l,c)?(n>a&&(o=!0),-1):(n<a&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function S0(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Yu(){return eo&&!!navigator.maxTouchPoints}function Ma(){return eo?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function Eo(){return eo&&Ma()&&/apple/i.test(navigator.vendor)}function qu(){return eo&&/firefox\//i.test(navigator.userAgent)}function Fa(e){return!!(e.currentTarget&&!Jt(e.currentTarget,e.target))}function it(e){return e.target===e.currentTarget}function pm(e){let t=e.currentTarget;if(!t)return!1;let r=Ma();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let o=t.tagName.toLowerCase();return o==="a"||o==="button"&&t.type==="submit"||o==="input"&&t.type==="submit"}function vm(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return e.altKey?r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit":!1}function To(e,t){let r=new FocusEvent("blur",t),o=e.dispatchEvent(r),n={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent("focusout",n)),o}function hm(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function $u(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function La(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!o||!Jt(r,o)}function to(e,t,r,o){let i=(s=>{if(o){let c=setTimeout(s,o);return()=>clearTimeout(c)}let l=requestAnimationFrame(s);return()=>cancelAnimationFrame(l)})(()=>{e.removeEventListener(t,a,!0),r()}),a=()=>{i(),r()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function er(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let a of Array.from(o.frames))n.push(er(e,t,r,a))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let a of n)a()}}var C0=u(ue(),1),me=u(ue(),1),Ku={...C0},gm=Ku.useId,oO=Ku.useDeferredValue,bm=Ku.useInsertionEffect,Te=eo?me.useLayoutEffect:me.useEffect;function E0(e){let[t]=(0,me.useState)(e);return t}function _m(e){let t=(0,me.useRef)(e);return Te(()=>{t.current=e}),t}function re(e){let t=(0,me.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return bm?bm(()=>{t.current=e}):t.current=e,(0,me.useCallback)((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function Sm(e){let[t,r]=(0,me.useState)(null);return Te(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function Ae(...e){return(0,me.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let r of e)dm(r,t)}},e)}function Lt(e){if(gm){let o=gm();return e||o}let[t,r]=(0,me.useState)(e);return Te(()=>{if(e||t)return;let o=Math.random().toString(36).slice(2,8);r(`id-${o}`)},[e,t]),e||t}function Cm(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,me.useState)(()=>r(t));return Te(()=>{let i=e&&"current"in e?e.current:e;n(i?.tagName.toLowerCase()||r(t))},[e,t]),o}function Em(e,t,r){let o=E0(r),[n,i]=(0,me.useState)(o);return(0,me.useEffect)(()=>{let a=e&&"current"in e?e.current:e;if(!a)return;let s=()=>{let c=a.getAttribute(t);i(c??o)},l=new MutationObserver(s);return l.observe(a,{attributeFilter:[t]}),s(),()=>l.disconnect()},[e,t,o]),n}function tr(e,t){let r=(0,me.useRef)(!1);(0,me.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,me.useEffect)(()=>()=>{r.current=!1},[])}function Tm(e,t){let r=(0,me.useRef)(!1);Te(()=>{if(r.current)return e();r.current=!0},t),Te(()=>()=>{r.current=!1},[])}function Om(){return(0,me.useReducer)(()=>[],[])}function ke(e){return re(typeof e=="function"?e:()=>e)}function rr(e,t,r=[]){let o=(0,me.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...r,e.wrapElement]);return{...e,wrapElement:o}}function Am(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,me.useMemo)(()=>Object.assign(()=>{},{...o,[t]:r}),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var xm=!1;function Im(){return(0,me.useEffect)(()=>{xm||(er("mousemove",O0,!0),er("mousedown",Ba,!0),er("mouseup",Ba,!0),er("keydown",Ba,!0),er("scroll",Ba,!0),xm=!0)},[]),re(()=>Zu)}var Zu=!1,wm=0,ym=0;function T0(e){let t=e.movementX||e.screenX-wm,r=e.movementY||e.screenY-ym;return wm=e.screenX,ym=e.screenY,t||r||!1}function O0(e){T0(e)&&(Zu=!0)}function Ba(){Zu=!1}var mt=u(ue(),1),Oo=u(P(),1);function pe(e){let t=mt.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function ro(e,t){return mt.memo(e,t)}function xe(e,t){let{wrapElement:r,render:o,...n}=t,i=Ae(t.ref,fm(o)),a;if(mt.isValidElement(o)){let s={...o.props,ref:i};a=mt.cloneElement(o,mm(n,s))}else o?a=o(n):a=(0,Oo.jsx)(e,{...n});return r?r(a):a}function we(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function St(e=[],t=[]){let r=mt.createContext(void 0),o=mt.createContext(void 0),n=()=>mt.useContext(r),i=(c=!1)=>{let f=mt.useContext(o),p=n();return c?f:f||p},a=()=>{let c=mt.useContext(o),f=n();if(!(c&&c===f))return f},s=c=>e.reduceRight((f,p)=>(0,Oo.jsx)(p,{...c,children:f}),(0,Oo.jsx)(r.Provider,{...c}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:a,ContextProvider:s,ScopedContextProvider:c=>(0,Oo.jsx)(s,{...c,children:t.reduceRight((f,p)=>(0,Oo.jsx)(p,{...c,children:f}),(0,Oo.jsx)(o.Provider,{...c}))})}}var Zn=St(),Pm=Zn.useContext,uO=Zn.useScopedContext,cO=Zn.useProviderContext,Rm=Zn.ContextProvider,Vm=Zn.ScopedContextProvider;var Xu=u(ue(),1),Xn=St([Rm],[Vm]),ja=Xn.useContext,pO=Xn.useScopedContext,Nm=Xn.useProviderContext,Jo=Xn.ContextProvider,Ha=Xn.ScopedContextProvider,Dm=(0,Xu.createContext)(void 0),km=(0,Xu.createContext)(void 0);function Mm(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function or(e,t){return t&&e.item(t)||null}function Fm(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function Lm(e,t=!1){if(ft(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=wr(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var Qu=Symbol("FOCUS_SILENTLY");function Bm(e){e[Qu]=!0,e.focus({preventScroll:!0})}function jm(e){let t=e[Qu];return delete e[Qu],t}function Ao(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var za=u(ue(),1),A0="div",Ju=we(function({store:t,shouldRegisterItem:r=!0,getItem:o=qn,element:n,...i}){let a=Pm();t=t||a;let s=Lt(i.id),l=(0,za.useRef)(n);return(0,za.useEffect)(()=>{let c=l.current;if(!s||!c||!r)return;let f=o({id:s,element:c});return t?.renderItem(f)},[s,r,o,t]),i={...i,ref:Ae(l,i.ref)},Ze(i)}),_O=pe(function(t){let r=Ju(t);return xe(A0,r)});var Hm=u(ue(),1),zm=(0,Hm.createContext)(!0);var Wm="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Qn(e){return!(!e.matches(Wm)||!zu(e)||e.closest("[inert]"))}function Gm(e){for(;e&&!Qn(e);)e=e.closest(Wm);return e||null}function Bt(e){let t=Co(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function ec(e){let t=Co(e);if(!t)return!1;if(Jt(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!r||!("id"in e)?!1:r===e.id?!0:!!e.querySelector(`#${CSS.escape(r)}`)}function Um(e){!ec(e)&&Qn(e)&&e.focus()}function Ym(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}var Rt=u(ue(),1),I0="div",qm=Eo(),P0=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],R0=Symbol("safariFocusAncestor");function $m(e,t){e&&(e[R0]=t)}function V0(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?P0.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function N0(e){return"labels"in e?e.labels:null}function Km(e){return e.tagName.toLowerCase()==="input"&&e.type?e.type==="radio"||e.type==="checkbox":!1}function D0(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function k0(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function M0(e,t,r,o,n){return e?t?r&&!o?-1:void 0:r?n:n||0:n}function tc(e,t){return re(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var Zm=!1,rc=!0;function F0(e){let t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(rc=!1))}function L0(e){e.metaKey||e.ctrlKey||e.altKey||(rc=!0)}var Jn=we(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let a=(0,Rt.useRef)(null);(0,Rt.useEffect)(()=>{t&&(Zm||(er("mousedown",F0,!0),er("keydown",L0,!0),Zm=!0))},[t]),qm&&(0,Rt.useEffect)(()=>{if(!t)return;let w=a.current;if(!w||!Km(w))return;let O=N0(w);if(!O)return;let x=()=>queueMicrotask(()=>w.focus());for(let C of O)C.addEventListener("mouseup",x);return()=>{for(let C of O)C.removeEventListener("mouseup",x)}},[t]);let s=t&&So(i),l=!!s&&!r,[c,f]=(0,Rt.useState)(!1);(0,Rt.useEffect)(()=>{t&&l&&c&&f(!1)},[t,l,c]),(0,Rt.useEffect)(()=>{if(!t||!c)return;let w=a.current;if(!w||typeof IntersectionObserver>"u")return;let O=new IntersectionObserver(()=>{Qn(w)||f(!1)});return O.observe(w),()=>O.disconnect()},[t,c]);let p=tc(i.onKeyPressCapture,s),d=tc(i.onMouseDownCapture,s),m=tc(i.onClickCapture,s),v=i.onMouseDown,_=re(w=>{if(v?.(w),w.defaultPrevented||!t)return;let O=w.currentTarget;if(!qm||Fa(w)||!yr(O)&&!Km(O))return;let x=!1,C=()=>{x=!0},F={capture:!0,once:!0};O.addEventListener("focusin",C,F);let D=Gm(O.parentElement);$m(D,!0),to(O,"mouseup",()=>{O.removeEventListener("focusin",C,!0),$m(D,!1),!x&&Um(O)})}),h=(w,O)=>{if(O&&(w.currentTarget=O),!t)return;let x=w.currentTarget;x&&Bt(x)&&(n?.(w),!w.defaultPrevented&&(x.dataset.focusVisible="true",f(!0)))},b=i.onKeyDownCapture,y=re(w=>{if(b?.(w),w.defaultPrevented||!t||c||w.metaKey||w.altKey||w.ctrlKey||!it(w))return;let O=w.currentTarget;to(O,"focusout",()=>h(w,O))}),A=i.onFocusCapture,V=re(w=>{if(A?.(w),w.defaultPrevented||!t)return;if(!it(w)){f(!1);return}let O=w.currentTarget,x=()=>h(w,O);rc||V0(w.target)?to(w.target,"focusout",x):f(!1)}),R=i.onBlur,M=re(w=>{R?.(w),t&&La(w)&&(w.currentTarget.removeAttribute("data-focus-visible"),f(!1))}),k=(0,Rt.useContext)(zm),S=re(w=>{t&&o&&w&&k&&queueMicrotask(()=>{Bt(w)||Qn(w)&&w.focus()})}),I=Cm(a),N=t&&D0(I),g=t&&k0(I),E=i.style,T=(0,Rt.useMemo)(()=>l?{pointerEvents:"none",...E}:E,[l,E]);return i={"data-focus-visible":t&&c||void 0,"data-autofocus":o||void 0,"aria-disabled":s||void 0,...i,ref:Ae(a,S,i.ref),style:T,tabIndex:M0(t,l,N,g,i.tabIndex),disabled:g&&l?!0:void 0,contentEditable:s?void 0:i.contentEditable,onKeyPressCapture:p,onClickCapture:m,onMouseDownCapture:d,onMouseDown:_,onKeyDownCapture:y,onFocusCapture:V,onBlur:M},Ze(i)}),LO=pe(function(t){let r=Jn(t);return xe(I0,r)});var oo=u(ue(),1),B0="button";function Xm(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?yr(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?yr(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var j0=Symbol("command"),oc=we(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,oo.useRef)(null),[i,a]=(0,oo.useState)(!1);(0,oo.useEffect)(()=>{n.current&&a(yr(n.current))},[]);let[s,l]=(0,oo.useState)(!1),c=(0,oo.useRef)(!1),f=So(o),[p,d]=Am(o,j0,!0),m=o.onKeyDown,v=re(b=>{m?.(b);let y=b.currentTarget;if(b.defaultPrevented||p||f||!it(b)||ft(y)||y.isContentEditable)return;let A=t&&b.key==="Enter",V=r&&b.key===" ",R=b.key==="Enter"&&!t,M=b.key===" "&&!r;if(R||M){b.preventDefault();return}if(A||V){let k=Xm(b);if(A){if(!k){b.preventDefault();let{view:S,...I}=b,N=()=>$u(y,I);qu()?to(y,"keyup",N):queueMicrotask(N)}}else V&&(c.current=!0,k||(b.preventDefault(),l(!0)))}}),_=o.onKeyUp,h=re(b=>{if(_?.(b),b.defaultPrevented||p||f||b.metaKey)return;let y=r&&b.key===" ";if(c.current&&y&&(c.current=!1,!Xm(b))){b.preventDefault(),l(!1);let A=b.currentTarget,{view:V,...R}=b;queueMicrotask(()=>$u(A,R))}});return o={"data-active":s||void 0,type:i?"button":void 0,...d,...o,ref:Ae(n,o.ref),onKeyDown:v,onKeyUp:h},o=Jn(o),o}),qO=pe(function(t){let r=oc(t);return xe(B0,r)});function Io(e,t){let r=e.__unstableInternals;return Ke(r,"Invalid store"),r[t]}function pt(e,...t){let r=e,o=r,n=Symbol(),i=Un,a=new Set,s=new Set,l=new Set,c=new Set,f=new Set,p=new WeakMap,d=new WeakMap,m=S=>(l.add(S),()=>l.delete(S)),v=()=>{let S=a.size,I=Symbol();a.add(I);let N=()=>{a.delete(I),!a.size&&i()};if(S)return N;let g=Bu(r).map(w=>Jr(...t.map(O=>{var x;let C=(x=O?.getState)==null?void 0:x.call(O);if(C&&_t(C,w))return Ue(O,[w],F=>{M(w,F[w],!0)})}))),E=[];for(let w of l)E.push(w());let T=t.map(en);return i=Jr(...g,...E,...T),N},_=(S,I,N=c)=>(N.add(I),d.set(I,S),()=>{var g;(g=p.get(I))==null||g(),p.delete(I),d.delete(I),N.delete(I)}),h=(S,I)=>_(S,I),b=(S,I)=>(p.set(I,I(r,r)),_(S,I)),y=(S,I)=>(p.set(I,I(r,o)),_(S,I,f)),A=S=>pt(Lu(r,S),k),V=S=>pt(Fu(r,S),k),R=()=>r,M=(S,I,N=!1)=>{var g;if(!_t(r,S))return;let E=Mu(I,r[S]);if(E===r[S])return;if(!N)for(let x of t)(g=x?.setState)==null||g.call(x,S,E);let T=r;r={...r,[S]:E};let w=Symbol();n=w,s.add(S);let O=(x,C,F)=>{var D;let W=d.get(x),Q=ge=>F?F.has(ge):ge===S;(!W||W.some(Q))&&((D=p.get(x))==null||D(),p.set(x,x(r,C)))};for(let x of c)O(x,T);queueMicrotask(()=>{if(n!==w)return;let x=r;for(let C of f)O(C,o,s);o=x,s.clear()})},k={getState:R,setState:M,__unstableInternals:{setup:m,init:v,subscribe:h,sync:b,batch:y,pick:A,omit:V}};return k}function Ge(e,...t){if(e)return Io(e,"setup")(...t)}function en(e,...t){if(e)return Io(e,"init")(...t)}function tn(e,...t){if(e)return Io(e,"subscribe")(...t)}function Ue(e,...t){if(e)return Io(e,"sync")(...t)}function no(e,...t){if(e)return Io(e,"batch")(...t)}function ei(e,...t){if(e)return Io(e,"omit")(...t)}function nc(e,...t){if(e)return Io(e,"pick")(...t)}function Po(...e){var t;let r={};for(let n of e){let i=(t=n?.getState)==null?void 0:t.call(n);i&&Object.assign(r,i)}let o=pt(r,...e);return Object.assign({},...e,o)}var nr=u(ue(),1),Qm=u(ef(),1),{useSyncExternalStore:Jm}=Qm.default,ep=()=>()=>{};function rn(e,t=qn){let r=nr.useCallback(n=>e?tn(e,null,n):ep(),[e]),o=()=>{let n=typeof t=="string"?t:null,i=typeof t=="function"?t:null,a=e?.getState();if(i)return i(a);if(a&&n&&_t(a,n))return a[n]};return Jm(r,o,o)}function Ga(e,t){let r=nr.useRef({}),o=nr.useCallback(i=>e?tn(e,null,i):ep(),[e]),n=()=>{let i=e?.getState(),a=!1,s=r.current;for(let l in t){let c=t[l];if(typeof c=="function"){let f=c(i);f!==s[l]&&(s[l]=f,a=!0)}if(typeof c=="string"){if(!i||!_t(i,c))continue;let f=i[c];f!==s[l]&&(s[l]=f,a=!0)}}return a&&(r.current={...s}),r.current};return Jm(o,n,n)}function Ie(e,t,r,o){let n=_t(t,r)?t[r]:void 0,i=o?t[o]:void 0,a=_m({value:n,setValue:i});Te(()=>Ue(e,[r],(s,l)=>{let{value:c,setValue:f}=a.current;f&&s[r]!==l[r]&&s[r]!==c&&f(s[r])}),[e,r]),Te(()=>{if(n!==void 0)return e.setState(r,n),no(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function on(e,t){let[r,o]=nr.useState(()=>e(t));Te(()=>en(r),[r]);let n=nr.useCallback(s=>rn(r,s),[r]),i=nr.useMemo(()=>({...r,useState:n}),[r,n]),a=re(()=>{o(s=>e({...t,...s.getState()}))});return[i,a]}var _r=u(ue(),1),rp=u(P(),1),H0="button";function z0(e){return $n(e)?!0:e.tagName==="INPUT"&&!yr(e)}function W0(e,t=!1){let r=e.clientHeight,{top:o}=e.getBoundingClientRect(),n=Math.max(r*.875,r-40)*1.5,i=t?r-n+o:n+o;return e.tagName==="HTML"?i+e.scrollTop:i}function G0(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function tp(e,t,r,o=!1){var n;if(!t||!r)return;let{renderedItems:i}=t.getState(),a=Qo(e);if(!a)return;let s=W0(a,o),l,c;for(let f=0;f<i.length;f+=1){let p=l;if(l=r(f),!l)break;if(l===p)continue;let d=(n=or(t,l))==null?void 0:n.element;if(!d)continue;let v=G0(d,o)-s,_=Math.abs(v);if(o&&v<=0||!o&&v>=0){c!==void 0&&c<_&&(l=p);break}c=_}return l}function U0(e,t){return it(e)?!1:Ao(t,e.target)}var ic=we(function({store:t,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:n=!0,tabbable:i=!1,getItem:a,"aria-setsize":s,"aria-posinset":l,...c}){let f=ja();t=t||f;let p=Lt(c.id),d=(0,_r.useRef)(null),m=(0,_r.useContext)(km),_=So(c)&&!c.accessibleWhenDisabled,{rowId:h,baseElement:b,isActiveItem:y,ariaSetSize:A,ariaPosInSet:V,isTabbable:R}=Ga(t,{rowId(C){if(r)return r;if(C&&m?.baseElement&&m.baseElement===C.baseElement)return m.id},baseElement(C){return C?.baseElement||void 0},isActiveItem(C){return!!C&&C.activeId===p},ariaSetSize(C){if(s!=null)return s;if(C&&m?.ariaSetSize&&m.baseElement===C.baseElement)return m.ariaSetSize},ariaPosInSet(C){if(l!=null)return l;if(!C||!m?.ariaPosInSet||m.baseElement!==C.baseElement)return;let F=C.renderedItems.filter(D=>D.rowId===h);return m.ariaPosInSet+F.findIndex(D=>D.id===p)},isTabbable(C){if(!C?.renderedItems.length)return!0;if(C.virtualFocus)return!1;if(i)return!0;if(C.activeId===null)return!1;let F=t?.item(C.activeId);return F?.disabled||!F?.element?!0:C.activeId===p}}),M=(0,_r.useCallback)(C=>{var F;let D={...C,id:p||C.id,rowId:h,disabled:!!_,children:(F=C.element)==null?void 0:F.textContent};return a?a(D):D},[p,h,_,a]),k=c.onFocus,S=(0,_r.useRef)(!1),I=re(C=>{if(k?.(C),C.defaultPrevented||Fa(C)||!p||!t||U0(C,t))return;let{virtualFocus:F,baseElement:D}=t.getState();if(t.setActiveId(p),$n(C.currentTarget)&&Lm(C.currentTarget),!F||!it(C)||z0(C.currentTarget)||!D?.isConnected)return;Eo()&&C.currentTarget.hasAttribute("data-autofocus")&&C.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),S.current=!0,C.relatedTarget===D||Ao(t,C.relatedTarget)?Bm(D):D.focus()}),N=c.onBlurCapture,g=re(C=>{if(N?.(C),C.defaultPrevented)return;let F=t?.getState();F?.virtualFocus&&S.current&&(S.current=!1,C.preventDefault(),C.stopPropagation())}),E=c.onKeyDown,T=ke(o),w=ke(n),O=re(C=>{if(E?.(C),C.defaultPrevented||!it(C)||!t)return;let{currentTarget:F}=C,D=t.getState(),W=t.item(p),Q=!!W?.rowId,ge=D.orientation!=="horizontal",et=D.orientation!=="vertical",Et=()=>!!(Q||et||!D.baseElement||!ft(D.baseElement)),po={ArrowUp:(Q||ge)&&t.up,ArrowRight:(Q||et)&&t.next,ArrowDown:(Q||ge)&&t.down,ArrowLeft:(Q||et)&&t.previous,Home:()=>{if(Et())return!Q||C.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(Et())return!Q||C.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>tp(F,t,t?.up,!0),PageDown:()=>tp(F,t,t?.down)}[C.key];if(po){if($n(F)){let Ne=Xo(F),tt=et&&C.key==="ArrowLeft",vo=et&&C.key==="ArrowRight",Cn=ge&&C.key==="ArrowUp",En=ge&&C.key==="ArrowDown";if(vo||En){let{length:Tn}=Wu(F);if(Ne.end!==Tn)return}else if((tt||Cn)&&Ne.start!==0)return}let $=po();if(T(C)||$!==void 0){if(!w(C))return;C.preventDefault(),t.move($)}}}),x=(0,_r.useMemo)(()=>({id:p,baseElement:b}),[p,b]);return c=rr(c,C=>(0,rp.jsx)(Dm.Provider,{value:x,children:C}),[x]),c={id:p,"data-active-item":y||void 0,...c,ref:Ae(d,c.ref),tabIndex:R?c.tabIndex:-1,onFocus:I,onBlurCapture:g,onKeyDown:O},c=oc(c),c=Ju({store:t,...c,getItem:M,shouldRegisterItem:p?c.shouldRegisterItem:!1}),Ze({...c,"aria-setsize":A,"aria-posinset":V})}),pA=ro(pe(function(t){let r=ic(t);return xe(H0,r)}));function ac(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function ti(e){let t=[];for(let r of e)t.push(...r);return t}function nn(e){return e.slice().reverse()}var ir=u(ue(),1),np=u(P(),1),Y0="div";function q0(e){return e.some(t=>!!t.rowId)}function $0(e){let t=e.target;return t&&!ft(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function K0(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function op(e,t,r){return re(o=>{var n;if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!it(o)||K0(o)||$0(o))return;let i=e.getState(),a=(n=or(e,i.activeId))==null?void 0:n.element;if(!a)return;let{view:s,...l}=o,c=r?.current;a!==c&&a.focus(),hm(a,o.type,l)||o.preventDefault(),o.currentTarget.contains(a)&&o.stopPropagation()})}function Z0(e){return Mm(ti(nn(Fm(e))))}function X0(e){let[t,r]=(0,ir.useState)(!1),o=(0,ir.useCallback)(()=>r(!0),[]),n=e.useState(i=>or(e,i.activeId));return(0,ir.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),i.focus({preventScroll:!0}))},[n,t]),o}var sc=we(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let a=Nm();t=t||a,Ke(t,!1);let s=(0,ir.useRef)(null),l=(0,ir.useRef)(null),c=X0(t),f=t.useState("moves"),[,p]=Sm(r?t.setBaseElement:null);(0,ir.useEffect)(()=>{var g;if(!t||!f||!r||!o)return;let{activeId:E}=t.getState(),T=(g=or(t,E))==null?void 0:g.element;T&&Ym(T)},[t,f,r,o]),Te(()=>{if(!t||!f||!r)return;let{baseElement:g,activeId:E}=t.getState();if(!(E===null)||!g)return;let w=l.current;l.current=null,w&&To(w,{relatedTarget:g}),Bt(g)||g.focus()},[t,f,r]);let d=t.useState("activeId"),m=t.useState("virtualFocus");Te(()=>{var g;if(!t||!r||!m)return;let E=l.current;if(l.current=null,!E)return;let w=((g=or(t,d))==null?void 0:g.element)||Co(E);w!==E&&To(E,{relatedTarget:w})},[t,d,m,r]);let v=op(t,i.onKeyDownCapture,l),_=op(t,i.onKeyUpCapture,l),h=i.onFocusCapture,b=re(g=>{if(h?.(g),g.defaultPrevented||!t)return;let{virtualFocus:E}=t.getState();if(!E)return;let T=g.relatedTarget,w=jm(g.currentTarget);it(g)&&w&&(g.stopPropagation(),l.current=T)}),y=i.onFocus,A=re(g=>{if(y?.(g),g.defaultPrevented||!r||!t)return;let{relatedTarget:E}=g,{virtualFocus:T}=t.getState();T?it(g)&&!Ao(t,E)&&queueMicrotask(c):it(g)&&t.setActiveId(null)}),V=i.onBlurCapture,R=re(g=>{var E;if(V?.(g),g.defaultPrevented||!t)return;let{virtualFocus:T,activeId:w}=t.getState();if(!T)return;let O=(E=or(t,w))==null?void 0:E.element,x=g.relatedTarget,C=Ao(t,x),F=l.current;l.current=null,it(g)&&C?(x===O?F&&F!==x&&To(F,g):O?To(O,g):F&&To(F,g),g.stopPropagation()):!Ao(t,g.target)&&O&&To(O,g)}),M=i.onKeyDown,k=ke(n),S=re(g=>{var E;if(M?.(g),g.nativeEvent.isComposing||g.defaultPrevented||!t||!it(g))return;let{orientation:T,renderedItems:w,activeId:O}=t.getState(),x=or(t,O);if((E=x?.element)!=null&&E.isConnected)return;let C=T!=="horizontal",F=T!=="vertical",D=q0(w);if((g.key==="ArrowLeft"||g.key==="ArrowRight"||g.key==="Home"||g.key==="End")&&ft(g.currentTarget))return;let et={ArrowUp:(D||C)&&(()=>{if(D){let Et=Z0(w);return Et?.id}return t?.last()}),ArrowRight:(D||F)&&t.first,ArrowDown:(D||C)&&t.first,ArrowLeft:(D||F)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[g.key];if(et){let Et=et();if(Et!==void 0){if(!k(g))return;g.preventDefault(),t.move(Et)}}});i=rr(i,g=>(0,np.jsx)(Jo,{value:t,children:g}),[t]),i={"aria-activedescendant":t.useState(g=>{var E;if(t&&r&&g.virtualFocus)return(E=or(t,g.activeId))==null?void 0:E.id}),...i,ref:Ae(s,p,i.ref),onKeyDownCapture:v,onKeyUpCapture:_,onFocusCapture:b,onFocus:A,onBlurCapture:R,onKeyDown:S};let N=t.useState(g=>r&&(g.virtualFocus||g.activeId===null));return i=Jn({focusable:N,...i}),i}),PA=pe(function(t){let r=sc(t);return xe(Y0,r)});var ri=St(),NA=ri.useContext,DA=ri.useScopedContext,lc=ri.useProviderContext,ip=ri.ContextProvider,ap=ri.ScopedContextProvider;var uc=u(ue(),1),oi=St([ip],[ap]),LA=oi.useContext,BA=oi.useScopedContext,jA=oi.useProviderContext,sp=oi.ContextProvider,Ua=oi.ScopedContextProvider,HA=(0,uc.createContext)(void 0),zA=(0,uc.createContext)(void 0);var an=u(ue(),1),cp=u(Zd(),1),cc=u(P(),1),Q0="div";function lp(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function J0(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function up(...e){return e.join(", ").split(", ").reduce((t,r)=>{let o=r.endsWith("ms")?1:1e3,n=Number.parseFloat(r||"0s")*o;return n>t?n:t},0)}function dc(e,t,r){return!r&&t!==!1&&(!e||!!t)}var ew=we(function({store:t,alwaysVisible:r,...o}){let n=lc();t=t||n,Ke(t,!1);let i=(0,an.useRef)(null),a=Lt(o.id),[s,l]=(0,an.useState)(null),c=t.useState("open"),f=t.useState("mounted"),p=t.useState("animated"),d=t.useState("contentElement"),m=rn(t.disclosure,"contentElement");Te(()=>{i.current&&t?.setContentElement(i.current)},[t]),Te(()=>{let b;return t?.setState("animated",y=>(b=y,!0)),()=>{b!==void 0&&t?.setState("animated",b)}},[t]),Te(()=>{if(p){if(!d?.isConnected){l(null);return}return J0(()=>{l(c?"enter":f?"leave":null)})}},[p,d,c,f]),Te(()=>{if(!t||!p||!s||!d)return;let b=()=>t?.setState("animating",!1),y=()=>(0,cp.flushSync)(b);if(s==="leave"&&c||s==="enter"&&!c)return;if(typeof p=="number")return lp(p,y);let{transitionDuration:A,animationDuration:V,transitionDelay:R,animationDelay:M}=getComputedStyle(d),{transitionDuration:k="0",animationDuration:S="0",transitionDelay:I="0",animationDelay:N="0"}=m?getComputedStyle(m):{},g=up(R,M,I,N),E=up(A,V,k,S),T=g+E;if(!T){s==="enter"&&t.setState("animated",!1),b();return}let w=1e3/60,O=Math.max(T-w,0);return lp(O,y)},[t,p,d,m,c,s]),o=rr(o,b=>(0,cc.jsx)(Ua,{value:t,children:b}),[t]);let v=dc(f,o.hidden,r),_=o.style,h=(0,an.useMemo)(()=>v?{..._,display:"none"}:_,[v,_]);return o={id:a,"data-open":c||void 0,"data-enter":s==="enter"||void 0,"data-leave":s==="leave"||void 0,hidden:v,...o,ref:Ae(a?t.setContentElement:null,i,o.ref),style:h},Ze(o)}),tw=pe(function(t){let r=ew(t);return xe(Q0,r)}),ZA=pe(function({unmountOnHide:t,...r}){let o=lc(),n=r.store||o;return rn(n,a=>!t||a?.mounted)===!1?null:(0,cc.jsx)(tw,{...r})});function dp(e={}){let t=Po(e.store,ei(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=te(e.open,r?.open,e.defaultOpen,!1),n=te(e.animated,r?.animated,!1),i={open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:te(r?.contentElement,null),disclosureElement:te(r?.disclosureElement,null)},a=pt(i,t);return Ge(a,()=>Ue(a,["animated","animating"],s=>{s.animated||a.setState("animating",!1)})),Ge(a,()=>tn(a,["open"],()=>{a.getState().animated&&a.setState("animating",!0)})),Ge(a,()=>Ue(a,["open","animating"],s=>{a.setState("mounted",s.open||s.animating)})),{...a,disclosure:e.disclosure,setOpen:s=>a.setState("open",s),show:()=>a.setState("open",!0),hide:()=>a.setState("open",!1),toggle:()=>a.setState("open",s=>!s),stopAnimation:()=>a.setState("animating",!1),setContentElement:s=>a.setState("contentElement",s),setDisclosureElement:s=>a.setState("disclosureElement",s)}}function fp(e,t,r){return tr(t,[r.store,r.disclosure]),Ie(e,r,"open","setOpen"),Ie(e,r,"mounted","setMounted"),Ie(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var ni=St([sp],[Ua]),aI=ni.useContext,sI=ni.useScopedContext,mp=ni.useProviderContext,pp=ni.ContextProvider,vp=ni.ScopedContextProvider;function rw(e){var t;let r=e.find(i=>!!i.element),o=[...e].reverse().find(i=>!!i.element),n=(t=r?.element)==null?void 0:t.parentElement;for(;n&&o?.element;){if(o&&n.contains(o.element))return n;n=n.parentElement}return wr(n).body}function ow(e){return e?.__unstablePrivateStore}function hp(e={}){var t;e.store;let r=(t=e.store)==null?void 0:t.getState(),o=te(e.items,r?.items,e.defaultItems,[]),n=new Map(o.map(d=>[d.id,d])),i={items:o,renderedItems:te(r?.renderedItems,[])},a=ow(e.store),s=pt({items:o,renderedItems:i.renderedItems},a),l=pt(i,e.store),c=d=>{let m=Uu(d,v=>v.element);s.setState("renderedItems",m),l.setState("renderedItems",m)};Ge(l,()=>en(s)),Ge(s,()=>no(s,["items"],d=>{l.setState("items",d.items)})),Ge(s,()=>no(s,["renderedItems"],d=>{let m=!0,v=requestAnimationFrame(()=>{let{renderedItems:y}=l.getState();d.renderedItems!==y&&c(d.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(v);let _=()=>{if(m){m=!1;return}cancelAnimationFrame(v),v=requestAnimationFrame(()=>c(d.renderedItems))},h=rw(d.renderedItems),b=new IntersectionObserver(_,{root:h});for(let y of d.renderedItems)y.element&&b.observe(y.element);return()=>{cancelAnimationFrame(v),b.disconnect()}}));let f=(d,m,v=!1)=>{let _;return m(b=>{let y=b.findIndex(({id:V})=>V===d.id),A=b.slice();if(y!==-1){_=b[y];let V={..._,...d};A[y]=V,n.set(d.id,V)}else A.push(d),n.set(d.id,d);return A}),()=>{m(b=>{if(!_)return v&&n.delete(d.id),b.filter(({id:V})=>V!==d.id);let y=b.findIndex(({id:V})=>V===d.id);if(y===-1)return b;let A=b.slice();return A[y]=_,n.set(d.id,_),A})}},p=d=>f(d,m=>s.setState("items",m),!0);return{...l,registerItem:p,renderItem:d=>Jr(p(d),f(d,m=>s.setState("renderedItems",m))),item:d=>{if(!d)return null;let m=n.get(d);if(!m){let{items:v}=s.getState();m=v.find(_=>_.id===d),m&&n.set(d,m)}return m||null},__unstablePrivateStore:s}}function gp(e,t,r){return tr(t,[r.store]),Ie(e,r,"items","setItems"),e}var nw={id:null};function Sr(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function iw(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function bp(e,t){return e.filter(r=>r.rowId===t)}function aw(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[nw]:[],...e.slice(0,o)]}function xp(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function wp(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function sw(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function lw(e,t,r){let o=wp(e);for(let n of e)for(let i=0;i<o;i+=1){let a=n[i];if(!a||r&&a.disabled){let l=i===0&&r?Sr(n):n[i-1];n[i]=l&&t!==l.id&&r?l:sw(l?.rowId)}}return e}function uw(e){let t=xp(e),r=wp(t),o=[];for(let n=0;n<r;n+=1)for(let i of t){let a=i[n];a&&o.push({...a,rowId:a.rowId?`${n}`:void 0})}return o}function yp(e={}){var t;let r=(t=e.store)==null?void 0:t.getState(),o=hp(e),n=te(e.activeId,r?.activeId,e.defaultActiveId),i={...o.getState(),id:te(e.id,r?.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:n,baseElement:te(r?.baseElement,null),includesBaseElement:te(e.includesBaseElement,r?.includesBaseElement,n===null),moves:te(r?.moves,0),orientation:te(e.orientation,r?.orientation,"both"),rtl:te(e.rtl,r?.rtl,!1),virtualFocus:te(e.virtualFocus,r?.virtualFocus,!1),focusLoop:te(e.focusLoop,r?.focusLoop,!1),focusWrap:te(e.focusWrap,r?.focusWrap,!1),focusShift:te(e.focusShift,r?.focusShift,!1)},a=pt(i,o,e.store);Ge(a,()=>Ue(a,["renderedItems","activeId"],l=>{a.setState("activeId",c=>{var f;return c!==void 0?c:(f=Sr(l.renderedItems))==null?void 0:f.id})}));let s=(l="next",c={})=>{var f,p;let d=a.getState(),{skip:m=0,activeId:v=d.activeId,focusShift:_=d.focusShift,focusLoop:h=d.focusLoop,focusWrap:b=d.focusWrap,includesBaseElement:y=d.includesBaseElement,renderedItems:A=d.renderedItems,rtl:V=d.rtl}=c,R=l==="up"||l==="down",M=l==="next"||l==="down",k=M?V&&!R:!V||R,S=_&&!m,I=R?ti(lw(xp(A),v,S)):A;if(I=k?nn(I):I,I=R?uw(I):I,v==null)return(f=Sr(I))==null?void 0:f.id;let N=I.find(D=>D.id===v);if(!N)return(p=Sr(I))==null?void 0:p.id;let g=I.some(D=>D.rowId),E=I.indexOf(N),T=I.slice(E+1),w=bp(T,N.rowId);if(m){let D=iw(w,v),W=D.slice(m)[0]||D[D.length-1];return W?.id}let O=h&&(R?h!=="horizontal":h!=="vertical"),x=g&&b&&(R?b!=="horizontal":b!=="vertical"),C=M?(!g||R)&&O&&y:R?y:!1;if(O){let D=x&&!C?I:bp(I,N.rowId),W=aw(D,v,C),Q=Sr(W,v);return Q?.id}if(x){let D=Sr(C?w:T,v);return C?D?.id||null:D?.id}let F=Sr(w,v);return!F&&C?null:F?.id};return{...o,...a,setBaseElement:l=>a.setState("baseElement",l),setActiveId:l=>a.setState("activeId",l),move:l=>{l!==void 0&&(a.setState("activeId",l),a.setState("moves",c=>c+1))},first:()=>{var l;return(l=Sr(a.getState().renderedItems))==null?void 0:l.id},last:()=>{var l;return(l=Sr(nn(a.getState().renderedItems)))==null?void 0:l.id},next:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("next",l)),previous:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("previous",l)),down:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("down",l)),up:l=>(l!==void 0&&typeof l=="number"&&(l={skip:l}),s("up",l))}}function _p(e){return{id:Lt(e.id),...e}}function Sp(e,t,r){return e=gp(e,t,r),Ie(e,r,"activeId","setActiveId"),Ie(e,r,"includesBaseElement"),Ie(e,r,"virtualFocus"),Ie(e,r,"orientation"),Ie(e,r,"rtl"),Ie(e,r,"focusLoop"),Ie(e,r,"focusWrap"),Ie(e,r,"focusShift"),e}var Ya=u(ue(),1),qa=(0,Ya.createContext)(void 0),ii=St([pp,Jo],[vp,Ha]),fc=ii.useContext,sn=ii.useScopedContext,$a=ii.useProviderContext,Cp=ii.ContextProvider,Ep=ii.ScopedContextProvider,Ka=(0,Ya.createContext)(void 0),Tp=(0,Ya.createContext)(!1);function Op(e={}){return dp(e)}function Ap(e,t,r){return fp(e,t,r)}function Ip({popover:e,...t}={}){let r=Po(t.store,ei(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=Op({...t,store:r}),i=te(t.placement,o?.placement,"bottom"),a={...n.getState(),placement:i,currentPlacement:i,anchorElement:te(o?.anchorElement,null),popoverElement:te(o?.popoverElement,null),arrowElement:te(o?.arrowElement,null),rendered:Symbol("rendered")},s=pt(a,n,r);return{...n,...s,setAnchorElement:l=>s.setState("anchorElement",l),setPopoverElement:l=>s.setState("popoverElement",l),setArrowElement:l=>s.setState("arrowElement",l),render:()=>s.setState("rendered",Symbol("rendered"))}}function Pp(e,t,r){return tr(t,[r.popover]),Ie(e,r,"placement"),Ap(e,t,r)}var cw="div",mc=we(function({store:t,...r}){let o=mp();return t=t||o,r={...r,ref:Ae(t?.setAnchorElement,r.ref)},r}),GI=pe(function(t){let r=mc(t);return xe(cw,r)});var Rp=u(ue(),1),dw="div";function Vp(e){let t=e.relatedTarget;return t?.nodeType===Node.ELEMENT_NODE?t:null}function fw(e){let t=Vp(e);return t?Jt(e.currentTarget,t):!1}var pc=Symbol("composite-hover");function mw(e){let t=Vp(e);if(!t)return!1;do{if(_t(t,pc)&&t[pc])return!0;t=t.parentElement}while(t);return!1}var vc=we(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=ja();t=t||i,Ke(t,!1);let a=Im(),s=n.onMouseMove,l=ke(r),c=re(v=>{if(s?.(v),!v.defaultPrevented&&a()&&l(v)){if(!ec(v.currentTarget)){let _=t?.getState().baseElement;_&&!Bt(_)&&_.focus()}t?.setActiveId(v.currentTarget.id)}}),f=n.onMouseLeave,p=ke(o),d=re(v=>{var _;f?.(v),!v.defaultPrevented&&a()&&(fw(v)||mw(v)||l(v)&&p(v)&&(t?.setActiveId(null),(_=t?.getState().baseElement)==null||_.focus()))}),m=(0,Rp.useCallback)(v=>{v&&(v[pc]=!0)},[]);return n={...n,ref:Ae(m,n.ref),onMouseMove:c,onMouseLeave:d},Ze(n)}),QI=ro(pe(function(t){let r=vc(t);return xe(dw,r)}));var Xe=u(ue(),1),pw="input";function Np(e,t,r){if(!r)return!1;let o=e.find(n=>!n.disabled&&n.value);return o?.value===t}function Dp(e,t){return!t||e==null?!1:(e=Yn(e),t.length>e.length&&t.toLowerCase().indexOf(e.toLowerCase())===0)}function vw(e){return e.type==="input"}function hw(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function gw(e){let t=e.find(r=>{var o;return r.disabled?!1:((o=r.element)==null?void 0:o.getAttribute("role"))!=="tab"});return t?.id}var bw=we(function({store:t,focusable:r=!0,autoSelect:o=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:a=0,showOnChange:s,showOnMouseDown:l,showOnClick:c=l,showOnKeyDown:f,showOnKeyPress:p=f,blurActiveItemOnClick:d,setValueOnClick:m=!0,moveOnKeyPress:v=!0,autoComplete:_="list",...h}){let b=$a();t=t||b,Ke(t,!1);let y=(0,Xe.useRef)(null),[A,V]=Om(),R=(0,Xe.useRef)(!1),M=(0,Xe.useRef)(!1),k=t.useState(B=>B.virtualFocus&&o),S=_==="inline"||_==="both",[I,N]=(0,Xe.useState)(S);Tm(()=>{S&&N(!0)},[S]);let g=t.useState("value"),E=(0,Xe.useRef)(void 0);(0,Xe.useEffect)(()=>Ue(t,["selectedValue","activeId"],(B,se)=>{E.current=se.selectedValue}),[]);let T=t.useState(B=>{var se;if(S&&I&&!(B.activeValue&&Array.isArray(B.selectedValue)&&(B.selectedValue.includes(B.activeValue)||(se=E.current)!=null&&se.includes(B.activeValue))))return B.activeValue}),w=t.useState("renderedItems"),O=t.useState("open"),x=t.useState("contentElement"),C=(0,Xe.useMemo)(()=>{if(!S||!I)return g;if(Np(w,T,k)){if(Dp(g,T)){let se=T?.slice(g.length)||"";return g+se}return g}return T||g},[S,I,w,T,k,g]);(0,Xe.useEffect)(()=>{let B=y.current;if(!B)return;let se=()=>N(!0);return B.addEventListener("combobox-item-move",se),()=>{B.removeEventListener("combobox-item-move",se)}},[]),(0,Xe.useEffect)(()=>{if(!S||!I||!T||!Np(w,T,k)||!Dp(g,T))return;let se=Un;return queueMicrotask(()=>{let Be=y.current;if(!Be)return;let{start:je,end:Dt}=Xo(Be),vr=g.length,rt=T.length;Kn(Be,vr,rt),se=()=>{if(!Bt(Be))return;let{start:ho,end:Xb}=Xo(Be);ho===vr&&Xb===rt&&Kn(Be,je,Dt)}}),()=>se()},[A,S,I,T,w,k,g]);let F=(0,Xe.useRef)(null),D=re(n),W=(0,Xe.useRef)(null);(0,Xe.useEffect)(()=>{if(!O||!x)return;let B=Qo(x);if(!B)return;F.current=B;let se=()=>{R.current=!1},Be=()=>{if(!t||!R.current)return;let{activeId:Dt}=t.getState();Dt!==null&&Dt!==W.current&&(R.current=!1)},je={passive:!0,capture:!0};return B.addEventListener("wheel",se,je),B.addEventListener("touchmove",se,je),B.addEventListener("scroll",Be,je),()=>{B.removeEventListener("wheel",se,!0),B.removeEventListener("touchmove",se,!0),B.removeEventListener("scroll",Be,!0)}},[O,x,t]),Te(()=>{g&&(M.current||(R.current=!0))},[g]),Te(()=>{k!=="always"&&O||(R.current=O)},[k,O]);let Q=t.useState("resetValueOnSelect");tr(()=>{var B,se;let Be=R.current;if(!t||!O||!Be&&!Q)return;let{baseElement:je,contentElement:Dt,activeId:vr}=t.getState();if(!(je&&!Bt(je))){if(Dt?.hasAttribute("data-placing")){let rt=new MutationObserver(V);return rt.observe(Dt,{attributeFilter:["data-placing"]}),()=>rt.disconnect()}if(k&&Be){let rt=D(w),ho=rt!==void 0?rt:(B=gw(w))!=null?B:t.first();W.current=ho,t.move(ho??null)}else{let rt=(se=t.item(vr||t.first()))==null?void 0:se.element;rt&&"scrollIntoView"in rt&&rt.scrollIntoView({block:"nearest",inline:"nearest"})}}},[t,O,A,g,k,Q,D,w]),(0,Xe.useEffect)(()=>{if(!S)return;let B=y.current;if(!B)return;let se=[B,x].filter(je=>!!je),Be=je=>{se.every(Dt=>La(je,Dt))&&t?.setValue(C)};for(let je of se)je.addEventListener("focusout",Be);return()=>{for(let je of se)je.removeEventListener("focusout",Be)}},[S,x,t,C]);let ge=B=>B.currentTarget.value.length>=a,et=h.onChange,Et=ke(s??ge),Dr=ke(i??!t.tag),po=re(B=>{if(et?.(B),B.defaultPrevented||!t)return;let se=B.currentTarget,{value:Be,selectionStart:je,selectionEnd:Dt}=se,vr=B.nativeEvent;if(R.current=!0,vw(vr)&&(vr.isComposing&&(R.current=!1,M.current=!0),S)){let rt=vr.inputType==="insertText"||vr.inputType==="insertCompositionText",ho=je===Be.length;N(rt&&ho)}if(Dr(B)){let rt=Be===t.getState().value;t.setValue(Be),queueMicrotask(()=>{Kn(se,je,Dt)}),S&&k&&rt&&V()}Et(B)&&t.show(),(!k||!R.current)&&t.setActiveId(null)}),$=h.onCompositionEnd,Ne=re(B=>{R.current=!0,M.current=!1,$?.(B),!B.defaultPrevented&&k&&V()}),tt=h.onMouseDown,vo=ke(d??(()=>!!t?.getState().includesBaseElement)),Cn=ke(m),En=ke(c??ge),Tn=re(B=>{tt?.(B),!B.defaultPrevented&&(B.button||B.ctrlKey||t&&(vo(B)&&t.setActiveId(null),Cn(B)&&t.setValue(C),En(B)&&to(B.currentTarget,"mouseup",t.show)))}),Si=h.onKeyDown,On=ke(p??ge),sl=re(B=>{if(Si?.(B),B.repeat||(R.current=!1),B.defaultPrevented||B.ctrlKey||B.altKey||B.shiftKey||B.metaKey||!t)return;let{open:se}=t.getState();se||(B.key==="ArrowUp"||B.key==="ArrowDown")&&On(B)&&(B.preventDefault(),t.show())}),fd=h.onBlur,qb=re(B=>{R.current=!1,fd?.(B),B.defaultPrevented}),$b=Lt(h.id),Kb=hw(_)?_:void 0,Zb=t.useState(B=>B.activeId===null);return h={id:$b,role:"combobox","aria-autocomplete":Kb,"aria-haspopup":Gu(x,"listbox"),"aria-expanded":O,"aria-controls":x?.id,"data-active-item":Zb||void 0,value:C,...h,ref:Ae(y,h.ref),onChange:po,onCompositionEnd:Ne,onMouseDown:Tn,onKeyDown:sl,onBlur:qb},h=sc({store:t,focusable:r,...h,moveOnKeyPress:B=>ju(v,B)?!1:(S&&N(!0),!0)}),h=mc({store:t,...h}),{autoComplete:"off",...h}}),Za=pe(function(t){let r=bw(t);return xe(pw,r)});var Xa=u(ue(),1),hc=u(P(),1),xw="div";function ww(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function yw(e){var t;return(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])!=null?t:"option"}var kp=we(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:a,focusOnHover:s=!1,moveOnKeyPress:l=!0,getItem:c,...f}){var p;let d=sn();t=t||d,Ke(t,!1);let{resetValueOnSelectState:m,multiSelectable:v,selected:_}=Ga(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(g){return Array.isArray(g.selectedValue)},selected(g){return ww(g.selectedValue,r)}}),h=(0,Xa.useCallback)(g=>{let E={...g,value:r};return c?c(E):E},[r,c]);n=n??!v,o=o??(r!=null&&!v);let b=f.onClick,y=ke(n),A=ke(i),V=ke((p=a??m)!=null?p:v),R=ke(o),M=re(g=>{b?.(g),!g.defaultPrevented&&(vm(g)||pm(g)||(r!=null&&(A(g)&&(V(g)&&t?.resetValue(),t?.setSelectedValue(E=>Array.isArray(E)?E.includes(r)?E.filter(T=>T!==r):[...E,r]:r)),y(g)&&t?.setValue(r)),R(g)&&t?.hide()))}),k=f.onKeyDown,S=re(g=>{if(k?.(g),g.defaultPrevented)return;let E=t?.getState().baseElement;if(!E||Bt(E))return;(g.key.length===1||g.key==="Backspace"||g.key==="Delete")&&(queueMicrotask(()=>E.focus()),ft(E)&&t?.setValue(E.value))});v&&_!=null&&(f={"aria-selected":_,...f}),f=rr(f,g=>(0,hc.jsx)(Ka.Provider,{value:r,children:(0,hc.jsx)(Tp.Provider,{value:_??!1,children:g})}),[r,_]);let I=(0,Xa.useContext)(qa);f={role:yw(I),children:r,...f,onClick:M,onKeyDown:S};let N=ke(l);return f=ic({store:t,...f,getItem:h,moveOnKeyPress:g=>{if(!N(g))return!1;let E=new Event("combobox-item-move"),T=t?.getState().baseElement;return T?.dispatchEvent(E),!0}}),f=vc({store:t,focusOnHover:s,...f}),f}),ai=ro(pe(function(t){let r=kp(t);return xe(xw,r)}));var Qa=u(ue(),1),Fp=u(P(),1),_w="span";function Mp(e){return Yn(e).toLowerCase()}function Sw(e,t){let r=[];for(let o of t){let n=0,i=o.length;for(;e.indexOf(o,n)!==-1;){let a=e.indexOf(o,n);a!==-1&&r.push([a,i]),n=a+1}}return r}function Cw(e){return e.filter(([t,r],o,n)=>!n.some(([i,a],s)=>s!==o&&i<=t&&i+a>=t+r))}function Ew(e){return e.sort(([t],[r])=>t-r)}function Tw(e,t){if(!e||!t)return e;let r=ac(t).filter(Boolean).map(Mp),o=[],n=(l,c=!1)=>(0,Fp.jsx)("span",{"data-autocomplete-value":c?"":void 0,"data-user-value":c?void 0:"",children:l},o.length),i=Ew(Cw(Sw(Mp(e),new Set(r))));if(!i.length)return o.push(n(e,!0)),o;let[a]=i[0];return[e.slice(0,a),...i.flatMap(([l,c],f)=>{var p;let d=e.slice(l,l+c),m=(p=i[f+1])==null?void 0:p[0],v=e.slice(l+c,m);return[d,v]})].forEach((l,c)=>{l&&o.push(n(l,c%2===0))}),o}var Ow=we(function({store:t,value:r,userValue:o,...n}){let i=sn();t=t||i;let a=(0,Qa.useContext)(Ka),s=r??a,l=rn(t,f=>o??f?.value);return n={children:(0,Qa.useMemo)(()=>{if(s)return l?Tw(s,l):s},[s,l]),...n},Ze(n)}),Ja=pe(function(t){let r=Ow(t);return xe(_w,r)});var Aw="label",Iw=we(function({store:t,...r}){let o=$a();return t=t||o,Ke(t,!1),r={htmlFor:t.useState(i=>{var a;return(a=i.baseElement)==null?void 0:a.id}),...r},Ze(r)}),es=ro(pe(function(t){let r=Iw(t);return xe(Aw,r)}));var ts=u(ue(),1),gc=u(P(),1),Pw="div",Lp=we(function({store:t,alwaysVisible:r,...o}){let n=sn(!0),i=fc();t=t||i;let a=!!t&&t===n;Ke(t,!1);let s=(0,ts.useRef)(null),l=Lt(o.id),c=t.useState("mounted"),f=dc(c,o.hidden,r),p=f?{...o.style,display:"none"}:o.style,d=t.useState(V=>Array.isArray(V.selectedValue)),m=Em(s,"role",o.role),_=(m==="listbox"||m==="tree"||m==="grid")&&d||void 0,[h,b]=(0,ts.useState)(!1),y=t.useState("contentElement");Te(()=>{if(!c)return;let V=s.current;if(!V||y!==V)return;let R=()=>{b(!!V.querySelector("[role='listbox']"))},M=new MutationObserver(R);return M.observe(V,{subtree:!0,childList:!0,attributeFilter:["role"]}),R(),()=>M.disconnect()},[c,y]),h||(o={role:"listbox","aria-multiselectable":_,...o}),o=rr(o,V=>(0,gc.jsx)(Ep,{value:t,children:(0,gc.jsx)(qa.Provider,{value:m,children:V})}),[t,m]);let A=l&&(!n||!a)?t.setContentElement:null;return o={id:l,hidden:f,...o,ref:Ae(A,s,o.ref),style:p},Ze(o)}),si=pe(function(t){let r=Lp(t);return xe(Pw,r)});var bc=u(ue(),1),GP=(0,bc.createContext)(null),UP=(0,bc.createContext)(null),li=St([Jo],[Ha]),Bp=li.useContext,YP=li.useScopedContext,qP=li.useProviderContext,$P=li.ContextProvider,KP=li.ScopedContextProvider;var Rw=Eo()&&Yu();function jp({tag:e,...t}={}){let r=Po(t.store,nc(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=te(t.activeId,n?.activeId,t.defaultActiveId,null),a=yp({...t,activeId:i,includesBaseElement:te(t.includesBaseElement,n?.includesBaseElement,!0),orientation:te(t.orientation,n?.orientation,"vertical"),focusLoop:te(t.focusLoop,n?.focusLoop,!0),focusWrap:te(t.focusWrap,n?.focusWrap,!0),virtualFocus:te(t.virtualFocus,n?.virtualFocus,!0)}),s=Ip({...t,placement:te(t.placement,n?.placement,"bottom-start")}),l=te(t.value,n?.value,t.defaultValue,""),c=te(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),f=Array.isArray(c),p={...a.getState(),...s.getState(),value:l,selectedValue:c,resetValueOnSelect:te(t.resetValueOnSelect,n?.resetValueOnSelect,f),resetValueOnHide:te(t.resetValueOnHide,n?.resetValueOnHide,f&&!e),activeValue:n?.activeValue},d=pt(p,a,s,r);return Rw&&Ge(d,()=>Ue(d,["virtualFocus"],()=>{d.setState("virtualFocus",!1)})),Ge(d,()=>{if(e)return Jr(Ue(d,["selectedValue"],m=>{Array.isArray(m.selectedValue)&&e.setValues(m.selectedValue)}),Ue(e,["values"],m=>{d.setState("selectedValue",m.values)}))}),Ge(d,()=>Ue(d,["resetValueOnHide","mounted"],m=>{m.resetValueOnHide&&(m.mounted||d.setState("value",l))})),Ge(d,()=>Ue(d,["open"],m=>{m.open||(d.setState("activeId",i),d.setState("moves",0))})),Ge(d,()=>Ue(d,["moves","activeId"],(m,v)=>{m.moves===v.moves&&d.setState("activeValue",void 0)})),Ge(d,()=>no(d,["moves","renderedItems"],(m,v)=>{if(m.moves===v.moves)return;let{activeId:_}=d.getState(),h=a.item(_);d.setState("activeValue",h?.value)})),{...s,...a,...d,tag:e,setValue:m=>d.setState("value",m),resetValue:()=>d.setState("value",p.value),setSelectedValue:m=>d.setState("selectedValue",m)}}function Nw(e){let t=Bp();return e={...e,tag:e.tag!==void 0?e.tag:t},_p(e)}function Dw(e,t,r){return tr(t,[r.tag]),Ie(e,r,"value","setValue"),Ie(e,r,"selectedValue","setSelectedValue"),Ie(e,r,"resetValueOnHide"),Ie(e,r,"resetValueOnSelect"),Object.assign(Sp(Pp(e,t,r),t,r),{tag:r.tag})}function xc(e={}){e=Nw(e);let[t,r]=on(jp,e);return Dw(t,r,e)}var Hp=u(P(),1);function rs(e={}){let t=xc(e);return(0,Hp.jsx)(Cp,{value:t,children:e.children})}var Kp=u(Up(),1);var Zp=u(bt(),1),Cr=u(j(),1),Ro=u(z(),1),jt=u(G(),1);var jw=[],ui=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:jw;var ci=u(z(),1),Hw=[];function Ye({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:Hw,[o,n]=(0,ci.useState)(r),[i,a]=(0,ci.useState)(!1);return(0,ci.useEffect)(()=>{if(!t){n(r);return}let s=!1;return a(!0),t().then(l=>{if(!s){let c=Array.isArray(l)&&l.length>0?l:r;n(c)}}).catch(()=>{s||n(r)}).finally(()=>{s||a(!1)}),()=>{s=!0}},[t,r]),{elements:o,isLoading:i}}var ne=u(P(),1);function Yp(e=""){return(0,Kp.default)(e.trim().toLowerCase())}var qp=(e,t,r)=>e.singleSelection?r:Array.isArray(t?.value)?t.value.includes(r)?t.value.filter(o=>o!==r):[...t.value,r]:[r];function $p(e,t){return`${e}-${t}`}var Xp=({selected:e})=>(0,ne.jsx)("span",{className:Y("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,ne.jsx)(jt.Icon,{icon:Rn})}),Qp=({selected:e})=>(0,ne.jsx)("span",{className:Y("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function Jp({view:e,filter:t,onChangeView:r}){let o=(0,Zp.useInstanceId)(Jp,"dataviews-filter-list-box"),[n,i]=(0,Ro.useState)(t.operators?.length===1?void 0:null),a=e.filters?.find(l=>l.field===t.field),s=ui(t,a);return(0,ne.jsx)(jt.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,Cr.sprintf)((0,Cr.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i($p(o,t.elements[0].value))},render:(0,ne.jsx)(jt.Composite.Typeahead,{}),children:t.elements.map(l=>(0,ne.jsxs)(jt.Composite.Hover,{render:(0,ne.jsx)(jt.Composite.Item,{id:$p(o,l.value),render:(0,ne.jsx)("div",{"aria-label":l.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{let c=a?[...(e.filters??[]).map(f=>f.field===t.field?{...f,operator:a.operator||t.operators[0],value:qp(t,a,l.value)}:f)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:qp(t,a,l.value)}];r({...e,page:1,filters:c})}}),children:[t.singleSelection&&(0,ne.jsx)(Qp,{selected:s===l.value}),!t.singleSelection&&(0,ne.jsx)(Xp,{selected:s.includes(l.value)}),(0,ne.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:l.label,children:l.label})]},l.value))})}function zw({view:e,filter:t,onChangeView:r}){let[o,n]=(0,Ro.useState)(""),i=(0,Ro.useDeferredValue)(o),a=e.filters?.find(c=>c.field===t.field),s=ui(t,a),l=(0,Ro.useMemo)(()=>{let c=Yp(i);return t.elements.filter(f=>Yp(f.label).includes(c))},[t.elements,i]);return(0,ne.jsxs)(rs,{selectedValue:s,setSelectedValue:c=>{let f=a?[...(e.filters??[]).map(p=>p.field===t.field?{...p,operator:a.operator||t.operators[0],value:c}:p)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:c}];r({...e,page:1,filters:f})},setValue:n,children:[(0,ne.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,ne.jsx)(es,{render:(0,ne.jsx)(jt.VisuallyHidden,{children:(0,Cr.__)("Search items")}),children:(0,Cr.__)("Search items")}),(0,ne.jsx)(Za,{autoSelect:"always",placeholder:(0,Cr.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,ne.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,ne.jsx)(jt.Icon,{icon:Ql})})]}),(0,ne.jsxs)(si,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[l.map(c=>(0,ne.jsxs)(ai,{resetValueOnSelect:!1,value:c.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,ne.jsx)(Qp,{selected:s===c.value}),!t.singleSelection&&(0,ne.jsx)(Xp,{selected:s.includes(c.value)}),(0,ne.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:[(0,ne.jsx)(Ja,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:c.label}),!!c.description&&(0,ne.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:c.description})]})]},c.value)),!l.length&&(0,ne.jsx)("p",{children:(0,Cr.__)("No results found")})]})]})}function ev(e){let{elements:t,isLoading:r}=Ye({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,ne.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,ne.jsx)(jt.Spinner,{})});if(t.length===0)return(0,ne.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,Cr.__)("No elements found")});let o=t.length>10?zw:Jp;return(0,ne.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var ov=u(rv(),1),nv=u(bt(),1),wc=u(z(),1),iv=u(G(),1);var yc=u(P(),1);function av({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(c=>c.field===e.field),i=ui(e,n),a=(0,wc.useMemo)(()=>{let c=o.find(f=>f.id===e.field);return c&&{...c,isValid:{},getValue:({item:f})=>f[c.id],setValue:({value:f})=>({[c.id]:f})}},[o,e.field]),s=(0,wc.useMemo)(()=>(t.filters??[]).reduce((c,f)=>(c[f.field]=f.value,c),{}),[t.filters]),l=(0,nv.useEvent)(c=>{if(!a||!n)return;let f=a.getValue({item:c});(0,ov.default)(f,i)||r({...t,filters:(t.filters??[]).map(p=>p.field===e.field?{...p,operator:n.operator||e.operators[0],value:f===""?void 0:f}:p)})});return!a||!a.Edit||!n?null:(0,yc.jsx)(iv.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,yc.jsx)(a.Edit,{hideLabelFromVision:!0,data:s,field:a,operator:n.operator,onChange:l})})}var Ww=Math.pow(10,8)*24*60*60*1e3,BR=-Ww,ns=6048e5,sv=864e5;var Gw=3600;var lv=Gw*24,jR=lv*7,Uw=lv*365.2425,Yw=Uw/12,HR=Yw*3,_c=Symbol.for("constructDateFrom");function He(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&_c in e?e[_c](t):e instanceof Date?new e.constructor(t):new Date(t)}function fe(e,t){return He(t||e,e)}function is(e,t,r){let o=fe(e,r?.in);return isNaN(t)?He(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function as(e,t,r){let o=fe(e,r?.in);if(isNaN(t))return He(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=He(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let a=i.getDate();return n>=a?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var qw={};function io(){return qw}function Er(e,t){let r=io(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=fe(e,t?.in),i=n.getDay(),a=(i<o?7:0)+i-o;return n.setDate(n.getDate()-a),n.setHours(0,0,0,0),n}function Vo(e,t){return Er(e,{...t,weekStartsOn:1})}function ss(e,t){let r=fe(e,t?.in),o=r.getFullYear(),n=He(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=Vo(n),a=He(r,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let s=Vo(a);return r.getTime()>=i.getTime()?o+1:r.getTime()>=s.getTime()?o:o-1}function Sc(e){let t=fe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function uv(e,...t){let r=He.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function Cc(e,t){let r=fe(e,t?.in);return r.setHours(0,0,0,0),r}function cv(e,t,r){let[o,n]=uv(r?.in,e,t),i=Cc(o),a=Cc(n),s=+i-Sc(i),l=+a-Sc(a);return Math.round((s-l)/sv)}function dv(e,t){let r=ss(e,t),o=He(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Vo(o)}function fv(e,t,r){return is(e,t*7,r)}function mv(e,t,r){return as(e,t*12,r)}function pv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ln(e){return!(!pv(e)&&typeof e!="number"||isNaN(+fe(e)))}function vv(e,t){let r=fe(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function ls(e,t){let r=fe(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var $w={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"}},hv=(e,t,r)=>{let o,n=$w[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function us(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Kw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gv={date:us({formats:Kw,defaultWidth:"full"}),time:us({formats:Zw,defaultWidth:"full"}),dateTime:us({formats:Xw,defaultWidth:"full"})};var Qw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bv=(e,t,r,o)=>Qw[e];function un(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):a;n=e.formattingValues[s]||e.formattingValues[a]}else{let a=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[a]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var Jw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ey={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ty={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"]},ry={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"]},oy={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"}},ny={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"}},iy=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},xv={ordinalNumber:iy,era:un({values:Jw,defaultWidth:"wide"}),quarter:un({values:ey,defaultWidth:"wide",argumentCallback:e=>e-1}),month:un({values:ty,defaultWidth:"wide"}),day:un({values:ry,defaultWidth:"wide"}),dayPeriod:un({values:oy,defaultWidth:"wide",formattingValues:ny,defaultFormattingWidth:"wide"})};function cn(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let a=i[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?sy(s,p=>p.test(a)):ay(s,p=>p.test(a)),c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;let f=t.slice(a.length);return{value:c,rest:f}}}function ay(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function sy(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function wv(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;let s=t.slice(n.length);return{value:a,rest:s}}}var ly=/^(\d+)(th|st|nd|rd)?/i,uy=/\d+/i,cy={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},dy={any:[/^b/i,/^(a|c)/i]},fy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},my={any:[/1/i,/2/i,/3/i,/4/i]},py={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},vy={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]},hy={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},gy={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]},by={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},xy={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}},yv={ordinalNumber:wv({matchPattern:ly,parsePattern:uy,valueCallback:e=>parseInt(e,10)}),era:cn({matchPatterns:cy,defaultMatchWidth:"wide",parsePatterns:dy,defaultParseWidth:"any"}),quarter:cn({matchPatterns:fy,defaultMatchWidth:"wide",parsePatterns:my,defaultParseWidth:"any",valueCallback:e=>e+1}),month:cn({matchPatterns:py,defaultMatchWidth:"wide",parsePatterns:vy,defaultParseWidth:"any"}),day:cn({matchPatterns:hy,defaultMatchWidth:"wide",parsePatterns:gy,defaultParseWidth:"any"}),dayPeriod:cn({matchPatterns:by,defaultMatchWidth:"any",parsePatterns:xy,defaultParseWidth:"any"})};var Ec={code:"en-US",formatDistance:hv,formatLong:gv,formatRelative:bv,localize:xv,match:yv,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _v(e,t){let r=fe(e,t?.in);return cv(r,ls(r))+1}function Sv(e,t){let r=fe(e,t?.in),o=+Vo(r)-+dv(r);return Math.round(o/ns)+1}function cs(e,t){let r=fe(e,t?.in),o=r.getFullYear(),n=io(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=He(t?.in||e,0);a.setFullYear(o+1,0,i),a.setHours(0,0,0,0);let s=Er(a,t),l=He(t?.in||e,0);l.setFullYear(o,0,i),l.setHours(0,0,0,0);let c=Er(l,t);return+r>=+s?o+1:+r>=+c?o:o-1}function Cv(e,t){let r=io(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=cs(e,t),i=He(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Er(i,t)}function Ev(e,t){let r=fe(e,t?.in),o=+Er(r,t)-+Cv(r,t);return Math.round(o/ns)+1}function ae(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Tr={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return ae(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):ae(r+1,2)},d(e,t){return ae(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return ae(e.getHours()%12||12,t.length)},H(e,t){return ae(e.getHours(),t.length)},m(e,t){return ae(e.getMinutes(),t.length)},s(e,t){return ae(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return ae(n,t.length)}};var dn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Tc={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Tr.y(e,t)},Y:function(e,t,r,o){let n=cs(e,o),i=n>0?n:1-n;if(t==="YY"){let a=i%100;return ae(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):ae(i,t.length)},R:function(e,t){let r=ss(e);return ae(r,t.length)},u:function(e,t){let r=e.getFullYear();return ae(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return ae(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return ae(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Tr.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return ae(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=Ev(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):ae(n,t.length)},I:function(e,t,r){let o=Sv(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):ae(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Tr.d(e,t)},D:function(e,t,r){let o=_v(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):ae(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ae(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ae(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return ae(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=dn.noon:o===0?n=dn.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=dn.evening:o>=12?n=dn.afternoon:o>=4?n=dn.morning:n=dn.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Tr.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Tr.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):ae(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):ae(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tr.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Tr.s(e,t)},S:function(e,t){return Tr.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Ov(o);case"XXXX":case"XX":return No(o);default:return No(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return Ov(o);case"xxxx":case"xx":return No(o);default:return No(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tv(o,":");default:return"GMT"+No(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tv(o,":");default:return"GMT"+No(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return ae(o,t.length)},T:function(e,t,r){return ae(+e,t.length)}};function Tv(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+ae(i,2)}function Ov(e,t){return e%60===0?(e>0?"-":"+")+ae(Math.abs(e)/60,2):No(e,t)}function No(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=ae(Math.trunc(o/60),2),i=ae(o%60,2);return r+n+t+i}var Av=(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"})}},Iv=(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"})}},wy=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Av(e,t);let i;switch(o){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}}",Av(o,t)).replace("{{time}}",Iv(n,t))},Pv={p:Iv,P:wy};var yy=/^D+$/,_y=/^Y+$/,Sy=["D","DD","YY","YYYY"];function Rv(e){return yy.test(e)}function Vv(e){return _y.test(e)}function Nv(e,t,r){let o=Cy(e,t,r);if(console.warn(o),Sy.includes(e))throw new RangeError(o)}function Cy(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ey=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ty=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oy=/^'([^]*?)'?$/,Ay=/''/g,Iy=/[a-zA-Z]/;function Oc(e,t,r){let o=io(),n=r?.locale??o.locale??Ec,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=fe(e,r?.in);if(!ln(s))throw new RangeError("Invalid time value");let l=t.match(Ty).map(f=>{let p=f[0];if(p==="p"||p==="P"){let d=Pv[p];return d(f,n.formatLong)}return f}).join("").match(Ey).map(f=>{if(f==="''")return{isToken:!1,value:"'"};let p=f[0];if(p==="'")return{isToken:!1,value:Py(f)};if(Tc[p])return{isToken:!0,value:f};if(p.match(Iy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:f}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));let c={firstWeekContainsDate:i,weekStartsOn:a,locale:n};return l.map(f=>{if(!f.isToken)return f.value;let p=f.value;(!r?.useAdditionalWeekYearTokens&&Vv(p)||!r?.useAdditionalDayOfYearTokens&&Rv(p))&&Nv(p,t,String(e));let d=Tc[p[0]];return d(s,p,n.localize,c)}).join("")}function Py(e){let t=e.match(Oy);return t?t[1].replace(Ay,"'"):e}function Do(e,t,r){return is(e,-t,r)}function ds(e,t,r){return as(e,-t,r)}function Dv(e,t,r){return fv(e,-t,r)}function fs(e,t,r){return mv(e,-t,r)}var H=u(j(),1),Pe=u(z(),1),vt=u(Or(),1);var Ac=u(P(),1),Me={Name:(0,Ac.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,Ac.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Mv(e,t){switch(t){case"days":return Do(new Date,e);case"weeks":return Dv(new Date,e);case"months":return ds(new Date,e);case"years":return fs(new Date,e);default:return new Date}}var Fv={label:(0,H.__)("Is none of"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Me),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},ms=[{name:_e,label:(0,H.__)("Includes"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Me),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:Se,...Fv},{name:ot,label:(0,H.__)("Includes all"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Me),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:nt,...Fv},{name:ct,label:(0,H.__)("Between (inc)"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),Me),filter(e,t,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:dt,label:(0,H.__)("In the past"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Me),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mv(r.value,r.unit),n=(0,vt.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:xt,label:(0,H.__)("Over"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Me),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mv(r.value,r.unit);return(0,vt.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:Ce,label:(0,H.__)("Is"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:Ee,label:(0,H.__)("Is not"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:Fr,label:(0,H.__)("Less than"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:Lr,label:(0,H.__)("Greater than"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:Br,label:(0,H.__)("Less than or equal"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:jr,label:(0,H.__)("Greater than or equal"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:Hr,label:(0,H.__)("Before"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:zr,label:(0,H.__)("After"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:Wr,label:(0,H.__)("Before (inc)"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:Gr,label:(0,H.__)("After (inc)"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r);return(0,vt.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:$t,label:(0,H.__)("Contains"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Kt,label:(0,H.__)("Doesn't contain"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Zt,label:(0,H.__)("Starts with"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:Ur,label:(0,H.__)("On"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r),n=(0,vt.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:Yr,label:(0,H.__)("Not on"),filterText:(e,t)=>(0,Pe.createInterpolateElement)((0,H.sprintf)((0,H.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Me),filter(e,t,r){if(r===void 0)return!0;let o=(0,vt.getDate)(r),n=(0,vt.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],ko=e=>ms.find(t=>t.name===e),Lv=()=>ms.map(e=>e.name),Bv=e=>ms.filter(t=>t.selection==="single").some(t=>t.name===e),jv=e=>ms.some(t=>t.name===e);var Qe=u(P(),1),Ry="Enter",Vy=" ",Ny=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=ko(t?.operator);return o!==void 0?o.filterText(r,e):(0,Ar.sprintf)((0,Ar.__)("Unknown status for %1$s"),r.name)};function Dy({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(a=>({value:a,label:ko(a)?.label||a})),n=t.filters?.find(a=>a.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,Qe.jsxs)(L,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,Qe.jsx)(Gt.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,Qe.jsx)(Gt.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,Ar.__)("Conditions"),value:i,options:o,onChange:a=>{let s=a,l=n?.operator,c=n?[...(t.filters??[]).map(f=>{if(f.field===e.field){let p=ko(l)?.selection,d=ko(s)?.selection,m=p!==d||[p,d].includes("custom");return{...f,value:m?void 0:f.value,operator:s}}return f})]:[...t.filters??[],{field:e.field,operator:s,value:void 0}];r({...t,page:1,filters:c})},size:"small",variant:"minimal",hideLabelFromVision:!0})]})}function Hv({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,ps.useRef)(null),{filter:i,view:a,onChangeView:s}=o,l=a.filters?.find(h=>h.field===i.field),c=[],f=(0,ps.useMemo)(()=>{let h=r.find(b=>b.id===i.field);return h&&{...h,getValue:({item:b})=>b[h.id]}},[r,i.field]),{elements:p}=Ye({elements:i.elements,getElements:i.getElements});if(p.length>0)c=p.filter(h=>i.singleSelection?h.value===l?.value:l?.value?.includes(h.value));else if(Array.isArray(l?.value)){let h=l.value.map(b=>f?.getValueFormatted({item:{[f.id]:b},field:f})||String(b));c=[{value:l.value,label:h}]}else if(typeof l?.value=="object")c=[{value:l.value,label:l.value}];else if(l?.value!==void 0){let h=f!==void 0?f.getValueFormatted({item:{[f.id]:l.value},field:f}):String(l.value);c=[{value:l.value,label:h}]}let d=i.isPrimary,m=l?.isLocked,v=!m&&l?.value!==void 0,_=!m&&(!d||v);return(0,Qe.jsx)(Gt.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:h,onToggle:b})=>(0,Qe.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,Qe.jsx)(Gt.Tooltip,{text:(0,Ar.sprintf)((0,Ar.__)("Filter by: %1$s"),i.name.toLowerCase()),placement:"top",children:(0,Qe.jsx)("div",{className:Y("dataviews-filters__summary-chip",{"has-reset":_,"has-values":v,"is-not-clickable":m}),role:"button",tabIndex:m?-1:0,onClick:()=>{m||b()},onKeyDown:y=>{!m&&[Ry,Vy].includes(y.key)&&(b(),y.preventDefault())},"aria-disabled":m,"aria-pressed":h,"aria-expanded":h,ref:n,children:(0,Qe.jsx)(Ny,{activeElements:c,filterInView:l,filter:i})})}),_&&(0,Qe.jsx)(Gt.Tooltip,{text:d?(0,Ar.__)("Reset"):(0,Ar.__)("Remove"),placement:"top",children:(0,Qe.jsx)("button",{className:Y("dataviews-filters__summary-chip-remove",{"has-values":v}),onClick:()=>{s({...a,page:1,filters:a.filters?.filter(y=>y.field!==i.field)}),d?n.current?.focus():e.current?.focus()},children:(0,Qe.jsx)(Gt.Icon,{icon:Cl})})})]}),renderContent:()=>(0,Qe.jsxs)(L,{direction:"column",justify:"flex-start",children:[(0,Qe.jsx)(Dy,{...o}),o.filter.hasElements?(0,Qe.jsx)(ev,{...o,filter:{...o.filter,elements:p}}):(0,Qe.jsx)(av,{...o,fields:r})]})})}var vs=u(G(),1),zv=u(j(),1),Wv=u(z(),1);var Ir=u(P(),1),{Menu:di}=Z(vs.privateApis);function Ic({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(a=>!a.isVisible);return(0,Ir.jsxs)(di,{children:[(0,Ir.jsx)(di.TriggerButton,{...n}),(0,Ir.jsx)(di.Popover,{children:i.map(a=>(0,Ir.jsx)(di.Item,{onClick:()=>{o(a.field),r({...t,page:1,filters:[...t.filters||[],{field:a.field,value:void 0,operator:a.operators[0]}]})},children:(0,Ir.jsx)(di.ItemLabel,{children:a.name})},a.field))})]})}function ky({filters:e,view:t,onChangeView:r,setOpenedFilter:o},n){if(!e.length||e.every(({isPrimary:a})=>a))return null;let i=e.filter(a=>!a.isVisible);return(0,Ir.jsx)(Ic,{triggerProps:{render:(0,Ir.jsx)(vs.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,zv.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var Gv=(0,Wv.forwardRef)(ky);var Uv=u(G(),1),Yv=u(j(),1),qv=u(P(),1);function $v({filters:e,view:t,onChangeView:r}){let o=i=>e.some(a=>a.field===i&&a.isPrimary),n=!t.search&&!t.filters?.some(i=>!i.isLocked&&(i.value!==void 0||!o(i.field)));return(0,qv.jsx)(Uv.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{r({...t,page:1,search:"",filters:t.filters?.filter(i=>!!i.isLocked)||[]})},children:(0,Yv.__)("Reset")})}var Kv=u(z(),1);function My(e,t){return(0,Kv.useMemo)(()=>{let r=[];return e.forEach(o=>{if(o.filterBy===!1||!o.hasElements&&!o.Edit)return;let n=o.filterBy.operators,i=!!o.filterBy?.isPrimary,a=t.filters?.some(s=>s.field===o.id&&!!s.isLocked)??!1;r.push({field:o.id,name:o.label,elements:o.elements,getElements:o.getElements,hasElements:o.hasElements,singleSelection:n.some(s=>Bv(s)),operators:n,isVisible:a||i||!!t.filters?.some(s=>s.field===o.id&&jv(s.operator)),isPrimary:i,isLocked:a})}),r.sort((o,n)=>o.isLocked&&!n.isLocked?-1:!o.isLocked&&n.isLocked?1:o.isPrimary&&!n.isPrimary?-1:!o.isPrimary&&n.isPrimary?1:o.name.localeCompare(n.name)),r},[e,t])}var fi=My;var mi=u(P(),1);function Fy({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,fn.useContext)(q),a=(0,fn.useRef)(null),s=fi(t,r),l=(0,mi.jsx)(Gv,{filters:s,view:r,onChangeView:o,ref:a,setOpenedFilter:i},"add-filter"),c=s.filter(p=>p.isVisible);if(c.length===0)return null;let f=[...c.map(p=>(0,mi.jsx)(Hv,{filter:p,view:r,fields:t,onChangeView:o,addFilterRef:a,openedFilter:n},p.field)),l];return f.push((0,mi.jsx)($v,{filters:s,view:r,onChangeView:o},"reset-filters")),(0,mi.jsx)(L,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:f})}var pi=(0,fn.memo)(Fy);var ao=u(z(),1),Zv=u(G(),1);var hs=u(j(),1);var ar=u(P(),1);function Ly(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,ao.useContext)(q),a=(0,ao.useRef)(null),s=(0,ao.useCallback)(m=>{r(m),i(!0)},[r,i]);if(e.length===0)return null;let l=e.some(m=>m.isVisible),c={label:(0,hs.__)("Add filter"),"aria-expanded":!1,isPressed:!1},f={label:(0,hs._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},p=e.some(m=>m.isPrimary||m.isLocked),d=(0,ar.jsx)(Zv.Button,{ref:a,className:"dataviews-filters__visibility-toggle",size:"compact",icon:Vn,disabled:p,accessibleWhenDisabled:!0,...l?f:c});return(0,ar.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:l?(0,ar.jsx)(By,{buttonRef:a,filtersCount:t.filters?.length,children:d}):(0,ar.jsx)(Ic,{filters:e,view:t,onChangeView:s,setOpenedFilter:o,triggerProps:{render:d}})})}function By({buttonRef:e,filtersCount:t,children:r}){return(0,ao.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,ar.jsxs)(ar.Fragment,{children:[r,!!t&&(0,ar.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var gs=Ly;var Xv=u(z(),1);var Qv=u(P(),1);function jy(e){let{isShowingFilter:t}=(0,Xv.useContext)(q);return t?(0,Qv.jsx)(pi,{...e}):null}var bs=jy;var Jv=u(z(),1),eh=u(G(),1),th=u(j(),1);var mn=u(P(),1);function Pc({className:e}){let{actions:t=[],data:r,fields:o,getItemId:n,getItemLevel:i,hasInitiallyLoaded:a,isLoading:s,view:l,onChangeView:c,selection:f,onChangeSelection:p,setOpenedFilter:d,onClickItem:m,isItemClickable:v,renderItemLink:_,defaultLayouts:h,empty:b=(0,mn.jsx)("p",{children:(0,th.__)("No results")})}=(0,Jv.useContext)(q),y=Qt(!a,{delay:200});if(!a)return y?(0,mn.jsx)("div",{className:"dataviews-loading",children:(0,mn.jsx)("p",{children:(0,mn.jsx)(eh.Spinner,{})})}):null;let A=Qr.find(V=>V.type===l.type&&h[V.type])?.component;return(0,mn.jsx)(A,{className:e,actions:t,data:r,fields:o,getItemId:n,getItemLevel:i,isLoading:s,onChangeView:c,onChangeSelection:p,selection:f,setOpenedFilter:d,onClickItem:m,renderItemLink:_,isItemClickable:v,view:l,empty:b})}var rh=u(j(),1),Ut=u(z(),1),oh=u(G(),1),nh=u(bt(),1);var ih=u(P(),1),Hy=(0,Ut.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Ut.useContext)(q),[n,i,a]=(0,nh.useDebouncedInput)(r.search);(0,Ut.useEffect)(()=>{i(r.search??"")},[r.search,i]);let s=(0,Ut.useRef)(o),l=(0,Ut.useRef)(r);(0,Ut.useEffect)(()=>{s.current=o,l.current=r},[o,r]),(0,Ut.useEffect)(()=>{a!==l.current?.search&&s.current({...l.current,page:1,search:a})},[a]);let c=t||(0,rh.__)("Search");return(0,ih.jsx)(oh.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:c,placeholder:c,size:"compact"})}),Rc=Hy;var Fe=u(G(),1),Pr=u(j(),1),Yt=u(z(),1);var Nc=u(sh(),1),fh=u(bt(),1);var lh=u(G(),1),Vc=u(j(),1),uh=u(z(),1);var ch=u(P(),1);function dh(){let e=(0,uh.useContext)(q),{view:t,onChangeView:r}=e,o=t.infiniteScrollEnabled??!1;return e.hasInfiniteScrollHandler?(0,ch.jsx)(lh.ToggleControl,{label:(0,Vc.__)("Enable infinite scroll"),help:(0,Vc.__)("Automatically load more content as you scroll, instead of showing pagination links."),checked:o,onChange:n=>{r({...t,infiniteScrollEnabled:n})}}):null}var oe=u(P(),1),{Menu:vi}=Z(Fe.privateApis),zy={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function Dc(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,Yt.useContext)(q),o=Object.keys(r);if(o.length<=1)return null;let n=Qr.find(i=>e.type===i.type);return(0,oe.jsxs)(vi,{children:[(0,oe.jsx)(vi.TriggerButton,{render:(0,oe.jsx)(Fe.Button,{size:"compact",icon:n?.icon,label:(0,Pr.__)("Layout")})}),(0,oe.jsx)(vi.Popover,{children:o.map(i=>{let a=Qr.find(s=>s.type===i);return a?(0,oe.jsx)(vi.RadioItem,{value:i,name:"view-actions-available-view",checked:i===e.type,hideOnClick:!0,onChange:s=>{switch(s.target.value){case"list":case"grid":case"table":case"pickerGrid":case"pickerTable":case"activity":let l={...e};return"layout"in l&&delete l.layout,t({...l,type:s.target.value,...r[s.target.value]})}(0,Nc.default)("Invalid dataview")},children:(0,oe.jsx)(vi.ItemLabel,{children:a.label})},i):null})})]})}function Wy(){let{view:e,fields:t,onChangeView:r}=(0,Yt.useContext)(q),o=(0,Yt.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,oe.jsx)(Fe.SelectControl,{__next40pxDefaultSize:!0,label:(0,Pr.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function Gy(){let{view:e,fields:t,onChangeView:r}=(0,Yt.useContext)(q);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,oe.jsx)(Fe.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,Pr.__)("Order"),value:n,onChange:i=>{if(i==="asc"||i==="desc"){r({...e,sort:{direction:i,field:e.sort?.field||t.find(a=>a.enableSorting!==!1)?.id||""},showLevels:!1});return}(0,Nc.default)("Invalid direction")},children:va.map(i=>(0,oe.jsx)(Fe.__experimentalToggleGroupControlOptionIcon,{value:i,icon:sf[i],label:ga[i]},i))})}function Uy(){let{view:e,config:t,onChangeView:r}=(0,Yt.useContext)(q),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,oe.jsx)(Fe.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Pr.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:n=>{let i=typeof n=="number"||n===void 0?n:parseInt(n,10);r({...e,perPage:i,page:1})},children:t.perPageSizes.map(n=>(0,oe.jsx)(Fe.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function Yy(){let{onReset:e}=(0,Yt.useContext)(q);return e===void 0?null:(0,oe.jsx)(Fe.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,Pr.__)("Reset view")})}function kc(){let{view:e,onReset:t}=(0,Yt.useContext)(q),r=(0,fh.useInstanceId)(mh,"dataviews-view-config-dropdown"),o=Qr.find(i=>i.type===e.type),n=typeof t=="function";return(0,oe.jsx)(Fe.Dropdown,{expandOnMobile:!0,popoverProps:{...zy,id:r},renderToggle:({onToggle:i,isOpen:a})=>(0,oe.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,oe.jsx)(Fe.Button,{size:"compact",icon:Tl,label:(0,Pr._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":a?"true":"false","aria-controls":r}),n&&(0,oe.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,oe.jsx)(Fe.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,oe.jsxs)(L,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,oe.jsxs)(L,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,oe.jsx)(Fe.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,Pr.__)("Appearance")}),(0,oe.jsx)(Yy,{})]}),(0,oe.jsxs)(L,{direction:"column",gap:"lg",children:[(0,oe.jsxs)(L,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,oe.jsx)(Wy,{}),(0,oe.jsx)(Gy,{})]}),!!o?.viewConfigOptions&&(0,oe.jsx)(o.viewConfigOptions,{}),(0,oe.jsx)(dh,{}),(0,oe.jsx)(Uy,{}),(0,oe.jsx)(Ta,{})]})]})})})}function mh(){return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Dc,{}),(0,oe.jsx)(kc,{})]})}var qy=(0,Yt.memo)(mh),ph=qy;var vh=u(G(),1),hh=u(z(),1);function ve(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var gh=u(P(),1),{ValidatedCheckboxControl:$y}=Z(vh.privateApis);function bh({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:s,label:l,description:c,isValid:f}=e,p=(0,hh.useCallback)(()=>{t(s({item:r,value:!a({item:r})}))},[r,a,t,s]);return(0,gh.jsx)($y,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:ve(f,i),hidden:o,label:l,help:c,checked:a({item:r}),onChange:p})}var xs=u(G(),1),xh=u(z(),1);var Mc=u(P(),1),{ValidatedComboboxControl:Ky}=Z(xs.privateApis);function ws({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:a,placeholder:s,getValue:l,setValue:c,isValid:f}=t,p=l({item:e})??"",d=(0,xh.useCallback)(_=>r(c({item:e,value:_??""})),[e,r,c]),{elements:m,isLoading:v}=Ye({elements:t.elements,getElements:t.getElements});return v?(0,Mc.jsx)(xs.Spinner,{}):(0,Mc.jsx)(Ky,{required:!!t.isValid?.required,customValidity:ve(f,n),label:i,value:p,help:a,placeholder:s,options:m,onChange:d,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var Cs=u(G(),1),Ht=u(z(),1),Ss=u(j(),1),Vt=u(Or(),1);var vn=u(G(),1),Fc=u(z(),1),sr=u(j(),1);var pn=u(P(),1),Zy={[dt]:[{value:"days",label:(0,sr.__)("Days")},{value:"weeks",label:(0,sr.__)("Weeks")},{value:"months",label:(0,sr.__)("Months")},{value:"years",label:(0,sr.__)("Years")}],[xt]:[{value:"days",label:(0,sr.__)("Days ago")},{value:"weeks",label:(0,sr.__)("Weeks ago")},{value:"months",label:(0,sr.__)("Months ago")},{value:"years",label:(0,sr.__)("Years ago")}]};function ys({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let a=Zy[i===dt?"inThePast":"over"],{id:s,label:l,getValue:c,setValue:f}=r,p=c({item:t}),{value:d="",unit:m=a[0].value}=p&&typeof p=="object"?p:{},v=(0,Fc.useCallback)(h=>o(f({item:t,value:{value:Number(h),unit:m}})),[o,f,t,m]),_=(0,Fc.useCallback)(h=>o(f({item:t,value:{value:d,unit:h}})),[o,f,t,d]);return(0,pn.jsx)(vn.BaseControl,{id:s,className:Y(e,"dataviews-controls__relative-date"),label:l,hideLabelFromVision:n,children:(0,pn.jsxs)(L,{direction:"row",gap:"sm",children:[(0,pn.jsx)(vn.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:d,onChange:v}),(0,pn.jsx)(vn.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,sr.__)("Unit"),value:m,options:a,onChange:_,hideLabelFromVision:!0})]})})}var wh=u(Or(),1);function _s(e){if(!e)return null;let t=(0,wh.getDate)(e);return t&&ln(t)?t:null}var so=u(P(),1),{DateCalendar:Xy,ValidatedInputControl:Qy}=Z(Cs.privateApis),Jy=e=>e?(0,Vt.dateI18n)("Y-m-d\\TH:i",(0,Vt.getDate)(e)):"";function e1({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:s,description:l,setValue:c,getValue:f,isValid:p}=t,d=f({item:e}),m=typeof d=="string"?d:void 0,[v,_]=(0,Ht.useState)(()=>_s(m)||new Date),h=(0,Ht.useRef)(null),b=(0,Ht.useRef)(void 0),y=(0,Ht.useRef)(null),A=(0,Ht.useCallback)(N=>r(c({item:e,value:N})),[e,r,c]);(0,Ht.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let V=(0,Ht.useCallback)(N=>{let g;if(N){let E=(0,Vt.dateI18n)("Y-m-d",N),T;m?T=(0,Vt.dateI18n)("H:i",(0,Vt.getDate)(m)):T=(0,Vt.dateI18n)("H:i",N),g=(0,Vt.getDate)(`${E}T${T}`).toISOString(),A(g),b.current&&clearTimeout(b.current)}else A(void 0);y.current=h.current&&h.current.ownerDocument.activeElement,b.current=setTimeout(()=>{h.current&&(h.current.focus(),h.current.blur(),A(g),y.current&&y.current instanceof HTMLElement&&y.current.focus())},0)},[A,m]),R=(0,Ht.useCallback)(N=>{if(N){let g=(0,Vt.getDate)(N);A(g.toISOString());let E=_s(g.toISOString());E&&_(E)}else A(void 0)},[A]),{format:M}=t,k=M.weekStartsOn??(0,Vt.getSettings)().l10n.startOfWeek,{timezone:{string:S}}=(0,Vt.getSettings)(),I=s;return p?.required&&!n&&!o?I=`${s} (${(0,Ss.__)("Required")})`:!p?.required&&n&&!o&&(I=`${s} (${(0,Ss.__)("Optional")})`),(0,so.jsx)(Cs.BaseControl,{id:a,label:I,help:l,hideLabelFromVision:o,children:(0,so.jsxs)(L,{direction:"column",gap:"lg",children:[(0,so.jsx)(Xy,{style:{width:"100%"},selected:m&&_s(m)||void 0,onSelect:V,month:v,onMonthChange:_,timeZone:S||void 0,weekStartsOn:k}),(0,so.jsx)(Qy,{ref:h,__next40pxDefaultSize:!0,required:!!p?.required,customValidity:ve(p,i),type:"datetime-local",label:(0,Ss.__)("Date time"),hideLabelFromVision:!0,value:Jy(m),onChange:R})]})})}function yh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===dt||i===xt?(0,so.jsx)(ys,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,so.jsx)(e1,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var st=u(G(),1),de=u(z(),1),ze=u(j(),1),at=u(Or(),1);var he=u(P(),1),{DateCalendar:t1,DateRangeCalendar:r1}=Z(st.privateApis),o1=[{id:"today",label:(0,ze.__)("Today"),getValue:()=>(0,at.getDate)(null)},{id:"yesterday",label:(0,ze.__)("Yesterday"),getValue:()=>{let e=(0,at.getDate)(null);return Do(e,1)}},{id:"past-week",label:(0,ze.__)("Past week"),getValue:()=>{let e=(0,at.getDate)(null);return Do(e,7)}},{id:"past-month",label:(0,ze.__)("Past month"),getValue:()=>{let e=(0,at.getDate)(null);return ds(e,1)}}],n1=[{id:"last-7-days",label:(0,ze.__)("Last 7 days"),getValue:()=>{let e=(0,at.getDate)(null);return[Do(e,7),e]}},{id:"last-30-days",label:(0,ze.__)("Last 30 days"),getValue:()=>{let e=(0,at.getDate)(null);return[Do(e,30),e]}},{id:"month-to-date",label:(0,ze.__)("Month to date"),getValue:()=>{let e=(0,at.getDate)(null);return[vv(e),e]}},{id:"last-year",label:(0,ze.__)("Last year"),getValue:()=>{let e=(0,at.getDate)(null);return[fs(e,1),e]}},{id:"year-to-date",label:(0,ze.__)("Year to date"),getValue:()=>{let e=(0,at.getDate)(null);return[ls(e),e]}}],hn=e=>{if(!e)return null;let t=(0,at.getDate)(e);return t&&ln(t)?t:null},Lc=e=>e?typeof e=="string"?e:Oc(e,"yyyy-MM-dd"):"";function _h({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:a}=e,[s,l]=(0,de.useState)(void 0),c=(0,de.useCallback)(()=>{let p=Array.isArray(r)?r:[r];for(let d of p){let m=d.current;if(m&&!m.validity.valid){l({type:"invalid",message:m.validationMessage});return}}l(void 0)},[r]);return(0,de.useEffect)(()=>{let p=Array.isArray(r)?r:[r],d=t?ve(a,t):void 0;for(let m of p){let v=m.current;v&&v.setCustomValidity(d?.type==="invalid"&&d.message?d.message:"")}},[r,a,t]),(0,de.useEffect)(()=>{let p=Array.isArray(r)?r:[r],d=m=>{m.preventDefault(),n(!0)};for(let m of p)m.current?.addEventListener("invalid",d);return()=>{for(let m of p)m.current?.removeEventListener("invalid",d)}},[r,n]),(0,de.useEffect)(()=>{if(!o)return;let p=t?ve(a,t):void 0;p?l(p):c()},[o,a,t,c]),(0,he.jsxs)("div",{onBlur:p=>{o||(!p.relatedTarget||!p.currentTarget.contains(p.relatedTarget))&&n(!0)},children:[i,(0,he.jsx)("div",{"aria-live":"polite",children:s&&(0,he.jsxs)("p",{className:Y("components-validated-control__indicator",s.type==="invalid"?"is-invalid":void 0),children:[(0,he.jsx)(st.Icon,{className:"components-validated-control__indicator-icon",icon:Vl,size:16,fill:"currentColor"}),s.message]})})]})}function i1({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:s,setValue:l,getValue:c,isValid:f,format:p}=t,[d,m]=(0,de.useState)(null),v=p.weekStartsOn??(0,at.getSettings)().l10n.startOfWeek,_=c({item:e}),h=typeof _=="string"?_:void 0,[b,y]=(0,de.useState)(()=>hn(h)||new Date),[A,V]=(0,de.useState)(!1),R=(0,de.useRef)(null),M=(0,de.useCallback)(E=>r(l({item:e,value:E})),[e,r,l]),k=(0,de.useCallback)(E=>{let T=E?Oc(E,"yyyy-MM-dd"):void 0;M(T),m(null),V(!0)},[M]),S=(0,de.useCallback)(E=>{let T=E.getValue(),w=Lc(T);y(T),M(w),m(E.id),V(!0)},[M]),I=(0,de.useCallback)(E=>{if(M(E),E){let T=hn(E);T&&y(T)}m(null),V(!0)},[M]),{timezone:{string:N}}=(0,at.getSettings)(),g=s;return f?.required&&!n?g=`${s} (${(0,ze.__)("Required")})`:!f?.required&&n&&(g=`${s} (${(0,ze.__)("Optional")})`),(0,he.jsx)(_h,{field:t,validity:i,inputRefs:R,isTouched:A,setIsTouched:V,children:(0,he.jsx)(st.BaseControl,{id:a,className:"dataviews-controls__date",label:g,hideLabelFromVision:o,children:(0,he.jsxs)(L,{direction:"column",gap:"lg",children:[(0,he.jsxs)(L,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[o1.map(E=>{let T=d===E.id;return(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:T,size:"small",onClick:()=>S(E),children:E.label},E.id)}),(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!d,size:"small",disabled:!!d,accessibleWhenDisabled:!1,children:(0,ze.__)("Custom")})]}),(0,he.jsx)(st.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:R,type:"date",label:(0,ze.__)("Date"),hideLabelFromVision:!0,value:h,onChange:I,required:!!t.isValid?.required}),(0,he.jsx)(t1,{style:{width:"100%"},selected:h&&hn(h)||void 0,onSelect:k,month:b,onMonthChange:y,timeZone:N||void 0,weekStartsOn:v})]})})})}function a1({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:s,getValue:l,setValue:c,format:f}=t,p,d=l({item:e});Array.isArray(d)&&d.length===2&&d.every(w=>typeof w=="string")&&(p=d);let m=f.weekStartsOn??(0,at.getSettings)().l10n.startOfWeek,v=(0,de.useCallback)(w=>{r(c({item:e,value:w}))},[e,r,c]),[_,h]=(0,de.useState)(null),b=(0,de.useMemo)(()=>{if(!p)return{from:void 0,to:void 0};let[w,O]=p;return{from:hn(w)||void 0,to:hn(O)||void 0}},[p]),[y,A]=(0,de.useState)(()=>b.from||new Date),[V,R]=(0,de.useState)(!1),M=(0,de.useRef)(null),k=(0,de.useRef)(null),S=(0,de.useCallback)((w,O)=>{w&&O?v([Lc(w),Lc(O)]):!w&&!O&&v(void 0)},[v]),I=(0,de.useCallback)(w=>{S(w?.from,w?.to),h(null),R(!0)},[S]),N=(0,de.useCallback)(w=>{let[O,x]=w.getValue();A(O),S(O,x),h(w.id),R(!0)},[S]),g=(0,de.useCallback)((w,O)=>{let[x,C]=p||[void 0,void 0];if(S(w==="from"?O:x,w==="to"?O:C),O){let W=hn(O);W&&A(W)}h(null),R(!0)},[p,S]),{timezone:E}=(0,at.getSettings)(),T=s;return t.isValid?.required&&!n?T=`${s} (${(0,ze.__)("Required")})`:!t.isValid?.required&&n&&(T=`${s} (${(0,ze.__)("Optional")})`),(0,he.jsx)(_h,{field:t,validity:i,inputRefs:[M,k],isTouched:V,setIsTouched:R,children:(0,he.jsx)(st.BaseControl,{id:a,className:"dataviews-controls__date",label:T,hideLabelFromVision:o,children:(0,he.jsxs)(L,{direction:"column",gap:"lg",children:[(0,he.jsxs)(L,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[n1.map(w=>{let O=_===w.id;return(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:O,size:"small",onClick:()=>N(w),children:w.label},w.id)}),(0,he.jsx)(st.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!_,size:"small",accessibleWhenDisabled:!1,disabled:!!_,children:(0,ze.__)("Custom")})]}),(0,he.jsxs)(L,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,he.jsx)(st.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:M,type:"date",label:(0,ze.__)("From"),hideLabelFromVision:!0,value:p?.[0],onChange:w=>g("from",w),required:!!t.isValid?.required}),(0,he.jsx)(st.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:k,type:"date",label:(0,ze.__)("To"),hideLabelFromVision:!0,value:p?.[1],onChange:w=>g("to",w),required:!!t.isValid?.required})]}),(0,he.jsx)(r1,{style:{width:"100%"},selected:b,onSelect:I,month:y,onMonthChange:A,timeZone:E.string||void 0,weekStartsOn:m})]})})})}function Sh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===dt||i===xt?(0,he.jsx)(ys,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===ct?(0,he.jsx)(a1,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a}):(0,he.jsx)(i1,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var Es=u(G(),1),Ch=u(z(),1);var Bc=u(P(),1),{ValidatedSelectControl:s1}=Z(Es.privateApis);function Ts({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:a,label:s,description:l,getValue:c,setValue:f,isValid:p}=t,d=a==="array",m=c({item:e})??(d?[]:""),v=(0,Ch.useCallback)(b=>r(f({item:e,value:b})),[e,r,f]),{elements:_,isLoading:h}=Ye({elements:t.elements,getElements:t.getElements});return h?(0,Bc.jsx)(Es.Spinner,{}):(0,Bc.jsx)(s1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(p,i),label:s,value:m,help:l,options:_,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:d})}var jc=u(P(),1),l1=10;function Eh(e){let{field:t}=e,{elements:r}=Ye({elements:t.elements,getElements:t.getElements});return r.length>=l1?(0,jc.jsx)(ws,{...e}):(0,jc.jsx)(Ts,{...e})}var As=u(G(),1);var Th=u(G(),1),Oh=u(z(),1);var Ah=u(P(),1),{ValidatedInputControl:u1}=Z(Th.privateApis);function lr({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:a,suffix:s,validity:l}){let{label:c,placeholder:f,description:p,getValue:d,setValue:m,isValid:v}=t,_=d({item:e}),h=(0,Oh.useCallback)(b=>r(m({item:e,value:b})),[e,m,r]);return(0,Ah.jsx)(u1,{required:!!v.required,markWhenOptional:n,customValidity:ve(v,l),label:c,placeholder:f,value:_??"",help:p,onChange:h,hideLabelFromVision:o,type:i,prefix:a,suffix:s,pattern:v.pattern?v.pattern.constraint:void 0,minLength:v.minLength?v.minLength.constraint:void 0,maxLength:v.maxLength?v.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var Os=u(P(),1);function Ih({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,Os.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,Os.jsx)(As.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Os.jsx)(As.Icon,{icon:Pl})})})}var Ps=u(G(),1);var Is=u(P(),1);function Ph({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,Is.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,Is.jsx)(Ps.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Is.jsx)(Ps.Icon,{icon:Ul})})})}var Vs=u(G(),1);var Rs=u(P(),1);function Rh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,Rs.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,Rs.jsx)(Vs.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,Rs.jsx)(Vs.Icon,{icon:Wl})})})}var Rr=u(G(),1),hi=u(z(),1),Ns=u(j(),1);var lo=u(P(),1),{ValidatedNumberControl:c1}=Z(Rr.privateApis);function Vh(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function d1({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,a=(0,hi.useCallback)(l=>t([Vh(l),i]),[t,i]),s=(0,hi.useCallback)(l=>t([n,Vh(l)]),[t,n]);return(0,lo.jsx)(Rr.BaseControl,{help:(0,Ns.__)("The max. value must be greater than the min. value."),children:(0,lo.jsxs)(Rr.Flex,{direction:"row",gap:4,children:[(0,lo.jsx)(Rr.__experimentalNumberControl,{label:(0,Ns.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,lo.jsx)(Rr.__experimentalNumberControl,{label:(0,Ns.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function Ds({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){let s=t.format?.decimals??0,l=Math.pow(10,Math.abs(s)*-1),{label:c,description:f,getValue:p,setValue:d,isValid:m}=t,v=p({item:e})??"",_=(0,hi.useCallback)(b=>{r(d({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,r,d]),h=(0,hi.useCallback)(b=>{r(d({item:e,value:b}))},[e,r,d]);if(i===ct){let b=["",""];return Array.isArray(v)&&v.length===2&&v.every(y=>typeof y=="number"||y==="")&&(b=v),(0,lo.jsx)(d1,{value:b,onChange:h,hideLabelFromVision:o,step:l})}return(0,lo.jsx)(c1,{required:!!m.required,markWhenOptional:n,customValidity:ve(m,a),label:c,help:f,value:v,onChange:_,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:l,min:m.min?m.min.constraint:void 0,max:m.max?m.max.constraint:void 0})}var Nh=u(P(),1);function Dh(e){return(0,Nh.jsx)(Ds,{...e})}var kh=u(P(),1);function Mh(e){return(0,kh.jsx)(Ds,{...e})}var ks=u(G(),1),Fh=u(z(),1);var Hc=u(P(),1),{ValidatedRadioControl:f1}=Z(ks.privateApis);function Lh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:s,getValue:l,setValue:c,isValid:f}=t,{elements:p,isLoading:d}=Ye({elements:t.elements,getElements:t.getElements}),m=l({item:e}),v=(0,Fh.useCallback)(_=>r(c({item:e,value:_})),[e,r,c]);return d?(0,Hc.jsx)(ks.Spinner,{}):(0,Hc.jsx)(f1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(f,i),label:a,help:s,onChange:v,options:p,selected:m,hideLabelFromVision:o})}var zc=u(z(),1);var Bh=u(P(),1);function jh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{prefix:s,suffix:l}=i||{};return(0,Bh.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a,prefix:s?(0,zc.createElement)(s):void 0,suffix:l?(0,zc.createElement)(l):void 0})}var Hh=u(G(),1),zh=u(z(),1);var Wh=u(P(),1),{ValidatedToggleControl:m1}=Z(Hh.privateApis);function Gh({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:s,getValue:l,setValue:c,isValid:f}=e,p=(0,zh.useCallback)(()=>{t(c({item:r,value:!l({item:r})}))},[t,c,r,l]);return(0,Wh.jsx)(m1,{required:!!f.required,markWhenOptional:n,customValidity:ve(f,i),hidden:o,label:a,help:s,checked:l({item:r}),onChange:p})}var Uh=u(G(),1),Yh=u(z(),1);var qh=u(P(),1),{ValidatedTextareaControl:p1}=Z(Uh.privateApis);function $h({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{rows:s=4}=i||{},{label:l,placeholder:c,description:f,setValue:p,isValid:d}=t,m=t.getValue({item:e}),v=(0,Yh.useCallback)(_=>r(p({item:e,value:_})),[e,r,p]);return(0,qh.jsx)(p1,{required:!!d.required,markWhenOptional:n,customValidity:ve(d,a),label:l,placeholder:c,value:m??"",help:f,onChange:v,rows:s,minLength:d.minLength?d.minLength.constraint:void 0,maxLength:d.maxLength?d.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var gn=u(G(),1),Kh=u(z(),1);var Ms=u(P(),1),{ValidatedToggleGroupControl:v1}=Z(gn.privateApis);function Zh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:s,isValid:l}=t,c=a({item:e}),f=(0,Kh.useCallback)(v=>r(s({item:e,value:v})),[e,r,s]),{elements:p,isLoading:d}=Ye({elements:t.elements,getElements:t.getElements});if(d)return(0,Ms.jsx)(gn.Spinner,{});if(p.length===0)return null;let m=p.find(v=>v.value===c);return(0,Ms.jsx)(v1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(l,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:m?.description||t.description,onChange:f,value:c,hideLabelFromVision:o,children:p.map(v=>(0,Ms.jsx)(gn.__experimentalToggleGroupControlOption,{label:v.label,value:v.value},v.value))})}var Fs=u(G(),1),Ls=u(z(),1);var gi=u(P(),1),{ValidatedFormTokenField:h1}=Z(Fs.privateApis);function Xh({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:s,getValue:l,setValue:c,isValid:f}=t,p=l({item:e}),{elements:d,isLoading:m}=Ye({elements:t.elements,getElements:t.getElements}),v=(0,Ls.useMemo)(()=>Array.isArray(p)?p.map(h=>d?.find(y=>y.value===h)||{value:h,label:h}):[],[p,d]),_=(0,Ls.useCallback)(h=>{let b=h.map(y=>typeof y=="object"&&"value"in y?y.value:y);r(c({item:e,value:b}))},[r,c,e]);return m?(0,gi.jsx)(Fs.Spinner,{}):(0,gi.jsx)(h1,{required:!!f?.required,markWhenOptional:n,customValidity:ve(f,i),label:o?void 0:a,value:v,onChange:_,placeholder:s,suggestions:d?.map(h=>h.value),__experimentalValidateInput:h=>t.isValid?.elements&&d?d.some(b=>b.value===h||b.label===h):!0,__experimentalExpandOnFocus:d&&d.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:h=>typeof h=="object"&&"label"in h?h.label:typeof h=="string"&&d&&d.find(y=>y.value===h)?.label||h,__experimentalRenderItem:({item:h})=>{if(typeof h=="string"&&d){let b=d.find(y=>y.value===h);return(0,gi.jsx)("span",{children:b?.label||h})}return(0,gi.jsx)("span",{children:h})}})}var g1={grad:.9,turn:360,rad:360/(2*Math.PI)},Vr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},qe=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},zt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},ag=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Qh=function(e){return{r:zt(e.r,0,255),g:zt(e.g,0,255),b:zt(e.b,0,255),a:zt(e.a)}},Wc=function(e){return{r:qe(e.r),g:qe(e.g),b:qe(e.b),a:qe(e.a,3)}},b1=/^#([0-9a-f]{3,8})$/i,Bs=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},sg=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),a=i-Math.min(t,r,o),s=a?i===t?(r-o)/a:i===r?2+(o-t)/a:4+(t-r)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:n}},lg=function(e){var t=e.h,r=e.s,o=e.v,n=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),a=o*(1-r),s=o*(1-(t-i)*r),l=o*(1-(1-t+i)*r),c=i%6;return{r:255*[o,s,a,a,l,o][c],g:255*[l,o,o,s,a,a][c],b:255*[a,a,l,o,o,s][c],a:n}},Jh=function(e){return{h:ag(e.h),s:zt(e.s,0,100),l:zt(e.l,0,100),a:zt(e.a)}},eg=function(e){return{h:qe(e.h),s:qe(e.s),l:qe(e.l),a:qe(e.a,3)}},tg=function(e){return lg((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},bi=function(e){return{h:(t=sg(e)).h,s:(n=(200-(r=t.s))*(o=t.v)/100)>0&&n<200?r*o/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,o,n},x1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w1=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_1=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rg={string:[[function(e){var t=b1.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?qe(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?qe(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=y1.exec(e)||_1.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Qh({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=x1.exec(e)||w1.exec(e);if(!t)return null;var r,o,n=Jh({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(g1[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return tg(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=n===void 0?1:n;return Vr(t)&&Vr(r)&&Vr(o)?Qh({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,n=e.a,i=n===void 0?1:n;if(!Vr(t)||!Vr(r)||!Vr(o))return null;var a=Jh({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return tg(a)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!Vr(t)||!Vr(r)||!Vr(o))return null;var a=(function(s){return{h:ag(s.h),s:zt(s.s,0,100),v:zt(s.v,0,100),a:zt(s.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return lg(a)},"hsv"]]},og=function(e,t){for(var r=0;r<t.length;r++){var o=t[r][0](e);if(o)return[o,t[r][1]]}return[null,void 0]},S1=function(e){return typeof e=="string"?og(e.trim(),rg.string):typeof e=="object"&&e!==null?og(e,rg.object):[null,void 0]};var Gc=function(e,t){var r=bi(e);return{h:r.h,s:zt(r.s+100*t,0,100),l:r.l,a:r.a}},Uc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ng=function(e,t){var r=bi(e);return{h:r.h,s:r.s,l:zt(r.l+100*t,0,100),a:r.a}},ig=(function(){function e(t){this.parsed=S1(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 qe(Uc(this.rgba),2)},e.prototype.isDark=function(){return Uc(this.rgba)<.5},e.prototype.isLight=function(){return Uc(this.rgba)>=.5},e.prototype.toHex=function(){return t=Wc(this.rgba),r=t.r,o=t.g,n=t.b,a=(i=t.a)<1?Bs(qe(255*i)):"","#"+Bs(r)+Bs(o)+Bs(n)+a;var t,r,o,n,i,a},e.prototype.toRgb=function(){return Wc(this.rgba)},e.prototype.toRgbString=function(){return t=Wc(this.rgba),r=t.r,o=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+n+", "+i+")":"rgb("+r+", "+o+", "+n+")";var t,r,o,n,i},e.prototype.toHsl=function(){return eg(bi(this.rgba))},e.prototype.toHslString=function(){return t=eg(bi(this.rgba)),r=t.h,o=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+n+"%, "+i+")":"hsl("+r+", "+o+"%, "+n+"%)";var t,r,o,n,i},e.prototype.toHsv=function(){return t=sg(this.rgba),{h:qe(t.h),s:qe(t.s),v:qe(t.v),a:qe(t.a,3)};var t},e.prototype.invert=function(){return lt({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),lt(Gc(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),lt(Gc(this.rgba,-t))},e.prototype.grayscale=function(){return lt(Gc(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),lt(ng(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),lt(ng(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"?lt({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):qe(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=bi(this.rgba);return typeof t=="number"?lt({h:t,s:r.s,l:r.l,a:r.a}):qe(r.h)},e.prototype.isEqual=function(t){return this.toHex()===lt(t).toHex()},e})(),lt=function(e){return e instanceof ig?e:new ig(e)};var Ct=u(G(),1),Yc=u(z(),1),ug=u(j(),1);var Nr=u(P(),1),{ValidatedInputControl:C1}=Z(Ct.privateApis),E1=({color:e,onColorChange:t})=>{let r=e&&lt(e).isValid()?e:"#ffffff";return(0,Nr.jsx)(Ct.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:o})=>(0,Nr.jsx)(Ct.Button,{onClick:o,"aria-label":(0,ug.__)("Open color picker"),size:"small",icon:()=>(0,Nr.jsx)(Ct.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Nr.jsx)(Ct.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Nr.jsx)(Ct.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function cg({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:s,description:l,setValue:c,isValid:f}=t,p=t.getValue({item:e})||"",d=(0,Yc.useCallback)(v=>{r(c({item:e,value:v}))},[e,r,c]),m=(0,Yc.useCallback)(v=>{r(c({item:e,value:v||""}))},[e,r,c]);return(0,Nr.jsx)(C1,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:ve(f,i),label:a,placeholder:s,value:p,help:l,onChange:m,hideLabelFromVision:o,type:"text",prefix:(0,Nr.jsx)(Ct.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Nr.jsx)(E1,{color:p,onColorChange:d})})})}var Hs=u(G(),1),zs=u(z(),1),qc=u(j(),1);var js=u(P(),1);function dg({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[a,s]=(0,zs.useState)(!1),l=(0,zs.useCallback)(()=>{s(c=>!c)},[]);return(0,js.jsx)(lr,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:a?"text":"password",suffix:(0,js.jsx)(Hs.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,js.jsx)(Hs.Button,{icon:a?Dn:eu,onClick:l,size:"small",label:a?(0,qc.__)("Hide password"):(0,qc.__)("Show password")})})})}function Ws(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var mg=u(P(),1),fg={adaptiveSelect:Eh,array:Xh,checkbox:bh,color:cg,combobox:ws,datetime:yh,date:Sh,email:Ih,telephone:Ph,url:Rh,integer:Dh,number:Mh,password:dg,radio:Lh,select:Ts,text:jh,toggle:Gh,textarea:$h,toggleGroup:Zh};function T1(e){return e&&typeof e=="object"&&typeof e.control=="string"}function O1(e){let{control:t,...r}=e,o=Gs(t);return o===null?null:function(i){return(0,mg.jsx)(o,{...i,config:r})}}function pg(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?Gs(e.Edit):T1(e.Edit)?O1(e.Edit):Ws(e)&&e.type!=="array"?Gs("adaptiveSelect"):t===null?null:Gs(t)}function Gs(e){return Object.keys(fg).includes(e)?fg[e]:null}function A1(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var vg=A1;var I1=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},hg=I1;var P1=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},gg=P1;var xg=u(j(),1);function Us({item:e,field:t}){let{elements:r,isLoading:o}=Ye({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var bg=u(P(),1);function Re({item:e,field:t}){return t.hasElements?(0,bg.jsx)(Us,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var ur=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function Ve(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function cr(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function dr(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function fr(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function ye(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function R1({item:e,field:t}){return t.getValue({item:e})}var ht=R1;var V1=/^[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 N1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!V1.test(r)?(0,xg.__)("Value must be a valid email address."):null}var wg={type:"email",render:Re,Edit:"email",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye,custom:N1}};var yg=u(j(),1);var bn=(e,t,r)=>r==="asc"?e-t:t-e;function Ys(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function qs(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var _g={separatorThousand:","};function D1({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=_g:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function k1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,yg.__)("Value must be an integer."):null}var Sg={type:"integer",render:Re,Edit:"integer",sort:bn,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee,Fr,Lr,Br,jr,ct],validOperators:[Ce,Ee,Fr,Lr,Br,jr,ct,_e,Se,ot,nt],format:_g,getValueFormatted:D1,validate:{required:Ve,min:Ys,max:qs,elements:ye,custom:k1}};var Cg=u(j(),1);var Eg={separatorThousand:",",separatorDecimal:".",decimals:2};function M1({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=Eg:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:a}=o,s=r.toFixed(a),[l,c]=s.split("."),f=n?l.replace(/\B(?=(\d{3})+(?!\d))/g,n):l;return a===0?f:f+i+c}function F1(e){return e===""||e===void 0||e===null}function L1(e,t){let r=t.getValue({item:e});return!F1(r)&&!Number.isFinite(r)?(0,Cg.__)("Value must be a number."):null}var Tg={type:"number",render:Re,Edit:"number",sort:bn,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee,Fr,Lr,Br,jr,ct],validOperators:[Ce,Ee,Fr,Lr,Br,jr,ct,_e,Se,ot,nt],format:Eg,getValueFormatted:M1,validate:{required:Ve,min:Ys,max:qs,elements:ye,custom:L1}};var Og={type:"text",render:Re,Edit:"text",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var Mo=u(Or(),1);var Ag={datetime:(0,Mo.getSettings)().formats.datetime,weekStartsOn:(0,Mo.getSettings)().l10n.startOfWeek};function B1({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=Ag:o=t.format,(0,Mo.dateI18n)(o.datetime,(0,Mo.getDate)(r))}var j1=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Ig={type:"datetime",render:Re,Edit:"datetime",sort:j1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt],validOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt],format:Ag,getValueFormatted:B1,validate:{required:Ve,elements:ye}};var Fo=u(Or(),1);var Pg={date:(0,Fo.getSettings)().formats.date,weekStartsOn:(0,Fo.getSettings)().l10n.startOfWeek};function H1({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Pg:o=t.format,(0,Fo.dateI18n)(o.date,(0,Fo.getDate)(r))}var z1=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Rg={type:"date",render:Re,Edit:"date",sort:z1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt,ct],validOperators:[Ur,Yr,Hr,zr,Wr,Gr,dt,xt,ct],format:Pg,getValueFormatted:H1,validate:{required:Ve,elements:ye}};var $s=u(j(),1);function Vg(e,t){return t.getValue({item:e})===!0}function W1({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,$s.__)("True"):r===!1?(0,$s.__)("False"):""}function G1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,$s.__)("Value must be true, false, or undefined"):null}var U1=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},Ng={type:"boolean",render:Re,Edit:"checkbox",sort:U1,validate:{required:Vg,elements:ye,custom:G1},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee],validOperators:[Ce,Ee],format:{},getValueFormatted:W1};var Dg={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:ht,validate:{}};var $c=u(j(),1);function kg(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Mg({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function Y1({item:e,field:t}){return Mg({item:e,field:t})}function q1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,$c.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,$c.__)("Every value must be a string.")}var $1=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),a=n.join(",");return r==="asc"?i.localeCompare(a):a.localeCompare(i)},Fg={type:"array",render:Y1,Edit:"array",sort:$1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[_e,Se,ot,nt],format:{},getValueFormatted:Mg,validate:{required:kg,elements:ye,custom:q1}};function K1({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Lg={type:"password",render:Re,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:K1,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var Bg={type:"telephone",render:Re,Edit:"telephone",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var jg=u(j(),1);var xn=u(P(),1);function Z1({item:e,field:t}){if(t.hasElements)return(0,xn.jsx)(Us,{item:e,field:t});let r=ht({item:e,field:t});return!r||!lt(r).isValid()?r:(0,xn.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,xn.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,xn.jsx)("span",{children:r})]})}function X1(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!lt(r).isValid()?(0,jg.__)("Value must be a valid color."):null}var Q1=(e,t,r)=>{let o=lt(e),n=lt(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),a=n.toHsl();return i.h!==a.h?r==="asc"?i.h-a.h:a.h-i.h:i.s!==a.s?r==="asc"?i.s-a.s:a.s-i.s:r==="asc"?i.l-a.l:a.l-i.l},Hg={type:"color",render:Z1,Edit:"color",sort:Q1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,_e,Se],format:{},getValueFormatted:ht,validate:{required:Ve,elements:ye,custom:X1}};var zg={type:"url",render:Re,Edit:"url",sort:ur,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[_e,Se],validOperators:[Ce,Ee,$t,Kt,Zt,_e,Se,ot,nt],format:{},getValueFormatted:ht,validate:{required:Ve,pattern:fr,minLength:cr,maxLength:dr,elements:ye}};var J1=(e,t,r)=>typeof e=="number"&&typeof t=="number"?bn(e,t,r):ur(e,t,r),Wg={render:Re,Edit:null,sort:J1,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Ce,Ee],validOperators:Lv(),format:{},getValueFormatted:ht,validate:{required:Ve,elements:ye}};function Gg(e,t){let r;e.isValid?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let o;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(o={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let a;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(a={constraint:e.isValid.minLength,validate:t.validate.minLength});let s;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(s={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let l;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(l={constraint:e.isValid?.pattern,validate:t.validate.pattern});let c=e.isValid?.custom??t.validate.custom;return{required:r,elements:o,min:n,max:i,minLength:a,maxLength:s,pattern:l,custom:c}}function Ug(e){return e.validOperators.reduce((t,r)=>{let o=ko(r);return o?.filter&&(t[r]=o.filter),t},{})}function e_(e,t){return{...t.format,...e.format}}var Yg=e_;function t_(e){let t=[wg,Sg,Tg,Og,Ig,Rg,Ng,Dg,Fg,Lg,Bg,Hg,zg].find(r=>r?.type===e);return t||Wg}function qg(e){return e.map(t=>{let r=t_(t.type),o=t.getValue||hg(t.id),n=function(i,a,s){let l=o({item:i}),c=o({item:a});return t.sort?t.sort(l,c,s):r.sort(l,c,s)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||gg(t.id),elements:t.elements,getElements:t.getElements,hasElements:Ws(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:pg(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:Gg(t,r),filterBy:vg(t,r.defaultOperators,r.validOperators),filter:Ug(r),format:Yg(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var Nt=u(z(),1),Ks=u(bt(),1);var Je=u(P(),1),r_=()=>!1,o_=Qr.filter(e=>e.isPicker),n_=e=>e.id,i_=[];function a_({search:e=!0,searchLabel:t=void 0}){return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(L,{direction:"row",align:"top",justify:"space-between",className:"dataviews__view-actions",gap:"xs",children:[(0,Je.jsxs)(L,{direction:"row",gap:"sm",justify:"start",className:"dataviews__search",children:[e&&(0,Je.jsx)(Rc,{label:t}),(0,Je.jsx)(gs,{})]}),(0,Je.jsx)(L,{direction:"row",gap:"xs",style:{flexShrink:0},children:(0,Je.jsx)(ph,{})})]}),(0,Je.jsx)(bs,{className:"dataviews-filters__container"}),(0,Je.jsx)(Pc,{}),(0,Je.jsx)(Nu,{})]})}function s_({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=i_,data:a,getItemId:s=n_,isLoading:l=!1,paginationInfo:c,defaultLayouts:f,selection:p,onChangeSelection:d,children:m,config:v={perPageSizes:[10,20,50,100]},itemListLabel:_,empty:h}){let{infiniteScrollHandler:b}=c,y=(0,Nt.useRef)(null),[A,V]=(0,Nt.useState)(0),R=(0,Ks.useResizeObserver)(O=>{V(O[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[M,k]=(0,Nt.useState)(null);function S(O){let x=typeof O=="function"?O(p):O;d&&d(x)}let I=(0,Nt.useMemo)(()=>qg(r),[r]),N=fi(I,e),g=(0,Nt.useMemo)(()=>(N||[]).some(O=>O.isPrimary||O.isLocked),[N]),[E,T]=(0,Nt.useState)(g);(0,Nt.useEffect)(()=>{g&&!E&&T(!0)},[g,E]),(0,Nt.useEffect)(()=>{if(!e.infiniteScrollEnabled||!y.current)return;let O=(0,Ks.throttle)(C=>{let F=C.target,D=F.scrollTop,W=F.scrollHeight,Q=F.clientHeight;D+Q>=W-100&&b?.()},100),x=y.current;return x.addEventListener("scroll",O),()=>{x.removeEventListener("scroll",O),O.cancel()}},[b,e.infiniteScrollEnabled]);let w=(0,Nt.useMemo)(()=>Object.fromEntries(Object.entries(f).filter(([O])=>o_.some(x=>x.type===O))),[f]);return w[e.type]?(0,Je.jsx)(q.Provider,{value:{view:e,onChangeView:t,fields:I,actions:i,data:a,isLoading:l,paginationInfo:c,isItemClickable:r_,selection:p,onChangeSelection:S,openedFilter:M,setOpenedFilter:k,getItemId:s,containerWidth:A,containerRef:y,resizeObserverRef:R,defaultLayouts:w,filters:N,isShowingFilter:E,setIsShowingFilter:T,config:v,itemListLabel:_,empty:h,hasInitiallyLoaded:!0,hasInfiniteScrollHandler:!!b},children:(0,Je.jsx)("div",{className:"dataviews-picker-wrapper",ref:y,children:m??(0,Je.jsx)(a_,{search:o,searchLabel:n})})}):null}var mr=s_;mr.BulkActionToolbar=Nu;mr.Filters=pi;mr.FiltersToggled=bs;mr.FiltersToggle=gs;mr.Layout=Pc;mr.LayoutSwitcher=Dc;mr.Pagination=Ru;mr.Search=Rc;mr.ViewConfig=kc;var Kc=mr;var $g=u(j(),1),Kg=u(G(),1),Zg=u(P(),1),l_={id:"alt_text",type:"text",label:(0,$g.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,Zg.jsx)(Kg.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),rows:2}),enableSorting:!1,filterBy:!1},Zc=l_;var rb=u(j(),1);var Xs=u(z(),1),Xg=u(j(),1);function Zs(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var Qs=u(P(),1);function Qg({item:e}){let[t,r]=(0,Xs.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,Xs.useEffect)(()=>{o&&o===n&&r(Zs(i)||n?.toString()||""),o||r((0,Xg.__)("(Unattached)"))},[o,n,i]),(0,Qs.jsx)(Qs.Fragment,{children:t})}var el=u(Pn(),1),tl=u(G(),1),Js=u(j(),1),Lo=u(z(),1),Jg=u(bt(),1),eb=u(qt(),1);var Xc=u(P(),1);function tb({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:Zs(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,Lo.useState)(r),[i,a]=(0,Lo.useState)([]),[s,l]=(0,Lo.useState)(!1),[c,f]=(0,Lo.useState)(e?.post?.toString()??null),p=(0,eb.useSelect)(h=>h(el.store).getPostTypes(),[]),d=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),n([])},m=async h=>{l(!0);let b=await(0,el.__experimentalFetchLinkSuggestions)(h,{type:"post",isInitialSuggestions:!0},{});a(b);let y=b.map(A=>({label:A.title,value:A.id.toString()}));n(y),l(!1)},v=h=>{if(!h){d();return}if(f(h),h){let b=i.find(y=>y.id===Number(h));if(b&&p){let y=p.find(V=>V.slug===b?.type),A={...y&&{type:y.slug},id:Number(h),title:{raw:b.title,rendered:b.title}};t({post:Number(h),_embedded:{...e?._embedded,"wp:attached-to":[A]}})}}},_=e.post?(0,Lo.createInterpolateElement)((0,Js.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,Xc.jsx)(tl.Button,{__next40pxDefaultSize:!0,onClick:d,variant:"link",accessibleWhenDisabled:!0})}):(0,Js.__)("Search for a post or page to attach this media to.");return(0,Xc.jsx)(tl.ComboboxControl,{className:"dataviews-media-field__attached-to",__next40pxDefaultSize:!0,isLoading:s,label:(0,Js.__)("Attached to"),help:_,value:c,options:o,onFilterValueChange:(0,Jg.debounce)(h=>m(h),300),onChange:v,hideLabelFromVision:!0})}var u_={id:"attached_to",type:"text",label:(0,rb.__)("Attached to"),Edit:tb,render:Qg,enableSorting:!1,filterBy:!1},Qc=u_;var ib=u(j(),1),ab=u(qt(),1),sb=u(Pn(),1);var ob=u(j(),1),wn=u(z(),1);var rl=u(G(),1),uo=u(P(),1);function nb({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,wn.useState)("loading");(0,wn.useEffect)(()=>{i("loading")},[o]);let a=(0,wn.useCallback)(l=>{l?.complete&&i("instant")},[]),s=()=>{n==="loading"&&i("loaded")};return(0,uo.jsxs)(rl.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,uo.jsx)("div",{className:Y("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,uo.jsx)("img",{ref:a,onLoad:s,alt:(0,ob.__)("Author avatar"),src:o})}),!o&&(0,uo.jsx)("div",{className:"media-author-field__icon",children:(0,uo.jsx)(rl.Icon,{icon:Al})}),(0,uo.jsx)("span",{className:"media-author-field__name",children:r})]})}var c_={label:(0,ib.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,ab.resolveSelect)(sb.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:nb,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]},readOnly:!0},Jc=c_;var lb=u(j(),1),ub=u(G(),1);function co(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var cb=u(P(),1),d_={id:"caption",type:"text",label:(0,lb.__)("Caption"),getValue:({item:e})=>co(e?.caption),render:({item:e})=>co(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,cb.jsx)(ub.TextareaControl,{label:e.label,value:co(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},ed=d_;var db=u(j(),1),fb=u(Or(),1),f_={id:"date",type:"datetime",label:(0,db.__)("Date added"),filterBy:{operators:["before","after"]},format:{datetime:(0,fb.getSettings)().formats.datetimeAbbreviated},readOnly:!0},td=f_;var mb=u(j(),1),pb=u(Or(),1),m_={id:"modified",type:"datetime",label:(0,mb.__)("Date modified"),filterBy:{operators:["before","after"]},format:{datetime:(0,pb.getSettings)().formats.datetimeAbbreviated},readOnly:!0},rd=m_;var vb=u(j(),1),hb=u(G(),1);var od=u(P(),1),p_={id:"description",type:"text",label:(0,vb.__)("Description"),getValue:({item:e})=>co(e?.description),render:({item:e})=>(0,od.jsx)("div",{children:co(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,od.jsx)(hb.TextareaControl,{label:e.label,value:co(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},nd=p_;var _b=u(j(),1),Sb=u(ol(),1);var nl=u(G(),1),xb=u(z(),1),wb=u(ol(),1),yn=u(P(),1),bb=15;function yb({item:e}){let t=(0,xb.useMemo)(()=>e?.source_url?(0,wb.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length>bb?(0,yn.jsx)(nl.Tooltip,{text:t,children:(0,yn.jsx)(nl.__experimentalTruncate,{limit:bb,ellipsizeMode:"tail",children:t})}):(0,yn.jsx)(yn.Fragment,{children:t}):""}var v_={id:"filename",type:"text",label:(0,_b.__)("File name"),getValue:({item:e})=>(0,Sb.getFilename)(e?.source_url||""),render:yb,enableSorting:!1,filterBy:!1,readOnly:!0},id=v_;var ut=u(j(),1),Eb=1024,Tb=1024*Eb,Ob=1024*Tb,Ab=1024*Ob,Ib=1024*Ab,Pb=1024*Ib,Rb=1024*Pb,h_=1024*Rb;function Cb(e,t,r=2){return(0,ut.sprintf)((0,ut._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function g_(e,t=2){if(e===0)return Cb(0,(0,ut._x)("B","unit symbol"),t);let r={[(0,ut._x)("YB","unit symbol")]:h_,[(0,ut._x)("ZB","unit symbol")]:Rb,[(0,ut._x)("EB","unit symbol")]:Pb,[(0,ut._x)("PB","unit symbol")]:Ib,[(0,ut._x)("TB","unit symbol")]:Ab,[(0,ut._x)("GB","unit symbol")]:Ob,[(0,ut._x)("MB","unit symbol")]:Tb,[(0,ut._x)("KB","unit symbol")]:Eb,[(0,ut._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return Cb(e/n,o,t);return""}var b_={id:"filesize",type:"text",label:(0,ut.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?g_(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},ad=b_;var _n=u(j(),1),x_={id:"media_dimensions",type:"text",label:(0,_n.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,_n.sprintf)((0,_n._x)("%1$s \xD7 %2$s","image dimensions"),e?.media_details?.width?.toString(),e?.media_details?.height?.toString()):"",isVisible:e=>!!(e?.media_details?.width&&e?.media_details?.height),enableSorting:!1,filterBy:!1,readOnly:!0},sd=x_;var Fb=u(j(),1);var Vb=u(qt(),1),Nb=u(Pn(),1),Sn=u(G(),1),Db=u(z(),1),kb=u(ol(),1);var xi=u(j(),1);function ld(e){return e.startsWith("image/")?{type:"image",label:(0,xi.__)("Image"),icon:Hl}:e.startsWith("video/")?{type:"video",label:(0,xi.__)("Video"),icon:iu}:e.startsWith("audio/")?{type:"audio",label:(0,xi.__)("Audio"),icon:xl}:{type:"application",label:(0,xi.__)("Application"),icon:Dl}}var pr=u(P(),1);function w_({item:e,filename:t}){return(0,pr.jsx)("div",{className:"dataviews-media-field__media-thumbnail",children:(0,pr.jsxs)(Sn.__experimentalVStack,{justify:"center",alignment:"center",className:"dataviews-media-field__media-thumbnail__stack",spacing:0,children:[(0,pr.jsx)(Sn.Icon,{className:"dataviews-media-field__media-thumbnail--icon",icon:ld(e.mime_type).icon,size:24}),!!t&&(0,pr.jsx)("div",{className:"dataviews-media-field__media-thumbnail__filename",children:(0,pr.jsx)(Sn.__experimentalTruncate,{className:"dataviews-media-field__media-thumbnail__filename__truncate",children:t})})]})})}function Mb({item:e,config:t}){let[r,o]=(0,Db.useState)(!1),n=(0,Vb.useSelect)(s=>{if(e.featured_media)return s(Nb.store).getEntityRecord("postType","attachment",e.featured_media)},[e.featured_media]),i=e.featured_media?n:e;if(!i)return null;let a=(0,kb.getFilename)(i.source_url||"");return r||ld(i.mime_type).type!=="image"?(0,pr.jsx)(w_,{item:i,filename:a||""}):(0,pr.jsx)("div",{className:"dataviews-media-field__media-thumbnail",children:(0,pr.jsx)("img",{className:"dataviews-media-field__media-thumbnail--image",src:i.source_url,srcSet:i?.media_details?.sizes?Object.values(i.media_details.sizes).map(s=>`${s.source_url} ${s.width}w`).join(", "):void 0,sizes:t?.sizes||"100vw",alt:i.alt_text||i.title.raw,onError:()=>o(!0)})})}var y_={id:"media_thumbnail",type:"media",label:(0,Fb.__)("Thumbnail"),render:Mb,enableSorting:!1,filterBy:!1},ud=y_;var Lb=u(j(),1),__={id:"mime_type",type:"text",label:(0,Lb.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},cd=__;var al=u(jb(),1),Ub=u(ll(),1);var Hb=u(pu(),1),{lock:zb,unlock:Wb}=(0,Hb.__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/media-utils");var fo=u(P(),1),{useEntityRecordsWithPermissions:S_}=Wb(yi.privateApis),Gb="pickerGrid",C_="pickerTable",wi="media-modal",il="media-modal-upload-progress";function Yb({allowedTypes:e,multiple:t=!1,value:r,onSelect:o,onClose:n,onUpload:i,title:a=(0,$e.__)("Select Media"),isOpen:s,isDismissible:l=!0,modalClass:c,search:f=!0,searchLabel:p=(0,$e.__)("Search media")}){let[d,m]=(0,gt.useState)(()=>r?Array.isArray(r)?r.map(String):[String(r)]:[]),{createSuccessNotice:v,createErrorNotice:_,createInfoNotice:h}=(0,_i.useDispatch)(al.store),{invalidateResolution:b}=(0,_i.useDispatch)(yi.store),[y,A]=(0,gt.useState)(()=>({type:Gb,fields:[],showTitle:!1,titleField:"title",mediaField:"media_thumbnail",search:"",page:1,perPage:20,filters:[],layout:{previewSize:170}})),V=(0,gt.useMemo)(()=>{let D={};return y.filters?.forEach(W=>{W.field==="media_type"&&(D.media_type=W.value),W.field==="author"&&(W.operator==="isAny"?D.author=W.value:W.operator==="isNone"&&(D.author_exclude=W.value)),(W.field==="date"||W.field==="modified")&&(W.operator==="before"?D.before=W.value:W.operator==="after"&&(D.after=W.value)),W.field==="mime_type"&&(D.mime_type=W.value)}),D.media_type||(D.media_type=e?.includes("*")?void 0:e),{per_page:y.perPage||20,page:y.page||1,status:"inherit",order:y.sort?.direction,orderby:y.sort?.field,search:y.search,_embed:"author,wp:attached-to",...D}},[y,e]),{records:R,isResolving:M,totalItems:k,totalPages:S}=S_("postType","attachment",V),I=(0,gt.useMemo)(()=>[{...ud,enableHiding:!1},{id:"title",type:"text",label:(0,$e.__)("Title"),getValue:({item:D})=>D.title.raw||D.title.rendered||(0,$e.__)("(no title)")},Zc,ed,nd,td,rd,Jc,id,ad,sd,cd,Qc],[]),N=(0,gt.useMemo)(()=>[{id:"select",label:t?(0,$e.__)("Select"):(0,$e.__)("Select"),isPrimary:!0,supportsBulk:t,async callback(){if(d.length===0)return;let D={include:d,per_page:-1},Q=(await(0,_i.resolveSelect)(yi.store).getEntityRecords("postType","attachment",D)??[]).map(kr).filter(Boolean),ge=t?Q:Q?.[0];o(ge)}}],[t,o,d]),g=(0,gt.useCallback)(()=>{n?.()},[n]),E=i||Vi,T=(0,gt.useCallback)(D=>{if(D.every(Q=>Q.id&&Q.url&&!(0,Ub.isBlobURL)(Q.url))&&D.length>0){v((0,$e.sprintf)((0,$e._n)("Uploaded %s file","Uploaded %s files",D.length),D.length.toLocaleString()),{type:"snackbar",context:wi,id:il});let Q=D.map(ge=>String(ge.id)).filter(Boolean);m(t?ge=>[...ge,...Q]:Q.slice(0,1)),b("getEntityRecords",["postType","attachment",V])}},[v,b,V,t]),w=(0,gt.useCallback)(D=>{_(D.message,{type:"snackbar",context:wi,id:il})},[_]),O=(0,gt.useCallback)(D=>{let W=D.target.files;if(W&&W.length>0){let Q=Array.from(W);h((0,$e.sprintf)((0,$e._n)("Uploading %s file","Uploading %s files",Q.length),Q.length.toLocaleString()),{type:"snackbar",context:wi,id:il,explicitDismiss:!0}),E({allowedTypes:e,filesList:Q,onFileChange:T,onError:w})}},[e,E,h,T,w]),x=(0,gt.useMemo)(()=>({totalItems:k,totalPages:S}),[k,S]),C=(0,gt.useMemo)(()=>({[Gb]:{fields:[],showTitle:!1},[C_]:{fields:["filename","filesize","media_dimensions","author","date"],showTitle:!0}}),[]),F=(0,gt.useMemo)(()=>{if(!e?.includes("*"))return e?.join(",")},[e]);return s?(0,fo.jsxs)(mo.Modal,{title:a,onRequestClose:g,isDismissible:l,className:c,overlayClassName:"media-upload-modal",size:"fill",headerActions:(0,fo.jsx)(mo.FormFileUpload,{accept:F,multiple:!0,onChange:O,__next40pxDefaultSize:!0,render:({openFileDialog:D})=>(0,fo.jsx)(mo.Button,{onClick:D,icon:ou,__next40pxDefaultSize:!0,children:(0,$e.__)("Upload media")})}),children:[(0,fo.jsx)(mo.DropZone,{onFilesDrop:D=>{let W=D;e&&!e.includes("*")&&(W=D.filter(Q=>e.some(ge=>Q.type===ge||Q.type.startsWith(ge.replace("*",""))))),W.length>0&&(h((0,$e.sprintf)((0,$e._n)("Uploading %s file","Uploading %s files",W.length),W.length.toLocaleString()),{type:"snackbar",context:wi,id:il,explicitDismiss:!0}),E({allowedTypes:e,filesList:W,onFileChange:T,onError:w}))},label:(0,$e.__)("Drop files to upload")}),(0,fo.jsx)(Kc,{data:R||[],fields:I,view:y,onChangeView:A,actions:N,selection:d,onChangeSelection:m,isLoading:M,paginationInfo:x,defaultLayouts:C,getItemId:D=>String(D.id),search:f,searchLabel:p,itemListLabel:(0,$e.__)("Media items")}),(0,fo.jsx)(al.SnackbarNotices,{className:"media-upload-modal__snackbar",context:wi})]}):null}var dd={};zb(dd,{sideloadMedia:Od,MediaUploadModal:Yb});return nx(E_);})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/;
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/patterns.min.js?ver=714c49ed2942c98d088f 
var wp;(wp||={}).patterns=(()=>{var wa=Object.create;var bt=Object.defineProperty;var ka=Object.getOwnPropertyDescriptor;var Ca=Object.getOwnPropertyNames;var xa=Object.getPrototypeOf,Ta=Object.prototype.hasOwnProperty;var k=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports),jt=(t,a)=>{for(var r in a)bt(t,r,{get:a[r],enumerable:!0})},le=(t,a,r,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Ca(a))!Ta.call(t,o)&&o!==r&&bt(t,o,{get:()=>a[o],enumerable:!(f=ka(a,o))||f.enumerable});return t};var e=(t,a,r)=>(r=t!=null?wa(xa(t)):{},le(a||!t||!t.__esModule?bt(r,"default",{value:t,enumerable:!0}):r,t)),Pa=t=>le(bt({},"__esModule",{value:!0}),t);var R=k((Va,fe)=>{fe.exports=window.wp.data});var _t=k((qa,de)=>{de.exports=window.wp.blocks});var q=k((Ha,ue)=>{ue.exports=window.wp.coreData});var J=k((Ga,ne)=>{ne.exports=window.wp.blockEditor});var be=k((Qa,ye)=>{ye.exports=window.wp.privateApis});var M=k((ar,Se)=>{Se.exports=window.wp.components});var I=k((rr,we)=>{we.exports=window.wp.element});var B=k((or,ke)=>{ke.exports=window.wp.i18n});var C=k((lr,Ce)=>{Ce.exports=window.ReactJSXRuntime});var ft=k((dr,Re)=>{Re.exports=window.wp.notices});var De=k((ur,Be)=>{Be.exports=window.wp.compose});var Tt=k((nr,Ne)=>{Ne.exports=window.wp.htmlEntities});var $e=k((Tr,Qe)=>{Qe.exports=window.wp.primitives});var aa=k((Mr,ea)=>{ea.exports=window.wp.url});var te=k((Yr,ma)=>{ma.exports=window.wp.a11y});var za={};jt(za,{privateApis:()=>va,store:()=>L});var Ct=e(R(),1);var ie=e(R(),1);function Ea(t={},a){return a?.type==="SET_EDITING_PATTERN"?{...t,[a.clientId]:a.isEditing}:t}var me=(0,ie.combineReducers)({isEditingPattern:Ea});var zt={};jt(zt,{convertSyncedPatternToStatic:()=>Da,createPattern:()=>Ra,createPatternFromFile:()=>Ba,setEditingPattern:()=>Na});var kt=e(_t(),1),he=e(q(),1),wt=e(J(),1);var et={theme:"pattern",user:"wp_block"},vt="all-patterns",pe="my-patterns",ce=["core","pattern-directory/core","pattern-directory/featured"],S={full:"fully",unsynced:"unsynced"},St="core/pattern-overrides";var Ra=(t,a,r,f)=>async({registry:o})=>{let d=a===S.unsynced?{wp_pattern_sync_status:a}:void 0,i={title:t,content:r,status:"publish",meta:d,wp_pattern_category:f};return await o.dispatch(he.store).saveEntityRecord("postType","wp_block",i)},Ba=(t,a)=>async({dispatch:r})=>{let f=await t.text(),o;try{o=JSON.parse(f)}catch{throw new Error("Invalid JSON file")}if(o.__file!=="wp_block"||!o.title||!o.content||typeof o.title!="string"||typeof o.content!="string"||o.syncStatus&&typeof o.syncStatus!="string")throw new Error("Invalid pattern JSON file");return await r.createPattern(o.title,o.syncStatus,o.content,a)},Da=t=>({registry:a})=>{let r=a.select(wt.store).getBlock(t),f=r.attributes?.content;function o(i){return i.map(s=>{let l=s.attributes.metadata;if(l&&(l={...l},delete l.id,delete l.bindings,f?.[l.name]))for(let[m,n]of Object.entries(f[l.name]))(0,kt.getBlockType)(s.name)?.attributes[m]&&(s.attributes[m]=n);return(0,kt.cloneBlock)(s,{metadata:l&&Object.keys(l).length>0?l:void 0},o(s.innerBlocks))})}let d=a.select(wt.store).getBlocks(r.clientId);a.dispatch(wt.store).replaceBlocks(r.clientId,o(d))};function Na(t,a){return{type:"SET_EDITING_PATTERN",clientId:t,isEditing:a}}var ge="core/patterns";var Ft={};jt(Ft,{isEditingPattern:()=>Aa});function Aa(t,a){return t.isEditingPattern[a]}var _e=e(be(),1),{lock:ve,unlock:O}=(0,_e.__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/patterns");var Oa={reducer:me},L=(0,Ct.createReduxStore)(ge,{...Oa});(0,Ct.register)(L);O(L).registerPrivateActions(zt);O(L).registerPrivateSelectors(Ft);var lt=e(J(),1),xe=e(M(),1),Vt=e(R(),1),Te=e(I(),1),Pe=e(B(),1);function xt(t){return!!t.attributes.metadata?.name&&!!t.attributes.metadata?.bindings&&Object.values(t.attributes.metadata.bindings).some(a=>a.source==="core/pattern-overrides")}var Yt=e(C(),1),{BlockQuickNavigation:La}=O(lt.privateApis);function Ee(){let{allClientIds:t,supportedBlockTypesRaw:a}=(0,Vt.useSelect)(o=>({allClientIds:o(lt.store).getClientIdsWithDescendants(),supportedBlockTypesRaw:o(lt.store).getSettings()?.__experimentalBlockBindingsSupportedAttributes}),[]),{getBlock:r}=(0,Vt.useSelect)(lt.store),f=(0,Te.useMemo)(()=>{let o=Object.keys(a??{});return t.filter(d=>{let i=r(d);return o.includes(i.name)&&xt(i)})},[t,r,a]);return f?.length?(0,Yt.jsx)(xe.PanelBody,{title:(0,Pe.__)("Overrides"),children:(0,Yt.jsx)(La,{clientIds:f})}):null}var P=e(M(),1),X=e(B(),1),ut=e(I(),1),nt=e(R(),1),ze=e(ft(),1),Fe=e(q(),1);var Ae=e(B(),1),Pt=e(I(),1),Oe=e(M(),1),Le=e(De(),1),Me=e(Tt(),1),Ie=e(C(),1),Ma=t=>(0,Me.decodeEntities)(t),Et="wp_pattern_category";function Ue({categoryTerms:t,onChange:a,categoryMap:r}){let[f,o]=(0,Pt.useState)(""),d=(0,Le.useDebounce)(o,500),i=(0,Pt.useMemo)(()=>Array.from(r.values()).map(l=>Ma(l.label)).filter(l=>f!==""?l.toLowerCase().includes(f.toLowerCase()):!0).sort((l,m)=>l.localeCompare(m)),[f,r]);function s(l){let m=l.reduce((n,p)=>(n.some(h=>h.toLowerCase()===p.toLowerCase())||n.push(p),n),[]);a(m)}return(0,Ie.jsx)(Oe.FormTokenField,{className:"patterns-menu-items__convert-modal-categories",value:t,suggestions:i,onChange:s,onInputChange:d,label:(0,Ae.__)("Categories"),tokenizeOnBlur:!0,__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0})}var Rt=e(R(),1),qt=e(q(),1),je=e(I(),1);function Bt(){let{saveEntityRecord:t,invalidateResolution:a}=(0,Rt.useDispatch)(qt.store),{corePatternCategories:r,userPatternCategories:f}=(0,Rt.useSelect)(i=>{let{getUserPatternCategories:s,getBlockPatternCategories:l}=i(qt.store);return{corePatternCategories:l(),userPatternCategories:s()}},[]),o=(0,je.useMemo)(()=>{let i=new Map;return f.forEach(s=>{i.set(s.label.toLowerCase(),{label:s.label,name:s.name,id:s.id})}),r.forEach(s=>{!i.has(s.label.toLowerCase())&&s.name!=="query"&&i.set(s.label.toLowerCase(),{label:s.label,name:s.name})}),i},[f,r]);async function d(i){try{let s=o.get(i.toLowerCase());if(s?.id)return s.id;let l=s?{name:s.label,slug:s.name}:{name:i},m=await t("taxonomy",Et,l,{throwOnError:!0});return a("getUserPatternCategories"),m.id}catch(s){if(s.code!=="term_exists")throw s;return s.data.term_id}}return{categoryMap:o,findOrCreateTerm:d}}var D=e(C(),1);function it({className:t="patterns-menu-items__convert-modal",modalTitle:a,...r}){let f=(0,nt.useSelect)(o=>o(Fe.store).getPostType(et.user)?.labels?.add_new_item,[]);return(0,D.jsx)(P.Modal,{title:a||f,onRequestClose:r.onClose,overlayClassName:t,focusOnMount:"firstContentElement",size:"small",children:(0,D.jsx)(Ht,{...r})})}function Ht({confirmLabel:t=(0,X.__)("Add"),defaultCategories:a=[],content:r,onClose:f,onError:o,onSuccess:d,defaultSyncType:i=S.full,defaultTitle:s=""}){let[l,m]=(0,ut.useState)(i),[n,p]=(0,ut.useState)(a),[h,_]=(0,ut.useState)(s),[u,c]=(0,ut.useState)(!1),{createPattern:T}=O((0,nt.useDispatch)(L)),{createErrorNotice:v}=(0,nt.useDispatch)(ze.store),{categoryMap:z,findOrCreateTerm:A}=Bt();async function w(E,tt){if(!(!h||u))try{c(!0);let y=await Promise.all(n.map(W=>A(W))),oe=await T(E,tt,typeof r=="function"?r():r,y);d({pattern:oe,categoryId:vt})}catch(y){v(y.message,{type:"snackbar",id:"pattern-create"}),o?.()}finally{c(!1),p([]),_("")}}return(0,D.jsx)("form",{onSubmit:E=>{E.preventDefault(),w(h,l)},children:(0,D.jsxs)(P.__experimentalVStack,{spacing:"5",children:[(0,D.jsx)(P.TextControl,{label:(0,X.__)("Name"),value:h,onChange:_,placeholder:(0,X.__)("My pattern"),className:"patterns-create-modal__name-input",__next40pxDefaultSize:!0}),(0,D.jsx)(Ue,{categoryTerms:n,onChange:p,categoryMap:z}),(0,D.jsx)(P.ToggleControl,{label:(0,X._x)("Synced","pattern (singular)"),help:(0,X.__)("Sync this pattern across multiple locations."),checked:l===S.full,onChange:()=>{m(l===S.full?S.unsynced:S.full)}}),(0,D.jsxs)(P.__experimentalHStack,{justify:"right",children:[(0,D.jsx)(P.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{f(),_("")},children:(0,X.__)("Cancel")}),(0,D.jsx)(P.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!h||u,isBusy:u,children:t})]})]})})}var Ve=e(q(),1),Dt=e(R(),1),H=e(B(),1),Ye=e(ft(),1);var qe=e(C(),1);function Ia(t,a){return t.type!==et.user?a.core?.filter(r=>t.categories?.includes(r.name)).map(r=>r.label):a.user?.filter(r=>t.wp_pattern_category?.includes(r.id)).map(r=>r.label)}function Gt({pattern:t,onSuccess:a}){let{createSuccessNotice:r}=(0,Dt.useDispatch)(Ye.store),f=(0,Dt.useSelect)(o=>{let{getUserPatternCategories:d,getBlockPatternCategories:i}=o(Ve.store);return{core:i(),user:d()}});return t?{content:t.content,defaultCategories:Ia(t,f),defaultSyncType:t.type!==et.user?S.unsynced:t.wp_pattern_sync_status||S.full,defaultTitle:(0,H.sprintf)((0,H._x)("%s (Copy)","pattern"),typeof t.title=="string"?t.title:t.title.raw),onSuccess:({pattern:o})=>{r((0,H.sprintf)((0,H._x)('"%s" duplicated.',"pattern"),o.title.raw),{type:"snackbar",id:"patterns-create"}),a?.({pattern:o})}}:null}function He({pattern:t,onClose:a,onSuccess:r}){let f=Gt({pattern:t,onSuccess:r});return t?(0,qe.jsx)(it,{modalTitle:(0,H.__)("Duplicate pattern"),confirmLabel:(0,H.__)("Duplicate"),onClose:a,onError:a,...f}):null}var U=e(M(),1),Ge=e(q(),1),Wt=e(R(),1),Jt=e(I(),1),We=e(Tt(),1),at=e(B(),1),Je=e(ft(),1),G=e(C(),1);function Xe({onClose:t,onError:a,onSuccess:r,pattern:f,...o}){let d=(0,We.decodeEntities)(f.title),[i,s]=(0,Jt.useState)(d),[l,m]=(0,Jt.useState)(!1),{editEntityRecord:n,__experimentalSaveSpecifiedEntityEdits:p}=(0,Wt.useDispatch)(Ge.store),{createSuccessNotice:h,createErrorNotice:_}=(0,Wt.useDispatch)(Je.store),u=async T=>{if(T.preventDefault(),!(!i||i===f.title||l))try{await n("postType",f.type,f.id,{title:i}),m(!0),s(""),t?.();let v=await p("postType",f.type,f.id,["title"],{throwOnError:!0});r?.(v),h((0,at.__)("Pattern renamed"),{type:"snackbar",id:"pattern-update"})}catch(v){a?.();let z=v.message&&v.code!=="unknown_error"?v.message:(0,at.__)("An error occurred while renaming the pattern.");_(z,{type:"snackbar",id:"pattern-update"})}finally{m(!1),s("")}},c=()=>{t?.(),s("")};return(0,G.jsx)(U.Modal,{title:(0,at.__)("Rename"),...o,onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,G.jsx)("form",{onSubmit:u,children:(0,G.jsxs)(U.__experimentalVStack,{spacing:"5",children:[(0,G.jsx)(U.TextControl,{__next40pxDefaultSize:!0,label:(0,at.__)("Name"),value:i,onChange:s,required:!0}),(0,G.jsxs)(U.__experimentalHStack,{justify:"right",children:[(0,G.jsx)(U.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,at.__)("Cancel")}),(0,G.jsx)(U.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,at.__)("Save")})]})]})})})}var fa=e(J(),1);var F=e(_t(),1),pt=e(J(),1),At=e(I(),1),Ke=e(M(),1);var Nt=e($e(),1),Xt=e(C(),1),Qt=(0,Xt.jsx)(Nt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Xt.jsx)(Nt.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 Q=e(R(),1),$t=e(q(),1),rt=e(B(),1),Ze=e(ft(),1);var ot=e(C(),1);function ta({clientIds:t,rootClientId:a,closeBlockSettingsMenu:r}){let{createSuccessNotice:f}=(0,Q.useDispatch)(Ze.store),{replaceBlocks:o,updateBlockAttributes:d}=(0,Q.useDispatch)(pt.store),{setEditingPattern:i}=O((0,Q.useDispatch)(L)),[s,l]=(0,At.useState)(!1),{getBlockAttributes:m}=(0,Q.useSelect)(pt.store),n=(0,Q.useSelect)(u=>{let{canUser:c}=u($t.store),{getBlocksByClientId:T,canInsertBlockType:v,getBlockRootClientId:z}=u(pt.store),A=a||(t.length>0?z(t[0]):void 0),w=T(t)??[],E=W=>{let se=(0,F.getBlockType)(W),Sa=se&&"parent"in se;return(0,F.hasBlockSupport)(W,"reusable",!Sa)},tt=w.length===1&&w[0]&&(0,F.isReusableBlock)(w[0])&&!!u($t.store).getEntityRecord("postType","wp_block",w[0].attributes.ref);return!(w.length===1&&w?.[0]?.attributes?.metadata?.patternName)&&!tt&&v("core/block",A)&&w.every(W=>!!W&&W.isValid&&E(W.name))&&!!c("create",{kind:"postType",name:"wp_block"})},[t,a]),{getBlocksByClientId:p}=(0,Q.useSelect)(pt.store),h=(0,At.useCallback)(()=>(0,F.serialize)(p(t)),[p,t]);if(!n)return null;let _=({pattern:u})=>{if(u.wp_pattern_sync_status===S.unsynced){if(t?.length===1){let c=m(t[0]);d(t[0],{metadata:{...c?.metadata?c.metadata:{},patternName:`core/block/${u.id}`,name:u.title.raw}})}}else{let c=(0,F.createBlock)("core/block",{ref:u.id});o(t,c),i(c.clientId,!0)}f(u.wp_pattern_sync_status===S.unsynced?(0,rt.sprintf)((0,rt.__)("Unsynced pattern created: %s"),u.title.raw):(0,rt.sprintf)((0,rt.__)("Synced pattern created: %s"),u.title.raw),{type:"snackbar",id:"convert-to-pattern-success"}),l(!1),r()};return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)(Ke.MenuItem,{icon:Qt,onClick:()=>l(!0),"aria-expanded":s,"aria-haspopup":"dialog",children:(0,rt.__)("Create pattern")}),s&&(0,ot.jsx)(it,{content:h,onSuccess:u=>{_(u)},onError:()=>{l(!1)},onClose:()=>{l(!1),r()}})]})}var ct=e(M(),1),st=e(B(),1),ra=e(_t(),1),ht=e(R(),1),oa=e(I(),1),Kt=e(J(),1),Zt=e(aa(),1),sa=e(q(),1);var V=e(C(),1);function Ua({clientId:t,onClose:a}){let[r,f]=(0,oa.useState)(!1),{attributes:o,canDetach:d,isVisible:i,managePatternsUrl:s,isSyncedPattern:l,isUnsyncedPattern:m,canEdit:n}=(0,ht.useSelect)(u=>{let{canRemoveBlock:c,getBlock:T,canEditBlock:v}=u(Kt.store),{canUser:z}=u(sa.store),A=T(t),w=!!A?.attributes?.metadata?.patternName,E=!!A&&(0,ra.isReusableBlock)(A)&&!!z("update",{kind:"postType",name:"wp_block",id:A.attributes.ref});return{attributes:A.attributes,canEdit:v(t),canDetach:w||E&&c(t),isUnsyncedPattern:w,isSyncedPattern:E,isVisible:w||E,managePatternsUrl:z("create",{kind:"postType",name:"wp_template"})?(0,Zt.addQueryArgs)("site-editor.php",{p:"/pattern"}):(0,Zt.addQueryArgs)("edit.php",{post_type:"wp_block"})}},[t]),{updateBlockAttributes:p}=(0,ht.useDispatch)(Kt.store),{convertSyncedPatternToStatic:h}=O((0,ht.useDispatch)(L));if(!i||!n)return null;let _=()=>{if(l&&h(t),m){let{patternName:u,...c}=o?.metadata??{};p(t,{metadata:c})}a?.(),f(!1)};return(0,V.jsxs)(V.Fragment,{children:[d&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ct.MenuItem,{onClick:()=>f(!0),children:(0,st.__)("Detach")}),(0,V.jsx)(ct.__experimentalConfirmDialog,{isOpen:r,onConfirm:_,onCancel:()=>f(!1),confirmButtonText:(0,st.__)("Detach"),size:"medium",title:(0,st.__)("Detach pattern?"),__experimentalHideHeader:!1,children:l?(0,st.__)("The blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here."):(0,st.__)("Blocks will no longer be associated with this pattern and will be fully editable.")})]}),(0,V.jsx)(ct.MenuItem,{href:s,children:(0,st.__)("Manage patterns")})]})}var la=Ua;var $=e(C(),1);function ia({rootClientId:t}){return(0,$.jsx)(fa.BlockSettingsMenuControls,{children:({selectedClientIds:a,onClose:r})=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ta,{clientIds:a,rootClientId:t,closeBlockSettingsMenu:r}),a.length===1&&(0,$.jsx)(la,{clientId:a[0],onClose:r})]})})}var N=e(M(),1),da=e(q(),1),ee=e(R(),1),Z=e(I(),1),ua=e(Tt(),1),K=e(B(),1),na=e(ft(),1),ae=e(te(),1);var j=e(C(),1);function pa({category:t,existingCategories:a,onClose:r,onError:f,onSuccess:o,...d}){let i=(0,Z.useId)(),s=(0,Z.useRef)(),[l,m]=(0,Z.useState)((0,ua.decodeEntities)(t.name)),[n,p]=(0,Z.useState)(!1),[h,_]=(0,Z.useState)(!1),u=h?`patterns-rename-pattern-category-modal__validation-message-${i}`:void 0,{saveEntityRecord:c,invalidateResolution:T}=(0,ee.useDispatch)(da.store),{createErrorNotice:v,createSuccessNotice:z}=(0,ee.useDispatch)(na.store),A=tt=>{h&&_(void 0),m(tt)},w=async tt=>{if(tt.preventDefault(),!n){if(!l||l===t.name){let y=(0,K.__)("Please enter a new name for this category.");(0,ae.speak)(y,"assertive"),_(y),s.current?.focus();return}if(a.patternCategories.find(y=>y.id!==t.id&&y.label.toLowerCase()===l.toLowerCase())){let y=(0,K.__)("This category already exists. Please use a different name.");(0,ae.speak)(y,"assertive"),_(y),s.current?.focus();return}try{p(!0);let y=await c("taxonomy",Et,{id:t.id,slug:t.slug,name:l});T("getUserPatternCategories"),o?.(y),r(),z((0,K.__)("Pattern category renamed."),{type:"snackbar",id:"pattern-category-update"})}catch(y){f?.(),v(y.message,{type:"snackbar",id:"pattern-category-update"})}finally{p(!1),m("")}}},E=()=>{r(),m("")};return(0,j.jsx)(N.Modal,{title:(0,K.__)("Rename"),onRequestClose:E,...d,children:(0,j.jsx)("form",{onSubmit:w,children:(0,j.jsxs)(N.__experimentalVStack,{spacing:"5",children:[(0,j.jsxs)(N.__experimentalVStack,{spacing:"2",children:[(0,j.jsx)(N.TextControl,{ref:s,__next40pxDefaultSize:!0,label:(0,K.__)("Name"),value:l,onChange:A,"aria-describedby":u,required:!0}),h&&(0,j.jsx)("span",{className:"patterns-rename-pattern-category-modal__validation-message",id:u,children:h})]}),(0,j.jsxs)(N.__experimentalHStack,{justify:"right",children:[(0,j.jsx)(N.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:E,children:(0,K.__)("Cancel")}),(0,j.jsx)(N.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!l||l===t.name||n,isBusy:n,children:(0,K.__)("Save")})]})]})})})}var yt=e(I(),1),Ot=e(J(),1),Lt=e(M(),1),mt=e(B(),1);var g=e(M(),1),x=e(B(),1),gt=e(I(),1),ca=e(te(),1),b=e(C(),1);function ha({placeholder:t,initialName:a="",onClose:r,onSave:f}){let[o,d]=(0,gt.useState)(a),i=(0,gt.useId)(),s=!!o.trim(),l=()=>{if(o!==a){let m=(0,x.sprintf)((0,x.__)('Block name changed to: "%s".'),o);(0,ca.speak)(m,"assertive")}f(o),r()};return(0,b.jsx)(g.Modal,{title:(0,x.__)("Enable overrides"),onRequestClose:r,focusOnMount:"firstContentElement",aria:{describedby:i},size:"small",children:(0,b.jsx)("form",{onSubmit:m=>{m.preventDefault(),s&&l()},children:(0,b.jsxs)(g.__experimentalVStack,{spacing:"6",children:[(0,b.jsx)(g.__experimentalText,{id:i,children:(0,x.__)("Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override.")}),(0,b.jsx)(g.TextControl,{__next40pxDefaultSize:!0,value:o,label:(0,x.__)("Name"),help:(0,x.__)('For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'),placeholder:t,onChange:d}),(0,b.jsxs)(g.__experimentalHStack,{justify:"right",children:[(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,x.__)("Cancel")}),(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,"aria-disabled":!s,variant:"primary",type:"submit",children:(0,x.__)("Enable")})]})]})})})}function ga({onClose:t,onSave:a}){let r=(0,gt.useId)();return(0,b.jsx)(g.Modal,{title:(0,x.__)("Disable overrides"),onRequestClose:t,aria:{describedby:r},size:"small",children:(0,b.jsx)("form",{onSubmit:f=>{f.preventDefault(),a(),t()},children:(0,b.jsxs)(g.__experimentalVStack,{spacing:"6",children:[(0,b.jsx)(g.__experimentalText,{id:r,children:(0,x.__)("Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern.")}),(0,b.jsxs)(g.__experimentalHStack,{justify:"right",children:[(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,x.__)("Cancel")}),(0,b.jsx)(g.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,x.__)("Disable")})]})]})})})}var Y=e(C(),1);function ja({attributes:t,setAttributes:a,name:r}){let f=(0,yt.useId)(),[o,d]=(0,yt.useState)(!1),[i,s]=(0,yt.useState)(!1),l=!!t.metadata?.name,m=t.metadata?.bindings?.__default,n=l&&m?.source===St,p=m?.source&&m.source!==St,{updateBlockBindings:h}=(0,Ot.useBlockBindingsUtils)();function _(T,v){v&&a({metadata:{...t.metadata,name:v}}),h({__default:T?{source:St}:void 0})}if(p)return null;let u=r==="core/image"&&!!t.href?.length,c=!n&&u?(0,mt.__)("Overrides currently don't support image links. Remove the link first before enabling overrides."):(0,mt.__)("Allow changes to this block throughout instances of this pattern.");return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ot.InspectorControls,{group:"advanced",children:(0,Y.jsx)(Lt.BaseControl,{id:f,label:(0,mt.__)("Overrides"),help:c,children:(0,Y.jsx)(Lt.Button,{__next40pxDefaultSize:!0,className:"pattern-overrides-control__allow-overrides-button",variant:"secondary","aria-haspopup":"dialog",onClick:()=>{n?s(!0):d(!0)},disabled:!n&&u,accessibleWhenDisabled:!0,children:n?(0,mt.__)("Disable overrides"):(0,mt.__)("Enable overrides")})})}),o&&(0,Y.jsx)(ha,{initialName:t.metadata?.name,onClose:()=>d(!1),onSave:T=>{_(!0,T)}}),i&&(0,Y.jsx)(ga,{onClose:()=>s(!1),onSave:()=>_(!1)})]})}var ya=ja;var dt=e(J(),1),It=e(M(),1),Ut=e(R(),1),ba=e(B(),1),Mt=e(C(),1),re="content";function _a(t){let a=t.attributes.metadata?.name,r=(0,Ut.useRegistry)(),f=(0,Ut.useSelect)(d=>{if(!a)return;let{getBlockAttributes:i,getBlockParentsByBlockName:s}=d(dt.store),[l]=s(t.clientId,"core/block",!0);if(!l)return;let m=i(l)[re];if(m)return m.hasOwnProperty(a)},[t.clientId,a]);function o(){let{getBlockAttributes:d,getBlockParentsByBlockName:i}=r.select(dt.store),[s]=i(t.clientId,"core/block",!0);if(!s)return;let l=d(s)[re];if(!l.hasOwnProperty(a))return;let{updateBlockAttributes:m,__unstableMarkLastChangeAsPersistent:n}=r.dispatch(dt.store);n();let p={...l};delete p[a],Object.keys(p).length||(p=void 0),m(s,{[re]:p})}return(0,Mt.jsx)(dt.__unstableBlockToolbarLastItem,{children:(0,Mt.jsx)(It.ToolbarGroup,{children:(0,Mt.jsx)(It.ToolbarButton,{onClick:o,disabled:!f,children:(0,ba.__)("Reset")})})})}var va={};ve(va,{OverridesPanel:Ee,CreatePatternModal:it,CreatePatternModalContents:Ht,DuplicatePatternModal:He,isOverridableBlock:xt,useDuplicatePatternProps:Gt,RenamePatternModal:Xe,PatternsMenuItems:ia,RenamePatternCategoryModal:pa,PatternOverridesControls:ya,ResetOverridesControl:_a,useAddPatternCategory:Bt,PATTERN_TYPES:et,PATTERN_DEFAULT_CATEGORY:vt,PATTERN_USER_CATEGORY:pe,EXCLUDED_PATTERN_SOURCES:ce,PATTERN_SYNC_TYPES:S});return Pa(za);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/plugins.min.js?ver=72e3cf01c2b3535a9432 
"use strict";var wp;(wp||={}).plugins=(()=>{var K=Object.create;var g=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,aa=Object.prototype.hasOwnProperty;var d=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),ta=(a,t)=>{for(var r in t)g(a,r,{get:t[r],enumerable:!0})},B=(a,t,r,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Y(t))!aa.call(a,o)&&o!==r&&g(a,o,{get:()=>t[o],enumerable:!(f=Q(t,o))||f.enumerable});return a};var s=(a,t,r)=>(r=a!=null?K(Z(a)):{},B(t||!a||!a.__esModule?g(r,"default",{value:a,enumerable:!0}):r,a)),ea=a=>B(g({},"__esModule",{value:!0}),a);var h=d((ia,T)=>{T.exports=window.wp.element});var P=d((pa,A)=>{A.exports=window.wp.hooks});var z=d((na,V)=>{V.exports=window.wp.isShallowEqual});var j=d((ca,E)=>{E.exports=window.wp.compose});var F=d((ga,U)=>{U.exports=window.wp.deprecated});var v=d((ha,H)=>{H.exports=window.ReactJSXRuntime});var W=d((ba,J)=>{J.exports=window.wp.primitives});var ua={};ta(ua,{PluginArea:()=>X,getPlugin:()=>oa,getPlugins:()=>S,registerPlugin:()=>ra,unregisterPlugin:()=>fa,usePluginContext:()=>O,withPluginContext:()=>M});function D(a,t){var r=0,f,o;t=t||{};function l(){var e=f,C=arguments.length,c,u;a:for(;e;){if(e.args.length!==arguments.length){e=e.next;continue}for(u=0;u<C;u++)if(e.args[u]!==arguments[u]){e=e.next;continue a}return e!==f&&(e===o&&(o=e.prev),e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.next=f,e.prev=null,f.prev=e,f=e),e.val}for(c=new Array(C),u=0;u<C;u++)c[u]=arguments[u];return e={args:c,val:a.apply(null,c)},f?(f.prev=e,e.next=f):o=e,r===t.maxSize?(o=o.prev,o.next=null):r++,f=e,e.val}return l.clear=function(){f=null,o=null,r=0},l}var y=s(h(),1),i=s(P(),1),G=s(z(),1);var w=s(h(),1),N=s(j(),1),q=s(F(),1),L=s(v(),1),x=(0,w.createContext)({name:null,icon:null});x.displayName="PluginContext";var I=x.Provider;function O(){return(0,w.useContext)(x)}var M=a=>(0,N.createHigherOrderComponent)(t=>((0,q.default)("wp.plugins.withPluginContext",{since:"6.8.0",alternative:"wp.plugins.usePluginContext"}),r=>(0,L.jsx)(x.Consumer,{children:f=>(0,L.jsx)(t,{...r,...a(f,r)})})),"withPluginContext");var _=s(h(),1),$=class extends _.Component{constructor(a){super(a),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a){let{name:t,onError:r}=this.props;r&&r(t,a)}render(){return this.state.hasError?null:this.props.children}};var p=s(P(),1);var b=s(W(),1),R=s(v(),1),k=(0,R.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R.jsx)(b.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})});var m={};function ra(a,t){if(typeof t!="object")return console.error("No settings object provided!"),null;if(typeof a!="string")return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(a))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;m[a]&&console.error(`Plugin "${a}" is already registered.`),t=(0,p.applyFilters)("plugins.registerPlugin",t,a);let{render:r,scope:f}=t;if(typeof r!="function")return console.error('The "render" property must be specified and must be a valid function.'),null;if(f){if(typeof f!="string")return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(f))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return m[a]={name:a,icon:k,...t},(0,p.doAction)("plugins.pluginRegistered",t,a),t}function fa(a){if(!m[a]){console.error('Plugin "'+a+'" is not registered.');return}let t=m[a];return delete m[a],(0,p.doAction)("plugins.pluginUnregistered",t,a),t}function oa(a){return m[a]}function S(a){return Object.values(m).filter(t=>t.scope===a)}var n=s(v(),1),la=D((a,t)=>({icon:a,name:t}));function sa({scope:a,onError:t}){let r=(0,y.useMemo)(()=>{let o=[];return{subscribe(l){return(0,i.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",l),(0,i.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",l),()=>{(0,i.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,i.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}},getValue(){let l=S(a);return(0,G.isShallowEqual)(o,l)||(o=l),o}}},[a]),f=(0,y.useSyncExternalStore)(r.subscribe,r.getValue,r.getValue);return(0,n.jsx)("div",{style:{display:"none"},children:f.map(({icon:o,name:l,render:e})=>(0,n.jsx)(I,{value:la(o,l),children:(0,n.jsx)($,{name:l,onError:t,children:(0,n.jsx)(e,{})})},l))})}var X=sa;return ea(ua);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/viewport.min.js?ver=8614025b8075d220d78f 
var wp;(wp||={}).viewport=(()=>{var H=Object.create;var d=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),v=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})},O=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $(t))!D.call(e,o)&&o!==r&&d(e,o,{get:()=>t[o],enumerable:!(a=L(t,o))||a.enumerable});return e};var n=(e,t,r)=>(r=e!=null?H(P(e)):{},O(t||!e||!e.__esModule?d(r,"default",{value:e,enumerable:!0}):r,e)),G=e=>O(d({},"__esModule",{value:!0}),e);var u=l((W,V)=>{V.exports=window.wp.compose});var M=l((Y,g)=>{g.exports=window.wp.data});var j=l((it,T)=>{T.exports=window.ReactJSXRuntime});var F={};v(F,{ifViewportMatches:()=>C,store:()=>c,withViewportMatch:()=>w});var S=n(u(),1),b=n(M(),1);var f=n(M(),1);function k(e={},t){return t.type==="SET_IS_MATCHING"?t.values:e}var R=k;var x={};v(x,{setIsMatching:()=>B});function B(e){return{type:"SET_IS_MATCHING",values:e}}var E={};v(E,{isViewportMatch:()=>J});function J(e,t){return t.indexOf(" ")===-1&&(t=">= "+t),!!e[t]}var K="core/viewport",c=(0,f.createReduxStore)(K,{reducer:R,actions:x,selectors:E});(0,f.register)(c);var Q=(e,t)=>{let r=(0,S.debounce)(()=>{let i=Object.fromEntries(o.map(([s,h])=>[s,h.matches]));(0,b.dispatch)(c).setIsMatching(i)},0,{leading:!0}),a=Object.entries(t),o=Object.entries(e).flatMap(([i,s])=>a.map(([h,N])=>{let _=window.matchMedia(`(${N}: ${s}px)`);return _.addEventListener("change",r),[`${h} ${i}`,_]}));window.addEventListener("orientationchange",r),r(),r.flush()},I=Q;var m=n(u(),1);var p=n(u(),1),A=n(j(),1),X=e=>{let t=Object.entries(e),r=()=>Object.fromEntries(t.map(([a,o])=>{let[i,s]=o.split(" ");return s===void 0&&(s=i,i=">="),[a,(0,p.useViewportMatch)(s,i)]}));return(0,p.createHigherOrderComponent)(a=>(0,p.pure)(o=>{let i=r();return(0,A.jsx)(a,{...o,...i})}),"withViewportMatch")},w=X;var q=e=>(0,m.createHigherOrderComponent)((0,m.compose)([w({isViewportMatch:e}),(0,m.ifCondition)(t=>t.isViewportMatch)]),"ifViewportMatches"),C=q;var y={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},z={"<":"max-width",">=":"min-width"};I(y,z);return G(F);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/wordcount.min.js?ver=3b928d5db8724a8614dd 
"use strict";var wp;(wp||={}).wordcount=(()=>{var s=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var b=(e,r)=>{for(var t in r)s(e,t,{get:r[t],enumerable:!0})},T=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of h(r))!R.call(e,o)&&o!==t&&s(e,o,{get:()=>r[o],enumerable:!(n=x(r,o))||n.enumerable});return e};var _=e=>T(s({},"__esModule",{value:!0}),e);var M={};b(M,{count:()=>L});var i={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/&nbsp;|&#160;/gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","\x80-\xBF\xD7\xF7","\u2000-\u2BFF","\u2E00-\u2E7F","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function a(e,r){return r.replace(e.HTMLRegExp,`
`)}function l(e,r){return r.replace(e.astralRegExp,"a")}function d(e,r){return r.replace(e.HTMLEntityRegExp,"")}function g(e,r){return r.replace(e.connectorRegExp," ")}function f(e,r){return r.replace(e.removeRegExp,"")}function c(e,r){return r.replace(e.HTMLcommentRegExp,"")}function p(e,r){return e.shortcodesRegExp?r.replace(e.shortcodesRegExp,`
`):r}function u(e,r){return r.replace(e.spaceRegExp," ")}function m(e,r){return r.replace(e.HTMLEntityRegExp,"a")}function C(e="words",r={}){let n={...{...i,...r},type:e,shortcodes:[]};return n.shortcodes=n.l10n?.shortcodes??[],n.shortcodes&&n.shortcodes.length&&(n.shortcodesRegExp=new RegExp("\\[\\/?(?:"+n.shortcodes.join("|")+")[^\\]]*?\\]","g")),n.type!=="characters_excluding_spaces"&&n.type!=="characters_including_spaces"&&(n.type="words"),n}function H(e,r,t){return e=[a.bind(null,t),c.bind(null,t),p.bind(null,t),u.bind(null,t),d.bind(null,t),g.bind(null,t),f.bind(null,t)].reduce((n,o)=>o(n),e),e=e+`
`,e.match(r)?.length??0}function E(e,r,t){return e=[a.bind(null,t),c.bind(null,t),p.bind(null,t),l.bind(null,t),u.bind(null,t),m.bind(null,t)].reduce((n,o)=>o(n),e),e=e+`
`,e.match(r)?.length??0}function L(e,r,t){let n=C(r,t),o;switch(n.type){case"words":return o=n.wordsRegExp,H(e,o,n);case"characters_including_spaces":return o=n.characters_including_spacesRegExp,E(e,o,n);case"characters_excluding_spaces":return o=n.characters_excluding_spacesRegExp,E(e,o,n);default:return 0}}return _(M);})();
// source --> https://www.peterjonathanwilcheck.com/wp-includes/js/dist/editor.min.js?ver=37faadbdf6c40cb0c71c 
"use strict";var wp;(wp||={}).editor=(()=>{var iae=Object.create;var T1=Object.defineProperty;var sae=Object.getOwnPropertyDescriptor;var aae=Object.getOwnPropertyNames;var lae=Object.getPrototypeOf,cae=Object.prototype.hasOwnProperty;var Zn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qc=(e,t)=>{for(var r in t)T1(e,r,{get:t[r],enumerable:!0})},PF=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of aae(t))!cae.call(e,n)&&n!==r&&T1(e,n,{get:()=>t[n],enumerable:!(o=sae(t,n))||o.enumerable});return e};var s=(e,t,r)=>(r=e!=null?iae(lae(e)):{},PF(t||!e||!e.__esModule?T1(r,"default",{value:e,enumerable:!0}):r,e)),uae=e=>PF(T1({},"__esModule",{value:!0}),e);var O=Ie((wAe,kF)=>{kF.exports=window.wp.data});var W=Ie((xAe,EF)=>{EF.exports=window.wp.coreData});var D=Ie((CAe,RF)=>{RF.exports=window.wp.element});var he=Ie((TAe,AF)=>{AF.exports=window.wp.compose});var mo=Ie((PAe,OF)=>{OF.exports=window.wp.hooks});var $=Ie((kAe,IF)=>{IF.exports=window.wp.blockEditor});var Xe=Ie((NAe,VF)=>{VF.exports=window.wp.blocks});var po=Ie((FAe,jF)=>{jF.exports=window.wp.date});var Ir=Ie((DAe,zF)=>{zF.exports=window.wp.url});var Yi=Ie((BAe,UF)=>{UF.exports=window.wp.deprecated});var lt=Ie((MAe,HF)=>{HF.exports=window.wp.preferences});var de=Ie((jAe,ZF)=>{ZF.exports=window.wp.primitives});var C=Ie((zAe,KF)=>{KF.exports=window.ReactJSXRuntime});var qv=Ie((LIe,XF)=>{XF.exports=window.wp.privateApis});var Xm=Ie((ZIe,uD)=>{uD.exports=window.wp.a11y});var Qm=Ie((KIe,dD)=>{dD.exports=window.wp.apiFetch});var ct=Ie((XIe,fD)=>{fD.exports=window.wp.notices});var E=Ie((QIe,mD)=>{mD.exports=window.wp.i18n});var ft=Ie((n6e,_D)=>{_D.exports=window.wp.htmlEntities});var xD=Ie((a6e,wD)=>{"use strict";wD.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var Yd=Ie((y6e,RD)=>{RD.exports=window.wp.mediaUtils});var A=Ie((I6e,jD)=>{jD.exports=window.wp.components});var Ls=Ie((l3e,sB)=>{sB.exports=window.wp.patterns});var sy=Ie((g3e,dB)=>{dB.exports=window.wp.blob});var Jn=Ie((y3e,vB)=>{vB.exports=window.React});var s5=Ie((D3e,lM)=>{lM.exports=window.ReactDOM});var M_=Ie((f4e,B_)=>{var NM={\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"},FM=Object.keys(NM).join("|"),Yfe=new RegExp(FM,"g"),qfe=new RegExp(FM,"");function Zfe(e){return NM[e]}var DM=function(e){return e.replace(Yfe,Zfe)},Kfe=function(e){return!!e.match(qfe)};B_.exports=DM;B_.exports.has=Kfe;B_.exports.remove=DM});var hI=Ie((yDe,u8)=>{u8.exports=window.wp.styleEngine});var yI=Ie((ADe,v8)=>{"use strict";v8.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var sw=Ie((IDe,S8)=>{"use strict";var kpe=function(t){return Epe(t)&&!Rpe(t)};function Epe(e){return!!e&&typeof e=="object"}function Rpe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ipe(e)}var Ape=typeof Symbol=="function"&&Symbol.for,Ope=Ape?Symbol.for("react.element"):60103;function Ipe(e){return e.$$typeof===Ope}function Npe(e){return Array.isArray(e)?[]:{}}function By(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ap(Npe(e),e,t):e}function Fpe(e,t,r){return e.concat(t).map(function(o){return By(o,r)})}function Dpe(e,t){if(!t.customMerge)return Ap;var r=t.customMerge(e);return typeof r=="function"?r:Ap}function Bpe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function y8(e){return Object.keys(e).concat(Bpe(e))}function b8(e,t){try{return t in e}catch{return!1}}function Mpe(e,t){return b8(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Lpe(e,t,r){var o={};return r.isMergeableObject(e)&&y8(e).forEach(function(n){o[n]=By(e[n],r)}),y8(t).forEach(function(n){Mpe(e,n)||(b8(e,n)&&r.isMergeableObject(t[n])?o[n]=Dpe(n,r)(e[n],t[n],r):o[n]=By(t[n],r))}),o}function Ap(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Fpe,r.isMergeableObject=r.isMergeableObject||kpe,r.cloneUnlessOtherwiseSpecified=By;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):Lpe(e,t,r):By(t,r)}Ap.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return Ap(o,n,r)},{})};var Vpe=Ap;S8.exports=Vpe});var NI=Ie(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});II.default=a7;function a7(){}a7.prototype={diff:function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=o.callback;typeof o=="function"&&(n=o,o={}),this.options=o;var i=this;function a(v){return n?(setTimeout(function(){n(void 0,v)},0),!0):v}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var l=r.length,c=t.length,u=1,d=l+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=l&&m+1>=c)return a([{value:this.join(r),count:r.length}]);function h(){for(var v=-1*u;v<=u;v+=2){var y=void 0,b=f[v-1],_=f[v+1],S=(_?_.newPos:0)-v;b&&(f[v-1]=void 0);var x=b&&b.newPos+1<l,T=_&&0<=S&&S<c;if(!x&&!T){f[v]=void 0;continue}if(!x||T&&b.newPos<_.newPos?(y=Ohe(_),i.pushComponent(y.components,void 0,!0)):(y=b,y.newPos++,i.pushComponent(y.components,!0,void 0)),S=i.extractCommon(y,r,t,v),y.newPos+1>=l&&S+1>=c)return a(Ahe(i,y.components,r,t,i.useLongestToken));f[v]=y}u++}if(n)(function v(){setTimeout(function(){if(u>d)return n();h()||v()},0)})();else for(;u<=d;){var g=h();if(g)return g}},pushComponent:function(t,r,o){var n=t[t.length-1];n&&n.added===r&&n.removed===o?t[t.length-1]={count:n.count+1,added:r,removed:o}:t.push({count:1,added:r,removed:o})},extractCommon:function(t,r,o,n){for(var i=r.length,a=o.length,l=t.newPos,c=l-n,u=0;l+1<i&&c+1<a&&this.equals(r[l+1],o[c+1]);)l++,c++,u++;return u&&t.components.push({count:u}),t.newPos=l,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function Ahe(e,t,r,o,n){for(var i=0,a=t.length,l=0,c=0;i<a;i++){var u=t[i];if(u.removed){if(u.value=e.join(o.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=r.slice(l,l+u.count);d=d.map(function(h,g){var v=o[c+g];return v.length>h.length?v:h}),u.value=e.join(d)}else u.value=e.join(r.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}var m=t[a-1];return a>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[a-2].value+=m.value,t.pop()),t}function Ohe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var FI=Ie(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.diffArrays=Fhe;Hy.arrayDiff=void 0;var Ihe=Nhe(NI());function Nhe(e){return e&&e.__esModule?e:{default:e}}var Uy=new Ihe.default;Hy.arrayDiff=Uy;Uy.tokenize=function(e){return e.slice()};Uy.join=Uy.removeEmpty=function(e){return e};function Fhe(e,t,r){return Uy.diff(e,t,r)}});var l7=Ie(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});DI.generateOptions=Dhe;function Dhe(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}});var BI=Ie(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.diffWords=Vhe;Vp.diffWordsWithSpace=jhe;Vp.wordDiff=void 0;var Bhe=Lhe(NI()),Mhe=l7();function Lhe(e){return e&&e.__esModule?e:{default:e}}var c7=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u7=/\S/,Gy=new Bhe.default;Vp.wordDiff=Gy;Gy.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!u7.test(e)&&!u7.test(t)};Gy.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&c7.test(t[r])&&c7.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};function Vhe(e,t,r){return r=(0,Mhe.generateOptions)(r,{ignoreWhitespace:!0}),Gy.diff(e,t,r)}function jhe(e,t,r){return Gy.diff(e,t,r)}});var f7=Ie((jBe,d7)=>{d7.exports=window.wp.blockSerializationDefaultParser});var Wy=Ie((zBe,m7)=>{m7.exports=window.wp.richText});var jI=Ie((XBe,x7)=>{x7.exports=window.wp.commands});var T7=Ie((QBe,C7)=>{C7.exports=window.wp.viewport});var _u=Ie((JBe,P7)=>{P7.exports=window.wp.plugins});var Y9=Ie((SVe,W9)=>{W9.exports=window.wp.uploadMedia});var Oi=Ie((AVe,ij)=>{ij.exports=window.wp.keyboardShortcuts});var yo=Ie((IVe,aj)=>{aj.exports=window.wp.keycodes});var xh=Ie((nZe,qG)=>{qG.exports=window.wp.dom});var qY=Ie((kXe,YY)=>{YY.exports=window.wp.warning});var FX=Ie((ltt,NX)=>{"use strict";var fTe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";NX.exports=fTe});var LX=Ie((ctt,MX)=>{"use strict";var mTe=FX();function DX(){}function BX(){}BX.resetWarningCache=DX;MX.exports=function(){function e(o,n,i,a,l,c){if(c!==mTe){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 r={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:BX,resetWarningCache:DX};return r.PropTypes=r,r}});var jX=Ie((ftt,VX)=>{VX.exports=LX()();var utt,dtt});var UX=Ie((TP,zX)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof TP<"u")t(zX,TP);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(TP,function(e,t){"use strict";var r=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),o=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{o=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||r.has(c))return;var u=null,d=null,f=null;function m(){var S=window.getComputedStyle(c,null);S.resize==="vertical"?c.style.resize="none":S.resize==="both"&&(c.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),y()}function h(S){{var x=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=x}c.style.overflowY=S}function g(S){for(var x=[];S&&S.parentNode&&S.parentNode instanceof Element;)S.parentNode.scrollTop&&x.push({node:S.parentNode,scrollTop:S.parentNode.scrollTop}),S=S.parentNode;return x}function v(){if(c.scrollHeight!==0){var S=g(c),x=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,S.forEach(function(T){T.node.scrollTop=T.scrollTop}),x&&(document.documentElement.scrollTop=x)}}function y(){v();var S=Math.round(parseFloat(c.style.height)),x=window.getComputedStyle(c,null),T=x.boxSizing==="content-box"?Math.round(parseFloat(x.height)):c.offsetHeight;if(T<S?x.overflowY==="hidden"&&(h("scroll"),v(),T=x.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):x.overflowY!=="hidden"&&(h("hidden"),v(),T=x.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==T){f=T;var R=o("autosize:resized");try{c.dispatchEvent(R)}catch{}}}var b=function(){c.clientWidth!==d&&y()},_=function(S){window.removeEventListener("resize",b,!1),c.removeEventListener("input",y,!1),c.removeEventListener("keyup",y,!1),c.removeEventListener("autosize:destroy",_,!1),c.removeEventListener("autosize:update",y,!1),Object.keys(S).forEach(function(x){c.style[x]=S[x]}),r.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",_,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",y,!1),window.addEventListener("resize",b,!1),c.addEventListener("input",y,!1),c.addEventListener("autosize:update",y,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",r.set(c,{destroy:_,update:y}),m()}function i(c){var u=r.get(c);u&&u.destroy()}function a(c){var u=r.get(c);u&&u.update()}var l=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(l=function(u){return u},l.destroy=function(c){return c},l.update=function(c){return c}):(l=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},l.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},l.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],a),c}),t.default=l,e.exports=t.default})});var GX=Ie((mtt,HX)=>{var pTe=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};HX.exports=pTe});var YX=Ie((ptt,WX)=>{var _4=GX();function hTe(e){var t=_4(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=_4(e,"line-height"),r=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(r*=4,r/=3):t.indexOf("mm")!==-1?(r*=96,r/=25.4):t.indexOf("cm")!==-1?(r*=96,r/=2.54):t.indexOf("in")!==-1?r*=96:t.indexOf("pc")!==-1&&(r*=16),r=Math.round(r),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var a=_4(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i);var c=i.offsetHeight;r=c,l.removeChild(i)}return r}WX.exports=hTe});var ZX=Ie(Pc=>{"use strict";var gTe=Pc&&Pc.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),w4=Pc&&Pc.__assign||Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},vTe=Pc&&Pc.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&(r[o[n]]=e[o[n]]);return r};Pc.__esModule=!0;var kP=Jn(),_0=jX(),PP=UX(),yTe=YX(),bTe=yTe,qX="autosize:resized",STe=(function(e){gTe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={lineHeight:null},r.textarea=null,r.onResize=function(o){r.props.onResize&&r.props.onResize(o)},r.updateLineHeight=function(){r.textarea&&r.setState({lineHeight:bTe(r.textarea)})},r.onChange=function(o){var n=r.props.onChange;r.currentValue=o.currentTarget.value,n&&n(o)},r}return t.prototype.componentDidMount=function(){var r=this,o=this.props,n=o.maxRows,i=o.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return r.textarea&&PP(r.textarea)}):this.textarea&&PP(this.textarea),this.textarea&&this.textarea.addEventListener(qX,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(qX,this.onResize),PP.destroy(this.textarea))},t.prototype.render=function(){var r=this,o=this,n=o.props,i=n.onResize,a=n.maxRows,l=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=vTe(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=a&&m?m*a:null;return kP.createElement("textarea",w4({},f,{onChange:this.onChange,style:h?w4({},c,{maxHeight:h}):c,ref:function(g){r.textarea=g,typeof r.props.innerRef=="function"?r.props.innerRef(g):r.props.innerRef&&(r.props.innerRef.current=g)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&PP.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:_0.number,maxRows:_0.number,onResize:_0.func,innerRef:_0.any,async:_0.bool},t})(kP.Component);Pc.TextareaAutosize=kP.forwardRef(function(e,t){return kP.createElement(STe,w4({},e,{innerRef:t}))})});var x4=Ie((gtt,KX)=>{"use strict";var _Te=ZX();KX.exports=_Te.TextareaAutosize});var k0=Ie((rrt,kQ)=>{kQ.exports=window.wp.wordcount});var XQ=Ie((yrt,KQ)=>{KQ.exports=window.wp.serverSideRender});var SAe={};Qc(SAe,{AlignmentToolbar:()=>OTe,Autocomplete:()=>ATe,AutosaveMonitor:()=>Xx,BlockAlignmentToolbar:()=>ITe,BlockControls:()=>NTe,BlockEdit:()=>FTe,BlockEditorKeyboardShortcuts:()=>DTe,BlockFormatControls:()=>BTe,BlockIcon:()=>MTe,BlockInspector:()=>LTe,BlockList:()=>VTe,BlockMover:()=>jTe,BlockNavigationDropdown:()=>zTe,BlockSelectionClearer:()=>UTe,BlockSettingsMenu:()=>HTe,BlockTitle:()=>GTe,BlockToolbar:()=>WTe,CharacterCount:()=>wg,ColorPalette:()=>YTe,ContrastChecker:()=>qTe,CopyHandler:()=>ZTe,DefaultBlockAppender:()=>KTe,DocumentBar:()=>fC,DocumentOutline:()=>Ah,DocumentOutlineCheck:()=>MW,EditorHistoryRedo:()=>yC,EditorHistoryUndo:()=>_C,EditorKeyboardShortcuts:()=>Tf,EditorKeyboardShortcutsRegister:()=>GW,EditorNotices:()=>tY,EditorProvider:()=>Fj,EditorSnackbars:()=>iY,EntitiesSavedStates:()=>RC,ErrorBoundary:()=>yY,FontSizePicker:()=>XTe,InnerBlocks:()=>JTe,Inserter:()=>QTe,InspectorAdvancedControls:()=>$Te,InspectorControls:()=>ePe,LocalAutosaveMonitor:()=>wY,MediaPlaceholder:()=>sPe,MediaUpload:()=>aPe,MediaUploadCheck:()=>lPe,MultiSelectScrollIntoView:()=>cPe,NavigableToolbar:()=>uPe,ObserveTyping:()=>dPe,PageAttributesCheck:()=>Nh,PageAttributesOrder:()=>EY,PageAttributesPanel:()=>DC,PageAttributesParent:()=>VY,PageTemplate:()=>VC,PanelColorSettings:()=>tPe,PlainText:()=>rPe,PluginBlockSettingsMenuItem:()=>nq,PluginDocumentSettingPanel:()=>GC,PluginMoreMenuItem:()=>lq,PluginPostPublishPanel:()=>YC,PluginPostStatusInfo:()=>ZC,PluginPrePublishPanel:()=>XC,PluginPreviewMenuItem:()=>vq,PluginSidebar:()=>nm,PluginSidebarMoreMenuItem:()=>Sq,PostAuthor:()=>oT,PostAuthorCheck:()=>nT,PostAuthorPanel:()=>aT,PostComments:()=>dT,PostDiscussionPanel:()=>vT,PostExcerpt:()=>t0,PostExcerptCheck:()=>lm,PostExcerptPanel:()=>CZ,PostFeaturedImage:()=>n0,PostFeaturedImageCheck:()=>_c,PostFeaturedImagePanel:()=>kT,PostFormat:()=>s0,PostFormatCheck:()=>Kh,PostLastRevision:()=>AT,PostLastRevisionCheck:()=>dm,PostLastRevisionPanel:()=>GZ,PostLockedModal:()=>QZ,PostPendingStatus:()=>tK,PostPendingStatusCheck:()=>IT,PostPingbacks:()=>hT,PostPreviewButton:()=>od,PostPublishButton:()=>eg,PostPublishButtonLabel:()=>DT,PostPublishPanel:()=>oP,PostSavedState:()=>pP,PostSchedule:()=>og,PostScheduleCheck:()=>hP,PostScheduleLabel:()=>ng,PostSchedulePanel:()=>yP,PostSticky:()=>sP,PostStickyCheck:()=>nP,PostSwitchToDraftButton:()=>TX,PostSyncStatus:()=>_P,PostTaxonomies:()=>fg,PostTaxonomiesCheck:()=>wP,PostTaxonomiesFlatTermSelector:()=>c4,PostTaxonomiesHierarchicalTermSelector:()=>f4,PostTaxonomiesPanel:()=>CP,PostTemplatePanel:()=>eT,PostTextEditor:()=>w0,PostTitle:()=>BP,PostTitleRaw:()=>LP,PostTrash:()=>zP,PostTrashCheck:()=>VP,PostTypeSupportCheck:()=>tr,PostURL:()=>P0,PostURLCheck:()=>GP,PostURLLabel:()=>wQ,PostURLPanel:()=>ZP,PostVisibility:()=>u0,PostVisibilityCheck:()=>PQ,PostVisibilityLabel:()=>VT,RichText:()=>eJ,RichTextShortcut:()=>oPe,RichTextToolbarButton:()=>nPe,ServerSideRender:()=>JQ.default,SkipToSelectedBlock:()=>fPe,TableOfContents:()=>HQ,TextEditorGlobalKeyboardShortcuts:()=>EPe,ThemeSupportCheck:()=>CT,TimeToRead:()=>_g,URLInput:()=>mPe,URLInputButton:()=>pPe,URLPopover:()=>hPe,UnsavedChangesWarning:()=>ZQ,VisualEditorGlobalKeyboardShortcuts:()=>kPe,Warning:()=>gPe,WordCount:()=>Sg,WritingFlow:()=>vPe,__unstableRichTextInputEvent:()=>iPe,cleanForSlug:()=>FD,createCustomColorsHOC:()=>yPe,getColorClassName:()=>bPe,getColorObjectByAttributeValues:()=>SPe,getColorObjectByColorValue:()=>_Pe,getFontSize:()=>wPe,getFontSizeClass:()=>xPe,getTemplatePartIcon:()=>$c,mediaUpload:()=>r_,privateApis:()=>tae,registerEntityAction:()=>gAe,registerEntityField:()=>yAe,store:()=>w,storeConfig:()=>Ay,transformStyles:()=>rae.transformStyles,unregisterEntityAction:()=>vAe,unregisterEntityField:()=>bAe,useEntitiesSavedStatesIsDirty:()=>EC,usePostScheduleLabel:()=>ig,usePostURLLabel:()=>E4,usePostVisibilityLabel:()=>e4,userAutocompleter:()=>Zx,withColorContext:()=>CPe,withColors:()=>TPe,withFontSizes:()=>PPe});var DG=s(O(),1),BG=s(W(),1),MG=s(D(),1),LG=s(he(),1),VG=s(mo(),1);var qx=s(O(),1);var MF=s(O(),1);var NF=s($(),1),FF={...NF.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var DF=s(O(),1);function dae(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function fae(e={},t){switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.actionId)}}}return e}function mae(e={},t){switch(t.type){case"REGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.fieldId)}}}return e}var BF=(0,DF.combineReducers)({actions:fae,fields:mae,isReady:dae});function P1(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function pae(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function hae(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function gae(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function vae(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function yae(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:t.type==="REQUEST_POST_UPDATE_START",options:t.options||{}}}return e}function bae(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:t.type==="REQUEST_POST_DELETE_START"}}return e}function Sae(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function _ae(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function wae(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function xae(e=FF,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function Cae(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function Tae(e="Desktop",t){return t.type==="SET_DEVICE_TYPE"?t.deviceType:e}function Pae(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function kae(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return t.isOpen?!1:e;case"SET_IS_INSERTER_OPENED":return t.value}return e}function Eae(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value?!1:e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}function Rae(e={current:null}){return e}function Aae(e={current:null}){return e}function Oae(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e}function Iae(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function Nae(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function Fae(e=0,t){return t.type==="SET_CANVAS_MIN_HEIGHT"?t.minHeight:e}function Dae(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function Bae(e=1,t){switch(t.type){case"SET_REVISION_PAGE":return t.page;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:1}return e}function Mae(e=!0,t){switch(t.type){case"SET_SHOW_REVISION_DIFF":return t.showDiff;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:!0}return e}function Lae(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var LF=(0,MF.combineReducers)({postId:pae,postType:gae,templateId:hae,saving:yae,deleting:bae,postLock:Sae,template:vae,postSavingLock:_ae,editorSettings:xae,postAutosavingLock:wae,renderingMode:Cae,deviceType:Tae,removedPanels:Pae,blockInserterPanel:kae,inserterSidebarToggleRef:Aae,listViewPanel:Eae,listViewToggleRef:Rae,publishSidebarActive:Oae,stylesPath:Iae,showStylebook:Nae,canvasMinHeight:Fae,revisionId:Dae,revisionPage:Bae,showRevisionDiff:Mae,selectedNote:Lae,dataviews:BF});var uO={};Qc(uO,{__experimentalGetDefaultTemplatePartAreas:()=>Rce,__experimentalGetDefaultTemplateType:()=>Ace,__experimentalGetDefaultTemplateTypes:()=>Ece,__experimentalGetTemplateInfo:()=>Oce,__unstableIsEditorReady:()=>xle,canInsertBlockType:()=>Cce,canUserUseUnfilteredHTML:()=>hle,didPostSaveRequestFail:()=>rle,didPostSaveRequestSucceed:()=>tle,getActivePostLock:()=>ple,getAdjacentBlockClientId:()=>Kle,getAutosaveAttribute:()=>oD,getBlock:()=>Fle,getBlockAttributes:()=>Nle,getBlockCount:()=>jle,getBlockHierarchyRootClientId:()=>Zle,getBlockIndex:()=>cce,getBlockInsertionPoint:()=>bce,getBlockListSettings:()=>kce,getBlockMode:()=>gce,getBlockName:()=>Ole,getBlockOrder:()=>lce,getBlockRootClientId:()=>qle,getBlockSelectionEnd:()=>Ule,getBlockSelectionStart:()=>zle,getBlocks:()=>Dle,getBlocksByClientId:()=>Vle,getClientIdsOfDescendants:()=>Ble,getClientIdsWithDescendants:()=>Mle,getCurrentPost:()=>$r,getCurrentPostAttribute:()=>Zv,getCurrentPostId:()=>Ki,getCurrentPostLastRevisionId:()=>Gae,getCurrentPostRevisionsCount:()=>lO,getCurrentPostType:()=>Qn,getCurrentTemplateId:()=>Hae,getDeviceType:()=>Tle,getEditedPostAttribute:()=>Jt,getEditedPostContent:()=>Jv,getEditedPostPreviewLink:()=>ile,getEditedPostSlug:()=>cle,getEditedPostVisibility:()=>Yae,getEditorBlocks:()=>vle,getEditorMode:()=>Ele,getEditorSelection:()=>wle,getEditorSelectionEnd:()=>_le,getEditorSelectionStart:()=>Sle,getEditorSettings:()=>Cle,getFirstMultiSelectedBlockClientId:()=>tce,getGlobalBlockCount:()=>Lle,getInserterItems:()=>Tce,getLastMultiSelectedBlockClientId:()=>rce,getMultiSelectedBlockClientIds:()=>$le,getMultiSelectedBlocks:()=>ece,getMultiSelectedBlocksEndClientId:()=>ace,getMultiSelectedBlocksStartClientId:()=>sce,getNextBlockClientId:()=>Qle,getPermalink:()=>lle,getPermalinkParts:()=>aD,getPostEdits:()=>Qv,getPostLockUser:()=>mle,getPostTypeLabel:()=>Ice,getPreviousBlockClientId:()=>Xle,getRenderingMode:()=>JS,getSelectedBlock:()=>Yle,getSelectedBlockClientId:()=>Wle,getSelectedBlockCount:()=>Hle,getSelectedBlocksInitialCaretPosition:()=>Jle,getStateBeforeOptimisticTransaction:()=>Rle,getSuggestedPostFormat:()=>sle,getTemplate:()=>wce,getTemplateLock:()=>xce,hasChangedContent:()=>rD,hasEditorRedo:()=>jae,hasEditorUndo:()=>Vae,hasInserterItems:()=>Pce,hasMultiSelection:()=>mce,hasNonPostEntityChanges:()=>zae,hasSelectedBlock:()=>Gle,hasSelectedInnerBlock:()=>dce,inSomeHistory:()=>Ale,isAncestorMultiSelected:()=>ice,isAutosavingPost:()=>ole,isBlockInsertionPointVisible:()=>Sce,isBlockMultiSelected:()=>nce,isBlockSelected:()=>uce,isBlockValid:()=>Ile,isBlockWithinSelection:()=>fce,isCaretWithinFormattedText:()=>yce,isCleanNewPost:()=>Uae,isCurrentPostPending:()=>qae,isCurrentPostPublished:()=>cO,isCurrentPostScheduled:()=>Zae,isDeletingPost:()=>$ae,isEditedPostAutosaveable:()=>Xae,isEditedPostBeingScheduled:()=>Qae,isEditedPostDateFloating:()=>Jae,isEditedPostDirty:()=>XS,isEditedPostEmpty:()=>iD,isEditedPostNew:()=>tD,isEditedPostPublishable:()=>Kae,isEditedPostSaveable:()=>nD,isEditorPanelEnabled:()=>yle,isEditorPanelOpened:()=>ble,isEditorPanelRemoved:()=>cD,isFirstMultiSelectedBlock:()=>oce,isInserterOpened:()=>kle,isListViewOpened:()=>Ple,isMultiSelecting:()=>pce,isPermalinkEditable:()=>sD,isPostAutosavingLocked:()=>lD,isPostLockTakeover:()=>fle,isPostLocked:()=>ule,isPostSavingLocked:()=>dle,isPreviewingPost:()=>nle,isPublishSidebarEnabled:()=>gle,isPublishSidebarOpened:()=>Nce,isPublishingPost:()=>ale,isSavingNonPostEntityChanges:()=>ele,isSavingPost:()=>Km,isSelectionEnabled:()=>hce,isTyping:()=>vce,isValidTemplate:()=>_ce});var eu=s(Xe(),1),Zm=s(po(),1),Kv=s(Ir(),1),dt=s(O(),1),Ca=s(Yi(),1),eD=s(D(),1),QS=s($(),1),dr=s(W(),1),$v=s(lt(),1);var GF=new Set(["meta"]),WF="core/editor",nR=/%(?:postname|pagename)%/,iR=60*1e3,YF=["title","excerpt","content"];var xt="wp_template",Ur="wp_template_part",qi="wp_block",jd="wp_navigation",ur="attachment",k1={custom:"custom",theme:"theme",plugin:"plugin"},sR=["wp_template","wp_template_part"],qF=[...sR,"wp_block","wp_navigation"],Jc=[xt,Ur,qi,jd];var E1=s(D(),1),No=(0,E1.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,E1.cloneElement)(e,{width:t,height:t,...r,ref:o}));var R1=s(de(),1),aR=s(C(),1),lR=(0,aR.jsx)(R1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aR.jsx)(R1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})});var A1=s(de(),1),cR=s(C(),1),uR=(0,cR.jsx)(A1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cR.jsx)(A1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})});var O1=s(de(),1),dR=s(C(),1),fR=(0,dR.jsx)(O1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dR.jsx)(O1.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 I1=s(de(),1),mR=s(C(),1),pR=(0,mR.jsx)(I1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mR.jsx)(I1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})});var N1=s(de(),1),hR=s(C(),1),xl=(0,hR.jsx)(N1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hR.jsx)(N1.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});var F1=s(de(),1),gR=s(C(),1),vR=(0,gR.jsx)(F1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gR.jsx)(F1.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 D1=s(de(),1),yR=s(C(),1),Pi=(0,yR.jsx)(D1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yR.jsx)(D1.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var B1=s(de(),1),bR=s(C(),1),Cv=(0,bR.jsx)(B1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bR.jsx)(B1.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var M1=s(de(),1),SR=s(C(),1),_R=(0,SR.jsx)(M1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SR.jsx)(M1.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var L1=s(de(),1),wR=s(C(),1),Nt=(0,wR.jsx)(L1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wR.jsx)(L1.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var V1=s(de(),1),xR=s(C(),1),CR=(0,xR.jsx)(V1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xR.jsx)(V1.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 j1=s(de(),1),TR=s(C(),1),Ft=(0,TR.jsx)(j1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TR.jsx)(j1.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var z1=s(de(),1),PR=s(C(),1),Tv=(0,PR.jsx)(z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PR.jsx)(z1.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var U1=s(de(),1),kR=s(C(),1),Kn=(0,kR.jsx)(U1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,kR.jsx)(U1.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 H1=s(de(),1),ER=s(C(),1),RR=(0,ER.jsx)(H1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ER.jsx)(H1.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});var G1=s(de(),1),AR=s(C(),1),OR=(0,AR.jsx)(G1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AR.jsx)(G1.Path,{d:"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"})});var W1=s(de(),1),IR=s(C(),1),NR=(0,IR.jsx)(W1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IR.jsx)(W1.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})});var Y1=s(de(),1),FR=s(C(),1),DR=(0,FR.jsx)(Y1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,FR.jsx)(Y1.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})});var q1=s(de(),1),BR=s(C(),1),MR=(0,BR.jsx)(q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BR.jsx)(q1.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-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})});var Z1=s(de(),1),LR=s(C(),1),Pv=(0,LR.jsx)(Z1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LR.jsx)(Z1.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})});var K1=s(de(),1),VR=s(C(),1),jR=(0,VR.jsx)(K1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VR.jsx)(K1.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});var X1=s(de(),1),zR=s(C(),1),kv=(0,zR.jsx)(X1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zR.jsx)(X1.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 Q1=s(de(),1),UR=s(C(),1),J1=(0,UR.jsx)(Q1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,UR.jsx)(Q1.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 $1=s(de(),1),HR=s(C(),1),GR=(0,HR.jsx)($1.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HR.jsx)($1.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});var eS=s(de(),1),WR=s(C(),1),Wm=(0,WR.jsx)(eS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WR.jsx)(eS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})});var tS=s(de(),1),YR=s(C(),1),zd=(0,YR.jsx)(tS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,YR.jsx)(tS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})});var rS=s(de(),1),qR=s(C(),1),Ud=(0,qR.jsx)(rS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qR.jsx)(rS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});var oS=s(de(),1),ZR=s(C(),1),KR=(0,ZR.jsx)(oS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZR.jsx)(oS.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 nS=s(de(),1),XR=s(C(),1),Cl=(0,XR.jsx)(nS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XR.jsx)(nS.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 iS=s(de(),1),QR=s(C(),1),Xn=(0,QR.jsx)(iS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QR.jsx)(iS.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 sS=s(de(),1),JR=s(C(),1),$R=(0,JR.jsx)(sS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,JR.jsx)(sS.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 aS=s(de(),1),eA=s(C(),1),Ev=(0,eA.jsx)(aS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eA.jsx)(aS.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var lS=s(de(),1),tA=s(C(),1),rA=(0,tA.jsx)(lS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,tA.jsx)(lS.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});var cS=s(de(),1),oA=s(C(),1),Rv=(0,oA.jsx)(cS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,oA.jsx)(cS.Path,{d:"M18.5 10.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 uS=s(de(),1),nA=s(C(),1),iA=(0,nA.jsx)(uS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nA.jsx)(uS.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 Av=s(de(),1),Ov=s(C(),1),sA=(0,Ov.jsxs)(Av.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Ov.jsx)(Av.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,Ov.jsx)(Av.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})]});var dS=s(de(),1),aA=s(C(),1),Bs=(0,aA.jsx)(dS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aA.jsx)(dS.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 fS=s(de(),1),lA=s(C(),1),cA=(0,lA.jsx)(fS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lA.jsx)(fS.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 mS=s(de(),1),uA=s(C(),1),Iv=(0,uA.jsx)(mS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uA.jsx)(mS.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var pS=s(de(),1),dA=s(C(),1),fA=(0,dA.jsx)(pS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,dA.jsx)(pS.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 hS=s(de(),1),mA=s(C(),1),Ym=(0,mA.jsx)(hS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mA.jsx)(hS.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 gS=s(de(),1),pA=s(C(),1),Nr=(0,pA.jsx)(gS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pA.jsx)(gS.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var vS=s(de(),1),hA=s(C(),1),Nv=(0,hA.jsx)(vS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,hA.jsx)(vS.Path,{d:"M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z"})});var yS=s(de(),1),gA=s(C(),1),vA=(0,gA.jsx)(yS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gA.jsx)(yS.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-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})});var bS=s(de(),1),yA=s(C(),1),Tl=(0,yA.jsx)(bS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,yA.jsx)(bS.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});var SS=s(de(),1),bA=s(C(),1),Fv=(0,bA.jsx)(SS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,bA.jsx)(SS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})});var Dv=s(de(),1),Bv=s(C(),1),qm=(0,Bv.jsxs)(Dv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Bv.jsx)(Dv.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Bv.jsx)(Dv.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 _S=s(de(),1),SA=s(C(),1),Mv=(0,SA.jsx)(_S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,SA.jsx)(_S.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var wS=s(de(),1),_A=s(C(),1),Lv=(0,_A.jsx)(wS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_A.jsx)(wS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})});var xS=s(de(),1),wA=s(C(),1),Pl=(0,wA.jsx)(xS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,wA.jsx)(xS.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var CS=s(de(),1),xA=s(C(),1),kl=(0,xA.jsx)(CS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,xA.jsx)(CS.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});var TS=s(de(),1),CA=s(C(),1),Hd=(0,CA.jsx)(TS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,CA.jsx)(TS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var PS=s(de(),1),TA=s(C(),1),Vv=(0,TA.jsx)(PS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,TA.jsx)(PS.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})});var kS=s(de(),1),PA=s(C(),1),kA=(0,PA.jsx)(kS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,PA.jsx)(kS.Path,{d:"M7 11.5h10V13H7z"})});var ES=s(de(),1),EA=s(C(),1),RA=(0,EA.jsx)(ES.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,EA.jsx)(ES.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})});var RS=s(de(),1),AA=s(C(),1),OA=(0,AA.jsx)(RS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,AA.jsx)(RS.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 AS=s(de(),1),IA=s(C(),1),jv=(0,IA.jsx)(AS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,IA.jsx)(AS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})});var OS=s(de(),1),NA=s(C(),1),Gd=(0,NA.jsx)(OS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,NA.jsx)(OS.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 zv=s(de(),1),Uv=s(C(),1),FA=(0,Uv.jsxs)(zv.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Uv.jsx)(zv.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,Uv.jsx)(zv.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 IS=s(de(),1),DA=s(C(),1),Hv=(0,DA.jsx)(IS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,DA.jsx)(IS.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 NS=s(de(),1),BA=s(C(),1),MA=(0,BA.jsx)(NS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,BA.jsx)(NS.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})});var FS=s(de(),1),LA=s(C(),1),Gv=(0,LA.jsx)(FS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,LA.jsx)(FS.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var DS=s(de(),1),VA=s(C(),1),jA=(0,VA.jsx)(DS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,VA.jsx)(DS.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var BS=s(de(),1),zA=s(C(),1),UA=(0,zA.jsx)(BS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,zA.jsx)(BS.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z"})});var MS=s(de(),1),HA=s(C(),1),GA=(0,HA.jsx)(MS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,HA.jsx)(MS.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})});var LS=s(de(),1),WA=s(C(),1),YA=(0,WA.jsx)(LS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,WA.jsx)(LS.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 VS=s(de(),1),qA=s(C(),1),Wd=(0,qA.jsx)(VS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,qA.jsx)(VS.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-17.6 1L10 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 jS=s(de(),1),ZA=s(C(),1),Wv=(0,ZA.jsx)(jS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ZA.jsx)(jS.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 zS=s(de(),1),KA=s(C(),1),US=(0,KA.jsx)(zS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,KA.jsx)(zS.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 HS=s(de(),1),XA=s(C(),1),El=(0,XA.jsx)(HS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,XA.jsx)(HS.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 GS=s(de(),1),QA=s(C(),1),JA=(0,QA.jsx)(GS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,QA.jsx)(GS.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})});var WS=s(de(),1),$A=s(C(),1),Yv=(0,$A.jsx)(WS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$A.jsx)(WS.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})});var YS=s(de(),1),eO=s(C(),1),tO=(0,eO.jsx)(YS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eO.jsx)(YS.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 qS=s(de(),1),rO=s(C(),1),oO=(0,rO.jsx)(qS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rO.jsx)(qS.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 ZS=s(de(),1),nO=s(C(),1),iO=(0,nO.jsx)(ZS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nO.jsx)(ZS.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 KS=s(de(),1),sO=s(C(),1),aO=(0,sO.jsx)(KS.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,sO.jsx)(KS.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});function $c(e){return e==="header"?Rv:e==="footer"?Ev:e==="sidebar"?Gv:e==="navigation-overlay"?Nv:Wd}var QF=s(qv(),1),{lock:JF,unlock:N}=(0,QF.__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/editor");var $F={},Zi=e=>{if(!e)return $F;let{templateTypes:t,templateAreas:r,template:o}=e,{description:n,slug:i,title:a,area:l}=o,{title:c,description:u}=Object.values(t).find(g=>g.slug===i)??$F,d=typeof a=="string"?a:a?.rendered,f=typeof n=="string"?n:n?.raw,h=r?.map(g=>({...g,icon:$c(g.icon)}))?.find(g=>l===g.area)?.icon||Bs;return{title:d&&d!==i?d:c||i,description:f||u,icon:h}};var Xv={},Vae=(0,dt.createRegistrySelector)(e=>()=>e(dr.store).hasUndo()),jae=(0,dt.createRegistrySelector)(e=>()=>e(dr.store).hasRedo());function tD(e){return $r(e).status==="auto-draft"}function rD(e){return"content"in Qv(e)}var XS=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return e(dr.store).hasEditsForEntityRecord("postType",r,o)}),zae=(0,dt.createRegistrySelector)(e=>t=>{let r=e(dr.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=$r(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function Uae(e){return!XS(e)&&tD(e)}var $r=(0,dt.createRegistrySelector)(e=>t=>{let r=Ki(t),o=Qn(t),n=e(dr.store).getRawEntityRecord("postType",o,r);return n||Xv});function Qn(e){return e.postType}function Ki(e){return e.postId}function Hae(e){return e.templateId}function lO(e){return $r(e)._links?.["version-history"]?.[0]?.count??0}function Gae(e){return $r(e)._links?.["predecessor-version"]?.[0]?.id??null}var Qv=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return e(dr.store).getEntityRecordEdits("postType",r,o)||Xv});function Zv(e,t){switch(t){case"type":return Qn(e);case"id":return Ki(e);default:let r=$r(e);if(!r.hasOwnProperty(t))break;return P1(r[t])}}var Wae=(0,dt.createSelector)((e,t)=>{let r=Qv(e);return r.hasOwnProperty(t)?{...Zv(e,t),...r[t]}:Zv(e,t)},(e,t)=>[Zv(e,t),Qv(e)[t]]);function Jt(e,t){if(t==="content")return Jv(e);let r=Qv(e);return r.hasOwnProperty(t)?GF.has(t)?Wae(e,t):r[t]:Zv(e,t)}var oD=(0,dt.createRegistrySelector)(e=>(t,r)=>{if(!YF.includes(r)&&r!=="preview_link")return;let o=Qn(t),n=Ki(t),i=e(dr.store).getCurrentUser()?.id,a=e(dr.store).getAutosave(o,n,i);if(a)return P1(a[r])});function Yae(e){return Jt(e,"status")==="private"?"private":Jt(e,"password")?"password":"public"}function qae(e){return $r(e).status==="pending"}function cO(e,t){let r=t||$r(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,Zm.isInTheFuture)(new Date(Number((0,Zm.getDate)(r.date))-iR))}function Zae(e){return $r(e).status==="future"&&!cO(e)}function Kae(e){let t=$r(e);return t.type===ur?XS(e):XS(e)||["publish","private","future"].indexOf(t.status)===-1}function nD(e){return Km(e)?!1:!!Jt(e,"title")||!!Jt(e,"excerpt")||!iD(e)||eD.Platform.OS==="native"}var iD=(0,dt.createRegistrySelector)(e=>t=>{let r=Ki(t),o=Qn(t),n=e(dr.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=Jt(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let a=i[0].name;return a!==(0,eu.getDefaultBlockName)()&&a!==(0,eu.getFreeformContentHandlerName)()?!1:!Jv(t)}),Xae=(0,dt.createRegistrySelector)(e=>t=>{if(!nD(t)||lD(t))return!1;let r=Qn(t);if(!e(dr.store).getPostType(r)?.supports?.autosave)return!1;let n=Ki(t),i=e(dr.store).hasFetchedAutosaves(r,n),a=e(dr.store).getCurrentUser()?.id,l=e(dr.store).getAutosave(r,n,a);return i?!l||rD(t)?!0:["title","excerpt","meta"].some(c=>P1(l[c])!==Jt(t,c)):!1});function Qae(e){let t=Jt(e,"date"),r=new Date(Number((0,Zm.getDate)(t))-iR);return(0,Zm.isInTheFuture)(r)}function Jae(e){let t=Jt(e,"date"),r=Jt(e,"modified"),o=$r(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function $ae(e){return!!e.deleting.pending}function Km(e){return!!e.saving.pending}var ele=(0,dt.createRegistrySelector)(e=>t=>{let r=e(dr.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=$r(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),tle=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return!e(dr.store).getLastEntitySaveError("postType",r,o)}),rle=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t),o=Ki(t);return!!e(dr.store).getLastEntitySaveError("postType",r,o)});function ole(e){return Km(e)&&!!e.saving.options?.isAutosave}function nle(e){return Km(e)&&!!e.saving.options?.isPreview}function ile(e){if(e.saving.pending||Km(e))return;let t=oD(e,"preview_link");(!t||$r(e).status==="draft")&&(t=Jt(e,"link"),t&&(t=(0,Kv.addQueryArgs)(t,{preview:!0})));let r=Jt(e,"featured_media");return t&&r?(0,Kv.addQueryArgs)(t,{_thumbnail_id:r}):t}var sle=(0,dt.createRegistrySelector)(e=>()=>{let t=e(QS.store).getBlocks();if(t.length>2)return null;let r;if(t.length===1&&(r=t[0].name,r==="core/embed")){let o=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(o)?r="core/video":["spotify","soundcloud"].includes(o)&&(r="core/audio")}switch(t.length===2&&t[1].name==="core/paragraph"&&(r=t[0].name),r){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}),Jv=(0,dt.createRegistrySelector)(e=>t=>{let r=Ki(t),o=Qn(t),n=e(dr.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,eu.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function ale(e){return Km(e)&&!cO(e)&&Jt(e,"status")==="publish"}function sD(e){let t=Jt(e,"permalink_template");return nR.test(t)}function lle(e){let t=aD(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return sD(e)?r+o+n:r}function cle(e){return Jt(e,"slug")||(0,Kv.cleanForSlug)(Jt(e,"title"))||Ki(e)}function aD(e){let t=Jt(e,"permalink_template");if(!t)return null;let r=Jt(e,"slug")||Jt(e,"generated_slug"),[o,n]=t.split(nR);return{prefix:o,postName:r,suffix:n}}function ule(e){return e.postLock.isLocked}function dle(e){return Object.keys(e.postSavingLock).length>0}function lD(e){return Object.keys(e.postAutosavingLock).length>0}function fle(e){return e.postLock.isTakeover}function mle(e){return e.postLock.user}function ple(e){return e.postLock.activePostLock}function hle(e){return!!$r(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var gle=(0,dt.createRegistrySelector)(e=>()=>!!e($v.store).get("core","isPublishSidebarEnabled")),vle=(0,dt.createSelector)(e=>Jt(e,"blocks")||(0,eu.parse)(Jv(e)),e=>[Jt(e,"blocks"),Jv(e)]);function cD(e,t){return e.removedPanels.includes(t)}var yle=(0,dt.createRegistrySelector)(e=>(t,r)=>{let o=e($v.store).get("core","inactivePanels");return!cD(t,r)&&!o?.includes(r)}),ble=(0,dt.createRegistrySelector)(e=>(t,r)=>!!e($v.store).get("core","openPanels")?.includes(r));function Sle(e){return(0,Ca.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Jt(e,"selection")?.selectionStart}function _le(e){return(0,Ca.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Jt(e,"selection")?.selectionEnd}function wle(e){return Jt(e,"selection")}function xle(e){return!!e.postId}function Cle(e){return e.editorSettings}function JS(e){return e.renderingMode}var Tle=(0,dt.createRegistrySelector)(e=>t=>N(e(QS.store)).isZoomOut()?"Desktop":t.deviceType);function Ple(e){return e.listViewPanel}function kle(e){return!!e.blockInserterPanel}var Ele=(0,dt.createRegistrySelector)(e=>()=>e($v.store).get("core","editorMode")??"visual");function Rle(){return(0,Ca.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function Ale(){return(0,Ca.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function Le(e){return(0,dt.createRegistrySelector)(t=>(r,...o)=>((0,Ca.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(QS.store)[e](...o)))}var Ole=Le("getBlockName"),Ile=Le("isBlockValid"),Nle=Le("getBlockAttributes"),Fle=Le("getBlock"),Dle=Le("getBlocks"),Ble=Le("getClientIdsOfDescendants"),Mle=Le("getClientIdsWithDescendants"),Lle=Le("getGlobalBlockCount"),Vle=Le("getBlocksByClientId"),jle=Le("getBlockCount"),zle=Le("getBlockSelectionStart"),Ule=Le("getBlockSelectionEnd"),Hle=Le("getSelectedBlockCount"),Gle=Le("hasSelectedBlock"),Wle=Le("getSelectedBlockClientId"),Yle=Le("getSelectedBlock"),qle=Le("getBlockRootClientId"),Zle=Le("getBlockHierarchyRootClientId"),Kle=Le("getAdjacentBlockClientId"),Xle=Le("getPreviousBlockClientId"),Qle=Le("getNextBlockClientId"),Jle=Le("getSelectedBlocksInitialCaretPosition"),$le=Le("getMultiSelectedBlockClientIds"),ece=Le("getMultiSelectedBlocks"),tce=Le("getFirstMultiSelectedBlockClientId"),rce=Le("getLastMultiSelectedBlockClientId"),oce=Le("isFirstMultiSelectedBlock"),nce=Le("isBlockMultiSelected"),ice=Le("isAncestorMultiSelected"),sce=Le("getMultiSelectedBlocksStartClientId"),ace=Le("getMultiSelectedBlocksEndClientId"),lce=Le("getBlockOrder"),cce=Le("getBlockIndex"),uce=Le("isBlockSelected"),dce=Le("hasSelectedInnerBlock"),fce=Le("isBlockWithinSelection"),mce=Le("hasMultiSelection"),pce=Le("isMultiSelecting"),hce=Le("isSelectionEnabled"),gce=Le("getBlockMode"),vce=Le("isTyping"),yce=Le("isCaretWithinFormattedText"),bce=Le("getBlockInsertionPoint"),Sce=Le("isBlockInsertionPointVisible"),_ce=Le("isValidTemplate"),wce=Le("getTemplate"),xce=Le("getTemplateLock"),Cce=Le("canInsertBlockType"),Tce=Le("getInserterItems"),Pce=Le("hasInserterItems"),kce=Le("getBlockListSettings"),Ece=(0,dt.createRegistrySelector)(e=>()=>((0,Ca.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(dr.store).getCurrentTheme()?.default_template_types)),Rce=(0,dt.createRegistrySelector)(e=>(0,dt.createSelector)(()=>((0,Ca.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(dr.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:$c(r.icon)}))))),Ace=(0,dt.createRegistrySelector)(e=>(0,dt.createSelector)((t,r)=>{(0,Ca.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(dr.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??Xv:Xv})),Oce=(0,dt.createRegistrySelector)(e=>(0,dt.createSelector)((t,r)=>{if((0,Ca.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return Xv;let o=e(dr.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return Zi({template:r,templateAreas:i,templateTypes:n})})),Ice=(0,dt.createRegistrySelector)(e=>t=>{let r=Qn(t);return e(dr.store).getPostType(r)?.labels?.singular_name});function Nce(e){return e.publishSidebarActive}var mO={};Qc(mO,{__experimentalTearDownEditor:()=>Dce,__unstableSaveForPreview:()=>Wce,autosave:()=>Gce,clearSelectedBlock:()=>Pue,closePublishSidebar:()=>gue,createUndoLevel:()=>Zce,disablePublishSidebar:()=>Qce,editPost:()=>Vce,enablePublishSidebar:()=>Xce,enterFormattedText:()=>Wue,exitFormattedText:()=>Yue,hideInsertionPoint:()=>Bue,insertBlock:()=>Nue,insertBlocks:()=>Fue,insertDefaultBlock:()=>que,lockPostAutosaving:()=>eue,lockPostSaving:()=>Jce,mergeBlocks:()=>Vue,moveBlockToPosition:()=>Iue,moveBlocksDown:()=>Aue,moveBlocksUp:()=>Oue,multiSelect:()=>Tue,openPublishSidebar:()=>hue,receiveBlocks:()=>bue,redo:()=>Yce,refreshPost:()=>Uce,removeBlock:()=>zue,removeBlocks:()=>jue,removeEditorPanel:()=>lue,replaceBlock:()=>Rue,replaceBlocks:()=>Eue,resetBlocks:()=>yue,resetEditorBlocks:()=>rue,resetPost:()=>Bce,savePost:()=>jce,selectBlock:()=>wue,setDeviceType:()=>iue,setEditedPost:()=>SD,setIsInserterOpened:()=>cue,setIsListViewOpened:()=>uue,setRenderingMode:()=>nue,setTemplateValidity:()=>Mue,setupEditor:()=>Fce,setupEditorState:()=>Lce,showInsertionPoint:()=>Due,startMultiSelect:()=>xue,startTyping:()=>Hue,stopMultiSelect:()=>Cue,stopTyping:()=>Gue,switchEditorMode:()=>pue,synchronizeTemplate:()=>Lue,toggleBlockMode:()=>Uue,toggleDistractionFree:()=>due,toggleEditorPanelEnabled:()=>sue,toggleEditorPanelOpened:()=>aue,togglePublishSidebar:()=>vue,toggleSelection:()=>kue,toggleSpotlightMode:()=>fue,toggleTopToolbar:()=>mue,trashPost:()=>Hce,undo:()=>qce,unlockPostAutosaving:()=>tue,unlockPostSaving:()=>$ce,updateBlock:()=>Sue,updateBlockAttributes:()=>_ue,updateBlockListSettings:()=>Zue,updateEditorSettings:()=>oue,updatePost:()=>Mce,updatePostLock:()=>Kce});var fO=s(Xm(),1),bD=s(Qm(),1),ru=s(Yi(),1),Jm=s(Xe(),1),Ms=s(ct(),1),Tn=s(W(),1),tu=s($(),1),$m=s(mo(),1),Fr=s(lt(),1),Hr=s(E(),1);function dO(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function pD(e,t){return window.sessionStorage.getItem(dO(e,t))}function hD(e,t,r,o,n){window.sessionStorage.setItem(dO(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function $S(e,t){window.sessionStorage.removeItem(dO(e,t))}var ki=s(E(),1);function gD(e){let{previousPost:t,post:r,postType:o}=e;if(e.options?.isAutosave)return[];let n=["publish","private","future"],i=n.includes(t.status),a=n.includes(r.status),l=r.status==="trash"&&t.status!=="trash",c,u=o?.viewable??!1,d;l?(c=o.labels.item_trashed,u=!1):r.type===ur?(c=(0,ki.__)("Media updated."),u=!1):!i&&!a?(c=(0,ki.__)("Draft saved."),d=!0):i&&!a?(c=o.labels.item_reverted_to_draft,u=!1):!i&&a?c={publish:o.labels.item_published,private:o.labels.item_published_privately,future:o.labels.item_scheduled}[r.status]:c=o.labels.item_updated;let f=[];return u&&f.push({label:d?(0,ki.__)("View Preview"):o.labels.view_item,url:r.link,openInNewTab:!0}),[c,{id:"editor-save",type:"snackbar",actions:f}]}function vD(e){let{post:t,edits:r,error:o}=e;if(o&&o.code==="rest_autosave_no_changes")return[];let i=["publish","private","future"].indexOf(t.status)!==-1;if(o.code==="offline_error"){let c={publish:(0,ki.__)("Publishing failed because you were offline. Please verify your connection and try again."),private:(0,ki.__)("Publishing failed because you were offline. Please verify your connection and try again."),future:(0,ki.__)("Scheduling failed because you were offline. Please verify your connection and try again."),default:(0,ki.__)("Updating failed because you were offline. Please verify your connection and try again.")};return[!i&&r.status in c?c[r.status]:c.default,{id:"editor-save"}]}let a={publish:(0,ki.__)("Publishing failed."),private:(0,ki.__)("Publishing failed."),future:(0,ki.__)("Scheduling failed."),default:(0,ki.__)("Updating failed.")},l=!i&&r.status in a?a[r.status]:a.default;return o.message&&!/<\/?[^>]*>/.test(o.message)&&(l=[l,o.message].join(" ")),[l,{id:"editor-save"}]}function yD(e){return[e.error.message&&e.error.code!=="unknown_error"?e.error.message:(0,ki.__)("Trashing failed"),{id:"editor-trash-fail"}]}var Fce=(e,t,r)=>({dispatch:o})=>{if(o.setEditedPost(e.type,e.id),e.status==="auto-draft"&&r){let i;"content"in t?i=t.content:i=e.content.raw;let a=(0,Jm.parse)(i);a=(0,Jm.synchronizeBlocksWithTemplate)(a,r),o.resetEditorBlocks(a,{__unstableShouldCreateUndoLevel:!1})}t&&Object.entries(t).some(([i,a])=>a!==(e[i]?.raw??e[i]))&&o.editPost(t)};function Dce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function Bce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function Mce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Lce(e){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),SD(e.type,e.id)}function SD(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var Vce=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Tn.store).editEntityRecord("postType",i,n,e,t)},jce=(e={})=>async({select:t,dispatch:r,registry:o})=>{if(!t.isEditedPostSaveable())return;let n=t.getEditedPostContent();e.isAutosave||r.editPost({content:n},{undoIgnore:!0});let i=t.getCurrentPost(),a={id:i.id,...o.select(Tn.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{a=await(0,$m.applyFiltersAsync)("editor.preSavePost",a,e)}catch(c){l=c}if(!l)try{await o.dispatch(Tn.store).saveEntityRecord("postType",i.type,a,e)}catch(c){l=c.message&&c.code!=="unknown_error"?c.message:(0,Hr.__)("An error occurred while updating.")}if(l||(l=o.select(Tn.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,$m.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,$m.doActionAsync)("editor.savePost",{id:i.id,type:i.type},e)}catch(c){l=c}if(r({type:"REQUEST_POST_UPDATE_FINISH",options:e}),typeof window<"u"&&window.__experimentalTemplateActivate&&!e.isAutosave&&i.type==="wp_template"&&(typeof i.id=="number"||/^\d+$/.test(i.id))&&zce({select:t,dispatch:r,registry:o}),l){let c=vD({post:i,edits:a,error:l});c.length&&o.dispatch(Ms.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=gD({previousPost:i,post:c,postType:await o.resolveSelect(Tn.store).getPostType(c.type),options:e});u.length&&o.dispatch(Ms.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(tu.store).__unstableMarkLastChangeAsPersistent()}};async function zce({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Tn.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Tn.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(Ms.store).createNotice("info",(0,Hr.sprintf)((0,Hr.__)('Do you want to activate this "%s" template?'),l?.title??n),{id:"template-activate-notice",actions:[{label:(0,Hr.__)("Activate"),onClick:async()=>{await t.dispatch(Ms.store).createNotice("info",(0,Hr.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Tn.store).getEntityRecord("root","site");await t.dispatch(Tn.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(Ms.store).createSuccessNotice((0,Hr.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(Ms.store).createErrorNotice((0,Hr.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function Uce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var Hce=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Tn.store).getPostType(o),{rest_base:i,rest_namespace:a="wp/v2"}=n;t({type:"REQUEST_POST_DELETE_START"});try{let l=e.getCurrentPost();await(0,bD.default)({path:`/${a}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(Ms.store).createErrorNotice(...yD({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},Gce=({local:e=!1,...t}={})=>async({select:r,dispatch:o})=>{let n=r.getCurrentPost();if(e){let i=r.isEditedPostNew(),a=r.getEditedPostAttribute("title"),l=r.getEditedPostAttribute("content"),c=r.getEditedPostAttribute("excerpt");hD(n.id,i,a,l,c)}else await o.savePost({isAutosave:!0,...t})},Wce=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:r})=>((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()&&(["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await r.savePost({isPreview:!0}):await r.autosave({isPreview:!0})),t.getEditedPostPreviewLink()),Yce=()=>({registry:e})=>{e.dispatch(Tn.store).redo()},qce=()=>({registry:e})=>{e.dispatch(Tn.store).undo()};function Zce(){return(0,ru.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function Kce(e){return{type:"UPDATE_POST_LOCK",lock:e}}var Xce=()=>({registry:e})=>{e.dispatch(Fr.store).set("core","isPublishSidebarEnabled",!0)},Qce=()=>({registry:e})=>{e.dispatch(Fr.store).set("core","isPublishSidebarEnabled",!1)};function Jce(e){return{type:"LOCK_POST_SAVING",lockName:e}}function $ce(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function eue(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function tue(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var rue=(e,t={})=>({select:r,dispatch:o,registry:n})=>{let{__unstableShouldCreateUndoLevel:i,selection:a}=t,l={blocks:e,selection:a};if(i!==!1){let{id:c,type:u}=r.getCurrentPost();if(n.select(Tn.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Tn.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,Jm.__unstableSerializeAndClean)(f)}o.editPost(l)};function oue(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var nue=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(tu.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function iue(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}var sue=e=>({registry:t})=>{let r=t.select(Fr.store).get("core","inactivePanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(Fr.store).set("core","inactivePanels",n)},aue=e=>({registry:t})=>{let r=t.select(Fr.store).get("core","openPanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(Fr.store).set("core","openPanels",n)};function lue(e){return{type:"REMOVE_PANEL",panelName:e}}var cue=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&N(r.dispatch(tu.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function uue(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var due=({createNotice:e=!0}={})=>({dispatch:t,registry:r})=>{let o=r.select(Fr.store).get("core","distractionFree");o&&r.dispatch(Fr.store).set("core","fixedToolbar",!1),o||r.batch(()=>{r.dispatch(Fr.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),N(r.dispatch(tu.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch(Fr.store).set("core","distractionFree",!o),e&&r.dispatch(Ms.store).createInfoNotice(o?(0,Hr.__)("Distraction free mode deactivated."):(0,Hr.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,Hr.__)("Undo"),onClick:()=>{r.batch(()=>{r.dispatch(Fr.store).set("core","fixedToolbar",o),r.dispatch(Fr.store).toggle("core","distractionFree")})}}]})})},fue=()=>({registry:e})=>{e.dispatch(Fr.store).toggle("core","focusMode");let t=e.select(Fr.store).get("core","focusMode");e.dispatch(Ms.store).createInfoNotice(t?(0,Hr.__)("Spotlight mode activated."):(0,Hr.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,Hr.__)("Undo"),onClick:()=>{e.dispatch(Fr.store).toggle("core","focusMode")}}]})},mue=()=>({registry:e})=>{e.dispatch(Fr.store).toggle("core","fixedToolbar");let t=e.select(Fr.store).get("core","fixedToolbar");e.dispatch(Ms.store).createInfoNotice(t?(0,Hr.__)("Top toolbar activated."):(0,Hr.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,Hr.__)("Undo"),onClick:()=>{e.dispatch(Fr.store).toggle("core","fixedToolbar")}}]})},pue=e=>({dispatch:t,registry:r})=>{r.dispatch(Fr.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(tu.store).clearSelectedBlock(),N(r.dispatch(tu.store)).resetZoomLevel()),e==="visual"?(0,fO.speak)((0,Hr.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select(Fr.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,fO.speak)((0,Hr.__)("Code editor selected"),"assertive"))};function hue(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function gue(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function vue(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var bt=e=>(...t)=>({registry:r})=>{(0,ru.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(tu.store)[e](...t)},yue=bt("resetBlocks"),bue=bt("receiveBlocks"),Sue=bt("updateBlock"),_ue=bt("updateBlockAttributes"),wue=bt("selectBlock"),xue=bt("startMultiSelect"),Cue=bt("stopMultiSelect"),Tue=bt("multiSelect"),Pue=bt("clearSelectedBlock"),kue=bt("toggleSelection"),Eue=bt("replaceBlocks"),Rue=bt("replaceBlock"),Aue=bt("moveBlocksDown"),Oue=bt("moveBlocksUp"),Iue=bt("moveBlockToPosition"),Nue=bt("insertBlock"),Fue=bt("insertBlocks"),Due=bt("showInsertionPoint"),Bue=bt("hideInsertionPoint"),Mue=bt("setTemplateValidity"),Lue=bt("synchronizeTemplate"),Vue=bt("mergeBlocks"),jue=bt("removeBlocks"),zue=bt("removeBlock"),Uue=bt("toggleBlockMode"),Hue=bt("startTyping"),Gue=bt("stopTyping"),Wue=bt("enterFormattedText"),Yue=bt("exitFormattedText"),que=bt("insertDefaultBlock"),Zue=bt("updateBlockListSettings");var t3={};Qc(t3,{createTemplate:()=>swe,hideBlockTypes:()=>lwe,registerEntityAction:()=>J_e,registerEntityField:()=>ewe,registerPostTypeSchema:()=>nwe,removeTemplates:()=>dwe,resetStylesNavigation:()=>hwe,restoreRevision:()=>Swe,revertTemplate:()=>uwe,saveDirtyEntities:()=>cwe,selectNote:()=>_we,setCanvasMinHeight:()=>gwe,setCurrentRevisionId:()=>vwe,setCurrentTemplateId:()=>iwe,setDefaultRenderingMode:()=>fwe,setIsReady:()=>rwe,setRevisionPage:()=>ywe,setShowRevisionDiff:()=>bwe,setShowStylebook:()=>pwe,setStylesPath:()=>mwe,showBlockTypes:()=>awe,unregisterEntityAction:()=>$_e,unregisterEntityField:()=>twe});var Co=s(W(),1),st=s(E(),1),Dn=s(ct(),1),IG=s($(),1),Zf=s(lt(),1),NG=s(Ir(),1),FG=s(Qm(),1),Wx=s(Xe(),1),e3=s(ft(),1),Yx=s(po(),1);function e_(e){return e?e.source===k1.custom&&(!!e?.plugin||e?.has_theme_file):!1}var yO={};Qc(yO,{buildRevisionsPageQuery:()=>qd,getCanvasMinHeight:()=>fde,getCurrentRevision:()=>vde,getCurrentRevisionId:()=>vO,getDefaultRenderingMode:()=>cde,getEntityActions:()=>ide,getEntityFields:()=>ade,getInserter:()=>ede,getInserterSidebarToggleRef:()=>rde,getListViewToggleRef:()=>tde,getPageRevisions:()=>pde,getPostBlocksByName:()=>lde,getPostIcon:()=>ode,getPreviousRevision:()=>Sde,getRevisionPage:()=>gO,getRevisionsPerPage:()=>mde,getSelectedNote:()=>yde,getShowStylebook:()=>dde,getStylesPath:()=>ude,hasPostMetaChanges:()=>nde,isCollaborationEnabledForCurrentPost:()=>_de,isEntityReady:()=>sde,isNoteFocused:()=>bde,isRevisionsMode:()=>hde,isShowingRevisionDiff:()=>gde});var MD=s(xD(),1),ty=s($(),1),Ei=s(O(),1);var Pn=s(W(),1),LD=s(lt(),1);var CD=[];function TD(e,t,r){return e.actions[t]?.[r]??CD}function PD(e,t,r){return e.fields[t]?.[r]??CD}function kD(e,t,r){return e.isReady[t]?.[r]}var t_,Kue=new Uint8Array(16);function pO(){if(!t_&&(t_=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t_(Kue)}var Fo=[];for(let e=0;e<256;++e)Fo.push((e+256).toString(16).slice(1));function ED(e,t=0){return Fo[e[t+0]]+Fo[e[t+1]]+Fo[e[t+2]]+Fo[e[t+3]]+"-"+Fo[e[t+4]]+Fo[e[t+5]]+"-"+Fo[e[t+6]]+Fo[e[t+7]]+"-"+Fo[e[t+8]]+Fo[e[t+9]]+"-"+Fo[e[t+10]]+Fo[e[t+11]]+Fo[e[t+12]]+Fo[e[t+13]]+Fo[e[t+14]]+Fo[e[t+15]]}var Xue=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),hO={randomUUID:Xue};function Que(e,t,r){if(hO.randomUUID&&!t&&!e)return hO.randomUUID();e=e||{};let o=e.random||(e.rng||pO)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return ED(o)}var ep=Que;var ey=s(O(),1),AD=s(W(),1),OD=s(Yd(),1);var Jue=()=>{};function r_({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=Jue,onFileChange:i,onSuccess:a,multiple:l=!0}){let{receiveEntityRecords:c}=(0,ey.dispatch)(AD.store),{getCurrentPost:u,getEditorSettings:d}=(0,ey.select)(w),{lockPostAutosaving:f,unlockPostAutosaving:m,lockPostSaving:h,unlockPostSaving:g}=(0,ey.dispatch)(w),v=d().allowedMimeTypes,y=`image-upload-${ep()}`,b=!1;o=o||d().maxUploadFileSize;let _=u(),S=typeof _?.id=="number"?_.id:_?.wp_id,x=()=>{window.__clientSideMediaProcessing||(h(y),f(y),b=!0)},T=S?{post:S}:{},R=()=>{window.__clientSideMediaProcessing||(g(y),m(y),b=!1)};(0,OD.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:F=>{window.__clientSideMediaProcessing||(b?R():x()),i?.(F);let B=F.filter(z=>z?.id);B?.length&&c("postType","attachment",B,void 0,!0)},onSuccess:a,additionalData:{...T,...e},maxUploadFileSize:o,onError:({message:F})=>{window.__clientSideMediaProcessing||R(),n(F)},wpAllowedMimeTypes:v,multiple:l})}var ID=s(Ir(),1),ND=s(Yi(),1);function FD(e){return(0,ND.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,ID.cleanForSlug)(e)}var DD={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},$ue=["post-only","template-locked"],ede=(0,Ei.createRegistrySelector)(e=>(0,Ei.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(JS(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(ty.store),[a]=r("core/post-content");if(a){let l=o();return l&&l!==a&&n(l).includes(a)?DD:{rootClientId:a,insertionIndex:i(a).length,filterValue:void 0}}}return DD},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(ty.store),[a]=r("core/post-content"),l=o();return[t.blockInserterPanel,JS(t),a,l,l?n(l):void 0,a?i(a).length:void 0]}));function tde(e){return e.listViewToggleRef}function rde(e){return e.inserterSidebarToggleRef}var BD={wp_block:Wv,wp_navigation:vA,page:qm,post:oO},ode=(0,Ei.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let a=(e(Pn.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return a?.icon?$c(a.icon):Bs}if(BD[r])return BD[r];let n=e(Pn.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):qm}}),nde=(0,Ei.createRegistrySelector)(e=>(t,r,o)=>{let{type:n,id:i}=$r(t),a=e(Pn.store).getEntityRecordNonTransientEdits("postType",r||n,o||i);if(!a?.meta)return!1;let l=e(Pn.store).getEntityRecord("postType",r||n,o||i)?.meta;return!(0,MD.default)({...l,footnotes:void 0},{...a.meta,footnotes:void 0})});function ide(e,...t){return TD(e.dataviews,...t)}function sde(e,...t){return kD(e.dataviews,...t)}function ade(e,...t){return PD(e.dataviews,...t)}var lde=(0,Ei.createRegistrySelector)(e=>(0,Ei.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(ty.store);return o(r).filter(a=>n(a).every(l=>{let c=i(l);return c!=="core/query"&&!r.includes(c)}))},(t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n}=e(ty.store),i=o(r),a=i.map(l=>n(l));return[i,...a]})),cde=(0,Ei.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(Pn.store),a=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=a?.stylesheet,u=e(LD.store).get("core","renderingModes")?.[c]?.[r],d=Array.isArray(l?.supports?.editor)?l.supports.editor.find(m=>"default-mode"in m)?.["default-mode"]:void 0,f=u||d;return $ue.includes(f)?f:"post-only"});function ude(e){return e.stylesPath??"/"}function dde(e){return e.showStylebook??!1}function fde(e){return e.canvasMinHeight}function gO(e){return e.revisionPage}function qd(e,t){return{per_page:VD,page:t,context:"edit",orderby:"date",order:"desc",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",e])].join()}}var VD=100;function mde(){return VD}var pde=(0,Ei.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=$r(t);if(!o||!n)return null;let a=e(Pn.store).getEntityConfig("postType",o)?.revisionKey||"id";return e(Pn.store).getRevisions("postType",o,n,qd(a,r))});function hde(e){return e.revisionId!==null}function gde(e){return e.showRevisionDiff}function vO(e){return e.revisionId}var vde=(0,Ei.createRegistrySelector)(e=>t=>{let r=vO(t);if(!r)return;let o=gO(t);if(!o)return null;let{type:n,id:i}=$r(t),l=e(Pn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e(Pn.store).getRevisions("postType",n,i,qd(l,o));return c?c.find(u=>u[l]===r)??null:null});function yde(e){return e.selectedNote?.noteId}function bde(e){return!!e.selectedNote?.options?.focus}var Sde=(0,Ei.createRegistrySelector)(e=>t=>{let r=vO(t);if(!r)return;let o=gO(t);if(!o)return null;let{type:n,id:i}=$r(t),l=e(Pn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=qd(l,o),u=e(Pn.store).getRevisions("postType",n,i,c);if(!u)return null;let d=u.findIndex(h=>h[l]===r);if(d>=0&&d<u.length-1)return u[d+1];let f=lO(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e(Pn.store).getRevisions("postType",n,i,qd(l,o+1))?.[0]??null:null}),_de=(0,Ei.createRegistrySelector)(e=>t=>{if(!N(e(Pn.store)).isCollaborationSupported())return!1;let r=Qn(t);return!!(e(Pn.store).getEntityConfig("postType",r)?.syncConfig&&window._wpCollaborationEnabled)});var Gx=s(W(),1),OG=s(mo(),1);var QD=s(E(),1);var kn=s(A(),1);var s_=s(he(),1),WD=s(O(),1),tp=s(D(),1),YD=s(ct(),1),qD=s(Ir(),1),Zd=s(E(),1);var GD=s(Ir(),1);var o_=s(ft(),1),zD=s(E(),1);function UD(e){return e.type==="wp_template"}function HD(e){return e.type==="wp_template_part"}function Rl(e){return e.type==="wp_template"||e.type==="wp_template_part"}function He(e,t=(0,zD.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,o_.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,o_.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,o_.decodeEntities)(e.title.raw)),r||t}function n_(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var i_=e=>typeof e!="object"?"":e.slug||(0,GD.cleanForSlug)(He(e))||e.id.toString();var ho=s(C(),1),ZD=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||i_(r),i=r.permalink_template||"",a=/%(?:postname|pagename)%/,[l,c]=i.split(a),u=l,d=c,f=a.test(i),m=(0,tp.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,qD.safeDecodeURIComponent)(r.link||"");(0,tp.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,tp.useCallback)(S=>t({[o]:S}),[o,t]),{createNotice:y}=(0,WD.useDispatch)(YD.store),b=(0,s_.useCopyToClipboard)(g,()=>{y("info",(0,Zd.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),_="editor-post-url__slug-description-"+(0,s_.useInstanceId)(ZD);return(0,ho.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,ho.jsxs)(kn.__experimentalVStack,{children:[(0,ho.jsxs)(kn.__experimentalVStack,{spacing:"0px",children:[(0,ho.jsx)("span",{children:(0,Zd.__)("Customize the last part of the Permalink.")}),(0,ho.jsx)(kn.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,Zd.__)("Learn more")})]}),(0,ho.jsx)(kn.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,ho.jsx)(kn.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,ho.jsx)(kn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,ho.jsx)(kn.Button,{size:"small",icon:kv,ref:b,label:(0,Zd.__)("Copy")})}),label:(0,Zd.__)("Link"),hideLabelFromVision:!0,value:n,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:S=>{v(S)},onBlur:()=>{n===""&&v(m.current)},"aria-describedby":_}),(0,ho.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,ho.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,Zd.__)("Permalink:")}),(0,ho.jsxs)(kn.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,ho.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,ho.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,ho.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,ho.jsx)(kn.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},KD=ZD;var a_=s(D(),1);var wde=({item:e})=>{let t=i_(e),r=(0,a_.useRef)(t);return(0,a_.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},XD=wde;var xde={id:"slug",type:"text",label:(0,QD.__)("Slug"),Edit:KD,render:XD,filterBy:!1},bO=xde;var SO=s(E(),1);function JD(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=JD(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Cde(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=JD(e))&&(o&&(o+=" "),o+=t);return o}var re=Cde;var $D=s(A(),1),eB=s(E(),1);var ry=s(C(),1);function oy({item:e,className:t,children:r}){let o=He(e);return(0,ry.jsxs)($D.__experimentalHStack,{className:re("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,ry.jsx)("span",{children:o||(0,eB.__)("(no title)")}),r]})}function l_({item:e}){return(0,ry.jsx)(oy,{item:e})}var Tde={type:"text",id:"title",label:(0,SO.__)("Title"),placeholder:(0,SO.__)("No title"),getValue:({item:e})=>He(e),render:l_,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},c_=Tde;var xO=s(E(),1);var _O=s(E(),1),rB=s(O(),1),oB=s(W(),1),nB=s(A(),1);var tB=s(qv(),1),{lock:Q6e,unlock:Do}=(0,tB.__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/fields");var wO=s(C(),1),{Badge:Pde}=Do(nB.privateApis);function iB({item:e}){let{frontPageId:t,postsPageId:r}=(0,rB.useSelect)(o=>{let{getEntityRecord:n}=o(oB.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,wO.jsx)(oy,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,wO.jsx)(Pde,{children:e.id===t?(0,_O.__)("Homepage"):(0,_O.__)("Posts Page")})})}var kde={type:"text",id:"title",label:(0,xO.__)("Title"),placeholder:(0,xO.__)("No title"),getValue:({item:e})=>He(e),render:iB,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},CO=kde;var TO=s(E(),1);var Ede={type:"text",label:(0,TO.__)("Template"),placeholder:(0,TO.__)("No title"),id:"title",getValue:({item:e})=>He(e),render:l_,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},ny=Ede;var PO=s(E(),1);var aB=s(E(),1);var lB=s(A(),1),cB=s(Ls(),1);var u_=s(C(),1),{PATTERN_TYPES:Rde}=Do(cB.privateApis);function uB({item:e}){return(0,u_.jsx)(oy,{item:e,className:"fields-field__pattern-title",children:e.type===Rde.theme&&(0,u_.jsx)(lB.Tooltip,{placement:"top",text:(0,aB.__)("This pattern cannot be edited."),children:(0,u_.jsx)(No,{icon:fA,size:24})})})}var Ade={type:"text",id:"title",label:(0,PO.__)("Title"),placeholder:(0,PO.__)("No title"),getValue:({item:e})=>He(e),render:uB,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},iy=Ade;var _M=s(E(),1);var ut=s(A(),1),rf=s(sy(),1),d5=s(W(),1),Cy=s(O(),1),$t=s(D(),1),An=s(E(),1);var fp=s(Yd(),1),pM=s(ct(),1);var EO=ly(),Ge=e=>ay(e,EO),RO=ly();Ge.write=e=>ay(e,RO);var d_=ly();Ge.onStart=e=>ay(e,d_);var AO=ly();Ge.onFrame=e=>ay(e,AO);var OO=ly();Ge.onFinish=e=>ay(e,OO);var rp=[];Ge.setTimeout=(e,t)=>{let r=Ge.now()+t,o=()=>{let i=rp.findIndex(a=>a.cancel==o);~i&&rp.splice(i,1),nu-=~i?1:0},n={time:r,handler:e,cancel:o};return rp.splice(fB(r),0,n),nu+=1,mB(),n};var fB=e=>~(~rp.findIndex(t=>t.time>e)||~rp.length);Ge.cancel=e=>{d_.delete(e),AO.delete(e),OO.delete(e),EO.delete(e),RO.delete(e)};Ge.sync=e=>{kO=!0,Ge.batchedUpdates(e),kO=!1};Ge.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function o(...n){t=n,Ge.onStart(r)}return o.handler=e,o.cancel=()=>{d_.delete(r),t=null},o};var IO=typeof window<"u"?window.requestAnimationFrame:()=>{};Ge.use=e=>IO=e;Ge.now=typeof performance<"u"?()=>performance.now():Date.now;Ge.batchedUpdates=e=>e();Ge.catch=console.error;Ge.frameLoop="always";Ge.advance=()=>{Ge.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):hB()};var ou=-1,nu=0,kO=!1;function ay(e,t){kO?(t.delete(e),e(0)):(t.add(e),mB())}function mB(){ou<0&&(ou=0,Ge.frameLoop!=="demand"&&IO(pB))}function Ode(){ou=-1}function pB(){~ou&&(IO(pB),Ge.batchedUpdates(hB))}function hB(){let e=ou;ou=Ge.now();let t=fB(ou);if(t&&(gB(rp.splice(0,t),r=>r.handler()),nu-=t),!nu){Ode();return}d_.flush(),EO.flush(e?Math.min(64,ou-e):16.667),AO.flush(),RO.flush(),OO.flush()}function ly(){let e=new Set,t=e;return{add(r){nu+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return nu-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,nu-=t.size,gB(t,o=>o(r)&&e.add(o)),nu+=e.size,t=e)}}}function gB(e,t){e.forEach(r=>{try{t(r)}catch(o){Ge.catch(o)}})}var Qi=s(Jn());function g_(){}var xB=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),ce={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 Ta(e,t){if(ce.arr(e)){if(!ce.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var zt=(e,t)=>e.forEach(t);function Ji(e,t,r){if(ce.arr(e)){for(let o=0;o<e.length;o++)t.call(r,e[o],`${o}`);return}for(let o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o)}var $n=e=>ce.und(e)?[]:ce.arr(e)?e:[e];function sp(e,t){if(e.size){let r=Array.from(e);e.clear(),zt(r,t)}}var ap=(e,...t)=>sp(e,r=>r(...t)),LO=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),VO,CB,iu=null,TB=!1,jO=g_,Ide=e=>{e.to&&(CB=e.to),e.now&&(Ge.now=e.now),e.colors!==void 0&&(iu=e.colors),e.skipAnimation!=null&&(TB=e.skipAnimation),e.createStringInterpolator&&(VO=e.createStringInterpolator),e.requestAnimationFrame&&Ge.use(e.requestAnimationFrame),e.batchedUpdates&&(Ge.batchedUpdates=e.batchedUpdates),e.willAdvance&&(jO=e.willAdvance),e.frameLoop&&(Ge.frameLoop=e.frameLoop)},Ri=Object.freeze({__proto__:null,get createStringInterpolator(){return VO},get to(){return CB},get colors(){return iu},get skipAnimation(){return TB},get willAdvance(){return jO},assign:Ide}),cy=new Set,Xi=[],NO=[],p_=0,lp={get idle(){return!cy.size&&!Xi.length},start(e){p_>e.priority?(cy.add(e),Ge.onStart(Nde)):(PB(e),Ge(BO))},advance:BO,sort(e){if(p_)Ge.onFrame(()=>lp.sort(e));else{let t=Xi.indexOf(e);~t&&(Xi.splice(t,1),kB(e))}},clear(){Xi=[],cy.clear()}};function Nde(){cy.forEach(PB),cy.clear(),Ge(BO)}function PB(e){Xi.includes(e)||kB(e)}function kB(e){Xi.splice(Fde(Xi,t=>t.priority>e.priority),0,e)}function BO(e){let t=NO;for(let r=0;r<Xi.length;r++){let o=Xi[r];p_=o.priority,o.idle||(jO(o),o.advance(e),o.idle||t.push(o))}return p_=0,NO=Xi,NO.length=0,Xi=t,Xi.length>0}function Fde(e,t){let r=e.findIndex(t);return r<0?e.length:r}var EB={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},Vs="[-+]?\\d*\\.?\\d+",h_=Vs+"%";function v_(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Dde=new RegExp("rgb"+v_(Vs,Vs,Vs)),Bde=new RegExp("rgba"+v_(Vs,Vs,Vs,Vs)),Mde=new RegExp("hsl"+v_(Vs,h_,h_)),Lde=new RegExp("hsla"+v_(Vs,h_,h_,Vs)),Vde=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jde=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zde=/^#([0-9a-fA-F]{6})$/,Ude=/^#([0-9a-fA-F]{8})$/;function Hde(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=zde.exec(e))?parseInt(t[1]+"ff",16)>>>0:iu&&iu[e]!==void 0?iu[e]:(t=Dde.exec(e))?(op(t[1])<<24|op(t[2])<<16|op(t[3])<<8|255)>>>0:(t=Bde.exec(e))?(op(t[1])<<24|op(t[2])<<16|op(t[3])<<8|SB(t[4]))>>>0:(t=Vde.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ude.exec(e))?parseInt(t[1],16)>>>0:(t=jde.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Mde.exec(e))?(yB(bB(t[1]),f_(t[2]),f_(t[3]))|255)>>>0:(t=Lde.exec(e))?(yB(bB(t[1]),f_(t[2]),f_(t[3]))|SB(t[4]))>>>0:null}function FO(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function yB(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=FO(n,o,e+1/3),a=FO(n,o,e),l=FO(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function op(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function bB(e){return(parseFloat(e)%360+360)%360/360}function SB(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function f_(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function _B(e){let t=Hde(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,o=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${o}, ${n}, ${i})`}var su=(e,t,r)=>{if(ce.fun(e))return e;if(ce.arr(e))return su({range:e,output:t,extrapolate:r});if(ce.str(e.output[0]))return VO(e);let o=e,n=o.output,i=o.range||[0,1],a=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",c=o.easing||(u=>u);return u=>{let d=Wde(u,i);return Gde(u,i[d],i[d+1],n[d],n[d+1],c,a,l,o.map)}};function Gde(e,t,r,o,n,i,a,l,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>r){if(l==="identity")return u;l==="clamp"&&(u=r)}return o===n?o:t===r?e<=t?o:n:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=i(u),o===-1/0?u=-u:n===1/0?u=u+o:u=u*(n-o)+o,u)}function Wde(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function MO(){return MO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},MO.apply(this,arguments)}var np=Symbol.for("FluidValue.get"),Kd=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[np]),Bo=e=>e&&e[np]?e[np]():e,zO=e=>e[Kd]||null;function Yde(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Xd(e,t){let r=e[Kd];r&&r.forEach(o=>{Yde(o,t)})}var ip=class{constructor(t){if(this[np]=void 0,this[Kd]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");qde(this,t)}},qde=(e,t)=>RB(e,np,t);function au(e,t){if(e[np]){let r=e[Kd];r||RB(e,Kd,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function lu(e,t){let r=e[Kd];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[Kd]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var RB=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),m_=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Zde=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,wB=new RegExp(`(${m_.source})(%|[a-z]+)`,"i"),Kde=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,y_=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,AB=e=>{let[t,r]=Xde(e);if(!t||LO())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(r&&r.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(r);return n||e}else{if(r&&y_.test(r))return AB(r);if(r)return r}return e},Xde=e=>{let t=y_.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},DO,Qde=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,b_=e=>{DO||(DO=iu?new RegExp(`(${Object.keys(iu).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>Bo(i).replace(y_,AB).replace(Zde,_B).replace(DO,_B)),r=t.map(i=>i.match(m_).map(Number)),n=r[0].map((i,a)=>r.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(i=>su(MO({},e,{output:i})));return i=>{var a;let l=!wB.test(t[0])&&((a=t.find(u=>wB.test(u)))==null?void 0:a.replace(m_,"")),c=0;return t[0].replace(m_,()=>`${n[c++](i)}${l||""}`).replace(Kde,Qde)}},OB="react-spring: ",IB=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${OB}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},Jde=IB(console.warn);function NB(){Jde(`${OB}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var S3e=IB(console.warn);function cp(e){return ce.str(e)&&(e[0]=="#"||/\d/.test(e)||!LO()&&y_.test(e)||e in(iu||{}))}var uy=LO()?Qi.useEffect:Qi.useLayoutEffect,$de=()=>{let e=(0,Qi.useRef)(!1);return uy(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function UO(){let e=(0,Qi.useState)()[1],t=$de();return()=>{t.current&&e(Math.random())}}function FB(e,t){let[r]=(0,Qi.useState)(()=>({inputs:t,result:e()})),o=(0,Qi.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&efe(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,Qi.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function efe(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var HO=e=>(0,Qi.useEffect)(e,tfe),tfe=[];var Sy=s(Jn()),_y=s(Jn());var LB=s(Jn()),Al=s(Jn()),dy=Symbol.for("Animated:node"),rfe=e=>!!e&&e[dy]===e,js=e=>e&&e[dy],x_=(e,t)=>xB(e,dy,t),fy=e=>e&&e[dy]&&e[dy].getPayload(),S_=class{constructor(){this.payload=void 0,x_(this,this)}getPayload(){return this.payload||[]}},Qd=class e extends S_{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,ce.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return ce.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,ce.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Jd=class e extends Qd{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=su({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(ce.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=su({output:[this.getValue(),t]})),this._value=0,super.reset()}},__={dependencies:null},$d=class extends S_{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return Ji(this.source,(o,n)=>{rfe(o)?r[n]=o.getValue(t):En(o)?r[n]=Bo(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&zt(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return Ji(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){__.dependencies&&En(t)&&__.dependencies.add(t);let r=fy(t);r&&zt(r,o=>this.add(o))}},GO=class e extends $d{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((o,n)=>o.setValue(t[n])).some(Boolean):(super.setValue(t.map(ofe)),!0)}};function ofe(e){return(cp(e)?Jd:Qd).create(e)}function C_(e){let t=js(e);return t?t.constructor:ce.arr(e)?GO:cp(e)?Jd:Qd}function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},w_.apply(this,arguments)}var DB=(e,t)=>{let r=!ce.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Al.forwardRef)((o,n)=>{let i=(0,Al.useRef)(null),a=r&&(0,Al.useCallback)(g=>{i.current=ife(n,g)},[n]),[l,c]=nfe(o,t),u=UO(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new WO(d,c),m=(0,Al.useRef)();uy(()=>(m.current=f,zt(c,g=>au(g,f)),()=>{m.current&&(zt(m.current.deps,g=>lu(g,m.current)),Ge.cancel(m.current.update))})),(0,Al.useEffect)(d,[]),HO(()=>()=>{let g=m.current;zt(g.deps,v=>lu(v,g))});let h=t.getComponentProps(l.getValue());return LB.createElement(e,w_({},h,{ref:a}))})},WO=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&Ge.write(this.update)}};function nfe(e,t){let r=new Set;return __.dependencies=r,e.style&&(e=w_({},e,{style:t.createAnimatedStyle(e.style)})),e=new $d(e),__.dependencies=null,[e,r]}function ife(e,t){return e&&(ce.fun(e)?e(t):e.current=t),t}var BB=Symbol.for("AnimatedComponent"),VB=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new $d(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=a=>{let l=MB(a)||"Anonymous";return ce.str(a)?a=i[a]||(i[a]=DB(a,n)):a=a[BB]||(a[BB]=DB(a,n)),a.displayName=`Animated(${l})`,a};return Ji(e,(a,l)=>{ce.arr(e)&&(l=MB(a)),i[l]=i(a)}),{animated:i}},MB=e=>ce.str(e)?e:e&&ce.str(e.displayName)?e.displayName:ce.fun(e)&&e.name||null;function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Rn.apply(this,arguments)}function ef(e,...t){return ce.fun(e)?e(...t):e}var gy=(e,t)=>e===!0||!!(t&&e&&(ce.fun(e)?e(t):$n(e).includes(t))),QB=(e,t)=>ce.obj(e)?t&&e[t]:e,JB=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,sfe=e=>e,$B=(e,t=sfe)=>{let r=afe;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));let o={};for(let n of r){let i=t(e[n],n);ce.und(i)||(o[n]=i)}return o},afe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],lfe={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 cfe(e){let t={},r=0;if(Ji(e,(o,n)=>{lfe[n]||(t[n]=o,r++)}),r)return t}function eM(e){let t=cfe(e);if(t){let r={to:t};return Ji(e,(o,n)=>n in t||(r[n]=o)),r}return Rn({},e)}function vy(e){return e=Bo(e),ce.arr(e)?e.map(vy):cp(e)?Ri.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function ZO(e){return ce.fun(e)||ce.arr(e)&&ce.obj(e[0])}var ufe={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}},k_=1.70158,T_=k_*1.525,jB=k_+1,zB=2*Math.PI/3,UB=2*Math.PI/4.5,P_=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,dfe={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=>jB*e*e*e-k_*e*e,easeOutBack:e=>1+jB*Math.pow(e-1,3)+k_*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((T_+1)*2*e-T_)/2:(Math.pow(2*e-2,2)*((T_+1)*(e*2-2)+T_)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*zB),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*zB)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*UB))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*UB)/2+1,easeInBounce:e=>1-P_(1-e),easeOutBounce:P_,easeInOutBounce:e=>e<.5?(1-P_(1-2*e))/2:(1+P_(2*e-1))/2},KO=Rn({},ufe.default,{mass:1,damping:1,easing:dfe.linear,clamp:!1}),XO=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,KO)}};function ffe(e,t,r){r&&(r=Rn({},r),HB(r,t),t=Rn({},r,t)),HB(e,t),Object.assign(e,t);for(let a in KO)e[a]==null&&(e[a]=KO[a]);let{mass:o,frequency:n,damping:i}=e;return ce.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*o,e.friction=4*Math.PI*i*o/n),e}function HB(e,t){if(!ce.und(t.decay))e.duration=void 0;else{let r=!ce.und(t.tension)||!ce.und(t.friction);(r||!ce.und(t.frequency)||!ce.und(t.damping)||!ce.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var GB=[],QO=class{constructor(){this.changed=!1,this.values=GB,this.toValues=null,this.fromValues=GB,this.to=void 0,this.from=void 0,this.config=new XO,this.immediate=!1}};function tM(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((a,l)=>{var c;let u,d,f=gy((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{ce.und(r.pause)||(n.paused=gy(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||gy(v,t)),u=ef(r.delay||0,t),v?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-Ge.now()}function h(){u>0&&!Ri.skipAnimation?(n.delayed=!0,d=Ge.setTimeout(g,u),n.pauseQueue.add(m),n.timeouts.add(d)):g()}function g(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(Rn({},r,{callId:e,cancel:f}),a)}catch(v){l(v)}}})}var n5=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?up(e.get()):t.every(r=>r.noop)?rM(e.get()):zs(e.get(),t.every(r=>r.finished)),rM=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),zs=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),up=e=>({value:e,cancelled:!0,finished:!1});function oM(e,t,r,o){let{callId:n,parentId:i,onRest:a}=t,{asyncTo:l,promise:c}=r;return!i&&e===l&&!t.reset?c:r.promise=(async()=>{r.asyncId=n,r.asyncTo=e;let u=$B(t,(y,b)=>b==="onRest"?void 0:y),d,f,m=new Promise((y,b)=>(d=y,f=b)),h=y=>{let b=n<=(r.cancelId||0)&&up(o)||n!==r.asyncId&&zs(o,!1);if(b)throw y.result=b,f(y),y},g=(y,b)=>{let _=new E_,S=new R_;return(async()=>{if(Ri.skipAnimation)throw yy(r),S.result=zs(o,!1),f(S),S;h(_);let x=ce.obj(y)?Rn({},y):Rn({},b,{to:y});x.parentId=n,Ji(u,(R,F)=>{ce.und(x[F])&&(x[F]=R)});let T=await o.start(x);return h(_),r.paused&&await new Promise(R=>{r.resumeQueue.add(R)}),T})()},v;if(Ri.skipAnimation)return yy(r),zs(o,!1);try{let y;ce.arr(e)?y=(async b=>{for(let _ of b)await g(_)})(e):y=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([y.then(d),m]),v=zs(o.get(),!0,!1)}catch(y){if(y instanceof E_)v=y.result;else if(y instanceof R_)v=y.result;else throw y}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?c:void 0)}return ce.fun(a)&&Ge.batchedUpdates(()=>{a(v,o,o.item)}),v})()}function yy(e,t){sp(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var E_=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}},R_=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},JO=e=>e instanceof by,mfe=1,by=class extends ip{constructor(...t){super(...t),this.id=mfe++,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=js(this);return t&&t.getValue()}to(...t){return Ri.to(this,t)}interpolate(...t){return NB(),Ri.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,r=!1){Xd(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||lp.sort(this),Xd(this,{type:"priority",parent:this,priority:t})}},tf=Symbol.for("SpringPhase"),nM=1,$O=2,e5=4,YO=e=>(e[tf]&nM)>0,cu=e=>(e[tf]&$O)>0,my=e=>(e[tf]&e5)>0,WB=(e,t)=>t?e[tf]|=$O|nM:e[tf]&=~$O,YB=(e,t)=>t?e[tf]|=e5:e[tf]&=~e5,t5=class extends by{constructor(t,r){if(super(),this.key=void 0,this.animation=new QO,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,!ce.und(t)||!ce.und(r)){let o=ce.obj(t)?Rn({},t):Rn({},r,{from:t});ce.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(cu(this)||this._state.asyncTo)||my(this)}get goal(){return Bo(this.animation.to)}get velocity(){let t=js(this);return t instanceof Qd?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return YO(this)}get isAnimating(){return cu(this)}get isPaused(){return my(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:a}=n,l=fy(n.to);!l&&En(n.to)&&(a=$n(Bo(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Jd?1:l?l[f].lastPosition:a[f],h=n.immediate,g=m;if(!h){if(g=d.lastPosition,i.tension<=0){d.done=!0;return}let v=d.elapsedTime+=t,y=n.fromValues[f],b=d.v0!=null?d.v0:d.v0=ce.arr(i.velocity)?i.velocity[f]:i.velocity,_,S=i.precision||(y==m?.005:Math.min(1,Math.abs(m-y)*.001));if(ce.und(i.duration))if(i.decay){let x=i.decay===!0?.998:i.decay,T=Math.exp(-(1-x)*v);g=y+b/(1-x)*(1-T),h=Math.abs(d.lastPosition-g)<=S,_=b*T}else{_=d.lastVelocity==null?b:d.lastVelocity;let x=i.restVelocity||S/10,T=i.clamp?0:i.bounce,R=!ce.und(T),F=y==m?d.v0>0:y<m,B,z=!1,L=1,M=Math.ceil(t/L);for(let k=0;k<M&&(B=Math.abs(_)>x,!(!B&&(h=Math.abs(m-g)<=S,h)));++k){R&&(z=g==m||g>m==F,z&&(_=-_*T,g=m));let I=-i.tension*1e-6*(g-m),U=-i.friction*.001*_,G=(I+U)/i.mass;_=_+G*L,g=g+_*L}}else{let x=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,v=d.elapsedTime+=t)),x=(i.progress||0)+v/this._memoizedDuration,x=x>1?1:x<0?0:x,d.durationProgress=x),g=y+i.easing(x)*(m-y),_=(g-d.lastPosition)/t,h=x==1}d.lastVelocity=_,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),h=!0)}l&&!l[f].done&&(h=!1),h?d.done=!0:r=!1,d.setValue(g,i.round)&&(o=!0)});let c=js(this),u=c.getValue();if(r){let d=Bo(n.to);(u!==d||o)&&!i.decay?(c.setValue(d),this._onChange(d)):o&&i.decay&&this._onChange(u),this._stop()}else o&&this._onChange(u)}set(t){return Ge.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cu(this)){let{to:t,config:r}=this.animation;Ge.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let o;return ce.und(t)?(o=this.queue||[],this.queue=[]):o=[ce.obj(t)?t:Rn({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>n5(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),yy(this._state,t&&this._lastCallId),Ge.batchedUpdates(()=>this._stop(r,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 r=this.key||"",{to:o,from:n}=t;o=ce.obj(o)?o[r]:o,(o==null||ZO(o))&&(o=void 0),n=ce.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return YO(this)||(t.reverse&&([o,n]=[n,o]),n=Bo(n),ce.und(n)?js(this)||this._set(o):this._set(n)),i}_update(t,r){let o=Rn({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,$B(o,(c,u)=>/^on/.test(u)?QB(c,n):c)),ZB(this,o,"onProps"),hy(this,"onProps",o,this);let a=this._prepareNode(o);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 l=this._state;return tM(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{my(this)||(YB(this,!0),ap(l.pauseQueue),hy(this,"onPause",zs(this,py(this,this.animation.to)),this))},resume:()=>{my(this)&&(YB(this,!1),cu(this)&&this._resume(),ap(l.resumeQueue),hy(this,"onResume",zs(this,py(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=iM(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(up(this));let n=!ce.und(t.to),i=!ce.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(up(this));let{key:a,defaultProps:l,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!r.default||ce.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!Ta(m,d);h&&(c.from=m),m=Bo(m);let g=!Ta(f,u);g&&this._focus(f);let v=ZO(r.to),{config:y}=c,{decay:b,velocity:_}=y;(n||i)&&(y.velocity=0),r.config&&!v&&ffe(y,ef(r.config,a),r.config!==l.config?ef(l.config,a):void 0);let S=js(this);if(!S||ce.und(f))return o(zs(this,!0));let x=ce.und(r.reset)?i&&!r.default:!ce.und(m)&&gy(r.reset,a),T=x?m:this.get(),R=vy(f),F=ce.num(R)||ce.arr(R)||cp(R),B=!v&&(!F||gy(l.immediate||r.immediate,a));if(g){let k=C_(f);if(k!==S.constructor)if(B)S=this._set(R);else throw Error(`Cannot animate between ${S.constructor.name} and ${k.name}, as the "to" prop suggests`)}let z=S.constructor,L=En(f),M=!1;if(!L){let k=x||!YO(this)&&h;(g||k)&&(M=Ta(vy(T),R),L=!M),(!Ta(c.immediate,B)&&!B||!Ta(y.decay,b)||!Ta(y.velocity,_))&&(L=!0)}if(M&&cu(this)&&(c.changed&&!x?L=!0:L||this._stop(u)),!v&&((L||En(u))&&(c.values=S.getPayload(),c.toValues=En(f)?null:z==Jd?[1]:$n(R)),c.immediate!=B&&(c.immediate=B,!B&&!x&&this._set(u)),L)){let{onRest:k}=c;zt(pfe,U=>ZB(this,r,U));let I=zs(this,py(this,u));ap(this._pendingCalls,I),this._pendingCalls.add(o),c.changed&&Ge.batchedUpdates(()=>{c.changed=!x,k?.(I,this),x?ef(l.onRest,I):c.onStart==null||c.onStart(I,this)})}x&&this._set(T),v?o(oM(r.to,r,this._state,this)):L?this._start():cu(this)&&!g?this._pendingCalls.add(o):o(rM(T))}_focus(t){let r=this.animation;t!==r.to&&(zO(this)&&this._detach(),r.to=t,zO(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;En(r)&&(au(r,this),JO(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;En(t)&&lu(t,this)}_set(t,r=!0){let o=Bo(t);if(!ce.und(o)){let n=js(this);if(!n||!Ta(o,n.getValue())){let i=C_(o);!n||n.constructor!=i?x_(this,i.create(o)):n.setValue(o),n&&Ge.batchedUpdates(()=>{this._onChange(o,r)})}}return js(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,hy(this,"onStart",zs(this,py(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),ef(this.animation.onChange,t,this)),ef(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;js(this).reset(Bo(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),cu(this)||(WB(this,!0),my(this)||this._resume())}_resume(){Ri.skipAnimation?this.finish():lp.start(this)}_stop(t,r){if(cu(this)){WB(this,!1);let o=this.animation;zt(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Xd(this,{type:"idle",parent:this});let n=r?up(this.get()):zs(this.get(),py(this,t??o.to));ap(this._pendingCalls,n),o.changed&&(o.changed=!1,hy(this,"onRest",n,this))}}};function py(e,t){let r=vy(t),o=vy(e.get());return Ta(o,r)}function iM(e,t=e.loop,r=e.to){let o=ef(t);if(o){let n=o!==!0&&eM(o),i=(n||e).reverse,a=!n||n.reset;return r5(Rn({},e,{loop:t,default:!1,pause:void 0,to:!i||ZO(r)?r:void 0,from:a?e.from:void 0,reset:a},n))}}function r5(e){let{to:t,from:r}=e=eM(e),o=new Set;return ce.obj(t)&&qB(t,o),ce.obj(r)&&qB(r,o),e.keys=o.size?Array.from(o):null,e}function qB(e,t){Ji(e,(r,o)=>r!=null&&t.add(o))}var pfe=["onStart","onRest","onChange","onPause","onResume"];function ZB(e,t,r){e.animation[r]=t[r]!==JB(t,r)?QB(t[r],e.key):void 0}function hy(e,t,...r){var o,n,i,a;(o=(n=e.animation)[t])==null||o.call(n,...r),(i=(a=e.defaultProps)[t])==null||i.call(a,...r)}var hfe=["onStart","onChange","onRest"],gfe=1,A_=class{constructor(t,r){this.id=gfe++,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),r&&(this._flush=r),t&&this.start(Rn({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((r,o)=>t[o]=r.get()),t}set(t){for(let r in t){let o=t[r];ce.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(r5(t)),this}start(t){let{queue:r}=this;return t?r=$n(t).map(r5):this.queue=[],this._flush?this._flush(this,r):(aM(this,r),vfe(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;zt($n(r),n=>o[n].stop(!!t))}else yy(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(ce.und(t))this.start({pause:!0});else{let r=this.springs;zt($n(t),o=>r[o].pause())}return this}resume(t){if(ce.und(t))this.start({pause:!1});else{let r=this.springs;zt($n(t),o=>r[o].resume())}return this}each(t){Ji(this.springs,t)}_onFrame(){let{onStart:t,onChange:r,onRest:o}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,sp(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let a=!n&&this._started,l=i||a&&o.size?this.get():null;i&&r.size&&sp(r,([c,u])=>{u.value=l,c(u,this,this._item)}),a&&(this._started=!1,sp(o,([c,u])=>{u.value=l,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Ge.onFrame(this._onFrame)}};function vfe(e,t){return Promise.all(t.map(r=>sM(e,r))).then(r=>n5(e,r))}async function sM(e,t,r){let{keys:o,to:n,from:i,loop:a,onRest:l,onResolve:c}=t,u=ce.obj(t.default)&&t.default;a&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=ce.arr(n)||ce.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):zt(hfe,v=>{let y=t[v];if(ce.fun(y)){let b=e._events[v];t[v]=({finished:_,cancelled:S})=>{let x=b.get(y);x?(_||(x.finished=!1),S&&(x.cancelled=!0)):b.set(y,{value:null,finished:_||!1,cancelled:S||!1})},u&&(u[v]=t[v])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,ap(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(o||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),h=t.cancel===!0||JB(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(tM(++e._lastAsyncId,{props:t,state:f,actions:{pause:g_,resume:g_,start(v,y){h?(yy(f,e._lastAsyncId),y(up(e))):(v.onRest=l,y(oM(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=n5(e,await Promise.all(m));if(a&&g.finished&&!(r&&g.noop)){let v=iM(t,a,n);if(v)return aM(e,[v]),sM(e,v,!0)}return c&&Ge.batchedUpdates(()=>c(g,e,e.item)),g}function yfe(e,t){let r=new t5;return r.key=e,t&&au(r,t),r}function bfe(e,t,r){t.keys&&zt(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function aM(e,t){zt(t,r=>{bfe(e.springs,r,o=>yfe(o,e))})}function Sfe(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var _fe=["children"],i5=e=>{let{children:t}=e,r=Sfe(e,_fe),o=(0,_y.useContext)(O_),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=FB(()=>({pause:n,immediate:i}),[n,i]);let{Provider:a}=O_;return Sy.createElement(a,{value:r},t)},O_=wfe(i5,{});i5.Provider=O_.Provider;i5.Consumer=O_.Consumer;function wfe(e,t){return Object.assign(e,Sy.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var KB;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(KB||(KB={}));var o5=class extends by{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=su(...r);let o=this._get(),n=C_(o);x_(this,n.create(o))}advance(t){let r=this._get(),o=this.get();Ta(r,o)||(js(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&XB(this._active)&&qO(this)}_get(){let t=ce.arr(this.source)?this.source.map(Bo):$n(Bo(this.source));return this.calc(...t)}_start(){this.idle&&!XB(this._active)&&(this.idle=!1,zt(fy(this),t=>{t.done=!1}),Ri.skipAnimation?(Ge.batchedUpdates(()=>this.advance()),qO(this)):lp.start(this))}_attach(){let t=1;zt($n(this.source),r=>{En(r)&&au(r,this),JO(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){zt($n(this.source),t=>{En(t)&&lu(t,this)}),this._active.clear(),qO(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=$n(this.source).reduce((r,o)=>Math.max(r,(JO(o)?o.priority:0)+1),0))}};function xfe(e){return e.idle!==!1}function XB(e){return!e.size||Array.from(e).every(xfe)}function qO(e){e.idle||(e.idle=!0,zt(fy(e),t=>{t.done=!0}),Xd(e,{type:"idle",parent:e}))}Ri.assign({createStringInterpolator:b_,to:(e,t)=>new o5(e,t)});var A3e=lp.advance;var uM=s(s5());function u5(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var Cfe=["style","children","scrollTop","scrollLeft"],dM=/^--/;function Tfe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!dM.test(e)&&!(wy.hasOwnProperty(e)&&wy[e])?t+"px":(""+t).trim()}var cM={};function Pfe(e,t){if(!e.nodeType||!e.setAttribute)return!1;let r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",o=t,{style:n,children:i,scrollTop:a,scrollLeft:l}=o,c=u5(o,Cfe),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:cM[f]||(cM[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=Tfe(f,n[f]);dM.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),a!==void 0&&(e.scrollTop=a),l!==void 0&&(e.scrollLeft=l)}var wy={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},kfe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Efe=["Webkit","Ms","Moz","O"];wy=Object.keys(wy).reduce((e,t)=>(Efe.forEach(r=>e[kfe(r,t)]=e[t]),e),wy);var Rfe=["x","y","z"],Afe=/^(matrix|translate|scale|rotate|skew)/,Ofe=/^(translate)/,Ife=/^(rotate|skew)/,a5=(e,t)=>ce.num(e)&&e!==0?e+t:e,I_=(e,t)=>ce.arr(e)?e.every(r=>I_(r,t)):ce.num(e)?e===t:parseFloat(e)===t,l5=class extends $d{constructor(t){let{x:r,y:o,z:n}=t,i=u5(t,Rfe),a=[],l=[];(r||o||n)&&(a.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>a5(u,"px")).join(",")})`,I_(c,0)])),Ji(i,(c,u)=>{if(u==="transform")a.push([c||""]),l.push(d=>[d,d===""]);else if(Afe.test(u)){if(delete i[u],ce.und(c))return;let d=Ofe.test(u)?"px":Ife.test(u)?"deg":"";a.push($n(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${a5(g,d)})`,I_(g,0)]:f=>[`${u}(${f.map(m=>a5(m,d)).join(",")})`,I_(f,u.startsWith("scale")?1:0)])}}),a.length&&(i.transform=new c5(a,l)),super(i)}},c5=class extends ip{constructor(t,r){super(),this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return zt(this.inputs,(o,n)=>{let i=Bo(o[0]),[a,l]=this.transforms[n](ce.arr(i)?i:o.map(Bo));t+=" "+a,r=r&&l}),r?"none":t}observerAdded(t){t==1&&zt(this.inputs,r=>zt(r,o=>En(o)&&au(o,this)))}observerRemoved(t){t==0&&zt(this.inputs,r=>zt(r,o=>En(o)&&lu(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Xd(this,t)}},Nfe=["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"],Ffe=["scrollTop","scrollLeft"];Ri.assign({batchedUpdates:uM.unstable_batchedUpdates,createStringInterpolator:b_,colors:EB});var Dfe=VB(Nfe,{applyAnimatedValues:Pfe,createAnimatedStyle:e=>new l5(e),getComponentProps:e=>u5(e,Ffe)}),V3e=Dfe.animated;var xy=s(D(),1);function fM(e){return{top:e.offsetTop,left:e.offsetLeft}}function mM(e){let t=(0,xy.useRef)(null),r=(0,xy.useRef)(void 0);return t.current&&(r.current=fM(t.current)),(0,xy.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new A_({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:c}){if(!t.current)return;let{x:u,y:d}=c;u=Math.round(u),d=Math.round(d);let f=u===0&&d===0;t.current.style.transform=f?"":`translate3d(${u}px,${d}px,0)`}});t.current.style.transform="";let i=fM(t.current),a=Math.round(o.left-i.left),l=Math.round(o.top-i.top);return n.start({x:0,y:0,from:{x:a,y:l}}),()=>{n.stop(),n.set({x:0,y:0})}},[e]),t}var xe=s(C(),1),{MediaUploadModal:Bfe}=Do(fp.privateApis);function hM({children:e,index:t,className:r}){let o=mM(t);return(0,xe.jsx)("div",{ref:o,className:r,children:e})}function dp(e){return Array.isArray(e)?e:e?[e]:[]}function Mfe({render:e,multiple:t,...r}){let[o,n]=(0,$t.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,xe.jsxs)(xe.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,xe.jsx)(Bfe,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,xe.jsx)(fp.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function f5({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:a=!1}){let l=i&&(0,rf.isBlobURL)(i.source_url),c=(0,xe.jsxs)("div",{className:re("fields__media-edit-picker-button",{"has-attachment":i}),role:"button",tabIndex:0,onClick:()=>{a||e()},onKeyDown:u=>{a||(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),e())},"aria-label":r,"aria-disabled":a,children:[t,l&&(0,xe.jsx)("span",{className:"fields__media-edit-picker-button-spinner",children:(0,xe.jsx)(ut.Spinner,{})}),!a&&(0,xe.jsx)(ut.DropZone,{onFilesDrop:u=>n(u,i?.id)})]});return o?(0,xe.jsx)(ut.Tooltip,{text:r,placement:"top",children:c}):c}var Lfe=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function Vfe({attachment:e}){return(0,xe.jsx)(ut.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function gM(e){return(0,xe.jsx)(f5,{...e,children:(0,xe.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function vM({itemId:e,index:t,totalItems:r,isUploading:o,moveItem:n,orientation:i="vertical"}){let a=i==="horizontal";return(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:a?Nt:Tv,label:a?(0,An.__)("Move left"):(0,An.__)("Move up"),size:"small",disabled:o||t===0,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"up")}}),(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:a?Ft:Cv,label:a?(0,An.__)("Move right"):(0,An.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function yM({attachment:e}){let t=e.source_url,r=e.mime_type||"";return r.startsWith("image")?(0,xe.jsx)("img",{className:"fields__media-edit-thumbnail",alt:e.alt_text||"",src:t}):r.startsWith("audio")?(0,xe.jsx)(ut.Icon,{icon:fR}):r.startsWith("video")?(0,xe.jsx)(ut.Icon,{icon:iO}):Lfe.includes(r)?(0,xe.jsx)(ut.Icon,{icon:uR}):(0,xe.jsx)(ut.Icon,{icon:$R})}function jfe({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:a,isUploading:l,setTargetItemId:c}){return(0,xe.jsxs)("div",{className:re("fields__media-edit-expanded",{"is-multiple":r,"is-single":!r,"is-empty":!e?.length}),children:[e?.map((u,d)=>{let f=u.mime_type?.startsWith("image"),m=(0,rf.isBlobURL)(u.source_url),h=u.id;return(0,xe.jsxs)(hM,{index:d,className:re("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,xe.jsx)(f5,{open:()=>{c(h),i()},label:m?(0,An.__)("Replace"):(0,An.sprintf)((0,An.__)("Replace %s"),u.title.rendered),showTooltip:!0,onFilesDrop:a,attachment:u,isUploading:l,children:(0,xe.jsx)("div",{className:"fields__media-edit-expanded-preview",children:(0,xe.jsx)(ut.__experimentalVStack,{spacing:0,alignment:"center",justify:"center",className:"fields__media-edit-expanded-preview-stack",children:(!m||f)&&(0,xe.jsx)(yM,{attachment:u})})})}),!m&&(0,xe.jsx)("div",{className:"fields__media-edit-expanded-overlay",children:(0,xe.jsxs)(ut.__experimentalHStack,{className:"fields__media-edit-expanded-actions",spacing:0,alignment:"flex-end",expanded:!1,children:[r&&e.length>1&&(0,xe.jsx)(vM,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:Kn,label:(0,An.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,xe.jsx)(gM,{open:()=>{c(void 0),i()},label:t,onFilesDrop:a,isUploading:l})]})}function zfe({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:a,isUploading:l,setTargetItemId:c}){return(0,xe.jsxs)(xe.Fragment,{children:[!!e?.length&&(0,xe.jsx)("div",{className:re("fields__media-edit-compact-group",{"is-single":e.length===1}),children:(0,xe.jsx)(ut.__experimentalVStack,{spacing:0,children:e.map((u,d)=>{let f=(0,rf.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,xe.jsxs)(hM,{index:d,className:"fields__media-edit-compact",children:[(0,xe.jsx)(f5,{open:()=>{c(h),i()},label:(0,An.__)("Replace"),showTooltip:!0,onFilesDrop:a,attachment:u,isUploading:l,children:(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(yM,{attachment:u}),!f&&(0,xe.jsx)(Vfe,{attachment:u})]})}),!f&&(0,xe.jsxs)(ut.__experimentalHStack,{className:"fields__media-edit-compact-movers",spacing:0,alignment:"flex-end",expanded:!1,children:[m&&(0,xe.jsx)(vM,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,xe.jsx)(ut.Button,{__next40pxDefaultSize:!0,icon:Kn,label:(0,An.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,xe.jsx)(gM,{open:()=>{c(void 0),i()},label:t,onFilesDrop:a,isUploading:l})]})}function bM({data:e,field:t,onChange:r,hideLabelFromVision:o,allowedTypes:n=["image"],multiple:i,isExpanded:a,validity:l}){let c=t.getValue({item:e}),[u,d]=(0,$t.useState)(!1),f=(0,$t.useRef)(null),[m,h]=(0,$t.useState)(void 0);(0,$t.useEffect)(()=>{let V=f.current,j=()=>{d(!0)};return V?.addEventListener("invalid",j),()=>V?.removeEventListener("invalid",j)},[]);let g=(0,Cy.useSelect)(V=>{if(!c)return null;let H=[...dp(c)].sort((ae,ne)=>ae-ne),{getEntityRecords:X}=V(d5.store);return X("postType","attachment",{include:H})},[c]),v=(0,$t.useRef)(null);g!==null&&(v.current=g);let y=g;if(g===null&&v.current&&c){let V=new Set(v.current.map(j=>j.id));dp(c).every(j=>V.has(j))&&(y=v.current)}let b=(0,$t.useMemo)(()=>{if(!y)return null;let V=dp(c),j=new Map(y.map(H=>[H.id,H]));return V.map(H=>j.get(H)).filter(H=>H!==void 0)},[y,c]),{createErrorNotice:_}=(0,Cy.useDispatch)(pM.store),{receiveEntityRecords:S}=(0,Cy.useDispatch)(d5.store),[x,T]=(0,$t.useState)(),R=(0,$t.useRef)(void 0),[F,B]=(0,$t.useState)(!1),[z,L]=(0,$t.useState)([]);(0,$t.useEffect)(()=>{F&&(B(!1),R.current?.())},[F]);let M=(0,$t.useCallback)(V=>r(t.setValue({item:e,value:V})),[e,t,r]),k=(0,$t.useCallback)(V=>{let H=dp(c).filter(X=>X!==V);d(!0),M(H.length?H:void 0)},[c,M]),I=(0,$t.useCallback)((V,j)=>{if(!b)return;let H=b.map(ne=>ne.id),X=H.indexOf(V),ae=j==="up"?X-1:X+1;[H[X],H[ae]]=[H[ae],H[X]],M(H)},[b,M]),U=(0,$t.useCallback)((V,j)=>{T(j),(0,fp.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:V,onFileChange(H){let X=H.filter(ue=>(0,rf.isBlobURL)(ue.url)).map(ue=>ue.url);if(L(X),X.length)return;S("postType","attachment",[],void 0,!0);let ae=H.map(ue=>ue.id);if(!i){M(ae[0]),T(void 0);return}let ne=dp(c);if(j===void 0)M([...ne,...ae]);else{let ue=[...ne];ue.splice(ne.indexOf(j),1,...ae),M(ue)}T(void 0)},onError(H){T(void 0),L([]),_(H.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,_,M,S]),G=t.placeholder||(i?(0,An.__)("Choose files"):(0,An.__)("Choose file")),Y=(0,$t.useMemo)(()=>{if(!z.length)return b;let V=[...b||[]],j=z.map(H=>({id:H,source_url:H,mime_type:(0,rf.getBlobTypeByURL)(H)}));if(x!==void 0){let H=V.findIndex(X=>X.id===x);V.splice(H,1,...j)}else V.push(...j);return V},[b,x,z]);(0,$t.useEffect)(()=>{if(!u)return;let V=f.current;if(V)if(l){let j=l?.custom;h(j),j?.type==="invalid"?V.setCustomValidity(j.message||(0,An.__)("Invalid")):V.setCustomValidity("")}else V.setCustomValidity(""),h(void 0)},[u,t.isValid,l]);let Z=(0,$t.useCallback)(V=>{u||(!V.relatedTarget||!V.currentTarget.contains(V.relatedTarget))&&d(!0)},[u]);return(0,xe.jsxs)("div",{onBlur:Z,children:[(0,xe.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,xe.jsx)(Mfe,{onSelect:V=>{if(!i){M(V.id),T(void 0);return}let j=Array.isArray(V)?V.map(X=>X.id):[V.id],H=dp(c);if(!H.length)M(j);else if(x===void 0){let X=H.filter(ne=>j.includes(ne)),ae=j.filter(ne=>!H.includes(ne));M([...X,...ae])}else if(V.id!==x){let X=H.filter(ae=>ae!==V.id);M(X.map(ae=>ae===x?V.id:ae))}T(void 0)},onClose:()=>T(void 0),allowedTypes:n,value:x!==void 0?x:c,multiple:i&&x===void 0,title:t.label,render:({open:V})=>{R.current=V;let j=a?jfe:zfe;return(0,xe.jsxs)(ut.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,xe.jsx)(ut.VisuallyHidden,{as:"legend",children:t.label}):(0,xe.jsx)(ut.BaseControl.VisualLabel,{as:"legend",style:{marginBottom:0},children:t.label})),(0,xe.jsx)(j,{allItems:Y,addButtonLabel:G,multiple:i,removeItem:k,moveItem:I,open:()=>B(!0),onFilesDrop:U,isUploading:!!z.length,setTargetItemId:T}),t.description&&(0,xe.jsx)(ut.__experimentalText,{variant:"muted",children:t.description})]})}})}),(0,xe.jsx)(ut.VisuallyHidden,{children:(0,xe.jsx)("input",{type:"text",ref:f,value:c??"",tabIndex:-1,"aria-hidden":"true",onChange:()=>{}})}),m&&(0,xe.jsx)("div",{"aria-live":"polite",children:(0,xe.jsxs)("p",{className:re("components-validated-control__indicator",{"is-invalid":m.type==="invalid","is-valid":m.type==="valid"}),children:[(0,xe.jsx)(ut.Icon,{className:"components-validated-control__indicator-icon",icon:Cl,size:16,fill:"currentColor"}),m.message]})})]})}var m5=s(C(),1),SM=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,m5.jsx)("img",{className:"fields-controls__featured-image-image",src:o,alt:"",srcSet:r?.media_details?.sizes?Object.values(r.media_details.sizes).map(n=>`${n.source_url} ${n.width}w`).join(", "):void 0,sizes:t?.sizes||"100vw"}):(0,m5.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var wM=s(C(),1),Ufe={id:"featured_media",type:"media",label:(0,_M.__)("Featured Image"),Edit:e=>(0,wM.jsx)(bM,{...e,isExpanded:!0}),render:SM,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},p5=Ufe;var IM=s(E(),1);var F_=s(D(),1),h5=s(W(),1),CM=s(A(),1),TM=s(O(),1),PM=s(E(),1);var xM=s(O(),1),uu=s(W(),1);function Hfe(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var Ty="";function N_(e,t,r){return(0,xM.useSelect)(o=>{if(!e||!t)return Ty;let n=String(t),i=Do(o(uu.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(uu.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return He(f)}let a=Do(o(uu.store)).getPostsPageId();if(e==="page"&&a===n){let d=o(uu.store).getDefaultTemplateId({slug:"home"});if(!d)return Ty;let f=o(uu.store).getEntityRecord("postType","wp_template",d);return f?He(f):Ty}let l=Hfe(e,r),c=o(uu.store).getDefaultTemplateId({slug:l});if(!c)return Ty;let u=o(uu.store).getEntityRecord("postType","wp_template",c);return u?He(u):Ty},[e,t,r])}var kM=s(C(),1),Gfe=[],EM=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=e.type,i=typeof e.id=="number"?e.id:parseInt(e.id,10),a=e.slug,{templates:l,canSwitchTemplate:c}=(0,TM.useSelect)(h=>{let g=h(h5.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:n})??Gfe,{getHomePage:v,getPostsPageId:y}=Do(h(h5.store)),b=String(i),_=b!==void 0&&y()===b,S=b!==void 0&&n==="page"&&v()?.postId===b;return{templates:g,canSwitchTemplate:!_&&!S}},[i,n]),u=N_(n,i,a),d=t.getValue({item:e}),f=(0,F_.useCallback)(h=>r({[o]:h}),[o,r]),m=(0,F_.useMemo)(()=>{let h=l.map(g=>({label:He(g),value:g.slug}));return[{label:u,value:""},...h]},[l,u]);return(0,kM.jsx)(CM.SelectControl,{__next40pxDefaultSize:!0,label:(0,PM.__)("Template"),hideLabelFromVision:!0,value:d,options:m,onChange:f,disabled:!c})};var RM=s(O(),1),AM=s(W(),1);var D_=s(C(),1),OM=({item:e,field:t})=>{let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),a=N_(r,n,o),l=(0,RM.useSelect)(c=>{if(!i)return;let d=c(AM.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:r})?.find(f=>f.slug===i);return d?He(d):void 0},[r,i]);return(0,D_.jsx)(D_.Fragment,{children:l??a})};var Wfe={id:"template",type:"text",label:(0,IM.__)("Template"),Edit:EM,render:OM,enableSorting:!1,filterBy:!1},g5=Wfe;var qM=s(E(),1);var v5=s(M_(),1),L_=s(A(),1),y5=s(O(),1),Il=s(D(),1),b5=s(W(),1),VM=s(he(),1),jM=s(ft(),1),du=s(E(),1),zM=s(Ir(),1);var BM=s(ft(),1),MM=s(E(),1);function Py(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,BM.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,MM.__)("no title")})`}var Ol=s(C(),1);function Xfe(e){let t=e.map(n=>({children:[],...n}));if(t.some(({parent:n})=>n==null))return t;let r=t.reduce((n,i)=>{let{parent:a}=i;return n[a]||(n[a]=[]),n[a].push(i),n},{}),o=n=>n.map(i=>{let a=r[i.id];return{...i,children:a&&a.length?o(a):[]}});return o(r[0]||[])}var LM=(e,t)=>{let r=(0,v5.default)(e||"").toLowerCase(),o=(0,v5.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function Qfe({data:e,onChangeControl:t}){let[r,o]=(0,Il.useState)(null),n=e.parent,i=e.id,a=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,y5.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:y}=h(b5.store),b=y(a),_=b?.hierarchical&&b.viewable,S=n?g("postType",a,n):null,x={per_page:100,exclude:i,parent_exclude:i,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...r!==null&&{search:r,orderby:"relevance"}};return{isHierarchical:_,parentPostTitle:S?Py(S):"",pageItems:_?v("postType",a,x):null}},[r,n,i,a]),d=(0,Il.useMemo)(()=>{let h=(b,_=0)=>b.map(T=>[{value:T.id,label:"\u2014 ".repeat(_)+(0,jM.decodeEntities)(T.name),rawName:T.name},...h(T.children||[],_+1)]).sort(([T],[R])=>{let F=LM(T.rawName,r??""),B=LM(R.rawName,r??"");return F>=B?1:-1}).flat();if(!c)return[];let g=c.map(b=>({id:b.id,parent:b.parent??null,name:Py(b)}));r||(g=Xfe(g));let v=h(g),y=v.find(b=>b.value===n);return n&&l&&!y&&v.unshift({value:n,label:l,rawName:""}),v.map(b=>({...b,value:b.value.toString()}))},[c,r,l,n]);if(!u)return null;let f=h=>{o(h)},m=h=>{if(h)return t(parseInt(h,10)??0);t(0)};return(0,Ol.jsx)(L_.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,du.__)("Parent"),help:(0,du.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,VM.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var UM=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,y5.useSelect)(a=>a(b5.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,Il.useCallback)(a=>r({[o]:a}),[o,r]);return(0,Ol.jsx)("fieldset",{className:"fields-controls__parent",children:(0,Ol.jsxs)("div",{children:[(0,Il.createInterpolateElement)((0,du.sprintf)((0,du.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'),(0,zM.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Ol.jsx)("wbr",{})}),(0,Ol.jsx)("p",{children:(0,Il.createInterpolateElement)((0,du.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Ol.jsx)(L_.ExternalLink,{href:(0,du.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,Ol.jsx)(Qfe,{data:e,onChangeControl:i})]})})};var HM=s(O(),1),GM=s(W(),1),WM=s(E(),1);var mp=s(C(),1),YM=({item:e})=>{let t=(0,HM.useSelect)(r=>{let{getEntityRecord:o}=r(GM.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,mp.jsx)(mp.Fragment,{children:Py(t)}):(0,mp.jsx)(mp.Fragment,{children:(0,WM.__)("None")})};var Jfe={id:"parent",type:"text",label:(0,qM.__)("Parent"),Edit:UM,render:YM,enableSorting:!0,filterBy:!1},S5=Jfe;var XM=s(E(),1);var hp=s(A(),1),ZM=s(D(),1),ky=s(E(),1),pp=s(C(),1);function $fe({data:e,onChange:t,field:r}){let[o,n]=(0,ZM.useState)(!!r.getValue({item:e})),i=a=>{n(a),a||t({password:""})};return(0,pp.jsxs)(hp.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,pp.jsx)(hp.CheckboxControl,{label:(0,ky.__)("Password protected"),help:(0,ky.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,pp.jsx)("div",{className:"fields-controls__password-input",children:(0,pp.jsx)(hp.TextControl,{label:(0,ky.__)("Password"),onChange:a=>t({password:a}),value:r.getValue({item:e})||"",placeholder:(0,ky.__)("Use a secure password"),type:"text",__next40pxDefaultSize:!0,maxLength:255})})]})}var KM=$fe;var eme={id:"password",type:"text",label:(0,XM.__)("Password"),Edit:KM,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},_5=eme;var JM=s(E(),1);var j_=s(A(),1);var $i=s(E(),1),tme=[{value:"draft",label:(0,$i.__)("Draft"),icon:Wm,description:(0,$i.__)("Not ready to publish.")},{value:"future",label:(0,$i.__)("Scheduled"),icon:jv,description:(0,$i.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,$i.__)("Pending Review"),icon:Lv,description:(0,$i.__)("Waiting for review before publishing.")},{value:"private",label:(0,$i.__)("Private"),icon:Fv,description:(0,$i.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,$i.__)("Published"),icon:Hd,description:(0,$i.__)("Visible to everyone.")},{value:"trash",label:(0,$i.__)("Trash"),icon:El}],V_=tme;var gp=s(C(),1);function rme({item:e}){let t=V_.find(({value:n})=>n===e.status),r=t?.label||e.status,o=t?.icon;return(0,gp.jsxs)(j_.__experimentalHStack,{alignment:"left",spacing:0,children:[o&&(0,gp.jsx)("div",{className:"edit-site-post-list__status-icon",children:(0,gp.jsx)(j_.Icon,{icon:o})}),(0,gp.jsx)("span",{children:r})]})}var QM=rme;var ome="isAny",nme={label:(0,JM.__)("Status"),id:"status",type:"text",elements:V_,render:QM,Edit:"radio",enableSorting:!1,filterBy:{operators:[ome]}},w5=nme;var vp=s(E(),1),ime={id:"comment_status",label:(0,vp.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,vp.__)("Open"),description:(0,vp.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,vp.__)("Closed"),description:(0,vp.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},x5=ime;var Nl=s(E(),1),z_=s(A(),1),C5=s(C(),1);function sme({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,C5.jsx)(z_.CheckboxControl,{label:(0,Nl.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,C5.jsx)(z_.ExternalLink,{href:(0,Nl.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,Nl.__)("Learn more about pingbacks & trackbacks")})})}var ame={id:"ping_status",label:(0,Nl.__)("Trackbacks & Pingbacks"),type:"text",Edit:sme,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Nl.__)("Allow"),description:(0,Nl.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,Nl.__)("Don't allow"),description:(0,Nl.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},T5=ame;var yp=s(E(),1),lme={id:"discussion",label:(0,yp.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,yp.__)("Open"):t&&!r?(0,yp.__)("Comments only"):!t&&r?(0,yp.__)("Pings only"):(0,yp.__)("Closed")},filterBy:!1},P5=lme;var eL=s(E(),1);var ka=s(E(),1),Ry=s(D(),1),fu=s(po(),1),Pa=s(C(),1),Ey=e=>(0,fu.dateI18n)((0,fu.getSettings)().formats.datetimeAbbreviated,(0,fu.getDate)(e)),cme=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Modified: <time>%s</time></span>"),Ey(e.date??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})});if(e.status==="future")return(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Scheduled: <time>%s</time></span>"),Ey(e.date??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})});if(e.status==="publish")return(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Published: <time>%s</time></span>"),Ey(e.date??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})});let n=(0,fu.getDate)(e.modified??null)>(0,fu.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,Ry.createInterpolateElement)((0,ka.sprintf)((0,ka.__)("<span>Modified: <time>%s</time></span>"),Ey(n??null)),{span:(0,Pa.jsx)("span",{}),time:(0,Pa.jsx)("time",{})}):(0,Pa.jsx)("time",{children:Ey(e.date??null)})},$M=cme;var ume={id:"date",type:"datetime",label:(0,eL.__)("Date"),render:$M,filterBy:{operators:["before","after"]}},k5=ume;var sL=s(E(),1),aL=s(O(),1),lL=s(W(),1);var tL=s(E(),1),rL=s(D(),1);var U_=s(A(),1),oL=s(O(),1),nL=s(W(),1),mu=s(C(),1);function dme({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&r&&t!==r),n=(0,oL.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(nL.store);return t?d("root","user",t):null},[t,o]),i=n?.name||e?._embedded?.author?.[0]?.name,a=n?.avatar_urls?.[48]||e?._embedded?.author?.[0]?.avatar_urls?.[48],[l,c]=(0,rL.useState)(!1);return(0,mu.jsxs)(U_.__experimentalHStack,{alignment:"left",spacing:0,children:[!!a&&(0,mu.jsx)("div",{className:re("page-templates-author-field__avatar",{"is-loaded":l}),children:(0,mu.jsx)("img",{onLoad:()=>c(!0),alt:(0,tL.__)("Author avatar"),src:a})}),!a&&(0,mu.jsx)("div",{className:"page-templates-author-field__icon",children:(0,mu.jsx)(U_.Icon,{icon:Pv})}),(0,mu.jsx)("span",{className:"page-templates-author-field__name",children:i})]})}var iL=dme;var fme={label:(0,sL.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,aL.resolveSelect)(lL.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),setValue:({value:e})=>({author:Number(e)}),render:iL,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]}},E5=fme;var cL=s(E(),1),mme={id:"notesCount",label:(0,cL.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},R5=mme;var uL=s(E(),1),pme={id:"view-post",label:(0,uL._x)("View","verb"),isPrimary:!0,icon:Xn,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},A5=pme;var O5=s(O(),1),dL=s(W(),1),pu=s(E(),1),fL=s(ct(),1),mL=s(D(),1),Dl=s(A(),1),Fl=s(C(),1);function hme(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function gme({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,mL.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:a}=(0,O5.useDispatch)(dL.store),{createSuccessNotice:l,createErrorNotice:c}=(0,O5.useDispatch)(fL.store),u=hme(o);async function d(f){if(f.preventDefault(),!!u)try{await i("postType",o.type,o.id,{menu_order:o.menu_order}),t?.(),await a("postType",o.type,o.id,{throwOnError:!0}),l((0,pu.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,pu.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,Fl.jsx)("form",{onSubmit:d,children:(0,Fl.jsxs)(Dl.__experimentalVStack,{spacing:"5",children:[(0,Fl.jsx)("div",{children:(0,pu.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,Fl.jsx)(Dl.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,pu.__)("Order"),type:"number",value:typeof o.menu_order=="number"&&Number.isInteger(o.menu_order)?String(o.menu_order):"",onChange:f=>{let m=parseInt(f,10);n({...o,menu_order:isNaN(m)?void 0:m})}}),(0,Fl.jsxs)(Dl.__experimentalHStack,{justify:"right",children:[(0,Fl.jsx)(Dl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,pu.__)("Cancel")}),(0,Fl.jsx)(Dl.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,pu.__)("Save")})]})]})})}var vme={id:"order-pages",label:(0,pu.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:gme},I5=vme;var N5=s(O(),1),pL=s(W(),1),Xo=s(E(),1),hL=s(ct(),1),F5=s(D(),1),Ml=s(A(),1);var Bl=s(C(),1),yme={id:"duplicate-post",label:(0,Xo._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,F5.useState)({...e[0],title:(0,Xo.sprintf)((0,Xo._x)("%s (Copy)","post"),He(e[0]))}),[i,a]=(0,F5.useState)(!1),{saveEntityRecord:l}=(0,N5.useDispatch)(pL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,N5.useDispatch)(hL.store);async function d(f){if(f.preventDefault(),i)return;let m=o.type==="wp_template",h={status:m?"publish":"draft",title:o.title,slug:m?o.slug:o.title||(0,Xo.__)("No title"),comment_status:o.comment_status,content:typeof o.content=="string"?o.content:o.content.raw,excerpt:typeof o.excerpt=="string"?o.excerpt:o.excerpt?.raw,meta:o.meta,parent:o.parent,password:o.password,template:o.template,format:o.format,featured_media:o.featured_media,menu_order:o.menu_order,ping_status:o.ping_status},g="wp:action-assign-";Object.keys(o?._links||{}).filter(y=>y.startsWith(g)).map(y=>y.slice(g.length)).forEach(y=>{o.hasOwnProperty(y)&&(h[y]=o[y])}),a(!0);try{let y=await l("postType",o.type,h,{throwOnError:!0});c((0,Xo.sprintf)((0,Xo.__)('"%s" successfully created.'),He(y)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([y])}catch(y){let b=y,_=b.message&&b.code!=="unknown_error"?b.message:(0,Xo.__)("An error occurred while duplicating the page.");u(_,{type:"snackbar"})}finally{a(!1),t?.()}}return(0,Bl.jsx)("form",{onSubmit:d,children:(0,Bl.jsxs)(Ml.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,Bl.jsx)("div",{children:(0,Xo.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,Bl.jsx)(Ml.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Xo.__)("Title"),placeholder:(0,Xo.__)("No title"),value:He(o),onChange:f=>n(m=>({...m,title:f||(0,Xo.__)("No title")}))}),(0,Bl.jsxs)(Ml.__experimentalHStack,{spacing:2,justify:"end",children:[(0,Bl.jsx)(Ml.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Xo.__)("Cancel")}),(0,Bl.jsx)(Ml.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,Xo._x)("Duplicate","action label")})]})]})})}},D5=yme;var B5=s(O(),1),gL=s(W(),1),of=s(E(),1),vL=s(D(),1),yL=s(Ls(),1),Ll=s(A(),1),bL=s(ct(),1);var hu=s(C(),1),{PATTERN_TYPES:bme}=Do(yL.privateApis),Sme={id:"rename-post",label:(0,of.__)("Rename"),modalFocusOnMount:"firstContentElement",isEligible(e){if(e.status==="trash"||e.type==="wp_template"&&typeof e.id=="string"&&window?.__experimentalTemplateActivate)return!1;let t=["wp_template","wp_template_part"];return window?.__experimentalTemplateActivate||t.push("wp_template"),t.includes(e.type)?UD(e)&&!window?.__experimentalTemplateActivate?n_(e)&&e.is_custom&&e.permissions?.update:HD(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===bme.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,vL.useState)(()=>He(o,"")),{editEntityRecord:a,saveEditedEntityRecord:l}=(0,B5.useDispatch)(gL.store),{createSuccessNotice:c,createErrorNotice:u}=(0,B5.useDispatch)(bL.store);async function d(f){f.preventDefault();try{await a("postType",o.type,o.id,{title:n}),i(""),t?.(),await l("postType",o.type,o.id,{throwOnError:!0}),c((0,of.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,of.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,hu.jsx)("form",{onSubmit:d,children:(0,hu.jsxs)(Ll.__experimentalVStack,{spacing:"5",children:[(0,hu.jsx)(Ll.TextControl,{__next40pxDefaultSize:!0,label:(0,of.__)("Name"),value:n,onChange:i,required:!0}),(0,hu.jsxs)(Ll.__experimentalHStack,{justify:"right",children:[(0,hu.jsx)(Ll.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,of.__)("Cancel")}),(0,hu.jsx)(Ll.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,of.__)("Save")})]})]})})}},M5=Sme;var Qo=s(O(),1),nf=s(W(),1),Gr=s(E(),1),gu=s(ct(),1),SL=s(D(),1),H_=s(Xe(),1),Vl=s(A(),1),_L=s(Ir(),1),wL=s(Qm(),1);var sf=s(C(),1),_me=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,wme=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,Qo.dispatch)(gu.store).removeNotice(r),!_me(e)){(0,Qo.dispatch)(gu.store).createErrorNotice((0,Gr.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,Qo.select)(nf.store).getEntityConfig("postType",e.type);if(!o){(0,Qo.dispatch)(gu.store).createErrorNotice((0,Gr.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,_L.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,wL.default)({path:n});if(!i){(0,Qo.dispatch)(gu.store).createErrorNotice((0,Gr.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let a=({blocks:u=[]})=>(0,H_.__unstableSerializeAndClean)(u),l=(0,Qo.select)(nf.store).getEditedEntityRecord("postType",e.type,e.id);(0,Qo.dispatch)(nf.store).editEntityRecord("postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,H_.parse)(i?.content?.raw);if((0,Qo.dispatch)(nf.store).editEntityRecord("postType",e.type,i.id,{content:a,blocks:c,source:"theme"}),t){let u=()=>{(0,Qo.dispatch)(nf.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};(0,Qo.dispatch)(gu.store).createSuccessNotice((0,Gr.__)("Template reset."),{type:"snackbar",id:r,actions:[{label:(0,Gr.__)("Undo"),onClick:u}]})}}catch(o){let n=o.message&&o.code!=="unknown_error"?o.message:(0,Gr.__)("Template revert failed. Please reload.");(0,Qo.dispatch)(gu.store).createErrorNotice(n,{type:"snackbar"})}},xme={id:"reset-post",label:(0,Gr.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:Rl(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:xl,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,SL.useState)(!1),{saveEditedEntityRecord:i}=(0,Qo.useDispatch)(nf.store),{createSuccessNotice:a,createErrorNotice:l}=(0,Qo.useDispatch)(gu.store),c=async()=>{try{for(let u of e)await wme(u,{allowUndo:!1}),await i("postType",u.type,u.id);a(e.length>1?(0,Gr.sprintf)((0,Gr.__)("%d items reset."),e.length):(0,Gr.sprintf)((0,Gr.__)('"%s" reset.'),He(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(u){let d;e[0].type==="wp_template"?d=e.length===1?(0,Gr.__)("An error occurred while reverting the template."):(0,Gr.__)("An error occurred while reverting the templates."):d=e.length===1?(0,Gr.__)("An error occurred while reverting the template part."):(0,Gr.__)("An error occurred while reverting the template parts.");let f=u,m=f.message&&f.code!=="unknown_error"?f.message:d;l(m,{type:"snackbar"})}};return(0,sf.jsxs)(Vl.__experimentalVStack,{spacing:"5",children:[(0,sf.jsx)(Vl.__experimentalText,{children:(0,Gr.__)("Reset to default and clear all customizations?")}),(0,sf.jsxs)(Vl.__experimentalHStack,{justify:"right",children:[(0,sf.jsx)(Vl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Gr.__)("Cancel")}),(0,sf.jsx)(Vl.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Gr.__)("Reset")})]})]})}},L5=xme;var G_=s(E(),1),xL=s(Ls(),1);var CL=s(C(),1),{CreatePatternModalContents:Cme,useDuplicatePatternProps:Tme}=Do(xL.privateApis),Pme={id:"duplicate-pattern",label:(0,G_._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,G_._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=Tme({pattern:r,onSuccess:()=>t?.()});return(0,CL.jsx)(Cme,{onClose:t,confirmLabel:(0,G_._x)("Duplicate","action label"),...o})}},V5=Pme;var bp=function(){return bp=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},bp.apply(this,arguments)};function TL(e){return e.toLowerCase()}var kme=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Eme=/[^A-Z0-9]+/gi;function kL(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?kme:r,n=t.stripRegexp,i=n===void 0?Eme:n,a=t.transform,l=a===void 0?TL:a,c=t.delimiter,u=c===void 0?" ":c,d=PL(PL(e,o,"$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(l).join(u)}function PL(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function EL(e,t){return t===void 0&&(t={}),kL(e,bp({delimiter:"."},t))}function af(e,t){return t===void 0&&(t={}),EL(e,bp({delimiter:"-"},t))}"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,r){let o=Number(0xffffffffn&t),n=Number(t>>32n);this.setUint32(e+(r?0:4),o,r),this.setUint32(e+(r?4:0),n,r)}});var _p=e=>new DataView(new ArrayBuffer(e)),jl=e=>new Uint8Array(e.buffer||e),Sp=e=>new TextEncoder().encode(String(e)),lf=e=>Math.min(4294967295,Number(e)),RL=e=>Math.min(65535,Number(e));function Rme(e,t){if(t===void 0||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(t===void 0)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(e===void 0)return{isFile:0,t};if(typeof e=="string")return{isFile:1,t,i:Sp(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:jl(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:OL(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function OL(e,t=e){return new ReadableStream({async pull(r){let o=0;for(;r.desiredSize>o;){let n=await e.next();if(!n.value){r.close();break}{let i=Ame(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function Ame(e){return typeof e=="string"?Sp(e):e instanceof Uint8Array?e:jl(e)}function IL(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[jl(i),1]:[Sp(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:j5(o||Sp(e.name)),u:BigInt(e.size),l:n};if(e instanceof Response){let i=e.headers.get("content-disposition"),a=i&&i.match(/;\s*filename\*?=["']?(.*?)["']?$/i),l=a&&a[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),c=l&&decodeURIComponent(l),u=r||+e.headers.get("content-length");return{o:j5(o||Sp(c)),u:BigInt(u),l:n}}return o=j5(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(Sp(e).length),l:n}:e instanceof Blob?{o,u:BigInt(e.size),l:n}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o,u:BigInt(e.byteLength),l:n}:{o,u:Ome(e,r),l:n}}function Ome(e,t){return t>-1?BigInt(t):e?void 0:0n}function j5(e,t=1){if(!e||e.every((r=>r===47)))throw new Error("The file must have a name.");if(t)for(;e[e.length-1]===47;)e=e.subarray(0,-1);else e[e.length-1]!==47&&(e=new Uint8Array([...e,47]));return e}var NL=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let r=0;r<8;++r)t=t>>>1^(1&t&&3988292384);NL[e]=t}function AL(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^NL[255&t^e[r]];return(-1^t)>>>0}function FL(e,t,r=0){let o=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,n=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(r,o,1),t.setUint16(r+2,n,1)}function Ime({o:e,l:t},r){return 8*(!t||(r??(function(o){try{Nme.decode(o)}catch{return 0}return 1})(e)))}var Nme=new TextDecoder("utf8",{fatal:1});function Fme(e,t=0){let r=_p(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),FL(e.t,r,10),r.setUint16(26,e.o.length,1),jl(r)}async function*Dme(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=AL(t,0),e.u=BigInt(t.length);else{e.u=0n;let r=t.getReader();for(;;){let{value:o,done:n}=await r.read();if(n)break;e.m=AL(o,e.m),e.u+=BigInt(o.length),yield o}}}function Bme(e,t){let r=_p(16+(t?8:0));return r.setUint32(0,1347094280),r.setUint32(4,e.isFile?e.m:0,1),t?(r.setBigUint64(8,e.u,1),r.setBigUint64(16,e.u,1)):(r.setUint32(8,lf(e.u),1),r.setUint32(12,lf(e.u),1)),jl(r)}function Mme(e,t,r=0,o=0){let n=_p(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),FL(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,lf(e.u),1),n.setUint32(24,lf(e.u),1),n.setUint16(28,e.o.length,1),n.setUint16(30,o,1),n.setUint16(40,e.isFile?33204:16893,1),n.setUint32(42,lf(t),1),jl(n)}function Lme(e,t,r){let o=_p(r);return o.setUint16(0,1,1),o.setUint16(2,r-4,1),16&r&&(o.setBigUint64(4,e.u,1),o.setBigUint64(12,e.u,1)),o.setBigUint64(r-8,t,1),jl(o)}function DL(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var Vme=e=>(function(t){let r=BigInt(22),o=0n,n=0;for(let i of t){if(!i.o)throw new Error("Every file must have a non-empty name.");if(i.u===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(i.o)}".`);let a=i.u>=0xffffffffn,l=o>=0xffffffffn;o+=BigInt(46+i.o.length+(a&&8))+i.u,r+=BigInt(i.o.length+46+(12*l|28*a)),n||(n=a)}return(n||o>=0xffffffffn)&&(r+=BigInt(76)),r+o})((function*(t){for(let r of t)yield IL(...DL(r)[0])})(e));function BL(e,t={}){let r={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof t.length=="bigint"||Number.isInteger(t.length))&&t.length>0&&(r["Content-Length"]=String(t.length)),t.metadata&&(r["Content-Length"]=String(Vme(t.metadata))),new Response(jme(e,t),{headers:r})}function jme(e,t={}){let r=(function(o){let n=o[Symbol.iterator in o?Symbol.iterator:Symbol.asyncIterator]();return{async next(){let i=await n.next();if(i.done)return i;let[a,l]=DL(i.value);return{done:0,value:Object.assign(Rme(...l),IL(...a))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return OL((async function*(o,n){let i=[],a=0n,l=0n,c=0;for await(let f of o){let m=Ime(f,n.buffersAreUTF8);yield Fme(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*Dme(f));let h=f.u>=0xffffffffn,g=12*(a>=0xffffffffn)|28*h;yield Bme(f,h),i.push(Mme(f,a,m,g)),i.push(f.o),g&&i.push(Lme(f,a,g)),h&&(a+=8n),l++,a+=BigInt(46+f.o.length)+f.u,c||(c=h)}let u=0n;for(let f of i)yield f,u+=BigInt(f.length);if(c||a>=0xffffffffn){let f=_p(76);f.setUint32(0,1347094022),f.setBigUint64(4,BigInt(44),1),f.setUint32(12,755182848),f.setBigUint64(24,l,1),f.setBigUint64(32,l,1),f.setBigUint64(40,u,1),f.setBigUint64(48,a,1),f.setUint32(56,1347094023),f.setBigUint64(64,a+u,1),f.setUint32(72,1,1),yield jl(f)}let d=_p(22);d.setUint32(0,1347093766),d.setUint16(8,RL(l),1),d.setUint16(10,RL(l),1),d.setUint32(12,lf(u),1),d.setUint32(16,lf(a),1),yield jl(d)})(r,t),r)}var z5=s(sy(),1),U5=s(E(),1);function ML(e){return JSON.stringify({__file:e.type,title:He(e),content:typeof e.content=="string"?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var zme={id:"export-pattern",label:(0,U5.__)("Export as JSON"),icon:GR,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,z5.downloadBlob)(`${af(He(e[0])||e[0].slug)}.json`,ML(e[0]),"application/json");let t={},r=e.map(o=>{let n=af(He(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:ML(o)}});return(0,z5.downloadBlob)((0,U5.__)("patterns-export")+".zip",await BL(r).blob(),"application/zip")}},H5=zme;var LL=s(Ir(),1),W_=s(E(),1),Ume={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,W_.sprintf)((0,W_.__)("View revisions (%d)"),t)},isEligible(e){if(e.status==="trash")return!1;let t=e?._links?.["predecessor-version"]?.[0]?.id??null,r=e?._links?.["version-history"]?.[0]?.count??0;return!!t&&r>1},callback(e,{onActionPerformed:t}){let r=e[0],o=(0,LL.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},G5=Ume;var VL=s(W(),1),eo=s(E(),1),jL=s(ct(),1);var zL=s(D(),1),W5=s(O(),1),zl=s(A(),1),UL=s(ft(),1);var cf=s(C(),1),Hme={id:"permanently-delete",label:(0,eo.__)("Permanently delete"),supportsBulk:!0,icon:El,isEligible(e){if(Rl(e)||e.type==="wp_block")return!1;let{status:t,permissions:r}=e;return t==="trash"&&r?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,zL.useState)(!1),{createSuccessNotice:i,createErrorNotice:a}=(0,W5.useDispatch)(jL.store),{deleteEntityRecord:l}=(0,W5.useDispatch)(VL.store);return(0,cf.jsxs)(zl.__experimentalVStack,{spacing:"5",children:[(0,cf.jsx)(zl.__experimentalText,{children:e.length>1?(0,eo.sprintf)((0,eo._n)("Are you sure you want to permanently delete %d item?","Are you sure you want to permanently delete %d items?",e.length),e.length):(0,eo.sprintf)((0,eo.__)('Are you sure you want to permanently delete "%s"?'),(0,UL.decodeEntities)(He(e[0])))}),(0,cf.jsxs)(zl.__experimentalHStack,{justify:"right",children:[(0,cf.jsx)(zl.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,eo.__)("Cancel")}),(0,cf.jsx)(zl.Button,{variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id,{force:!0},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,eo.sprintf)((0,eo.__)('"%s" permanently deleted.'),He(e[0])):u=(0,eo.__)("The items were permanently deleted."),i(u,{type:"snackbar",id:"permanently-delete-post-action"}),r?.(e)}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,eo.__)("An error occurred while permanently deleting the item.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,eo.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,eo.sprintf)((0,eo.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,eo.sprintf)((0,eo.__)("Some errors occurred while permanently deleting the items: %s"),[...d].join(","))}a(u,{type:"snackbar"})}n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,eo.__)("Delete permanently")})]})]})}},Y5=Hme;var HL=s(W(),1),On=s(E(),1),GL=s(ct(),1);var Gme={id:"restore",label:(0,On.__)("Restore"),isPrimary:!0,icon:xl,supportsBulk:!0,isEligible(e){return!Rl(e)&&e.type!=="wp_block"&&e.status==="trash"&&e.permissions?.update},async callback(e,{registry:t,onActionPerformed:r}){let{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(GL.store),{editEntityRecord:i,saveEditedEntityRecord:a}=t.dispatch(HL.store);await Promise.allSettled(e.map(c=>i("postType",c.type,c.id,{status:"draft"})));let l=await Promise.allSettled(e.map(c=>a("postType",c.type,c.id,{throwOnError:!0})));if(l.every(({status:c})=>c==="fulfilled")){let c;e.length===1?c=(0,On.sprintf)((0,On.__)('"%s" has been restored.'),He(e[0])):e[0].type==="page"?c=(0,On.sprintf)((0,On.__)("%d pages have been restored."),e.length):c=(0,On.sprintf)((0,On.__)("%d posts have been restored."),e.length),o(c,{type:"snackbar",id:"restore-post-action"}),r&&r(e)}else{let c;if(l.length===1){let u=l[0];u.reason?.message?c=u.reason.message:c=(0,On.__)("An error occurred while restoring the post.")}else{let u=new Set,d=l.filter(({status:f})=>f==="rejected");for(let f of d){let m=f;m.reason?.message&&u.add(m.reason.message)}u.size===0?c=(0,On.__)("An error occurred while restoring the posts."):u.size===1?c=(0,On.sprintf)((0,On.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,On.sprintf)((0,On.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},q5=Gme;var Z5=s(O(),1),WL=s(W(),1),Dr=s(E(),1),YL=s(ct(),1),qL=s(D(),1),Ul=s(A(),1);var uf=s(C(),1),Wme={id:"move-to-trash",label:(0,Dr._x)("Trash","verb"),isPrimary:!0,icon:El,isEligible(e){return e.type==="wp_template_part"||e.type==="wp_block"||e.type==="wp_template"&&typeof e.id=="string"?!1:!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,qL.useState)(!1),{createSuccessNotice:i,createErrorNotice:a}=(0,Z5.useDispatch)(YL.store),{deleteEntityRecord:l}=(0,Z5.useDispatch)(WL.store);return(0,uf.jsxs)(Ul.__experimentalVStack,{spacing:"5",children:[(0,uf.jsx)(Ul.__experimentalText,{children:e.length===1?(0,Dr.sprintf)((0,Dr.__)('Are you sure you want to move "%s" to the trash?'),He(e[0])):(0,Dr.sprintf)((0,Dr._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,uf.jsxs)(Ul.__experimentalHStack,{justify:"right",children:[(0,uf.jsx)(Ul.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Dr.__)("Cancel")}),(0,uf.jsx)(Ul.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id.toString(),{},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,Dr.sprintf)((0,Dr.__)('"%s" moved to the trash.'),He(e[0])):u=(0,Dr.sprintf)((0,Dr._n)("%d item moved to the trash.","%d items moved to the trash.",e.length),e.length),i(u,{type:"snackbar",id:"move-to-trash-action"})}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,Dr.__)("An error occurred while moving the item to the trash.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,Dr.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,Dr.sprintf)((0,Dr.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,Dr.sprintf)((0,Dr.__)("Some errors occurred while moving the items to the trash: %s"),[...d].join(","))}a(u,{type:"snackbar"})}r&&r(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Dr._x)("Trash","verb")})]})]})}},K5=Wme;var Tt=s(E(),1),QL=s(D(),1),Hl=s(A(),1),JL=s(Ls(),1),Q5=s(ft(),1);var ZL=s(ct(),1),KL=s(W(),1),X5=s(O(),1);function Yme(e){let t=new Set;if(e.length===1){let r=e[0];r.reason?.message&&t.add(r.reason.message)}else{let r=e.filter(({status:o})=>o==="rejected");for(let o of r){let n=o;n.reason?.message&&t.add(n.reason.message)}}return t}var XL=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,X5.dispatch)(ZL.store),{deleteEntityRecord:i}=(0,X5.dispatch)(KL.store),a=await Promise.allSettled(e.map(l=>i("postType",l.type,l.id,{force:!0},{throwOnError:!0})));if(a.every(({status:l})=>l==="fulfilled")){let l;a.length===1?l=t.success.messages.getMessage(e[0]):l=t.success.messages.getBatchMessage(e),o(l,{type:t.success.type??"snackbar",id:t.success.id}),r.onActionPerformed?.(e)}else{let l=Yme(a),c="";a.length===1?c=t.error.messages.getMessage(l):c=t.error.messages.getBatchMessage(l),n(c,{type:t.error.type??"snackbar",id:t.error.id}),r.onActionError?.()}};var df=s(C(),1),{PATTERN_TYPES:qme}=Do(JL.privateApis),Zme={id:"delete-post",label:(0,Tt.__)("Delete"),isPrimary:!0,icon:El,isEligible(e){return Rl(e)?n_(e):e.type===qme.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,QL.useState)(!1),i=e.every(a=>Rl(a)&&a?.has_theme_file);return(0,df.jsxs)(Hl.__experimentalVStack,{spacing:"5",children:[(0,df.jsx)(Hl.__experimentalText,{children:e.length>1?(0,Tt.sprintf)((0,Tt._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,Tt.sprintf)((0,Tt._x)('Delete "%s"?',"template part"),He(e[0]))}),(0,df.jsxs)(Hl.__experimentalHStack,{justify:"right",children:[(0,df.jsx)(Hl.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Tt.__)("Cancel")}),(0,df.jsx)(Hl.Button,{variant:"primary",onClick:async()=>{n(!0),await XL(e,{success:{messages:{getMessage:l=>i?(0,Tt.sprintf)((0,Tt.__)('"%s" reset.'),(0,Q5.decodeEntities)(He(l))):(0,Tt.sprintf)((0,Tt._x)('"%s" deleted.',"template part"),(0,Q5.decodeEntities)(He(l))),getBatchMessage:()=>i?(0,Tt.__)("Items reset."):(0,Tt.__)("Items deleted.")}},error:{messages:{getMessage:l=>l.size===1?[...l][0]:i?(0,Tt.__)("An error occurred while reverting the item."):(0,Tt.__)("An error occurred while deleting the item."),getBatchMessage:l=>l.size===0?i?(0,Tt.__)("An error occurred while reverting the items."):(0,Tt.__)("An error occurred while deleting the items."):l.size===1?i?(0,Tt.sprintf)((0,Tt.__)("An error occurred while reverting the items: %s"),[...l][0]):(0,Tt.sprintf)((0,Tt.__)("An error occurred while deleting the items: %s"),[...l][0]):i?(0,Tt.sprintf)((0,Tt.__)("Some errors occurred while reverting the items: %s"),[...l].join(",")):(0,Tt.sprintf)((0,Tt.__)("Some errors occurred while deleting the items: %s"),[...l].join(","))}}},{onActionPerformed:r}),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,Tt.__)("Delete")})]})]})}},J5=Zme;var cV=s(O(),1),Gl=s(E(),1),uV=s(ct(),1),dV=s(D(),1),fV=s(Xe(),1);var Jo=s(A(),1),sV=s(he(),1),q_=s(W(),1),xp=s(O(),1),Y_=s(D(),1),wp=s(E(),1);var aV=s(ct(),1),lV=s(Xe(),1);var $L=s(O(),1),eV=s(W(),1),tV=()=>(0,$L.useSelect)(e=>e(eV.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],rV=(e,t)=>{let r=e.toLowerCase(),o=t.map(i=>i.title.rendered.toLowerCase());if(!o.includes(r))return e;let n=2;for(;o.includes(`${r} ${n}`);)n++;return`${e} ${n}`},oV=e=>af(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var to=s(C(),1);function nV(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function iV(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function Cp({modalTitle:e,...t}){let r=(0,xp.useSelect)(o=>o(q_.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,to.jsx)(Jo.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,to.jsx)($5,{...t})})}var Kme=e=>e==="header"?Rv:e==="footer"?Ev:e==="sidebar"?Gv:e==="navigation-overlay"?Nv:Wd;function $5({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,wp.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:a=""}){let{createErrorNotice:l}=(0,xp.useDispatch)(aV.store),{saveEntityRecord:c}=(0,xp.useDispatch)(q_.store),u=tV(),[d,f]=(0,Y_.useState)(a),[m,h]=(0,Y_.useState)(e),[g,v]=(0,Y_.useState)(!1),y=(0,sV.useInstanceId)(Cp),b=(0,xp.useSelect)(S=>S(q_.store).getCurrentTheme()?.default_template_part_areas,[]);async function _(){if(!(!d||g))try{v(!0);let S=rV(d,u),x=oV(S),T=await c("postType","wp_template_part",{slug:x,title:S,content:(0,lV.serialize)(t),area:m},{throwOnError:!0});await n(T)}catch(S){let x=S instanceof Error&&"code"in S&&S.message&&S.code!=="unknown_error"?S.message:(0,wp.__)("An error occurred while creating the template part.");l(x,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,to.jsx)("form",{onSubmit:async S=>{S.preventDefault(),await _()},children:(0,to.jsxs)(Jo.__experimentalVStack,{spacing:"4",children:[(0,to.jsx)(Jo.TextControl,{__next40pxDefaultSize:!0,label:(0,wp.__)("Name"),value:d,onChange:f,required:!0}),(0,to.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,to.jsx)(Jo.BaseControl.VisualLabel,{as:"legend",children:(0,wp.__)("Area")}),(0,to.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(b??[]).map(S=>{let x=Kme(S.icon);return(0,to.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,to.jsx)("input",{type:"radio",id:nV(S.area,y),name:`fields-create-template-part-modal__area-${y}`,value:S.area,checked:m===S.area,onChange:()=>{h(S.area)},"aria-describedby":iV(S.area,y)}),(0,to.jsx)(Jo.Icon,{icon:x,className:"fields-create-template-part-modal__area-radio-icon"}),(0,to.jsx)("label",{htmlFor:nV(S.area,y),className:"fields-create-template-part-modal__area-radio-label",children:S.label}),(0,to.jsx)(Jo.Icon,{icon:Pi,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,to.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:iV(S.area,y),children:S.description})]},S.area)})})]}),(0,to.jsxs)(Jo.__experimentalHStack,{justify:"right",children:[(0,to.jsx)(Jo.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,wp.__)("Cancel")}),(0,to.jsx)(Jo.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var mV=s(C(),1),Xme={id:"duplicate-template-part",label:(0,Gl._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,Gl._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,dV.useMemo)(()=>r.blocks??(0,fV.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,cV.useDispatch)(uV.store);function i(a){n((0,Gl.sprintf)((0,Gl._x)('"%s" duplicated.',"template part"),He(a)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,mV.jsx)($5,{blocks:o,defaultArea:r.area,defaultTitle:(0,Gl.sprintf)((0,Gl._x)("%s (Copy)","template part"),He(r)),onCreate:i,onError:t,confirmLabel:(0,Gl._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},eI=Xme;var pV=s(E(),1),hV=s(A(),1),gV=s(C(),1),Qme={id:"alt_text",type:"text",label:(0,pV.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,gV.jsx)(hV.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),rows:2}),enableSorting:!1,filterBy:!1},tI=Qme;var wV=s(E(),1);var K_=s(D(),1),vV=s(E(),1);function Z_(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var X_=s(C(),1);function yV({item:e}){let[t,r]=(0,K_.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,K_.useEffect)(()=>{o&&o===n&&r(Z_(i)||n?.toString()||""),o||r((0,vV.__)("(Unattached)"))},[o,n,i]),(0,X_.jsx)(X_.Fragment,{children:t})}var J_=s(W(),1),$_=s(A(),1),Q_=s(E(),1),ff=s(D(),1),bV=s(he(),1),SV=s(O(),1);var rI=s(C(),1);function _V({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:Z_(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,ff.useState)(r),[i,a]=(0,ff.useState)([]),[l,c]=(0,ff.useState)(!1),[u,d]=(0,ff.useState)(e?.post?.toString()??null),f=(0,SV.useSelect)(y=>y(J_.store).getPostTypes(),[]),m=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),n([])},h=async y=>{c(!0);let b=await(0,J_.__experimentalFetchLinkSuggestions)(y,{type:"post",isInitialSuggestions:!0},{});a(b);let _=b.map(S=>({label:S.title,value:S.id.toString()}));n(_),c(!1)},g=y=>{if(!y){m();return}if(d(y),y){let b=i.find(_=>_.id===Number(y));if(b&&f){let _=f.find(x=>x.slug===b?.type),S={..._&&{type:_.slug},id:Number(y),title:{raw:b.title,rendered:b.title}};t({post:Number(y),_embedded:{...e?._embedded,"wp:attached-to":[S]}})}}},v=e.post?(0,ff.createInterpolateElement)((0,Q_.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,rI.jsx)($_.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0})}):(0,Q_.__)("Search for a post or page to attach this media to.");return(0,rI.jsx)($_.ComboboxControl,{className:"dataviews-media-field__attached-to",__next40pxDefaultSize:!0,isLoading:l,label:(0,Q_.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,bV.debounce)(y=>h(y),300),onChange:g,hideLabelFromVision:!0})}var Jme={id:"attached_to",type:"text",label:(0,wV.__)("Attached to"),Edit:_V,render:yV,enableSorting:!1,filterBy:!1},oI=Jme;var TV=s(E(),1),PV=s(O(),1),kV=s(W(),1);var xV=s(E(),1),Tp=s(D(),1);var ew=s(A(),1),vu=s(C(),1);function CV({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,Tp.useState)("loading");(0,Tp.useEffect)(()=>{i("loading")},[o]);let a=(0,Tp.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,vu.jsxs)(ew.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,vu.jsx)("div",{className:re("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,vu.jsx)("img",{ref:a,onLoad:l,alt:(0,xV.__)("Author avatar"),src:o})}),!o&&(0,vu.jsx)("div",{className:"media-author-field__icon",children:(0,vu.jsx)(ew.Icon,{icon:Pv})}),(0,vu.jsx)("span",{className:"media-author-field__name",children:r})]})}var $me={label:(0,TV.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,PV.resolveSelect)(kV.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:CV,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]},readOnly:!0},nI=$me;var EV=s(E(),1),RV=s(A(),1);function yu(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var AV=s(C(),1),epe={id:"caption",type:"text",label:(0,EV.__)("Caption"),getValue:({item:e})=>yu(e?.caption),render:({item:e})=>yu(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,AV.jsx)(RV.TextareaControl,{label:e.label,value:yu(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},iI=epe;var OV=s(E(),1),IV=s(po(),1),tpe={id:"date",type:"datetime",label:(0,OV.__)("Date added"),filterBy:{operators:["before","after"]},format:{datetime:(0,IV.getSettings)().formats.datetimeAbbreviated},readOnly:!0},sI=tpe;var NV=s(E(),1),FV=s(A(),1);var aI=s(C(),1),rpe={id:"description",type:"text",label:(0,NV.__)("Description"),getValue:({item:e})=>yu(e?.description),render:({item:e})=>(0,aI.jsx)("div",{children:yu(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,aI.jsx)(FV.TextareaControl,{label:e.label,value:yu(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},lI=rpe;var VV=s(E(),1),jV=s(Ir(),1);var tw=s(A(),1),BV=s(D(),1),MV=s(Ir(),1),Pp=s(C(),1),DV=15;function LV({item:e}){let t=(0,BV.useMemo)(()=>e?.source_url?(0,MV.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length>DV?(0,Pp.jsx)(tw.Tooltip,{text:t,children:(0,Pp.jsx)(tw.__experimentalTruncate,{limit:DV,ellipsizeMode:"tail",children:t})}):(0,Pp.jsx)(Pp.Fragment,{children:t}):""}var ope={id:"filename",type:"text",label:(0,VV.__)("File name"),getValue:({item:e})=>(0,jV.getFilename)(e?.source_url||""),render:LV,enableSorting:!1,filterBy:!1,readOnly:!0},cI=ope;var $o=s(E(),1),UV=1024,HV=1024*UV,GV=1024*HV,WV=1024*GV,YV=1024*WV,qV=1024*YV,ZV=1024*qV,npe=1024*ZV;function zV(e,t,r=2){return(0,$o.sprintf)((0,$o._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function ipe(e,t=2){if(e===0)return zV(0,(0,$o._x)("B","unit symbol"),t);let r={[(0,$o._x)("YB","unit symbol")]:npe,[(0,$o._x)("ZB","unit symbol")]:ZV,[(0,$o._x)("EB","unit symbol")]:qV,[(0,$o._x)("PB","unit symbol")]:YV,[(0,$o._x)("TB","unit symbol")]:WV,[(0,$o._x)("GB","unit symbol")]:GV,[(0,$o._x)("MB","unit symbol")]:HV,[(0,$o._x)("KB","unit symbol")]:UV,[(0,$o._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return zV(e/n,o,t);return""}var spe={id:"filesize",type:"text",label:(0,$o.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?ipe(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},uI=spe;var kp=s(E(),1),ape={id:"media_dimensions",type:"text",label:(0,kp.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,kp.sprintf)((0,kp._x)("%1$s \xD7 %2$s","image dimensions"),e?.media_details?.width?.toString(),e?.media_details?.height?.toString()):"",isVisible:e=>!!(e?.media_details?.width&&e?.media_details?.height),enableSorting:!1,filterBy:!1,readOnly:!0},dI=ape;var KV=s(E(),1),lpe={id:"mime_type",type:"text",label:(0,KV.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},fI=lpe;var RG=s(E(),1);var PG=s(E(),1),$6=s($(),1),kG=s(O(),1),Ub=s(W(),1);var Ii=s(D(),1),Kp=s(O(),1),g6=s(E(),1),Ys=s(W(),1),Xp=s($(),1),Oj=s(ct(),1),Ij=s(Ls(),1),Nj=s(Xe(),1);var XV=s(D(),1),Ep=s(O(),1),QV=s(he(),1),JV=s($(),1);var rw=s(C(),1);function cpe(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,Ep.createRegistry)({"core/block-editor":JV.storeConfig},t),o.registerStore("core/editor",Ay),e.set(t,o)),o}var upe=(0,QV.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,Ep.useRegistry)(),[n]=(0,XV.useState)(()=>new WeakMap),i=cpe(n,o,t);return i===o?(0,rw.jsx)(e,{registry:o,...r}):(0,rw.jsx)(Ep.RegistryProvider,{value:i,children:(0,rw.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),$V=upe;var hf=s(D(),1),Bp=s(O(),1),Ai=s(W(),1),Z8=s(E(),1),K8=s(lt(),1),X8=s(he(),1),Q8=s(Xe(),1),mw=s($(),1);var ro=s(E(),1),e8=s(O(),1),ow=s(ft(),1),t8=s(W(),1),bu=(e,t)=>`<a ${pI(e)}>${t}</a>`,pI=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,dpe=(e,t)=>{let r=e.trim();return e!=="pdm"&&(r=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(r+=` ${t}`),["pdm","cc0"].includes(e)||(r=`CC ${r}`),r},fpe=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:a,license_url:l}=e,c=dpe(i,a),u=(0,ow.decodeEntities)(o),d;return u?d=t?(0,ro.sprintf)((0,ro._x)('"%1$s" by %2$s/ %3$s',"caption"),bu(r,(0,ow.decodeEntities)(t)),n?bu(n,u):u,l?bu(`${l}?ref=openverse`,c):c):(0,ro.sprintf)((0,ro._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),pI(r),n?bu(n,u):u,l?bu(`${l}?ref=openverse`,c):c):d=t?(0,ro.sprintf)((0,ro._x)('"%1$s"/ %2$s',"caption"),bu(r,(0,ow.decodeEntities)(t)),l?bu(`${l}?ref=openverse`,c):c):(0,ro.sprintf)((0,ro._x)("<a %1$s>Work</a>/ %2$s","caption"),pI(r),l?bu(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},mI=async(e={})=>(await(0,e8.resolveSelect)(t8.store).getEntityRecords("postType","attachment",{...e,orderBy:e?.search?"relevance":"date"})).map(r=>({...r,alt:r.alt_text,url:r.source_url,previewUrl:r.media_details?.sizes?.medium?.source_url,caption:r.caption?.raw})),mpe=[{name:"images",labels:{name:(0,ro.__)("Images"),search_items:(0,ro.__)("Search images")},mediaType:"image",async fetch(e={}){return mI({...e,media_type:"image"})}},{name:"videos",labels:{name:(0,ro.__)("Videos"),search_items:(0,ro.__)("Search videos")},mediaType:"video",async fetch(e={}){return mI({...e,media_type:"video"})}},{name:"audio",labels:{name:(0,ro.__)("Audio"),search_items:(0,ro.__)("Search audio")},mediaType:"audio",async fetch(e={}){return mI({...e,media_type:"audio"})}},{name:"openverse",labels:{name:(0,ro.__)("Openverse"),search_items:(0,ro.__)("Search Openverse")},mediaType:"image",async fetch(e={}){let r={...e,...{mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"}},o={per_page:"page_size",search:"q"},n=new URL("https://api.openverse.org/v1/images/");return Object.entries(r).forEach(([c,u])=>{let d=o[c]||c;n.searchParams.set(d,u)}),(await(await window.fetch(n,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}})).json()).results.map(c=>({...c,title:c.title?.toLowerCase().startsWith("file:")?c.title.slice(5):c.title,sourceId:c.id,id:void 0,caption:fpe(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],r8=mpe;var o8=s(O(),1),n8=s(W(),1);function i8(e){let{invalidateResolution:t}=(0,o8.dispatch)(n8.store);for(let r of e)r.id&&(t("getEntityRecord",["postType","attachment",r.id,{context:"view"}]),t("getEntityRecord",["postType","attachment",r.id]))}var s8=s(Yd(),1);var{sideloadMedia:ppe}=N(s8.privateApis),a8=ppe;var l8=s(Qm(),1);async function c8(e){await(0,l8.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST"})}var Y8=s($(),1),Np=s(W(),1),Fp=s(O(),1),Dp=s(D(),1);function Su(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let a=n[i];n=n[i]=Array.isArray(a)?[...a]:{...a}}return n[o]=r,e}var Pt=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var hpe=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function mf(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,a=`settings${n}`;if(t)return Pt(e,i)??Pt(e,a);let l={};return hpe.forEach(c=>{let u=Pt(e,`settings${o}.${c}`)??Pt(e,`settings.${c}`);u!==void 0&&(l=Su(l,c.split("."),u))}),l}function Oy(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",a=`settings${n}${i}`;return Su(e,a.split("."),r)}var f8=s(hI(),1);var gpe="1600px",vpe="320px",ype=1,bpe=.25,Spe=.75,_pe="14px";function d8({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=vpe,maximumViewportWidth:n=gpe,scaleFactor:i=ype,minimumFontSizeLimit:a}){if(a=Ea(a)?a:_pe,r){let S=Ea(r);if(!S?.unit||!S?.value)return null;let x=Ea(a,{coerceTo:S.unit});if(x?.value&&!e&&!t&&S?.value<=x?.value)return null;if(t||(t=`${S.value}${S.unit}`),!e){let T=S.unit==="px"?S.value:S.value*16,R=Math.min(Math.max(1-.075*Math.log2(T),bpe),Spe),F=Iy(S.value*R,3);x?.value&&F<x?.value?e=`${x.value}${x.unit}`:e=`${F}${S.unit}`}}let l=Ea(e),c=l?.unit||"rem",u=Ea(t,{coerceTo:c});if(!l||!u)return null;let d=Ea(e,{coerceTo:"rem"}),f=Ea(n,{coerceTo:c}),m=Ea(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=Iy(m.value/100,3),v=Iy(g,3)+c,y=100*((u.value-l.value)/h),b=Iy((y||1)*i,3),_=`${d.value}${d.unit} + ((1vw - ${v}) * ${b})`;return`clamp(${e}, ${_}, ${t})`}function Ea(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:r,rootSizeValue:o,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),a=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.toString().match(a);if(!l||l.length<3)return null;let[,c,u]=l,d=parseFloat(c);return r==="px"&&(u==="em"||u==="rem")&&(d=d*o,u=r),u==="px"&&(r==="em"||r==="rem")&&(d=d/o,u=r),(r==="em"||r==="rem")&&(u==="em"||u==="rem")&&(u=r),u?{value:Iy(d,3),unit:u}:null}function Iy(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function gI(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function wpe(e){let t=e?.typography??{},r=e?.layout,o=Ea(r?.wideSize)?r?.wideSize:null;return gI(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function nw(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!gI(t?.typography)&&!gI(e))return r;let o=wpe(t)?.fluid??{},n=d8({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return n||r}var Ra="body",Ny=":root",Rp=[{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)=>nw(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 Us(e,t){if(!e||!t)return t;let r=e.split(","),o=t.split(","),n=[];return r.forEach(i=>{o.forEach(a=>{n.push(`${i.trim()} ${a.trim()}`)})}),n.join(", ")}function m8(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=Us(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,a])=>{r[o][i]=Us(e,a)}))}),r}function p8(e,t){return e.includes(",")?e.split(",").map(n=>n+t).join(","):e+t}function h8(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(a,l,c)=>l+c+r;return t.split(",").map(a=>a.replace(o,n)).join(",")}function xpe(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,f8.getCSSValueFromRawStyle)(Pt(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function Cpe(e,t){if(!e||!t||!Array.isArray(t))return e;let r=t.find(o=>o?.name===e);return r?.href?r?.href:e}function vI(e,t){if(!e||!t)return e;let r=xpe(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=Cpe(r.url,t?._links?.["wp:theme-file"])),r}function g8(e,t,r=[],o="slug",n){let i=[t?Pt(e,["blocks",t,...r]):void 0,Pt(e,r)].filter(Boolean);for(let a of i)if(a){let l=["custom","theme","default"];for(let c of l){let u=a[c];if(u){let d=u.find(f=>f[o]===n);if(d)return o==="slug"||g8(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function Tpe(e,t,r,[o,n]=[]){let i=Rp.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let a=g8(e.settings,t,i.path,"slug",n);if(a){let{valueKey:l}=i,c=a[l];return iw(e,t,c)}return r}function Ppe(e,t,r,o=[]){let n=(t?Pt(e?.settings??{},["blocks",t,"custom",...o]):void 0)??Pt(e?.settings??{},["custom",...o]);return n?iw(e,t,n):r}function iw(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=Pt(e,r.ref);if(!u||typeof u=="object"&&"ref"in u)return u;r=u}else return r;let o="var:",n="var(--wp--",i=")",a;if(r.startsWith(o))a=r.slice(o.length).split("|");else if(r.startsWith(n)&&r.endsWith(i))a=r.slice(n.length,-i.length).split("--");else return r;let[l,...c]=a;return l==="preset"?Tpe(e,t,r,c):l==="custom"?Ppe(e,t,r,c):r}function Fy(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let a=Pt(e,i);return o?iw(e,r,a):a}function Dy(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return Su(e,i.split("."),r)}var bI=s(yI(),1);function pf(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,bI.default)(e?.styles,t?.styles)&&(0,bI.default)(e?.settings,t?.settings)}var x8=s(sw(),1);function _8(e){return Object.prototype.toString.call(e)==="[object Object]"}function w8(e){var t,r;return _8(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(_8(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function go(e,t){return(0,x8.default)(e,t,{isMergeableObject:w8,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function C8(e,t){var r=0,o,n;t=t||{};function i(){var a=o,l=arguments.length,c,u;e:for(;a;){if(a.args.length!==arguments.length){a=a.next;continue}for(u=0;u<l;u++)if(a.args[u]!==arguments[u]){a=a.next;continue e}return a!==o&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=o,a.prev=null,o.prev=a,o=a),a.val}for(c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return a={args:c,val:e.apply(null,c)},o?(o.prev=a,a.next=o):n=a,r===t.maxSize?(n=n.prev,n.next=null):r++,o=a,a.val}return i.clear=function(){o=null,n=null,r=0},i}var mt=s(E(),1),T8=s(Xe(),1),aw=new Map,jpe=[],SI={caption:(0,mt.__)("Caption"),link:(0,mt.__)("Link"),button:(0,mt.__)("Button"),heading:(0,mt.__)("Heading"),h1:(0,mt.__)("H1"),h2:(0,mt.__)("H2"),h3:(0,mt.__)("H3"),h4:(0,mt.__)("H4"),h5:(0,mt.__)("H5"),h6:(0,mt.__)("H6"),"settings.color":(0,mt.__)("Color"),"settings.typography":(0,mt.__)("Typography"),"settings.shadow":(0,mt.__)("Shadow"),"settings.layout":(0,mt.__)("Layout"),"styles.color":(0,mt.__)("Colors"),"styles.spacing":(0,mt.__)("Spacing"),"styles.background":(0,mt.__)("Background"),"styles.typography":(0,mt.__)("Typography")},zpe=C8(()=>(0,T8.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),lw=e=>e!==null&&typeof e=="object";function Upe(e){if(SI[e])return SI[e];let t=e.split(".");if(t?.[0]==="blocks")return zpe()?.[t[1]]||t[1];if(t?.[0]==="elements")return SI[t[1]]||t[1]}function P8(e,t,r=""){if(!lw(e)&&!lw(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=lw(e)?e:{},t=lw(t)?t:{};let o=new Set([...Object.keys(e),...Object.keys(t)]),n=[];for(let i of o){let a=r?r+"."+i:i,l=P8(e[i],t[i],a);l&&(n=n.concat(l))}return n}function Hpe(e,t){let r=JSON.stringify({next:e,previous:t});if(aw.has(r))return aw.get(r);let o=P8({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o||Array.isArray(o)&&!o.length)return aw.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((a,l)=>{let c=Upe(l);return c&&a.push([l.split(".")[0],c]),a},[]);return aw.set(r,i),i}function My(e,t,r={}){let o=Hpe(e,t),n=o.length,{maxResults:i}=r;return n?(i&&n>i&&(o=o.slice(0,i)),Object.entries(o.reduce((a,l)=>{let c=a[l[0]]||[];return c.includes(l[1])||(a[l[0]]=[...c,l[1]]),a},{})).map(([a,l])=>{let c=l.length,u=l.join((0,mt.__)(", "));switch(a){case"blocks":return(0,mt.sprintf)((0,mt._n)("%s block.","%s blocks.",c),u);case"elements":return(0,mt.sprintf)((0,mt._n)("%s element.","%s elements.",c),u);case"settings":return(0,mt.sprintf)((0,mt.__)("%s settings."),u);case"styles":return(0,mt.sprintf)((0,mt.__)("%s styles."),u);default:return(0,mt.sprintf)((0,mt.__)("%s."),u)}})):jpe}var en=s(Xe(),1),Vy=s(hI(),1),G8=s(O(),1);function Op(e,t="root",r={}){if(!t)return null;let{fallback:o=!1}=r,{name:n,selectors:i,supports:a}=e,l=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(l&&i.root?u=i?.root:a?.__experimentalSelector?u=a.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=o?u:null;if(l)return Pt(i,`${c}.root`,null)||Pt(i,c,null)||m;let h=a?Pt(a,`${c}.__experimentalSelector`,null):void 0;return h?Us(u,h):m}let f;return l&&(f=Pt(i,c,null)),f||(o?Op(e,d[0],r):null)}var Gpe={grad:.9,turn:360,rad:360/(2*Math.PI)},Wl=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},vo=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},es=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},F8=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},k8=function(e){return{r:es(e.r,0,255),g:es(e.g,0,255),b:es(e.b,0,255),a:es(e.a)}},_I=function(e){return{r:vo(e.r),g:vo(e.g),b:vo(e.b),a:vo(e.a,3)}},Wpe=/^#([0-9a-f]{3,8})$/i,cw=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},D8=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),a=i-Math.min(t,r,o),l=a?i===t?(r-o)/a:i===r?2+(o-t)/a:4+(t-r)/a:0;return{h:60*(l<0?l+6:l),s:i?a/i*100:0,v:i/255*100,a:n}},B8=function(e){var t=e.h,r=e.s,o=e.v,n=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),a=o*(1-r),l=o*(1-(t-i)*r),c=o*(1-(1-t+i)*r),u=i%6;return{r:255*[o,l,a,a,c,o][u],g:255*[c,o,o,l,a,a][u],b:255*[a,a,c,o,o,l][u],a:n}},E8=function(e){return{h:F8(e.h),s:es(e.s,0,100),l:es(e.l,0,100),a:es(e.a)}},R8=function(e){return{h:vo(e.h),s:vo(e.s),l:vo(e.l),a:vo(e.a,3)}},A8=function(e){return B8((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},Ly=function(e){return{h:(t=D8(e)).h,s:(n=(200-(r=t.s))*(o=t.v)/100)>0&&n<200?r*o/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,o,n},Ype=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qpe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zpe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kpe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,CI={string:[[function(e){var t=Wpe.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?vo(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?vo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Zpe.exec(e)||Kpe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:k8({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=Ype.exec(e)||qpe.exec(e);if(!t)return null;var r,o,n=E8({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(Gpe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return A8(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=n===void 0?1:n;return Wl(t)&&Wl(r)&&Wl(o)?k8({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,n=e.a,i=n===void 0?1:n;if(!Wl(t)||!Wl(r)||!Wl(o))return null;var a=E8({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return A8(a)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!Wl(t)||!Wl(r)||!Wl(o))return null;var a=(function(l){return{h:F8(l.h),s:es(l.s,0,100),v:es(l.v,0,100),a:es(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return B8(a)},"hsv"]]},O8=function(e,t){for(var r=0;r<t.length;r++){var o=t[r][0](e);if(o)return[o,t[r][1]]}return[null,void 0]},Xpe=function(e){return typeof e=="string"?O8(e.trim(),CI.string):typeof e=="object"&&e!==null?O8(e,CI.object):[null,void 0]};var wI=function(e,t){var r=Ly(e);return{h:r.h,s:es(r.s+100*t,0,100),l:r.l,a:r.a}},xI=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},I8=function(e,t){var r=Ly(e);return{h:r.h,s:r.s,l:es(r.l+100*t,0,100),a:r.a}},TI=(function(){function e(t){this.parsed=Xpe(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 vo(xI(this.rgba),2)},e.prototype.isDark=function(){return xI(this.rgba)<.5},e.prototype.isLight=function(){return xI(this.rgba)>=.5},e.prototype.toHex=function(){return t=_I(this.rgba),r=t.r,o=t.g,n=t.b,a=(i=t.a)<1?cw(vo(255*i)):"","#"+cw(r)+cw(o)+cw(n)+a;var t,r,o,n,i,a},e.prototype.toRgb=function(){return _I(this.rgba)},e.prototype.toRgbString=function(){return t=_I(this.rgba),r=t.r,o=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+n+", "+i+")":"rgb("+r+", "+o+", "+n+")";var t,r,o,n,i},e.prototype.toHsl=function(){return R8(Ly(this.rgba))},e.prototype.toHslString=function(){return t=R8(Ly(this.rgba)),r=t.h,o=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+n+"%, "+i+")":"hsl("+r+", "+o+"%, "+n+"%)";var t,r,o,n,i},e.prototype.toHsv=function(){return t=D8(this.rgba),{h:vo(t.h),s:vo(t.s),v:vo(t.v),a:vo(t.a,3)};var t},e.prototype.invert=function(){return xr({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),xr(wI(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),xr(wI(this.rgba,-t))},e.prototype.grayscale=function(){return xr(wI(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),xr(I8(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),xr(I8(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"?xr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):vo(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Ly(this.rgba);return typeof t=="number"?xr({h:t,s:r.s,l:r.l,a:r.a}):vo(r.h)},e.prototype.isEqual=function(t){return this.toHex()===xr(t).toHex()},e})(),xr=function(e){return e instanceof TI?e:new TI(e)},N8=[],uw=function(e){e.forEach(function(t){N8.indexOf(t)<0&&(t(TI,CI),N8.push(t))})};function Qpe(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=xr(r).toRgb();t.r.push(o.r/255),t.g.push(o.g/255),t.b.push(o.b/255),t.a.push(o.a)}),t}function M8(e,t){let r=Qpe(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}function Yl(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 PI(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Jpe(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function kI(e,t="0"){let r=Jpe(e);if(!r)return null;let o=PI(r?.top)||t,n=PI(r?.left)||t;return o===n?o:`${o} ${n}`}var L8={backgroundSize:"cover",backgroundPosition:"50% 50%"};function V8(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:L8.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:L8.backgroundPosition}),t}var j8={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 $pe={button:"wp-element-button",caption:"wp-element-caption"},ehe={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function the(e={},t){return Rp.reduce((r,{path:o,valueKey:n,valueFunc:i,cssVarInfix:a})=>{let l=Pt(e,o,[]);return["default","theme","custom"].forEach(c=>{l[c]&&l[c].forEach(u=>{n&&!i?r.push(`--wp--preset--${a}--${Yl(u.slug)}: ${u[n]}`):i&&typeof i=="function"&&r.push(`--wp--preset--${a}--${Yl(u.slug)}: ${i(u,t)}`)})}),r},[])}function rhe(e="*",t={}){return Rp.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let a=Pt(t,o,[]);return["default","theme","custom"].forEach(l=>{a[l]&&a[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${Yl(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${Yl(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function ohe(e={}){return Rp.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=Pt(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>M8(`wp-duotone-${n.slug}`,n.colors))).join("")})}function W8(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+Yl(n.replace("/","-")),a=e[n];if(a instanceof Object){let l=i+r;o=[...o,...W8(a,l,r)]}else o.push(`${i}: ${a}`)}),o}function nhe(e,t){let r=e.split(","),o=[];return r.forEach(n=>{o.push(`${t.trim()}${n.trim()}`)}),o.join(", ")}var z8=(e,t,r)=>{if(r!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",a=".wp-block-paragraph";if(i in e){let l=e[i],c={...e};return delete c[i],c[a]=l,c}return e},U8=(e,t)=>{let r={};return Object.entries(e).forEach(([o,n])=>{if(o==="root"||!t?.[o])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([a,l])=>{if(a==="root"||!t?.[o][a])return;let c={[o]:{[a]:t[o][a]}},u=Ip(c);r[l]=[...r[l]||[],...u],delete t[o][a]}),i||typeof n=="object"&&n!==null&&"root"in n){let a=i?n:n.root,l={[o]:t[o]},c=Ip(l);r[a]=[...r[a]||[],...c],delete t[o]}}),r};function Ip(e={},t="",r,o={},n=!1){let i=Ra===t,a=Object.entries(en.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let g=d;if(g[0]==="elements"||m)return c;let v=Pt(e,g);if(u==="--wp--style--root--padding"&&(typeof v=="string"||!r))return c;if(f&&typeof v!="string")Object.entries(f).forEach(y=>{let[b,_]=y;if(!Pt(v,[_],!1))return;let S=b.startsWith("--")?b:Yl(b);c.push(`${S}: ${(0,Vy.getCSSValueFromRawStyle)(Pt(v,[_]))}`)});else if(Pt(e,g,!1)){let y=u.startsWith("--")?u:Yl(u);c.push(`${y}: ${(0,Vy.getCSSValueFromRawStyle)(Pt(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=vI(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...V8(e.background)}})),(0,Vy.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:Yl(c.key),d=vI(c.value,o);u==="font-size"&&(d=nw({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&a.push("min-height: unset"),a.push(`${u}: ${d}`)}),a}function H8({layoutDefinitions:e=j8,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let a="",l=o?kI(t?.spacing?.blockGap):"";if(n&&(r===Ra?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!o&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,g])=>{m.push(`${h}: ${g||l}`)}),m.length){let h="";o?h=r===Ra?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===Ra?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,a+=`${h} { ${m.join("; ")}; }`}})}),r===Ra&&o&&(a+=`${Ny} { --wp--style--block-gap: ${l}; }`)),r===Ra&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(a+=`${r} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([g,v])=>{h.push(`${g}: ${v}`)}),h.length){let g=`.${u}${m?.selector||""}`;a+=`${g} { ${h.join("; ")}; }`}})})}return a}var ihe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function dw(e){if(!e)return{};let o=Object.entries(e).filter(([n])=>ihe.includes(n)).map(([n,i])=>[n,JSON.parse(JSON.stringify(i))]);return Object.fromEntries(o)}var she=(e,t)=>{let r=[];if(!e?.styles)return r;let o=dw(e.styles);return o&&r.push({styles:o,selector:Ra,skipSelectorWrapper:!0}),Object.entries(en.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&r.push({styles:e.styles?.elements?.[n]??{},selector:i,skipSelectorWrapper:!$pe[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let a=dw(i),l=i,c=[];if(l?.variations){let u={};Object.entries(l.variations).forEach(([d,f])=>{let m=f;u[d]=dw(m),m?.css&&(u[d].css=m.css);let h=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;Object.entries(m?.elements??{}).forEach(([g,v])=>{v&&en.__EXPERIMENTAL_ELEMENTS[g]&&c.push({styles:v,selector:Us(h,en.__EXPERIMENTAL_ELEMENTS[g])})}),Object.entries(m?.blocks??{}).forEach(([g,v])=>{let y=typeof t!="string"?Us(h,t[g]?.selector):void 0,b=typeof t!="string"?Us(h,t[g]?.duotoneSelector):void 0,_=typeof t!="string"?m8(h,t[g]?.featureSelectors??{}):void 0,S=dw(v);v?.css&&(S.css=v.css),!(!y||typeof t=="string")&&(c.push({selector:y,duotoneSelector:b,featureSelectors:_,fallbackGapValue:t[g]?.fallbackGapValue,hasLayoutSupport:t[g]?.hasLayoutSupport,styles:S}),Object.entries(v.elements??{}).forEach(([x,T])=>{T&&en.__EXPERIMENTAL_ELEMENTS[x]&&c.push({styles:T,selector:Us(y,en.__EXPERIMENTAL_ELEMENTS[x])})}))})}),a.variations=u}typeof t!="string"&&t?.[n]?.selector&&r.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:a,featureSelectors:t[n].featureSelectors,styleVariationSelectors:t[n].styleVariationSelectors,name:n}),Object.entries(l?.elements??{}).forEach(([u,d])=>{typeof t!="string"&&d&&t?.[n]&&en.__EXPERIMENTAL_ELEMENTS[u]&&r.push({styles:d,selector:t[n]?.selector.split(",").map(f=>en.__EXPERIMENTAL_ELEMENTS[u].split(",").map(h=>f+" "+h)).join(",")})}),r.push(...c)}),r},RI=(e,t)=>{let r=[];if(!e?.settings)return r;let o=a=>{let l={};return Rp.forEach(({path:c})=>{let u=Pt(a,c,!1);u!==!1&&(l=Su(l,c,u))}),l},n=o(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&r.push({presets:n,custom:i,selector:Ny}),Object.entries(e.settings?.blocks??{}).forEach(([a,l])=>{let c=l.custom;if(typeof t=="string"||!t[a])return;let u=o(l);(Object.keys(u).length>0||c)&&r.push({presets:u,custom:c,selector:t[a]?.selector})}),r},ahe=(e,t)=>{let r=RI(e,t),o="";return r.forEach(({presets:n,custom:i,selector:a})=>{let l=e?.settings?the(n,e?.settings):[],c=W8(i,"--wp--custom--","--");c.length>0&&l.push(...c),l.length>0&&(o+=`${a}{${l.join(";")};}`)}),o},lhe=(e,t,r,o,n=!1,i=!1,a={})=>{let l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...a},c=she(e,t),u=RI(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles,g="";if(l.presets&&(f||m)&&(g+=`${Ny} {`,g=f?g+` --wp--style--global--content-size: ${f};`:g,g=m?g+` --wp--style--global--wide-size: ${m};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&d&&(g+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),g+="}"),l.blockStyles&&c.forEach(({selector:v,duotoneSelector:y,styles:b,fallbackGapValue:_,hasLayoutSupport:S,featureSelectors:x,styleVariationSelectors:T,skipSelectorWrapper:R,name:F})=>{if(x){let L=U8(x,b);L=z8(L,e.settings,F),Object.entries(L).forEach(([M,k])=>{if(k.length){let I=k.join(";");g+=`:root :where(${M}){${I};}`}})}if(y){let L={};b?.filter&&(L.filter=b.filter,delete b.filter);let M=Ip(L);M.length&&(g+=`${y}{${M.join(";")};}`)}!n&&(Ra===v||S)&&(g+=H8({style:b,selector:v,hasBlockGapSupport:r,hasFallbackGapSupport:o,fallbackGapValue:_}));let B=Ip(b,v,d,e,i);if(B?.length){let L=R?v:`:root :where(${v})`;g+=`${L}{${B.join(";")};}`}b?.css&&(g+=EI(b.css,`:root :where(${v})`)),l.variationStyles&&T&&Object.entries(T).forEach(([L,M])=>{let k=b?.variations?.[L];if(k){if(x){let U=U8(x,k);U=z8(U,e.settings,F),Object.entries(U).forEach(([G,Y])=>{if(Y.length){let Z=nhe(G,M),V=Y.join(";");g+=`:root :where(${Z}){${V};}`}})}let I=Ip(k,M,d,e);if(I.length&&(g+=`:root :where(${M}){${I.join(";")};}`),k?.css&&(g+=EI(k.css,`:root :where(${M})`)),S&&k?.spacing?.blockGap){let U=M+v;g+=H8({style:k,selector:U,hasBlockGapSupport:!0,hasFallbackGapSupport:o,fallbackGapValue:_})}}});let z=Object.entries(b).filter(([L])=>L.startsWith(":"));z?.length&&z.forEach(([L,M])=>{let k=Ip(M);if(!k?.length)return;let U=`:root :where(${v.split(",").map(G=>G+L).join(",")}){${k.join(";")};}`;g+=U})}),l.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; }"),l.blockGap&&r){let v=kI(e?.styles?.spacing?.blockGap)||"0.5em";g=g+`:root :where(.wp-site-blocks) > * { margin-block-start: ${v}; 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 l.presets&&u.forEach(({selector:v,presets:y})=>{(Ra===v||Ny===v)&&(v="");let b=rhe(v,y);b.length>0&&(g+=b)}),g};function che(e,t){return RI(e,t).flatMap(({presets:o})=>ohe(o))}var uhe=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(ehe).forEach(([o,n])=>{let i=Op(e,o);i&&(r[n]=i)}),r},dhe=(e,t)=>{let{getBlockStyles:r}=(0,G8.select)(en.store),o={};return e.forEach(n=>{let i=n.name,a=Op(n);if(!a)return;let l=Op(n,"filter.duotone");if(!l){let h=Op(n),g=(0,en.getBlockSupport)(n,"color.__experimentalDuotone",!1);l=g&&h&&Us(h,g)}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=r(i),f={};d?.forEach(h=>{let g=t?`-${t}`:"",v=`${h.name}${g}`,y=h8(v,a);f[v]=y});let m=uhe(n,a);o[i]={duotoneSelector:l??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:a,styleVariationSelectors:d?.length?f:void 0}}),o};function fhe(e){let t=e.styles?.blocks,r=t?.["core/separator"];return r&&r.color?.background&&!r.color?.text&&!r.border?.color?{...e,styles:{...e.styles,blocks:{...t,"core/separator":{...r,color:{...r.color,text:r.color?.background}}}}}:e}function EI(e,t){let r="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))r+=`:root :where(${t}){${n.trim()}}`;else{let a=n.replace("}","").split("{");if(a.length!==2)return;let[l,c]=a,u=l.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?l.replace(d,"").trim():l.trim(),m;f===""?m=t:m=l.startsWith(" ")?Us(t,f):p8(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function jy(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:a=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,en.getBlockTypes)(),u=mf(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=fhe(e),h=dhe(c),g=ahe(m,h),v=lhe(m,h,d,f,i,a,l),y=che(m,h),b=[{css:g,isGlobalStyles:!0},{css:v,isGlobalStyles:!0},{css:m?.styles?.css??"",isGlobalStyles:!0},{assets:y,__unstableType:"svg",isGlobalStyles:!0}];return c.forEach(_=>{let S=m?.styles?.blocks?.[_.name];if(S?.css){let x=h[_.name].selector;b.push({css:EI(S.css,x),isGlobalStyles:!0})}}),[b,m.settings]}var{cleanEmptyObject:AI}=N(Y8.privateApis);function mhe(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,Fp.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(Np.store),g=u(Np.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,Fp.useSelect)(Np.store),{editEntityRecord:a}=(0,Fp.useDispatch)(Np.store),l=(0,Dp.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Dp.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;a("root","globalStyles",e,{styles:AI(h.styles)||{},settings:AI(h.settings)||{},_links:AI(h._links)||{}},d)},[e,a,i]);return[t,l,c]}function phe(){let e=(0,Fp.useSelect)(t=>t(Np.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function fw(){let[e,t,r]=mhe(),[o,n]=phe(),i=(0,Dp.useMemo)(()=>!n||!t?{}:go(n,t),[t,n]);return(0,Dp.useMemo)(()=>({isReady:e&&o,user:t,base:n,merged:i,setUserConfig:r}),[i,t,n,r,e,o])}var q8={};function hhe(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=N(Ai.privateApis),{getEntityRecords:r}=e(Ai.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}var ghe=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","allImageSizes","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canEditCSS","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableContentOnlyForUnsyncedPatterns","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isPreviewMode","isRTL","locale","maxWidth","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableResolvedAssets","__unstableIsBlockBasedTheme"],{globalStylesDataKey:vhe,globalStylesLinksDataKey:yhe,selectBlockPatternsKey:bhe,reusableBlocksSelectKey:She,sectionRootClientIdKey:_he,mediaEditKey:whe,getMediaSelectKey:xhe,isIsolatedEditorKey:Che,deviceTypeKey:The,isNavigationOverlayContextKey:Phe,mediaUploadOnSuccessKey:khe}=N(mw.privateApis);function Ehe(e,t,r,o){let n=(0,X8.useViewportMatch)("medium"),{allImageSizes:i,bigImageSizeThreshold:a,allowRightClickOverrides:l,blockTypes:c,focusMode:u,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,hasUploadPermissions:h,hiddenBlockTypes:g,canUseUnfilteredHTML:v,userCanCreatePages:y,pageOnFront:b,pageForPosts:_,userPatternCategories:S,restBlockPatternCategories:x,sectionRootClientId:T,deviceType:R,isNavigationOverlayContext:F,isRevisionsMode:B}=(0,Bp.useSelect)(ne=>{let{canUser:ue,getRawEntityRecord:Ye,getEntityRecord:ye,getUserPatternCategories:oe,getBlockPatternCategories:ge}=ne(Ai.store),{get:Re}=ne(K8.store),{getBlockTypes:ze}=ne(Q8.store),{getDeviceType:Ve,isRevisionsMode:tt}=N(ne(w)),{getBlocksByName:vt,getBlockAttributes:le}=ne(mw.store),J=ue("read",{kind:"root",name:"site"})?ye("root","site"):void 0,ie=ye("root","__unstableBase");function ee(){return o==="template-locked"?vt("core/post-content")?.[0]??"":vt("core/group").find(se=>le(se)?.tagName==="main")??""}return{allImageSizes:ie?.image_sizes,bigImageSizeThreshold:ie?.image_size_threshold,allowRightClickOverrides:Re("core","allowRightClickOverrides"),blockTypes:ze(),canUseUnfilteredHTML:Ye("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:Re("core","focusMode"),hasFixedToolbar:Re("core","fixedToolbar")||!n,hiddenBlockTypes:Re("core","hiddenBlockTypes"),isDistractionFree:Re("core","distractionFree"),keepCaretInsideBlock:Re("core","keepCaretInsideBlock"),hasUploadPermissions:ue("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:ue("create",{kind:"postType",name:"page"}),pageOnFront:J?.page_on_front,pageForPosts:J?.page_for_posts,userPatternCategories:oe(),restBlockPatternCategories:ge(),sectionRootClientId:ee(),deviceType:Ve(),isNavigationOverlayContext:t==="wp_template_part"&&r?ye("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:tt()}},[t,r,n,o]),{merged:z}=fw(),L=z.styles??q8,M=z._links??q8,k=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,I=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,U=(0,hf.useMemo)(()=>[...k||[]].filter(({postTypes:ne})=>!ne||Array.isArray(ne)&&ne.includes(t)),[k,t]),G=(0,hf.useMemo)(()=>[...I||[],...x||[]].filter((ne,ue,Ye)=>ue===Ye.findIndex(ye=>ne.name===ye.name)),[I,x]),{undo:Y,setIsInserterOpened:Z}=(0,Bp.useDispatch)(w),{editMediaEntity:V}=N((0,Bp.useDispatch)(Ai.store)),{saveEntityRecord:j}=(0,Bp.useDispatch)(Ai.store),H=(0,hf.useCallback)(ne=>y?j("postType","page",ne):Promise.reject({message:(0,Z8.__)("You do not have permission to create Pages.")}),[j,y]),X=(0,hf.useMemo)(()=>g&&g.length>0?(e.allowedBlockTypes===!0?c.map(({name:ue})=>ue):e.allowedBlockTypes||[]).filter(ue=>!g.includes(ue)):e.allowedBlockTypes,[e.allowedBlockTypes,g,c]),ae=e.focusMode===!1;return(0,hf.useMemo)(()=>{let ne={...Object.fromEntries(Object.entries(e).filter(([ue])=>ghe.includes(ue)).filter(([ue])=>ue!=="onNavigateToEntityRecord")),[vhe]:L,[yhe]:M,allImageSizes:i,bigImageSizeThreshold:a,allowedBlockTypes:X,allowRightClickOverrides:l,focusMode:u&&!ae,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,onNavigateToEntityRecord:e.onNavigateToEntityRecord,[xhe]:(ue,Ye)=>ue(Ai.store).getEntityRecord("postType","attachment",Ye),[whe]:h?V:void 0,mediaUpload:h?r_:void 0,[khe]:h?i8:void 0,mediaSideload:h?a8:void 0,mediaFinalize:h?c8:void 0,__experimentalBlockPatterns:U,[bhe]:ue=>{let{hasFinishedResolution:Ye,getBlockPatternsForPostType:ye}=N(ue(Ai.store)),oe=ye(t);return Ye("getBlockPatterns")?oe:void 0},[She]:hhe,__experimentalBlockPatternCategories:G,__experimentalUserPatternCategories:S,__experimentalFetchLinkSuggestions:(ue,Ye)=>(0,Ai.__experimentalFetchLinkSuggestions)(ue,Ye,e),inserterMediaCategories:r8,__experimentalFetchRichUrlData:Ai.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:v,__experimentalUndo:Y,outlineMode:!f&&t==="wp_template",__experimentalCreatePageEntity:H,__experimentalUserCanCreatePages:y,pageOnFront:b,pageForPosts:_,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:Z,[_he]:T,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[Che]:["wp_template_part","wp_block","wp_navigation"].includes(t),disableContentOnlyForTemplateParts:o==="template-locked",...R?{[The]:R}:{},[Phe]:F};return B&&(ne.isPreviewMode=!0),ne},[B,X,l,u,ae,d,f,m,e,h,S,U,G,v,Y,H,y,b,_,t,Z,T,L,M,o,V,e.onNavigateToEntityRecord,R,i,a,F])}var J8=Ehe;var zy=s(O(),1),Mp=s($(),1),hw=s(D(),1);var $8=s(D(),1),e7=s(mo(),1),Rhe=["core/post-title","core/post-featured-image","core/post-content"];function pw(){return(0,$8.useMemo)(()=>[...(0,e7.applyFilters)("editor.postContentBlockTypes",Rhe)],[])}function t7(){let e=pw(),{contentOnlyIds:t,templateParts:r}=(0,zy.useSelect)(i=>{let{getPostBlocksByName:a}=N(i(w)),{getBlocksByName:l}=i(Mp.store);return{contentOnlyIds:a(e),templateParts:l("core/template-part")}},[e]),o=(0,zy.useSelect)(i=>{let{getBlockOrder:a}=i(Mp.store);return r.flatMap(l=>a(l))},[r]),n=(0,zy.useRegistry)();return(0,hw.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Mp.store);return i("","disabled"),()=>{a("")}},[n]),(0,hw.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Mp.store);return n.batch(()=>{for(let l of r)i(l,"contentOnly")}),()=>{n.batch(()=>{for(let l of r)a(l)})}},[r,n]),(0,hw.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:a}=n.dispatch(Mp.store),l=new Set(t);return n.batch(()=>{for(let c of t)i(c,"contentOnly");for(let c of o)l.has(c)||i(c,"disabled")}),()=>{n.batch(()=>{for(let c of t)a(c);for(let c of o)l.has(c)||a(c)})}},[t,o,n]),null}var r7=s(D(),1),gw=s(O(),1),OI=s($(),1);function o7(){let e=(0,gw.useSelect)(o=>o(OI.store).getBlockOrder()?.[0],[]),{setBlockEditingMode:t,unsetBlockEditingMode:r}=(0,gw.useDispatch)(OI.store);(0,r7.useEffect)(()=>{if(e)return t(e,"contentOnly"),()=>{r(e)}},[e,r,t])}var i7=s(D(),1),Lp=s(mo(),1),n7=["wp_block","wp_template","wp_template_part"];function s7(e,t){(0,i7.useEffect)(()=>((0,Lp.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!n7.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,Lp.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!n7.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,Lp.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,Lp.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var _7=s(O(),1),yw=s(D(),1),bw=s(Xe(),1);var h7=s(FI(),1),LI=s(BI(),1),MI=s(f7(),1),vw=s(Xe(),1),oo=s(Wy(),1),tn=s(E(),1);var{parseRawBlock:g7}=N(vw.privateApis);function p7(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function zhe(e,t){if(!e&&!t)return 1;if(!e||!t)return 0;let r=new Intl.Segmenter(void 0,{granularity:"word"}),o=/[\p{L}\p{N}]/u,n=d=>{let f=[];for(let{segment:m,isWordLike:h}of r.segment(d))(h||o.test(m))&&f.push(m);return f},i=n(e),a=n(t);if(i.length===0&&a.length===0)return 1;let l=new Set(i),c=0;for(let d of a)l.has(d)&&c++;let u=Math.max(i.length,a.length);return u>0?c/u:0}function Uhe(e){let t=[],r=[];if(e.forEach((d,f)=>{let m=d.__revisionDiffStatus?.status;m==="removed"?t.push({block:d,index:f}):m==="added"&&r.push({block:d,index:f})}),t.length===0||r.length===0)return e;let o=new Set,n=new Set,i=new Map,a=.5,l=new Map;for(let d of r){let f=d.block.blockName;l.has(f)||l.set(f,[]),l.get(f).push(d)}let c=new Map;for(let d of t){let f=d.block.blockName;c.has(f)||c.set(f,[]),c.get(f).push(d)}let u=-1;for(let d of t){let f=l.get(d.block.blockName)||[],m=c.get(d.block.blockName)||[],h=f.filter(v=>!i.has(v.index)&&v.index>u);if(h.length===0)continue;let g=null;if(m.length===1&&h.length===1){let v=h[0],y=JSON.stringify(d.block.attrs)===JSON.stringify(v.block.attrs);(!((d.block.innerHTML||"")===(v.block.innerHTML||""))||!y)&&(g=v)}else{let v=0;for(let y of h){let b=zhe(d.block.innerHTML||"",y.block.innerHTML||""),_=JSON.stringify(d.block.attrs)===JSON.stringify(y.block.attrs);b>v&&b>a&&(b<1||!_)&&(v=b,g=y)}}if(g){u=g.index;let v={...g.block,__revisionDiffStatus:{status:"modified"},__previousRawBlock:d.block},y=Math.min(d.index,g.index),b=Math.max(d.index,g.index),_=!1;for(let S=y+1;S<b;S++)if(e[S].__revisionDiffStatus?.status==="added"&&!n.has(S)){_=!0;break}_?(i.set(g.index,v),o.add(d.index)):(i.set(d.index,v),n.add(g.index))}}return e.map((d,f)=>o.has(f)||n.has(f)?null:i.has(f)?i.get(f):d).filter(Boolean)}function v7(e,t){let r=u=>JSON.stringify({name:u.blockName,attrs:u.attrs,html:(u.innerContent||[]).filter(d=>d!==null&&d.trim()!=="")}),o=e.map(r),n=t.map(r),i=(0,h7.diffArrays)(n,o),a=[],l=0,c=0;for(let u of i)if(u.added)for(let d=0;d<u.count;d++)a.push({...e[l++],__revisionDiffStatus:{status:"added"}});else if(u.removed)for(let d=0;d<u.count;d++)a.push({...t[c++],__revisionDiffStatus:{status:"removed"}});else for(let d=0;d<u.count;d++){let f=e[l++],m=t[c++],h=v7(f.innerBlocks||[],m.innerBlocks||[]);a.push({...f,innerBlocks:h})}return Uhe(a)}function Hhe(e,t,r,o){let n=e[r]||[],i=t[o]||[];if(n.length!==i.length)return!0;for(let a of n)if(!i.find(c=>c.type===a.type&&JSON.stringify(c.attributes)===JSON.stringify(a.attributes)))return!0;return!1}function Ghe(e,t,r,o){let n=e[r]||[],i=t[o]||[],a=0,l=0,c=0;for(let d of n){let f=i.find(m=>m.type===d.type);f?JSON.stringify(d.attributes)!==JSON.stringify(f.attributes)&&c++:a++}for(let d of i)n.find(m=>m.type===d.type)||l++;if(a>0&&l===0&&c===0)return{type:"added",description:(0,tn.sprintf)((0,tn._n)("%d format added","%d formats added",a),a)};if(l>0&&a===0&&c===0)return{type:"removed",description:(0,tn.sprintf)((0,tn._n)("%d format removed","%d formats removed",l),l)};let u=[];return a>0&&u.push((0,tn.sprintf)((0,tn._n)("%d format added","%d formats added",a),a)),l>0&&u.push((0,tn.sprintf)((0,tn._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,tn.sprintf)((0,tn._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,tn.__)("Formatting changed")}}function Whe(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=(0,LI.diffWords)(o,r),i=(0,oo.create)({text:""}),a=0,l=0;for(let c of n)if(c.removed){let u=(0,oo.slice)(t,l,l+c.value.length),d=(0,oo.applyFormat)(u,{type:"revision/diff-removed",attributes:{title:(0,tn.__)("Removed")}},0,c.value.length);i=(0,oo.concat)(i,d),l+=c.value.length}else if(c.added){let u=(0,oo.slice)(e,a,a+c.value.length),d=(0,oo.applyFormat)(u,{type:"revision/diff-added",attributes:{title:(0,tn.__)("Added")}},0,c.value.length);i=(0,oo.concat)(i,d),a+=c.value.length}else{let u=e.formats||[],d=t.formats||[],f=c.value.length,m=v=>Hhe(u,d,a+v,l+v),h=0,g=m(0);for(let v=1;v<=f;v++){let y=v<f&&m(v);if(v===f||y!==g){let b=(0,oo.slice)(e,a+h,a+v);if(g){let{type:_,description:S}=Ghe(u,d,a+h,l+h),x={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[_],T=(0,oo.applyFormat)(b,{type:x,attributes:{title:S}},0,v-h);i=(0,oo.concat)(i,T)}else i=(0,oo.concat)(i,b);h=v,g=y}}a+=c.value.length,l+=c.value.length}return new oo.RichTextData(i)}function Yhe(e,t,r){let o=(0,vw.getBlockType)(e.name);if(!o)return;let n={};for(let[i,a]of Object.entries(o.attributes))if(a.source==="rich-text"){let l=e.attributes[i],c=t.attributes[i];l instanceof oo.RichTextData&&c instanceof oo.RichTextData&&(e.attributes[i]=Whe(l,c))}else{let l=p7(e.attributes[i]),c=p7(t.attributes[i]);l!==c&&(n[i]=(0,LI.diffWords)(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function y7(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=g7(t.__previousRawBlock);r&&Yhe(e,r,t.__revisionDiffStatus)}e.__revisionDiffStatus=t.__revisionDiffStatus,e.attributes.__revisionDiffStatus=t.__revisionDiffStatus}if(e.innerBlocks&&t.innerBlocks)for(let r=0;r<e.innerBlocks.length;r++){let o=e.innerBlocks[r],n=t.innerBlocks[r];o&&n&&y7(o,n)}}function b7(e,t){let r=(0,MI.parse)(e||""),o=(0,MI.parse)(t||"");return v7(r,o).map(i=>{let a=g7(i);return a&&y7(a,i),a}).filter(Boolean)}var S7=s(FI(),1);function VI(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=(0,S7.diffArrays)(o,r),i=0,a=0,l=[];for(let c of n)if(c.removed)a+=c.count;else if(c.added)for(let u=0;u<c.count;u++)l.push(e[i++]);else for(let u=0;u<c.count;u++){let d=e[i++],f=t[a++];l.push({...d,clientId:f.clientId,innerBlocks:VI(d.innerBlocks,f.innerBlocks)})}return l}function w7(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,_7.useSelect)(l=>{let{isRevisionsMode:c,isShowingRevisionDiff:u,getCurrentRevision:d,getPreviousRevision:f}=N(l(w)),{getCurrentPostType:m}=l(w),h=c();return{isInRevisionsMode:h,showDiff:u(),revision:h?d():void 0,previousRevision:h?f():void 0,postType:m()}},[]),i=(0,yw.useRef)([]);return(0,yw.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=b7(l,d)}else c=(0,bw.parse)(l);n==="wp_navigation"&&(c=[(0,bw.createBlock)("core/navigation",{templateLock:!1},c)]);let u=VI(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var ti=s(O(),1),$e=s(E(),1);var lb=s(jI(),1),l6=s(lt(),1),U9=s(ct(),1),H9=s($(),1),Yp=s(W(),1);var i6={};Qc(i6,{ActionItem:()=>rs,ComplementaryArea:()=>ql,ComplementaryAreaMoreMenuItem:()=>xu,FullscreenMode:()=>H7,InterfaceSkeleton:()=>ib,PinnedItems:()=>zp,store:()=>Ce});var os=s(A(),1),Ky=s(O(),1),Rw=s(E(),1);var Oa=s(D(),1),HI=s(T7(),1),V7=s(lt(),1),Cu=s(he(),1),j7=s(_u(),1);var O7=s(A(),1),xw=s(O(),1),I7=s(_u(),1);var ww=s(O(),1);var zI={};Qc(zI,{closeModal:()=>rge,disableComplementaryArea:()=>Khe,enableComplementaryArea:()=>Zhe,openModal:()=>tge,pinItem:()=>Xhe,setDefaultComplementaryArea:()=>qhe,setFeatureDefaults:()=>ege,setFeatureValue:()=>$he,toggleFeature:()=>Jhe,unpinItem:()=>Qhe});var _w=s(Yi(),1),ts=s(lt(),1);var Sw=s(Yi(),1);function Aa(e){return["core/edit-post","core/edit-site"].includes(e)?((0,Sw.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function gf(e,t){return e==="core"&&t==="edit-site/template"?((0,Sw.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,Sw.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var qhe=(e,t)=>(e=Aa(e),t=gf(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),Zhe=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=Aa(e),t=gf(e,t),r.select(ts.store).get(e,"isComplementaryAreaVisible")||r.dispatch(ts.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},Khe=e=>({registry:t})=>{e=Aa(e),t.select(ts.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(ts.store).set(e,"isComplementaryAreaVisible",!1)},Xhe=(e,t)=>({registry:r})=>{if(!t)return;e=Aa(e),t=gf(e,t);let o=r.select(ts.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(ts.store).set(e,"pinnedItems",{...o,[t]:!0})},Qhe=(e,t)=>({registry:r})=>{if(!t)return;e=Aa(e),t=gf(e,t);let o=r.select(ts.store).get(e,"pinnedItems");r.dispatch(ts.store).set(e,"pinnedItems",{...o,[t]:!1})};function Jhe(e,t){return function({registry:r}){(0,_w.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(ts.store).toggle(e,t)}}function $he(e,t,r){return function({registry:o}){(0,_w.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(ts.store).set(e,t,!!r)}}function ege(e,t){return function({registry:r}){(0,_w.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(ts.store).setDefaults(e,t)}}function tge(e){return{type:"OPEN_MODAL",name:e}}function rge(){return{type:"CLOSE_MODAL"}}var UI={};Qc(UI,{getActiveComplementaryArea:()=>oge,isComplementaryAreaLoading:()=>nge,isFeatureActive:()=>sge,isItemPinned:()=>ige,isModalActive:()=>age});var Yy=s(O(),1),k7=s(Yi(),1),qy=s(lt(),1);var oge=(0,Yy.createRegistrySelector)(e=>(t,r)=>{r=Aa(r);let o=e(qy.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),nge=(0,Yy.createRegistrySelector)(e=>(t,r)=>{r=Aa(r);let o=e(qy.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),ige=(0,Yy.createRegistrySelector)(e=>(t,r,o)=>(r=Aa(r),o=gf(r,o),e(qy.store).get(r,"pinnedItems")?.[o]??!0)),sge=(0,Yy.createRegistrySelector)(e=>(t,r,o)=>((0,k7.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(qy.store).get(r,o)));function age(e,t){return e.activeModal===t}var E7=s(O(),1);function lge(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return e[r]?e:{...e,[r]:o}}case"ENABLE_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return{...e,[r]:o}}}return e}function cge(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var R7=(0,E7.combineReducers)({complementaryAreas:lge,activeModal:cge});var A7="core/interface";var Ce=(0,ww.createReduxStore)(A7,{reducer:R7,actions:zI,selectors:UI});(0,ww.register)(Ce);var N7=s(C(),1);function uge(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function jp({as:e=O7.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:a,...l}){let c=e,u=(0,I7.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,xw.useSelect)(v=>v(Ce).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,xw.useDispatch)(Ce);return(0,N7.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":uge(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:a,...l})}var Cw=s(C(),1),dge=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,Cw.jsx)(jp,{icon:Kn,...r});return(0,Cw.jsxs)("div",{className:re("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},F7=dge;var M7=s(A(),1);var wu=s(A(),1),Tw=s(D(),1),Zy=s(C(),1),D7=()=>{};function fge({name:e,as:t=wu.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,Zy.jsx)(wu.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!Tw.Children.toArray(i).length)return null;let a=[];Tw.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&a.push(u)});let l=Tw.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&a.includes(c.props.__unstableTarget)?null:c);return(0,Zy.jsx)(t,{...n,children:l})}})}function B7({name:e,as:t=wu.Button,onClick:r,...o}){return(0,Zy.jsx)(wu.Fill,{name:e,children:({onClick:n})=>(0,Zy.jsx)(t,{onClick:r||n?(...i)=>{(r||D7)(...i),(n||D7)(...i)}:void 0,...o})})}B7.Slot=fge;var rs=B7;var Pw=s(C(),1),mge=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,Pw.jsx)(M7.MenuItem,{...r});function xu({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,Pw.jsx)(jp,{as:n=>(0,Pw.jsx)(rs,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:mge,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Pi,name:t,scope:e,...o})}var Ew=s(A(),1),kw=s(C(),1);function L7({scope:e,...t}){return(0,kw.jsx)(Ew.Fill,{name:`PinnedItems/${e}`,...t})}function pge({scope:e,className:t,...r}){return(0,kw.jsx)(Ew.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,kw.jsx)("div",{className:re(t,"interface-pinned-items"),children:o})})}L7.Slot=pge;var zp=L7;var Wr=s(C(),1),hge=.3;function gge({scope:e,...t}){return(0,Wr.jsx)(os.Slot,{name:`ComplementaryArea/${e}`,...t})}var z7=280,vge={open:{width:z7},closed:{width:0},mobileOpen:{width:"100vw"}};function yge({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let a=(0,Cu.useReducedMotion)(),l=(0,Cu.useViewportMatch)("medium","<"),c=(0,Cu.usePrevious)(e),u=(0,Cu.usePrevious)(t),[,d]=(0,Oa.useState)({});(0,Oa.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:a||l||c&&e&&e!==c?0:hge,ease:[.6,0,.4,1]};return(0,Wr.jsx)(os.Fill,{name:`ComplementaryArea/${r}`,children:(0,Wr.jsx)(os.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,Wr.jsx)(os.__unstableMotion.div,{variants:vge,initial:"closed",animate:l?"mobileOpen":"open",exit:"closed",transition:f,className:"interface-complementary-area__fill",children:(0,Wr.jsx)("div",{id:i,className:n,style:{width:l?"100vw":z7},children:o})})})})}function bge(e,t,r,o,n){let i=(0,Oa.useRef)(!1),a=(0,Oa.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,Ky.useDispatch)(Ce);(0,Oa.useEffect)(()=>{o&&n&&!i.current?(c(e),a.current=!0):a.current&&!n&&i.current?(a.current=!1,l(e,t)):a.current&&r&&r!==t&&(a.current=!1),n!==i.current&&(i.current=n)},[o,n,e,t,r,c,l])}function U7({children:e,className:t,closeLabel:r=(0,Rw.__)("Close plugin"),identifier:o,header:n,headerClassName:i,icon:a,isPinnable:l=!0,panelClassName:c,scope:u,name:d,title:f,toggleShortcut:m,isActiveByDefault:h}){let g=(0,j7.usePluginContext)(),v=a||g.icon,y=o||`${g.name}/${d}`,[b,_]=(0,Oa.useState)(!1),{isLoading:S,isActive:x,isPinned:T,activeArea:R,isSmall:F,isLarge:B,showIconLabels:z}=(0,Ky.useSelect)(G=>{let{getActiveComplementaryArea:Y,isComplementaryAreaLoading:Z,isItemPinned:V}=G(Ce),{get:j}=G(V7.store),H=Y(u);return{isLoading:Z(u),isActive:H===y,isPinned:V(u,y),activeArea:H,isSmall:G(HI.store).isViewportMatch("< medium"),isLarge:G(HI.store).isViewportMatch("large"),showIconLabels:j("core","showIconLabels")}},[y,u]),L=(0,Cu.useViewportMatch)("medium","<");bge(u,y,R,x,F);let{enableComplementaryArea:M,disableComplementaryArea:k,pinItem:I,unpinItem:U}=(0,Ky.useDispatch)(Ce);if((0,Oa.useEffect)(()=>{h&&R===void 0&&!F?M(u,y):R===void 0&&F&&k(u,y),_(!0)},[R,h,u,y,F,M,k]),!!b)return(0,Wr.jsxs)(Wr.Fragment,{children:[l&&(0,Wr.jsx)(zp,{scope:u,children:T&&(0,Wr.jsx)(jp,{scope:u,identifier:y,isPressed:x&&(!z||B),"aria-expanded":x,"aria-disabled":S,label:f,icon:z?Pi:v,showTooltip:!z,variant:z?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,Wr.jsx)(xu,{target:d,scope:u,icon:v,identifier:y,children:f}),(0,Wr.jsxs)(yge,{activeArea:R,isActive:x,className:re("interface-complementary-area",t),scope:u,id:y.replace("/",":"),children:[(0,Wr.jsx)(F7,{className:i,closeLabel:r,onClose:()=>k(u),toggleButtonProps:{label:r,size:"compact",shortcut:m,scope:u,identifier:y},children:n||(0,Wr.jsxs)(Wr.Fragment,{children:[(0,Wr.jsx)("h2",{className:"interface-complementary-area-header__title",children:f}),l&&!L&&(0,Wr.jsx)(os.Button,{className:"interface-complementary-area__pin-unpin-item",icon:T?GA:UA,label:T?(0,Rw.__)("Unpin from toolbar"):(0,Rw.__)("Pin to toolbar"),onClick:()=>(T?U:I)(u,y),isPressed:T,"aria-expanded":T,size:"compact"})]})}),(0,Wr.jsx)(os.Panel,{className:c,children:e})]})]})}U7.Slot=gge;var ql=U7;var GI=s(D(),1),Sge=({isActive:e})=>((0,GI.useEffect)(()=>{let t=!1;return document.body.classList.contains("sticky-menu")&&(t=!0,document.body.classList.remove("sticky-menu")),()=>{t&&document.body.classList.add("sticky-menu")}},[]),(0,GI.useEffect)(()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")}),[e]),null),H7=Sge;var G7=s(D(),1),W7=s(C(),1),Y7=(0,G7.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,W7.jsx)(o,{ref:i,className:re("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));Y7.displayName="NavigableRegion";var Tu=Y7;var Z7=s(Jn(),1),q7={};function WI(e,t){let r=Z7.useRef(q7);return r.current===q7&&(r.current=e(t)),r}function YI(e,...t){let r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${r} for the full message.`}var Aw=s(Jn(),1);function qI(e,t,r,o){let n=WI(X7).current;return _ge(n,e,t,r,o)&&Q7(n,[e,t,r,o]),n.callback}function K7(e){let t=WI(X7).current;return wge(t,e)&&Q7(t,e),t.callback}function X7(){return{callback:null,cleanup:null,refs:[]}}function _ge(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function wge(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function Q7(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){let o=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 a=i(r);typeof a=="function"&&(o[n]=a);break}case"object":{i.current=r;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 a=o[n];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}default:}}}}}}var e9=s(Jn(),1);var J7=s(Jn(),1),xge=parseInt(J7.version,10);function $7(e){return xge>=e}function ZI(e){if(!e9.isValidElement(e))return null;let t=e,r=t.props;return($7(19)?r?.ref:t.ref)??null}function Xy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function t9(e,t){let r={};for(let o in e){let n=e[o];if(t?.hasOwnProperty(o)){let i=t[o](n);i!=null&&Object.assign(r,i);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function r9(e,t){return typeof e=="function"?e(t):e}function o9(e,t){return typeof e=="function"?e(t):e}var Jy={};function Up(e,t,r,o,n){let i={...KI(e,Jy)};return t&&(i=Qy(i,t)),r&&(i=Qy(i,r)),o&&(i=Qy(i,o)),n&&(i=Qy(i,n)),i}function n9(e){if(e.length===0)return Jy;if(e.length===1)return KI(e[0],Jy);let t={...KI(e[0],Jy)};for(let r=1;r<e.length;r+=1)t=Qy(t,e[r]);return t}function Qy(e,t){return i9(t)?t(e):Cge(e,t)}function Cge(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=Xy(e.style,o);break}case"className":{e[r]=XI(e.className,o);break}default:Tge(r,o)?e[r]=Pge(e[r],o):e[r]=o}}return e}function Tge(e,t){let r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function i9(e){return typeof e=="function"}function KI(e,t){return i9(e)?e(t):e??Jy}function Pge(e,t){return t?e?r=>{if(Ege(r)){let n=r;kge(n);let i=t(n);return n.baseUIHandlerPrevented||e?.(n),i}let o=t(r);return e?.(r),o}:t:e}function kge(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function XI(e,t){return t?e?t+" "+e:t:e}function Ege(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Rge=Object.freeze([]),Pu=Object.freeze({});var QI=s(Jn(),1);function s9(e,t,r={}){let o=t.render,n=Age(t,r);if(r.enabled===!1)return null;let i=r.state??Pu;return Oge(e,o,n,i)}function Age(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Pu,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?r9(r,i):void 0,f=u?o9(o,i):void 0,m=u?t9(i,c):Pu,h=u?Xy(m,Array.isArray(l)?n9(l):l)??Pu:Pu;return typeof document<"u"&&(u?Array.isArray(a)?h.ref=K7([h.ref,ZI(n),...a]):h.ref=qI(h.ref,ZI(n),a):qI(null,null)),u?(d!==void 0&&(h.className=XI(h.className,d)),f!==void 0&&(h.style=Xy(h.style,f)),h):Pu}function Oge(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=Up(r,t.props);return n.ref=r.ref,Aw.cloneElement(t,n)}if(e&&typeof e=="string")return Ige(e,r);throw new Error(YI(8))}function Ige(e,t){return e==="button"?(0,QI.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,QI.createElement)("img",{alt:"",...t,key:t.key}):Aw.createElement(e,t)}function Ow(){return typeof window<"u"}function yf(e){return l9(e)?(e.nodeName||"").toLowerCase():"#document"}function ei(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){var t;return(t=(l9(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l9(e){return Ow()?e instanceof Node||e instanceof ei(e).Node:!1}function ns(e){return Ow()?e instanceof Element||e instanceof ei(e).Element:!1}function Gs(e){return Ow()?e instanceof HTMLElement||e instanceof ei(e).HTMLElement:!1}function a9(e){return!Ow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ei(e).ShadowRoot}var Nge=new Set(["inline","contents"]);function Hp(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=is(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!Nge.has(n)}var Fge=new Set(["table","td","th"]);function c9(e){return Fge.has(yf(e))}var Dge=[":popover-open",":modal"];function $y(e){return Dge.some(t=>{try{return e.matches(t)}catch{return!1}})}var Bge=["transform","translate","scale","rotate","perspective"],Mge=["transform","translate","scale","rotate","perspective","filter"],Lge=["paint","layout","strict","content"];function Iw(e){let t=Nw(),r=ns(e)?is(e):e;return Bge.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Mge.some(o=>(r.willChange||"").includes(o))||Lge.some(o=>(r.contain||"").includes(o))}function u9(e){let t=Zl(e);for(;Gs(t)&&!bf(t);){if(Iw(t))return t;if($y(t))return null;t=Zl(t)}return null}function Nw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Vge=new Set(["html","body","#document"]);function bf(e){return Vge.has(yf(e))}function is(e){return ei(e).getComputedStyle(e)}function eb(e){return ns(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zl(e){if(yf(e)==="html")return e;let t=e.assignedSlot||e.parentNode||a9(e)&&e.host||Hs(e);return a9(t)?t.host:t}function d9(e){let t=Zl(e);return bf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gs(t)&&Hp(t)?t:d9(t)}function vf(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=d9(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),a=ei(n);if(i){let l=Fw(a);return t.concat(a,a.visualViewport||[],Hp(n)?n:[],l&&r?vf(l):[])}return t.concat(n,vf(n,[],r))}function Fw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var tb=Math.min,ku=Math.max,rb=Math.round,ob=Math.floor,Ws=e=>({x:e,y:e});function f9(e,t){return typeof e=="function"?e(t):e}function Dw(e){return e.split("-")[0]}function JI(e){return e.split("-")[1]}function m9(e){return e==="x"?"y":"x"}function p9(e){return e==="y"?"height":"width"}var jge=new Set(["top","bottom"]);function Bw(e){return jge.has(Dw(e))?"y":"x"}function h9(e){return m9(Bw(e))}function nb(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function g9(e,t,r){let{reference:o,floating:n}=e,i=Bw(t),a=h9(t),l=p9(a),c=Dw(t),u=i==="y",d=o.x+o.width/2-n.width/2,f=o.y+o.height/2-n.height/2,m=o[l]/2-n[l]/2,h;switch(c){case"top":h={x:d,y:o.y-n.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-n.width,y:f};break;default:h={x:o.x,y:o.y}}switch(JI(t)){case"start":h[a]-=m*(r&&u?-1:1);break;case"end":h[a]+=m*(r&&u?-1:1);break}return h}var v9=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=g9(u,o,c),m=o,h={},g=0;for(let v=0;v<l.length;v++){let{name:y,fn:b}=l[v],{x:_,y:S,data:x,reset:T}=await b({x:d,y:f,initialPlacement:o,placement:m,strategy:n,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});d=_??d,f=S??f,h={...h,[y]:{...h[y],...x}},T&&g<=50&&(g++,typeof T=="object"&&(T.placement&&(m=T.placement),T.rects&&(u=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:n}):T.rects),{x:d,y:f}=g9(u,m,c)),v=-1)}return{x:d,y:f,placement:m,strategy:n,middlewareData:h}};var zge=new Set(["left","top"]);async function Uge(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),a=Dw(r),l=JI(r),c=Bw(r)==="y",u=zge.has(a)?-1:1,d=i&&c?-1:1,f=f9(t,e),{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}var y9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:i,placement:a,middlewareData:l}=t,c=await Uge(t,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:n+c.x,y:i+c.y,data:{...c,placement:a}}}}};function w9(e){let t=is(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Gs(e),i=n?e.offsetWidth:r,a=n?e.offsetHeight:o,l=rb(r)!==i||rb(o)!==a;return l&&(r=i,o=a),{width:r,height:o,$:l}}function e6(e){return ns(e)?e:e.contextElement}function Gp(e){let t=e6(e);if(!Gs(t))return Ws(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=w9(t),a=(i?rb(r.width):r.width)/o,l=(i?rb(r.height):r.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}var Hge=Ws(0);function x9(e){let t=ei(e);return!Nw()||!t.visualViewport?Hge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gge(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ei(e)?!1:t}function Sf(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=e6(e),a=Ws(1);t&&(o?ns(o)&&(a=Gp(o)):a=Gp(e));let l=Gge(i,r,o)?x9(i):Ws(0),c=(n.left+l.x)/a.x,u=(n.top+l.y)/a.y,d=n.width/a.x,f=n.height/a.y;if(i){let m=ei(i),h=o&&ns(o)?ei(o):o,g=m,v=Fw(g);for(;v&&o&&h!==g;){let y=Gp(v),b=v.getBoundingClientRect(),_=is(v),S=b.left+(v.clientLeft+parseFloat(_.paddingLeft))*y.x,x=b.top+(v.clientTop+parseFloat(_.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=S,u+=x,g=ei(v),v=Fw(g)}}return nb({width:d,height:f,x:c,y:u})}function Mw(e,t){let r=eb(e).scrollLeft;return t?t.left+r:Sf(Hs(e)).left+r}function C9(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Mw(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function Wge(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",a=Hs(o),l=t?$y(t.floating):!1;if(o===a||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Ws(1),d=Ws(0),f=Gs(o);if((f||!f&&!i)&&((yf(o)!=="body"||Hp(a))&&(c=eb(o)),Gs(o))){let h=Sf(o);u=Gp(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}let m=a&&!f&&!i?C9(a,c):Ws(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function Yge(e){return Array.from(e.getClientRects())}function qge(e){let t=Hs(e),r=eb(e),o=e.ownerDocument.body,n=ku(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ku(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-r.scrollLeft+Mw(e),l=-r.scrollTop;return is(o).direction==="rtl"&&(a+=ku(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:a,y:l}}var b9=25;function Zge(e,t){let r=ei(e),o=Hs(e),n=r.visualViewport,i=o.clientWidth,a=o.clientHeight,l=0,c=0;if(n){i=n.width,a=n.height;let d=Nw();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}let u=Mw(o);if(u<=0){let d=o.ownerDocument,f=d.body,m=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-h);g<=b9&&(i-=g)}else u<=b9&&(i+=u);return{width:i,height:a,x:l,y:c}}var Kge=new Set(["absolute","fixed"]);function Xge(e,t){let r=Sf(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=Gs(e)?Gp(e):Ws(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,c=n*i.x,u=o*i.y;return{width:a,height:l,x:c,y:u}}function S9(e,t,r){let o;if(t==="viewport")o=Zge(e,r);else if(t==="document")o=qge(Hs(e));else if(ns(t))o=Xge(t,r);else{let n=x9(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nb(o)}function T9(e,t){let r=Zl(e);return r===t||!ns(r)||bf(r)?!1:is(r).position==="fixed"||T9(r,t)}function Qge(e,t){let r=t.get(e);if(r)return r;let o=vf(e,[],!1).filter(l=>ns(l)&&yf(l)!=="body"),n=null,i=is(e).position==="fixed",a=i?Zl(e):e;for(;ns(a)&&!bf(a);){let l=is(a),c=Iw(a);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&Kge.has(n.position)||Hp(a)&&!c&&T9(e,a))?o=o.filter(d=>d!==a):n=l,a=Zl(a)}return t.set(e,o),o}function Jge(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,a=[...r==="clippingAncestors"?$y(t)?[]:Qge(t,this._c):[].concat(r),o],l=a[0],c=a.reduce((u,d)=>{let f=S9(t,d,n);return u.top=ku(f.top,u.top),u.right=tb(f.right,u.right),u.bottom=tb(f.bottom,u.bottom),u.left=ku(f.left,u.left),u},S9(t,l,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $ge(e){let{width:t,height:r}=w9(e);return{width:t,height:r}}function eve(e,t,r){let o=Gs(t),n=Hs(t),i=r==="fixed",a=Sf(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=Ws(0);function u(){c.x=Mw(n)}if(o||!o&&!i)if((yf(t)!=="body"||Hp(n))&&(l=eb(t)),o){let h=Sf(t,!0,i,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else n&&u();i&&!o&&n&&u();let d=n&&!o&&!i?C9(n,l):Ws(0),f=a.left+l.scrollLeft-c.x-d.x,m=a.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:a.width,height:a.height}}function $I(e){return is(e).position==="static"}function _9(e,t){if(!Gs(e)||is(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Hs(e)===r&&(r=r.ownerDocument.body),r}function P9(e,t){let r=ei(e);if($y(e))return r;if(!Gs(e)){let n=Zl(e);for(;n&&!bf(n);){if(ns(n)&&!$I(n))return n;n=Zl(n)}return r}let o=_9(e,t);for(;o&&c9(o)&&$I(o);)o=_9(o,t);return o&&bf(o)&&$I(o)&&!Iw(o)?r:o||u9(e)||r}var tve=async function(e){let t=this.getOffsetParent||P9,r=this.getDimensions,o=await r(e.floating);return{reference:eve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function rve(e){return is(e).direction==="rtl"}var k9={convertOffsetParentRelativeRectToViewportRelativeRect:Wge,getDocumentElement:Hs,getClippingRect:Jge,getOffsetParent:P9,getElementRects:tve,getClientRects:Yge,getDimensions:$ge,getScale:Gp,isElement:ns,isRTL:rve};function E9(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ove(e,t){let r=null,o,n=Hs(e);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();let u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=u;if(l||t(),!m||!h)return;let g=ob(f),v=ob(n.clientWidth-(d+m)),y=ob(n.clientHeight-(f+h)),b=ob(d),S={rootMargin:-g+"px "+-v+"px "+-y+"px "+-b+"px",threshold:ku(0,tb(1,c))||1},x=!0;function T(R){let F=R[0].intersectionRatio;if(F!==c){if(!x)return a();F?a(!1,F):o=setTimeout(()=>{a(!1,1e-7)},1e3)}F===1&&!E9(u,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(T,{...S,root:n.ownerDocument})}catch{r=new IntersectionObserver(T,S)}r.observe(e)}return a(!0),i}function t6(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=e6(e),d=n||i?[...u?vf(u):[],...vf(t)]:[];d.forEach(b=>{n&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});let f=u&&l?ove(u,r):null,m=-1,h=null;a&&(h=new ResizeObserver(b=>{let[_]=b;_&&_.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),r()}),u&&!c&&h.observe(u),h.observe(t));let g,v=c?Sf(e):null;c&&y();function y(){let b=Sf(e);v&&!E9(v,b)&&r(),v=b,g=requestAnimationFrame(y)}return r(),()=>{var b;d.forEach(_=>{n&&_.removeEventListener("scroll",r),i&&_.removeEventListener("resize",r)}),f?.(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(g)}}var r6=y9;var o6=(e,t,r)=>{let o=new Map,n={platform:k9,...r},i={...n.platform,_c:o};return v9(e,t,{...n,platform:i})};function Lw(e){return s9(e.defaultTagName??"div",e,e)}var A9=s(D(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var R9={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"},n6=(0,A9.forwardRef)(function({children:t,intent:r="none",render:o,className:n,...i},a){return Lw({render:o,defaultTagName:"span",ref:a,props:Up(i,{className:re(R9.badge,R9[`is-${r}-intent`],n),children:t})})});var O9=s(D(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var nve={stack:"_19ce0419607e1896__stack"},ive={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)"},it=(0,O9.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:a,...l},c){let u={gap:r&&ive[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return Lw({render:a,ref:c,props:Up(l,{style:u,className:nve.stack})})});var Vw=s(D(),1),_f=s(A(),1),Eu=s(E(),1),Wp=s(he(),1),In=s(C(),1),N9=.25,I9={type:"tween",duration:N9,ease:[.6,0,.4,1]};function sve(e){(0,Vw.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var ave={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...I9,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...I9,delay:.8,delayChildren:.8}}};function lve({isDistractionFree:e,footer:t,header:r,editorNotices:o,sidebar:n,secondarySidebar:i,content:a,actions:l,labels:c,className:u},d){let[f,m]=(0,Wp.useResizeObserver)(),h=(0,Wp.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,Wp.useReducedMotion)()?0:N9,ease:[.6,0,.4,1]};sve("interface-interface-skeleton__html-container");let b={...{header:(0,Eu._x)("Header","header landmark area"),body:(0,Eu.__)("Content"),secondarySidebar:(0,Eu.__)("Block Library"),sidebar:(0,Eu._x)("Settings","settings landmark area"),actions:(0,Eu.__)("Publish"),footer:(0,Eu.__)("Footer")},...c};return(0,In.jsxs)("div",{ref:d,className:re(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,In.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,In.jsx)(_f.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,In.jsx)(Tu,{as:_f.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":b.header,initial:e&&!h?"distractionFreeHidden":"hidden",whileHover:e&&!h?"distractionFreeHover":"visible",animate:e&&!h?"distractionFreeDisabled":"visible",exit:e&&!h?"distractionFreeHidden":"hidden",variants:ave,transition:v,children:r})}),e&&(0,In.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,In.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,In.jsx)(_f.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:b.secondarySidebar,as:_f.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,In.jsxs)(_f.__unstableMotion.div,{style:{position:"absolute",width:h?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:v,children:[f,i]})})}),(0,In.jsx)(Tu,{className:"interface-interface-skeleton__content",ariaLabel:b.body,children:a}),!!n&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__sidebar",ariaLabel:b.sidebar,children:n}),!!l&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__actions",ariaLabel:b.actions,children:l})]})]}),!!t&&(0,In.jsx)(Tu,{className:"interface-interface-skeleton__footer",ariaLabel:b.footer,children:t})]})}var ib=(0,Vw.forwardRef)(lve);var jw=s(ft(),1);var sb=s(O(),1),F9=s(Ls(),1),D9=s(W(),1);var B9=s(C(),1),{RenamePatternModal:cve}=N(F9.privateApis),s6="editor/pattern-rename";function M9(){let e=(0,sb.useSelect)(n=>n(Ce).isModalActive(s6)),{record:t,postType:r}=(0,sb.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:a}=n(w),{getEditedEntityRecord:l}=n(D9.store),c=i();return{record:l("postType",c,a()),postType:c}},[e]),{closeModal:o}=(0,sb.useDispatch)(Ce);return!e||r!==qi?null:(0,B9.jsx)(cve,{onClose:o,pattern:t})}var ab=s(O(),1),L9=s(Ls(),1),V9=s(W(),1);var j9=s(C(),1),{DuplicatePatternModal:uve}=N(L9.privateApis),a6="editor/pattern-duplicate";function z9(){let e=(0,ab.useSelect)(n=>n(Ce).isModalActive(a6)),{record:t,postType:r}=(0,ab.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:a}=n(w),{getEditedEntityRecord:l}=n(V9.store),c=i();return{record:l("postType",c,a()),postType:c}},[e]),{closeModal:o}=(0,ab.useDispatch)(Ce);return!e||r!==qi?null:(0,j9.jsx)(uve,{onClose:o,onSuccess:()=>o(),pattern:t})}var dve=()=>function(){let{editorMode:t,isListViewOpen:r,showBlockBreadcrumbs:o,isDistractionFree:n,isFocusMode:i,isPreviewMode:a,isViewable:l,isCodeEditingEnabled:c,isRichEditingEnabled:u,isPublishSidebarEnabled:d}=(0,ti.useSelect)(L=>{let{get:M}=L(l6.store),{isListViewOpened:k,getCurrentPostType:I,getEditorSettings:U}=L(w),{getSettings:G}=L(H9.store),{getPostType:Y}=L(Yp.store);return{editorMode:M("core","editorMode")??"visual",isListViewOpen:k(),showBlockBreadcrumbs:M("core","showBlockBreadcrumbs"),isDistractionFree:M("core","distractionFree"),isFocusMode:M("core","focusMode"),isPreviewMode:G().isPreviewMode,isViewable:Y(I())?.viewable??!1,isCodeEditingEnabled:U().codeEditingEnabled,isRichEditingEnabled:U().richEditingEnabled,isPublishSidebarEnabled:L(w).isPublishSidebarEnabled()}},[]),{getActiveComplementaryArea:f}=(0,ti.useSelect)(Ce),{toggle:m}=(0,ti.useDispatch)(l6.store),{createInfoNotice:h}=(0,ti.useDispatch)(U9.store),{__unstableSaveForPreview:g,setIsListViewOpened:v,switchEditorMode:y,toggleDistractionFree:b,toggleSpotlightMode:_,toggleTopToolbar:S}=(0,ti.useDispatch)(w),{openModal:x,enableComplementaryArea:T,disableComplementaryArea:R}=(0,ti.useDispatch)(Ce),{getCurrentPostId:F}=(0,ti.useSelect)(w),B=c&&u;if(a)return{commands:[],isLoading:!1};let z=[];return z.push({name:"core/open-shortcut-help",label:(0,$e.__)("Keyboard shortcuts"),icon:sA,category:"view",callback:({close:L})=>{L(),x("editor/keyboard-shortcut-help")}}),z.push({name:"core/toggle-distraction-free",label:n?(0,$e.__)("Exit Distraction free"):(0,$e.__)("Enter Distraction free"),category:"command",callback:({close:L})=>{b(),L()}}),z.push({name:"core/open-preferences",label:(0,$e.__)("Editor preferences"),category:"view",callback:({close:L})=>{L(),x("editor/preferences")}}),z.push({name:"core/toggle-spotlight-mode",label:i?(0,$e.__)("Exit Spotlight mode"):(0,$e.__)("Enter Spotlight mode"),category:"command",callback:({close:L})=>{_(),L()}}),z.push({name:"core/toggle-list-view",label:r?(0,$e.__)("Close List View"):(0,$e.__)("Open List View"),icon:Iv,category:"command",callback:({close:L})=>{v(!r),L(),h(r?(0,$e.__)("List View off."):(0,$e.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),z.push({name:"core/toggle-top-toolbar",label:(0,$e.__)("Top toolbar"),category:"command",callback:({close:L})=>{S(),L()}}),B&&z.push({name:"core/toggle-code-editor",label:t==="visual"?(0,$e.__)("Open code editor"):(0,$e.__)("Exit code editor"),icon:DR,category:"command",callback:({close:L})=>{y(t==="visual"?"text":"visual"),L()}}),z.push({name:"core/toggle-breadcrumbs",label:o?(0,$e.__)("Hide block breadcrumbs"):(0,$e.__)("Show block breadcrumbs"),category:"command",callback:({close:L})=>{m("core","showBlockBreadcrumbs"),L(),h(o?(0,$e.__)("Breadcrumbs hidden."):(0,$e.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),z.push({name:"core/open-settings-sidebar",label:(0,$e.__)("Show or hide the Settings panel"),icon:(0,$e.isRTL)()?zd:Ud,category:"command",callback:({close:L})=>{let M=f("core");L(),M==="edit-post/document"?R("core"):T("core","edit-post/document")}}),z.push({name:"core/open-block-inspector",label:(0,$e.__)("Show or hide the Block settings panel"),icon:vR,category:"command",callback:({close:L})=>{let M=f("core");L(),M==="edit-post/block"?R("core"):T("core","edit-post/block")}}),z.push({name:"core/toggle-publish-sidebar",label:d?(0,$e.__)("Disable pre-publish checks"):(0,$e.__)("Enable pre-publish checks"),icon:rA,category:"command",callback:({close:L})=>{L(),m("core","isPublishSidebarEnabled"),h(d?(0,$e.__)("Pre-publish checks disabled."):(0,$e.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&z.push({name:"core/preview-link",label:(0,$e.__)("Preview in a new tab"),icon:Xn,category:"view",callback:async({close:L})=>{L();let M=F(),k=await g();window.open(k,`wp-preview-${M}`)}}),{commands:z,isLoading:!1}},fve=()=>function(){let{postType:t}=(0,ti.useSelect)(n=>{let{getCurrentPostType:i}=n(w);return{postType:i()}},[]),{openModal:r}=(0,ti.useDispatch)(Ce),o=[];return t===qi&&(o.push({name:"core/rename-pattern",label:(0,$e.__)("Rename pattern"),icon:Mv,category:"edit",callback:({close:n})=>{r(s6),n()}}),o.push({name:"core/duplicate-pattern",label:(0,$e.__)("Duplicate pattern"),icon:Wv,category:"command",callback:({close:n})=>{r(a6),n()}})),{isLoading:!1,commands:o}},mve=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,ti.useSelect)(u=>{let{getRenderingMode:d,getEditorSettings:f,getCurrentTemplateId:m}=N(u(w)),h=f(),g=m();return{isTemplateHidden:d()==="post-only",onNavigateToEntityRecord:h.onNavigateToEntityRecord,getEditorSettings:f,goBack:h.onNavigateToPreviousEntityRecord,templateId:g,isPreviewMode:h.isPreviewMode,canEditTemplate:!!g&&u(Yp.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:a,hasResolved:l}=(0,Yp.useEntityRecord)("postType","wp_template",o);if(n)return{isLoading:!1,commands:[]};let c=[];return o&&l&&i&&c.push({name:"core/switch-to-template-focus",label:(0,$e.sprintf)((0,$e.__)("Edit template: %s"),(0,jw.decodeEntities)(a.title)),icon:Bs,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,$e.__)("Go back"),icon:qm,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},pve=()=>function(){let{postType:t,postId:r}=(0,ti.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(w);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,Yp.useEntityRecord)("postType",t,r),{revertTemplate:i}=N((0,ti.useDispatch)(w));if(!n||![Ur,xt].includes(t))return{isLoading:!0,commands:[]};let a=[];if(e_(o)){let l=o.type===xt?(0,$e.sprintf)((0,$e.__)("Reset template: %s"),(0,jw.decodeEntities)(o.title)):(0,$e.sprintf)((0,$e.__)("Reset template part: %s"),(0,jw.decodeEntities)(o.title));a.push({name:"core/reset-template",label:l,icon:(0,$e.isRTL)()?OA:RA,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:a}};function G9(){(0,lb.useCommandLoader)({name:"core/editor/edit-ui",hook:dve()}),(0,lb.useCommandLoader)({name:"core/editor/contextual-commands",hook:fve(),context:"entity-edit"}),(0,lb.useCommandLoader)({name:"core/editor/page-content-focus",hook:mve(),context:"entity-edit"}),(0,lb.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:pve()})}var zw=s(O(),1),q9=s(D(),1),Z9=s(Y9(),1);var qp="upload-in-progress";function K9(){let e=window.__clientSideMediaProcessing,t=(0,zw.useSelect)(a=>e?a(Z9.store).isUploading():!1,[e]),{lockPostSaving:r,unlockPostSaving:o,lockPostAutosaving:n,unlockPostAutosaving:i}=(0,zw.useDispatch)(w);(0,q9.useEffect)(()=>{if(e)return t?(r(qp),n(qp)):(o(qp),i(qp)),()=>{o(qp),i(qp)}},[e,t,r,o,n,i])}var wf=s(E(),1),Q9=s($(),1),J9=s(O(),1),$9=s(D(),1);var ej=s(C(),1),{BlockRemovalWarningModal:X9}=N(Q9.privateApis),hve=["core/post-content","core/post-template","core/query"],gve=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,wf.__)("This block displays the content of posts and pages using this template."),warning:(0,wf.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,wf.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>hve.includes(o)).length)return(0,wf._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",e.length)}},{postTypes:["wp_block"],callback(e){if(e.filter(({attributes:r})=>r?.metadata?.bindings&&Object.values(r.metadata.bindings).some(o=>o.source==="core/pattern-overrides")).length)return(0,wf._n)("The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?","Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",e.length)}}];function tj(){let e=(0,J9.useSelect)(r=>r(w).getCurrentPostType(),[]),t=(0,$9.useMemo)(()=>gve.filter(r=>r.postTypes.includes(e)),[e]);return!X9||!t?null:(0,ej.jsx)(X9,{rules:t})}var Ru=s(A(),1),c6=s(E(),1),xf=s(D(),1),Uw=s($(),1),Kl=s(O(),1),rj=s(W(),1),oj=s(Xe(),1),u6=s(lt(),1);var Ia=s(C(),1);function vve(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,Kl.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r(Uw.store),{getCurrentPostType:i,getRenderingMode:a}=r(w),l=a()==="post-only"?"":n("core/post-content")?.[0];return{blockPatternsWithPostContentBlockType:o("core/post-content",l),postType:i()}},[]);return(0,xf.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function yve({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,Kl.useDispatch)(rj.store),{postType:o,postId:n}=(0,Kl.useSelect)(i=>{let{getCurrentPostType:a,getCurrentPostId:l}=i(w);return{postType:a(),postId:l()}},[]);return(0,Ia.jsx)(Uw.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,a)=>{r("postType",o,n,{blocks:a,content:({blocks:l=[]})=>(0,oj.__unstableSerializeAndClean)(l)}),t()}})}function bve({onClose:e}){let[t,r]=(0,xf.useState)(!0),{set:o}=(0,Kl.useDispatch)(u6.store),n=vve();if(!(n.length>0))return null;function a(){e(),o("core","enableChoosePatternModal",t)}return(0,Ia.jsxs)(Ru.Modal,{className:"editor-start-page-options__modal",title:(0,c6.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:a,children:[(0,Ia.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,Ia.jsx)(yve,{blockPatterns:n,onChoosePattern:a})}),(0,Ia.jsx)(Ru.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,Ia.jsx)(Ru.FlexItem,{children:(0,Ia.jsx)(Ru.CheckboxControl,{checked:t,label:(0,c6.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function nj(){let[e,t]=(0,xf.useState)(!1),{isEditedPostDirty:r,isEditedPostEmpty:o}=(0,Kl.useSelect)(w),{isModalActive:n}=(0,Kl.useSelect)(Ce),{enabled:i,postId:a}=(0,Kl.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(w),d=l(u6.store).get("core","enableChoosePatternModal"),f=u();return{postId:c(),enabled:d&&ur!==f&&xt!==f&&Ur!==f}},[]);return(0,xf.useEffect)(()=>{let l=!r()&&o(),c=n("editor/preferences");!i||!l||c||t(!0)},[i,a,r,o,n]),e?(0,Ia.jsx)(bve,{onClose:()=>t(!1)}):null}var hj=s(A(),1),Na=s(E(),1),Yw=s(Oi(),1),cb=s(O(),1);var ss=s(E(),1),sj=[{keyCombination:{modifier:"primary",character:"b"},description:(0,ss.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,ss.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,ss.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,ss.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,ss.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,ss.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,ss.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,ss.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,ss.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,ss.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,ss.__)("Add non breaking space.")}];var cj=s(D(),1),Hw=s(yo(),1),as=s(C(),1);function lj({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?Hw.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?Hw.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,as.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||o,children:(Array.isArray(r)?r:[r]).map((n,i)=>n==="+"?(0,as.jsx)(cj.Fragment,{children:n},i):(0,as.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function Sve({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,as.jsxs)(as.Fragment,{children:[(0,as.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,as.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,as.jsx)(lj,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,as.jsx)(lj,{keyCombination:n,forceAriaLabel:o},i))]})]})}var Gw=Sve;var uj=s(O(),1),dj=s(Oi(),1);var fj=s(C(),1);function _ve({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,uj.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:a,getShortcutAliases:l}=n(dj.store);return{keyCombination:i(e),aliases:l(e),description:a(e)}},[e]);return t?(0,fj.jsx)(Gw,{keyCombination:t,description:r,aliases:o}):null}var mj=_ve;var Mo=s(C(),1),pj="editor/keyboard-shortcut-help",wve=({shortcuts:e})=>(0,Mo.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,r)=>(0,Mo.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,Mo.jsx)(mj,{name:t}):(0,Mo.jsx)(Gw,{...t})},r))}),d6=({title:e,shortcuts:t,className:r})=>(0,Mo.jsxs)("section",{className:re("editor-keyboard-shortcut-help-modal__section",r),children:[!!e&&(0,Mo.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,Mo.jsx)(wve,{shortcuts:t})]}),Ww=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,cb.useSelect)(n=>n(Yw.store).getCategoryShortcuts(t),[t]);return(0,Mo.jsx)(d6,{title:e,shortcuts:o.concat(r)})};function xve(){let e=(0,cb.useSelect)(n=>n(Ce).isModalActive(pj),[]),{openModal:t,closeModal:r}=(0,cb.useDispatch)(Ce),o=()=>{e?r():t(pj)};return(0,Yw.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,Mo.jsxs)(hj.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,Na.__)("Keyboard shortcuts"),closeButtonLabel:(0,Na.__)("Close"),onRequestClose:o,children:[(0,Mo.jsx)(d6,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("Global shortcuts"),categoryName:"global"}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("Selection shortcuts"),categoryName:"selection"}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,Na.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,Na.__)("Forward-slash")}]}),(0,Mo.jsx)(d6,{title:(0,Na.__)("Text formatting"),shortcuts:sj}),(0,Mo.jsx)(Ww,{title:(0,Na.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var f6=xve;var Au=s(A(),1),ub=s(E(),1),Zp=s(D(),1),gj=s($(),1),db=s(O(),1),m6=s(Xe(),1),Cf=s(W(),1);var Fa=s(C(),1);function Cve(e,t=!1){return(0,db.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(Cf.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",xt,i)?.content?.raw:void 0},[e,t])}function Tve(e){let{slug:t,patterns:r}=(0,db.useSelect)(i=>{let{getCurrentPostType:a,getCurrentPostId:l}=i(w),{getEntityRecord:c,getBlockPatterns:u}=i(Cf.store),d=l(),f=a();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,db.useSelect)(i=>i(Cf.store).getCurrentTheme().stylesheet);function n(i){return i.innerBlocks.find(a=>a.name==="core/template-part")&&(i.innerBlocks=i.innerBlocks.map(a=>(a.name==="core/template-part"&&a.attributes.theme===void 0&&(a.attributes.theme=o),a))),i.name==="core/template-part"&&i.attributes.theme===void 0&&(i.attributes.theme=o),i}return(0,Zp.useMemo)(()=>[{name:"fallback",blocks:(0,m6.parse)(e),title:(0,ub.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(a=>t.startsWith(a))).map(i=>({...i,blocks:(0,m6.parse)(i.content).map(a=>n(a))}))],[e,t,r])}function Pve({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,Cf.useEntityBlockEditor)("postType",r),n=Tve(e);return(0,Fa.jsx)(gj.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,a)=>{o(a,{selection:void 0}),t()}})}function kve({slug:e,isCustom:t,onClose:r,postType:o}){let n=Cve(e,t);return n?(0,Fa.jsxs)(Au.Modal,{className:"editor-start-template-options__modal",title:(0,ub.__)("Choose a pattern"),closeLabel:(0,ub.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,Fa.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,Fa.jsx)(Pve,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,Fa.jsx)(Au.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,Fa.jsx)(Au.FlexItem,{children:(0,Fa.jsx)(Au.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,ub.__)("Skip")})})})]}):null}function vj(){let[e,t]=(0,Zp.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:a}=(0,db.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(w),d=c(),f=u(),{getEditedEntityRecord:m,hasEditsForEntityRecord:h}=l(Cf.store),g=m("postType",d,f);return{shouldOpenModal:!h("postType",d,f)&&g.content===""&&xt===d,slug:g.slug,isCustom:g.is_custom,postType:d,postId:f}},[]);return(0,Zp.useEffect)(()=>{t(!1)},[i,a]),!r||e?null:(0,Fa.jsx)(kve,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var Ou=s(Oi(),1),Iu=s(O(),1);var yj=s($(),1);function Tf(){let e=(0,Iu.useSelect)(v=>{let{richEditingEnabled:y,codeEditingEnabled:b}=v(w).getEditorSettings();return!y||!b},[]),{getBlockSelectionStart:t}=(0,Iu.useSelect)(yj.store),{getActiveComplementaryArea:r}=(0,Iu.useSelect)(Ce),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,Iu.useDispatch)(Ce),{redo:i,undo:a,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,Iu.useDispatch)(w),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g}=(0,Iu.useSelect)(w);return(0,Ou.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,Ou.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,Ou.useShortcut)("core/editor/undo",v=>{a(),v.preventDefault()}),(0,Ou.useShortcut)("core/editor/redo",v=>{i(),v.preventDefault()}),(0,Ou.useShortcut)("core/editor/save",v=>{v.preventDefault(),!m()&&f()&&l()}),(0,Ou.useShortcut)("core/editor/toggle-list-view",v=>{h()||(v.preventDefault(),c(!0))}),(0,Ou.useShortcut)("core/editor/toggle-sidebar",v=>{if(v.preventDefault(),["edit-post/document","edit-post/block"].includes(r("core")))n("core");else{let b=t()?"edit-post/block":"edit-post/document";o("core",b)}}),null}var Rj=s(O(),1),Kw=s($(),1);var fb=s(O(),1),qw=s($(),1),bj=s(W(),1),Zw=s(A(),1),Da=s(E(),1),Sj=s(ft(),1),_j=s(D(),1),Pf=s(C(),1);function wj({clientId:e,onClose:t}){let[r,o]=(0,_j.useState)(!1),{getBlocks:n}=(0,fb.useSelect)(qw.store),{replaceBlocks:i}=(0,fb.useDispatch)(qw.store),{canRemove:a,templatePartTitle:l}=(0,fb.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(qw.store),{getEntityRecord:h,getCurrentTheme:g}=d(bj.store),v=m(e),{slug:y,theme:b}=v?.attributes??{},_=b||g()?.stylesheet,S=_&&y?`${_}//${y}`:null,x=S?h("postType","wp_template_part",S):null;return{canRemove:f(e),templatePartTitle:x?.title?.rendered?(0,Sj.decodeEntities)(x.title.rendered):null}},[e]);if(!a)return null;let c=l?(0,Da.sprintf)((0,Da.__)("Detach %s?"),l):(0,Da.__)("Detach template part?"),u=l?(0,Da.sprintf)((0,Da.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the %s template part will not apply here."),l):(0,Da.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the template part will not apply here.");return(0,Pf.jsxs)(Pf.Fragment,{children:[(0,Pf.jsx)(Zw.MenuItem,{onClick:()=>o(!0),children:(0,Da.__)("Detach")}),(0,Pf.jsx)(Zw.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,Da.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var mb=s(O(),1),p6=s($(),1),xj=s(A(),1),Cj=s(Xe(),1),h6=s(E(),1),Tj=s(D(),1),Pj=s(ct(),1);var kj=s(W(),1);var kf=s(C(),1);function Ej({clientIds:e,blocks:t}){let[r,o]=(0,Tj.useState)(!1),{replaceBlocks:n}=(0,mb.useDispatch)(p6.store),{createSuccessNotice:i}=(0,mb.useDispatch)(Pj.store),{isBlockBasedTheme:a,canCreate:l}=(0,mb.useSelect)(u=>({isBlockBasedTheme:u(kj.store).getCurrentTheme()?.is_block_theme,canCreate:u(p6.store).canInsertBlockType("core/template-part")}),[]);if(!a||!l)return null;let c=async u=>{n(e,(0,Cj.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,h6.__)("Template part created."),{type:"snackbar"})};return(0,kf.jsxs)(kf.Fragment,{children:[(0,kf.jsx)(xj.MenuItem,{icon:Wd,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,h6.__)("Create template part")}),r&&(0,kf.jsx)(Cp,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var pb=s(C(),1);function Aj(){return(0,pb.jsx)(Kw.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,pb.jsx)(Eve,{clientIds:e,onClose:t})})}function Eve({clientIds:e,onClose:t}){let{blocks:r}=(0,Rj.useSelect)(o=>{let{getBlocksByClientId:n}=o(Kw.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,pb.jsx)(wj,{clientId:e[0],onClose:t}):(0,pb.jsx)(Ej,{clientIds:e,blocks:r})}var Dt=s(C(),1),{ExperimentalBlockEditorProvider:Rve}=N(Xp.privateApis),{PatternsMenuItems:Ave}=N(Ij.privateApis),hb=()=>{},Ove=["wp_block","wp_navigation","wp_template_part"];function Ive(e,t,r){let o=w7(),n=r==="template-locked"?"template":"post",[i,a,l]=(0,Ys.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,Ys.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,Ii.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,Nj.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]},[e.type,e.id]),m=(0,Ii.useMemo)(()=>f||(n==="template"?c:i),[f,n,c,i]);return o!==null?[o,hb,hb]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,hb,hb]:[m,n==="post"?a:u,n==="post"?l:d]}var v6=$V(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=Rve,__unstableTemplate:a})=>{let l=!!a,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,Kp.useSelect)(H=>{let{getEditorSettings:X,getRenderingMode:ae,__unstableIsEditorReady:ne,getDefaultRenderingMode:ue,isRevisionsMode:Ye,getCurrentRevisionId:ye}=N(H(w)),{getEntitiesConfig:oe,getEntityRecordEdits:ge}=H(Ys.store),Re=ae(),ze=ue(e.type),Ve=ze==="template-locked"?l:ze!==void 0,tt=ze!==void 0,vt=ge("postType",e.type,e.id);return{editorSettings:X(),isReady:ne(),mode:tt?Re:void 0,defaultMode:Ve?ze:void 0,selection:vt?.selection,postTypeEntities:e.type==="wp_template"?oe("postType"):null,isInRevisionsMode:Ye(),currentRevisionId:ye()}},[e.type,e.id,l]),y=l&&f!=="post-only",b=y?a:e,_=(0,Ii.useMemo)(()=>{let H={};if(e.type==="wp_template"){if(e.slug==="page")H.postType="page";else if(e.slug==="single")H.postType="post";else if(e.slug.split("-")[0]==="single"){let X=h?.map(ne=>ne.name)||[],ae=e.slug.match(`^single-(${X.join("|")})(?:-.+)?$`);ae&&(H.postType=ae[1])}}else(!Ove.includes(b.type)||y)&&(H.postId=e.id,H.postType=e.type);return{...H,templateSlug:b.type==="wp_template"?b.slug:void 0}},[y,e.id,e.type,e.slug,b.type,b.slug,h]),{id:S,type:x}=b,T=J8(c,x,S,f),[R,F,B]=Ive(e,a,f),{updatePostLock:z,setupEditor:L,updateEditorSettings:M,setCurrentTemplateId:k,setEditedPost:I,setRenderingMode:U}=N((0,Kp.useDispatch)(w)),{editEntityRecord:G}=(0,Kp.useDispatch)(Ys.store),Y=(0,Ii.useCallback)(H=>{G("postType",e.type,e.id,{selection:H},{undoIgnore:!0})},[G,e.type,e.id]),{createWarningNotice:Z,removeNotice:V}=(0,Kp.useDispatch)(Oj.store);return(0,Ii.useLayoutEffect)(()=>{r||(z(t.postLock),L(e,o,t.template),t.autosave&&Z((0,g6.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,g6.__)("View the autosave"),url:t.autosave.editLink}]}))},[]),(0,Ii.useEffect)(()=>(I(e.type,e.id),typeof window<"u"&&window.__experimentalTemplateActivate&&V("template-activate-notice"),()=>I(null,null)),[e.type,e.id,I,V]),(0,Ii.useEffect)(()=>{M(t)},[t,M]),(0,Ii.useEffect)(()=>{k(a?.id)},[a?.id,k]),(0,Ii.useEffect)(()=>{m&&U(m)},[m,U]),s7(e.type,f),G9(),K9(),!d||!f?null:e.type===ur&&window?.__experimentalMediaEditor?(0,Dt.jsx)(Ys.EntityProvider,{kind:"root",type:"site",children:(0,Dt.jsxs)(Ys.EntityProvider,{kind:"postType",type:e.type,id:e.id,children:[n,!t.isPreviewMode&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Tf,{}),(0,Dt.jsx)(f6,{})]})]})}):(0,Dt.jsx)(Ys.EntityProvider,{kind:"root",type:"site",children:(0,Dt.jsx)(Ys.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Dt.jsx)(Xp.BlockContextProvider,{value:_,children:(0,Dt.jsxs)(i,{value:R,onChange:B,onInput:F,selection:g?void 0:u,onChangeSelection:g?hb:Y,settings:T,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(Ave,{}),(0,Dt.jsx)(Aj,{}),f==="template-locked"&&(0,Dt.jsx)(t7,{}),x==="wp_navigation"&&(0,Dt.jsx)(o7,{}),(0,Dt.jsx)(Tf,{}),(0,Dt.jsx)(f6,{}),(0,Dt.jsx)(tj,{}),(0,Dt.jsx)(nj,{}),(0,Dt.jsx)(vj,{}),(0,Dt.jsx)(M9,{}),(0,Dt.jsx)(z9,{})]})]})})})})});function y6(e){return(0,Dt.jsx)(v6,{...e,BlockEditorProviderComponent:Xp.BlockEditorProvider,children:e.children})}var Fj=y6;var xG=s(W(),1),CG=s(O(),1),J6=s(D(),1);var bh=s(A(),1),Ux=s(Xe(),1),hG=s(O(),1),gG=s($(),1),Uu=s(D(),1),q6=s(he(),1);var b6=s(D(),1);var Dj=s(D(),1),Br=(0,Dj.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var Bj=s(C(),1);function gb({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,b6.useMemo)(()=>go(r,t),[r,t]),a=(0,b6.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,Bj.jsx)(Br.Provider,{value:a,children:e})}var mr=s(A(),1),If=s(E(),1);var nz=s(O(),1),iz=s(W(),1);var Mj=s(C(),1);function vb({className:e,...t}){return(0,Mj.jsx)(No,{className:re(e,"global-styles-ui-icon-with-current-color"),...t})}var Nu=s(A(),1);var Ef=s(C(),1);function Nve({icon:e,children:t,...r}){return(0,Ef.jsxs)(Nu.__experimentalItem,{...r,children:[e&&(0,Ef.jsxs)(Nu.__experimentalHStack,{justify:"flex-start",children:[(0,Ef.jsx)(vb,{icon:e,size:24}),(0,Ef.jsx)(Nu.FlexItem,{children:t})]}),!e&&t]})}function fr(e){return(0,Ef.jsx)(Nu.Navigator.Button,{as:Nve,...e})}var Wj=s(A(),1);var Rf=s(E(),1),Yj=s($(),1);var S6=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},_6=function(e){return .2126*S6(e.r)+.7152*S6(e.g)+.0722*S6(e.b)};function Xw(e){e.prototype.luminance=function(){return t=_6(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*t)/o+0;var t,r,o},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var r,o,n,i,a,l,c,u=t instanceof e?t:new e(t);return i=this.rgba,a=u.toRgb(),l=_6(i),c=_6(a),r=l>c?(l+.05)/(c+.05):(c+.05)/(l+.05),(o=2)===void 0&&(o=0),n===void 0&&(n=Math.pow(10,o)),Math.floor(n*r)/n+0},e.prototype.isReadable=function(t,r){return t===void 0&&(t="#FFF"),r===void 0&&(r={}),this.contrast(t)>=(l=(a=(o=r).size)===void 0?"normal":a,(i=(n=o.level)===void 0?"AA":n)==="AAA"&&l==="normal"?7:i==="AA"&&l==="large"?3:4.5);var o,n,i,a,l}}var ls=s(D(),1),zj=s(O(),1),Uj=s(W(),1),x6=s(E(),1);function w6(e,t){if(!t?.length||typeof e!="object"||!e||!Object.keys(e).length)return e;for(let r in e)t.includes(r)?delete e[r]:typeof e[r]=="object"&&w6(e[r],t);return e}var Qw=(e,t)=>{if(!e||!t?.length)return{};let r={};return Object.keys(e).forEach(o=>{if(t.includes(o))r[o]=e[o];else if(typeof e[o]=="object"){let n=Qw(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function yb(e,t){let r=Qw(structuredClone(e),t);return pf(r,e)}function Lj(e,t){if(!Array.isArray(e)||!t)return null;let o=t.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return e.find(n=>n.slug===o)}function Vj(e){let t=e?.settings?.typography?.fontFamilies?.theme,r=e?.settings?.typography?.fontFamilies?.custom,o=[];t&&r?o=[...t,...r]:t?o=t:r&&(o=r);let n=e?.styles?.typography?.fontFamily,i=Lj(o,n),a=e?.styles?.elements?.heading?.typography?.fontFamily,l;return a?l=Lj(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function jj(e){return e?`is-style-${e}`:""}function Jw(e,t){let r=new RegExp(`^${t}([\\d]+)$`);return e.reduce((n,i)=>{if(typeof i?.slug=="string"){let a=i?.slug.match(r);if(a){let l=parseInt(a[1],10);if(l>n)return l}}return n},0)+1}uw([Xw]);function Ee(e,t,r="merged",o=!0){let{user:n,base:i,merged:a,onChange:l}=(0,ls.useContext)(Br),c=a;r==="base"?c=i:r==="user"&&(c=n);let u=(0,ls.useMemo)(()=>Fy(c,e,t,o),[c,e,t,o]),d=(0,ls.useCallback)(f=>{let m=Dy(n,e,f,t);l(m)},[n,l,e,t]);return[u,d]}function pe(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:a}=(0,ls.useContext)(Br),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,ls.useMemo)(()=>mf(l,e,t),[l,e,t]),u=(0,ls.useCallback)(d=>{let f=Oy(o,e,d,t);a(f)},[o,a,e,t]);return[c,u]}var Fve=[];function Dve({title:e,settings:t,styles:r}){return e===(0,x6.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function $w(e=[]){let{variationsFromTheme:t}=(0,zj.useSelect)(o=>({variationsFromTheme:o(Uj.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||Fve}),[]),{user:r}=(0,ls.useContext)(Br);return(0,ls.useMemo)(()=>{let o=structuredClone(r),n=w6(o,e);n.title=(0,x6.__)("Default");let i=t.filter(l=>yb(l,e)).map(l=>go(n,l)),a=[n,...i];return a?.length?a.filter(Dve):[]},[e,r,t])}function Hj(e){let[t,r]=pe("color.palette.theme",e),o=(0,ls.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(a=>{let{color:l}=a,c=xr(l).rotate(n).toHex();return{...a,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var Gj=s(qv(),1),{lock:V8e,unlock:rt}=(0,Gj.__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/global-styles-ui");var qs=s(C(),1),{useHasDimensionsPanel:Bve,useHasTypographyPanel:Mve,useHasColorPanel:Lve,useSettingsForBlockElement:Vve,useHasBackgroundPanel:jve}=rt(Yj.privateApis);function zve(){let[e]=pe(""),t=Vve(e),r=jve(e),o=Mve(t),n=Lve(t),i=!0,l=Bve(t);return(0,qs.jsx)(qs.Fragment,{children:(0,qs.jsxs)(Wj.__experimentalItemGroup,{children:[o&&(0,qs.jsx)(fr,{icon:JA,path:"/typography",children:(0,Rf.__)("Typography")}),n&&(0,qs.jsx)(fr,{icon:MR,path:"/colors",children:(0,Rf.__)("Colors")}),r&&(0,qs.jsx)(fr,{icon:pR,path:"/background","aria-label":(0,Rf.__)("Background styles"),children:(0,Rf.__)("Background")}),i&&(0,qs.jsx)(fr,{icon:Hv,path:"/shadows",children:(0,Rf.__)("Shadows")}),l&&(0,qs.jsx)(fr,{icon:Bs,path:"/layout",children:(0,Rf.__)("Layout")})]})})}var qj=zve;var Ba=s(A(),1);function Qp(){let[e="black"]=Ee("color.text"),[t="white"]=Ee("color.background"),[r=e]=Ee("elements.h1.color.text"),[o=r]=Ee("elements.link.color.text"),[n=o]=Ee("elements.button.color.background"),[i]=pe("color.palette.core")||[],[a]=pe("color.palette.theme")||[],[l]=pe("color.palette.custom")||[],c=(a??[]).concat(l??[]).concat(i??[]),u=c.filter(({color:m})=>m===e),d=c.filter(({color:m})=>m===n),f=u.concat(d).concat(c).filter(({color:m})=>m!==t).slice(0,2);return{paletteColors:c,highlightedColors:f}}var Xj=s(D(),1),Qj=s(A(),1),T6=s(E(),1);function Uve(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function Hve(e){let t=[];return e.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let n=parseInt(o[0]),i=parseInt(o[1]);for(let a=n;a<=i;a+=100)t.push(a)}else o.length===1&&t.push(parseInt(o[0]))}),t}function Zj(e){let t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=e.trim(),o=n=>(n=n.trim(),n.match(t)?(n=n.replace(/^["']|["']$/g,""),`"${n}"`):n);return r.includes(",")?r.split(",").map(o).filter(n=>n!=="").join(", "):o(r)}function C6(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=(t.split(",").find(r=>r.trim()!=="")??"").trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Af(e){let t={fontFamily:Zj(e.fontFamily)};if(!("fontFace"in e)||!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){let r=e.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){t.fontStyle="normal";let o=Hve(r),n=Uve(400,o);t.fontWeight=String(n)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}return t}function Kj(e){return{fontFamily:Zj(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var bb=s(C(),1);function ex({fontSize:e,variation:t}){let{base:r}=(0,Xj.useContext)(Br),o=r;t&&(o={...r,...t});let[n]=Ee("color.text"),[i,a]=Vj(o),l=i?Af(i):{},c=a?Af(a):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,bb.jsxs)(Qj.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,bb.jsx)("span",{style:c,children:(0,T6._x)("A","Uppercase letter A")}),(0,bb.jsx)("span",{style:l,children:(0,T6._x)("a","Lowercase letter A")})]})}var Jj=s(A(),1);var $j=s(C(),1);function ez({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=Qp(),o=e*t;return r.map(({slug:n,color:i},a)=>(0,$j.jsx)(Jj.__unstableMotion.div,{style:{height:o,width:o,background:i,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:a===1?.2:.1}},`${n}-${a}`))}var oz=s(A(),1),Jp=s(he(),1),Of=s(D(),1);var Fu=s(C(),1),tz=248,rz=152,Gve={leading:!0,trailing:!0};function Wve({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=Ee("color.background"),[i]=Ee("color.gradient"),a=(0,Jp.useReducedMotion)(),[l,c]=(0,Of.useState)(!1),[u,{width:d}]=(0,Jp.useResizeObserver)(),[f,m]=(0,Of.useState)(d),[h,g]=(0,Of.useState)(),v=(0,Jp.useThrottle)(m,250,Gve);(0,Of.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,Of.useLayoutEffect)(()=>{let S=f?f/tz:1,x=S-(h||0);(Math.abs(x)>.1||!h)&&g(S)},[f,h]);let y=d?d/tz:1,b=h||y;return(0,Fu.jsxs)(Fu.Fragment,{children:[(0,Fu.jsx)("div",{style:{position:"relative"},children:u}),!!d&&(0,Fu.jsx)("div",{className:"global-styles-ui-preview__wrapper",style:{height:rz*b},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,Fu.jsx)(oz.__unstableMotion.div,{style:{height:rz*b,width:"100%",background:i??n,cursor:o?"pointer":void 0},initial:"start",animate:(l||r)&&!a&&t?"hover":"start",children:[].concat(e).map((S,x)=>S({ratio:b,key:x}))})})]})}var $p=Wve;var ri=s(C(),1),Yve={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},qve={hover:{opacity:1},start:{opacity:.5}},Zve={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function Kve({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=Ee("typography.fontWeight"),[i="serif"]=Ee("typography.fontFamily"),[a=i]=Ee("elements.h1.typography.fontFamily"),[l=n]=Ee("elements.h1.typography.fontWeight"),[c="black"]=Ee("color.text"),[u=c]=Ee("elements.h1.color.text"),{paletteColors:d}=Qp();return(0,ri.jsxs)($p,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,ri.jsx)(Ba.__unstableMotion.div,{variants:Yve,style:{height:"100%",overflow:"hidden"},children:(0,ri.jsxs)(Ba.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,ri.jsx)(ex,{fontSize:65*f,variation:o}),(0,ri.jsx)(Ba.__experimentalVStack,{spacing:4*f,children:(0,ri.jsx)(ez,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,ri.jsx)(Ba.__unstableMotion.div,{variants:r?qve:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,ri.jsx)(Ba.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,ri.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,ri.jsx)(Ba.__unstableMotion.div,{variants:Zve,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,ri.jsx)(Ba.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,ri.jsx)("div",{style:{fontSize:40*f,fontFamily:a,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var tx=Kve;var Cr=s(C(),1);function Xve(){let e=(0,nz.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(iz.store);return!!r()?.length},[]);return(0,Cr.jsxs)(mr.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,Cr.jsx)(mr.CardBody,{children:(0,Cr.jsxs)(mr.__experimentalVStack,{spacing:4,children:[(0,Cr.jsx)(mr.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,Cr.jsx)(mr.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,Cr.jsx)(tx,{})})}),e&&(0,Cr.jsx)(mr.__experimentalItemGroup,{children:(0,Cr.jsx)(fr,{path:"/variations",children:(0,Cr.jsxs)(mr.__experimentalHStack,{justify:"space-between",children:[(0,Cr.jsx)(mr.FlexItem,{children:(0,If.__)("Browse styles")}),(0,Cr.jsx)(vb,{icon:(0,If.isRTL)()?Nt:Ft})]})})}),(0,Cr.jsx)(qj,{})]})}),(0,Cr.jsx)(mr.CardDivider,{}),(0,Cr.jsxs)(mr.CardBody,{children:[(0,Cr.jsx)(mr.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,If.__)("Customize the appearance of specific blocks for the whole site.")}),(0,Cr.jsx)(mr.__experimentalItemGroup,{children:(0,Cr.jsx)(fr,{path:"/blocks",children:(0,Cr.jsxs)(mr.__experimentalHStack,{justify:"space-between",children:[(0,Cr.jsx)(mr.FlexItem,{children:(0,If.__)("Blocks")}),(0,Cr.jsx)(vb,{icon:(0,If.isRTL)()?Nt:Ft})]})})})]})]})}var sz=Xve;var k6=s(Xe(),1),Ma=s(E(),1),Du=s(A(),1),E6=s(O(),1),La=s(D(),1),ox=s($(),1),dz=s(he(),1),fz=s(Xm(),1);var az=s(Xe(),1),lz=s(O(),1),cz=s(A(),1);var P6=s(C(),1);function Qve(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function Sb(e){let t=(0,lz.useSelect)(n=>{let{getBlockStyles:i}=n(az.store);return i(e)},[e]),[r]=Ee("variations",e),o=Object.keys(r??{});return Qve(t,o)}function uz({name:e}){let t=Sb(e);return(0,P6.jsx)(cz.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,P6.jsx)(fr,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var rn=s(A(),1),rx=s(E(),1);var Zs=s(C(),1);function St({title:e,description:t,onBack:r}){return(0,Zs.jsx)(rn.__experimentalVStack,{spacing:0,children:(0,Zs.jsx)(rn.__experimentalView,{children:(0,Zs.jsx)(rn.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Zs.jsxs)(rn.__experimentalVStack,{spacing:2,children:[(0,Zs.jsxs)(rn.__experimentalHStack,{spacing:2,children:[(0,Zs.jsx)(rn.Navigator.BackButton,{icon:(0,rx.isRTL)()?Ft:Nt,size:"small",label:(0,rx.__)("Back"),onClick:r}),(0,Zs.jsx)(rn.__experimentalSpacer,{children:(0,Zs.jsx)(rn.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e})})]}),t&&(0,Zs.jsx)(rn.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var Nn=s(C(),1),{useHasDimensionsPanel:Jve,useHasTypographyPanel:$ve,useHasBorderPanel:eye,useSettingsForBlockElement:tye,useHasColorPanel:rye}=rt(ox.privateApis);function oye(){let e=(0,E6.useSelect)(n=>n(k6.store).getBlockTypes(),[]),t=(n,i)=>{let{core:a,noncore:l}=n;return(i.name.startsWith("core/")?a:l).push(i),n},{core:r,noncore:o}=e.reduce(t,{core:[],noncore:[]});return[...r,...o]}function nye(e){let[t]=pe("",e),r=tye(t,e),o=$ve(r),n=rye(r),i=eye(r),a=Jve(r),l=i||a,c=!!Sb(e)?.length;return o||n||l||c}function iye({block:e}){return nye(e.name)?(0,Nn.jsx)(fr,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Nn.jsxs)(Du.__experimentalHStack,{justify:"flex-start",children:[(0,Nn.jsx)(ox.BlockIcon,{icon:e.icon}),(0,Nn.jsx)(Du.FlexItem,{children:e.title})]})}):null}function sye({filterValue:e}){let t=oye(),r=(0,dz.useDebounce)(fz.speak,500),{isMatchingSearchTerm:o}=(0,E6.useSelect)(k6.store),n=e?t.filter(a=>o(a,e)):t,i=(0,La.useRef)(null);return(0,La.useEffect)(()=>{if(!e)return;let a=i.current?.childElementCount||0,l=(0,Ma.sprintf)((0,Ma._n)("%d result found.","%d results found.",a),a);r(l,"polite")},[e,r]),(0,Nn.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,Nn.jsx)(Du.__experimentalText,{align:"center",as:"p",children:(0,Ma.__)("No blocks found.")}):n.map(a=>(0,Nn.jsx)(iye,{block:a},"menu-itemblock-"+a.name))})}var aye=(0,La.memo)(sye);function lye(){let[e,t]=(0,La.useState)(""),r=(0,La.useDeferredValue)(e);return(0,Nn.jsxs)(Nn.Fragment,{children:[(0,Nn.jsx)(St,{title:(0,Ma.__)("Blocks"),description:(0,Ma.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,Nn.jsx)(Du.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,Ma.__)("Search"),placeholder:(0,Ma.__)("Search")}),(0,Nn.jsx)(aye,{filterValue:r})]})}var mz=lye;var Sz=s(Xe(),1),_z=s($(),1),eh=s(D(),1),wz=s(O(),1),xz=s(W(),1),Nf=s(A(),1),th=s(E(),1);var pz=s($(),1),ix=s(Xe(),1),hz=s(A(),1),gz=s(D(),1);var nx=s(C(),1),cye=({name:e,variation:t=""})=>{let r=(0,ix.getBlockType)(e)?.example,o=(0,gz.useMemo)(()=>{if(!r)return null;let u={...r,attributes:{...r.attributes,style:void 0,className:t?jj(t):r.attributes?.className}};return(0,ix.getBlockFromExample)(e,u)},[e,r,t]),n=r?.viewportWidth??500,i=144,l=235/n,c=l!==0&&l<1&&i?i/l:i;return r?(0,nx.jsx)(hz.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,nx.jsx)("div",{className:"global-styles-ui__block-preview-panel",style:{maxHeight:i,boxSizing:"initial"},children:(0,nx.jsx)(pz.BlockPreview,{blocks:o,viewportWidth:n,minHeight:i,additionalStyles:[{css:`
								body{
									padding: 24px;
									min-height:${Math.round(c)}px;
									display:flex;
									align-items:center;
								}
								.is-root-container { width: 100%; }
							`}]})})}):null},vz=cye;var yz=s(A(),1),bz=s(C(),1);function Tr({children:e,level:t=2}){return(0,bz.jsx)(yz.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var Yr=s(C(),1),uye={backgroundSize:"cover",backgroundPosition:"50% 50%"};function _b(e){if(!e)return e;let t=e.color||e.width;if(!e.style&&t)return{...e,style:"solid"};if(!(e.style&&!t))return e}function dye(e){return e&&((0,Nf.__experimentalHasSplitBorders)(e)?{top:_b(e.top),right:_b(e.right),bottom:_b(e.bottom),left:_b(e.left)}:_b(e))}var{useHasDimensionsPanel:fye,useHasTypographyPanel:mye,useHasBorderPanel:pye,useSettingsForBlockElement:hye,useHasColorPanel:gye,useHasFiltersPanel:vye,useHasImageSettingsPanel:yye,useHasBackgroundPanel:bye,BackgroundPanel:Sye,BorderPanel:_ye,ColorPanel:wye,TypographyPanel:xye,DimensionsPanel:Cye,FiltersPanel:Tye,ImageSettingsPanel:Pye,AdvancedPanel:kye}=rt(_z.privateApis);function Eye({name:e,variation:t}){let{user:r,onChange:o}=(0,eh.useContext)(Br),n=[];t&&(n=["variations",t].concat(n));let i=n.join("."),[a]=Ee(i,e,"user",!1),[l,c]=Ee(i,e,"merged",!1),[u]=pe("",e,"user"),[d,f]=pe("",e),m=hye(d,e),h=(0,Sz.getBlockType)(e),g=!1;m?.spacing?.blockGap&&h?.supports?.spacing?.blockGap&&(h?.supports?.spacing?.__experimentalSkipSerialization===!0||h?.supports?.spacing?.__experimentalSkipSerialization?.some?.(V=>V==="blockGap"))&&(g=!0);let v=!1;m?.dimensions?.aspectRatio&&e==="core/group"&&(v=!0);let y=(0,eh.useMemo)(()=>{let V=structuredClone(m);return g&&(V.spacing.blockGap=!1),v&&(V.dimensions.aspectRatio=!1),V},[m,g,v]),b=Sb(e),_=bye(y),S=mye(y),x=gye(y),T=pye(y),R=fye(y),F=vye(y),B=yye(e,u,y),z=!!b?.length&&!t,{canEditCSS:L}=(0,wz.useSelect)(V=>{let{getEntityRecord:j,__experimentalGetCurrentGlobalStylesId:H}=V(xz.store),X=H();return{canEditCSS:!!(X?j("root","globalStyles",X):void 0)?._links?.["wp:action-edit-css"]}},[]),M=t?b.find(V=>V.name===t):null,k=(0,eh.useMemo)(()=>({...l,layout:y.layout}),[l,y.layout]),I=(0,eh.useMemo)(()=>({...a,layout:u.layout}),[a,u.layout]),U=V=>{let j={...V};delete j.layout,c(j),V.layout!==u.layout&&f({...u,layout:V.layout})},G=V=>{f(V===void 0?{...d,lightbox:void 0}:{...d,lightbox:{...d.lightbox,...V}})},Y=V=>{let{settings:j,...H}=V;if(j?.typography){let X=Dy(r,i,H,e);X=Oy(X,"typography",{...u.typography,...j.typography},e),o(X)}else c(H)},Z=V=>{if(!V?.border){c(V);return}let{radius:j,...H}=V.border,X=dye(H),ae=(0,Nf.__experimentalHasSplitBorders)(X)?{color:null,style:null,width:null,...X}:{top:X,right:X,bottom:X,left:X};c({...V,border:{...ae,radius:j}})};return(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)(St,{title:t?M?.label:h?.title}),(0,Yr.jsx)(vz,{name:e,variation:t}),z&&(0,Yr.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,Yr.jsxs)(Nf.__experimentalVStack,{spacing:3,children:[(0,Yr.jsx)(Tr,{children:(0,th.__)("Style Variations")}),(0,Yr.jsx)(uz,{name:e})]})}),x&&(0,Yr.jsx)(wye,{inheritedValue:l,value:a,onChange:c,settings:y}),_&&(0,Yr.jsx)(Sye,{inheritedValue:l,value:a,onChange:c,settings:y,defaultValues:uye}),S&&(0,Yr.jsx)(xye,{inheritedValue:l,value:a,onChange:Y,settings:y,isGlobalStyles:!0}),R&&(0,Yr.jsx)(Cye,{inheritedValue:k,value:I,onChange:U,settings:y,includeLayoutControls:!0}),T&&(0,Yr.jsx)(_ye,{inheritedValue:l,value:a,onChange:Z,settings:y}),F&&(0,Yr.jsx)(Tye,{inheritedValue:k,value:I,onChange:c,settings:y,includeLayoutControls:!0}),B&&(0,Yr.jsx)(Pye,{onChange:G,value:u,inheritedValue:y}),L&&(0,Yr.jsx)(Nf.PanelBody,{title:(0,th.__)("Advanced"),initialOpen:!1,children:(0,Yr.jsx)(kye,{value:a,onChange:c,inheritedValue:l,help:(0,th.sprintf)((0,th.__)("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."),h?.title)})})]})}var R6=Eye;var Ax=s(E(),1),MU=s(A(),1),LU=s(D(),1);var Cz=s(A(),1);var Tz=s(C(),1);function Bu({children:e,className:t}){return(0,Tz.jsx)(Cz.__experimentalSpacer,{className:re("global-styles-ui-screen-body",t),padding:4,children:e})}var Mu=s(E(),1),Xl=s(A(),1);var oi=s(C(),1);function wb({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=Ee(o+"typography.fontFamily"),[a]=Ee(o+"typography.fontStyle"),[l]=Ee(o+"typography.fontWeight"),[c]=Ee(o+"color.background"),[u]=Ee("color.background"),[d]=Ee(o+"color.gradient"),[f]=Ee(o+"color.text");return(0,oi.jsx)(fr,{path:e+"/typography/"+t,children:(0,oi.jsxs)(Xl.__experimentalHStack,{justify:"flex-start",children:[(0,oi.jsx)(Xl.FlexItem,{className:"global-styles-ui-screen-typography__indicator","aria-hidden":"true",style:{fontFamily:i??"serif",background:d??c??u,color:f,fontStyle:a,fontWeight:l,...n},children:(0,Mu.__)("Aa")}),(0,oi.jsx)(Xl.FlexItem,{children:r})]})})}function Rye(){return(0,oi.jsxs)(Xl.__experimentalVStack,{spacing:3,children:[(0,oi.jsx)(Tr,{level:3,children:(0,Mu.__)("Elements")}),(0,oi.jsxs)(Xl.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,oi.jsx)(wb,{parentMenu:"",element:"text",label:(0,Mu.__)("Text")}),(0,oi.jsx)(wb,{parentMenu:"",element:"link",label:(0,Mu.__)("Links")}),(0,oi.jsx)(wb,{parentMenu:"",element:"heading",label:(0,Mu.__)("Headings")}),(0,oi.jsx)(wb,{parentMenu:"",element:"caption",label:(0,Mu.__)("Captions")}),(0,oi.jsx)(wb,{parentMenu:"",element:"button",label:(0,Mu.__)("Buttons")})]})]})}var Pz=Rye;var lx=s(A(),1);var kz=s(A(),1);var sx=s(C(),1),Aye=({variation:e,isFocused:t,withHoverView:r})=>(0,sx.jsx)($p,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,sx.jsx)(kz.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,sx.jsx)(ex,{variation:e,fontSize:85*o})},n)}),Ez=Aye;var Rz=s(A(),1),Ff=s(D(),1),Az=s(yo(),1),ax=s(E(),1);var xb=s(C(),1);function rh({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,a]=(0,Ff.useState)(!1),{base:l,user:c,onChange:u}=(0,Ff.useContext)(Br),d=(0,Ff.useMemo)(()=>{let y=go(l,e);return o&&(y=Qw(y,o)),{user:e,base:l,merged:y,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=y=>{y.keyCode===Az.ENTER&&(y.preventDefault(),f())},h=(0,Ff.useMemo)(()=>pf(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,ax.sprintf)((0,ax._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,xb.jsx)("div",{className:re("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:f,onKeyDown:m,tabIndex:0,"aria-label":g,"aria-current":h,onFocus:()=>a(!0),onBlur:()=>a(!1),children:(0,xb.jsx)("div",{className:re("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,xb.jsx)(Br.Provider,{value:d,children:n?(0,xb.jsx)(Rz.Tooltip,{text:e?.title,children:v}):v})}var Df=s(C(),1),Oz=["typography"];function oh({title:e,gap:t=2}){let r=$w(Oz);return r?.length<=1?null:(0,Df.jsxs)(lx.__experimentalVStack,{spacing:3,children:[e&&(0,Df.jsx)(Tr,{level:3,children:e}),(0,Df.jsx)(lx.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,Df.jsx)(rh,{variation:o,properties:Oz,showTooltip:!0,children:()=>(0,Df.jsx)(Ez,{variation:o})},n))})]})}var zf=s(E(),1),Xs=s(A(),1);var FU=s(D(),1);var Jl=s(D(),1),ju=s(O(),1),Vu=s(W(),1),N6=s(E(),1);var A6=s(Qm(),1),Iz=s(W(),1),Nz="/wp/v2/font-families";function Fz(e){let{receiveEntityRecords:t}=e.dispatch(Iz.store);t("postType","wp_font_family",[],void 0,!0)}async function Dz(e,t){let o=await(0,A6.default)({path:Nz,method:"POST",body:e});return Fz(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function Bz(e,t,r){let o={path:`${Nz}/${e}/font-faces`,method:"POST",body:t},n=await(0,A6.default)(o);return Fz(r),{id:n.id,...n.font_face_settings}}var Vz=s(A(),1);var cs=s(E(),1),O6=["otf","ttf","woff","woff2"],Mz={100:(0,cs._x)("Thin","font weight"),200:(0,cs._x)("Extra-light","font weight"),300:(0,cs._x)("Light","font weight"),400:(0,cs._x)("Normal","font weight"),500:(0,cs._x)("Medium","font weight"),600:(0,cs._x)("Semi-bold","font weight"),700:(0,cs._x)("Bold","font weight"),800:(0,cs._x)("Extra-bold","font weight"),900:(0,cs._x)("Black","font weight")},Lz={normal:(0,cs._x)("Normal","font style"),italic:(0,cs._x)("Italic","font style")};var{File:jz}=window,{kebabCase:Oye}=rt(Vz.privateApis);function Ql(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function Iye(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function cx(e){let t=Mz[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":Lz[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function Nye(e=[],t=[]){let r=new Map;for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function zz(e=[],t=[]){let r=new Map;for(let o of e)r.set(o.slug,{...o});for(let o of t)if(r.has(o.slug)){let{fontFace:n,...i}=o,a=r.get(o.slug),l=Nye(a.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function Lu(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof jz)o=await t.arrayBuffer();else return;let i=await new window.FontFace(C6(e.fontFamily),o,{style:e.fontStyle,weight:String(e.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(i),r==="iframe"||r==="all"){let a=document.querySelector('iframe[name="editor-canvas"]');a?.contentDocument&&a.contentDocument.fonts.add(i)}}function Cb(e,t="all"){let r=o=>{o.forEach(n=>{n.family===C6(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&o.delete(n)})};if((t==="document"||t==="all")&&r(document.fonts),t==="iframe"||t==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function nh(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return Iye(t)||(t=encodeURI(t)),t}function Uz(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:Oye(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function Hz(e){return(e?.fontFace??[]).map((r,o)=>{let n={...r},i=new FormData;if(n.file){let a=Array.isArray(n.file)?n.file:[n.file],l=[];a.forEach((c,u)=>{let d=`file-${o}-${u}`;i.append(d,c,c.name),l.push(d)}),n.src=l.length===1?l[0]:l,delete n.file,i.append("font_face_settings",JSON.stringify(n))}else i.append("font_face_settings",JSON.stringify(n));return i})}async function Gz(e,t,r){let o=[];for(let i of t)try{let a=await Bz(e,i,r);o.push({status:"fulfilled",value:a})}catch(a){o.push({status:"rejected",reason:a})}let n={errors:[],successes:[]};return o.forEach((i,a)=>{if(i.status==="fulfilled"&&i.value){let l=i.value;n.successes.push(l)}else i.reason&&n.errors.push({data:t[a],message:i.reason.message})}),n}async function Wz(e){e=Array.isArray(e)?e:[e];let t=await Promise.all(e.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let n=r.split("/").pop();return new jz([o],n,{type:o.type})})));return t.length===1?t[0]:t}function I6(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Yz(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let a=n[i];n=n[i]=Array.isArray(a)?[...a]:{...a}}return n[o]=r,e}function ux(e,t,r=[]){let o=c=>c.slug===e.slug,n=c=>c.find(o),i=c=>c?r.filter(u=>!o(u)):[...r,e],a=c=>{let u=f=>f.fontWeight===t.fontWeight&&f.fontStyle===t.fontStyle;if(!c)return[...r,{...e,fontFace:[t]}];let d=c.fontFace||[];return d.find(u)?d=d.filter(f=>!u(f)):d=[...d,t],d.length===0?r.filter(f=>!o(f)):r.map(f=>o(f)?{...f,fontFace:d}:f)},l=n(r);return t?a(l):i(l)}var qz=s(C(),1),Lo=(0,Jl.createContext)({});Lo.displayName="FontLibraryContext";function Fye({children:e}){let t=(0,ju.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,ju.useDispatch)(Vu.store),{globalStylesId:n}=(0,ju.useSelect)(j=>{let{__experimentalGetCurrentGlobalStylesId:H}=j(Vu.store);return{globalStylesId:H()}},[]),i=(0,Vu.useEntityRecord)("root","globalStyles",n),[a,l]=(0,Jl.useState)(!1),{records:c=[],isResolving:u}=(0,Vu.useEntityRecords)("postType","wp_font_family",{_embed:!0}),d=(c||[]).map(j=>({id:j.id,...j.font_family_settings||{},fontFace:j?._embedded?.font_faces?.map(H=>H.font_face_settings)||[]}))||[],[f,m]=pe("typography.fontFamilies"),h=async j=>{if(!i.record)return;let H=i.record,X=Yz(H??{},["settings","typography","fontFamilies"],j);await r("root","globalStyles",X)},[g,v]=(0,Jl.useState)(""),[y,b]=(0,Jl.useState)(void 0),_=f?.theme?f.theme.map(j=>Ql(j,{source:"theme"})).sort((j,H)=>j.name.localeCompare(H.name)):[],S=f?.custom?f.custom.map(j=>Ql(j,{source:"custom"})).sort((j,H)=>j.name.localeCompare(H.name)):[],x=d?d.map(j=>Ql(j,{source:"custom"})).sort((j,H)=>j.name.localeCompare(H.name)):[];(0,Jl.useEffect)(()=>{g||b(void 0)},[g]);let T=j=>{if(!j){b(void 0);return}let X=(j.source==="theme"?_:x).find(ae=>ae.slug===j.slug);b({...X||j,source:j.source})},[R]=(0,Jl.useState)(new Set),F=j=>j.reduce((X,ae)=>{let ne=ae?.fontFace&&ae.fontFace?.length>0?ae?.fontFace.map(ue=>`${ue.fontStyle??""}${ue.fontWeight??""}`):["normal400"];return X[ae.slug]=ne,X},{}),B=j=>F(j==="theme"?_:S),z=(j,H,X,ae)=>!H&&!X?!!B(ae)[j]:!!B(ae)[j]?.includes((H??"")+(X??"")),L=(j,H)=>B(H)[j]||[];async function M(j){l(!0);try{let H=[],X=[];for(let ne of j){let ue=!1,Ye=await(0,ju.resolveSelect)(Vu.store).getEntityRecords("postType","wp_font_family",{slug:ne.slug,per_page:1,_embed:!0}),ye=Ye&&Ye.length>0?Ye[0]:null,oe=ye?{id:ye.id,...ye.font_family_settings,fontFace:(ye?._embedded?.font_faces??[]).map(Ve=>Ve.font_face_settings)||[]}:null;oe||(ue=!0,oe=await Dz(Uz(ne),t));let ge=oe.fontFace&&ne.fontFace?oe.fontFace.filter(Ve=>Ve&&ne.fontFace&&I6(Ve,ne.fontFace)):[];oe.fontFace&&ne.fontFace&&(ne.fontFace=ne.fontFace.filter(Ve=>!I6(Ve,oe.fontFace)));let Re=[],ze=[];if(ne?.fontFace?.length??!1){let Ve=await Gz(oe.id,Hz(ne),t);Re=Ve?.successes,ze=Ve?.errors}(Re?.length>0||ge?.length>0)&&(oe.fontFace=[...Re],H.push(oe)),oe&&!ne?.fontFace?.length&&H.push(oe),ue&&(ne?.fontFace?.length??0)>0&&Re?.length===0&&await o("postType","wp_font_family",oe.id,{force:!0}),X=X.concat(ze)}let ae=X.reduce((ne,ue)=>ne.includes(ue.message)?ne:[...ne,ue.message],[]);if(H.length>0){let ne=U(H);await h(ne)}if(ae.length>0){let ne=new Error((0,N6.__)("There was an error installing fonts."));throw ne.installationErrors=ae,ne}}finally{l(!1)}}async function k(j){if(!j?.id)throw new Error((0,N6.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",j.id,{force:!0});let H=I(j);return await h(H),{deleted:!0}}catch(H){throw console.error("There was an error uninstalling the font family:",H),H}}let I=j=>{let X=(f?.[j.source??""]??[]).filter(ne=>ne.slug!==j.slug),ae={...f,[j.source??""]:X};return m(ae),j.fontFace&&j.fontFace.forEach(ne=>{Cb(ne,"all")}),ae},U=j=>{let H=G(j),X={...f,custom:zz(f?.custom,H)};return m(X),Y(H),X},G=j=>j.map(({id:H,fontFace:X,...ae})=>({...ae,...X&&X.length>0?{fontFace:X.map(({id:ne,...ue})=>ue)}:{}})),Y=j=>{j.forEach(H=>{H.fontFace&&H.fontFace.forEach(X=>{let ae=nh(X?.src??"");ae&&Lu(X,ae,"all")})})},Z=(j,H)=>{let X=f?.[j.source??""]??[],ae=ux(j,H,X);m({...f,[j.source??""]:ae});let ne=z(j.slug,H?.fontStyle??"",H?.fontWeight??"",j.source??"custom");if(H&&ne)Cb(H,"all");else{let ue=nh(H?.src??"");H&&ue&&Lu(H,ue,"all")}},V=async j=>{if(!j.src)return;let H=nh(j.src);!H||R.has(H)||(Lu(j,H,"document"),R.add(H))};return(0,qz.jsx)(Lo.Provider,{value:{libraryFontSelected:y,handleSetLibraryFontSelected:T,fontFamilies:f??{},baseCustomFonts:x,isFontActivated:z,getFontFacesActivated:L,loadFontFaceAsset:V,installFonts:M,uninstallFontFamily:k,toggleActivateFont:Z,getAvailableFontsOutline:F,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:a},children:e})}var dx=Fye;var lh=s(E(),1),kx=s(A(),1),Ex=s(W(),1),RU=s(O(),1);var Qe=s(A(),1),Pb=s(W(),1),F6=s(O(),1),Mf=s(D(),1),er=s(E(),1);var sh=s(E(),1),us=s(A(),1);var Zz=s(A(),1),Va=s(D(),1);var fx=s(C(),1);function Dye(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function Bye(e){return"fontStyle"in e&&e.fontStyle||"fontWeight"in e&&e.fontWeight?e:"fontFace"in e&&e.fontFace&&e.fontFace.length?e.fontFace.find(t=>t.fontStyle==="normal"&&t.fontWeight==="400")||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily}}function Mye({font:e,text:t}){let r=(0,Va.useRef)(null),o=Bye(e),n=Af(e);t=t||("name"in e?e.name:"");let i=e.preview,[a,l]=(0,Va.useState)(!1),[c,u]=(0,Va.useState)(!1),{loadFontFaceAsset:d}=(0,Va.useContext)(Lo),f=i??Dye(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=Kj(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,Va.useEffect)(()=>{let v=new window.IntersectionObserver(([y])=>{l(y.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,Va.useEffect)(()=>{(async()=>a&&(!m&&o.src&&await d(o),u(!0)))()},[o,a,d,m]),(0,fx.jsx)("div",{ref:r,children:m?(0,fx.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,fx.jsx)(Zz.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var ih=Mye;var ja=s(C(),1);function Lye({font:e,onClick:t,variantsText:r,navigatorPath:o}){let n=e.fontFace?.length||1,i={cursor:t?"pointer":"default"},a=(0,us.useNavigator)();return(0,ja.jsx)(us.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),o&&a.goTo(o)},style:i,className:"font-library__font-card",children:(0,ja.jsxs)(us.Flex,{justify:"space-between",wrap:!1,children:[(0,ja.jsx)(ih,{font:e}),(0,ja.jsxs)(us.Flex,{justify:"flex-end",children:[(0,ja.jsx)(us.FlexItem,{children:(0,ja.jsx)(us.__experimentalText,{className:"font-library__font-card__count",children:r||(0,sh.sprintf)((0,sh._n)("%d variant","%d variants",n),n)})}),(0,ja.jsx)(us.FlexItem,{children:(0,ja.jsx)(No,{icon:(0,sh.isRTL)()?Nt:Ft})})]})]})})}var Tb=Lye;var mx=s(D(),1),px=s(A(),1);var Bf=s(C(),1);function Vye({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,mx.useContext)(Lo),n=(t?.fontFace?.length??0)>0?r(t.slug,e.fontStyle,e.fontWeight,t.source):r(t.slug,void 0,void 0,t.source),i=()=>{if((t?.fontFace?.length??0)>0){o(t,e);return}o(t)},a=t.name+" "+cx(e),l=(0,mx.useId)();return(0,Bf.jsx)("div",{className:"font-library__font-card",children:(0,Bf.jsxs)(px.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Bf.jsx)(px.CheckboxControl,{checked:n,onChange:i,id:l}),(0,Bf.jsx)("label",{htmlFor:l,children:(0,Bf.jsx)(ih,{font:e,text:a,onClick:i})})]})})}var Kz=Vye;function Xz(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function hx(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?Xz(t.fontWeight?.toString()??"normal")-Xz(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var We=s(C(),1);function jye(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:a,getFontFacesActivated:l}=(0,Mf.useContext)(Lo),[c,u]=pe("typography.fontFamilies"),[d,f]=(0,Mf.useState)(!1),[m,h]=(0,Mf.useState)(null),[g]=pe("typography.fontFamilies",void 0,"base"),v=(0,F6.useSelect)(V=>{let{__experimentalGetCurrentGlobalStylesId:j}=V(Pb.store);return j()},[]),b=!!(0,Pb.useEntityRecord)("root","globalStyles",v)?.edits?.settings?.typography?.fontFamilies,_=c?.theme?c.theme.map(V=>Ql(V,{source:"theme"})).sort((V,j)=>V.name.localeCompare(j.name)):[],S=new Set(_.map(V=>V.slug)),x=g?.theme?_.concat(g.theme.filter(V=>!S.has(V.slug)).map(V=>Ql(V,{source:"theme"})).sort((V,j)=>V.name.localeCompare(j.name))):[],T=t?.source==="custom"&&t?.id,R=(0,F6.useSelect)(V=>{let{canUser:j}=V(Pb.store);return T&&j("delete",{kind:"postType",name:"wp_font_family",id:T})},[T]),F=!!t&&t?.source!=="theme"&&R,B=()=>{f(!0)},z=async()=>{h(null);try{await a(c),h({type:"success",message:(0,er.__)("Font family updated successfully.")})}catch(V){h({type:"error",message:(0,er.sprintf)((0,er.__)("There was an error updating the font family. %s"),V.message)})}},L=V=>V?!V.fontFace||!V.fontFace.length?[{fontFamily:V.fontFamily,fontStyle:"normal",fontWeight:"400"}]:hx(V.fontFace):[],M=V=>{let j=V?.fontFace&&(V?.fontFace?.length??0)>0?V.fontFace.length:1,H=l(V.slug,V.source).length;return(0,er.sprintf)((0,er.__)("%1$d/%2$d variants active"),H,j)};(0,Mf.useEffect)(()=>{r(t)},[]);let k=t?l(t.slug,t.source).length:0,I=t?.fontFace?.length??(t?.fontFamily?1:0),U=k>0&&k!==I,G=k===I,Y=()=>{if(!t||!t?.source)return;let V=c?.[t.source]?.filter(H=>H.slug!==t.slug)??[],j=G?V:[...V,t];u({...c,[t.source]:j}),t.fontFace&&t.fontFace.forEach(H=>{if(G)Cb(H,"all");else{let X=nh(H?.src??"");X&&Lu(H,X,"all")}})},Z=x.length>0||e.length>0;return(0,We.jsxs)("div",{className:"font-library__tabpanel-layout",children:[n&&(0,We.jsx)("div",{className:"font-library__loading",children:(0,We.jsx)(Qe.ProgressBar,{})}),!n&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(Qe.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,We.jsx)(Qe.Navigator.Screen,{path:"/",children:(0,We.jsxs)(Qe.__experimentalVStack,{spacing:"8",children:[m&&(0,We.jsx)(Qe.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),!Z&&(0,We.jsx)(Qe.__experimentalText,{as:"p",children:(0,er.__)("No fonts installed.")}),x.length>0&&(0,We.jsxs)(Qe.__experimentalVStack,{children:[(0,We.jsx)("h2",{className:"font-library__fonts-title",children:(0,er._x)("Theme","font source")}),(0,We.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:x.map(V=>(0,We.jsx)("li",{className:"font-library__fonts-list-item",children:(0,We.jsx)(Tb,{font:V,navigatorPath:"/fontFamily",variantsText:M(V),onClick:()=>{h(null),r(V)}})},V.slug))})]}),e.length>0&&(0,We.jsxs)(Qe.__experimentalVStack,{children:[(0,We.jsx)("h2",{className:"font-library__fonts-title",children:(0,er._x)("Custom","font source")}),(0,We.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e.map(V=>(0,We.jsx)("li",{className:"font-library__fonts-list-item",children:(0,We.jsx)(Tb,{font:V,navigatorPath:"/fontFamily",variantsText:M(V),onClick:()=>{h(null),r(V)}})},V.slug))})]})]})}),(0,We.jsxs)(Qe.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,We.jsx)(zye,{font:t,isOpen:d,setIsOpen:f,setNotice:h,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,We.jsxs)(Qe.Flex,{justify:"flex-start",children:[(0,We.jsx)(Qe.Navigator.BackButton,{icon:(0,er.isRTL)()?Ft:Nt,size:"small",onClick:()=>{r(void 0),h(null)},label:(0,er.__)("Back")}),(0,We.jsx)(Qe.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),m&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)(Qe.__experimentalSpacer,{margin:1}),(0,We.jsx)(Qe.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:1})]}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:4}),(0,We.jsx)(Qe.__experimentalText,{children:(0,er.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:4}),(0,We.jsxs)(Qe.__experimentalVStack,{spacing:0,children:[(0,We.jsx)(Qe.CheckboxControl,{className:"font-library__select-all",label:(0,er.__)("Select all"),checked:G,onChange:Y,indeterminate:U}),(0,We.jsx)(Qe.__experimentalSpacer,{margin:8}),(0,We.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&L(t).map((V,j)=>(0,We.jsx)("li",{className:"font-library__fonts-list-item",children:(0,We.jsx)(Kz,{font:t,face:V},`face${j}`)},`face${j}`))})]})]})]}),(0,We.jsxs)(Qe.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,We.jsx)(Qe.ProgressBar,{}),F&&(0,We.jsx)(Qe.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:B,children:(0,er.__)("Delete")}),(0,We.jsx)(Qe.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:z,disabled:!b,accessibleWhenDisabled:!0,children:(0,er.__)("Update")})]})]})]})}function zye({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let a=(0,Qe.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),a.goBack(),i(void 0),o({type:"success",message:(0,er.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,er.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,We.jsx)(Qe.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,er.__)("Cancel"),confirmButtonText:(0,er.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,er.sprintf)((0,er.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var gx=jye;var bo=s(D(),1),je=s(A(),1),nU=s(he(),1),Zt=s(E(),1);var iU=s(W(),1);function Qz(e,t){let{category:r,search:o}=t,n=e||[];return r&&r!=="all"&&(n=n.filter(i=>i.categories&&i.categories.indexOf(r)!==-1)),o&&(n=n.filter(i=>i.font_family_settings&&i.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),n}function Jz(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function $z(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var kb=s(E(),1),Fn=s(A(),1),ds=s(C(),1);function Uye(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,ds.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,ds.jsx)(Fn.Card,{children:(0,ds.jsxs)(Fn.CardBody,{children:[(0,ds.jsx)(Fn.__experimentalHeading,{level:2,children:(0,kb.__)("Connect to Google Fonts")}),(0,ds.jsx)(Fn.__experimentalSpacer,{margin:6}),(0,ds.jsx)(Fn.__experimentalText,{as:"p",children:(0,kb.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,ds.jsx)(Fn.__experimentalSpacer,{margin:3}),(0,ds.jsx)(Fn.__experimentalText,{as:"p",children:(0,kb.__)("You can alternatively upload files directly on the Upload tab.")}),(0,ds.jsx)(Fn.__experimentalSpacer,{margin:6}),(0,ds.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,kb.__)("Allow access to Google Fonts")})]})})})}var eU=Uye;var tU=s(D(),1),vx=s(A(),1);var Lf=s(C(),1);function Hye({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+cx(e),a=(0,tU.useId)();return(0,Lf.jsx)("div",{className:"font-library__font-card",children:(0,Lf.jsxs)(vx.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Lf.jsx)(vx.CheckboxControl,{checked:o,onChange:n,id:a}),(0,Lf.jsx)("label",{htmlFor:a,children:(0,Lf.jsx)(ih,{font:e,text:i,onClick:n})})]})})}var rU=Hye;var Ae=s(C(),1),Gye={slug:"all",name:(0,Zt._x)("All","font categories")},oU="wp-font-library-google-fonts-permission",Wye=500;function Yye({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(oU)==="true",[o,n]=(0,bo.useState)(null),[i,a]=(0,bo.useState)(null),[l,c]=(0,bo.useState)([]),[u,d]=(0,bo.useState)(1),[f,m]=(0,bo.useState)({}),[h,g]=(0,bo.useState)(t&&!r()),{installFonts:v,isInstalling:y}=(0,bo.useContext)(Lo),{record:b,isResolving:_}=(0,iU.useEntityRecord)("root","fontCollection",e);(0,bo.useEffect)(()=>{let oe=()=>{g(t&&!r())};return oe(),window.addEventListener("storage",oe),()=>window.removeEventListener("storage",oe)},[e,t]);let S=()=>{window.localStorage.setItem(oU,"false"),window.dispatchEvent(new Event("storage"))};(0,bo.useEffect)(()=>{n(null)},[e]),(0,bo.useEffect)(()=>{c([])},[o]);let x=(0,bo.useMemo)(()=>b?.font_families??[],[b]),T=b?.categories??[],R=[Gye,...T],F=(0,bo.useMemo)(()=>Qz(x,f),[x,f]),B=Math.max(window.innerHeight,Wye),z=Math.floor((B-417)/61),L=Math.ceil(F.length/z),M=(u-1)*z,k=u*z,I=F.slice(M,k),U=oe=>{m({...f,category:oe}),d(1)},Y=(0,nU.debounce)(oe=>{m({...f,search:oe}),d(1)},300),Z=(oe,ge)=>{let Re=ux(oe,ge,l);c(Re)},V=Jz(l),j=()=>{c([])},H=l.length>0?l[0]?.fontFace?.length??0:0,X=H>0&&H!==o?.fontFace?.length,ae=H===o?.fontFace?.length,ne=()=>{let oe=[];!ae&&o&&oe.push(o),c(oe)},ue=async()=>{a(null);let oe=l[0];try{oe?.fontFace&&await Promise.all(oe.fontFace.map(async ge=>{ge.src&&(ge.file=await Wz(ge.src))}))}catch{a({type:"error",message:(0,Zt.__)("Error installing the fonts, could not be downloaded.")});return}try{await v([oe]),a({type:"success",message:(0,Zt.__)("Fonts were installed successfully.")})}catch(ge){a({type:"error",message:ge.message})}j()},Ye=oe=>oe?!oe.fontFace||!oe.fontFace.length?[{fontFamily:oe.fontFamily,fontStyle:"normal",fontWeight:"400"}]:hx(oe.fontFace):[];if(h)return(0,Ae.jsx)(eU,{});let ye=()=>e!=="google-fonts"||h||o?null:(0,Ae.jsx)(je.DropdownMenu,{icon:Nr,label:(0,Zt.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Zt.__)("Revoke access to Google Fonts"),onClick:S}]});return(0,Ae.jsxs)("div",{className:"font-library__tabpanel-layout",children:[_&&(0,Ae.jsx)("div",{className:"font-library__loading",children:(0,Ae.jsx)(je.ProgressBar,{})}),!_&&b&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsxs)(je.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,Ae.jsxs)(je.Navigator.Screen,{path:"/",children:[(0,Ae.jsxs)(je.__experimentalHStack,{justify:"space-between",children:[(0,Ae.jsxs)(je.__experimentalVStack,{children:[(0,Ae.jsx)(je.__experimentalHeading,{level:2,size:13,children:b.name}),(0,Ae.jsx)(je.__experimentalText,{children:b.description})]}),(0,Ae.jsx)(ye,{})]}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),(0,Ae.jsxs)(je.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,Ae.jsx)(je.SearchControl,{value:f.search,placeholder:(0,Zt.__)("Font name\u2026"),label:(0,Zt.__)("Search"),onChange:Y,hideLabelFromVision:!1}),(0,Ae.jsx)(je.SelectControl,{__next40pxDefaultSize:!0,label:(0,Zt.__)("Category"),value:f.category,onChange:U,children:R&&R.map(oe=>(0,Ae.jsx)("option",{value:oe.slug,children:oe.name},oe.slug))})]}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),!!b?.font_families?.length&&!F.length&&(0,Ae.jsx)(je.__experimentalText,{children:(0,Zt.__)("No fonts found. Try with a different search term.")}),(0,Ae.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,Ae.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:I.map(oe=>(0,Ae.jsx)("li",{className:"font-library__fonts-list-item",children:(0,Ae.jsx)(Tb,{font:oe.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{n(oe.font_family_settings)}})},oe.font_family_settings.slug))})})]}),(0,Ae.jsxs)(je.Navigator.Screen,{path:"/fontFamily",children:[(0,Ae.jsxs)(je.Flex,{justify:"flex-start",children:[(0,Ae.jsx)(je.Navigator.BackButton,{icon:(0,Zt.isRTL)()?Ft:Nt,size:"small",onClick:()=>{n(null),a(null)},label:(0,Zt.__)("Back")}),(0,Ae.jsx)(je.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),i&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(je.__experimentalSpacer,{margin:1}),(0,Ae.jsx)(je.Notice,{status:i.type,onRemove:()=>a(null),children:i.message}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:1})]}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),(0,Ae.jsx)(je.__experimentalText,{children:(0,Zt.__)("Select font variants to install.")}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:4}),(0,Ae.jsx)(je.CheckboxControl,{className:"font-library__select-all",label:(0,Zt.__)("Select all"),checked:ae,onChange:ne,indeterminate:X}),(0,Ae.jsx)(je.__experimentalVStack,{spacing:0,children:(0,Ae.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&Ye(o).map((oe,ge)=>(0,Ae.jsx)("li",{className:"font-library__fonts-list-item",children:(0,Ae.jsx)(rU,{font:o,face:oe,handleToggleVariant:Z,selected:$z(o.slug,o.fontFace?oe:null,V)})},`face${ge}`))})}),(0,Ae.jsx)(je.__experimentalSpacer,{margin:16})]})]}),o&&(0,Ae.jsx)(je.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,Ae.jsx)(je.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:ue,isBusy:y,disabled:l.length===0||y,accessibleWhenDisabled:!0,children:(0,Zt.__)("Install")})}),!o&&(0,Ae.jsxs)(je.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,Ae.jsx)(je.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,bo.createInterpolateElement)((0,Zt.sprintf)((0,Zt._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",L),{div:(0,Ae.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,Ae.jsx)(je.SelectControl,{"aria-label":(0,Zt.__)("Current page"),value:u.toString(),options:[...Array(L)].map((oe,ge)=>({label:(ge+1).toString(),value:(ge+1).toString()})),onChange:oe=>d(parseInt(oe)),size:"small",variant:"minimal"})})}),(0,Ae.jsxs)(je.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Ae.jsx)(je.Button,{onClick:()=>d(u-1),disabled:u===1,accessibleWhenDisabled:!0,label:(0,Zt.__)("Previous page"),icon:(0,Zt.isRTL)()?Tl:kl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,Ae.jsx)(je.Button,{onClick:()=>d(u+1),disabled:u===L,accessibleWhenDisabled:!0,label:(0,Zt.__)("Next page"),icon:(0,Zt.isRTL)()?kl:Tl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var yx=Yye;var ah=s(E(),1),on=s(A(),1),Rb=s(D(),1);var bx=(e=>typeof Zn<"u"?Zn:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Zn<"u"?Zn:t)[r]}):e)(function(e){if(typeof Zn<"u")return Zn.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),sU=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof bx=="function"&&bx;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof bx=="function"&&bx,u=0;u<a.length;u++)l(a[u]);return l}return o})()({1:[function(o,n,i){var a=4096,l=2*a+32,c=2*a-1,u=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function d(f){this.buf_=new Uint8Array(l),this.input_=f,this.reset()}d.READ_SIZE=a,d.IBUF_MASK=c,d.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var f=0;f<4;f++)this.val_|=this.buf_[this.pos_]<<8*f,++this.pos_;return this.bit_end_pos_>0},d.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var f=this.buf_ptr_,m=this.input_.read(this.buf_,f,a);if(m<0)throw new Error("Unexpected end of input");if(m<a){this.eos_=1;for(var h=0;h<32;h++)this.buf_[f+m+h]=0}if(f===0){for(var h=0;h<32;h++)this.buf_[(a<<1)+h]=this.buf_[h];this.buf_ptr_=a}else this.buf_ptr_=0;this.bit_end_pos_+=m<<3}},d.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&c]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},d.prototype.readBits=function(f){32-this.bit_pos_<f&&this.fillBitWindow();var m=this.val_>>>this.bit_pos_&u[f];return this.bit_pos_+=f,m},n.exports=d},{}],2:[function(o,n,i){var a=0,l=1,c=2,u=3;i.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),i.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,n,i){var a=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,c=o("./bit_reader"),u=o("./dictionary"),d=o("./huffman").HuffmanCode,f=o("./huffman").BrotliBuildHuffmanTable,m=o("./context"),h=o("./prefix"),g=o("./transform"),v=8,y=16,b=256,_=704,S=26,x=6,T=2,R=8,F=255,B=1080,z=18,L=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),M=16,k=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),I=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),U=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function G(le){var J;return le.readBits(1)===0?16:(J=le.readBits(3),J>0?17+J:(J=le.readBits(3),J>0?8+J:17))}function Y(le){if(le.readBits(1)){var J=le.readBits(3);return J===0?1:le.readBits(J)+(1<<J)}return 0}function Z(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function V(le){var J=new Z,ie,ee,se;if(J.input_end=le.readBits(1),J.input_end&&le.readBits(1))return J;if(ie=le.readBits(2)+4,ie===7){if(J.is_metadata=!0,le.readBits(1)!==0)throw new Error("Invalid reserved bit");if(ee=le.readBits(2),ee===0)return J;for(se=0;se<ee;se++){var Ue=le.readBits(8);if(se+1===ee&&ee>1&&Ue===0)throw new Error("Invalid size byte");J.meta_block_length|=Ue<<se*8}}else for(se=0;se<ie;++se){var ke=le.readBits(4);if(se+1===ie&&ie>4&&ke===0)throw new Error("Invalid size nibble");J.meta_block_length|=ke<<se*4}return++J.meta_block_length,!J.input_end&&!J.is_metadata&&(J.is_uncompressed=le.readBits(1)),J}function j(le,J,ie){var ee=J,se;return ie.fillBitWindow(),J+=ie.val_>>>ie.bit_pos_&F,se=le[J].bits-R,se>0&&(ie.bit_pos_+=R,J+=le[J].value,J+=ie.val_>>>ie.bit_pos_&(1<<se)-1),ie.bit_pos_+=le[J].bits,le[J].value}function H(le,J,ie,ee){for(var se=0,Ue=v,ke=0,Be=0,Je=32768,Fe=[],Se=0;Se<32;Se++)Fe.push(new d(0,0));for(f(Fe,0,5,le,z);se<J&&Je>0;){var yt=0,Jr;if(ee.readMoreInput(),ee.fillBitWindow(),yt+=ee.val_>>>ee.bit_pos_&31,ee.bit_pos_+=Fe[yt].bits,Jr=Fe[yt].value&255,Jr<y)ke=0,ie[se++]=Jr,Jr!==0&&(Ue=Jr,Je-=32768>>Jr);else{var bn=Jr-14,Sn,Zo,Sr=0;if(Jr===y&&(Sr=Ue),Be!==Sr&&(ke=0,Be=Sr),Sn=ke,ke>0&&(ke-=2,ke<<=bn),ke+=ee.readBits(bn)+3,Zo=ke-Sn,se+Zo>J)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Ko=0;Ko<Zo;Ko++)ie[se+Ko]=Be;se+=Zo,Be!==0&&(Je-=Zo<<15-Be)}}if(Je!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+Je);for(;se<J;se++)ie[se]=0}function X(le,J,ie,ee){var se=0,Ue,ke=new Uint8Array(le);if(ee.readMoreInput(),Ue=ee.readBits(2),Ue===1){for(var Be,Je=le-1,Fe=0,Se=new Int32Array(4),yt=ee.readBits(2)+1;Je;)Je>>=1,++Fe;for(Be=0;Be<yt;++Be)Se[Be]=ee.readBits(Fe)%le,ke[Se[Be]]=2;switch(ke[Se[0]]=1,yt){case 1:break;case 3:if(Se[0]===Se[1]||Se[0]===Se[2]||Se[1]===Se[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(Se[0]===Se[1])throw new Error("[ReadHuffmanCode] invalid symbols");ke[Se[1]]=1;break;case 4:if(Se[0]===Se[1]||Se[0]===Se[2]||Se[0]===Se[3]||Se[1]===Se[2]||Se[1]===Se[3]||Se[2]===Se[3])throw new Error("[ReadHuffmanCode] invalid symbols");ee.readBits(1)?(ke[Se[2]]=3,ke[Se[3]]=3):ke[Se[0]]=2;break}}else{var Be,Jr=new Uint8Array(z),bn=32,Sn=0,Zo=[new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,1),new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,5)];for(Be=Ue;Be<z&&bn>0;++Be){var Sr=L[Be],Ko=0,_n;ee.fillBitWindow(),Ko+=ee.val_>>>ee.bit_pos_&15,ee.bit_pos_+=Zo[Ko].bits,_n=Zo[Ko].value,Jr[Sr]=_n,_n!==0&&(bn-=32>>_n,++Sn)}if(!(Sn===1||bn===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");H(Jr,le,ke,ee)}if(se=f(J,ie,R,ke,le),se===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return se}function ae(le,J,ie){var ee,se;return ee=j(le,J,ie),se=h.kBlockLengthPrefixCode[ee].nbits,h.kBlockLengthPrefixCode[ee].offset+ie.readBits(se)}function ne(le,J,ie){var ee;return le<M?(ie+=k[le],ie&=3,ee=J[ie]+I[le]):ee=le-M+1,ee}function ue(le,J){for(var ie=le[J],ee=J;ee;--ee)le[ee]=le[ee-1];le[0]=ie}function Ye(le,J){var ie=new Uint8Array(256),ee;for(ee=0;ee<256;++ee)ie[ee]=ee;for(ee=0;ee<J;++ee){var se=le[ee];le[ee]=ie[se],se&&ue(ie,se)}}function ye(le,J){this.alphabet_size=le,this.num_htrees=J,this.codes=new Array(J+J*U[le+31>>>5]),this.htrees=new Uint32Array(J)}ye.prototype.decode=function(le){var J,ie,ee=0;for(J=0;J<this.num_htrees;++J)this.htrees[J]=ee,ie=X(this.alphabet_size,this.codes,ee,le),ee+=ie};function oe(le,J){var ie={num_htrees:null,context_map:null},ee,se=0,Ue,ke;J.readMoreInput();var Be=ie.num_htrees=Y(J)+1,Je=ie.context_map=new Uint8Array(le);if(Be<=1)return ie;for(ee=J.readBits(1),ee&&(se=J.readBits(4)+1),Ue=[],ke=0;ke<B;ke++)Ue[ke]=new d(0,0);for(X(Be+se,Ue,0,J),ke=0;ke<le;){var Fe;if(J.readMoreInput(),Fe=j(Ue,0,J),Fe===0)Je[ke]=0,++ke;else if(Fe<=se)for(var Se=1+(1<<Fe)+J.readBits(Fe);--Se;){if(ke>=le)throw new Error("[DecodeContextMap] i >= context_map_size");Je[ke]=0,++ke}else Je[ke]=Fe-se,++ke}return J.readBits(1)&&Ye(Je,le),ie}function ge(le,J,ie,ee,se,Ue,ke){var Be=ie*2,Je=ie,Fe=j(J,ie*B,ke),Se;Fe===0?Se=se[Be+(Ue[Je]&1)]:Fe===1?Se=se[Be+(Ue[Je]-1&1)]+1:Se=Fe-2,Se>=le&&(Se-=le),ee[ie]=Se,se[Be+(Ue[Je]&1)]=Se,++Ue[Je]}function Re(le,J,ie,ee,se,Ue){var ke=se+1,Be=ie&se,Je=Ue.pos_&c.IBUF_MASK,Fe;if(J<8||Ue.bit_pos_+(J<<3)<Ue.bit_end_pos_){for(;J-- >0;)Ue.readMoreInput(),ee[Be++]=Ue.readBits(8),Be===ke&&(le.write(ee,ke),Be=0);return}if(Ue.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Ue.bit_pos_<32;)ee[Be]=Ue.val_>>>Ue.bit_pos_,Ue.bit_pos_+=8,++Be,--J;if(Fe=Ue.bit_end_pos_-Ue.bit_pos_>>3,Je+Fe>c.IBUF_MASK){for(var Se=c.IBUF_MASK+1-Je,yt=0;yt<Se;yt++)ee[Be+yt]=Ue.buf_[Je+yt];Fe-=Se,Be+=Se,J-=Se,Je=0}for(var yt=0;yt<Fe;yt++)ee[Be+yt]=Ue.buf_[Je+yt];if(Be+=Fe,J-=Fe,Be>=ke){le.write(ee,ke),Be-=ke;for(var yt=0;yt<Be;yt++)ee[yt]=ee[ke+yt]}for(;Be+J>=ke;){if(Fe=ke-Be,Ue.input_.read(ee,Be,Fe)<Fe)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");le.write(ee,ke),J-=Fe,Be=0}if(Ue.input_.read(ee,Be,J)<J)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Ue.reset()}function ze(le){var J=le.bit_pos_+7&-8,ie=le.readBits(J-le.bit_pos_);return ie==0}function Ve(le){var J=new a(le),ie=new c(J);G(ie);var ee=V(ie);return ee.meta_block_length}i.BrotliDecompressedSize=Ve;function tt(le,J){var ie=new a(le);J==null&&(J=Ve(le));var ee=new Uint8Array(J),se=new l(ee);return vt(ie,se),se.pos<se.buffer.length&&(se.buffer=se.buffer.subarray(0,se.pos)),se.buffer}i.BrotliDecompressBuffer=tt;function vt(le,J){var ie,ee=0,se=0,Ue=0,ke,Be=0,Je,Fe,Se,yt,Jr=[16,15,11,4],bn=0,Sn=0,Zo=0,Sr=[new ye(0,0),new ye(0,0),new ye(0,0)],Ko,_n,Ke,Sv=128+c.READ_SIZE;Ke=new c(le),Ue=G(Ke),ke=(1<<Ue)-16,Je=1<<Ue,Fe=Je-1,Se=new Uint8Array(Je+Sv+u.maxDictionaryWordLength),yt=Je,Ko=[],_n=[];for(var Um=0;Um<3*B;Um++)Ko[Um]=new d(0,0),_n[Um]=new d(0,0);for(;!se;){var Vr=0,x1,Wi=[1<<28,1<<28,1<<28],xa=[0],Ci=[1,1,1],q=[0,1,0,1,0,1],fe=[0],P,be,jt,me,wn=null,ve=null,_r,Q=null,K,Bd=0,It=null,Pe=0,Md=0,Ld=null,lr=0,at=0,jr=0,zr,fo;for(ie=0;ie<3;++ie)Sr[ie].codes=null,Sr[ie].htrees=null;Ke.readMoreInput();var _l=V(Ke);if(Vr=_l.meta_block_length,ee+Vr>J.buffer.length){var Vd=new Uint8Array(ee+Vr);Vd.set(J.buffer),J.buffer=Vd}if(se=_l.input_end,x1=_l.is_uncompressed,_l.is_metadata){for(ze(Ke);Vr>0;--Vr)Ke.readMoreInput(),Ke.readBits(8);continue}if(Vr!==0){if(x1){Ke.bit_pos_=Ke.bit_pos_+7&-8,Re(J,Vr,ee,Se,Fe,Ke),ee+=Vr;continue}for(ie=0;ie<3;++ie)Ci[ie]=Y(Ke)+1,Ci[ie]>=2&&(X(Ci[ie]+2,Ko,ie*B,Ke),X(S,_n,ie*B,Ke),Wi[ie]=ae(_n,ie*B,Ke),fe[ie]=1);for(Ke.readMoreInput(),P=Ke.readBits(2),be=M+(Ke.readBits(4)<<P),jt=(1<<P)-1,me=be+(48<<P),ve=new Uint8Array(Ci[0]),ie=0;ie<Ci[0];++ie)Ke.readMoreInput(),ve[ie]=Ke.readBits(2)<<1;var cr=oe(Ci[0]<<x,Ke);_r=cr.num_htrees,wn=cr.context_map;var xn=oe(Ci[2]<<T,Ke);for(K=xn.num_htrees,Q=xn.context_map,Sr[0]=new ye(b,_r),Sr[1]=new ye(_,Ci[1]),Sr[2]=new ye(me,K),ie=0;ie<3;++ie)Sr[ie].decode(Ke);for(It=0,Ld=0,zr=ve[xa[0]],at=m.lookupOffsets[zr],jr=m.lookupOffsets[zr+1],fo=Sr[1].htrees[0];Vr>0;){var wr,Cn,Yn,Hm,tR,qn,Ti,wl,_v,Gm,wv;for(Ke.readMoreInput(),Wi[1]===0&&(ge(Ci[1],Ko,1,xa,q,fe,Ke),Wi[1]=ae(_n,B,Ke),fo=Sr[1].htrees[xa[1]]),--Wi[1],wr=j(Sr[1].codes,fo,Ke),Cn=wr>>6,Cn>=2?(Cn-=2,Ti=-1):Ti=0,Yn=h.kInsertRangeLut[Cn]+(wr>>3&7),Hm=h.kCopyRangeLut[Cn]+(wr&7),tR=h.kInsertLengthPrefixCode[Yn].offset+Ke.readBits(h.kInsertLengthPrefixCode[Yn].nbits),qn=h.kCopyLengthPrefixCode[Hm].offset+Ke.readBits(h.kCopyLengthPrefixCode[Hm].nbits),Sn=Se[ee-1&Fe],Zo=Se[ee-2&Fe],Gm=0;Gm<tR;++Gm)Ke.readMoreInput(),Wi[0]===0&&(ge(Ci[0],Ko,0,xa,q,fe,Ke),Wi[0]=ae(_n,0,Ke),Bd=xa[0]<<x,It=Bd,zr=ve[xa[0]],at=m.lookupOffsets[zr],jr=m.lookupOffsets[zr+1]),_v=m.lookup[at+Sn]|m.lookup[jr+Zo],Pe=wn[It+_v],--Wi[0],Zo=Sn,Sn=j(Sr[0].codes,Sr[0].htrees[Pe],Ke),Se[ee&Fe]=Sn,(ee&Fe)===Fe&&J.write(Se,Je),++ee;if(Vr-=tR,Vr<=0)break;if(Ti<0){var _v;if(Ke.readMoreInput(),Wi[2]===0&&(ge(Ci[2],Ko,2,xa,q,fe,Ke),Wi[2]=ae(_n,2*B,Ke),Md=xa[2]<<T,Ld=Md),--Wi[2],_v=(qn>4?3:qn-2)&255,lr=Q[Ld+_v],Ti=j(Sr[2].codes,Sr[2].htrees[lr],Ke),Ti>=be){var rR,wF,xv;Ti-=be,wF=Ti&jt,Ti>>=P,rR=(Ti>>1)+1,xv=(2+(Ti&1)<<rR)-4,Ti=be+(xv+Ke.readBits(rR)<<P)+wF}}if(wl=ne(Ti,Jr,bn),wl<0)throw new Error("[BrotliDecompress] invalid distance");if(ee<ke&&Be!==ke?Be=ee:Be=ke,wv=ee&Fe,wl>Be)if(qn>=u.minDictionaryWordLength&&qn<=u.maxDictionaryWordLength){var xv=u.offsetsByLength[qn],xF=wl-Be-1,CF=u.sizeBitsByLength[qn],oae=(1<<CF)-1,nae=xF&oae,TF=xF>>CF;if(xv+=nae*qn,TF<g.kNumTransforms){var oR=g.transformDictionaryWord(Se,wv,xv,qn,TF);if(wv+=oR,ee+=oR,Vr-=oR,wv>=yt){J.write(Se,Je);for(var C1=0;C1<wv-yt;C1++)Se[C1]=Se[yt+C1]}}else throw new Error("Invalid backward reference. pos: "+ee+" distance: "+wl+" len: "+qn+" bytes left: "+Vr)}else throw new Error("Invalid backward reference. pos: "+ee+" distance: "+wl+" len: "+qn+" bytes left: "+Vr);else{if(Ti>0&&(Jr[bn&3]=wl,++bn),qn>Vr)throw new Error("Invalid backward reference. pos: "+ee+" distance: "+wl+" len: "+qn+" bytes left: "+Vr);for(Gm=0;Gm<qn;++Gm)Se[ee&Fe]=Se[ee-wl&Fe],(ee&Fe)===Fe&&J.write(Se,Je),++ee,--Vr}Sn=Se[ee-1&Fe],Zo=Se[ee-2&Fe]}ee&=1073741823}}J.write(Se,ee&Fe)}i.BrotliDecompress=vt,u.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(o,n,i){var a=o("base64-js");i.init=function(){var l=o("./decode").BrotliDecompressBuffer,c=a.toByteArray(o("./dictionary.bin.js"));return l(c)}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(o,n,i){n.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(o,n,i){var a=o("./dictionary-browser");i.init=function(){i.dictionary=a.init()},i.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),i.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),i.minDictionaryWordLength=4,i.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(o,n,i){function a(f,m){this.bits=f,this.value=m}i.HuffmanCode=a;var l=15;function c(f,m){for(var h=1<<m-1;f&h;)h>>=1;return(f&h-1)+h}function u(f,m,h,g,v){do g-=h,f[m+g]=new a(v.bits,v.value);while(g>0)}function d(f,m,h){for(var g=1<<m-h;m<l&&(g-=f[m],!(g<=0));)++m,g<<=1;return m-h}i.BrotliBuildHuffmanTable=function(f,m,h,g,v){var y=m,b,_,S,x,T,R,F,B,z,L,M,k=new Int32Array(l+1),I=new Int32Array(l+1);for(M=new Int32Array(v),S=0;S<v;S++)k[g[S]]++;for(I[1]=0,_=1;_<l;_++)I[_+1]=I[_]+k[_];for(S=0;S<v;S++)g[S]!==0&&(M[I[g[S]]++]=S);if(B=h,z=1<<B,L=z,I[l]===1){for(x=0;x<L;++x)f[m+x]=new a(0,M[0]&65535);return L}for(x=0,S=0,_=1,T=2;_<=h;++_,T<<=1)for(;k[_]>0;--k[_])b=new a(_&255,M[S++]&65535),u(f,m+x,T,z,b),x=c(x,_);for(F=L-1,R=-1,_=h+1,T=2;_<=l;++_,T<<=1)for(;k[_]>0;--k[_])(x&F)!==R&&(m+=z,B=d(k,_,h),z=1<<B,L+=z,R=x&F,f[y+R]=new a(B+h&255,m-y-R&65535)),b=new a(_-h&255,M[S++]&65535),u(f,m+(x>>h),T,z,b),x=c(x,_);return L}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=v,i.fromByteArray=_;for(var a=[],l=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=u.length;d<f;++d)a[d]=u[d],l[u.charCodeAt(d)]=d;l[45]=62,l[95]=63;function m(S){var x=S.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=S.indexOf("=");T===-1&&(T=x);var R=T===x?0:4-T%4;return[T,R]}function h(S){var x=m(S),T=x[0],R=x[1];return(T+R)*3/4-R}function g(S,x,T){return(x+T)*3/4-T}function v(S){for(var x,T=m(S),R=T[0],F=T[1],B=new c(g(S,R,F)),z=0,L=F>0?R-4:R,M=0;M<L;M+=4)x=l[S.charCodeAt(M)]<<18|l[S.charCodeAt(M+1)]<<12|l[S.charCodeAt(M+2)]<<6|l[S.charCodeAt(M+3)],B[z++]=x>>16&255,B[z++]=x>>8&255,B[z++]=x&255;return F===2&&(x=l[S.charCodeAt(M)]<<2|l[S.charCodeAt(M+1)]>>4,B[z++]=x&255),F===1&&(x=l[S.charCodeAt(M)]<<10|l[S.charCodeAt(M+1)]<<4|l[S.charCodeAt(M+2)]>>2,B[z++]=x>>8&255,B[z++]=x&255),B}function y(S){return a[S>>18&63]+a[S>>12&63]+a[S>>6&63]+a[S&63]}function b(S,x,T){for(var R,F=[],B=x;B<T;B+=3)R=(S[B]<<16&16711680)+(S[B+1]<<8&65280)+(S[B+2]&255),F.push(y(R));return F.join("")}function _(S){for(var x,T=S.length,R=T%3,F=[],B=16383,z=0,L=T-R;z<L;z+=B)F.push(b(S,z,z+B>L?L:z+B));return R===1?(x=S[T-1],F.push(a[x>>2]+a[x<<4&63]+"==")):R===2&&(x=(S[T-2]<<8)+S[T-1],F.push(a[x>>10]+a[x>>4&63]+a[x<<2&63]+"=")),F.join("")}},{}],9:[function(o,n,i){function a(l,c){this.offset=l,this.nbits=c}i.kBlockLengthPrefixCode=[new a(1,2),new a(5,2),new a(9,2),new a(13,2),new a(17,3),new a(25,3),new a(33,3),new a(41,3),new a(49,4),new a(65,4),new a(81,4),new a(97,4),new a(113,5),new a(145,5),new a(177,5),new a(209,5),new a(241,6),new a(305,6),new a(369,7),new a(497,8),new a(753,9),new a(1265,10),new a(2289,11),new a(4337,12),new a(8433,13),new a(16625,24)],i.kInsertLengthPrefixCode=[new a(0,0),new a(1,0),new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,1),new a(8,1),new a(10,2),new a(14,2),new a(18,3),new a(26,3),new a(34,4),new a(50,4),new a(66,5),new a(98,5),new a(130,6),new a(194,7),new a(322,8),new a(578,9),new a(1090,10),new a(2114,12),new a(6210,14),new a(22594,24)],i.kCopyLengthPrefixCode=[new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,0),new a(7,0),new a(8,0),new a(9,0),new a(10,1),new a(12,1),new a(14,2),new a(18,2),new a(22,3),new a(30,3),new a(38,4),new a(54,4),new a(70,5),new a(102,5),new a(134,6),new a(198,7),new a(326,8),new a(582,9),new a(1094,10),new a(2118,24)],i.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],i.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,n,i){function a(c){this.buffer=c,this.pos=0}a.prototype.read=function(c,u,d){this.pos+d>this.buffer.length&&(d=this.buffer.length-this.pos);for(var f=0;f<d;f++)c[u+f]=this.buffer[this.pos+f];return this.pos+=d,d},i.BrotliInput=a;function l(c){this.buffer=c,this.pos=0}l.prototype.write=function(c,u){if(this.pos+u>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(c.subarray(0,u),this.pos),this.pos+=u,u},i.BrotliOutput=l},{}],11:[function(o,n,i){var a=o("./dictionary"),l=0,c=1,u=2,d=3,f=4,m=5,h=6,g=7,v=8,y=9,b=10,_=11,S=12,x=13,T=14,R=15,F=16,B=17,z=18,L=19,M=20;function k(G,Y,Z){this.prefix=new Uint8Array(G.length),this.transform=Y,this.suffix=new Uint8Array(Z.length);for(var V=0;V<G.length;V++)this.prefix[V]=G.charCodeAt(V);for(var V=0;V<Z.length;V++)this.suffix[V]=Z.charCodeAt(V)}var I=[new k("",l,""),new k("",l," "),new k(" ",l," "),new k("",S,""),new k("",b," "),new k("",l," the "),new k(" ",l,""),new k("s ",l," "),new k("",l," of "),new k("",b,""),new k("",l," and "),new k("",x,""),new k("",c,""),new k(", ",l," "),new k("",l,", "),new k(" ",b," "),new k("",l," in "),new k("",l," to "),new k("e ",l," "),new k("",l,'"'),new k("",l,"."),new k("",l,'">'),new k("",l,`
`),new k("",d,""),new k("",l,"]"),new k("",l," for "),new k("",T,""),new k("",u,""),new k("",l," a "),new k("",l," that "),new k(" ",b,""),new k("",l,". "),new k(".",l,""),new k(" ",l,", "),new k("",R,""),new k("",l," with "),new k("",l,"'"),new k("",l," from "),new k("",l," by "),new k("",F,""),new k("",B,""),new k(" the ",l,""),new k("",f,""),new k("",l,". The "),new k("",_,""),new k("",l," on "),new k("",l," as "),new k("",l," is "),new k("",g,""),new k("",c,"ing "),new k("",l,`
	`),new k("",l,":"),new k(" ",l,". "),new k("",l,"ed "),new k("",M,""),new k("",z,""),new k("",h,""),new k("",l,"("),new k("",b,", "),new k("",v,""),new k("",l," at "),new k("",l,"ly "),new k(" the ",l," of "),new k("",m,""),new k("",y,""),new k(" ",b,", "),new k("",b,'"'),new k(".",l,"("),new k("",_," "),new k("",b,'">'),new k("",l,'="'),new k(" ",l,"."),new k(".com/",l,""),new k(" the ",l," of the "),new k("",b,"'"),new k("",l,". This "),new k("",l,","),new k(".",l," "),new k("",b,"("),new k("",b,"."),new k("",l," not "),new k(" ",l,'="'),new k("",l,"er "),new k(" ",_," "),new k("",l,"al "),new k(" ",_,""),new k("",l,"='"),new k("",_,'"'),new k("",b,". "),new k(" ",l,"("),new k("",l,"ful "),new k(" ",b,". "),new k("",l,"ive "),new k("",l,"less "),new k("",_,"'"),new k("",l,"est "),new k(" ",b,"."),new k("",_,'">'),new k(" ",l,"='"),new k("",b,","),new k("",l,"ize "),new k("",_,"."),new k("\xC2\xA0",l,""),new k(" ",l,","),new k("",b,'="'),new k("",_,'="'),new k("",l,"ous "),new k("",_,", "),new k("",b,"='"),new k(" ",b,","),new k(" ",_,'="'),new k(" ",_,", "),new k("",_,","),new k("",_,"("),new k("",_,". "),new k(" ",_,"."),new k("",_,"='"),new k(" ",_,". "),new k(" ",b,'="'),new k(" ",_,"='"),new k(" ",b,"='")];i.kTransforms=I,i.kNumTransforms=I.length;function U(G,Y){return G[Y]<192?(G[Y]>=97&&G[Y]<=122&&(G[Y]^=32),1):G[Y]<224?(G[Y+1]^=32,2):(G[Y+2]^=5,3)}i.transformDictionaryWord=function(G,Y,Z,V,j){var H=I[j].prefix,X=I[j].suffix,ae=I[j].transform,ne=ae<S?0:ae-(S-1),ue=0,Ye=Y,ye;ne>V&&(ne=V);for(var oe=0;oe<H.length;)G[Y++]=H[oe++];for(Z+=ne,V-=ne,ae<=y&&(V-=ae),ue=0;ue<V;ue++)G[Y++]=a.dictionary[Z+ue];if(ye=Y-V,ae===b)U(G,ye);else if(ae===_)for(;V>0;){var ge=U(G,ye);ye+=ge,V-=ge}for(var Re=0;Re<X.length;)G[Y++]=X[Re++];return Y-Ye}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var Sx=(e=>typeof Zn<"u"?Zn:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Zn<"u"?Zn:t)[r]}):e)(function(e){if(typeof Zn<"u")return Zn.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),aU=(function(){var e,t,r;return(function(){function o(n,i,a){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof Sx=="function"&&Sx;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,a)}return i[d].exports}for(var c=typeof Sx=="function"&&Sx,u=0;u<a.length;u++)l(a[u]);return l}return o})()({1:[function(o,n,i){"use strict";var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function l(d,f){return Object.prototype.hasOwnProperty.call(d,f)}i.assign=function(d){for(var f=Array.prototype.slice.call(arguments,1);f.length;){var m=f.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var h in m)l(m,h)&&(d[h]=m[h])}}return d},i.shrinkBuf=function(d,f){return d.length===f?d:d.subarray?d.subarray(0,f):(d.length=f,d)};var c={arraySet:function(d,f,m,h,g){if(f.subarray&&d.subarray){d.set(f.subarray(m,m+h),g);return}for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){var f,m,h,g,v,y;for(h=0,f=0,m=d.length;f<m;f++)h+=d[f].length;for(y=new Uint8Array(h),g=0,f=0,m=d.length;f<m;f++)v=d[f],y.set(v,g),g+=v.length;return y}},u={arraySet:function(d,f,m,h,g){for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){return[].concat.apply([],d)}};i.setTyped=function(d){d?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,c)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,u))},i.setTyped(a)},{}],2:[function(o,n,i){"use strict";var a=o("./common"),l=!0,c=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{c=!1}for(var u=new a.Buf8(256),d=0;d<256;d++)u[d]=d>=252?6:d>=248?5:d>=240?4:d>=224?3:d>=192?2:1;u[254]=u[254]=1,i.string2buf=function(m){var h,g,v,y,b,_=m.length,S=0;for(y=0;y<_;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<_&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),S+=g<128?1:g<2048?2:g<65536?3:4;for(h=new a.Buf8(S),b=0,y=0;b<S;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<_&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),g<128?h[b++]=g:g<2048?(h[b++]=192|g>>>6,h[b++]=128|g&63):g<65536?(h[b++]=224|g>>>12,h[b++]=128|g>>>6&63,h[b++]=128|g&63):(h[b++]=240|g>>>18,h[b++]=128|g>>>12&63,h[b++]=128|g>>>6&63,h[b++]=128|g&63);return h};function f(m,h){if(h<65534&&(m.subarray&&c||!m.subarray&&l))return String.fromCharCode.apply(null,a.shrinkBuf(m,h));for(var g="",v=0;v<h;v++)g+=String.fromCharCode(m[v]);return g}i.buf2binstring=function(m){return f(m,m.length)},i.binstring2buf=function(m){for(var h=new a.Buf8(m.length),g=0,v=h.length;g<v;g++)h[g]=m.charCodeAt(g);return h},i.buf2string=function(m,h){var g,v,y,b,_=h||m.length,S=new Array(_*2);for(v=0,g=0;g<_;){if(y=m[g++],y<128){S[v++]=y;continue}if(b=u[y],b>4){S[v++]=65533,g+=b-1;continue}for(y&=b===2?31:b===3?15:7;b>1&&g<_;)y=y<<6|m[g++]&63,b--;if(b>1){S[v++]=65533;continue}y<65536?S[v++]=y:(y-=65536,S[v++]=55296|y>>10&1023,S[v++]=56320|y&1023)}return f(S,v)},i.utf8border=function(m,h){var g;for(h=h||m.length,h>m.length&&(h=m.length),g=h-1;g>=0&&(m[g]&192)===128;)g--;return g<0||g===0?h:g+u[m[g]]>h?g:h}},{"./common":1}],3:[function(o,n,i){"use strict";function a(l,c,u,d){for(var f=l&65535|0,m=l>>>16&65535|0,h=0;u!==0;){h=u>2e3?2e3:u,u-=h;do f=f+c[d++]|0,m=m+f|0;while(--h);f%=65521,m%=65521}return f|m<<16|0}n.exports=a},{}],4:[function(o,n,i){"use strict";n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,n,i){"use strict";function a(){for(var u,d=[],f=0;f<256;f++){u=f;for(var m=0;m<8;m++)u=u&1?3988292384^u>>>1:u>>>1;d[f]=u}return d}var l=a();function c(u,d,f,m){var h=l,g=m+f;u^=-1;for(var v=m;v<g;v++)u=u>>>8^h[(u^d[v])&255];return u^-1}n.exports=c},{}],6:[function(o,n,i){"use strict";function a(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}n.exports=a},{}],7:[function(o,n,i){"use strict";var a=30,l=12;n.exports=function(u,d){var f,m,h,g,v,y,b,_,S,x,T,R,F,B,z,L,M,k,I,U,G,Y,Z,V,j;f=u.state,m=u.next_in,V=u.input,h=m+(u.avail_in-5),g=u.next_out,j=u.output,v=g-(d-u.avail_out),y=g+(u.avail_out-257),b=f.dmax,_=f.wsize,S=f.whave,x=f.wnext,T=f.window,R=f.hold,F=f.bits,B=f.lencode,z=f.distcode,L=(1<<f.lenbits)-1,M=(1<<f.distbits)-1;e:do{F<15&&(R+=V[m++]<<F,F+=8,R+=V[m++]<<F,F+=8),k=B[R&L];t:for(;;){if(I=k>>>24,R>>>=I,F-=I,I=k>>>16&255,I===0)j[g++]=k&65535;else if(I&16){U=k&65535,I&=15,I&&(F<I&&(R+=V[m++]<<F,F+=8),U+=R&(1<<I)-1,R>>>=I,F-=I),F<15&&(R+=V[m++]<<F,F+=8,R+=V[m++]<<F,F+=8),k=z[R&M];r:for(;;){if(I=k>>>24,R>>>=I,F-=I,I=k>>>16&255,I&16){if(G=k&65535,I&=15,F<I&&(R+=V[m++]<<F,F+=8,F<I&&(R+=V[m++]<<F,F+=8)),G+=R&(1<<I)-1,G>b){u.msg="invalid distance too far back",f.mode=a;break e}if(R>>>=I,F-=I,I=g-v,G>I){if(I=G-I,I>S&&f.sane){u.msg="invalid distance too far back",f.mode=a;break e}if(Y=0,Z=T,x===0){if(Y+=_-I,I<U){U-=I;do j[g++]=T[Y++];while(--I);Y=g-G,Z=j}}else if(x<I){if(Y+=_+x-I,I-=x,I<U){U-=I;do j[g++]=T[Y++];while(--I);if(Y=0,x<U){I=x,U-=I;do j[g++]=T[Y++];while(--I);Y=g-G,Z=j}}}else if(Y+=x-I,I<U){U-=I;do j[g++]=T[Y++];while(--I);Y=g-G,Z=j}for(;U>2;)j[g++]=Z[Y++],j[g++]=Z[Y++],j[g++]=Z[Y++],U-=3;U&&(j[g++]=Z[Y++],U>1&&(j[g++]=Z[Y++]))}else{Y=g-G;do j[g++]=j[Y++],j[g++]=j[Y++],j[g++]=j[Y++],U-=3;while(U>2);U&&(j[g++]=j[Y++],U>1&&(j[g++]=j[Y++]))}}else if((I&64)===0){k=z[(k&65535)+(R&(1<<I)-1)];continue r}else{u.msg="invalid distance code",f.mode=a;break e}break}}else if((I&64)===0){k=B[(k&65535)+(R&(1<<I)-1)];continue t}else if(I&32){f.mode=l;break e}else{u.msg="invalid literal/length code",f.mode=a;break e}break}}while(m<h&&g<y);U=F>>3,m-=U,F-=U<<3,R&=(1<<F)-1,u.next_in=m,u.next_out=g,u.avail_in=m<h?5+(h-m):5-(m-h),u.avail_out=g<y?257+(y-g):257-(g-y),f.hold=R,f.bits=F}},{}],8:[function(o,n,i){"use strict";var a=o("../utils/common"),l=o("./adler32"),c=o("./crc32"),u=o("./inffast"),d=o("./inftrees"),f=0,m=1,h=2,g=4,v=5,y=6,b=0,_=1,S=2,x=-2,T=-3,R=-4,F=-5,B=8,z=1,L=2,M=3,k=4,I=5,U=6,G=7,Y=8,Z=9,V=10,j=11,H=12,X=13,ae=14,ne=15,ue=16,Ye=17,ye=18,oe=19,ge=20,Re=21,ze=22,Ve=23,tt=24,vt=25,le=26,J=27,ie=28,ee=29,se=30,Ue=31,ke=32,Be=852,Je=592,Fe=15,Se=Fe;function yt(q){return(q>>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function Jr(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function bn(q){var fe;return!q||!q.state?x:(fe=q.state,q.total_in=q.total_out=fe.total=0,q.msg="",fe.wrap&&(q.adler=fe.wrap&1),fe.mode=z,fe.last=0,fe.havedict=0,fe.dmax=32768,fe.head=null,fe.hold=0,fe.bits=0,fe.lencode=fe.lendyn=new a.Buf32(Be),fe.distcode=fe.distdyn=new a.Buf32(Je),fe.sane=1,fe.back=-1,b)}function Sn(q){var fe;return!q||!q.state?x:(fe=q.state,fe.wsize=0,fe.whave=0,fe.wnext=0,bn(q))}function Zo(q,fe){var P,be;return!q||!q.state||(be=q.state,fe<0?(P=0,fe=-fe):(P=(fe>>4)+1,fe<48&&(fe&=15)),fe&&(fe<8||fe>15))?x:(be.window!==null&&be.wbits!==fe&&(be.window=null),be.wrap=P,be.wbits=fe,Sn(q))}function Sr(q,fe){var P,be;return q?(be=new Jr,q.state=be,be.window=null,P=Zo(q,fe),P!==b&&(q.state=null),P):x}function Ko(q){return Sr(q,Se)}var _n=!0,Ke,Sv;function Um(q){if(_n){var fe;for(Ke=new a.Buf32(512),Sv=new a.Buf32(32),fe=0;fe<144;)q.lens[fe++]=8;for(;fe<256;)q.lens[fe++]=9;for(;fe<280;)q.lens[fe++]=7;for(;fe<288;)q.lens[fe++]=8;for(d(m,q.lens,0,288,Ke,0,q.work,{bits:9}),fe=0;fe<32;)q.lens[fe++]=5;d(h,q.lens,0,32,Sv,0,q.work,{bits:5}),_n=!1}q.lencode=Ke,q.lenbits=9,q.distcode=Sv,q.distbits=5}function Vr(q,fe,P,be){var jt,me=q.state;return me.window===null&&(me.wsize=1<<me.wbits,me.wnext=0,me.whave=0,me.window=new a.Buf8(me.wsize)),be>=me.wsize?(a.arraySet(me.window,fe,P-me.wsize,me.wsize,0),me.wnext=0,me.whave=me.wsize):(jt=me.wsize-me.wnext,jt>be&&(jt=be),a.arraySet(me.window,fe,P-be,jt,me.wnext),be-=jt,be?(a.arraySet(me.window,fe,P-be,be,0),me.wnext=be,me.whave=me.wsize):(me.wnext+=jt,me.wnext===me.wsize&&(me.wnext=0),me.whave<me.wsize&&(me.whave+=jt))),0}function x1(q,fe){var P,be,jt,me,wn,ve,_r,Q,K,Bd,It,Pe,Md,Ld,lr=0,at,jr,zr,fo,_l,Vd,cr,xn,wr=new a.Buf8(4),Cn,Yn,Hm=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!q||!q.state||!q.output||!q.input&&q.avail_in!==0)return x;P=q.state,P.mode===H&&(P.mode=X),wn=q.next_out,jt=q.output,_r=q.avail_out,me=q.next_in,be=q.input,ve=q.avail_in,Q=P.hold,K=P.bits,Bd=ve,It=_r,xn=b;e:for(;;)switch(P.mode){case z:if(P.wrap===0){P.mode=X;break}for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(P.wrap&2&&Q===35615){P.check=0,wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0),Q=0,K=0,P.mode=L;break}if(P.flags=0,P.head&&(P.head.done=!1),!(P.wrap&1)||(((Q&255)<<8)+(Q>>8))%31){q.msg="incorrect header check",P.mode=se;break}if((Q&15)!==B){q.msg="unknown compression method",P.mode=se;break}if(Q>>>=4,K-=4,cr=(Q&15)+8,P.wbits===0)P.wbits=cr;else if(cr>P.wbits){q.msg="invalid window size",P.mode=se;break}P.dmax=1<<cr,q.adler=P.check=1,P.mode=Q&512?V:H,Q=0,K=0;break;case L:for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(P.flags=Q,(P.flags&255)!==B){q.msg="unknown compression method",P.mode=se;break}if(P.flags&57344){q.msg="unknown header flags set",P.mode=se;break}P.head&&(P.head.text=Q>>8&1),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0,P.mode=M;case M:for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.head&&(P.head.time=Q),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,wr[2]=Q>>>16&255,wr[3]=Q>>>24&255,P.check=c(P.check,wr,4,0)),Q=0,K=0,P.mode=k;case k:for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.head&&(P.head.xflags=Q&255,P.head.os=Q>>8),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0,P.mode=I;case I:if(P.flags&1024){for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.length=Q,P.head&&(P.head.extra_len=Q),P.flags&512&&(wr[0]=Q&255,wr[1]=Q>>>8&255,P.check=c(P.check,wr,2,0)),Q=0,K=0}else P.head&&(P.head.extra=null);P.mode=U;case U:if(P.flags&1024&&(Pe=P.length,Pe>ve&&(Pe=ve),Pe&&(P.head&&(cr=P.head.extra_len-P.length,P.head.extra||(P.head.extra=new Array(P.head.extra_len)),a.arraySet(P.head.extra,be,me,Pe,cr)),P.flags&512&&(P.check=c(P.check,be,Pe,me)),ve-=Pe,me+=Pe,P.length-=Pe),P.length))break e;P.length=0,P.mode=G;case G:if(P.flags&2048){if(ve===0)break e;Pe=0;do cr=be[me+Pe++],P.head&&cr&&P.length<65536&&(P.head.name+=String.fromCharCode(cr));while(cr&&Pe<ve);if(P.flags&512&&(P.check=c(P.check,be,Pe,me)),ve-=Pe,me+=Pe,cr)break e}else P.head&&(P.head.name=null);P.length=0,P.mode=Y;case Y:if(P.flags&4096){if(ve===0)break e;Pe=0;do cr=be[me+Pe++],P.head&&cr&&P.length<65536&&(P.head.comment+=String.fromCharCode(cr));while(cr&&Pe<ve);if(P.flags&512&&(P.check=c(P.check,be,Pe,me)),ve-=Pe,me+=Pe,cr)break e}else P.head&&(P.head.comment=null);P.mode=Z;case Z:if(P.flags&512){for(;K<16;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(Q!==(P.check&65535)){q.msg="header crc mismatch",P.mode=se;break}Q=0,K=0}P.head&&(P.head.hcrc=P.flags>>9&1,P.head.done=!0),q.adler=P.check=0,P.mode=H;break;case V:for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}q.adler=P.check=yt(Q),Q=0,K=0,P.mode=j;case j:if(P.havedict===0)return q.next_out=wn,q.avail_out=_r,q.next_in=me,q.avail_in=ve,P.hold=Q,P.bits=K,S;q.adler=P.check=1,P.mode=H;case H:if(fe===v||fe===y)break e;case X:if(P.last){Q>>>=K&7,K-=K&7,P.mode=J;break}for(;K<3;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}switch(P.last=Q&1,Q>>>=1,K-=1,Q&3){case 0:P.mode=ae;break;case 1:if(Um(P),P.mode=ge,fe===y){Q>>>=2,K-=2;break e}break;case 2:P.mode=Ye;break;case 3:q.msg="invalid block type",P.mode=se}Q>>>=2,K-=2;break;case ae:for(Q>>>=K&7,K-=K&7;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if((Q&65535)!==(Q>>>16^65535)){q.msg="invalid stored block lengths",P.mode=se;break}if(P.length=Q&65535,Q=0,K=0,P.mode=ne,fe===y)break e;case ne:P.mode=ue;case ue:if(Pe=P.length,Pe){if(Pe>ve&&(Pe=ve),Pe>_r&&(Pe=_r),Pe===0)break e;a.arraySet(jt,be,me,Pe,wn),ve-=Pe,me+=Pe,_r-=Pe,wn+=Pe,P.length-=Pe;break}P.mode=H;break;case Ye:for(;K<14;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(P.nlen=(Q&31)+257,Q>>>=5,K-=5,P.ndist=(Q&31)+1,Q>>>=5,K-=5,P.ncode=(Q&15)+4,Q>>>=4,K-=4,P.nlen>286||P.ndist>30){q.msg="too many length or distance symbols",P.mode=se;break}P.have=0,P.mode=ye;case ye:for(;P.have<P.ncode;){for(;K<3;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.lens[Hm[P.have++]]=Q&7,Q>>>=3,K-=3}for(;P.have<19;)P.lens[Hm[P.have++]]=0;if(P.lencode=P.lendyn,P.lenbits=7,Cn={bits:P.lenbits},xn=d(f,P.lens,0,19,P.lencode,0,P.work,Cn),P.lenbits=Cn.bits,xn){q.msg="invalid code lengths set",P.mode=se;break}P.have=0,P.mode=oe;case oe:for(;P.have<P.nlen+P.ndist;){for(;lr=P.lencode[Q&(1<<P.lenbits)-1],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(zr<16)Q>>>=at,K-=at,P.lens[P.have++]=zr;else{if(zr===16){for(Yn=at+2;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(Q>>>=at,K-=at,P.have===0){q.msg="invalid bit length repeat",P.mode=se;break}cr=P.lens[P.have-1],Pe=3+(Q&3),Q>>>=2,K-=2}else if(zr===17){for(Yn=at+3;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=at,K-=at,cr=0,Pe=3+(Q&7),Q>>>=3,K-=3}else{for(Yn=at+7;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=at,K-=at,cr=0,Pe=11+(Q&127),Q>>>=7,K-=7}if(P.have+Pe>P.nlen+P.ndist){q.msg="invalid bit length repeat",P.mode=se;break}for(;Pe--;)P.lens[P.have++]=cr}}if(P.mode===se)break;if(P.lens[256]===0){q.msg="invalid code -- missing end-of-block",P.mode=se;break}if(P.lenbits=9,Cn={bits:P.lenbits},xn=d(m,P.lens,0,P.nlen,P.lencode,0,P.work,Cn),P.lenbits=Cn.bits,xn){q.msg="invalid literal/lengths set",P.mode=se;break}if(P.distbits=6,P.distcode=P.distdyn,Cn={bits:P.distbits},xn=d(h,P.lens,P.nlen,P.ndist,P.distcode,0,P.work,Cn),P.distbits=Cn.bits,xn){q.msg="invalid distances set",P.mode=se;break}if(P.mode=ge,fe===y)break e;case ge:P.mode=Re;case Re:if(ve>=6&&_r>=258){q.next_out=wn,q.avail_out=_r,q.next_in=me,q.avail_in=ve,P.hold=Q,P.bits=K,u(q,It),wn=q.next_out,jt=q.output,_r=q.avail_out,me=q.next_in,be=q.input,ve=q.avail_in,Q=P.hold,K=P.bits,P.mode===H&&(P.back=-1);break}for(P.back=0;lr=P.lencode[Q&(1<<P.lenbits)-1],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(jr&&(jr&240)===0){for(fo=at,_l=jr,Vd=zr;lr=P.lencode[Vd+((Q&(1<<fo+_l)-1)>>fo)],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(fo+at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=fo,K-=fo,P.back+=fo}if(Q>>>=at,K-=at,P.back+=at,P.length=zr,jr===0){P.mode=le;break}if(jr&32){P.back=-1,P.mode=H;break}if(jr&64){q.msg="invalid literal/length code",P.mode=se;break}P.extra=jr&15,P.mode=ze;case ze:if(P.extra){for(Yn=P.extra;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.length+=Q&(1<<P.extra)-1,Q>>>=P.extra,K-=P.extra,P.back+=P.extra}P.was=P.length,P.mode=Ve;case Ve:for(;lr=P.distcode[Q&(1<<P.distbits)-1],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if((jr&240)===0){for(fo=at,_l=jr,Vd=zr;lr=P.distcode[Vd+((Q&(1<<fo+_l)-1)>>fo)],at=lr>>>24,jr=lr>>>16&255,zr=lr&65535,!(fo+at<=K);){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}Q>>>=fo,K-=fo,P.back+=fo}if(Q>>>=at,K-=at,P.back+=at,jr&64){q.msg="invalid distance code",P.mode=se;break}P.offset=zr,P.extra=jr&15,P.mode=tt;case tt:if(P.extra){for(Yn=P.extra;K<Yn;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}P.offset+=Q&(1<<P.extra)-1,Q>>>=P.extra,K-=P.extra,P.back+=P.extra}if(P.offset>P.dmax){q.msg="invalid distance too far back",P.mode=se;break}P.mode=vt;case vt:if(_r===0)break e;if(Pe=It-_r,P.offset>Pe){if(Pe=P.offset-Pe,Pe>P.whave&&P.sane){q.msg="invalid distance too far back",P.mode=se;break}Pe>P.wnext?(Pe-=P.wnext,Md=P.wsize-Pe):Md=P.wnext-Pe,Pe>P.length&&(Pe=P.length),Ld=P.window}else Ld=jt,Md=wn-P.offset,Pe=P.length;Pe>_r&&(Pe=_r),_r-=Pe,P.length-=Pe;do jt[wn++]=Ld[Md++];while(--Pe);P.length===0&&(P.mode=Re);break;case le:if(_r===0)break e;jt[wn++]=P.length,_r--,P.mode=Re;break;case J:if(P.wrap){for(;K<32;){if(ve===0)break e;ve--,Q|=be[me++]<<K,K+=8}if(It-=_r,q.total_out+=It,P.total+=It,It&&(q.adler=P.check=P.flags?c(P.check,jt,It,wn-It):l(P.check,jt,It,wn-It)),It=_r,(P.flags?Q:yt(Q))!==P.check){q.msg="incorrect data check",P.mode=se;break}Q=0,K=0}P.mode=ie;case ie:if(P.wrap&&P.flags){for(;K<32;){if(ve===0)break e;ve--,Q+=be[me++]<<K,K+=8}if(Q!==(P.total&4294967295)){q.msg="incorrect length check",P.mode=se;break}Q=0,K=0}P.mode=ee;case ee:xn=_;break e;case se:xn=T;break e;case Ue:return R;case ke:default:return x}return q.next_out=wn,q.avail_out=_r,q.next_in=me,q.avail_in=ve,P.hold=Q,P.bits=K,(P.wsize||It!==q.avail_out&&P.mode<se&&(P.mode<J||fe!==g))&&Vr(q,q.output,q.next_out,It-q.avail_out)?(P.mode=Ue,R):(Bd-=q.avail_in,It-=q.avail_out,q.total_in+=Bd,q.total_out+=It,P.total+=It,P.wrap&&It&&(q.adler=P.check=P.flags?c(P.check,jt,It,q.next_out-It):l(P.check,jt,It,q.next_out-It)),q.data_type=P.bits+(P.last?64:0)+(P.mode===H?128:0)+(P.mode===ge||P.mode===ne?256:0),(Bd===0&&It===0||fe===g)&&xn===b&&(xn=F),xn)}function Wi(q){if(!q||!q.state)return x;var fe=q.state;return fe.window&&(fe.window=null),q.state=null,b}function xa(q,fe){var P;return!q||!q.state||(P=q.state,(P.wrap&2)===0)?x:(P.head=fe,fe.done=!1,b)}function Ci(q,fe){var P=fe.length,be,jt,me;return!q||!q.state||(be=q.state,be.wrap!==0&&be.mode!==j)?x:be.mode===j&&(jt=1,jt=l(jt,fe,P,0),jt!==be.check)?T:(me=Vr(q,fe,P,P),me?(be.mode=Ue,R):(be.havedict=1,b))}i.inflateReset=Sn,i.inflateReset2=Zo,i.inflateResetKeep=bn,i.inflateInit=Ko,i.inflateInit2=Sr,i.inflate=x1,i.inflateEnd=Wi,i.inflateGetHeader=xa,i.inflateSetDictionary=Ci,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(o,n,i){"use strict";var a=o("../utils/common"),l=15,c=852,u=592,d=0,f=1,m=2,h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],y=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(_,S,x,T,R,F,B,z){var L=z.bits,M=0,k=0,I=0,U=0,G=0,Y=0,Z=0,V=0,j=0,H=0,X,ae,ne,ue,Ye,ye=null,oe=0,ge,Re=new a.Buf16(l+1),ze=new a.Buf16(l+1),Ve=null,tt=0,vt,le,J;for(M=0;M<=l;M++)Re[M]=0;for(k=0;k<T;k++)Re[S[x+k]]++;for(G=L,U=l;U>=1&&Re[U]===0;U--);if(G>U&&(G=U),U===0)return R[F++]=1<<24|64<<16|0,R[F++]=1<<24|64<<16|0,z.bits=1,0;for(I=1;I<U&&Re[I]===0;I++);for(G<I&&(G=I),V=1,M=1;M<=l;M++)if(V<<=1,V-=Re[M],V<0)return-1;if(V>0&&(_===d||U!==1))return-1;for(ze[1]=0,M=1;M<l;M++)ze[M+1]=ze[M]+Re[M];for(k=0;k<T;k++)S[x+k]!==0&&(B[ze[S[x+k]]++]=k);if(_===d?(ye=Ve=B,ge=19):_===f?(ye=h,oe-=257,Ve=g,tt-=257,ge=256):(ye=v,Ve=y,ge=-1),H=0,k=0,M=I,Ye=F,Y=G,Z=0,ne=-1,j=1<<G,ue=j-1,_===f&&j>c||_===m&&j>u)return 1;for(;;){vt=M-Z,B[k]<ge?(le=0,J=B[k]):B[k]>ge?(le=Ve[tt+B[k]],J=ye[oe+B[k]]):(le=96,J=0),X=1<<M-Z,ae=1<<Y,I=ae;do ae-=X,R[Ye+(H>>Z)+ae]=vt<<24|le<<16|J|0;while(ae!==0);for(X=1<<M-1;H&X;)X>>=1;if(X!==0?(H&=X-1,H+=X):H=0,k++,--Re[M]===0){if(M===U)break;M=S[x+B[k]]}if(M>G&&(H&ue)!==ne){for(Z===0&&(Z=G),Ye+=I,Y=M-Z,V=1<<Y;Y+Z<U&&(V-=Re[Y+Z],!(V<=0));)Y++,V<<=1;if(j+=1<<Y,_===f&&j>c||_===m&&j>u)return 1;ne=H&ue,R[ne]=G<<24|Y<<16|Ye-F|0}}return H!==0&&(R[Ye+H]=M-Z<<24|64<<16|0),z.bits=G,0}},{"../utils/common":1}],10:[function(o,n,i){"use strict";n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,n,i){"use strict";function a(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}n.exports=a},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var a=o("./zlib/inflate"),l=o("./utils/common"),c=o("./utils/strings"),u=o("./zlib/constants"),d=o("./zlib/messages"),f=o("./zlib/zstream"),m=o("./zlib/gzheader"),h=Object.prototype.toString;function g(b){if(!(this instanceof g))return new g(b);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},b||{});var _=this.options;_.raw&&_.windowBits>=0&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),_.windowBits>=0&&_.windowBits<16&&!(b&&b.windowBits)&&(_.windowBits+=32),_.windowBits>15&&_.windowBits<48&&(_.windowBits&15)===0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var S=a.inflateInit2(this.strm,_.windowBits);if(S!==u.Z_OK)throw new Error(d[S]);if(this.header=new m,a.inflateGetHeader(this.strm,this.header),_.dictionary&&(typeof _.dictionary=="string"?_.dictionary=c.string2buf(_.dictionary):h.call(_.dictionary)==="[object ArrayBuffer]"&&(_.dictionary=new Uint8Array(_.dictionary)),_.raw&&(S=a.inflateSetDictionary(this.strm,_.dictionary),S!==u.Z_OK)))throw new Error(d[S])}g.prototype.push=function(b,_){var S=this.strm,x=this.options.chunkSize,T=this.options.dictionary,R,F,B,z,L,M=!1;if(this.ended)return!1;F=_===~~_?_:_===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof b=="string"?S.input=c.binstring2buf(b):h.call(b)==="[object ArrayBuffer]"?S.input=new Uint8Array(b):S.input=b,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new l.Buf8(x),S.next_out=0,S.avail_out=x),R=a.inflate(S,u.Z_NO_FLUSH),R===u.Z_NEED_DICT&&T&&(R=a.inflateSetDictionary(this.strm,T)),R===u.Z_BUF_ERROR&&M===!0&&(R=u.Z_OK,M=!1),R!==u.Z_STREAM_END&&R!==u.Z_OK)return this.onEnd(R),this.ended=!0,!1;S.next_out&&(S.avail_out===0||R===u.Z_STREAM_END||S.avail_in===0&&(F===u.Z_FINISH||F===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(B=c.utf8border(S.output,S.next_out),z=S.next_out-B,L=c.buf2string(S.output,B),S.next_out=z,S.avail_out=x-z,z&&l.arraySet(S.output,S.output,B,z,0),this.onData(L)):this.onData(l.shrinkBuf(S.output,S.next_out))),S.avail_in===0&&S.avail_out===0&&(M=!0)}while((S.avail_in>0||S.avail_out===0)&&R!==u.Z_STREAM_END);return R===u.Z_STREAM_END&&(F=u.Z_FINISH),F===u.Z_FINISH?(R=a.inflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===u.Z_OK):(F===u.Z_SYNC_FLUSH&&(this.onEnd(u.Z_OK),S.avail_out=0),!0)},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg};function v(b,_){var S=new g(_);if(S.push(b,!0),S.err)throw S.msg||d[S.err];return S.result}function y(b,_){return _=_||{},_.raw=!0,v(b,_)}i.Inflate=g,i.inflate=v,i.inflateRaw=y,i.ungzip=v},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var aje=globalThis.fetch,_x=class{constructor(e,t={},r){this.type=e,this.detail=t,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},qye=class{constructor(){this.listeners={}}addEventListener(e,t,r){let o=this.listeners[e]||[];r?o.unshift(t):o.push(t),this.listeners[e]=o}removeEventListener(e,t){let r=this.listeners[e]||[],o=r.findIndex(n=>n===t);o>-1&&(r.splice(o,1),this.listeners[e]=r)}dispatch(e){let t=this.listeners[e.type];if(t)for(let r=0,o=t.length;r<o&&e.__mayPropagate;r++)t[r](e)}},Zye=new Date("1904-01-01T00:00:00+0000").getTime();function Kye(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var Xye=class{constructor(e,t,r){this.name=(r||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let n=o.replace(/get(Big)?/,"").toLowerCase(),i=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,n,{get:()=>this.getValue(o,i)})})}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let r=this.start+this.offset;this.offset+=t;try{return this.data[e](r)}catch(o){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),o}}flags(e){if(e===8||e===16||e===32||e===64)return this[`uint${e}`].toString(2).padStart(e,0).split("").map(t=>t==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let e=this.uint32;return Kye([e>>24&255,e>>16&255,e>>8&255,e&255])}get fixed(){let e=this.int16,t=Math.round(1e3*this.uint16/65356);return e+t/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let r=this.uint8;if(e=e*128+(r&127),r<128)break}return e}get longdatetime(){return new Date(Zye+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let n=`${o?"":"u"}int${r}`,i=[];for(;e--;)i.push(this[n]);return i}},pr=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},qe=class extends pr{constructor(e,t,r){let{parser:o,start:n}=super(new Xye(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function we(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var Qye=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:12},t,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new Jye(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);we(this.tables,n.tag.trim(),i)})}},Jye=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},lU=aU.inflate||void 0,cU=void 0,$ye=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:44},t,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new ebe(o)),tbe(this,t,r)}},ebe=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function tbe(e,t,r){e.tables={},e.directory.forEach(o=>{we(e.tables,o.tag.trim(),()=>{let n=0,i=t;if(o.compLength!==o.origLength){let a=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(lU)l=lU(new Uint8Array(a));else if(cU)l=cU(new Uint8Array(a));else{let c="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(c),new Error(c)}i=new DataView(l.buffer)}else n=o.offset;return r(e.tables,{tag:o.tag,offset:n,length:o.origLength},i)})})}var uU=sU,dU=void 0,rbe=class extends qe{constructor(e,t,r){let{p:o}=super({offset:0,length:48},t,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new obe(o));let n=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,c)=>{let u=this.directory[c+1];u&&(u.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let i,a=t.buffer.slice(n);if(uU)i=uU(new Uint8Array(a));else if(dU)i=new Uint8Array(dU(a));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}nbe(this,i,r)}},obe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=ibe(t);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=e.uint128,o&&(this.transformLength=e.uint128)}};function nbe(e,t,r){e.tables={},e.directory.forEach(o=>{we(e.tables,o.tag.trim(),()=>{let n=o.offset,i=n+(o.transformLength?o.transformLength:o.origLength),a=new DataView(t.slice(n,i).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},a)}catch(l){console.error(l)}})})}function ibe(e){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][e&63]}var yU={},bU=!1;Promise.all([Promise.resolve().then(function(){return Nbe}),Promise.resolve().then(function(){return Dbe}),Promise.resolve().then(function(){return Mbe}),Promise.resolve().then(function(){return jbe}),Promise.resolve().then(function(){return Ube}),Promise.resolve().then(function(){return qbe}),Promise.resolve().then(function(){return Kbe}),Promise.resolve().then(function(){return Qbe}),Promise.resolve().then(function(){return a0e}),Promise.resolve().then(function(){return y0e}),Promise.resolve().then(function(){return i1e}),Promise.resolve().then(function(){return a1e}),Promise.resolve().then(function(){return d1e}),Promise.resolve().then(function(){return h1e}),Promise.resolve().then(function(){return v1e}),Promise.resolve().then(function(){return b1e}),Promise.resolve().then(function(){return w1e}),Promise.resolve().then(function(){return C1e}),Promise.resolve().then(function(){return P1e}),Promise.resolve().then(function(){return E1e}),Promise.resolve().then(function(){return A1e}),Promise.resolve().then(function(){return I1e}),Promise.resolve().then(function(){return D1e}),Promise.resolve().then(function(){return L1e}),Promise.resolve().then(function(){return V1e}),Promise.resolve().then(function(){return z1e}),Promise.resolve().then(function(){return H1e}),Promise.resolve().then(function(){return W1e}),Promise.resolve().then(function(){return q1e}),Promise.resolve().then(function(){return X1e}),Promise.resolve().then(function(){return rSe}),Promise.resolve().then(function(){return sSe}),Promise.resolve().then(function(){return cSe}),Promise.resolve().then(function(){return mSe}),Promise.resolve().then(function(){return hSe}),Promise.resolve().then(function(){return vSe}),Promise.resolve().then(function(){return SSe}),Promise.resolve().then(function(){return wSe}),Promise.resolve().then(function(){return kSe}),Promise.resolve().then(function(){return RSe}),Promise.resolve().then(function(){return ISe})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];yU[r]=t[r]}),bU=!0});function sbe(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=yU[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function abe(){let e=0;function t(r,o){if(!bU)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(sbe)}return new Promise((r,o)=>t(r))}function lbe(e,t){let r=e.lastIndexOf("."),o=(e.substring(r+1)||"").toLowerCase(),n={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(n)return n;let i={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(i||(i=`${e} is not a known webfont format.`),t)throw new Error(i);console.warn(`Could not load font: ${i}`)}async function cbe(e,t,r={}){if(!globalThis.document)return;let o=lbe(t,r.errorOnStyle);if(!o)return;let n=document.createElement("style");n.className="injected-by-Font-js";let i=[];return r.styleRules&&(i=Object.entries(r.styleRules).map(([a,l])=>`${a}: ${l};`)),n.textContent=`
@font-face {
    font-family: "${e}";
    ${i.join(`
	`)}
    src: url("${t}") format("${o}");
}`,globalThis.document.head.appendChild(n),n}var ube=[0,1,0,0],dbe=[79,84,84,79],fbe=[119,79,70,70],mbe=[119,79,70,50];function wx(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function pbe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(wx(t,ube)||wx(t,dbe))return"SFNT";if(wx(t,fbe))return"WOFF";if(wx(t,mbe))return"WOFF2"}function hbe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var Cx=class extends qye{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>(globalThis.document&&!this.options.skipStyleSheet&&await cbe(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>hbe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new _x("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=pbe(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new _x("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return abe().then(t=>(e==="SFNT"&&(this.opentype=new Qye(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new $ye(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new rbe(this,this.fontData,t)),this.opentype))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let n=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=n.sTypoAscender,o.descender=n.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new _x("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let e=new _x("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=Cx;var $l=class extends pr{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},gbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>e.uint8)}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},vbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(a=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;we(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(a=>new ybe(e))));let i=n+o*8;we(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(a=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],n=this.subHeaders[o],i=n.firstCode,a=i+n.entryCount;return i<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,lastCode:t.lastCode})):this.subHeaders.map(t=>({start:t.firstCode,end:t.lastCode}))}},ybe=class{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}},bbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;let o=e.currentPosition;we(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;we(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;we(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let a=i+this.segCountX2;we(this,"idRangeOffset",()=>e.readBytes(this.segCount,a,16));let l=a+this.segCountX2,c=this.length-(l-this.tableStart);we(this,"glyphIdArray",()=>e.readBytes(c,l,16)),we(this,"segments",()=>this.buildSegments(a,l,e))}buildSegments(e,t,r){let o=(n,i)=>{let a=this.startCode[i],l=this.endCode[i],c=this.idDelta[i],u=this.idRangeOffset[i],d=e+2*i,f=[];if(u===0)for(let m=a+c,h=l+c;m<=h;m++)f.push(m);else for(let m=0,h=l-a;m<=h;m++)r.currentPosition=d+u+m*2,f.push(r.uint16);return{startCode:a,endCode:l,idDelta:c,idRangeOffset:u,glyphIDs:f}};return[...new Array(this.segCount)].map(o)}reverse(e){let t=this.segments.find(o=>o.glyphIDs.includes(e));if(!t)return{};let r=t.startCode+t.glyphIDs.indexOf(e);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535)return 0;let t=this.segments.find(r=>r.startCode<=e&&e<=r.endCode);return t?t.glyphIDs[e-t.startCode]:0}supports(e){return this.getGlyphId(e)!==0}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map(t=>({start:t.startCode,end:t.endCode}))}},Sbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,we(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(n=>e.uint16))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};let t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},_be=class extends $l{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(n=>e.uint8),this.numGroups=e.uint32,we(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new wbe(e)))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(t=>t.startcharCode<=e&&e<=t.endcharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startcharCode,end:t.endcharCode}))}},wbe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},xbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,we(this,"glyphs",()=>[...new Array(this.numChars)].map(n=>e.uint16))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),e<this.startCharCode||e>this.startCharCode+this.numChars?!1:e-this.startCharCode}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},Cbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,we(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new Tbe(e)))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535?0:this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){for(let t of this.groups){let r=t.startGlyphID;if(r>e)continue;if(r===e)return t.startCharCode;if(r+(t.endCharCode-t.startCharCode)<e)continue;let n=t.startCharCode+(e-r);return{code:n,unicode:String.fromCodePoint(n)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},Tbe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},Pbe=class extends $l{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(n=>new kbe(e));we(this,"groups",o)}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},kbe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},Ebe=class extends $l{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,we(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Rbe(e)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find(r=>r.varSelector===e);return t||!1}getSupportedVariations(){return this.varSelectors.map(e=>e.varSelector)}},Rbe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function Abe(e,t,r){let o=e.uint16;return o===0?new gbe(e,t,r):o===2?new vbe(e,t,r):o===4?new bbe(e,t,r):o===6?new Sbe(e,t,r):o===8?new _be(e,t,r):o===10?new xbe(e,t,r):o===12?new Cbe(e,t,r):o===13?new Pbe(e,t,r):o===14?new Ebe(e,t,r):{}}var Obe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new Ibe(r,this.tableStart))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map(e=>({platformID:e.platformID,encodingId:e.encodingID}))}getSupportedCharCodes(e,t){let r=this.encodingRecords.findIndex(n=>n.platformID===e&&n.encodingID===t);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let r=this.getSubTable(t).reverse(e);if(r)return r}}getGlyphId(e){let t=0;return this.encodingRecords.some((r,o)=>{let n=this.getSubTable(o);return n.getGlyphId?(t=n.getGlyphId(e),t!==0):!1}),t}supports(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(e)!==!1})}supportsVariation(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(e)!==!1})}},Ibe=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;we(this,"table",()=>(e.currentPosition=t+n,Abe(e,r,o)))}},Nbe=Object.freeze({__proto__:null,cmap:Obe}),Fbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Dbe=Object.freeze({__proto__:null,head:Fbe}),Bbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},Mbe=Object.freeze({__proto__:null,hhea:Bbe}),Lbe=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,a=o.currentPosition;if(we(this,"hMetrics",()=>(o.currentPosition=a,[...new Array(n)].map(l=>new Vbe(o.uint16,o.int16)))),n<i){let l=a+n*4;we(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},Vbe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},jbe=Object.freeze({__proto__:null,hmtx:Lbe}),zbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Ube=Object.freeze({__proto__:null,maxp:zbe}),Hbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Wbe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new Gbe(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find(r=>r.nameID===e);if(t)return t.string}},Gbe=class{constructor(e,t){this.length=e,this.offset=t}},Wbe=class{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,we(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,Ybe(e,this)))}};function Ybe(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let a=[];for(let l=0,c=o/2;l<c;l++)a[l]=String.fromCharCode(e.uint16);return a.join("")}let n=e.readBytes(o),i=[];return n.forEach(function(a,l){i[l]=String.fromCharCode(a)}),i.join("")}var qbe=Object.freeze({__proto__:null,name:Hbe}),Zbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.uint16,this.xAvgCharWidth=r.int16,this.usWeightClass=r.uint16,this.usWidthClass=r.uint16,this.fsType=r.uint16,this.ySubscriptXSize=r.int16,this.ySubscriptYSize=r.int16,this.ySubscriptXOffset=r.int16,this.ySubscriptYOffset=r.int16,this.ySuperscriptXSize=r.int16,this.ySuperscriptYSize=r.int16,this.ySuperscriptXOffset=r.int16,this.ySuperscriptYOffset=r.int16,this.yStrikeoutSize=r.int16,this.yStrikeoutPosition=r.int16,this.sFamilyClass=r.int16,this.panose=[...new Array(10)].map(o=>r.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Kbe=Object.freeze({__proto__:null,OS2:Zbe}),Xbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;o<this.numGlyphs;o++){if(this.glyphNameIndex[o]<fU.length){this.glyphNameOffsets.push(this.glyphNameOffsets[o]);continue}let i=r.int8;r.skip(i),this.glyphNameOffsets.push(this.glyphNameOffsets[o]+i+1)}}this.version===2.5&&(this.offset=[...new Array(this.numGlyphs)].map(o=>r.int8))}getGlyphName(e){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return fU[t];let r=this.glyphNameOffsets[e],n=this.glyphNameOffsets[e+1]-r-1;return n===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(n,this.namesOffset+r,8,!0).map(a=>String.fromCharCode(a)).join(""))}},fU=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],Qbe=Object.freeze({__proto__:null,post:Xbe}),Jbe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,we(this,"horizAxis",()=>new D6({offset:e.offset+this.horizAxisOffset},t)),we(this,"vertAxis",()=>new D6({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,we(this,"itemVarStore",()=>new D6({offset:e.offset+this.itemVarStoreOffset},t)))}},D6=class extends qe{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,we(this,"baseTagList",()=>new $be({offset:e.offset+this.baseTagListOffset},t)),we(this,"baseScriptList",()=>new e0e({offset:e.offset+this.baseScriptListOffset},t))}},$be=class extends qe{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},e0e=class extends qe{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;we(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new t0e(this.start,r))))}},t0e=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,we(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new r0e(t)))}},r0e=class{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(t=>new o0e(this.start,e)),we(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new n0e(e))),we(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new SU(e)))}},o0e=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,we(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new SU(t)))}},n0e=class{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(t=>e.Offset16)}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new s0e(this.parser)}},SU=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;we(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new i0e(e))))}},i0e=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},s0e=class{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,this.baseCoordFormat===2&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),this.baseCoordFormat===3&&(this.deviceTable=e.Offset16)}},a0e=Object.freeze({__proto__:null,BASE:Jbe}),mU=class{constructor(e){this.classFormat=e.uint16,this.classFormat===1&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.classFormat===2&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(t=>new l0e(e)))}},l0e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},Eb=class extends pr{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new c0e(e)))}},c0e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},u0e=class{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>t.Offset32)}},d0e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,we(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new mU(r)}),this.attachListOffset=r.Offset16,we(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new f0e(r)}),this.ligCaretListOffset=r.Offset16,we(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new p0e(r)}),this.markAttachClassDefOffset=r.Offset16,we(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new mU(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,we(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new v0e(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,we(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new u0e(r)}))}},f0e=class extends pr{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16)}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new m0e(this.parser)}},m0e=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},p0e=class extends pr{constructor(e){super(e),this.coverageOffset=e.Offset16,we(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new Eb(e))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(t=>e.Offset16)}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new h0e(this.parser)}},h0e=class extends pr{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(t=>e.Offset16)}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new g0e(this.parser)}},g0e=class{constructor(e){this.caretValueFormat=e.uint16,this.caretValueFormat===1&&(this.coordinate=e.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=e.uint16),this.caretValueFormat===3&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}},v0e=class extends pr{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(t=>e.Offset32)}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new Eb(this.parser)}},y0e=Object.freeze({__proto__:null,GDEF:d0e}),pU=class extends pr{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new b0e(e))}},b0e=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},S0e=class extends pr{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new _0e(e))}},_0e=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},hU=class{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(t=>e.uint16)}},gU=class extends pr{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new w0e(e))}},w0e=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},x0e=class extends pr{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(t=>e.uint16)}getFeatureParams(){if(this.featureParams>0){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new T0e(e);if(t.startsWith("cc"))return new C0e(e);if(t.startsWith("ss"))return new P0e(e)}}},C0e=class{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map(t=>e.uint24)}},T0e=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},P0e=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function _U(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Vf=class extends pr{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new Eb(e)}},M6=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},k0e=class extends Vf{constructor(e){super(e),this.deltaGlyphID=e.int16}},E0e=class extends Vf{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(t=>e.Offset16)}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new R0e(t)}},R0e=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},A0e=class extends Vf{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(t=>e.Offset16)}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new O0e(t)}},O0e=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},I0e=class extends Vf{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(t=>e.Offset16)}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new N0e(t)}},N0e=class extends pr{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(t=>e.Offset16)}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new F0e(t)}},F0e=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},D0e=class extends Vf{constructor(e){super(e),this.substFormat===1&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(_U(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(t=>e.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new M6(e)))}getSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new B0e(t)}getSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new M0e(t)}getCoverageTable(e){if(this.substFormat!==3&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new Eb(t)}},B0e=class extends pr{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new wU(t)}},wU=class{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(t=>e.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new M6(e))}},M0e=class extends pr{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new L0e(t)}},L0e=class extends wU{constructor(e){super(e)}},V0e=class extends Vf{constructor(e){super(e),this.substFormat===1&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(_U(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(t=>new xU(e)))}getChainSubRuleSet(e){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new j0e(t)}getChainSubClassSet(e){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new U0e(t)}getCoverageFromOffset(e){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new Eb(t)}},j0e=class extends pr{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(t=>e.Offset16)}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new z0e(t)}},z0e=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(t=>new M6(e))}},U0e=class extends pr{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(t=>e.Offset16)}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new H0e(t)}},H0e=class{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(t=>e.uint16),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(t=>e.uint16),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(t=>e.uint16),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(t=>new xU(e))}},xU=class extends pr{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},G0e=class extends pr{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},W0e=class extends Vf{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(t=>e.Offset16),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(t=>e.Offset16),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},Y0e={buildSubtable:function(e,t){let r=new[void 0,k0e,E0e,A0e,I0e,D0e,V0e,G0e,W0e][e](t);return r.type=e,r}},ec=class extends pr{constructor(e){super(e)}},q0e=class extends ec{constructor(e){super(e),console.log("lookup type 1")}},Z0e=class extends ec{constructor(e){super(e),console.log("lookup type 2")}},K0e=class extends ec{constructor(e){super(e),console.log("lookup type 3")}},X0e=class extends ec{constructor(e){super(e),console.log("lookup type 4")}},Q0e=class extends ec{constructor(e){super(e),console.log("lookup type 5")}},J0e=class extends ec{constructor(e){super(e),console.log("lookup type 6")}},$0e=class extends ec{constructor(e){super(e),console.log("lookup type 7")}},e1e=class extends ec{constructor(e){super(e),console.log("lookup type 8")}},t1e=class extends ec{constructor(e){super(e),console.log("lookup type 9")}},r1e={buildSubtable:function(e,t){let r=new[void 0,q0e,Z0e,K0e,X0e,Q0e,J0e,$0e,e1e,t1e][e](t);return r.type=e,r}},vU=class extends pr{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},o1e=class extends pr{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?Y0e:r1e;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},CU=class extends qe{constructor(e,t,r){let{p:o,tableStart:n}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let i=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);we(this,"scriptList",()=>i?pU.EMPTY:(o.currentPosition=n+this.scriptListOffset,new pU(o))),we(this,"featureList",()=>i?gU.EMPTY:(o.currentPosition=n+this.featureListOffset,new gU(o))),we(this,"lookupList",()=>i?vU.EMPTY:(o.currentPosition=n+this.lookupListOffset,new vU(o))),this.featureVariationsOffset&&we(this,"featureVariations",()=>i?FeatureVariations.EMPTY:(o.currentPosition=n+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(e=>e.scriptTag)}getScriptTable(e){let t=this.scriptList.scriptRecords.find(o=>o.scriptTag===e);this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let r=new S0e(this.parser);return r.scriptTag=e,r}ensureScriptTable(e){return typeof e=="string"?this.getScriptTable(e):e}getSupportedLangSys(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys!==0,r=e.langSysRecords.map(o=>o.langSysTag);return t&&r.unshift("dflt"),r}getDefaultLangSysTable(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys;if(t!==0){this.parser.currentPosition=e.start+t;let r=new hU(this.parser);return r.langSysTag="",r.defaultForScript=e.scriptTag,r}}getLangSysTable(e,t="dflt"){if(t==="dflt")return this.getDefaultLangSysTable(e);e=this.ensureScriptTable(e);let r=e.langSysRecords.find(n=>n.langSysTag===t);this.parser.currentPosition=e.start+r.langSysOffset;let o=new hU(this.parser);return o.langSysTag=t,o}getFeatures(e){return e.featureIndices.map(t=>this.getFeature(t))}getFeature(e){let t;if(parseInt(e)==e?t=this.featureList.featureRecords[e]:t=this.featureList.featureRecords.find(o=>o.featureTag===e),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let r=new x0e(this.parser);return r.featureTag=t.featureTag,r}getLookups(e){return e.lookupListIndices.map(t=>this.getLookup(t))}getLookup(e,t){let r=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+r,new o1e(this.parser,t)}},n1e=class extends CU{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},i1e=Object.freeze({__proto__:null,GSUB:n1e}),s1e=class extends CU{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},a1e=Object.freeze({__proto__:null,GPOS:s1e}),l1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new c1e(r)}},c1e=class extends pr{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new u1e(e))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let r=this.start+t.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex(r=>r.startGlyphID<=e&&e<=r.endGlyphID);return t===-1?"":this.getDocument(t)}},u1e=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},d1e=Object.freeze({__proto__:null,SVG:l1e}),f1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;we(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new m1e(r))));let n=o+this.axisCount*this.axisSize;we(this,"instances",()=>{let i=[];for(let a=0;a<this.instanceCount;a++)r.currentPosition=n+a*this.instanceSize,i.push(new p1e(r,this.axisCount,this.instanceSize));return i})}getSupportedAxes(){return this.axes.map(e=>e.tag)}getAxis(e){return this.axes.find(t=>t.tag===e)}},m1e=class{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}},p1e=class{constructor(e,t,r){let o=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map(n=>e.fixed),e.currentPosition-o<r&&(this.postScriptNameID=e.uint16)}},h1e=Object.freeze({__proto__:null,fvar:f1e}),g1e=class extends qe{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;we(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},v1e=Object.freeze({__proto__:null,cvt:g1e}),y1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},b1e=Object.freeze({__proto__:null,fpgm:y1e}),S1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,we(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new _1e(r)))}},_1e=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},w1e=Object.freeze({__proto__:null,gasp:S1e}),x1e=class extends qe{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},C1e=Object.freeze({__proto__:null,glyf:x1e}),T1e=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,we(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):we(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset32))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1,r=this.offsets[e+1]*this.x2?2:1;return{offset:t,length:r-t}}},P1e=Object.freeze({__proto__:null,loca:T1e}),k1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},E1e=Object.freeze({__proto__:null,prep:k1e}),R1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"data",()=>r.readBytes())}},A1e=Object.freeze({__proto__:null,CFF:R1e}),O1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);we(this,"data",()=>r.readBytes())}},I1e=Object.freeze({__proto__:null,CFF2:O1e}),N1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,we(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new F1e(r)))}},F1e=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},D1e=Object.freeze({__proto__:null,VORG:N1e}),B1e=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new xx(e),this.vert=new xx(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}},M1e=class{constructor(e){this.hori=new xx(e),this.vert=new xx(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},xx=class{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}},TU=class extends qe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,we(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new B1e(o)))}},L1e=Object.freeze({__proto__:null,EBLC:TU}),PU=class extends qe{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},V1e=Object.freeze({__proto__:null,EBDT:PU}),j1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,we(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new M1e(r)))}},z1e=Object.freeze({__proto__:null,EBSC:j1e}),U1e=class extends TU{constructor(e,t){super(e,t,"CBLC")}},H1e=Object.freeze({__proto__:null,CBLC:U1e}),G1e=class extends PU{constructor(e,t){super(e,t,"CBDT")}},W1e=Object.freeze({__proto__:null,CBDT:G1e}),Y1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,we(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},q1e=Object.freeze({__proto__:null,sbix:Y1e}),Z1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let r=new B6(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new B6(this.parser),a=i.gID;if(o===e)return r;if(a===e)return i;for(;t!==n;){let l=t+(n-t)/12;this.parser.currentPosition=l;let c=new B6(this.parser),u=c.gID;if(u===e)return c;u>e?n=l:u<e&&(t=l)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map(r=>new K1e(p))}},B6=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},K1e=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},X1e=Object.freeze({__proto__:null,COLR:Z1e}),Q1e=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(n=>r.uint16),we(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new J1e(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,we(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new $1e(r,o))),we(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new eSe(r,o))),we(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new tSe(r,o))))}},J1e=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},$1e=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},eSe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},tSe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},rSe=Object.freeze({__proto__:null,CPAL:Q1e}),oSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new nSe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new iSe(this.parser)}},nSe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},iSe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},sSe=Object.freeze({__proto__:null,DSIG:oSe}),aSe=class extends qe{constructor(e,t,r){let{p:o}=super(e,t),n=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(i=>new lSe(o,n))}},lSe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},cSe=Object.freeze({__proto__:null,hdmx:aSe}),uSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,we(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let a=new dSe(r);n.push(a),o+=a}return n})}},dSe=class{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,this.format===0&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,we(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new fSe(e)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},fSe=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},mSe=Object.freeze({__proto__:null,kern:uSe}),pSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},hSe=Object.freeze({__proto__:null,LTSH:pSe}),gSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,we(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},vSe=Object.freeze({__proto__:null,MERG:gSe}),ySe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new bSe(this.tableStart,r))}},bSe=class{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},SSe=Object.freeze({__proto__:null,meta:ySe}),_Se=class extends qe{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},wSe=Object.freeze({__proto__:null,PCLT:_Se}),xSe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new CSe(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new TSe(r))}},CSe=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},TSe=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new PSe(e))}},PSe=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},kSe=Object.freeze({__proto__:null,VDMX:xSe}),ESe=class extends qe{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},RSe=Object.freeze({__proto__:null,vhea:ESe}),ASe=class extends qe{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,n=r.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=i,[...new Array(o)].map(a=>new OSe(p.uint16,p.int16)))),o<n){let a=i+o*4;lazy(this,"topSideBearings",()=>(p.currentPosition=a,[...new Array(n-o)].map(l=>p.int16)))}}},OSe=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},ISe=Object.freeze({__proto__:null,vmtx:ASe});var kU=s(A(),1);var{kebabCase:NSe}=rt(kU.privateApis);function EU(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:NSe(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var ni=s(C(),1);function FSe(){let{installFonts:e}=(0,Rb.useContext)(Lo),[t,r]=(0,Rb.useState)(!1),[o,n]=(0,Rb.useState)(null),i=h=>{l(h)},a=h=>{l(h.target.files)},l=async h=>{if(!h)return;n(null),r(!0);let g=new Set,v=[...h],y=!1,b=v.map(async S=>{if(!await u(S))return y=!0,null;if(g.has(S.name))return null;let T=(((S.name??"").split(".")??[]).pop()??"").toLowerCase();return O6.includes(T)?(g.add(S.name),S):null}),_=(await Promise.all(b)).filter(S=>S!==null);if(_.length>0)c(_);else{let S=y?(0,ah.__)("Sorry, you are not allowed to upload this file type."):(0,ah.__)("No fonts found to install.");n({type:"error",message:S}),r(!1)}},c=async h=>{let g=await Promise.all(h.map(async v=>{let y=await f(v);return await Lu(y,y.file,"all"),y}));m(g)};async function u(h){let g=new Cx("Uploaded Font");try{let v=await d(h);return await g.fromDataBuffer(v,"font"),!0}catch{return!1}}async function d(h){return new Promise((g,v)=>{let y=new window.FileReader;y.readAsArrayBuffer(h),y.onload=()=>g(y.result),y.onerror=v})}let f=async h=>{let g=await d(h),v=new Cx("Uploaded Font");v.fromDataBuffer(g,h.name);let b=(await new Promise(z=>v.onload=z)).detail.font,{name:_}=b.opentype.tables,S=_.get(16)||_.get(1),x=_.get(2).toLowerCase().includes("italic"),T=b.opentype.tables["OS/2"].usWeightClass||"normal",F=!!b.opentype.tables.fvar&&b.opentype.tables.fvar.axes.find(({tag:z})=>z==="wght"),B=F?`${F.minValue} ${F.maxValue}`:null;return{file:h,fontFamily:S,fontStyle:x?"italic":"normal",fontWeight:B||T}},m=async h=>{let g=EU(h);try{await e(g),n({type:"success",message:(0,ah.__)("Fonts were installed successfully.")})}catch(v){let y=v;n({type:"error",message:y.message,errors:y?.installationErrors})}r(!1)};return(0,ni.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,ni.jsx)(on.DropZone,{onFilesDrop:i}),(0,ni.jsxs)(on.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,ni.jsxs)(on.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,ni.jsx)("ul",{children:o.errors.map((h,g)=>(0,ni.jsx)("li",{children:h},g))})]}),t&&(0,ni.jsx)(on.FlexItem,{children:(0,ni.jsx)("div",{className:"font-library__upload-area",children:(0,ni.jsx)(on.ProgressBar,{})})}),!t&&(0,ni.jsx)(on.FormFileUpload,{accept:O6.map(h=>`.${h}`).join(","),multiple:!0,onChange:a,render:({openFileDialog:h})=>(0,ni.jsx)(on.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,ah.__)("Upload font")})}),(0,ni.jsx)(on.__experimentalText,{className:"font-library__upload-area__text",children:(0,ah.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var Tx=FSe;var Ks=s(C(),1),{Tabs:Px}=rt(kx.privateApis),DSe={id:"installed-fonts",title:(0,lh._x)("Library","Font library")},BSe={id:"upload-fonts",title:(0,lh._x)("Upload","noun")},MSe=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,lh.__)("Install Fonts"):r}));function LSe({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,Ex.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,RU.useSelect)(i=>i(Ex.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[DSe];return o&&(n.push(BSe),n.push(...MSe(r||[]))),(0,Ks.jsx)(kx.Modal,{title:(0,lh.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,Ks.jsxs)(Px,{defaultTabId:t,children:[(0,Ks.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,Ks.jsx)(Px.TabList,{children:n.map(({id:i,title:a})=>(0,Ks.jsx)(Px.Tab,{tabId:i,children:a},i))})}),n.map(({id:i})=>{let a;switch(i){case"upload-fonts":a=(0,Ks.jsx)(Tx,{});break;case"installed-fonts":a=(0,Ks.jsx)(gx,{});break;default:a=(0,Ks.jsx)(yx,{slug:i})}return(0,Ks.jsx)(Px.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:a},i)})]})})}var AU=LSe;var Rx=s(E(),1),jf=s(A(),1),OU=s(D(),1);var ch=s(C(),1);function VSe({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,OU.useContext)(Lo),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=Af(e);return(0,ch.jsx)(jf.__experimentalItem,{onClick:n,children:(0,ch.jsxs)(jf.__experimentalHStack,{justify:"space-between",children:[(0,ch.jsx)(jf.FlexItem,{style:i,children:e.name}),(0,ch.jsx)(jf.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,Rx.sprintf)((0,Rx._n)("%d variant","%d variants",o),o)})]})})}var IU=VSe;var qr=s(C(),1);function NU(e,t){return e?e.map(r=>Ql(r,{source:t})):[]}function jSe(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,FU.useContext)(Lo),[o]=pe("typography.fontFamilies"),[n]=pe("typography.fontFamilies",void 0,"base"),i=NU(o?.theme,"theme"),a=NU(o?.custom,"custom"),l=[...i,...a].sort((d,f)=>d.name.localeCompare(f.name)),c=0<l.length,u=c||n?.theme?.length>0||(e?.length??0)>0;return(0,qr.jsxs)(qr.Fragment,{children:[!!t&&(0,qr.jsx)(AU,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,qr.jsxs)(Xs.__experimentalVStack,{spacing:2,children:[(0,qr.jsxs)(Xs.__experimentalHStack,{justify:"space-between",children:[(0,qr.jsx)(Tr,{level:3,children:(0,zf.__)("Fonts")}),(0,qr.jsx)(Xs.Button,{onClick:()=>r?.("installed-fonts"),label:(0,zf.__)("Manage fonts"),icon:FA,size:"small"})]}),l.length>0&&(0,qr.jsx)(qr.Fragment,{children:(0,qr.jsx)(Xs.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,qr.jsx)(IU,{font:d},d.slug))})}),!c&&(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(Xs.__experimentalText,{as:"p",children:u?(0,zf.__)("No fonts activated."):(0,zf.__)("No fonts installed.")}),(0,qr.jsx)(Xs.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,zf.__)("Manage fonts"):(0,zf.__)("Add fonts")})]})]})]})}function DU({...e}){return(0,qr.jsx)(dx,{children:(0,qr.jsx)(jSe,{...e})})}var Ab=s(E(),1),tc=s(A(),1);var za=s(C(),1);function zSe(){return(0,za.jsxs)(tc.__experimentalVStack,{spacing:2,children:[(0,za.jsx)(tc.__experimentalHStack,{justify:"space-between",children:(0,za.jsx)(Tr,{level:3,children:(0,Ab.__)("Font Sizes")})}),(0,za.jsx)(tc.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,za.jsx)(fr,{path:"/typography/font-sizes",children:(0,za.jsxs)(tc.__experimentalHStack,{direction:"row",children:[(0,za.jsx)(tc.FlexItem,{children:(0,Ab.__)("Font size presets")}),(0,za.jsx)(No,{icon:(0,Ab.isRTL)()?Nt:Ft})]})})})]})}var BU=zSe;var fs=s(C(),1);function USe(){let{fontLibraryEnabled:e}=(0,LU.useContext)(Br);return(0,fs.jsxs)(fs.Fragment,{children:[(0,fs.jsx)(St,{title:(0,Ax.__)("Typography"),description:(0,Ax.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,fs.jsx)(Bu,{children:(0,fs.jsxs)(MU.__experimentalVStack,{spacing:7,children:[(0,fs.jsx)(oh,{title:(0,Ax.__)("Typesets")}),e&&(0,fs.jsx)(DU,{}),(0,fs.jsx)(Pz,{}),(0,fs.jsx)(BU,{})]})})]})}var VU=USe;var Bt=s(E(),1),Ni=s(A(),1),YU=s(D(),1);var jU=s($(),1);var zU=s(C(),1),{useSettingsForBlockElement:HSe,TypographyPanel:GSe}=rt(jU.privateApis);function UU({element:e,headingLevel:t}){let r=[];e==="heading"?r=r.concat(["elements",t]):e&&e!=="text"&&(r=r.concat(["elements",e]));let o=r.join("."),[n]=Ee(o,"","user",!1),[i,a]=Ee(o,"","merged",!1),[l]=pe(""),u=HSe(l,void 0,e==="heading"?t:e);return(0,zU.jsx)(GSe,{inheritedValue:i,value:n,onChange:a,settings:u})}var HU=s(C(),1);function GU({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=Ee(o+"typography.fontFamily",e),[i]=Ee(o+"color.gradient",e),[a]=Ee(o+"color.background",e),[l]=Ee("color.background"),[c]=Ee(o+"color.text",e),[u]=Ee(o+"typography.fontSize",e),[d]=Ee(o+"typography.fontStyle",e),[f]=Ee(o+"typography.fontWeight",e),[m]=Ee(o+"typography.letterSpacing",e);return(0,HU.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontFamily:n??"serif",background:i??a??l,color:c,fontSize:u,fontStyle:d,fontWeight:f,letterSpacing:m,...t==="link"?{textDecoration:"underline"}:{}},children:"Aa"})}var So=s(C(),1),WU={text:{description:(0,Bt.__)("Manage the fonts used on the site."),title:(0,Bt.__)("Text")},link:{description:(0,Bt.__)("Manage the fonts and typography used on the links."),title:(0,Bt.__)("Links")},heading:{description:(0,Bt.__)("Manage the fonts and typography used on headings."),title:(0,Bt.__)("Headings")},caption:{description:(0,Bt.__)("Manage the fonts and typography used on captions."),title:(0,Bt.__)("Captions")},button:{description:(0,Bt.__)("Manage the fonts and typography used on buttons."),title:(0,Bt.__)("Buttons")}};function WSe({element:e}){let[t,r]=(0,YU.useState)("heading");return(0,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(St,{title:WU[e].title,description:WU[e].description}),(0,So.jsx)(Ni.__experimentalSpacer,{marginX:4,children:(0,So.jsx)(GU,{element:e,headingLevel:t})}),e==="heading"&&(0,So.jsx)(Ni.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,So.jsxs)(Ni.__experimentalToggleGroupControl,{label:(0,Bt.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,size:"__unstable-large",children:[(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,Bt.__)("All headings"),label:(0,Bt._x)("All","heading levels")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 1"),label:(0,Bt.__)("H1")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 2"),label:(0,Bt.__)("H2")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 3"),label:(0,Bt.__)("H3")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 4"),label:(0,Bt.__)("H4")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 5"),label:(0,Bt.__)("H5")}),(0,So.jsx)(Ni.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,Bt.__)("Heading 6"),label:(0,Bt.__)("H6")})]})}),(0,So.jsx)(UU,{element:e,headingLevel:t})]})}var uh=WSe;var L6=s(E(),1),JU=s(A(),1),$U=s($(),1);var Fi=s(A(),1),dh=s(E(),1);var XU=s(D(),1);var qU=s(A(),1),ZU=s(C(),1);function YSe({className:e,children:t,...r}){return(0,ZU.jsx)(qU.Flex,{className:re("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var KU=YSe;var nn=s(C(),1),Ox=[];function qSe({name:e}){let[t]=pe("color.palette.custom"),[r]=pe("color.palette.theme"),[o]=pe("color.palette.default"),[n]=pe("color.defaultPalette",e),i=t||Ox,a=r||Ox,l=o||Ox,c=n??!0,u=(0,XU.useMemo)(()=>[...i,...a,...l&&c?l:Ox],[i,a,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,nn.jsxs)(Fi.__experimentalVStack,{spacing:3,children:[(0,nn.jsx)(Tr,{level:3,children:(0,dh.__)("Palette")}),(0,nn.jsx)(Fi.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,nn.jsx)(fr,{path:d,children:(0,nn.jsxs)(Fi.__experimentalHStack,{direction:"row",children:[u.length>0?(0,nn.jsxs)(nn.Fragment,{children:[(0,nn.jsx)(Fi.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,nn.jsx)(KU,{children:(0,nn.jsx)(Fi.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,nn.jsx)(Fi.FlexItem,{isBlock:!0,children:(0,dh.__)("Edit palette")})]}):(0,nn.jsx)(Fi.FlexItem,{children:(0,dh.__)("Add colors")}),(0,nn.jsx)(No,{icon:(0,dh.isRTL)()?Nt:Ft})]})})})]})}var QU=qSe;var Ua=s(C(),1),{useSettingsForBlockElement:ZSe,ColorPanel:KSe}=rt($U.privateApis);function XSe(){let[e,t]=Ee("",void 0,"user",!1),[r]=Ee("",void 0,"merged",!1),[o]=pe(""),n=ZSe(o);return(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsx)(St,{title:(0,L6.__)("Colors"),description:(0,L6.__)("Palette colors and the application of those colors on site elements.")}),(0,Ua.jsx)(Bu,{children:(0,Ua.jsx)(JU.__experimentalVStack,{spacing:7,children:(0,Ua.jsx)(QU,{})})}),(0,Ua.jsx)(KSe,{inheritedValue:r,value:e,onChange:t,settings:n})]})}var eH=XSe;var Nb=s(E(),1),cH=s(A(),1);var iH=s(he(),1),oc=s(A(),1),mh=s(E(),1);var Nx=s(A(),1);var Ix=s(A(),1);var tH=s(C(),1);function rH(){let{paletteColors:e}=Qp();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,tH.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var Ob=s(C(),1),QSe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},JSe=({label:e,isFocused:t,withHoverView:r})=>(0,Ob.jsx)($p,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,Ob.jsx)(Ix.__unstableMotion.div,{variants:QSe,style:{height:"100%",overflow:"hidden"},children:(0,Ob.jsx)(Ix.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,Ob.jsx)(rH,{})})},o)}),oH=JSe;var Uf=s(C(),1),nH=["color"];function fh({title:e,gap:t=2}){let r=$w(nH);return r?.length<=1?null:(0,Uf.jsxs)(Nx.__experimentalVStack,{spacing:3,children:[e&&(0,Uf.jsx)(Tr,{level:3,children:e}),(0,Uf.jsx)(Nx.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,Uf.jsx)(rh,{variation:o,isPill:!0,properties:nH,showTooltip:!0,children:()=>(0,Uf.jsx)(oH,{})},n))})]})}var rc=s(C(),1),$Se={placement:"bottom-start",offset:8};function sH({name:e}){let[t,r]=pe("color.palette.theme",e),[o]=pe("color.palette.theme",e,"base"),[n,i]=pe("color.palette.default",e),[a]=pe("color.palette.default",e,"base"),[l,c]=pe("color.palette.custom",e),[u]=pe("color.defaultPalette",e),f=(0,iH.useViewportMatch)("small","<")?$Se:void 0,[m]=Hj(e);return(0,rc.jsxs)(oc.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,rc.jsxs)(oc.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,rc.jsx)(oc.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,mh.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,rc.jsx)(oc.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:MA,onClick:m,children:(0,mh.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,rc.jsx)(oc.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,mh.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,rc.jsx)(oc.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,mh.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,rc.jsx)(fh,{title:(0,mh.__)("Palettes")})]})}var aH=s(he(),1),Ga=s(A(),1),Ib=s(E(),1);var Ha=s(C(),1),e_e={placement:"bottom-start",offset:8},t_e=()=>{};function lH({name:e}){let[t,r]=pe("color.gradients.theme",e),[o]=pe("color.gradients.theme",e,"base"),[n,i]=pe("color.gradients.default",e),[a]=pe("color.gradients.default",e,"base"),[l,c]=pe("color.gradients.custom",e),[u]=pe("color.defaultGradients",e),[d]=pe("color.duotone.custom")||[],[f]=pe("color.duotone.default")||[],[m]=pe("color.duotone.theme")||[],[h]=pe("color.defaultDuotone"),g=[...d||[],...m||[],...f&&h?f:[]],y=(0,aH.useViewportMatch)("small","<")?e_e:void 0;return(0,Ha.jsxs)(Ga.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,Ib.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:y}),!!n&&!!n.length&&!!u&&(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{canReset:n!==a,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,Ib.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:y}),(0,Ha.jsx)(Ga.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,Ib.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:y}),!!g&&!!g.length&&(0,Ha.jsxs)("div",{children:[(0,Ha.jsx)(Tr,{level:3,children:(0,Ib.__)("Duotone")}),(0,Ha.jsx)(Ga.__experimentalSpacer,{margin:3}),(0,Ha.jsx)(Ga.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:t_e,colorPalette:[]})]})]})}var ii=s(C(),1),{Tabs:ph}=rt(cH.privateApis);function r_e({name:e}){return(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsx)(St,{title:(0,Nb.__)("Edit palette"),description:(0,Nb.__)("The combination of colors used across the site and in color pickers.")}),(0,ii.jsxs)(ph,{children:[(0,ii.jsxs)(ph.TabList,{children:[(0,ii.jsx)(ph.Tab,{tabId:"color",children:(0,Nb.__)("Color")}),(0,ii.jsx)(ph.Tab,{tabId:"gradient",children:(0,Nb.__)("Gradient")})]}),(0,ii.jsx)(ph.TabPanel,{tabId:"color",focusable:!1,children:(0,ii.jsx)(sH,{name:e})}),(0,ii.jsx)(ph.TabPanel,{tabId:"gradient",focusable:!1,children:(0,ii.jsx)(lH,{name:e})})]})]})}var uH=r_e;var V6=s(E(),1),pH=s($(),1),hH=s(A(),1);var dH=s($(),1);var fH=s(C(),1),o_e={backgroundSize:"auto"},{BackgroundPanel:n_e}=rt(dH.privateApis);function mH(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1),[o]=pe("");return(0,fH.jsx)(n_e,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:o_e})}var zu=s(C(),1),{useHasBackgroundPanel:i_e}=rt(pH.privateApis);function s_e(){let[e]=pe(""),t=i_e(e);return(0,zu.jsxs)(zu.Fragment,{children:[(0,zu.jsx)(St,{title:(0,V6.__)("Background"),description:(0,zu.jsx)(hH.__experimentalText,{children:(0,V6.__)("Set styles for the site's background.")})}),t&&(0,zu.jsx)(mH,{})]})}var gH=s_e;var an=s(A(),1),sn=s(E(),1);var _H=s(D(),1);var vH=s(A(),1),yH=s(E(),1),bH=s(C(),1);function a_e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,bH.jsx)(vH.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,yH.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var SH=a_e;var kt=s(C(),1),{Menu:Fb}=rt(an.privateApis),z6="6px 6px 9px rgba(0, 0, 0, 0.2)";function wH(){let[e]=pe("shadow.presets.default"),[t]=pe("shadow.defaultPresets"),[r]=pe("shadow.presets.theme"),[o,n]=pe("shadow.presets.custom"),i=d=>{n([...o||[],d])},a=()=>{n([])},[l,c]=(0,_H.useState)(!1),u=()=>c(!l);return(0,kt.jsxs)(kt.Fragment,{children:[l&&(0,kt.jsx)(SH,{text:(0,sn.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,sn.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:a}),(0,kt.jsx)(St,{title:(0,sn.__)("Shadows"),description:(0,sn.__)("Manage and create shadow styles for use across the site.")}),(0,kt.jsx)(Bu,{children:(0,kt.jsxs)(an.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,kt.jsx)(j6,{label:(0,sn.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,kt.jsx)(j6,{label:(0,sn.__)("Theme"),shadows:r||[],category:"theme"}),(0,kt.jsx)(j6,{label:(0,sn.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function j6({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let a=()=>{let l=Jw(t,"shadow-");n?.({name:(0,sn.sprintf)((0,sn.__)("Shadow %d"),l),shadow:z6,slug:`shadow-${l}`})};return(0,kt.jsxs)(an.__experimentalVStack,{spacing:2,children:[(0,kt.jsxs)(an.__experimentalHStack,{justify:"space-between",children:[(0,kt.jsx)(Tr,{level:3,children:e}),(0,kt.jsxs)(an.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,kt.jsx)(an.Button,{size:"small",icon:Pl,label:(0,sn.__)("Add shadow"),onClick:()=>{a()}}),!!t?.length&&r==="custom"&&(0,kt.jsxs)(Fb,{children:[(0,kt.jsx)(Fb.TriggerButton,{render:(0,kt.jsx)(an.Button,{size:"small",icon:Nr,label:(0,sn.__)("Shadow options")})}),(0,kt.jsx)(Fb.Popover,{children:(0,kt.jsx)(Fb.Item,{onClick:i,children:(0,kt.jsx)(Fb.ItemLabel,{children:(0,sn.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,kt.jsx)(an.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,kt.jsx)(l_e,{shadow:l,category:r},l.slug))})]})}function l_e({shadow:e,category:t}){return(0,kt.jsx)(fr,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,kt.jsxs)(an.__experimentalHStack,{children:[(0,kt.jsx)(an.FlexItem,{children:e.name}),(0,kt.jsx)(No,{icon:(0,sn.isRTL)()?Nt:Ft})]})})}var De=s(A(),1),Ut=s(E(),1);var Di=s(D(),1);function xH(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function CH(e){let t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e||e.includes("none"))return t;let r=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,o=e.match(r)||[];if(o.length!==1)return t;let n=o[0].split(" ").map(g=>g.trim()).filter(g=>g);if(n.length<2)return t;let i=e.match(/inset/gi)||[];if(i.length>1)return t;let a=i.length===1,l=e.replace(r,"").trim();a&&(l=l.replace("inset","").replace("INSET","").trim());let c=/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi,u=(l.match(c)||[]).map(g=>g?.trim()).filter(g=>g);if(u.length>1)return t;if(u.length===0&&(u=l.trim().split(" ").filter(g=>g),u.length>1))return t;let[d,f,m,h]=n;return{x:d,y:f,blur:m||t.blur,spread:h||t.spread,inset:a,color:l||t.color}}function TH(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var Te=s(C(),1),{Menu:Db}=rt(De.privateApis),c_e=[{label:(0,Ut.__)("Rename"),action:"rename"},{label:(0,Ut.__)("Delete"),action:"delete"}],u_e=[{label:(0,Ut.__)("Reset"),action:"reset"}];function PH(){let{goBack:e,params:t}=(0,De.useNavigator)(),{category:r,slug:o}=t,[n,i]=pe(`shadow.presets.${r}`);(0,Di.useEffect)(()=>{let x=n?.some(T=>T.slug===o);o&&!x&&e()},[n,o,e]);let[a]=pe(`shadow.presets.${r}`,void 0,"base"),[l,c]=(0,Di.useState)(()=>(n||[]).find(x=>x.slug===o)),u=(0,Di.useMemo)(()=>(a||[]).find(x=>x.slug===o),[a,o]),[d,f]=(0,Di.useState)(!1),[m,h]=(0,Di.useState)(!1),[g,v]=(0,Di.useState)(l?.name);if(!r||!o)return null;let y=x=>{c({...l,shadow:x});let T=n.map(R=>R.slug===o?{...l,shadow:x}:R);i(T)},b=x=>{if(x==="reset"){let T=n.map(R=>R.slug===o?u:R);c(u),i(T)}else x==="delete"?f(!0):x==="rename"&&h(!0)},_=()=>{i(n.filter(x=>x.slug!==o))},S=x=>{if(!x)return;let T=n.map(R=>R.slug===o?{...l,name:x}:R);c({...l,name:x}),i(T)};return l?(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsxs)(De.__experimentalHStack,{justify:"space-between",children:[(0,Te.jsx)(St,{title:l.name}),(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,Te.jsxs)(Db,{children:[(0,Te.jsx)(Db.TriggerButton,{render:(0,Te.jsx)(De.Button,{size:"small",icon:Nr,label:(0,Ut.__)("Menu")})}),(0,Te.jsx)(Db.Popover,{children:(r==="custom"?c_e:u_e).map(x=>(0,Te.jsx)(Db.Item,{onClick:()=>b(x.action),disabled:x.action==="reset"&&l.shadow===u?.shadow,children:(0,Te.jsx)(Db.ItemLabel,{children:x.label})},x.action))})]})})})]}),(0,Te.jsxs)(Bu,{children:[(0,Te.jsx)(d_e,{shadow:l.shadow}),(0,Te.jsx)(f_e,{shadow:l.shadow,onChange:y})]}),d&&(0,Te.jsx)(De.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{_(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,Ut.__)("Delete"),size:"medium",children:(0,Ut.sprintf)((0,Ut.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,Te.jsx)(De.Modal,{title:(0,Ut.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,Te.jsxs)("form",{onSubmit:x=>{x.preventDefault(),S(g),h(!1)},children:[(0,Te.jsx)(De.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Ut.__)("Name"),placeholder:(0,Ut.__)("Shadow name"),value:g??"",onChange:v}),(0,Te.jsx)(De.__experimentalSpacer,{marginBottom:6}),(0,Te.jsxs)(De.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,Ut.__)("Cancel")})}),(0,Te.jsx)(De.FlexItem,{children:(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Ut.__)("Save")})})]})]})})]}):(0,Te.jsx)(St,{title:""})}function d_e({shadow:e}){return(0,Te.jsx)(De.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,Te.jsx)(De.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,Te.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function f_e({shadow:e,onChange:t}){let r=(0,Di.useRef)(null),o=(0,Di.useMemo)(()=>xH(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,z6].join(", "))},a=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(De.__experimentalVStack,{spacing:2,children:(0,Te.jsxs)(De.__experimentalHStack,{justify:"space-between",children:[(0,Te.jsx)(Tr,{level:3,children:(0,Ut.__)("Shadows")}),(0,Te.jsx)(De.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,Te.jsx)(De.Button,{size:"small",icon:Pl,label:(0,Ut.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,Te.jsx)(De.__experimentalSpacer,{}),(0,Te.jsx)(De.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,Te.jsx)(m_e,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>a(c)},c))})]})}function m_e({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,Di.useMemo)(()=>CH(e),[e]),a=l=>{t(TH(l))};return(0,Te.jsx)(De.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:re("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:re("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,Ut.__)("Remove shadow")};return(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)(De.Button,{__next40pxDefaultSize:!0,icon:Hv,...u,children:i.inset?(0,Ut.__)("Inner shadow"):(0,Ut.__)("Drop shadow")}),r&&(0,Te.jsx)(De.Button,{size:"small",icon:kA,...d})]})},renderContent:()=>(0,Te.jsx)(De.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,Te.jsx)(p_e,{shadowObj:i,onChange:a})})})}function p_e({shadowObj:e,onChange:t}){let n=(i,a)=>{let l={...e,[i]:a};t(l)};return(0,Te.jsxs)(De.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,Te.jsx)(De.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,Te.jsxs)(De.__experimentalToggleGroupControl,{label:(0,Ut.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,Te.jsx)(De.__experimentalToggleGroupControlOption,{value:"outset",label:(0,Ut.__)("Outset")}),(0,Te.jsx)(De.__experimentalToggleGroupControlOption,{value:"inset",label:(0,Ut.__)("Inset")})]}),(0,Te.jsxs)(De.__experimentalGrid,{columns:2,gap:4,children:[(0,Te.jsx)(Fx,{label:(0,Ut.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,Te.jsx)(Fx,{label:(0,Ut.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function Fx({label:e,value:t,onChange:r}){return(0,Te.jsx)(De.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:n=>{let a=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(a)}})}var U6=s(C(),1);function kH(){return(0,U6.jsx)(wH,{})}function EH(){return(0,U6.jsx)(PH,{})}var IH=s(E(),1),NH=s($(),1);var RH=s($(),1),H6=s(D(),1);var AH=s(C(),1),{useSettingsForBlockElement:h_e,DimensionsPanel:g_e}=rt(RH.privateApis),v_e={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,width:!0,childLayout:!1};function OH(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1),[o]=pe("",void 0,"user"),[n,i]=pe(""),a=h_e(n),l=(0,H6.useMemo)(()=>({...t,layout:a.layout}),[t,a.layout]),c=(0,H6.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,AH.jsx)(g_e,{inheritedValue:l,value:c,onChange:d=>{let f={...d};if(delete f.layout,r(f),d.layout!==o.layout){let m={...o,layout:d.layout};m.layout?.definitions&&delete m.layout.definitions,i(m)}},settings:a,includeLayoutControls:!0,defaultControls:v_e})}var Hf=s(C(),1),{useHasDimensionsPanel:y_e,useSettingsForBlockElement:b_e}=rt(NH.privateApis);function S_e(){let[e]=pe(""),t=b_e(e),r=y_e(t);return(0,Hf.jsxs)(Hf.Fragment,{children:[(0,Hf.jsx)(St,{title:(0,IH.__)("Layout")}),r&&(0,Hf.jsx)(OH,{})]})}var FH=S_e;var Lx=s(A(),1),W6=s(E(),1);var G6=s(E(),1),VH=s(A(),1);var DH=s(W(),1),BH=s(O(),1),Bx=s(D(),1),MH=s(A(),1),LH=s(E(),1);var Dx=s(C(),1);function __e({gap:e=2}){let{user:t}=(0,Bx.useContext)(Br),r=t?.styles,n=(0,BH.useSelect)(a=>{let l=a(DH.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(a=>!yb(a,["color"])&&!yb(a,["typography","spacing"])),i=(0,Bx.useMemo)(()=>[...[{title:(0,LH.__)("Default"),settings:{},styles:{}},...n??[]].map(l=>{let c=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(m=>{if(r.blocks?.[m]?.css){let h=c[m]||{},g={css:`${c[m]?.css||""} ${r.blocks?.[m]?.css?.trim()||""}`};c[m]={...h,...g}}});let u=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},d=Object.keys(c).length>0?{blocks:c}:{},f={...l.styles,...u,...d};return{...l,settings:l.settings??{},styles:f}})],[n,r?.blocks,r?.css]);return!n||n.length<1?null:(0,Dx.jsx)(MH.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((a,l)=>(0,Dx.jsx)(rh,{variation:a,children:c=>(0,Dx.jsx)(tx,{label:a?.title,withHoverView:!0,isFocused:c,variation:a})},l))})}var Mx=__e;var hh=s(C(),1);function jH(){return(0,hh.jsxs)(VH.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,hh.jsx)(Mx,{gap:3}),(0,hh.jsx)(fh,{title:(0,G6.__)("Color Variations"),gap:3}),(0,hh.jsx)(oh,{title:(0,G6.__)("Typography"),gap:3})]})}var nc=s(C(),1);function w_e(){return(0,nc.jsxs)(nc.Fragment,{children:[(0,nc.jsx)(St,{title:(0,W6.__)("Browse styles"),description:(0,W6.__)("Choose a variation to change the look of the site.")}),(0,nc.jsx)(Lx.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,nc.jsx)(Lx.CardBody,{children:(0,nc.jsx)(jH,{})})})]})}var zH=w_e;var Bb=s(E(),1),UH=s(A(),1),HH=s($(),1);var ms=s(C(),1),{AdvancedPanel:x_e}=rt(HH.privateApis);function C_e(){let[e]=Ee("",void 0,"user",!1),[t,r]=Ee("",void 0,"merged",!1);return(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(St,{title:(0,Bb.__)("Additional CSS"),description:(0,ms.jsxs)(ms.Fragment,{children:[(0,Bb.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,ms.jsx)("br",{}),(0,ms.jsx)(UH.ExternalLink,{href:(0,Bb.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,Bb.__)("Learn more about CSS")})]})}),(0,ms.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,ms.jsx)(x_e,{value:e,onChange:r,inheritedValue:t})})]})}var GH=C_e;var ic=s(E(),1),gh=s(A(),1),Gf=s(D(),1);var WH=s(O(),1),YH=s(W(),1),Mb=s(D(),1);var T_e={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},P_e={per_page:100,page:1},Vx=[];function Lb({query:e}={}){let{user:t}=(0,Mb.useContext)(Br),r=(0,Mb.useMemo)(()=>({...P_e,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:a,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,WH.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:y}=u(YH.store),b=d()||[],_=f(),S=b.length>0,x=g(),R=(x?v("root","globalStyles",x):void 0)?._links?.["version-history"]?.[0]?.count??0,F=x&&h("root","globalStyles",x,r)||Vx,B=m(T_e)||Vx,z=x?y("getRevisions",["root","globalStyles",x,r]):!1;return{authors:B,currentUser:_,isDirty:S,revisions:F,isLoadingGlobalStylesRevisions:z,revisionsCount:R}},[r]);return(0,Mb.useMemo)(()=>{if(!o.length||l)return{revisions:Vx,hasUnsavedChanges:i,isLoading:!0,revisionsCount:c};let u=a.map(f=>({...f,author:o.find(m=>m.id===f.author)}));if(a.length){if(u[0].id!=="unsaved"&&r.page===1&&(u[0].isLatest=!0),i&&t&&Object.keys(t).length>0&&n&&r.page===1){let f={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:n?.name||"",avatar_urls:n?.avatar_urls||{}},modified:new Date};u.unshift(f)}r.per_page&&r.page===Math.ceil(c/r.per_page)&&u.push({id:"parent",styles:{},settings:{}})}return{revisions:u,hasUnsavedChanges:i,isLoading:!1,revisionsCount:c}},[i,a,n,o,t,l,c,r.page,r.per_page])}var Vo=s(E(),1),Vb=s(A(),1),Wa=s(po(),1),qH=s(W(),1),ZH=s(O(),1);var jx=s(yo(),1),_o=s(C(),1),k_e=3600*1e3*24;function E_e({revision:e,previousRevision:t}){let r=My(e,t,{maxResults:7});return r.length?(0,_o.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,_o.jsx)("li",{children:o},o))}):null}function R_e(e,t,r,o){return e==="parent"?(0,Vo.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,Vo.sprintf)((0,Vo.__)("Unsaved changes by %s"),t):o?(0,Vo.sprintf)((0,Vo.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,Vo.sprintf)((0,Vo.__)("Changes saved by %1$s on %2$s"),t,r)}function A_e({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:a}=(0,ZH.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(qH.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,Wa.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,Wa.getSettings)().formats;return(0,_o.jsx)(Vb.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,Vo.__)("Global styles revisions list"),role:"listbox",children:e.map((u,d)=>{let{id:f,author:m,modified:h}=u,g=f==="unsaved",v=g?a:m,y=v?.name||(0,Vo.__)("User"),b=v?.avatar_urls?.["48"],S=t?t===f:d===0,x=!o&&S,T=f==="parent",R=h instanceof Date?h.toISOString():h,F=(0,Wa.getDate)(R??null),B=R&&l-F.getTime()>k_e?(0,Wa.dateI18n)(c,F):(0,Wa.humanTimeDiff)(R??F,void 0),z=R_e(f,y,(0,Wa.dateI18n)(c,F),x);return(0,_o.jsxs)(Vb.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":S,role:"option",onKeyDown:L=>{let{keyCode:M}=L;(M===jx.ENTER||M===jx.SPACE)&&r(u)},onClick:L=>{L.preventDefault(),r(u)},"aria-selected":S,"aria-label":z,render:(0,_o.jsx)("div",{}),children:[(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:T?(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,Vo.__)("Default styles"),(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,_o.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,Vo.__)("(Unsaved)")}):(0,_o.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:R,children:B}),(0,_o.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,_o.jsx)("img",{alt:y,src:b}),y]}),S&&(0,_o.jsx)(E_e,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),S&&(x?(0,_o.jsx)("p",{className:"global-styles-ui-screen-revisions__applied-text",children:(0,Vo.__)("These styles are already applied to your site.")}):(0,_o.jsx)(Vb.Button,{size:"compact",variant:"primary",className:"global-styles-ui-screen-revisions__apply-button",onClick:n,"aria-label":(0,Vo.__)("Apply the selected revision to your site."),children:T?(0,Vo.__)("Reset to defaults"):(0,Vo.__)("Apply")}))]},f)})})}var KH=A_e;var ps=s(A(),1),wo=s(E(),1);var Qs=s(C(),1);function XH({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:a="tertiary",label:l=(0,wo.__)("Pagination")}){return(0,Qs.jsxs)(ps.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:re("global-styles-ui-pagination",n),children:[(0,Qs.jsx)(ps.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,wo.sprintf)((0,wo._n)("%d item","%d items",o),o)}),(0,Qs.jsxs)(ps.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,wo.__)("First page"),icon:(0,wo.isRTL)()?Tl:kl,size:"compact"}),(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,wo.__)("Previous page"),icon:(0,wo.isRTL)()?Ft:Nt,size:"compact"})]}),(0,Qs.jsx)(ps.__experimentalText,{variant:"muted",children:(0,wo.sprintf)((0,wo._x)("%1$d of %2$d","paging"),e,t)}),(0,Qs.jsxs)(ps.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,wo.__)("Next page"),icon:(0,wo.isRTL)()?Nt:Ft,size:"compact"}),(0,Qs.jsx)(ps.Button,{variant:a,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,wo.__)("Last page"),icon:(0,wo.isRTL)()?kl:Tl,size:"compact"})]})]})}var Js=s(C(),1),QH=10;function O_e({onClose:e}={}){let{user:t,onChange:r}=(0,Gf.useContext)(Br),{params:o,goTo:n}=(0,gh.useNavigator)(),{revisionId:i}=o,[a,l]=(0,Gf.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=Lb({query:{per_page:QH,page:a}}),m=Math.ceil(f/QH),[h,g]=(0,Gf.useState)(!1),v=(0,Gf.useMemo)(()=>i&&c.find(B=>String(B.id)===String(i))||t,[i,c,t]),y=pf(v,t),b=()=>{e&&e()},_=F=>{r(F),g(!1),b()},S=F=>{n(`/revisions/${F.id}`)},x=v?.id??c[0]?.id,T=!!x&&x!=="unsaved"&&!y,R=!!c.length;return(0,Js.jsxs)(Js.Fragment,{children:[(0,Js.jsx)(St,{title:f?(0,ic.sprintf)((0,ic.__)("Revisions (%d)"),f):(0,ic.__)("Revisions"),description:(0,ic.__)(`Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you're ready, use the Save button to save your changes.`),onBack:b}),!R&&(0,Js.jsx)(gh.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,Js.jsx)(KH,{onChange:S,selectedRevisionId:x,userRevisions:c,canApplyRevision:T,onApplyRevision:()=>d?g(!0):_(v)}),m>1&&(0,Js.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,Js.jsx)(XH,{className:"global-styles-ui-screen-revisions__pagination",currentPage:a,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,ic.__)("Global Styles pagination")})}),h&&(0,Js.jsx)(gh.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,ic.__)("Apply"),onConfirm:()=>_(v),onCancel:()=>g(!1),size:"medium",children:(0,ic.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var JH=O_e;var no=s(E(),1),Pr=s(A(),1);var oG=s(D(),1);var $H=s(A(),1),eG=s(E(),1),tG=s(C(),1);function I_e({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},a=()=>{o()};return(0,tG.jsx)($H.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,eG.__)("Cancel"),confirmButtonText:t,onCancel:a,onConfirm:i,size:"medium",children:e})}var rG=I_e;var _t=s(C(),1),{Menu:jb}=rt(Pr.privateApis);function Y6({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,a]=(0,oG.useState)(!1),l=()=>a(!i),c=t==="custom"?(0,no.__)("Are you sure you want to remove all custom font size presets?"):(0,no.__)("Are you sure you want to reset all font size presets to their default values?");return(0,_t.jsxs)(_t.Fragment,{children:[n&&i&&(0,_t.jsx)(rG,{text:c,confirmButtonText:t==="custom"?(0,no.__)("Remove"):(0,no.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:4,children:[(0,_t.jsxs)(Pr.__experimentalHStack,{children:[(0,_t.jsx)(Tr,{level:3,children:e}),(0,_t.jsxs)(Pr.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,_t.jsx)(Pr.Button,{label:(0,no.__)("Add font size"),icon:Pl,size:"small",onClick:o}),!!n&&(0,_t.jsxs)(jb,{children:[(0,_t.jsx)(jb.TriggerButton,{render:(0,_t.jsx)(Pr.Button,{size:"small",icon:Nr,label:(0,no.__)("Font size presets options")})}),(0,_t.jsx)(jb.Popover,{children:(0,_t.jsx)(jb.Item,{onClick:l,children:(0,_t.jsx)(jb.ItemLabel,{children:t==="custom"?(0,no.__)("Remove font size presets"):(0,no.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,_t.jsx)(Pr.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,_t.jsx)(fr,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,_t.jsxs)(Pr.__experimentalHStack,{children:[(0,_t.jsx)(Pr.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,_t.jsx)(Pr.FlexItem,{display:"flex",children:(0,_t.jsx)(No,{icon:(0,no.isRTL)()?Nt:Ft})})]})},u.slug))})]})]})}function N_e(){let[e,t]=pe("typography.fontSizes.theme"),[r]=pe("typography.fontSizes.theme","base"),[o,n]=pe("typography.fontSizes.default"),[i]=pe("typography.fontSizes.default","base"),[a=[],l]=pe("typography.fontSizes.custom"),[c]=pe("typography.defaultFontSizes"),u=()=>{let f=Jw(a,"custom-"),m={name:(0,no.sprintf)((0,no.__)("New Font Size %d"),f),size:"16px",slug:`custom-${f}`};l([...a,m])},d=(f,m)=>f.map(h=>h.size).join("")===m.map(h=>h.size).join("");return(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:2,children:[(0,_t.jsx)(St,{title:(0,no.__)("Font size presets"),description:(0,no.__)("Create and edit the presets used for font sizes across the site.")}),(0,_t.jsx)(Pr.__experimentalView,{children:(0,_t.jsx)(Pr.__experimentalSpacer,{paddingX:4,children:(0,_t.jsxs)(Pr.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,_t.jsx)(Y6,{label:(0,no.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,_t.jsx)(Y6,{label:(0,no.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,_t.jsx)(Y6,{label:(0,no.__)("Custom"),origin:"custom",sizes:a,handleAddFontSize:u,handleResetFontSizes:a.length>0?()=>l([]):void 0})]})})})]})}var nG=N_e;var si=s(E(),1),kr=s(A(),1);var zb=s(D(),1);var iG=s($(),1),sG=s(E(),1);var aG=s(C(),1);function F_e({fontSize:e}){let[t]=Ee("typography"),r=typeof e?.fluid=="object"&&e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},o=(0,iG.getComputedFluidTypographyValue)(r);return(0,aG.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,sG.__)("Aa")})}var lG=F_e;var cG=s(A(),1),vh=s(E(),1),uG=s(C(),1);function D_e({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,uG.jsx)(cG.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,vh.__)("Cancel"),confirmButtonText:(0,vh.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,vh.sprintf)((0,vh.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var dG=D_e;var $s=s(A(),1),yh=s(E(),1),fG=s(D(),1),sc=s(C(),1);function B_e({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,fG.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,sc.jsx)($s.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,yh.__)("Rename"),size:"small",children:(0,sc.jsx)("form",{onSubmit:a=>{a.preventDefault(),i(),t()},children:(0,sc.jsxs)($s.__experimentalVStack,{spacing:"3",children:[(0,sc.jsx)($s.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:o,onChange:n,label:(0,yh.__)("Name"),placeholder:(0,yh.__)("Font size preset name")}),(0,sc.jsxs)($s.__experimentalHStack,{justify:"right",children:[(0,sc.jsx)($s.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,yh.__)("Cancel")}),(0,sc.jsx)($s.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,yh.__)("Save")})]})]})})})}var mG=B_e;var io=s(A(),1),ac=s(C(),1),M_e=["px","em","rem","vw","vh"];function zx(e){let{baseControlProps:t}=(0,io.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:a}=e,l=(0,io.__experimentalUseCustomUnits)({availableUnits:M_e}),[c,u="px"]=(0,io.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,ac.jsx)(io.BaseControl,{...t,children:(0,ac.jsxs)(io.Flex,{children:[(0,ac.jsx)(io.FlexItem,{isBlock:!0,children:(0,ac.jsx)(io.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,ac.jsx)(io.FlexItem,{isBlock:!0,children:(0,ac.jsx)(io.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,ac.jsx)(io.RangeControl,{__next40pxDefaultSize:!0,label:a,hideLabelFromVision:!0,value:c,initialPosition:n,withInputField:!1,onChange:h=>{o?.(h!==void 0?h+u:void 0)},min:0,max:d?10:100,step:d?.1:1,disabled:i})})})]})})}var pt=s(C(),1),{Menu:Wf}=rt(kr.privateApis);function L_e(){let[e,t]=(0,zb.useState)(!1),[r,o]=(0,zb.useState)(!1),{params:{origin:n,slug:i},goBack:a}=(0,kr.useNavigator)(),[l,c]=pe("typography.fontSizes"),[u]=pe("typography.fluid"),d=l?.[n]??[],f=d.find(B=>B.slug===i);if((0,zb.useEffect)(()=>{i&&!f&&a()},[i,f,a]),!n||!i||!f)return null;let m=f?.fluid!==void 0?!!f.fluid:!!u,h=typeof f?.fluid=="object",g=B=>{x("name",B)},v=B=>{x("size",B)},y=B=>{x("fluid",B)},b=B=>{B?x("fluid",{min:f.size,max:f.size}):x("fluid",!0)},_=B=>{let z=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...z,min:B})},S=B=>{let z=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...z,max:B})},x=(B,z)=>{let L=d.map(M=>M.slug===i?{...M,[B]:z}:M);c({...l,[n]:L})},T=()=>{let B=d.filter(z=>z.slug!==i);c({...l,[n]:B})},R=()=>{t(!e)},F=()=>{o(!r)};return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(dG,{fontSize:f,isOpen:e,toggleOpen:R,handleRemoveFontSize:T}),r&&(0,pt.jsx)(mG,{fontSize:f,toggleOpen:F,handleRename:g}),(0,pt.jsxs)(kr.__experimentalVStack,{spacing:4,children:[(0,pt.jsxs)(kr.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,pt.jsx)(St,{title:f.name,description:(0,si.sprintf)((0,si.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,pt.jsx)(kr.FlexItem,{children:(0,pt.jsx)(kr.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,pt.jsxs)(Wf,{children:[(0,pt.jsx)(Wf.TriggerButton,{render:(0,pt.jsx)(kr.Button,{size:"small",icon:Nr,label:(0,si.__)("Font size options")})}),(0,pt.jsxs)(Wf.Popover,{children:[(0,pt.jsx)(Wf.Item,{onClick:F,children:(0,pt.jsx)(Wf.ItemLabel,{children:(0,si.__)("Rename")})}),(0,pt.jsx)(Wf.Item,{onClick:R,children:(0,pt.jsx)(Wf.ItemLabel,{children:(0,si.__)("Delete")})})]})]})})})]}),(0,pt.jsx)(kr.__experimentalView,{children:(0,pt.jsx)(kr.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,pt.jsxs)(kr.__experimentalVStack,{spacing:4,children:[(0,pt.jsx)(kr.FlexItem,{children:(0,pt.jsx)(lG,{fontSize:f})}),(0,pt.jsx)(zx,{label:(0,si.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,pt.jsx)(kr.ToggleControl,{label:(0,si.__)("Fluid typography"),help:(0,si.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:y}),m&&(0,pt.jsx)(kr.ToggleControl,{label:(0,si.__)("Custom fluid values"),help:(0,si.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:b}),h&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(zx,{label:(0,si.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:_}),(0,pt.jsx)(zx,{label:(0,si.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:S})]})]})})})]})]})}var pG=L_e;var Oe=s(C(),1);function V_e({parentMenu:e,blockStyles:t,blockName:r}){return(0,Oe.jsx)(Oe.Fragment,{children:t.map((o,n)=>(0,Oe.jsx)(bh.Navigator.Screen,{path:e+"/variations/"+o.name,children:(0,Oe.jsx)(R6,{name:r,variation:o.name})},n))})}function j_e({name:e,parentMenu:t=""}){let r=(0,hG.useSelect)(o=>{if(!e)return[];let{getBlockStyles:n}=o(Ux.store);return n(e)},[e]);return r?.length?(0,Oe.jsx)(V_e,{parentMenu:t,blockStyles:r,blockName:e||""}):null}function Z6({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:a,serverSettings:l}){let c=(0,Ux.getBlockTypes)(),u=(0,Uu.useMemo)(()=>go(t,e),[t,e]),[d,f]=jy(u,[],{styleOptions:{variationStyles:!0}}),m=(0,Uu.useMemo)(()=>[...a??[],...d??[]],[a,d]),h=(0,Uu.useMemo)(()=>({...l,__experimentalFeatures:f,styles:m}),[f,l,m]);return(0,Oe.jsx)(gb,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,Oe.jsx)(gG.BlockEditorProvider,{settings:h,children:(0,Oe.jsxs)(bh.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,Oe.jsx)(z_e,{path:o,onPathChange:n}),(0,Oe.jsx)(Zr,{path:"/",children:(0,Oe.jsx)(sz,{})}),(0,Oe.jsx)(Zr,{path:"/colors",children:(0,Oe.jsx)(eH,{})}),(0,Oe.jsx)(Zr,{path:"/typography",children:(0,Oe.jsx)(VU,{})}),(0,Oe.jsx)(Zr,{path:"/typography/font-sizes",children:(0,Oe.jsx)(nG,{})}),(0,Oe.jsx)(Zr,{path:"/typography/font-sizes/:origin/:slug",children:(0,Oe.jsx)(pG,{})}),(0,Oe.jsx)(Zr,{path:"/layout",children:(0,Oe.jsx)(FH,{})}),(0,Oe.jsx)(Zr,{path:"/colors/palette",children:(0,Oe.jsx)(uH,{})}),(0,Oe.jsx)(Zr,{path:"/variations",children:(0,Oe.jsx)(zH,{})}),(0,Oe.jsx)(Zr,{path:"/css",children:(0,Oe.jsx)(GH,{})}),(0,Oe.jsx)(Zr,{path:"/revisions/:revisionId?",children:(0,Oe.jsx)(JH,{})}),(0,Oe.jsx)(Zr,{path:"/shadows",children:(0,Oe.jsx)(kH,{})}),(0,Oe.jsx)(Zr,{path:"/shadows/edit/:category/:slug",children:(0,Oe.jsx)(EH,{})}),(0,Oe.jsx)(Zr,{path:"/background",children:(0,Oe.jsx)(gH,{})}),(0,Oe.jsx)(Zr,{path:"/typography/text",children:(0,Oe.jsx)(uh,{element:"text"})}),(0,Oe.jsx)(Zr,{path:"/typography/link",children:(0,Oe.jsx)(uh,{element:"link"})}),(0,Oe.jsx)(Zr,{path:"/typography/heading",children:(0,Oe.jsx)(uh,{element:"heading"})}),(0,Oe.jsx)(Zr,{path:"/typography/caption",children:(0,Oe.jsx)(uh,{element:"caption"})}),(0,Oe.jsx)(Zr,{path:"/typography/button",children:(0,Oe.jsx)(uh,{element:"button"})}),(0,Oe.jsx)(Zr,{path:"/blocks",children:(0,Oe.jsx)(mz,{})}),c.map(g=>(0,Oe.jsxs)(Uu.Fragment,{children:[(0,Oe.jsx)(Zr,{path:"/blocks/"+encodeURIComponent(g.name),children:(0,Oe.jsx)(R6,{name:g.name})}),(0,Oe.jsx)(j_e,{name:g.name,parentMenu:"/blocks/"+encodeURIComponent(g.name)})]},g.name))]})})})}function Zr({path:e,children:t}){return(0,Oe.jsx)(bh.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function z_e({path:e,onPathChange:t}){let r=(0,bh.useNavigator)(),{path:o}=r.location,n=(0,q6.usePrevious)(e),i=(0,q6.usePrevious)(o);return(0,Uu.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var K6=s(C(),1);function Sh(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,K6.jsx)(gb,{value:r,baseValue:o,onChange:n,children:(0,K6.jsx)(e,{...i})})}}var U_e=Sh(Mx);var H_e=Sh(fh);var G_e=Sh(oh);var W_e=s(C(),1);var TG=s(Yd(),1);var vG=s(O(),1),yG=s(D(),1),bG=s($(),1),SG=s(he(),1);function _G({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,vG.useSelect)(a=>{let{getSelectedBlockClientId:l,getBlockName:c}=a(bG.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,SG.usePrevious)(o);return(0,yG.useEffect)(()=>{if(o===i||!o||!n||!e||e!=="/blocks"&&!e.startsWith("/blocks/"))return;let a="/blocks/"+encodeURIComponent(r);a!==e&&t?.(a)},[o,i,r,n,e,t]),null}var Yf=s(D(),1);var _h=s(W(),1),wh=s(O(),1),wG=s($(),1);var{cleanEmptyObject:X6}=N(wG.privateApis);function Y_e(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,wh.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(_h.store),g=u(_h.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,wh.useSelect)(_h.store),{editEntityRecord:a}=(0,wh.useDispatch)(_h.store),l=(0,Yf.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,Yf.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;a("root","globalStyles",e,{styles:X6(h.styles)||{},settings:X6(h.settings)||{},_links:X6(h._links)||{}},d)},[e,a,i]);return[t,l,c]}function q_e(){let e=(0,wh.useSelect)(t=>t(_h.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function xo(){let[e,t,r]=Y_e(),[o,n]=q_e();return{merged:(0,Yf.useMemo)(()=>!e||!o?{}:go(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function Hu(e,t){let{merged:r}=xo();return(0,Yf.useMemo)(()=>Fy(r,e,t),[r,e,t])}function Q6(e,t){let{merged:r}=xo();return(0,Yf.useMemo)(()=>mf(r,e,t),[r,e,t])}var qf=s(C(),1);function Z_e(){let{styles:e,__unstableResolvedAssets:t,colors:r,gradients:o,__experimentalDiscussionSettings:n,mediaUploadHandler:i,fontLibraryEnabled:a}=(0,CG.useSelect)(u=>{let{getEditorSettings:d}=u(w),{canUser:f}=u(xG.store),m=d(),h=f("create",{kind:"postType",name:"attachment"});return{styles:m?.styles,__unstableResolvedAssets:m?.__unstableResolvedAssets,colors:m?.colors,gradients:m?.gradients,__experimentalDiscussionSettings:m?.__experimentalDiscussionSettings,mediaUploadHandler:h?TG.uploadMedia:void 0,fontLibraryEnabled:m?.fontLibraryEnabled??!0}},[]),l=(0,J6.useMemo)(()=>e?e.filter(u=>!u.isGlobalStyles):[],[e]),c=(0,J6.useMemo)(()=>({__unstableResolvedAssets:t,settings:{color:{palette:{theme:r??[]},gradients:{theme:o??[]},duotone:{theme:[]}}},__experimentalDiscussionSettings:n,mediaUpload:i}),[t,r,o,n,i]);return{serverCSS:l,serverSettings:c,fontLibraryEnabled:a}}function Hx({path:e,onPathChange:t}){let{user:r,base:o,setUser:n,isReady:i}=xo(),{serverCSS:a,serverSettings:l,fontLibraryEnabled:c}=Z_e();return i?(0,qf.jsxs)(qf.Fragment,{children:[(0,qf.jsx)(Z6,{value:r,baseValue:o||{},onChange:n,path:e,onPathChange:t,fontLibraryEnabled:c,serverCSS:a,serverSettings:l}),(0,qf.jsx)(_G,{path:e,onPathChange:t})]}):null}var Gu=s(C(),1);function K_e({template:e,post:t}){let[r="white"]=Hu("color.background"),[o]=(0,Ub.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,Ub.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,a=!i?.length;return(0,Gu.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[a&&(0,Gu.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,PG.__)("Empty content")}),!a&&(0,Gu.jsx)($6.BlockPreview.Async,{children:(0,Gu.jsx)($6.BlockPreview,{blocks:i})})]})}function EG({item:e}){let{settings:t,template:r}=(0,kG.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:a,getEntityRecord:l}=N(o(Ub.store)),c=n("read",{kind:"postType",name:"wp_template"}),u=o(w).getEditorSettings(),d=u.supportsTemplateMode,f=i(e.type)?.viewable??!1,m=d&&f&&c?a(e.type,e.id):null;return{settings:u,template:m?l("postType","wp_template",m):void 0}},[e.type,e.id]);return(0,Gu.jsx)(y6,{post:e,settings:t,__unstableTemplate:r,children:(0,Gu.jsx)(K_e,{template:r,post:e})})}var X_e={type:"media",id:"content-preview",label:(0,RG.__)("Content preview"),render:EG,enableSorting:!1},AG=X_e;function Q_e(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function J_e(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function $_e(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function ewe(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function twe(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function rwe(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var owe=[sI,nI,cI,fI,uI,dI,oI,c_,tI,iI,lI],nwe=e=>async({registry:t})=>{if(N(t.select(w)).isEntityReady("postType",e))return;N(t.dispatch(w)).setIsReady("postType",e);let o=await t.resolveSelect(Gx.store).getPostType(e),n=await t.resolveSelect(Gx.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(Gx.store).getCurrentTheme(),a=!["wp_block","wp_template_part"].includes(o.slug)&&n&&D5;o.slug!=="wp_template"&&(a=void 0),o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(a=void 0);let l=[o.viewable?A5:void 0,o.supports?.revisions?G5:void 0,a,o.slug==="wp_template_part"&&n&&i?.is_block_theme?eI:void 0,n&&o.slug==="wp_block"?V5:void 0,o.supports?.title?M5:void 0,o.supports?.["page-attributes"]?I5:void 0,o.slug==="wp_block"?H5:void 0,q5,L5,J5,K5,Y5].filter(Boolean),c;if(e===ur)c=owe;else if(c=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&p5,o.supports?.author&&E5,w5,!Jc.includes(o.slug)&&k5,bO,o.supports?.["page-attributes"]&&S5,o.supports?.comments&&x5,o.supports?.trackbacks&&T5,(o.supports?.comments||o.supports?.trackbacks)&&P5,g5,_5,o.supports?.editor&&o.viewable&&AG,Q_e(o.supports)&&R5].filter(Boolean),o.supports?.title){let u;e==="page"?u=CO:e==="wp_template"?u=ny:e==="wp_block"?u=iy:u=c_,c.push(u)}t.batch(()=>{l.forEach(u=>{N(t.dispatch(w)).registerEntityAction("postType",e,u)}),c.forEach(u=>{N(t.dispatch(w)).registerEntityField("postType",e,u)})}),(0,OG.doAction)("core.registerPostTypeSchema",e)};function iwe(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var swe=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(Co.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(Co.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(Dn.store).createSuccessNotice((0,st.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,st.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},awe=e=>({registry:t})=>{let o=(t.select(Zf.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(Zf.store).set("core","hiddenBlockTypes",o)},lwe=e=>({registry:t})=>{let r=t.select(Zf.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(Zf.store).set("core","hiddenBlockTypes",[...o])},cwe=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:r=[],close:o,successNoticeContent:n}={})=>({registry:i})=>{let a=[{kind:"postType",name:"wp_navigation"}],l="site-editor-save-success",c=i.select(Co.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(Dn.store).removeNotice(l);let u=t.filter(({kind:m,name:h,key:g,property:v})=>!r.some(y=>y.kind===m&&y.name===h&&y.key===g&&y.property===v));o?.(u);let d=[],f=[];u.forEach(({kind:m,name:h,key:g,property:v})=>{m==="root"&&h==="site"?d.push(v):(a.some(y=>y.kind===m&&y.name===h)&&i.dispatch(Co.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(Co.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(Co.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(IG.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(m=>e?e(m):m).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(Dn.store).createErrorNotice((0,st.__)("Saving failed.")):i.dispatch(Dn.store).createSuccessNotice(n||(0,st.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,st.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(Dn.store).createErrorNotice(`${(0,st.__)("Saving failed.")} ${m}`))},uwe=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(Dn.store).removeNotice(o),!e_(e)){r.dispatch(Dn.store).createErrorNotice((0,st.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(Co.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(Dn.store).createErrorNotice((0,st.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,NG.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),a=await(0,FG.default)({path:i});if(!a){r.dispatch(Dn.store).createErrorNotice((0,st.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,Wx.__unstableSerializeAndClean)(d),c=r.select(Co.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(Co.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,Wx.parse)(a?.content?.raw);if(r.dispatch(Co.store).editEntityRecord("postType",e.type,a.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(Co.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(Dn.store).createSuccessNotice((0,st.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,st.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,st.__)("Template revert failed. Please reload.");r.dispatch(Dn.store).createErrorNotice(i,{type:"snackbar"})}},dwe=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(Co.store).deleteEntityRecord("postType",n.type,n.id,{force:!0},{throwOnError:!0})));if(o.every(({status:n})=>n==="fulfilled")){let n;if(e.length===1){let i;typeof e[0].title=="string"?i=e[0].title:typeof e[0].title?.rendered=="string"?i=e[0].title?.rendered:typeof e[0].title?.raw=="string"&&(i=e[0].title?.raw),n=r?(0,st.sprintf)((0,st.__)('"%s" reset.'),(0,e3.decodeEntities)(i)):(0,st.sprintf)((0,st._x)('"%s" deleted.',"template part"),(0,e3.decodeEntities)(i))}else n=r?(0,st.__)("Items reset."):(0,st.__)("Items deleted.");t.dispatch(Dn.store).createSuccessNotice(n,{type:"snackbar",id:"editor-template-deleted-success"})}else{let n;if(o.length===1)o[0].reason?.message?n=o[0].reason.message:n=r?(0,st.__)("An error occurred while reverting the item."):(0,st.__)("An error occurred while deleting the item.");else{let i=new Set,a=o.filter(({status:l})=>l==="rejected");for(let l of a)l.reason?.message&&i.add(l.reason.message);i.size===0?n=(0,st.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,st.sprintf)((0,st.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,st.sprintf)((0,st.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,st.sprintf)((0,st.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,st.sprintf)((0,st.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(Dn.store).createErrorNotice(n,{type:"snackbar"})}},fwe=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(Co.store).getCurrentTheme()?.stylesheet,i=r.select(Zf.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let a={[n]:{...i,[o]:e}};r.dispatch(Zf.store).set("core","renderingModes",a)};function mwe(e){return{type:"SET_STYLES_PATH",path:e}}function pwe(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function hwe(){return{type:"RESET_STYLES_NAVIGATION"}}function gwe(e){return{type:"SET_CANVAS_MIN_HEIGHT",minHeight:e}}function vwe(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var ywe=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(Co.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Co.store).getRevisions("postType",n,i,qd(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function bwe(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var Swe=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(Co.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Co.store).getRevision("postType",n,i,e,{context:"edit",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",l])].join()});if(!c)return;let u={blocks:void 0,content:c.content.raw};c.title?.raw!==void 0&&(u.title=c.title.raw),c.excerpt?.raw!==void 0&&(u.excerpt=c.excerpt.raw),c.meta!==void 0&&(u.meta=c.meta),r.editPost(u),r.setCurrentRevisionId(null),await r.savePost(),o.dispatch(Dn.store).createSuccessNotice((0,st.sprintf)((0,st.__)("Restored to revision from %s."),(0,Yx.dateI18n)((0,Yx.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"})};function _we(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var Ay={reducer:LF,selectors:uO,actions:mO},w=(0,qx.createReduxStore)(WF,{...Ay});(0,qx.register)(w);N(w).registerPrivateActions(t3);N(w).registerPrivateSelectors(yO);var jG=s(C(),1),wwe=e=>(0,LG.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,DG.useSelect)(u=>u(w).getCurrentPostType(),[]),[a,l]=(0,BG.useEntityProp)("postType",i,"meta"),c=(0,MG.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,a[d]]))}),[r,a]);return(0,jG.jsx)(t,{attributes:c,setAttributes:u=>{let d=Object.fromEntries(Object.entries(u??{}).filter(([f])=>f in e).map(([f,m])=>[e[f],m]));Object.entries(d).length&&l(d),o(u)},...n})},"withMetaAttributeSource");function xwe(e){let t=Object.fromEntries(Object.entries(e.attributes??{}).filter(([,{source:r}])=>r==="meta").map(([r,{meta:o}])=>[r,o]));return Object.entries(t).length&&(e.edit=wwe(t)(e.edit)),e}(0,VG.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",xwe);var tJ=s(mo(),1);var zG=s(D(),1),UG=s(O(),1),HG=s(W(),1),lc=s(C(),1);function Cwe(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,lc.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,lc.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,lc.jsxs)(lc.Fragment,{children:[t,(0,lc.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,lc.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var Zx={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,UG.useSelect)(o=>{let{getUsers:n}=o(HG.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,zG.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:Cwe(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var GG=s(D(),1),WG=s(he(),1),Kx=s(O(),1),YG=s(W(),1);var Twe=class extends GG.Component{constructor(e){super(e),this.needsAutosave=!!(e.isDirty&&e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){if(this.props.disableIntervalChecks){this.props.editsReference!==e.editsReference&&this.props.autosave();return}if(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),!this.props.isDirty){this.needsAutosave=!1;return}if(this.props.isAutosaving&&!e.isAutosaving){this.needsAutosave=!1;return}this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=this.props.interval*1e3){this.timerId=setTimeout(()=>{this.autosaveTimerHandler()},e)}autosaveTimerHandler(){if(!this.props.isAutosaveable){this.setAutosaveTimer(1e3);return}this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()}render(){return null}},Xx=(0,WG.compose)([(0,Kx.withSelect)((e,t)=>{let{getReferenceByDistinctEdits:r}=e(YG.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:a}=e(w),{interval:l=a().autosaveInterval}=t;return{editsReference:r(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:l}}),(0,Kx.withDispatch)((e,t)=>({autosave(){let{autosave:r=e(w).autosave}=t;r()}}))])(Twe);var Xu=s(E(),1),Wb=s(O(),1),ra=s(A(),1),Yb=s($(),1);var EW=s(yo(),1),RW=s(W(),1),AW=s(jI(),1),dC=s(D(),1),OW=s(he(),1),IW=s(ft(),1),NW=s(xh(),1);var r3=s(E(),1),ZG=s(O(),1),KG=s(W(),1);function Qx(e){let{isFrontPage:t,isPostsPage:r}=(0,ZG.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(KG.store),a=n("read",{kind:"root",name:"site"})?i("root","site"):void 0,l=parseInt(e,10);return{isFrontPage:a?.page_on_front===l,isPostsPage:a?.page_for_posts===l}});return t?(0,r3.__)("Homepage"):r?(0,r3.__)("Posts Page"):!1}var _W=s(A(),1),wW=s(yo(),1),cC=s(E(),1),Gb=s(O(),1);var uC=s(he(),1),xW=s(lt(),1);var mW=s(D(),1);var cc=s(A(),1),ea=s(E(),1),so=s($(),1),Xf=s(O(),1);var Gt=s(D(),1),iC=s(yo(),1),iW=s(Yd(),1),sW=s(W(),1);var Ht=s(E(),1),Ch=[{slug:"theme-colors",title:(0,Ht.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,Ht.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,Ht.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,Ht.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,Ht.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,Ht.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,Ht.__)("Default Gradients"),origin:"default",type:"gradients"}],Jx=[{slug:"site-identity",title:(0,Ht.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,Ht.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,Ht.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,Ht.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],o3=[{slug:"overview",title:(0,Ht.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ht.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ht.__)("Colors"),blocks:[]},{slug:"theme",title:(0,Ht.__)("Theme"),subcategories:Jx},{slug:"media",title:(0,Ht.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ht.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ht.__)("Embeds"),include:[]}],Pwe=[...Jx,{slug:"media",title:(0,Ht.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Ht.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Ht.__)("Embeds"),include:[]}],XG=[{slug:"overview",title:(0,Ht.__)("Overview"),blocks:[]},{slug:"text",title:(0,Ht.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Ht.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,Ht.__)("All Blocks"),blocks:[],subcategories:Pwe}],kwe=`
	.is-root-container {
		display: flow-root;
	}
`,QG=`
	body {
		position: relative;
		padding: 32px !important;
	}

	${kwe}

	.editor-style-book__examples {
		max-width: 1200px;
		margin: 0 auto;
	}

	.editor-style-book__example {
	    max-width: 900px;
		border-radius: 2px;
		cursor: pointer;
		display: flex;
		flex-direction: column;
		gap: 40px;
		padding: 16px;
		width: 100%;
		box-sizing: border-box;
		scroll-margin-top: 32px;
		scroll-margin-bottom: 32px;
		margin: 0 auto 40px auto;
	}

	.editor-style-book__example.is-selected {
		box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
	}

	.editor-style-book__example.is-disabled-example {
		pointer-events: none;
	}

	.editor-style-book__example:focus:not(:disabled) {
		box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
		outline: 3px solid transparent;
	}

	.editor-style-book__duotone-example > div:first-child {
		display: flex;
		aspect-ratio: 16 / 9;
		grid-row: span 1;
		grid-column: span 2;
	}
	.editor-style-book__duotone-example img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.editor-style-book__duotone-example > div:not(:first-child) {
		height: 20px;
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__color-example {
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__subcategory-title,
	.editor-style-book__example-title {
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
		font-size: 13px;
		font-weight: normal;
		line-height: normal;
		margin: 0;
		text-align: left;
		padding-top: 8px;
		border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
		color: color-mix( in srgb, currentColor 60%, transparent );
	}

	.editor-style-book__subcategory-title {
		font-size: 16px;
		margin-bottom: 40px;
    	padding-bottom: 8px;
	}

	.editor-style-book__example-preview {
		width: 100%;
	}

	.editor-style-book__example-preview .block-editor-block-list__insertion-point,
	.editor-style-book__example-preview .block-list-appender {
		display: none;
	}
	:where(.is-root-container > .wp-block:first-child) {
		margin-top: 0;
	}
	:where(.is-root-container > .wp-block:last-child) {
		margin-bottom: 0;
	}
`;var JG=s(Xe(),1);function Hb(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((a,l)=>{let c=Hb(l,t);return c&&(a.subcategories||(a.subcategories=[]),a.subcategories=[...a.subcategories,c]),a},{title:e.title,slug:e.slug});let o=e?.blocks||[],n=e?.exclude||[],i=t.filter(a=>!n.includes(a.name)&&(a.category===e.slug||o.includes(a.name)));if(i.length)return{title:e.title,slug:e.slug,examples:i}}function n3(){let e=[...Jx,...o3].map(({slug:o})=>o),r=(0,JG.getCategories)().filter(({slug:o})=>!e.includes(o));return[...o3,...r]}var Ya=s(E(),1),jo=s(Xe(),1);var $G=s(A(),1),$x=s($(),1),i3=s(C(),1),Ewe=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,i3.jsx)($G.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,$x.__experimentalGetGradientClass)(n.slug):(0,$x.getColorClassName)("background-color",n.slug),a=re("editor-style-book__color-example",i);return(0,i3.jsx)("div",{className:a,style:{height:o}},n.slug)})}):null,s3=Ewe;var a3=s(A(),1),Kf=s(C(),1),Rwe=({duotones:e})=>e?(0,Kf.jsx)(a3.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,Kf.jsxs)(a3.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,Kf.jsx)("div",{children:(0,Kf.jsx)("img",{alt:`Duotone example: ${t.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${t.slug})`}})}),t.colors.map(r=>(0,Kf.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,eW=Rwe;var eC=s(C(),1);function Awe(e){if(!e)return[];let t=[];return Ch.forEach(r=>{let o=e[r.type],n=Array.isArray(o)?o.find(i=>i.slug===r.origin):void 0;if(n?.[r.type]){let i={name:r.slug,title:r.title,category:"colors"};r.type==="duotones"?(i.content=(0,eC.jsx)(eW,{duotones:n[r.type]}),t.push(i)):(i.content=(0,eC.jsx)(s3,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function Owe(e){let t=[],r=Array.isArray(e?.colors)?e.colors.find(i=>i.slug==="theme"):void 0;if(r){let i={name:"theme-colors",title:(0,Ya.__)("Colors"),category:"overview",content:(0,eC.jsx)(s3,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,jo.getBlockType)("core/heading")){let i=(0,jo.createBlock)("core/heading",{content:(0,Ya.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,jo.getBlockType)("core/paragraph")){let i=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),a=(0,jo.createBlock)("core/paragraph",{content:(0,Ya.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,jo.getBlockType)("core/group")){let l=(0,jo.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[i,a]);o.push(l)}else o.push(i)}return o.length&&t.push({name:"typography",title:(0,Ya.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let a=(0,jo.getBlockType)(i);if(a&&a.example){let l={name:i,title:a.title,category:"overview",blocks:(0,jo.getBlockFromExample)(i,{...a.example,attributes:{...a.example.attributes,style:void 0}})};t.push(l)}}),t}function l3(e){let t=(0,jo.getBlockTypes)().filter(a=>{let{name:l,example:c,supports:u}=a;return l!=="core/heading"&&!!c&&u?.inserter!==!1}).map(a=>({name:a.name,title:a.title,category:a.category,blocks:(0,jo.getBlockFromExample)(a.name,{...a.example,attributes:{...a.example.attributes,style:void 0}})}));if(!!!(0,jo.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,Ya.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(a=>(0,jo.createBlock)("core/heading",{content:(0,Ya.sprintf)((0,Ya.__)("Heading %d"),a),level:a}))},n=Awe(e),i=Owe(e);return[o,...n,...t,...i]}var nW=s(D(),1),rC=s(O(),1);var tC=s(Xe(),1),tW=s(O(),1),rW=s(D(),1);function Th(e={},t=!1){let o=Q6("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:a}=(0,tW.useSelect)(l=>{let{getEditorSettings:c}=l(w),{getBlockStyles:u}=l(tC.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,rW.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,tC.getBlockTypes)();return jy(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:a})},[o,n,e,i,t,a])}function oW(e=!1){let{merged:t}=xo();return Th(t,e)}function Iwe(e){let[t,r]=oW(e),{getEditorSettings:o}=(0,rC.useSelect)(w),{updateEditorSettings:n}=(0,rC.useDispatch)(w);(0,nW.useEffect)(()=>{if(!t||!r)return;let i=o(),a=Object.values(i.styles??[]).filter(l=>!l.isGlobalStyles);n({...i,styles:[...a,...t],__experimentalFeatures:r})},[t,r,n,o])}function oC({disableRootPadding:e}){return Iwe(e),null}var ot=s(C(),1),{ExperimentalBlockEditorProvider:Nwe}=N(so.privateApis),{Tabs:nC}=N(cc.privateApis);function Wu(e){return!e||Object.keys(e).length===0}var Fwe=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},aW=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function lW(){let{colors:e,gradients:t}=(0,so.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,so.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,Gt.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,ea._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,ea._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,ea._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function cW(e){let t=[],r=Hb({slug:"overview"},e);t.push(...r.examples);let o=e.filter(n=>n.category!=="overview"&&!r.examples.find(i=>i.name===n.name));return t.push(...o),t}function Dwe(e,t){return t?e.map(r=>({...r,variation:t,blocks:Array.isArray(r.blocks)?r.blocks.map(o=>({...o,attributes:{...o.attributes,style:void 0,className:`is-style-${t}`}})):{...r.blocks,attributes:{...r.blocks.attributes,style:void 0,className:`is-style-${t}`}}})):e}function Bwe({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},a){let l=Hu("color.text"),c=Hu("color.background"),u=lW(),d=(0,Gt.useMemo)(()=>l3(u),[u]),f=(0,Gt.useMemo)(()=>n3().filter(S=>d.some(x=>x.category===S.slug)),[d]),m=cW(d),{base:h}=xo(),g=aW(i),v=(0,Gt.useMemo)(()=>!Wu(n)&&!Wu(h)?go(h,n):{},[h,n]),y=(0,Xf.useSelect)(S=>S(so.store).getSettings(),[]),[b]=Th(v),_=(0,Gt.useMemo)(()=>({...y,styles:!Wu(b)&&!Wu(n)?b:y.styles,isPreviewMode:!0}),[b,y,n]);return(0,ot.jsx)("div",{ref:a,className:re("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,ot.jsxs)(nC,{children:[(0,ot.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,ot.jsx)(nC.TabList,{children:f.map(S=>(0,ot.jsx)(nC.Tab,{tabId:S.slug,children:S.title},S.slug))})}),f.map(S=>{let x=S.slug?n3().find(R=>R.slug===S.slug):null,T=x?Hb(x,d):{examples:d};return(0,ot.jsx)(nC.TabPanel,{tabId:S.slug,focusable:!1,className:"editor-style-book__tabpanel",children:(0,ot.jsx)(c3,{category:S.slug,examples:T,isSelected:e,onSelect:r,settings:_,title:S.title,goTo:g})},S.slug)})]}):(0,ot.jsx)(c3,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:_,goTo:g})})}var uW=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,Xf.useSelect)(L=>n??L(w).getEditorSettings(),[n]),a=(0,Xf.useSelect)(L=>L(sW.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Gt.useEffect)(()=>{(0,Xf.dispatch)(so.store).updateSettings({...i,mediaUpload:a?iW.uploadMedia:void 0})},[i,a]);let[l,c]=(0,Gt.useState)("/"),u=r??l,d=o??c,f=L=>u===`/blocks/${encodeURIComponent(L)}`||u.startsWith(`/blocks/${encodeURIComponent(L)}/`),m=(L,M=!1)=>{if(Ch.find(k=>k.slug===L)){d("/colors/palette");return}if(L==="typography"){d("/typography");return}M||d(`/blocks/${encodeURIComponent(L)}`)},h=lW(),g=l3(h),v=cW(g),y=null,b=null;if(u.includes("/colors"))y="colors";else if(u.includes("/typography"))y="text";else if(u.includes("/blocks")){y="blocks";let L=decodeURIComponent(u).split("/blocks/")[1];L?.includes("/variations")&&([L,b]=L.split("/variations/")),L&&g.find(M=>M.name===L)&&(y=L)}else t||(y="overview");let _=XG.find(L=>L.slug===y),S=(0,Gt.useMemo)(()=>_?Hb(_,g):{examples:[g.find(L=>L.name===y)]},[_,g,y]),x=(0,Gt.useMemo)(()=>y?b?{examples:Dwe(S.examples,b)}:S:{examples:v},[y,v,b,S]),{base:T}=xo(),R=aW(u),F=(0,Gt.useMemo)(()=>!Wu(e)&&!Wu(T)?go(T,e):{},[T,e]),[B]=Th(F),z=(0,Gt.useMemo)(()=>({...i,styles:!Wu(B)&&!Wu(e)?B:i.styles,isPreviewMode:!0}),[B,i,e]);return(0,ot.jsx)("div",{className:"editor-style-book",children:(0,ot.jsxs)(so.BlockEditorProvider,{settings:z,children:[(0,ot.jsx)(oC,{disableRootPadding:!0}),(0,ot.jsx)(c3,{examples:x,settings:z,goTo:R,isSelected:t?null:f,onSelect:t?null:m})]})})},c3=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:a})=>{let[l,c]=(0,Gt.useState)(!1),[u,d]=(0,Gt.useState)(!1),f=(0,Gt.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===iC.ENTER||v===iC.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Gt.useLayoutEffect)(()=>{u&&f.current&&a?.top&&Fwe("top",f.current)},[a?.top,u]),(0,ot.jsxs)(so.__unstableIframe,{onLoad:h,ref:f,className:re("editor-style-book__iframe",{"is-focused":l&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?m:{},children:[(0,ot.jsx)(so.__unstableEditorStyles,{styles:n.styles}),(0,ot.jsxs)("style",{children:[QG,!!r&&"body { cursor: pointer; } body * { pointer-events: none; }"]}),(0,ot.jsx)(Mwe,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,ea.sprintf)((0,ea.__)("Examples of blocks in the %s category"),i):(0,ea.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},Mwe=(0,Gt.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,ot.jsxs)(cc.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,ot.jsx)(dW,{id:`example-${i.name}`,title:i.title,content:i.content,blocks:i.blocks,isSelected:o?.(i.name),onClick:n?()=>n(i.name,!!i.variation):null},i.name)),!!t?.subcategories?.length&&t.subcategories.map(i=>(0,ot.jsxs)(cc.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,ot.jsx)(cc.Composite.GroupLabel,{children:(0,ot.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,ot.jsx)(Lwe,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),Lwe=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,ot.jsx)(dW,{id:`example-${o.name}`,title:o.title,content:o.content,blocks:o.blocks,isSelected:t?.(o.name),onClick:r?()=>r(o.name):null},o.name)),Vwe=["example-duotones"],dW=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let a=(0,Xf.useSelect)(d=>d(so.store).getSettings(),[]),l=(0,Gt.useMemo)(()=>({...a,focusMode:!1,isPreviewMode:!0}),[a]),c=(0,Gt.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=Vwe.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,ot.jsx)("div",{role:"row",children:(0,ot.jsx)("div",{role:"gridcell",children:(0,ot.jsxs)(cc.Composite.Item,{className:re("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,ea.sprintf)((0,ea.__)("Open %s styles in Styles panel"),t):void 0,render:(0,ot.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,ot.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,ot.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,ot.jsx)(cc.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,ot.jsxs)(Nwe,{value:c,settings:l,children:[(0,ot.jsx)(so.__unstableEditorStyles,{}),(0,ot.jsx)(so.BlockList,{renderAppender:!1})]})})})]})})})},fW=(0,Gt.forwardRef)(Bwe);var pW=s(C(),1);function jwe({path:e,onPathChange:t},r){return(0,pW.jsx)(fW,{ref:r,isSelected:o=>e===`/blocks/${encodeURIComponent(o)}`||e?.startsWith(`/blocks/${encodeURIComponent(o)}/`),onSelect:o=>{if(Ch.find(n=>n.slug===o)){t?.("/colors/palette");return}if(o==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(o))}})}var hW=(0,mW.forwardRef)(jwe);var gW=s(A(),1),ta=s($(),1),u3=s(O(),1),Yu=s(D(),1);var uc=s(C(),1),{ExperimentalBlockEditorProvider:zwe,__unstableBlockStyleVariationOverridesWithConfig:Uwe}=N(ta.privateApis);function sC(e){return!e||Object.keys(e).length===0}function Hwe({path:e},t){let r=(0,u3.useSelect)(y=>y(ta.store).getBlocks(),[]),{user:o,base:n}=xo(),{revisions:i,isLoading:a}=Lb(),l=(0,Yu.useMemo)(()=>{let y=e?.match(/^\/revisions\/(.+)$/);return y?y[1]:null},[e]),u=(0,Yu.useMemo)(()=>!l||!i.length?null:i.find(y=>String(y.id)===String(l)),[l,i])||o,d=(0,Yu.useMemo)(()=>!sC(u)&&!sC(n)?go(n,u):{},[n,u]),f=(0,Yu.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,u3.useSelect)(y=>y(ta.store).getSettings(),[]),h=(0,Yu.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=Th(d),v=!sC(g)&&!sC(u)?g:h.styles;return a?null:(0,uc.jsxs)(ta.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,uc.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,uc.jsx)(gW.Disabled,{className:"editor-revisions__example-preview__content",children:(0,uc.jsxs)(zwe,{value:f,settings:h,children:[(0,uc.jsx)(ta.BlockList,{renderAppender:!1}),(0,uc.jsx)(ta.__unstableEditorStyles,{styles:v}),(0,uc.jsx)(Uwe,{config:d})]})})]})}var vW=(0,Yu.forwardRef)(Hwe);var kh=s(D(),1),SW=s(A(),1);var aC=s(E(),1),qu=s(yo(),1),Ph=s(A(),1),Zu=s(C(),1),yW=20;function d3({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:a}=i;a!==qu.LEFT&&a!==qu.RIGHT||(i.preventDefault(),e==="left"&&a===qu.LEFT||e==="right"&&a===qu.RIGHT?t(yW):(e==="left"&&a===qu.RIGHT||e==="right"&&a===qu.LEFT)&&t(-yW))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,Zu.jsxs)(Zu.Fragment,{children:[(0,Zu.jsx)(Ph.Tooltip,{text:(0,aC.__)("Drag to resize"),children:(0,Zu.jsx)(Ph.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,aC.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,Zu.jsx)(Ph.VisuallyHidden,{id:n,children:(0,aC.__)("Use left and right arrow keys to resize the canvas.")})]})}var lC=s(C(),1),bW={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};function Gwe({className:e,enableResizing:t,height:r,children:o}){let[n,i]=(0,kh.useState)("100%"),a=(0,kh.useRef)(),l=(0,kh.useCallback)(c=>{a.current&&i(a.current.offsetWidth+c)},[]);return(0,lC.jsx)(SW.ResizableBox,{className:re("editor-resizable-editor",e,{"is-resizable":t}),ref:c=>{a.current=c?.resizable},size:{width:t?n:"100%",height:t&&r?r:"100%"},onResizeStop:(c,u,d)=>{i(d.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,lC.jsx)(d3,{direction:"left",resizeWidthBy:l}),right:(0,lC.jsx)(d3,{direction:"right",resizeWidthBy:l})},handleClasses:void 0,handleStyles:{left:bW,right:bW},children:o})}var Eh=Gwe;var Ku=s(C(),1);function f3(e,t){return t?(0,cC.__)("Style Book"):e?.startsWith("/revisions")?(0,cC.__)("Style Revisions"):""}function CW(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,Gb.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=N(m(w)),v=m(xW.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=N((0,Gb.useDispatch)(w)),{setIsListViewOpened:i}=(0,Gb.useDispatch)(w),a=(0,uC.useFocusOnMount)("firstElement"),l=(0,uC.useFocusReturn)(),c=null;t?c=(0,Ku.jsx)(hW,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,Ku.jsx)(vW,{path:e,ref:l}));let u=f3(e,t),d=()=>{i(r),o()};return(0,Ku.jsx)("div",{className:"editor-styles-canvas",children:(0,Ku.jsx)(Eh,{enableResizing:!1,children:(0,Ku.jsxs)("section",{className:"editor-styles-canvas__section",ref:a,onKeyDown:m=>{m.keyCode===wW.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,Ku.jsx)(_W.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:Kn,label:(0,cC.__)("Close"),onClick:d}),c]})})})}var TW=s(O(),1),m3=s(ft(),1),p3=s($(),1),PW=s(W(),1);function kW(){return(0,TW.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(p3.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(PW.store),{getEditedContentOnlySection:a}=N(e(p3.store)),l=a();if(!l)return null;let c=t(l),u=c?.metadata?.patternName;if(u){let f=typeof o=="function"?o(u):null;return{patternName:u,patternTitle:f?.title||c?.metadata?.name,type:"pattern"}}let d=r(l);if(d==="core/block"&&c?.ref){let f=n("postType","wp_block",c.ref);if(f?.title)return{patternName:c.ref,patternTitle:(0,m3.decodeEntities)(f.title),type:"synced-pattern"}}if(d==="core/template-part"&&c?.slug){let f=c.theme||i()?.stylesheet,m=f?`${f}//${c.slug}`:null;if(m){let h=n("postType","wp_template_part",m);if(h?.title)return{patternName:c.slug,patternTitle:(0,m3.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var ln=s(C(),1),Wwe=ra.__unstableMotion.create(ra.Button);function fC(e){let{stopEditingContentOnlySection:t}=N((0,Wb.useDispatch)(Yb.store)),r=kW(),{postId:o,postType:n,postTypeLabel:i,documentTitle:a,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,Wb.useSelect)(R=>{let{getCurrentPostType:F,getCurrentPostId:B,getEditorSettings:z,getRenderingMode:L}=R(w),{getEditedEntityRecord:M,getPostType:k,getCurrentTheme:I,isResolving:U}=R(RW.store),G=F(),Y=B(),Z=M("postType",G,Y),{default_template_types:V=[]}=I()??{},j=Zi({templateTypes:V,template:Z}),H=k(G)?.labels?.singular_name,{getStylesPath:X,getShowStylebook:ae}=N(R(w)),ne=X(),ue=ae(),Ye=f3(ne,ue);return{postId:Y,postType:G,postTypeLabel:H,documentTitle:Z.title,isNotFound:!Z&&!U("getEditedEntityRecord","postType",G,Y),templateTitle:j.title,onNavigateToPreviousEntityRecord:z().onNavigateToPreviousEntityRecord,isTemplatePreview:L()==="template-locked",stylesCanvasTitle:Ye}},[]),{open:m}=(0,Wb.useDispatch)(AW.store),h=(0,OW.useReducedMotion)(),g=sR.includes(n),v=!!u||!!r,y=g?c:a,b=r?.patternTitle||e.title||f||y,_=e.icon,S=R=>{R.stopPropagation(),r?t():u&&u()},x=Qx(o),T=(0,dC.useRef)(!1);return(0,dC.useEffect)(()=>{T.current=!0},[]),(0,ln.jsxs)("div",{className:re("editor-document-bar",{"has-back-button":v}),children:[(0,ln.jsx)(ra.__unstableAnimatePresence,{children:v&&(0,ln.jsx)(Wwe,{className:"editor-document-bar__back",icon:(0,Xu.isRTL)()?CR:_R,onClick:S,size:"compact",initial:T.current?{opacity:0,transform:"translateX(15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:h?{duration:0}:void 0,children:(0,Xu.__)("Back")})}),!g&&d&&!v&&(0,ln.jsx)(Yb.BlockIcon,{icon:Bs,className:"editor-document-bar__icon-layout"}),l?(0,ln.jsx)(ra.__experimentalText,{children:(0,Xu.__)("Document not found")}):(0,ln.jsxs)(ra.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:[(0,ln.jsxs)(ra.__unstableMotion.div,{className:"editor-document-bar__title",initial:T.current?{opacity:0,transform:v?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[_&&(0,ln.jsx)(Yb.BlockIcon,{icon:_}),(0,ln.jsxs)(ra.__experimentalText,{size:"body",as:"h1",children:[(0,ln.jsx)("span",{className:"editor-document-bar__post-title",children:b?(0,NW.__unstableStripHTML)(b):(0,Xu.__)("No title")}),r&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,Xu.__)("Template Part")}`:`\xB7 ${(0,Xu.__)("Pattern")}`}),!r&&x&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${x}`}),!r&&i&&!e.title&&!x&&(0,ln.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,IW.decodeEntities)(i)}`})]})]},v),(0,ln.jsx)("span",{className:"editor-document-bar__shortcut",children:EW.displayShortcut.primary("k")})]})]})}var Jf=s(E(),1),Rh=s(O(),1),pC=s(D(),1),hC=s(Wy(),1),mC=s($(),1),FW=s(W(),1),To=s(A(),1);var Qf=s(C(),1),Ywe=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function a(l){if(r){l.preventDefault();return}i()}return(0,Qf.jsx)("li",{className:re("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,Qf.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:a,children:[(0,Qf.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,Qf.jsx)("strong",{className:"document-outline__level",children:o}),(0,Qf.jsx)("span",{className:"document-outline__item-content",children:e})]})})},h3=Ywe;var Ct=s(C(),1),qwe=(0,Ct.jsx)("em",{children:(0,Jf.__)("(Empty heading)")}),Zwe=[(0,Ct.jsx)("br",{},"incorrect-break"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Incorrect heading level)")},"incorrect-message")],Kwe=[(0,Ct.jsx)("br",{},"incorrect-break-h1"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],Xwe=[(0,Ct.jsx)("br",{},"incorrect-break-multiple-h1"),(0,Ct.jsx)("em",{children:(0,Jf.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function Qwe(){return(0,Ct.jsxs)(To.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ct.jsx)(To.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,Ct.jsx)(To.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,Ct.jsx)(To.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,Ct.jsx)(To.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,Ct.jsx)(To.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,Ct.jsx)(To.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}var Jwe=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:$we(t)})),$we=e=>!e.attributes.content||e.attributes.content.trim().length===0;function Ah({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,Rh.useDispatch)(mC.store),{title:o,isTitleSupported:n}=(0,Rh.useSelect)(g=>{let{getEditedPostAttribute:v}=g(w),{getPostType:y}=g(FW.store),b=y(v("type"));return{title:v("title"),isTitleSupported:b?.supports?.title??!1}}),i=(0,Rh.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:y}=g(mC.store);return v().map(_=>y(_))}),a=(0,Rh.useSelect)(g=>{if(g(w).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:y}=g(mC.store),[b]=v("core/post-content");if(b)return y(b)},[]),l=(0,pC.useRef)(1),c=(0,pC.useMemo)(()=>Jwe(i),[i]);if(c.length<1)return(0,Ct.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,Ct.jsx)(Qwe,{}),(0,Ct.jsx)("p",{children:(0,Jf.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});let u=document.querySelector(".editor-post-title__input"),d=n&&o&&u,m=c.reduce((g,v)=>({...g,[v.level]:(g[v.level]||0)+1}),{})[1]>1;function h(g){return Array.isArray(a)?a.includes(g):!0}return(0,Ct.jsx)("div",{className:"document-outline",children:(0,Ct.jsxs)("ul",{children:[d&&(0,Ct.jsx)(h3,{level:(0,Jf.__)("Title"),isValid:!0,onSelect:e,href:`#${u.id}`,isDisabled:t,children:o}),c.map(g=>{let v=g.level>l.current+1,y=!g.isEmpty&&!v&&!!g.level&&(g.level!==1||!m&&!d);return l.current=g.level,(0,Ct.jsxs)(h3,{level:`H${g.level}`,isValid:y,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?qwe:(0,hC.getTextContent)((0,hC.create)({html:g.attributes.content})),v&&Zwe,g.level===1&&m&&Xwe,d&&g.level===1&&!m&&Kwe]},g.clientId)})]})})}var DW=s(O(),1),BW=s($(),1);function MW({children:e}){return(0,DW.useSelect)(r=>{let{getGlobalBlockCount:o}=r(BW.store);return o("core/heading")>0})?e:null}var LW=s(D(),1),VW=s(O(),1),hs=s(E(),1),jW=s($(),1),zW=s(Oi(),1),UW=s(yo(),1),HW=s(C(),1);function exe(){let{registerShortcut:e}=(0,VW.useDispatch)(zW.store);return(0,LW.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,hs.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,hs.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,hs.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,hs.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,UW.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,hs.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,hs.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,hs.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,hs.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,hs.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,hs.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,hs.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,HW.jsx)(jW.BlockEditorKeyboardShortcuts.Register,{})}var GW=exe;var gC=s(E(),1),WW=s(A(),1),vC=s(O(),1),qb=s(yo(),1);var YW=s(D(),1);var qW=s(C(),1);function txe(e,t){let r=(0,qb.isAppleOS)()?qb.displayShortcut.primaryShift("z"):qb.displayShortcut.primary("y"),o=(0,vC.useSelect)(i=>i(w).hasEditorRedo(),[]),{redo:n}=(0,vC.useDispatch)(w);return(0,qW.jsx)(WW.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,gC.isRTL)()?Yv:Vv,label:(0,gC.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var yC=(0,YW.forwardRef)(txe);var bC=s(E(),1),ZW=s(A(),1),SC=s(O(),1),KW=s(yo(),1);var XW=s(D(),1);var QW=s(C(),1);function rxe(e,t){let r=(0,SC.useSelect)(n=>n(w).hasEditorUndo(),[]),{undo:o}=(0,SC.useDispatch)(w);return(0,QW.jsx)(ZW.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,bC.isRTL)()?Vv:Yv,label:(0,bC.__)("Undo"),shortcut:KW.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var _C=(0,XW.forwardRef)(rxe);var $W=s(Yi(),1),eY=s(ct(),1);var wC=s(A(),1),Oh=s(E(),1),xC=s(O(),1),JW=s(D(),1),g3=s($(),1),$f=s(C(),1);function CC(){let[e,t]=(0,JW.useState)(!1),r=(0,xC.useSelect)(i=>i(g3.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,xC.useDispatch)(g3.store);return r?null:(0,$f.jsxs)($f.Fragment,{children:[(0,$f.jsx)(wC.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,Oh.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,Oh.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,Oh.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,$f.jsx)(wC.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,Oh.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,Oh.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var v3=s(C(),1);function oxe(){return(0,$W.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"}),(0,v3.jsx)(eY.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:(0,v3.jsx)(CC,{})})}var tY=oxe;var rY=s(Yi(),1),oY=s(ct(),1),nY=s(C(),1);function iY(){return(0,rY.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,nY.jsx)(oY.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var pc=s(A(),1),mc=s(E(),1),Ih=s(D(),1),Zb=s(he(),1),fY=s(O(),1);var em=s(E(),1),S3=s(O(),1),PC=s(A(),1),_3=s(W(),1);var TC=s(A(),1),y3=s(E(),1),sY=s(O(),1),b3=s(W(),1),aY=s(ft(),1);var dc=s(C(),1);function lY({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:a}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,sY.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:N(u(w)).hasPostMetaChanges(o,a)};let d=u(b3.store).getEditedEntityRecord(n,o,a),{default_template_types:f=[]}=u(b3.store).getCurrentTheme()??{};return{entityRecordTitle:Zi({template:d,templateTypes:f}).title,hasPostMetaChanges:N(u(w)).hasPostMetaChanges(o,a)}},[o,n,i,a]);return(0,dc.jsxs)(dc.Fragment,{children:[(0,dc.jsx)(TC.PanelRow,{children:(0,dc.jsx)(TC.CheckboxControl,{label:(0,aY.decodeEntities)(l)||(0,y3.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,dc.jsx)("ul",{className:"entities-saved-states__changes",children:(0,dc.jsx)("li",{children:(0,y3.__)("Post Meta.")})})]})}var fc=s(C(),1);function nxe(e,t){switch(e){case"site":return t===1?(0,em.__)("This change will affect your whole site."):(0,em.__)("These changes will affect your whole site.");case"wp_template":return(0,em.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,em.__)("The following has been modified.")}}function ixe({record:e}){let{editedRecord:t,savedRecord:r}=(0,S3.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:a}=n(_3.store);return{editedRecord:i(e.kind,e.name,e.key),savedRecord:a(e.kind,e.name,e.key)}},[e.kind,e.name,e.key]),o=My(t,r,{maxResults:10});return o.length?(0,fc.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,fc.jsx)("li",{children:n},n))}):null}function sxe({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=nxe(e?.name,t);return r?(0,fc.jsx)(PC.PanelRow,{children:r}):null}function cY({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],a=(0,S3.useSelect)(l=>l(_3.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(a=o===1?(0,em.__)("Template Part"):(0,em.__)("Template Parts")),(0,fc.jsxs)(PC.PanelBody,{title:a,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,fc.jsx)(sxe,{record:n,count:o}),e.map(l=>(0,fc.jsx)(lY,{record:l,checked:!t.some(c=>c.kind===l.kind&&c.name===l.name&&c.key===l.key&&c.property===l.property),onChange:c=>r(l,c)},l.key||l.property)),n?.name==="globalStyles"&&(0,fc.jsx)(ixe,{record:n})]})}var uY=s(O(),1),dY=s(W(),1),kC=s(D(),1),EC=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,uY.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(dY.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,kC.useMemo)(()=>{let c=e.filter(f=>!(f.kind==="root"&&f.name==="site")),u=r?.meta?.labels??{},d=[];for(let f in t)d.push({kind:"root",name:"site",title:u[f]||f,property:f});return[...c,...d]},[e,t,r]),[n,i]=(0,kC.useState)([]),a=({kind:c,name:u,key:d,property:f},m)=>{i(m?n.filter(h=>h.kind!==c||h.name!==u||h.key!==d||h.property!==f):[...n,{kind:c,name:u,key:d,property:f}])},l=o.length-n.length>0;return{dirtyEntityRecords:o,isDirty:l,setUnselectedEntities:a,unselectedEntities:n}};var Po=s(C(),1);function axe(e){return e}function RC({close:e,renderDialog:t,variant:r}){let o=EC();return(0,Po.jsx)(Kb,{close:e,renderDialog:t,variant:r,...o})}function Kb({additionalPrompt:e=void 0,close:t,onSave:r=axe,saveEnabled:o=void 0,saveLabel:n=(0,mc.__)("Save"),renderDialog:i,dirtyEntityRecords:a,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,Ih.useRef)(),{saveDirtyEntities:h}=N((0,fY.useDispatch)(w)),g=a.reduce((I,U)=>{let{name:G}=U;return I[G]||(I[G]=[]),I[G].push(U),I},{}),{site:v,wp_template:y,wp_template_part:b,..._}=g,S=[v,y,b,...Object.values(_)].filter(Array.isArray),x=o??l,T=(0,Ih.useCallback)(()=>t(),[t]),[R,F]=(0,Zb.__experimentalUseDialog)({onClose:()=>T()}),B=(0,Zb.useInstanceId)(Kb,"entities-saved-states__panel-label"),z=(0,Zb.useInstanceId)(Kb,"entities-saved-states__panel-description"),L=a.length?(0,mc.__)("Select the items you want to save."):void 0,M=d==="inline",k=(0,Po.jsxs)(Po.Fragment,{children:[(0,Po.jsx)(pc.FlexItem,{isBlock:!M,as:pc.Button,variant:M?"tertiary":"secondary",size:M?void 0:"compact",onClick:T,children:(0,mc.__)("Cancel")}),(0,Po.jsx)(pc.FlexItem,{isBlock:!M,as:pc.Button,ref:m,variant:"primary",size:M?void 0:"compact",disabled:!x,accessibleWhenDisabled:!0,onClick:()=>h({onSave:r,dirtyEntityRecords:a,entitiesToSkip:u,close:t,successNoticeContent:f}),className:"editor-entities-saved-states__save-button",children:n})]});return(0,Po.jsxs)("div",{ref:i?R:void 0,...i&&F,className:re("entities-saved-states__panel",{"is-inline":M}),role:i?"dialog":void 0,"aria-labelledby":i?B:void 0,"aria-describedby":i?z:void 0,children:[!M&&(0,Po.jsx)(pc.Flex,{className:"entities-saved-states__panel-header",gap:2,children:k}),(0,Po.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,Po.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,Po.jsx)("strong",{id:i?B:void 0,className:"entities-saved-states__text-prompt--header",children:(0,mc.__)("Are you ready to save?")})}),(0,Po.jsxs)("div",{id:i?z:void 0,children:[e,(0,Po.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,Ih.createInterpolateElement)((0,mc.sprintf)((0,mc._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",a.length),a.length),{strong:(0,Po.jsx)("strong",{})}):L})]})]}),S.map(I=>(0,Po.jsx)(cY,{list:I,unselectedEntities:u,setUnselectedEntities:c},I[0].name)),M&&(0,Po.jsx)(pc.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:k})]})}var pY=s(D(),1),AC=s(E(),1),tm=s(A(),1),hY=s(O(),1),gY=s(he(),1),vY=s(mo(),1);var Qu=s(C(),1);function lxe(){try{return(0,hY.select)(w).getEditedPostContent()}catch{}}function mY({text:e,children:t,variant:r="secondary"}){let o=(0,gY.useCopyToClipboard)(e);return(0,Qu.jsx)(tm.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var cxe=class extends pY.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,vY.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){let{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,Qu.jsxs)(tm.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,Qu.jsx)(tm.__experimentalText,{as:"p",children:(0,AC.__)("The editor has encountered an unexpected error.")}),(0,Qu.jsxs)(tm.__experimentalHStack,{expanded:!1,children:[t&&(0,Qu.jsx)(mY,{text:lxe,children:(0,AC.__)("Copy contents")}),(0,Qu.jsx)(mY,{variant:"primary",text:e?.stack,children:(0,AC.__)("Copy error")})]})]}):this.props.children}},yY=cxe;var hc=s(D(),1),Qb=s(he(),1),gc=s(O(),1),w3=s(E(),1),bY=s(Xe(),1),SY=s(ct(),1);var _Y=s(C(),1),uxe=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Xb,dxe=()=>{if(Xb!==void 0)return Xb;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Xb=!0}catch{Xb=!1}return Xb};function fxe(){let{postId:e,isEditedPostNew:t,hasRemoteAutosave:r}=(0,gc.useSelect)(c=>({postId:c(w).getCurrentPostId(),isEditedPostNew:c(w).isEditedPostNew(),hasRemoteAutosave:!!c(w).getEditorSettings().autosave}),[]),{getEditedPostAttribute:o}=(0,gc.useSelect)(w),{createWarningNotice:n,removeNotice:i}=(0,gc.useDispatch)(SY.store),{editPost:a,resetEditorBlocks:l}=(0,gc.useDispatch)(w);(0,hc.useEffect)(()=>{let c=pD(e,t);if(!c)return;try{c=JSON.parse(c)}catch{return}let{post_title:u,content:d,excerpt:f}=c,m={title:u,content:d,excerpt:f};if(!Object.keys(m).some(v=>m[v]!==o(v))){$S(e,t);return}if(r)return;let h="wpEditorAutosaveRestore";n((0,w3.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,w3.__)("Restore the backup"),onClick(){let{content:g,...v}=m;a(v),l((0,bY.parse)(m.content)),i(h)}}]})},[t,e])}function mxe(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,gc.useSelect)(u=>({postId:u(w).getCurrentPostId(),isEditedPostNew:u(w).isEditedPostNew(),isDirty:u(w).isEditedPostDirty(),isAutosaving:u(w).isAutosavingPost(),didError:u(w).didPostSaveRequestFail()}),[]),i=(0,hc.useRef)(r),a=(0,hc.useRef)(o);(0,hc.useEffect)(()=>{!n&&(a.current&&!o||i.current&&!r)&&$S(e,t),i.current=r,a.current=o},[r,o,n]);let l=(0,Qb.usePrevious)(t),c=(0,Qb.usePrevious)(e);(0,hc.useEffect)(()=>{c===e&&l&&!t&&$S(e,!0)},[t,e])}function pxe(){let{autosave:e}=(0,gc.useDispatch)(w),t=(0,hc.useCallback)(()=>{uxe(()=>e({local:!0}))},[]);fxe(),mxe();let r=(0,gc.useSelect)(o=>o(w).getEditorSettings().localAutosaveInterval,[]);return(0,_Y.jsx)(Xx,{interval:r,autosave:t})}var wY=(0,Qb.ifCondition)(dxe)(pxe);var xY=s(O(),1),CY=s(W(),1);function hxe({children:e}){return(0,xY.useSelect)(r=>{let{getEditedPostAttribute:o}=r(w),{getPostType:n}=r(CY.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var Nh=hxe;var x3=s(E(),1),Dh=s(A(),1),OC=s(O(),1),kY=s(D(),1);var TY=s(O(),1),PY=s(W(),1);function gxe(e={},t){if(e[t]!==void 0)return!!e[t];let[r,o]=t.split("."),[n]=Array.isArray(e[r])?e[r]:[];return Array.isArray(n)?n.includes(o):!!n?.[o]}function vxe({children:e,supportKeys:t}){let r=(0,TY.useSelect)(n=>{let{getEditedPostAttribute:i}=n(w),{getPostType:a}=n(PY.store);return a(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>gxe(r.supports,n))),o?e:null}var tr=vxe;var Fh=s(C(),1);function yxe(){let e=(0,OC.useSelect)(a=>a(w).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,OC.useDispatch)(w),[r,o]=(0,kY.useState)(null),n=a=>{o(a);let l=Number(a);Number.isInteger(l)&&a.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,Fh.jsx)(Dh.Flex,{children:(0,Fh.jsx)(Dh.FlexBlock,{children:(0,Fh.jsx)(Dh.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,x3.__)("Order"),help:(0,x3.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function EY(){return(0,Fh.jsx)(tr,{supportKeys:"page-attributes",children:(0,Fh.jsx)(yxe,{})})}var jY=s(O(),1),zY=s(W(),1);var T3=s(M_(),1),li=s(E(),1),Ju=s(A(),1),FY=s(he(),1),qa=s(D(),1),Mh=s(O(),1),k3=s(ft(),1),NC=s(W(),1),DY=s($(),1),BY=s(Ir(),1);var RY=s(A(),1),AY=s(D(),1),Jb=s(C(),1),bxe=(0,AY.forwardRef)(({className:e,label:t,children:r},o)=>(0,Jb.jsxs)(RY.__experimentalHStack,{className:re("editor-post-panel__row",e),ref:o,children:[t&&(0,Jb.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,Jb.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),ht=bxe;var OY=s(ft(),1);function IC(e){let t=e.map(n=>({children:[],parent:void 0,...n}));if(t.some(({parent:n})=>n===void 0))return t;let r=t.reduce((n,i)=>{let{parent:a}=i;return n[a]||(n[a]=[]),n[a].push(i),n},{}),o=n=>n.map(i=>{let a=r[i.id];return{...i,children:a&&a.length?o(a):[]}});return o(r[0]||[])}var Bh=e=>(0,OY.decodeEntities)(e),C3=e=>({...e,name:Bh(e.name)}),IY=e=>(e??[]).map(C3);var ai=s(C(),1);function P3(e){return e?.title?.rendered?(0,k3.decodeEntities)(e.title.rendered):`#${e.id} (${(0,li.__)("no title")})`}var NY=(e,t)=>{let r=(0,T3.default)(e||"").toLowerCase(),o=(0,T3.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function MY(){let{editPost:e}=(0,Mh.useDispatch)(w),[t,r]=(0,qa.useState)(!1),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:a,isLoading:l}=(0,Mh.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(NC.store),{getCurrentPostId:y,getEditedPostAttribute:b}=f(w),_=b("type"),S=b("parent"),x=m(_),T=y(),R=x?.hierarchical??!1,F={per_page:100,exclude:T,parent_exclude:T,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(F.search=t,F.orderby="relevance");let B=S?g("postType",_,S):null;return{isHierarchical:R,parentPostId:S,parentPostTitle:B?P3(B):"",pageItems:R?h("postType",_,F):null,isLoading:R?v("getEntityRecords",["postType",_,F]):!1}},[t]),c=(0,qa.useMemo)(()=>{let f=(v,y=0)=>v.map(S=>[{value:S.id,label:"\u2014 ".repeat(y)+(0,k3.decodeEntities)(S.name),rawName:S.name},...f(S.children||[],y+1)]).sort(([S],[x])=>{let T=NY(S.rawName,t),R=NY(x.rawName,t);return T>=R?1:-1}).flat();if(!a)return[];let m=a.map(v=>({id:v.id,parent:v.parent,name:P3(v)}));t||(m=IC(m));let h=f(m),g=h.find(v=>v.value===n);return i&&!g&&h.unshift({value:n,label:i}),h},[a,t,i,n]);if(!o)return null;let u=f=>{r(f)},d=f=>{e({parent:f})};return(0,ai.jsx)(Ju.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,li.__)("Parent"),help:(0,li.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,FY.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function Sxe({isOpen:e,onClick:t}){let r=(0,Mh.useSelect)(n=>{let{getEditedPostAttribute:i}=n(w),a=i("parent");if(!a)return null;let{getEntityRecord:l}=n(NC.store),c=i("type");return l("postType",c,a)},[]),o=(0,qa.useMemo)(()=>r?P3(r):(0,li.__)("None"),[r]);return(0,ai.jsx)(Ju.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,li.sprintf)((0,li.__)("Change parent: %s"),o),onClick:t,children:o})}function LY(){let e=(0,Mh.useSelect)(n=>n(NC.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,qa.useState)(null),o=(0,qa.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,ai.jsx)(ht,{label:(0,li.__)("Parent"),ref:r,children:(0,ai.jsx)(Ju.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,ai.jsx)(Sxe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,ai.jsxs)("div",{className:"editor-post-parent",children:[(0,ai.jsx)(DY.__experimentalInspectorPopoverHeader,{title:(0,li.__)("Parent"),onClose:n}),(0,ai.jsxs)("div",{children:[(0,qa.createInterpolateElement)((0,li.sprintf)((0,li.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,BY.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,ai.jsx)("wbr",{})}),(0,ai.jsx)("p",{children:(0,qa.createInterpolateElement)((0,li.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,ai.jsx)(Ju.ExternalLink,{href:(0,li.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,ai.jsx)(MY,{})]})})})}var VY=MY;var FC=s(C(),1),_xe="page-attributes";function wxe(){let{isEnabled:e,postType:t}=(0,jY.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(w),{getPostType:i}=r(zY.store);return{isEnabled:n(_xe),postType:i(o("type"))}},[]);return!e||!t?null:(0,FC.jsx)(LY,{})}function DC(){return(0,FC.jsx)(Nh,{children:(0,FC.jsx)(wxe,{})})}var gs=s(E(),1),yc=s(A(),1),Vh=s(O(),1),I3=s(W(),1),GY=s($(),1),jh=s(D(),1);var WY=s(ct(),1);var BC=s(O(),1),R3=s(D(),1),oa=s(Xe(),1),na=s(A(),1),rm=s(E(),1);var vc=s(C(),1),E3=(0,rm.__)("Custom Template");function MC({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,BC.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(w);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=N((0,BC.useDispatch)(w)),[n,i]=(0,R3.useState)(""),[a,l]=(0,R3.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),a)return;l(!0);let f=t??(0,oa.serialize)([(0,oa.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,oa.createBlock)("core/site-title"),(0,oa.createBlock)("core/site-tagline")]),(0,oa.createBlock)("core/separator"),(0,oa.createBlock)("core/group",{tagName:"main"},[(0,oa.createBlock)("core/group",{layout:{inherit:!0}},[(0,oa.createBlock)("core/post-title")]),(0,oa.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:af(n||E3)||"wp-custom-template",content:f,title:n||E3,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,vc.jsx)(na.Modal,{title:(0,rm.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,vc.jsx)("form",{className:"editor-post-template__create-form",onSubmit:u,children:(0,vc.jsxs)(na.__experimentalVStack,{spacing:"3",children:[(0,vc.jsx)(na.TextControl,{__next40pxDefaultSize:!0,label:(0,rm.__)("Name"),value:n,onChange:i,placeholder:E3,disabled:a,help:(0,rm.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,vc.jsxs)(na.__experimentalHStack,{justify:"right",children:[(0,vc.jsx)(na.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,rm.__)("Cancel")}),(0,vc.jsx)(na.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:a,"aria-disabled":a,children:(0,rm.__)("Create")})]})]})})})}var $b=s(O(),1),UY=s(D(),1),LC=s(W(),1);function Lh(){return(0,$b.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(w);return{postId:t(),postType:r()}},[])}function om(){let{postType:e,postId:t}=Lh();return(0,$b.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(LC.store),a=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,l=+t===a?.page_for_posts,c=e==="page"&&+t===a?.page_on_front,u=c?i("postType","wp_template",{per_page:-1}):[],d=c&&!!u?.some(({slug:f})=>f==="front-page");return!l&&!d},[t,e])}function HY(e){return(0,$b.useSelect)(t=>t(LC.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function A3(e){let t=O3(),r=om(),o=HY(e);return(0,UY.useMemo)(()=>r&&o?.filter(n=>n.is_custom&&n.slug!==t&&!!n.content.raw),[o,t,r])}function O3(){let{postType:e,postId:t}=Lh(),r=HY(e),o=(0,$b.useSelect)(n=>n(LC.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var ci=s(C(),1);function xxe({isOpen:e,onClick:t}){let r=(0,Vh.useSelect)(o=>{let n=o(w).getEditedPostAttribute("template"),{supportsTemplateMode:i,availableTemplates:a}=o(w).getEditorSettings();if(!i&&a[n])return a[n];let l=o(I3.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(w).getCurrentTemplateId();return l?.title||l?.slug||a?.[n]},[]);return(0,ci.jsx)(yc.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,gs.__)("Template options"),onClick:t,children:r??(0,gs.__)("Default template")})}function Cxe({onClose:e}){let t=om(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:a,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,Vh.useSelect)(y=>{let{canUser:b,getEntityRecords:_}=y(I3.store),S=y(w).getEditorSettings(),x=b("create",{kind:"postType",name:"wp_template"}),T=y(w).getCurrentTemplateId();return{availableTemplates:S.availableTemplates,fetchedTemplates:x?_("postType","wp_template",{post_type:y(w).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:y(w).getEditedPostAttribute("template"),canCreate:t&&x&&S.supportsTemplateMode,canEdit:t&&x&&S.supportsTemplateMode&&!!T,currentTemplateId:T,onNavigateToEntityRecord:S.onNavigateToEntityRecord,getEditorSettings:y(w).getEditorSettings}},[t]),d=(0,jh.useMemo)(()=>Object.entries({...r,...Object.fromEntries((o??[]).map(({slug:y,title:b})=>[y,b.rendered]))}).map(([y,b])=>({value:y,label:b})),[r,o]),f=d.find(y=>y.value===n)??d.find(y=>!y.value),{editPost:m}=(0,Vh.useDispatch)(w),{createSuccessNotice:h}=(0,Vh.useDispatch)(WY.store),[g,v]=(0,jh.useState)(!1);return(0,ci.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,ci.jsx)(GY.__experimentalInspectorPopoverHeader,{title:(0,gs.__)("Template"),help:(0,gs.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:lR,label:(0,gs.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,ci.jsx)(yc.SelectControl,{__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,gs.__)("Template"),value:f?.value??"",options:d,onChange:y=>m({template:y||""})}):(0,ci.jsx)(yc.Notice,{status:"warning",isDismissible:!1,children:(0,gs.__)("The posts page template cannot be changed.")}),a&&c&&(0,ci.jsx)("p",{children:(0,ci.jsx)(yc.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,gs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,gs.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,gs.__)("Edit template")})}),g&&(0,ci.jsx)(MC,{onClose:()=>v(!1)})]})}function Txe(){let[e,t]=(0,jh.useState)(null),r=(0,jh.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,ci.jsx)(ht,{label:(0,gs.__)("Template"),ref:t,children:(0,ci.jsx)(yc.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,ci.jsx)(xxe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,ci.jsx)(Cxe,{onClose:o})})})}var VC=Txe;var UC=s(A(),1),JY=s(_u(),1),HC=s(O(),1),$Y=s(qY(),1);var XY=s(A(),1);var jC=s(O(),1),ZY=s(lt(),1);var KY=s(C(),1),{PreferenceBaseOption:Pxe}=N(ZY.privateApis);function $u(e){let{toggleEditorPanelEnabled:t}=(0,jC.useDispatch)(w),{isChecked:r,isRemoved:o}=(0,jC.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:a}=n(w);return{isChecked:i(e.panelName),isRemoved:a(e.panelName)}},[e.panelName]);return o?null:(0,KY.jsx)(Pxe,{isChecked:r,onChange:()=>t(e.panelName),...e})}var N3=s(C(),1),{Fill:kxe,Slot:Exe}=(0,XY.createSlotFill)("EnablePluginDocumentSettingPanelOption"),QY=({label:e,panelName:t})=>(0,N3.jsx)(kxe,{children:(0,N3.jsx)($u,{label:e,panelName:t})});QY.Slot=Exe;var zC=QY;var ed=s(C(),1),{Fill:Rxe,Slot:Axe}=(0,UC.createSlotFill)("PluginDocumentSettingPanel"),eq=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,JY.usePluginContext)(),a=`${i}/${e}`,{opened:l,isEnabled:c}=(0,HC.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(w);return{opened:f(a),isEnabled:m(a)}},[a]),{toggleEditorPanelOpened:u}=(0,HC.useDispatch)(w);return e===void 0&&(0,$Y.default)("PluginDocumentSettingPanel requires a name property."),(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsx)(zC,{label:r,panelName:a}),(0,ed.jsx)(Rxe,{children:c&&(0,ed.jsx)(UC.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(a),children:n})})]})};eq.Slot=Axe;var GC=eq;var tq=s($(),1),rq=s(A(),1),oq=s(he(),1),F3=s(C(),1),Oxe=(e,t)=>e.filter(r=>!t.includes(r)).length===0,Ixe=(e,t)=>!Array.isArray(t)||Oxe(e,t),Nxe=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,F3.jsx)(tq.BlockSettingsMenuControls,{children:({selectedBlocks:a,onClose:l})=>Ixe(a,e)?(0,F3.jsx)(rq.MenuItem,{onClick:(0,oq.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),nq=Nxe;var iq=s(A(),1),sq=s(_u(),1);var aq=s(C(),1);function lq(e){let t=(0,sq.usePluginContext)();return(0,aq.jsx)(rs,{name:"core/plugin-more-menu",as:e.as??iq.MenuItem,icon:e.icon||t.icon,...e})}var cq=s(_u(),1),WC=s(A(),1),D3=s(C(),1),{Fill:Fxe,Slot:Dxe}=(0,WC.createSlotFill)("PluginPostPublishPanel"),uq=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,cq.usePluginContext)();return(0,D3.jsx)(Fxe,{children:(0,D3.jsx)(WC.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};uq.Slot=Dxe;var YC=uq;var qC=s(A(),1),B3=s(C(),1),{Fill:Bxe,Slot:Mxe}=(0,qC.createSlotFill)("PluginPostStatusInfo"),dq=({children:e,className:t})=>(0,B3.jsx)(Bxe,{children:(0,B3.jsx)(qC.PanelRow,{className:t,children:e})});dq.Slot=Mxe;var ZC=dq;var KC=s(A(),1),fq=s(_u(),1),M3=s(C(),1),{Fill:Lxe,Slot:Vxe}=(0,KC.createSlotFill)("PluginPrePublishPanel"),mq=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,fq.usePluginContext)();return(0,M3.jsx)(Lxe,{children:(0,M3.jsx)(KC.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};mq.Slot=Vxe;var XC=mq;var pq=s(A(),1),hq=s(_u(),1);var gq=s(C(),1);function vq(e){let t=(0,hq.usePluginContext)();return(0,gq.jsx)(rs,{name:"core/plugin-preview-menu",as:e.as??pq.MenuItem,icon:e.icon||t.icon,...e})}var yq=s(C(),1);function nm({className:e,...t}){return(0,yq.jsx)(ql,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var bq=s(C(),1);function Sq(e){return(0,bq.jsx)(xu,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var JC=s(O(),1),$C=s(W(),1);var bc=s(O(),1),Uq=s(ft(),1),td=s(A(),1),QC=s(D(),1),sm=s(E(),1),Gh=s(W(),1);var Hq=s(ct(),1),Gq=s(lt(),1);var Uh=s(D(),1),Cq=s(ft(),1),Tq=s($(),1),Hh=s(A(),1),zh=s(E(),1),Pq=s(O(),1),kq=s(W(),1),Eq=s(Xe(),1);var wq=s(M_(),1);function _q(e=""){return e=(0,wq.default)(e),e=e.trim().toLowerCase(),e}function jxe(e,t){let r=_q(t),o=_q(e.title),n=0;return r===o?n+=30:o.startsWith(r)?n+=20:r.split(" ").every(l=>o.includes(l))&&(n+=10),n}function xq(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,jxe(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Bi=s(C(),1);function Rq({onClick:e}){let[t,r]=(0,Uh.useState)(!1),{postType:o,postId:n}=Lh(),i=A3(o),{editEntityRecord:a}=(0,Pq.useDispatch)(kq.store),l=async c=>{a("postType",o,n,{template:c.name},{undoIgnore:!0}),r(!1),e()};return(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsx)(Hh.MenuItem,{disabled:!i?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,zh.__)("Change template")}),t&&(0,Bi.jsx)(Hh.Modal,{title:(0,zh.__)("Choose a template"),onRequestClose:()=>r(!1),overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Bi.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Bi.jsx)(zxe,{postType:o,onSelect:l})})})]})}function zxe({postType:e,onSelect:t}){let[r,o]=(0,Uh.useState)(""),n=A3(e),i=(0,Uh.useMemo)(()=>n.map(l=>({name:l.slug,blocks:(0,Eq.parse)(l.content.raw),title:(0,Cq.decodeEntities)(l.title.rendered),id:l.id})),[n]),a=(0,Uh.useMemo)(()=>xq(i,r),[i,r]);return(0,Bi.jsxs)(Bi.Fragment,{children:[(0,Bi.jsx)(Hh.SearchControl,{onChange:o,value:r,label:(0,zh.__)("Search"),placeholder:(0,zh.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Bi.jsx)(Tq.__experimentalBlockPatternsList,{label:(0,zh.__)("Templates"),blockPatterns:a,onClickPattern:t})]})}var Aq=s(A(),1),Oq=s(E(),1),Iq=s(O(),1),Nq=s(W(),1);var Fq=s(C(),1);function Dq({onClick:e}){let t=O3(),r=om(),{postType:o,postId:n}=Lh(),{editEntityRecord:i}=(0,Iq.useDispatch)(Nq.store);return!t||!r?null:(0,Fq.jsx)(Aq.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,Oq.__)("Use default template")})}var Bq=s(A(),1),Mq=s(E(),1),Lq=s(O(),1),Vq=s(W(),1),jq=s(D(),1);var im=s(C(),1);function zq(){let{canCreateTemplates:e}=(0,Lq.useSelect)(n=>{let{canUser:i}=n(Vq.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,jq.useState)(!1),o=om();return!e||!o?null:(0,im.jsxs)(im.Fragment,{children:[(0,im.jsx)(Bq.MenuItem,{onClick:()=>{r(!0)},children:(0,Mq.__)("Create new template")}),t&&(0,im.jsx)(MC,{onClose:()=>{r(!1)}})]})}var ui=s(C(),1);function Wq({id:e}){let{isTemplateHidden:t,onNavigateToEntityRecord:r,getEditorSettings:o,hasGoBack:n,hasSpecificTemplate:i}=(0,bc.useSelect)(x=>{let{getRenderingMode:T,getEditorSettings:R,getCurrentPost:F}=N(x(w)),B=R(),z=F();return{isTemplateHidden:T()==="post-only",onNavigateToEntityRecord:B.onNavigateToEntityRecord,getEditorSettings:R,hasGoBack:B.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!z.template}},[]),{get:a}=(0,bc.useSelect)(Gq.store),{editedRecord:l,hasResolved:c}=(0,Gh.useEntityRecord)("postType","wp_template",e),{getEntityRecord:u}=(0,bc.useSelect)(Gh.store),{editEntityRecord:d}=(0,bc.useDispatch)(Gh.store),{createSuccessNotice:f}=(0,bc.useDispatch)(Hq.store),{setRenderingMode:m,setDefaultRenderingMode:h}=N((0,bc.useDispatch)(w)),g=(0,bc.useSelect)(x=>!!x(Gh.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,y]=(0,QC.useState)(null),b=(0,QC.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let _=n?[{label:(0,sm.__)("Go back"),onClick:()=>o().onNavigateToPreviousEntityRecord()}]:void 0,S=()=>{a("core/edit-site","welcomeGuideTemplate")||f((0,sm.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:_})};return(0,ui.jsx)(ht,{label:(0,sm.__)("Template"),ref:y,children:(0,ui.jsx)(td.DropdownMenu,{popoverProps:b,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,sm.__)("Template options"),text:(0,Uq.decodeEntities)(l.title),icon:null,children:({onClose:x})=>(0,ui.jsxs)(ui.Fragment,{children:[(0,ui.jsxs)(td.MenuGroup,{children:[g&&(0,ui.jsx)(td.MenuItem,{onClick:async()=>{if(r({postId:l.id,postType:"wp_template"}),!i&&window?.__experimentalTemplateActivate){let T=await u("root","site").active_templates;T[l.slug]!==l.id&&d("root","site",void 0,{active_templates:{...T,[l.slug]:l.id}})}x(),S()},children:(0,sm.__)("Edit template")}),(0,ui.jsx)(Rq,{onClick:x}),(0,ui.jsx)(Dq,{onClick:x}),g&&(0,ui.jsx)(zq,{})]}),(0,ui.jsx)(td.MenuGroup,{children:(0,ui.jsx)(td.MenuItem,{icon:t?void 0:Pi,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{let T=t?"template-locked":"post-only";m(T),h(T)},children:(0,sm.__)("Show template")})})]})})})}var L3=s(C(),1);function eT(){let{templateId:e,isBlockTheme:t}=(0,JC.useSelect)(n=>{let{getCurrentTemplateId:i,getEditorSettings:a}=n(w);return{templateId:i(),isBlockTheme:a().__unstableIsBlockBasedTheme}},[]),r=(0,JC.useSelect)(n=>{let i=n(w).getCurrentPostType();if(!n($C.store).getPostType(i)?.viewable)return!1;let l=n(w).getEditorSettings();return!!l.availableTemplates&&Object.keys(l.availableTemplates).length>0?!0:l.supportsTemplateMode?n($C.store).canUser("create",{kind:"postType",name:"wp_template"})??!1:!1},[]),o=(0,JC.useSelect)(n=>r?n($C.store).canUser("read",{kind:"postType",name:"wp_template"}):!1,[r]);return(!t||!o)&&r?(0,L3.jsx)(VC,{}):t&&e?(0,L3.jsx)(Wq,{id:e}):null}var lZ=s(O(),1),cZ=s(W(),1);var Xq=s(he(),1),Qq=s(D(),1),Jq=s(O(),1),$q=s(E(),1),eZ=s(A(),1);var Yq=s(E(),1),qq=s(D(),1),Zq=s(O(),1),V3=s(ft(),1),Kq=s(W(),1);var e0={_fields:"id,name",context:"view"},tT={who:"authors",per_page:100,...e0};function rT(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,Zq.useSelect)(a=>{let{getUser:l,getUsers:c,isResolving:u}=a(Kq.store),{getEditedPostAttribute:d}=a(w),f=d("author"),m={...tT};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,e0),isLoading:u("getUsers",[m])}},[e]),i=(0,qq.useMemo)(()=>{let a=(r??[]).map(u=>({value:u.id,label:(0,V3.decodeEntities)(u.name)})),l=a.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,V3.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,Yq.__)("(No author)")}]),[...c,...a]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var tZ=s(C(),1);function rZ(){let[e,t]=(0,Qq.useState)(),{editPost:r}=(0,Jq.useDispatch)(w),{authorId:o,authorOptions:n,isLoading:i}=rT(e),a=l=>{l&&r({author:l})};return(0,tZ.jsx)(eZ.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,$q.__)("Author"),options:n,value:o,onFilterValueChange:(0,Xq.debounce)(t,300),onChange:a,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var oZ=s(E(),1),nZ=s(O(),1),iZ=s(A(),1);var sZ=s(C(),1);function aZ(){let{editPost:e}=(0,nZ.useDispatch)(w),{authorId:t,authorOptions:r}=rT(),o=n=>{let i=Number(n);e({author:i})};return(0,sZ.jsx)(iZ.SelectControl,{__next40pxDefaultSize:!0,className:"post-author-selector",label:(0,oZ.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var j3=s(C(),1),Uxe=25;function Hxe(){return(0,lZ.useSelect)(t=>t(cZ.store).getUsers(tT)?.length>=Uxe,[])?(0,j3.jsx)(rZ,{}):(0,j3.jsx)(aZ,{})}var oT=Hxe;var uZ=s(O(),1);var dZ=s(C(),1);function nT({children:e}){let{hasAssignAuthorAction:t}=(0,uZ.useSelect)(r=>({hasAssignAuthorAction:!!r(w).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,dZ.jsx)(tr,{supportKeys:"author",children:e}):null}var am=s(E(),1),iT=s(A(),1),sT=s(D(),1),fZ=s(ft(),1),mZ=s($(),1),pZ=s(O(),1),hZ=s(W(),1);var Za=s(C(),1);function Gxe({isOpen:e,onClick:t}){let{postAuthor:r}=(0,pZ.useSelect)(n=>{let i=n(w).getEditedPostAttribute("author");return{postAuthor:n(hZ.store).getUser(i,e0)}},[]),o=(0,fZ.decodeEntities)(r?.name)||(0,am.__)("(No author)");return(0,Za.jsx)(iT.Button,{size:"compact",className:"editor-post-author__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,am.sprintf)((0,am.__)("Change author: %s"),o),onClick:t,children:o})}function Wxe(){let[e,t]=(0,sT.useState)(null),r=(0,sT.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,Za.jsx)(nT,{children:(0,Za.jsx)(ht,{label:(0,am.__)("Author"),ref:t,children:(0,Za.jsx)(iT.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Za.jsx)(Gxe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Za.jsxs)("div",{className:"editor-post-author",children:[(0,Za.jsx)(mZ.__experimentalInspectorPopoverHeader,{title:(0,am.__)("Author"),onClose:o}),(0,Za.jsx)(oT,{onClose:o})]})})})})}var aT=Wxe;var rd=s(E(),1),cT=s(A(),1),uT=s(O(),1);var lT=s(C(),1),Yxe=[{label:(0,rd._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,rd.__)("Visitors can add new comments and replies.")},{label:(0,rd.__)("Closed"),value:"closed",description:[(0,rd.__)("Visitors cannot add new comments or replies."),(0,rd.__)("Existing comments remain visible.")].join(" ")}];function qxe(){let e=(0,uT.useSelect)(o=>o(w).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,uT.useDispatch)(w),r=o=>t({comment_status:o});return(0,lT.jsx)("form",{children:(0,lT.jsx)(cT.__experimentalVStack,{spacing:4,children:(0,lT.jsx)(cT.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,rd.__)("Comment status"),options:Yxe,onChange:r,selected:e})})})}var dT=qxe;var ia=s(E(),1),Wh=s(A(),1),U3=s(O(),1),gT=s(D(),1),gZ=s($(),1),vZ=s(W(),1);var fT=s(E(),1),mT=s(A(),1),pT=s(O(),1);var z3=s(C(),1);function Zxe(){let e=(0,pT.useSelect)(o=>o(w).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,pT.useDispatch)(w),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,z3.jsx)(mT.CheckboxControl,{label:(0,fT.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,z3.jsx)(mT.ExternalLink,{href:(0,fT.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fT.__)("Learn more about pingbacks & trackbacks")})})}var hT=Zxe;var Bn=s(C(),1),Kxe="discussion-panel";function Xxe({onClose:e}){return(0,Bn.jsxs)("div",{className:"editor-post-discussion",children:[(0,Bn.jsx)(gZ.__experimentalInspectorPopoverHeader,{title:(0,ia.__)("Discussion"),onClose:e}),(0,Bn.jsxs)(Wh.__experimentalVStack,{spacing:4,children:[(0,Bn.jsx)(tr,{supportKeys:"comments",children:(0,Bn.jsx)(dT,{})}),(0,Bn.jsx)(tr,{supportKeys:"trackbacks",children:(0,Bn.jsx)(hT,{})})]})]})}function Qxe({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,U3.useSelect)(l=>{let{getEditedPostAttribute:c}=l(w),{getPostType:u}=l(vZ.store),d=u(c("type"));return{commentStatus:c("comment_status")??"open",pingStatus:c("ping_status")??"open",commentsSupported:!!d.supports.comments,trackbacksSupported:!!d.supports.trackbacks}},[]),a;return r==="open"?o==="open"?a=(0,ia._x)("Open",'Adjective: e.g. "Comments are open"'):a=i?(0,ia.__)("Comments only"):(0,ia._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?a=n?(0,ia.__)("Pings only"):(0,ia.__)("Pings enabled"):a=(0,ia.__)("Closed"),(0,Bn.jsx)(Wh.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,ia.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:a})}function vT(){let{isEnabled:e}=(0,U3.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(w);return{isEnabled:i(Kxe)}},[]),[t,r]=(0,gT.useState)(null),o=(0,gT.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Bn.jsx)(tr,{supportKeys:["comments","trackbacks"],children:(0,Bn.jsx)(ht,{label:(0,ia.__)("Discussion"),ref:r,children:(0,Bn.jsx)(Wh.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Bn.jsx)(Qxe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Bn.jsx)(Xxe,{onClose:n})})})}):null}var Yh=s(E(),1),bT=s(A(),1),ST=s(O(),1),yZ=s(D(),1),bZ=s(ft(),1);var yT=s(C(),1);function t0({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,ST.useSelect)(d=>{let{getCurrentPostType:f,getEditedPostAttribute:m}=d(w),h=f(),g=["wp_template","wp_template_part"].includes(h)?"description":"excerpt";return{excerpt:m(g),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(h),usedAttribute:g}},[]),{editPost:i}=(0,ST.useDispatch)(w),[a,l]=(0,yZ.useState)((0,bZ.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,Yh.__)("Write a description (optional)"):(0,Yh.__)("Write an excerpt (optional)");return(0,yT.jsx)("div",{className:"editor-post-excerpt",children:(0,yT.jsx)(bT.TextareaControl,{label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?l:c,onBlur:t?()=>c(a):void 0,value:t?a:r,help:o?(0,Yh.__)("Write a description"):(0,yT.jsx)(bT.ExternalLink,{href:(0,Yh.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,Yh.__)("Learn more about manual excerpts")})})})}var SZ=s(C(),1);function Jxe({children:e}){return(0,SZ.jsx)(tr,{supportKeys:"excerpt",children:e})}var lm=Jxe;var Sc=s(E(),1),sa=s(A(),1),o0=s(O(),1),xT=s(D(),1),wZ=s($(),1),G3=s(W(),1),xZ=s(ft(),1);var _T=s(A(),1),H3=s(C(),1),{Fill:$xe,Slot:eCe}=(0,_T.createSlotFill)("PluginPostExcerpt"),_Z=({children:e,className:t})=>(0,H3.jsx)($xe,{children:(0,H3.jsx)(_T.PanelRow,{className:t,children:e})});_Z.Slot=eCe;var r0=_Z;var rr=s(C(),1),wT="post-excerpt";function tCe(){let{isOpened:e,isEnabled:t,postType:r}=(0,o0.useSelect)(a=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=a(w);return{isOpened:l(wT),isEnabled:c(wT),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,o0.useDispatch)(w),n=()=>o(wT);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,rr.jsx)(sa.PanelBody,{title:i?(0,Sc.__)("Description"):(0,Sc.__)("Excerpt"),opened:e,onToggle:n,children:(0,rr.jsx)(r0.Slot,{children:a=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(t0,{}),a]})})})}function CZ(){return(0,rr.jsx)(lm,{children:(0,rr.jsx)(tCe,{})})}function TZ(){return(0,rr.jsx)(lm,{children:(0,rr.jsx)(rCe,{})})}function rCe(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,o0.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(w),y=m(),b=["wp_template","wp_template_part"].includes(y),_=y==="wp_block",S=b||_,T=g(b?"description":"excerpt"),R=b&&f(G3.store).getEntityRecord("postType",y,h()),F=!T&&b?Zi({template:R,templateTypes:f(G3.store).getCurrentTheme()?.default_template_types})?.description:void 0,B=v(wT)||S;return{excerpt:T??F,shouldRender:B,shouldBeUsedAsDescription:S,allowEditing:B&&(!S||_||R&&R.source===k1.custom&&!R.has_theme_file&&R.is_custom)}},[]),[n,i]=(0,xT.useState)(null),a=r?(0,Sc.__)("Description"):(0,Sc.__)("Excerpt"),l=(0,xT.useMemo)(()=>({anchor:n,"aria-label":a,headerTitle:a,placement:"left-start",offset:36,shift:!0}),[n,a]);if(!e)return!1;let c=!!t&&(0,rr.jsx)(sa.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,xZ.decodeEntities)(t)});if(!o)return c;let u=r?(0,Sc.__)("Add a description\u2026"):(0,Sc.__)("Add an excerpt\u2026"),d=r?(0,Sc.__)("Edit description"):(0,Sc.__)("Edit excerpt");return(0,rr.jsxs)(sa.__experimentalVStack,{children:[c,(0,rr.jsx)(sa.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,rr.jsx)(sa.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(wZ.__experimentalInspectorPopoverHeader,{title:a,onClose:f}),(0,rr.jsx)(sa.__experimentalVStack,{spacing:4,children:(0,rr.jsx)(r0.Slot,{children:m=>(0,rr.jsxs)(rr.Fragment,{children:[(0,rr.jsx)(t0,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var Mi=s(E(),1),Y3=s(mo(),1),cn=s(A(),1),RZ=s(sy(),1),TT=s(D(),1),AZ=s(he(),1),qh=s(O(),1),cm=s($(),1),OZ=s(W(),1);var PZ=s(O(),1),kZ=s(W(),1);function CT({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,PZ.useSelect)(i=>({postType:i(w).getEditedPostAttribute("type"),themeSupports:i(kZ.store).getThemeSupports()}),[]);return(Array.isArray(t)?t:[t]).some(i=>{let a=o?.[i]??!1;return i==="post-thumbnails"&&Array.isArray(a)?a.includes(r):a})?e:null}var W3=s(C(),1);function oCe({children:e}){return(0,W3.jsx)(CT,{supportKeys:"post-thumbnails",children:(0,W3.jsx)(tr,{supportKeys:"thumbnail",children:e})})}var _c=oCe;var zo=s(C(),1),EZ=["image"],nCe=(0,Mi.__)("Featured image"),iCe=(0,Mi.__)("Add a featured image"),sCe=(0,zo.jsx)("p",{children:(0,Mi.__)("To edit the featured image, you need permission to upload media.")});function aCe(e,t){if(!e)return{};let r=(0,Y3.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(r in(e?.media_details?.sizes??{}))return{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url};let o=(0,Y3.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return o in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[o].width,mediaHeight:e.media_details.sizes[o].height,mediaSourceUrl:e.media_details.sizes[o].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}function lCe({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:a,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,TT.useRef)(!1),[d,f]=(0,TT.useState)(!1),{getSettings:m}=(0,qh.useSelect)(cm.store),{mediaSourceUrl:h}=aCe(n,e);function g(_){m().mediaUpload({allowedTypes:EZ,filesList:_,onFileChange([S]){if((0,RZ.isBlobURL)(S?.url)){f(!0);return}S&&r(S),f(!1)},onError(S){l.removeAllNotices(),l.createErrorNotice(S)},multiple:!1})}function v(_){return _.alt_text?(0,Mi.sprintf)((0,Mi.__)("Current image: %s"),_.alt_text):(0,Mi.sprintf)((0,Mi.__)("The current image has no alternative text. The file name is: %s"),_.media_details.sizes?.full?.file||_.slug)}function y(_){u.current&&_&&(_.focus(),u.current=!1)}let b=!c&&!!t&&!n;return(0,zo.jsxs)(_c,{children:[a,(0,zo.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,zo.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,zo.jsx)(cm.MediaUploadCheck,{fallback:sCe,children:(0,zo.jsx)(cm.MediaUpload,{title:i?.labels?.featured_image||nCe,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:EZ,modalClass:"editor-post-featured-image__media-modal",render:({open:_})=>(0,zo.jsxs)("div",{className:"editor-post-featured-image__container",children:[b?(0,zo.jsx)(cn.Notice,{status:"warning",isDismissible:!1,children:(0,Mi.__)("Could not retrieve the featured image data.")}):(0,zo.jsxs)(cn.Button,{__next40pxDefaultSize:!0,ref:y,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:_,"aria-label":t?(0,Mi.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:d,accessibleWhenDisabled:!0,children:[!!t&&n&&(0,zo.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,zo.jsx)(cn.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||iCe)]}),!!t&&(0,zo.jsxs)(cn.__experimentalHStack,{className:re("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":b,"editor-post-featured-image__actions-is-requesting-image":c}),children:[(0,zo.jsx)(cn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:_,"aria-haspopup":"dialog",variant:b?"secondary":void 0,children:(0,Mi.__)("Replace")}),(0,zo.jsx)(cn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:b?"secondary":void 0,isDestructive:b,children:(0,Mi.__)("Remove")})]}),(0,zo.jsx)(cn.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var cCe=(0,qh.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(OZ.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(w),a=i("featured_media");return{media:a?t("postType","attachment",a,{context:"view"}):null,currentPostId:n(),postType:r(i("type")),featuredImageId:a,isRequestingFeaturedImageMedia:!!a&&!o("getEntityRecord",["postType","attachment",a,{context:"view"}])}}),uCe=(0,qh.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(w);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(cm.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:n,onFileChange([i]){o({featured_media:i.id})},onError(i){t.removeAllNotices(),t.createErrorNotice(i)},multiple:!1})},onRemoveImage(){o({featured_media:0})}}}),n0=(0,AZ.compose)(cn.withNotices,cCe,uCe,(0,cn.withFilters)("editor.PostFeaturedImage"))(lCe);var IZ=s(E(),1),NZ=s(A(),1),PT=s(O(),1),FZ=s(W(),1);var Zh=s(C(),1),q3="featured-image";function kT({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,PT.useSelect)(i=>{let{getEditedPostAttribute:a,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(w),{getPostType:u}=i(FZ.store);return{postType:u(a("type")),isEnabled:l(q3),isOpened:c(q3)}},[]),{toggleEditorPanelOpened:n}=(0,PT.useDispatch)(w);return r?e?(0,Zh.jsx)(_c,{children:(0,Zh.jsx)(NZ.PanelBody,{title:t?.labels?.featured_image??(0,IZ.__)("Featured image"),opened:o,onToggle:()=>n(q3),children:(0,Zh.jsx)(n0,{})})}):(0,Zh.jsx)(_c,{children:(0,Zh.jsx)(n0,{})}):null}var Mn=s(E(),1),ET=s(A(),1),RT=s(O(),1),MZ=s(he(),1),LZ=s(W(),1);var DZ=s(O(),1);var BZ=s(C(),1);function Kh({children:e}){return(0,DZ.useSelect)(r=>r(w).getEditorSettings().disablePostFormats,[])?null:(0,BZ.jsx)(tr,{supportKeys:"post-formats",children:e})}var um=s(C(),1),i0=[{id:"aside",caption:(0,Mn.__)("Aside")},{id:"audio",caption:(0,Mn.__)("Audio")},{id:"chat",caption:(0,Mn.__)("Chat")},{id:"gallery",caption:(0,Mn.__)("Gallery")},{id:"image",caption:(0,Mn.__)("Image")},{id:"link",caption:(0,Mn.__)("Link")},{id:"quote",caption:(0,Mn.__)("Quote")},{id:"standard",caption:(0,Mn.__)("Standard")},{id:"status",caption:(0,Mn.__)("Status")},{id:"video",caption:(0,Mn.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0});function s0(){let t=`post-format-selector-${(0,MZ.useInstanceId)(s0)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,RT.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(w),m=d("format"),h=u(LZ.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=i0.filter(u=>n?.includes(u.id)||r===u.id),a=i.find(u=>u.id===o),{editPost:l}=(0,RT.useDispatch)(w),c=u=>l({format:u});return(0,um.jsx)(Kh,{children:(0,um.jsxs)("div",{className:"editor-post-format",children:[(0,um.jsx)(ET.RadioControl,{className:"editor-post-format__options",label:(0,Mn.__)("Post Format"),selected:r,onChange:u=>c(u),id:t,options:i.map(u=>({label:u.caption,value:u.id})),hideLabelFromVision:!0}),a&&a.id!==r&&(0,um.jsx)("p",{className:"editor-post-format__suggestion",children:(0,um.jsx)(ET.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(a.id),children:(0,Mn.sprintf)((0,Mn.__)("Apply suggested format: %s"),a.caption)})})]})})}var fm=s(E(),1),Z3=s(A(),1),a0=s(O(),1);var K3=s(Ir(),1);var VZ=s(O(),1);var jZ=s(C(),1);function dCe({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,VZ.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(w);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,jZ.jsx)(tr,{supportKeys:"revisions",children:e})}var dm=dCe;var Xh=s(C(),1);function zZ(){return(0,a0.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(w);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function fCe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=zZ(),{setCurrentRevisionId:o}=N((0,a0.useDispatch)(w)),n=r?{href:(0,K3.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,Xh.jsx)(dm,{children:(0,Xh.jsx)(Z3.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:xl,iconPosition:"right",text:(0,fm.sprintf)((0,fm.__)("Revisions (%s)"),t)})})}function UZ(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=zZ(),{setCurrentRevisionId:o}=N((0,a0.useDispatch)(w)),n=r?{href:(0,K3.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,Xh.jsx)(dm,{children:(0,Xh.jsx)(ht,{label:(0,fm.__)("Revisions"),children:(0,Xh.jsx)(Z3.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,fm.sprintf)((0,fm.__)("Open revisions screen: %s revisions"),t),variant:"tertiary",size:"compact"})})})}var AT=fCe;var HZ=s(A(),1);var OT=s(C(),1);function mCe(){return(0,OT.jsx)(dm,{children:(0,OT.jsx)(HZ.PanelBody,{className:"editor-post-last-revision__panel",children:(0,OT.jsx)(AT,{})})})}var GZ=mCe;var ko=s(E(),1),aa=s(A(),1),c0=s(O(),1),Q3=s(Ir(),1),l0=s(D(),1),Qh=s(mo(),1),KZ=s(he(),1),J3=s(W(),1);var wc=s(E(),1),pCe="authentication-failed",hCe="connection-expired",gCe="connection-limit-exceeded",WZ="document-size-limit-exceeded",YZ="unknown-error",X3={[pCe]:{title:(0,wc.__)("Unable to connect"),description:(0,wc.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[hCe]:{title:(0,wc.__)("Connection expired"),description:(0,wc.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[gCe]:{title:(0,wc.__)("Too many editors connected"),description:(0,wc.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[YZ]:{title:(0,wc.__)("Connection lost"),description:(0,wc.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function qZ(e){return e?.code&&X3[e?.code]?X3[e.code]:X3[YZ]}var Kt=s(C(),1);function ZZ(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,c0.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=N(r(J3.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:WZ===t?.error?.code?(0,Kt.jsx)("p",{children:(0,ko.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,Kt.jsx)("p",{children:(0,ko.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function XZ(){let t="core/editor/post-locked-modal-"+(0,KZ.useInstanceId)(XZ),{autosave:r,updatePostLock:o}=(0,c0.useDispatch)(w),{isCollaborationEnabled:n,isLocked:i,isTakeover:a,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,c0.useSelect)(_=>{let{isPostLocked:S,isPostLockTakeover:x,getPostLockUser:T,getCurrentPostId:R,getActivePostLock:F,getEditedPostAttribute:B,getEditedPostPreviewLink:z,getEditorSettings:L,isCollaborationEnabledForCurrentPost:M}=N(_(w)),{getPostType:k}=_(J3.store);return{isCollaborationEnabled:M(),isLocked:S(),isTakeover:x(),user:T(),postId:R(),postLockUtils:L().postLockUtils,activePostLock:F(),postType:k(B("type")),previewLink:z()}},[]);if((0,l0.useEffect)(()=>{function _(T){i||(T["wp-refresh-post-lock"]={lock:d,post_id:c})}function S(T){if(!T["wp-refresh-post-lock"])return;let R=T["wp-refresh-post-lock"];R.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{name:R.lock_error.name,avatar:R.lock_error.avatar_src_2x}})):R.new_lock&&o({isLocked:!1,activePostLock:R.new_lock})}function x(){if(i||!d)return;let T=new window.FormData;if(T.append("action","wp-remove-post-lock"),T.append("_wpnonce",u.unlockNonce),T.append("post_ID",c),T.append("active_post_lock",d),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,T);else{let R=new window.XMLHttpRequest;R.open("POST",u.ajaxUrl,!1),R.send(T)}}return(0,Qh.addAction)("heartbeat.send",t,_),(0,Qh.addAction)("heartbeat.tick",t,S),window.addEventListener("beforeunload",x),()=>{(0,Qh.removeAction)("heartbeat.send",t),(0,Qh.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",x)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,Q3.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),y=(0,Q3.addQueryArgs)("edit.php",{post_type:f?.slug}),b=(0,ko.__)("Exit editor");return(0,Kt.jsx)(aa.Modal,{title:a?(0,ko.__)("Someone else has taken over this post"):(0,ko.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,Kt.jsxs)(aa.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,Kt.jsx)("img",{src:g,alt:(0,ko.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,Kt.jsxs)("div",{children:[!!a&&(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("p",{children:(0,l0.createInterpolateElement)(h?(0,ko.sprintf)((0,ko.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),h):(0,ko.__)("Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,Kt.jsx)("strong",{}),PreviewLink:(0,Kt.jsx)(aa.ExternalLink,{href:m,children:(0,ko.__)("preview")})})}),(0,Kt.jsx)(ZZ,{})]}),!a&&(0,Kt.jsxs)(Kt.Fragment,{children:[(0,Kt.jsx)("p",{children:(0,l0.createInterpolateElement)(h?(0,ko.sprintf)((0,ko.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),h):(0,ko.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,Kt.jsx)("strong",{}),PreviewLink:(0,Kt.jsx)(aa.ExternalLink,{href:m,children:(0,ko.__)("preview")})})}),(0,Kt.jsx)(ZZ,{}),(0,Kt.jsx)("p",{children:(0,ko.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,Kt.jsxs)(aa.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!a&&(0,Kt.jsx)(aa.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,ko.__)("Take over")}),(0,Kt.jsx)(aa.Button,{__next40pxDefaultSize:!0,variant:"primary",href:y,children:b})]})]})]})})}var QZ=XZ;var $Z=s(E(),1),eK=s(A(),1),NT=s(O(),1);var JZ=s(O(),1);function vCe({children:e}){let{hasPublishAction:t,isPublished:r}=(0,JZ.useSelect)(o=>{let{isCurrentPostPublished:n,getCurrentPost:i}=o(w);return{hasPublishAction:i()._links?.["wp:action-publish"]??!1,isPublished:n()}},[]);return r||!t?null:e}var IT=vCe;var $3=s(C(),1);function yCe(){let e=(0,NT.useSelect)(o=>o(w).getEditedPostAttribute("status"),[]),{editPost:t}=(0,NT.useDispatch)(w),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,$3.jsx)(IT,{children:(0,$3.jsx)(eK.CheckboxControl,{label:(0,$Z.__)("Pending review"),checked:e==="pending",onChange:r})})}var tK=yCe;var rK=s(D(),1),xc=s(A(),1),Jh=s(E(),1),FT=s(O(),1),oK=s(mo(),1),nK=s(W(),1);var vs=s(C(),1);function bCe(e){let t=(0,rK.renderToString)((0,vs.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,vs.jsxs)(xc.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,vs.jsx)(xc.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,vs.jsx)(xc.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,vs.jsx)("p",{children:(0,Jh.__)("Generating preview\u2026")})]}));t+=`
		<style>
			body {
				margin: 0;
			}
			.editor-post-preview-button__interstitial-message {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				height: 100vh;
				width: 100vw;
			}
			@-webkit-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-moz-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-o-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			.editor-post-preview-button__interstitial-message svg {
				width: 192px;
				height: 192px;
				stroke: #555d66;
				stroke-width: 0.75;
			}
			.editor-post-preview-button__interstitial-message svg .outer,
			.editor-post-preview-button__interstitial-message svg .inner {
				stroke-dasharray: 280;
				stroke-dashoffset: 280;
				-webkit-animation: paint 1.5s ease infinite alternate;
				-moz-animation: paint 1.5s ease infinite alternate;
				-o-animation: paint 1.5s ease infinite alternate;
				animation: paint 1.5s ease infinite alternate;
			}
			p {
				text-align: center;
				font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
			}
		</style>
	`,t=(0,oK.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,Jh.__)("Generating preview\u2026"),e.close()}function od({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let{postId:i,currentPostLink:a,previewLink:l,isSaveable:c,isViewable:u}=(0,FT.useSelect)(g=>{let v=g(w),_=g(nK.store).getPostType(v.getCurrentPostType("type"))?.viewable??!1;return _?{postId:v.getCurrentPostId(),currentPostLink:v.getCurrentPostAttribute("link"),previewLink:v.getEditedPostPreviewLink(),isSaveable:v.isEditedPostSaveable(),isViewable:_}:{isViewable:_}},[]),{__unstableSaveForPreview:d}=(0,FT.useDispatch)(w);if(!u)return null;let f=`wp-preview-${i}`;return(0,vs.jsx)(xc.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:l||a,target:f,accessibleWhenDisabled:!0,disabled:!c,onClick:async g=>{g.preventDefault();let v=window.open("",f);v.focus(),bCe(v.document);let y=await d({forceIsAutosaveable:r});v.location=y,n?.()},role:o,size:"compact",children:t||(0,vs.jsxs)(vs.Fragment,{children:[(0,Jh._x)("Preview","imperative verb"),(0,vs.jsx)(xc.VisuallyHidden,{as:"span",children:(0,Jh.__)("(opens in a new tab)")})]})})}var lK=s(A(),1),cK=s(D(),1),BT=s(O(),1),uK=s(he(),1);var Cc=s(E(),1),iK=s(O(),1),sK=s(he(),1);function DT(){let e=(0,sK.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:a,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,postType:d}=(0,iK.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:y,getCurrentPostType:b,isAutosavingPost:_,getPostEdits:S,getEditedPostAttribute:x}=f(w);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:y()._links?.["wp:action-publish"]??!1,postType:b(),isAutosaving:_(),hasNonPostEntityChanges:f(w).hasNonPostEntityChanges(),postStatusHasChanged:!!S()?.status,postStatus:x("status")}},[]);return n?(0,Cc.__)("Publishing\u2026"):(t||r)&&o&&!a?(0,Cc.__)("Saving\u2026"):i?l||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Cc.__)("Save"):r?(0,Cc.__)("Schedule"):(0,Cc.__)("Publish"):d===ur&&window?.__experimentalMediaEditor?(0,Cc.__)("Save"):e?(0,Cc.__)("Publish"):(0,Cc.__)("Submit for Review")}var $h=s(C(),1),aK=()=>{},SCe=class extends cK.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{let{hasNonPostEntityChanges:r,setEntitiesSavedStatesCallback:o}=this.props;return r&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o(()=>this.closeEntitiesSavedStates),aK):e(...t)}}closeEntitiesSavedStates(e){let{postType:t,postId:r}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},()=>{e&&e.some(n=>n.kind==="postType"&&n.name===t&&n.key===r)&&o()})}render(){let{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:r,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:a,isSaveable:l,isSaving:c,isAutoSaving:u,isToggle:d,savePostStatus:f,onSubmit:m=aK,onToggle:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y,postStatus:b,postStatusHasChanged:_}=this.props,S=(c||!l||n||!i&&!e)&&(!v||y),x=(a||c||!l||!i&&!e)&&(!v||y),T="publish";_?T=b:t?g==="private"?T="private":r&&(T="future"):T="pending";let R=()=>{S||(m(),f(T))},F=()=>{x||h()},B={"aria-disabled":S,className:"editor-post-publish-button",isBusy:!u&&c,variant:"primary",onClick:this.createOnClick(R),"aria-haspopup":v?"dialog":void 0},z={"aria-disabled":x,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:c&&a,variant:"primary",size:"compact",onClick:this.createOnClick(F),"aria-haspopup":v?"dialog":void 0},L=d?z:B;return(0,$h.jsx)($h.Fragment,{children:(0,$h.jsx)(lK.Button,{...L,className:`${L.className} editor-post-publish-button__button`,size:"compact",children:(0,$h.jsx)(DT,{})})})}},eg=(0,uK.compose)([(0,BT.withSelect)(e=>{let{isSavingPost:t,isAutosavingPost:r,isEditedPostBeingScheduled:o,getEditedPostVisibility:n,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:f,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h,getEditedPostAttribute:g,getPostEdits:v}=e(w);return{isSaving:t(),isAutoSaving:r(),isBeingScheduled:o(),visibility:n(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:u()._links?.["wp:action-publish"]??!1,postType:d(),postId:f(),postStatus:g("status"),postStatusHasChanged:v()?.status,hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}}),(0,BT.withDispatch)(e=>{let{editPost:t,savePost:r}=e(w);return{savePostStatus:o=>{t({status:o},{undoIgnore:!0}),r()}}})])(SCe);var eP=s(E(),1),tP=s(D(),1),ua=s(A(),1),rP=s(O(),1),fX=s(he(),1);var mX=s(W(),1);var la=s(E(),1),v0=s(A(),1),eX=s(O(),1);var tX=s(Ir(),1),rX=s(W(),1),oX=s(ft(),1);var tg=s(E(),1),dK=s(D(),1),rg=s(A(),1),fK=s(he(),1),LT=s(O(),1),mK=s($(),1);var mm=s(E(),1),MT=[{label:(0,mm.__)("Public"),value:"public",description:(0,mm.__)("Visible to everyone.")},{label:(0,mm.__)("Private"),value:"private",description:(0,mm.__)("Only visible to site admins and editors.")},{label:(0,mm.__)("Password protected"),value:"password",description:(0,mm.__)("Only visible to those who know the password.")}];var pm=s(C(),1);function u0({onClose:e}){let t=(0,fK.useInstanceId)(u0),{status:r,visibility:o,password:n}=(0,LT.useSelect)(d=>({status:d(w).getEditedPostAttribute("status"),visibility:d(w).getEditedPostVisibility(),password:d(w).getEditedPostAttribute("password")})),{editPost:i}=(0,LT.useDispatch)(w),[a,l]=(0,dK.useState)(!!n);function c(d){i({public:{status:o==="private"?"draft":r,password:""},private:{status:"private",password:""},password:{status:o==="private"?"draft":r,password:n||""}}[d]),l(d==="password")}let u=d=>{i({password:d})};return(0,pm.jsxs)("div",{className:"editor-post-visibility",children:[(0,pm.jsx)(mK.__experimentalInspectorPopoverHeader,{title:(0,tg.__)("Visibility"),help:(0,tg.__)("Control how this post is viewed."),onClose:e}),(0,pm.jsxs)(rg.__experimentalVStack,{spacing:4,children:[(0,pm.jsx)(rg.RadioControl,{label:(0,tg.__)("Visibility"),hideLabelFromVision:!0,options:MT,selected:a?"password":o,onChange:c}),a&&(0,pm.jsx)(rg.TextControl,{label:(0,tg.__)("Password"),onChange:u,value:n,placeholder:(0,tg.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,__next40pxDefaultSize:!0,maxLength:255})]})]})}var pK=s(O(),1);function VT(){return e4()}function e4(){let e=(0,pK.useSelect)(t=>t(w).getEditedPostVisibility(),[]);return MT.find(t=>t.value===e)?.label}function jT(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}var _Ce=Math.pow(10,8)*24*60*60*1e3,d$e=-_Ce;var t4=6e4,r4=36e5;var wCe=3600;var hK=wCe*24,f$e=hK*7,xCe=hK*365.2425,CCe=xCe/12,m$e=CCe*3;function gK(e){let t=jT(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function o4(e){let t=jT(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vK(e,t){let r=t?.additionalDigits??2,o=ECe(e),n;if(o.date){let c=RCe(o.date,r);n=ACe(c.restDateString,c.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);let i=n.getTime(),a=0,l;if(o.time&&(a=OCe(o.time),isNaN(a)))return new Date(NaN);if(o.timezone){if(l=ICe(o.timezone),isNaN(l))return new Date(NaN)}else{let c=new Date(i+a),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(i+a+l)}var zT={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},TCe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,PCe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,kCe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ECe(e){let t={},r=e.split(zT.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],zT.timeZoneDelimiter.test(t.date)&&(t.date=e.split(zT.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=zT.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function RCe(e,t){let r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(r);if(!o)return{year:NaN,restDateString:""};let n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:i===null?n:i*100,restDateString:e.slice((o[1]||o[2]).length)}}function ACe(e,t){if(t===null)return new Date(NaN);let r=e.match(TCe);if(!r)return new Date(NaN);let o=!!r[4],n=d0(r[1]),i=d0(r[2])-1,a=d0(r[3]),l=d0(r[4]),c=d0(r[5])-1;if(o)return MCe(t,l,c)?NCe(t,l,c):new Date(NaN);{let u=new Date(0);return!DCe(t,i,a)||!BCe(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,a)),u)}}function d0(e){return e?parseInt(e):1}function OCe(e){let t=e.match(PCe);if(!t)return NaN;let r=n4(t[1]),o=n4(t[2]),n=n4(t[3]);return LCe(r,o,n)?r*r4+o*t4+n*1e3:NaN}function n4(e){return e&&parseFloat(e.replace(",","."))||0}function ICe(e){if(e==="Z")return 0;let t=e.match(kCe);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return VCe(o,n)?r*(o*r4+n*t4):NaN}function NCe(e,t,r){let o=new Date(0);o.setUTCFullYear(e,0,4);let n=o.getUTCDay()||7,i=(t-1)*7+r+1-n;return o.setUTCDate(o.getUTCDate()+i),o}var FCe=[31,null,31,30,31,30,31,31,30,31,30,31];function yK(e){return e%400===0||e%4===0&&e%100!==0}function DCe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(FCe[t]||(yK(e)?29:28))}function BCe(e,t){return t>=1&&t<=(yK(e)?366:365)}function MCe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function LCe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function VCe(e,t){return t>=0&&t<=59}var bK=s(po(),1),SK=s(E(),1),f0=s(O(),1),_K=s($(),1),UT=s(D(),1),wK=s(W(),1);var i4=s(C(),1),{PrivatePublishDateTimePicker:jCe}=N(_K.privateApis);function og(e){return(0,i4.jsx)(s4,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function s4({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,f0.useSelect)(h=>({postDate:h(w).getEditedPostAttribute("date"),postType:h(w).getCurrentPostType()}),[]),{editPost:i}=(0,f0.useDispatch)(w),a=h=>i({date:h}),[l,c]=(0,UT.useState)(o4(new Date(o))),u=(0,f0.useSelect)(h=>h(wK.store).getEntityRecords("postType",n,{status:"publish,future",after:o4(l).toISOString(),before:gK(l).toISOString(),exclude:[h(w).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,UT.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,bK.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,i4.jsx)(jCe,{currentDate:o,onChange:a,is12Hour:m,dateOrder:(0,SK._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(vK(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var Ln=s(E(),1),ys=s(po(),1),CK=s(O(),1);function ng(e){return ig(e)}function ig({full:e=!1}={}){let{date:t,isFloating:r}=(0,CK.useSelect)(o=>({date:o(w).getEditedPostAttribute("date"),isFloating:o(w).isEditedPostDateFloating()}),[]);return e?TK(t):zCe(t,{isFloating:r})}function TK(e){let t=(0,ys.getDate)(e),r=UCe(),o=(0,ys.dateI18n)((0,Ln._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,Ln.isRTL)()?`${r} ${o}`:`${o} ${r}`}function zCe(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,Ln.__)("Immediately");if(!HCe(r))return TK(e);let o=(0,ys.getDate)(e);if(xK(o,r))return(0,Ln.sprintf)((0,Ln.__)("Today at %s"),(0,ys.dateI18n)((0,Ln._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),xK(o,n)?(0,Ln.sprintf)((0,Ln.__)("Tomorrow at %s"),(0,ys.dateI18n)((0,Ln._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,ys.dateI18n)((0,Ln._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,ys.dateI18n)((0,Ln._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function UCe(){let{timezone:e}=(0,ys.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function HCe(e){let{timezone:t}=(0,ys.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function xK(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var ym=s(E(),1),DK=s(D(),1),u4=s(O(),1),BK=s(A(),1),YT=s(W(),1);var Uo=s(E(),1),vm=s(D(),1),sg=s(A(),1),gm=s(O(),1),GT=s(W(),1),AK=s(he(),1),OK=s(Xm(),1),IK=s(ct(),1);var HT=s(A(),1),PK=s(O(),1),kK=s(W(),1);var hm=s(C(),1),GCe=3,WCe={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function EK({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,PK.useSelect)(i=>{let a=i(kK.store).getEntityRecords("taxonomy",t.slug,WCe);return{_terms:a,showTerms:a?.length>=GCe}},[t.slug]);if(!o)return null;let n=IY(r);return(0,hm.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,hm.jsx)(HT.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,hm.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,hm.jsx)("li",{children:(0,hm.jsx)(HT.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var m0=s(C(),1),a4=[],NK=100,RK={per_page:NK,_fields:"id,name",context:"view"},FK=(e,t)=>Bh(e).toLowerCase()===Bh(t).toLowerCase(),l4=(e,t)=>e.map(r=>t.find(o=>FK(o.name,r))?.id).filter(r=>r!==void 0);function c4({slug:e}){let[t,r]=(0,vm.useState)([]),[o,n]=(0,vm.useState)(""),i=(0,AK.useDebounce)(n,500),{terms:a,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,gm.useSelect)(L=>{let{getCurrentPost:M,getEditedPostAttribute:k}=L(w),{getEntityRecords:I,getEntityRecord:U,hasFinishedResolution:G}=L(GT.store),Y=M(),Z=U("root","taxonomy",e),V=Z?k(Z.rest_base):a4,j={...RK,include:V?.join(","),per_page:-1};return{hasCreateAction:Z?Y._links?.["wp:action-create-"+Z.rest_base]??!1:!1,hasAssignAction:Z?Y._links?.["wp:action-assign-"+Z.rest_base]??!1:!1,taxonomy:Z,termIds:V,terms:V?.length?I("taxonomy",e,j):a4,hasResolvedTerms:G("getEntityRecords",["taxonomy",e,j])}},[e]),{searchResults:m}=(0,gm.useSelect)(L=>{let{getEntityRecords:M}=L(GT.store);return{searchResults:o?M("taxonomy",e,{...RK,search:o}):a4}},[o,e]);(0,vm.useEffect)(()=>{if(f){let L=(a??[]).map(M=>Bh(M.name));r(L)}},[a,f]);let h=(0,vm.useMemo)(()=>(m??[]).map(L=>Bh(L.name)),[m]),{editPost:g}=(0,gm.useDispatch)(w),{saveEntityRecord:v}=(0,gm.useDispatch)(GT.store),{createErrorNotice:y}=(0,gm.useDispatch)(IK.store);if(!u)return null;async function b(L){try{let M=await v("taxonomy",e,L,{throwOnError:!0});return C3(M)}catch(M){if(M.code!=="term_exists")throw M;return{id:M.data.term_id,name:L.name}}}function _(L){g({[c.rest_base]:L})}function S(L){let M=[...a??[],...m??[]],k=L.reduce((U,G)=>(U.some(Y=>Y.toLowerCase()===G.toLowerCase())||U.push(G),U),[]),I=k.filter(U=>!M.find(G=>FK(G.name,U)));if(r(k),I.length===0){_(l4(k,M));return}d&&Promise.all(I.map(U=>b({name:U}))).then(U=>{let G=M.concat(U);_(l4(k,G))}).catch(U=>{y(U.message,{type:"snackbar"}),_(l4(k,M))})}function x(L){if(l.includes(L.id))return;let M=[...l,L.id],k=e==="post_tag"?(0,Uo.__)("Tag"):(0,Uo.__)("Term"),I=(0,Uo.sprintf)((0,Uo._x)("%s added","term"),c?.labels?.singular_name??k);(0,OK.speak)(I,"assertive"),_(M)}let T=c?.labels?.add_new_item??(e==="post_tag"?(0,Uo.__)("Add Tag"):(0,Uo.__)("Add Term")),R=c?.labels?.singular_name??(e==="post_tag"?(0,Uo.__)("Tag"):(0,Uo.__)("Term")),F=(0,Uo.sprintf)((0,Uo._x)("%s added","term"),R),B=(0,Uo.sprintf)((0,Uo._x)("%s removed","term"),R),z=(0,Uo.sprintf)((0,Uo._x)("Remove %s","term"),R);return(0,m0.jsxs)(sg.__experimentalVStack,{spacing:4,children:[(0,m0.jsx)(sg.FormTokenField,{__next40pxDefaultSize:!0,value:t,suggestions:h,onChange:S,onInputChange:i,maxSuggestions:NK,label:T,messages:{added:F,removed:B,remove:z}}),(0,m0.jsx)(EK,{taxonomy:c,onSelect:x})]})}var WT=(0,sg.withFilters)("editor.PostTaxonomyType")(c4);var bm=s(C(),1),YCe=()=>{let e=(0,u4.useSelect)(n=>n(YT.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,ym.__)("Add tag"),r=e?.name??(0,ym.__)("Tags"),o=[(0,ym.__)("Suggestion:"),(0,bm.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,bm.jsxs)(BK.PanelBody,{initialOpen:!1,title:o,children:[(0,bm.jsx)("p",{children:(0,ym.sprintf)((0,ym.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,bm.jsx)(WT,{slug:"post_tag"})]})},qCe=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,u4.useSelect)(n=>{let i=n(w).getCurrentPostType(),a=n(YT.store).getEntityRecord("root","taxonomy","post_tag"),l=a?.types?.includes(i),c=a!==void 0,u=a&&n(w).getEditedPostAttribute(a.rest_base),d=l?!!n(YT.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,DK.useState)(e);return!r||!t||o?null:(0,bm.jsx)(YCe,{})},MK=qCe;var qT=s(A(),1),ZT=s(O(),1),Sm=s(E(),1),LK=s(W(),1);var nd=s(C(),1),ZCe=(e,t)=>i0.filter(o=>e?.includes(o.id)).find(o=>o.id===t),KCe=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,nd.jsx)(qT.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function VK(){let{currentPostFormat:e,suggestion:t}=(0,ZT.useSelect)(i=>{let{getEditedPostAttribute:a,getSuggestedPostFormat:l}=i(w),c=i(LK.store).getThemeSupports().formats??[];return{currentPostFormat:a("format"),suggestion:ZCe(c,l())}},[]),{editPost:r}=(0,ZT.useDispatch)(w),o=i=>r({format:i}),n=[(0,Sm.__)("Suggestion:"),(0,nd.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Sm.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,nd.jsxs)(qT.PanelBody,{initialOpen:!1,title:n,children:[(0,nd.jsx)("p",{children:(0,Sm.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,nd.jsx)("p",{children:(0,nd.jsx)(KCe,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,Sm.sprintf)((0,Sm.__)('Apply the "%1$s" format.'),t.caption)})})]})}var XT=s(E(),1),YK=s(O(),1),qK=s(A(),1),m4=s(W(),1),QT=s(D(),1);var Ro=s(E(),1),Tc=s(D(),1),HK=s(ct(),1),or=s(A(),1),ag=s(O(),1),GK=s(he(),1),p0=s(W(),1),d4=s(Xm(),1),WK=s(ft(),1);var Eo=s(C(),1),{normalizeTextString:jK}=N(or.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:XCe}=N(p0.privateApis),zK={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[XCe]:!0},QCe=8,UK=[];function JCe(e,t){let r=i=>t.indexOf(i.id)!==-1?!0:i.children===void 0?!1:i.children.map(r).filter(a=>a).length>0,o=(i,a)=>{let l=r(i),c=r(a);return l===c?0:l&&!c?-1:!l&&c?1:0},n=[...e];return n.sort(o),n}function $Ce(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function eTe(e){let t=r=>{if(e==="")return r;let o={...r};return o.children.length>0&&(o.children=o.children.map(t).filter(n=>n)),jK(o.name).indexOf(jK(e))!==-1||o.children.length>0?o:!1};return t}function f4({slug:e}){let[t,r]=(0,Tc.useState)(!1),[o,n]=(0,Tc.useState)(""),[i,a]=(0,Tc.useState)(""),[l,c]=(0,Tc.useState)(!1),[u,d]=(0,Tc.useState)(""),[f,m]=(0,Tc.useState)([]),h=(0,GK.useDebounce)(d4.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:y,loading:b,availableTerms:_,taxonomy:S}=(0,ag.useSelect)(ye=>{let{getCurrentPost:oe,getEditedPostAttribute:ge}=ye(w),{getEntityRecord:Re,getEntityRecords:ze,isResolving:Ve}=ye(p0.store),tt=Re("root","taxonomy",e),vt=oe();return{hasCreateAction:tt?!!vt._links?.["wp:action-create-"+tt.rest_base]:!1,hasAssignAction:tt?!!vt._links?.["wp:action-assign-"+tt.rest_base]:!1,terms:tt?ge(tt.rest_base):UK,loading:Ve("getEntityRecords",["taxonomy",e,zK]),availableTerms:ze("taxonomy",e,zK)||UK,taxonomy:tt}},[e]),{editPost:x}=(0,ag.useDispatch)(w),{saveEntityRecord:T}=(0,ag.useDispatch)(p0.store),R=(0,Tc.useMemo)(()=>JCe(IC(_),y),[_]),{createErrorNotice:F}=(0,ag.useDispatch)(HK.store);if(!v)return null;let B=ye=>T("taxonomy",e,ye,{throwOnError:!0}),z=ye=>{x({[S.rest_base]:ye})},L=ye=>{let ge=y.includes(ye)?y.filter(Re=>Re!==ye):[...y,ye];z(ge)},M=ye=>{n(ye)},k=ye=>{a(ye)},I=()=>{c(!l)},U=async ye=>{if(ye.preventDefault(),o===""||t)return;let oe=$Ce(_,i,o);if(oe){y.some(Ve=>Ve===oe.id)||z([...y,oe.id]),n(""),a("");return}r(!0);let ge;try{ge=await B({name:o,parent:i||void 0})}catch(Ve){F(Ve.message,{type:"snackbar"});return}let Re=e==="category"?(0,Ro.__)("Category"):(0,Ro.__)("Term"),ze=(0,Ro.sprintf)((0,Ro._x)("%s added","term"),S?.labels?.singular_name??Re);(0,d4.speak)(ze,"assertive"),r(!1),n(""),a(""),z([...y,ge.id])},G=ye=>{let oe=R.map(eTe(ye)).filter(Ve=>Ve),ge=Ve=>{let tt=0;for(let vt=0;vt<Ve.length;vt++)tt++,Ve[vt].children!==void 0&&(tt+=ge(Ve[vt].children));return tt};d(ye),m(oe);let Re=ge(oe),ze=(0,Ro.sprintf)((0,Ro._n)("%d result found.","%d results found.",Re),Re);h(ze,"assertive")},Y=ye=>ye.map(oe=>(0,Eo.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,Eo.jsx)(or.CheckboxControl,{checked:y.indexOf(oe.id)!==-1,onChange:()=>{let ge=parseInt(oe.id,10);L(ge)},label:(0,WK.decodeEntities)(oe.name)}),!!oe.children.length&&(0,Eo.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:Y(oe.children)})]},oe.id)),Z=(ye,oe,ge)=>S?.labels?.[ye]??(e==="category"?oe:ge),V=Z("add_new_item",(0,Ro.__)("Add Category"),(0,Ro.__)("Add Term")),j=Z("new_item_name",(0,Ro.__)("Add Category"),(0,Ro.__)("Add Term")),H=Z("parent_item",(0,Ro.__)("Parent Category"),(0,Ro.__)("Parent Term")),X=`\u2014 ${H} \u2014`,ae=V,ne=S?.labels?.search_items??(0,Ro.__)("Search Terms"),ue=S?.name??(0,Ro.__)("Terms"),Ye=_.length>=QCe;return(0,Eo.jsxs)(or.Flex,{direction:"column",gap:"4",children:[Ye&&!b&&(0,Eo.jsx)(or.SearchControl,{__next40pxDefaultSize:!0,label:ne,placeholder:ne,value:u,onChange:G}),b&&(0,Eo.jsx)(or.Flex,{justify:"center",style:{height:"40px"},children:(0,Eo.jsx)(or.Spinner,{})}),(0,Eo.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":ue,children:Y(u!==""?f:R)}),!b&&g&&(0,Eo.jsx)(or.FlexItem,{children:(0,Eo.jsx)(or.Button,{__next40pxDefaultSize:!0,onClick:I,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:V})}),l&&(0,Eo.jsx)("form",{onSubmit:U,children:(0,Eo.jsxs)(or.Flex,{direction:"column",gap:"4",children:[(0,Eo.jsx)(or.TextControl,{__next40pxDefaultSize:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:j,value:o,onChange:M,required:!0}),!!_.length&&(0,Eo.jsx)(or.TreeSelect,{__next40pxDefaultSize:!0,label:H,noOptionLabel:X,onChange:k,selectedId:i,tree:R}),(0,Eo.jsx)(or.FlexItem,{children:(0,Eo.jsx)(or.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:ae})})]})})]})}var KT=(0,or.withFilters)("editor.PostTaxonomyType")(f4);var lg=s(C(),1);function tTe(){let{hasNoCategory:e,hasSiteCategories:t}=(0,YK.useSelect)(i=>{let a=i(w).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(m4.store),u=c("root","taxonomy","category"),d=l("read",{kind:"root",name:"site"})?c("root","site")?.default_category:void 0,f=d?c("taxonomy","category",d):void 0,m=u&&u.types.some(y=>y===a),h=u&&i(w).getEditedPostAttribute(u.rest_base),g=m?!!i(m4.store).getEntityRecords("taxonomy","category",{exclude:[d],per_page:1})?.length:!1;return{hasNoCategory:!!u&&!!f&&m&&(h?.length===0||h?.length===1&&f?.id===h[0]),hasSiteCategories:g}},[]),[r,o]=(0,QT.useState)(!1);if((0,QT.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,XT.__)("Suggestion:"),(0,lg.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,XT.__)("Assign a category")},"label")];return(0,lg.jsxs)(qK.PanelBody,{initialOpen:!1,title:n,children:[(0,lg.jsx)("p",{children:(0,XT.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,lg.jsx)(KT,{slug:"category"})]})}var ZK=tTe;var Ka=s(A(),1),g0=s(O(),1),id=s(E(),1),h0=s($(),1),JT=s(D(),1),QK=s(sy(),1);var KK=s(Ir(),1);function rTe(e){let t=new Set;return Object.fromEntries(e.map(r=>{let o=(0,KK.getFilename)(r),n="";if(o){let i=o.split(".");i.length>1&&i.pop(),n=i.join(".")}return n||(n=ep()),t.has(n)&&(n=`${n}-${ep()}`),t.add(n),[r,n]}))}function XK(e){return Object.fromEntries(Object.entries(rTe(e)).map(([t,r])=>{let o=window.fetch(t.includes("?")?t:t+"?").then(n=>n.blob()).then(n=>new File([n],`${r}.png`,{type:n.type}));return[t,o]}))}var bs=s(C(),1);function JK(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...JK(r.innerBlocks))}),t}function oTe(e){if(e.name==="core/image"||e.name==="core/cover")return e.attributes.url&&!e.attributes.id;if(e.name==="core/media-text")return e.attributes.mediaUrl&&!e.attributes.mediaId}function p4(e){if(e.name==="core/image"||e.name==="core/cover"){let{url:t,alt:r,id:o}=e.attributes;return{url:t,alt:r,id:o}}if(e.name==="core/media-text"){let{mediaUrl:t,mediaAlt:r,mediaId:o}=e.attributes;return{url:t,alt:r,id:o}}return{}}function nTe({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,g0.useDispatch)(h0.store);return(0,bs.jsx)(Ka.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,id.__)("Select image block."),onClick:()=>{o(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(o(e),n.preventDefault())},alt:t,src:r,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}},e)}function $K(){let[e,t]=(0,JT.useState)(!1),[r,o]=(0,JT.useState)(!1),[n,i]=(0,JT.useState)(!1),{editorBlocks:a,mediaUpload:l}=(0,g0.useSelect)(h=>({editorBlocks:h(h0.store).getBlocks(),mediaUpload:h(h0.store).getSettings().mediaUpload}),[]),c=JK(a).filter(h=>oTe(h)),{updateBlockAttributes:u}=(0,g0.useDispatch)(h0.store);if(!l||!c.length)return null;let d=[(0,id.__)("Suggestion:"),(0,bs.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,id.__)("External media")},"label")];function f(h,g){(h.name==="core/image"||h.name==="core/cover")&&u(h.clientId,{id:g.id,url:g.url}),h.name==="core/media-text"&&u(h.clientId,{mediaId:g.id,mediaUrl:g.url})}function m(){t(!0),i(!1);let h=new Set(c.map(v=>{let{url:y}=p4(v);return y})),g=Object.fromEntries(Object.entries(XK([...h])).map(([v,y])=>{let b=y.then(_=>new Promise((S,x)=>{l({filesList:[_],onFileChange:([T])=>{(0,QK.isBlobURL)(T.url)||S(T)},onError(){x()}})}));return[v,b]}));Promise.allSettled(c.map(v=>{let{url:y}=p4(v);return g[y].then(b=>f(v,b)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,bs.jsxs)(Ka.PanelBody,{initialOpen:!0,title:d,children:[(0,bs.jsx)("p",{children:(0,id.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,bs.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,bs.jsx)(Ka.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=p4(h);return(0,bs.jsx)(nTe,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,bs.jsx)(Ka.Spinner,{}):(0,bs.jsx)(Ka.Button,{size:"compact",variant:"primary",onClick:m,children:(0,id._x)("Upload","verb")})]}),n&&(0,bs.jsx)("p",{children:(0,id.__)("Upload failed, try again.")})]})}var Mt=s(C(),1);function iTe({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:a}=(0,eX.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(w),{getEntityRecord:h,isResolving:g}=d(rX.store),v=h("root","__unstableBase",void 0)||{};return{hasPublishAction:f()._links?.["wp:action-publish"]??!1,isBeingScheduled:m(),isRequestingSiteIcon:g("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:v.site_icon_url,siteTitle:v.name,siteHome:v.home&&(0,tX.filterURLForDisplay)(v.home)}},[]),l=(0,Mt.jsx)(v0.Icon,{className:"components-site-icon",size:"36px",icon:aO});n&&(l=(0,Mt.jsx)("img",{alt:(0,la.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,la.__)("Are you ready to schedule?"),u=(0,la.__)("Your work will be published at the specified date and time.")):(c=(0,la.__)("Are you ready to publish?"),u=(0,la.__)("Double-check your settings before publishing.")):(c=(0,la.__)("Are you ready to submit for review?"),u=(0,la.__)("Your work will be reviewed and then approved.")),(0,Mt.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Mt.jsx)("div",{children:(0,Mt.jsx)("strong",{children:c})}),(0,Mt.jsx)("p",{children:u}),(0,Mt.jsxs)("div",{className:"components-site-card",children:[l,(0,Mt.jsxs)("div",{className:"components-site-info",children:[(0,Mt.jsx)("span",{className:"components-site-name",children:(0,oX.decodeEntities)(i)||(0,la.__)("(Untitled)")}),(0,Mt.jsx)("span",{className:"components-site-home",children:a})]})]}),(0,Mt.jsx)($K,{}),o&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(v0.PanelBody,{initialOpen:!1,title:[(0,la.__)("Visibility:"),(0,Mt.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Mt.jsx)(VT,{})},"label")],children:(0,Mt.jsx)(u0,{})}),(0,Mt.jsx)(v0.PanelBody,{initialOpen:!1,title:[(0,la.__)("Publish:"),(0,Mt.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Mt.jsx)(ng,{})},"label")],children:(0,Mt.jsx)(og,{})})]}),(0,Mt.jsx)(VK,{}),(0,Mt.jsx)(MK,{}),(0,Mt.jsx)(ZK,{}),e]})}var nX=iTe;var Li=s(A(),1),ca=s(E(),1),sd=s(D(),1),aX=s(O(),1),$T=s(Ir(),1),lX=s(ft(),1),cX=s(he(),1),uX=s(W(),1);var Mr=s(C(),1),iX="%postname%",sX="%pagename%",sTe=e=>{let{slug:t}=e;return e.permalink_template.includes(iX)?e.permalink_template.replace(iX,t):e.permalink_template.includes(sX)?e.permalink_template.replace(sX,t):e.permalink_template};function aTe({text:e}){let[t,r]=(0,sd.useState)(!1),o=(0,sd.useRef)(),n=(0,cX.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,sd.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,Mr.jsx)(Li.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,ca.__)("Copied!"):(0,ca.__)("Copy")})}function dX({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,aX.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(w),{getPostType:y}=m(uX.store);return{post:g(),postType:y(h("type")),isScheduled:v()}},[]),i=o?.labels?.singular_name,a=o?.labels?.view_item,l=o?.labels?.add_new_item,c=r.status==="future"?sTe(r):r.link,u=(0,$T.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,sd.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,Mr.jsxs)(Mr.Fragment,{children:[(0,ca.__)("is now scheduled. It will go live on")," ",(0,Mr.jsx)(ng,{}),"."]}):(0,ca.__)("is now live.");return(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,Mr.jsxs)(Li.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,Mr.jsx)(Li.ExternalLink,{ref:d,href:c,children:(0,lX.decodeEntities)(r.title)||(0,ca.__)("(no title)")})," ",f]}),(0,Mr.jsxs)(Li.PanelBody,{children:[(0,Mr.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,Mr.jsx)("strong",{children:(0,ca.__)("What\u2019s next?")})}),(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,Mr.jsx)(Li.TextControl,{__next40pxDefaultSize:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,ca.sprintf)((0,ca.__)("%s address"),i),value:(0,$T.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,Mr.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,Mr.jsx)(aTe,{text:c})})]}),(0,Mr.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,Mr.jsxs)(Li.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:Xn,iconPosition:"right",target:"_blank",children:[a,(0,Mr.jsx)(Li.VisuallyHidden,{as:"span",children:(0,ca.__)("(opens in a new tab)")})]}),(0,Mr.jsx)(Li.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var Kr=s(C(),1),lTe=class extends tP.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,tP.createRef)()}componentDidMount(){this.timeoutID=setTimeout(()=>{this.cancelButtonNode.current.focus()},0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){(e.isPublished&&!this.props.isSaving&&this.props.isDirty||this.props.currentPostId!==e.currentPostId)&&this.props.onClose()}onSubmit(){let{onClose:e,hasPublishAction:t,isPostTypeViewable:r}=this.props;(!t||!r)&&e()}render(){let{forceIsDirty:e,isBeingScheduled:t,isPublished:r,isPublishSidebarEnabled:o,isScheduled:n,isSaving:i,isSavingNonPostEntityChanges:a,onClose:l,onTogglePublishSidebar:c,PostPublishExtension:u,PrePublishExtension:d,currentPostId:f,...m}=this.props,{hasPublishAction:h,isDirty:g,isPostTypeViewable:v,...y}=m,b=r||n&&t,_=!b&&!i,S=b&&!i;return(0,Kr.jsxs)("div",{className:"editor-post-publish-panel",...y,children:[(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header",children:S?(0,Kr.jsx)(ua.Button,{size:"compact",onClick:l,icon:Kn,label:(0,eP.__)("Close panel")}):(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,Kr.jsx)(ua.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:a,onClick:l,variant:"secondary",size:"compact",children:(0,eP.__)("Cancel")})}),(0,Kr.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,Kr.jsx)(eg,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,Kr.jsxs)("div",{className:"editor-post-publish-panel__content",children:[_&&(0,Kr.jsx)(nX,{children:d&&(0,Kr.jsx)(d,{})}),S&&(0,Kr.jsx)(dX,{focusOnMount:!0,children:u&&(0,Kr.jsx)(u,{})}),i&&(0,Kr.jsx)(ua.Spinner,{})]}),(0,Kr.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,Kr.jsx)(ua.CheckboxControl,{label:(0,eP.__)("Always show pre-publish checks."),checked:o,onChange:c})})]})}},oP=(0,fX.compose)([(0,rP.withSelect)(e=>{let{getPostType:t}=e(mX.store),{getCurrentPost:r,getCurrentPostId:o,getEditedPostAttribute:n,isCurrentPostPublished:i,isCurrentPostScheduled:a,isEditedPostBeingScheduled:l,isEditedPostDirty:c,isAutosavingPost:u,isSavingPost:d,isSavingNonPostEntityChanges:f}=e(w),{isPublishSidebarEnabled:m}=e(w),h=t(n("type"));return{hasPublishAction:r()._links?.["wp:action-publish"]??!1,isPostTypeViewable:h?.viewable,isBeingScheduled:l(),isDirty:c(),isPublished:i(),isPublishSidebarEnabled:m(),isSaving:d()&&!u(),isSavingNonPostEntityChanges:f(),isScheduled:a(),currentPostId:o()}}),(0,rP.withDispatch)((e,{isPublishSidebarEnabled:t})=>{let{disablePublishSidebar:r,enablePublishSidebar:o}=e(w);return{onTogglePublishSidebar:()=>{t?r():o()}}}),ua.withFocusReturn,ua.withConstrainedTabbing])(lTe);var cP=s(A(),1),uP=s(he(),1),dP=s(O(),1),fP=s(D(),1),_m=s(E(),1);var bX=s(yo(),1),SX=s(lt(),1);var Vi=s(A(),1),Et=s(E(),1),lP=s(O(),1),y0=s(D(),1),gX=s(W(),1),vX=s($(),1),yX=s(he(),1);var h4=s(E(),1),hX=s(A(),1),iP=s(O(),1);var pX=s(O(),1);function nP({children:e}){let{hasStickyAction:t,postType:r}=(0,pX.useSelect)(o=>({hasStickyAction:o(w).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(w).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var g4=s(C(),1);function sP(){let e=(0,iP.useSelect)(r=>r(w).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,iP.useDispatch)(w);return(0,g4.jsx)(nP,{children:(0,g4.jsx)(hX.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,h4.__)("Sticky"),help:(0,h4.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var Xr=s(C(),1),aP={"auto-draft":{label:(0,Et.__)("Draft"),icon:Wm},draft:{label:(0,Et.__)("Draft"),icon:Wm},pending:{label:(0,Et.__)("Pending"),icon:Lv},private:{label:(0,Et.__)("Private"),icon:Fv},future:{label:(0,Et.__)("Scheduled"),icon:jv},publish:{label:(0,Et.__)("Published"),icon:Hd}},v4=[{label:(0,Et.__)("Draft"),value:"draft",description:(0,Et.__)("Not ready to publish.")},{label:(0,Et.__)("Pending"),value:"pending",description:(0,Et.__)("Waiting for review before publishing.")},{label:(0,Et.__)("Private"),value:"private",description:(0,Et.__)("Only visible to site admins and editors.")},{label:(0,Et.__)("Scheduled"),value:"future",description:(0,Et.__)("Publish automatically on a chosen date.")},{label:(0,Et.__)("Published"),value:"publish",description:(0,Et.__)("Visible to everyone.")}];function y4(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,lP.useSelect)(y=>{let{getEditedPostAttribute:b,getCurrentPostId:_,getCurrentPostType:S,getCurrentPost:x}=y(w);return{status:b("status"),date:b("date"),password:b("password"),postId:_(),postType:S(),canEdit:x()._links?.["wp:action-publish"]??!1}},[]),[a,l]=(0,y0.useState)(!!r),c=(0,yX.useInstanceId)(y4,"editor-change-status__password-input"),{editEntityRecord:u}=(0,lP.useDispatch)(gX.store),[d,f]=(0,y0.useState)(null),m=(0,y0.useMemo)(()=>({anchor:d,"aria-label":(0,Et.__)("Status & visibility"),headerTitle:(0,Et.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(Jc.includes(n))return null;let h=({status:y=e,password:b=r,date:_=t})=>{u("postType",n,o,{status:y,date:_,password:b})},g=y=>{l(y),y||h({password:""})},v=y=>{let b=t,_=r;e==="future"&&new Date(t)>new Date&&(b=null),y==="private"&&r&&(_=""),h({status:y,date:b,password:_})};return(0,Xr.jsx)(ht,{label:(0,Et.__)("Status"),ref:f,children:i?(0,Xr.jsx)(Vi.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:y,isOpen:b})=>(0,Xr.jsx)(Vi.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:y,icon:aP[e]?.icon,"aria-label":(0,Et.sprintf)((0,Et.__)("Change status: %s"),aP[e]?.label),"aria-expanded":b,children:aP[e]?.label}),renderContent:({onClose:y})=>(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)(vX.__experimentalInspectorPopoverHeader,{title:(0,Et.__)("Status & visibility"),onClose:y}),(0,Xr.jsx)("form",{onSubmit:b=>{b.preventDefault(),y()},children:(0,Xr.jsxs)(Vi.__experimentalVStack,{spacing:4,children:[(0,Xr.jsx)(Vi.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Et.__)("Status"),options:v4,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,Xr.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,Xr.jsx)(s4,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,Xr.jsxs)(Vi.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,Xr.jsx)(Vi.CheckboxControl,{label:(0,Et.__)("Password protected"),help:(0,Et.__)("Only visible to those who know the password."),checked:a,onChange:g}),a&&(0,Xr.jsx)("div",{className:"editor-change-status__password-input",children:(0,Xr.jsx)(Vi.TextControl,{label:(0,Et.__)("Password"),onChange:b=>h({password:b}),value:r,placeholder:(0,Et.__)("Use a secure password"),type:"text",id:c,__next40pxDefaultSize:!0,maxLength:255})})]}),(0,Xr.jsx)(sP,{})]})})]})}):(0,Xr.jsx)("div",{className:"editor-post-status is-read-only",children:aP[e]?.label})})}var mP=s(C(),1);function pP({forceIsDirty:e}){let[t,r]=(0,fP.useState)(!1),o=(0,uP.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:a,isPublished:l,isSaveable:c,isSaving:u,isScheduled:d,hasPublishAction:f,showIconLabels:m,postStatus:h,postStatusHasChanged:g,postType:v}=(0,dP.useSelect)(L=>{let{isEditedPostNew:M,isCurrentPostPublished:k,isCurrentPostScheduled:I,isEditedPostDirty:U,isSavingPost:G,isEditedPostSaveable:Y,getCurrentPost:Z,isAutosavingPost:V,getEditedPostAttribute:j,getPostEdits:H}=L(w),{get:X}=L(SX.store);return{isAutosaving:V(),isDirty:e||U(),isNew:M(),isPublished:k(),isSaving:G(),isSaveable:Y(),isScheduled:I(),hasPublishAction:Z()?._links?.["wp:action-publish"]??!1,showIconLabels:X("core","showIconLabels"),postStatus:j("status"),postStatusHasChanged:!!H()?.status,postType:L(w).getCurrentPostType()}},[e]),y=h==="pending",{savePost:b}=(0,dP.useDispatch)(w),_=(0,uP.usePrevious)(u);if((0,fP.useEffect)(()=>{let L;return _&&!u&&(r(!0),L=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(L)},[u]),v===ur||!f&&y)return null;let S=!["pending","draft","auto-draft"].includes(h)&&v4.map(({value:L})=>L).includes(h);if(l||d||S||g&&["pending","draft"].includes(h))return null;let x=y?(0,_m.__)("Save as pending"):(0,_m.__)("Save draft"),T=(0,_m.__)("Save"),R=t||!a&&!i,F=u||R,B=u||R||!c,z;return u?z=n?(0,_m.__)("Autosaving"):(0,_m.__)("Saving"):R?z=(0,_m.__)("Saved"):o?z=x:m&&(z=T),(0,mP.jsxs)(cP.Button,{className:c||u?re({"editor-post-save-draft":!F,"editor-post-saved-state":F,"is-saving":u,"is-autosaving":n,"is-saved":R,[(0,cP.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:B?void 0:()=>b(),shortcut:B?void 0:bX.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:OR,label:z||x,"aria-disabled":B,children:[F&&(0,mP.jsx)(No,{icon:R?Pi:NR}),z]})}var _X=s(O(),1);function hP({children:e}){return(0,_X.useSelect)(r=>r(w).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var gP=s(A(),1),ug=s(E(),1),vP=s(D(),1),wX=s(O(),1);var cg=s(C(),1);function yP(){let[e,t]=(0,vP.useState)(null),r=(0,wX.useSelect)(a=>a(w).getCurrentPostType(),[]),o=(0,vP.useMemo)(()=>({anchor:e,"aria-label":(0,ug.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=ig(),i=ig({full:!0});return Jc.includes(r)?null:(0,cg.jsx)(hP,{children:(0,cg.jsx)(ht,{label:(0,ug.__)("Publish"),ref:t,children:(0,cg.jsx)(gP.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:a,isOpen:l})=>(0,cg.jsx)(gP.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:a,"aria-label":(0,ug.sprintf)((0,ug.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:a})=>(0,cg.jsx)(og,{onClose:a})})})})}var bP=s(A(),1),dg=s(E(),1),SP=s(O(),1),xX=s(D(),1),CX=s(Yi(),1);var wm=s(C(),1);function TX(){(0,CX.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,xX.useState)(!1),{editPost:r,savePost:o}=(0,SP.useDispatch)(w),{isSaving:n,isPublished:i,isScheduled:a}=(0,SP.useSelect)(f=>{let{isSavingPost:m,isCurrentPostPublished:h,isCurrentPostScheduled:g}=f(w);return{isSaving:m(),isPublished:h(),isScheduled:g()}},[]),l=n||!i&&!a,c,u;i?(c=(0,dg.__)("Are you sure you want to unpublish this post?"),u=(0,dg.__)("Unpublish")):a&&(c=(0,dg.__)("Are you sure you want to unschedule this post?"),u=(0,dg.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,wm.jsxs)(wm.Fragment,{children:[(0,wm.jsx)(bP.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{l||t(!0)},"aria-disabled":l,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,dg.__)("Switch to draft")}),(0,wm.jsx)(bP.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var PX=s(O(),1),b0=s(E(),1);var b4=s(C(),1);function _P(){let{syncStatus:e,postType:t}=(0,PX.useSelect)(r=>{let{getEditedPostAttribute:o}=r(w);return{syncStatus:o("meta")?.wp_pattern_sync_status==="unsynced"?"unsynced":o("wp_pattern_sync_status"),postType:o("type")}});return t!=="wp_block"?null:(0,b4.jsx)(ht,{label:(0,b0.__)("Sync status"),children:(0,b4.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,b0._x)("Not synced","pattern (singular)"):(0,b0._x)("Synced","pattern (singular)")})})}var kX=s(D(),1),EX=s(O(),1),RX=s(W(),1);var S4=s(C(),1),cTe=e=>e;function uTe({taxonomyWrapper:e=cTe}){let{postType:t,taxonomies:r}=(0,EX.useSelect)(n=>({postType:n(w).getCurrentPostType(),taxonomies:n(RX.store).getEntityRecords("root","taxonomy",{per_page:-1})}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?KT:WT;return(0,S4.jsx)(kX.Fragment,{children:e((0,S4.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var fg=uTe;var AX=s(O(),1),OX=s(W(),1);function wP({children:e}){return(0,AX.useSelect)(r=>{let o=r(w).getCurrentPostType();return r(OX.store).getEntityRecords("root","taxonomy",{per_page:-1})?.some(i=>i.types.includes(o))},[])?e:null}var IX=s(A(),1),xP=s(O(),1);var S0=s(C(),1);function dTe({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,xP.useSelect)(c=>{let{isEditorPanelEnabled:u,isEditorPanelOpened:d}=c(w);return{isEnabled:r?u(o):!1,isOpened:r?d(o):!1}},[o,r]),{toggleEditorPanelOpened:a}=(0,xP.useDispatch)(w);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,S0.jsx)(IX.PanelBody,{title:l,opened:i,onToggle:()=>a(o),children:t}):null}function CP(){return(0,S0.jsx)(wP,{children:(0,S0.jsx)(fg,{taxonomyWrapper:(e,t)=>(0,S0.jsx)(dTe,{taxonomy:t,children:e})})})}var XX=s(x4(),1),C4=s(E(),1),T4=s(W(),1),QX=s(D(),1),JX=s(Xe(),1),EP=s(O(),1),$X=s(he(),1),eQ=s(A(),1);var xm=s(C(),1);function w0(){let e=(0,$X.useInstanceId)(w0),{content:t,blocks:r,type:o,id:n}=(0,EP.useSelect)(l=>{let{getEditedEntityRecord:c}=l(T4.store),{getCurrentPostType:u,getCurrentPostId:d}=l(w),f=u(),m=d(),h=c("postType",f,m);return{content:h?.content,blocks:h?.blocks,type:f,id:m}},[]),{editEntityRecord:i}=(0,EP.useDispatch)(T4.store),a=(0,QX.useMemo)(()=>t instanceof Function?t({blocks:r}):r?(0,JX.__unstableSerializeAndClean)(r):t,[t,r]);return(0,xm.jsxs)(xm.Fragment,{children:[(0,xm.jsx)(eQ.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`,children:(0,C4.__)("Type text or HTML")}),(0,xm.jsx)(XX.default,{autoComplete:"off",dir:"auto",value:a,onChange:l=>{i("postType",o,n,{content:l.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,C4.__)("Start writing with text or HTML")})]})}var rQ=s(E(),1),pg=s(D(),1),oQ=s(ft(),1),DP=s(O(),1),P4=s($(),1),nQ=s(yo(),1),iQ=s(Xe(),1),hg=s(Wy(),1),sQ=s(he(),1),k4=s(xh(),1);var RP="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",AP=/[\r\n]+/g;var mg=s(D(),1),tQ=s(O(),1);function OP(e){let t=(0,mg.useRef)(),{isCleanNewPost:r}=(0,tQ.useSelect)(o=>{let{isCleanNewPost:n}=o(w);return{isCleanNewPost:n()}},[]);return(0,mg.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,mg.useEffect)(()=>{if(!t.current)return;let{defaultView:o}=t.current.ownerDocument,{name:n,parent:i}=o,a=n==="editor-canvas"?i.document:o.document,{activeElement:l,body:c}=a;r&&(!l||c===l)&&t.current.focus()},[r]),{ref:t}}var IP=s(O(),1);function NP(){let{editPost:e}=(0,IP.useDispatch)(w),{title:t}=(0,IP.useSelect)(o=>{let{getEditedPostAttribute:n}=o(w);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var FP=s(C(),1),{useRichText:wTe}=N(hg.privateApis),xTe=(0,pg.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,DP.useSelect)(M=>{let{getSettings:k,getEditedContentOnlySection:I}=N(M(P4.store)),{titlePlaceholder:U,isPreviewMode:G}=k();return{placeholder:U,isEditingContentOnlySection:!!I(),isPreview:G}},[]),[i,a]=(0,pg.useState)(!1),{ref:l}=OP(t),{title:c,setTitle:u}=NP(),[d,f]=(0,pg.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,DP.useDispatch)(P4.store),v=(0,oQ.decodeEntities)(r)||(0,rQ.__)("Add title"),{value:y,onChange:b,ref:_}=wTe({value:c,onChange(M){u(M.replace(AP," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(M,k){f(I=>{let{start:U,end:G}=I;return U===M&&G===k?I:{start:M,end:k}})},__unstableDisableFormats:!1});function S(M){h(M,0)}function x(){a(!0),m()}function T(){a(!1),f({})}function R(){g(void 0,void 0,0)}function F(M){M.keyCode===nQ.ENTER&&(M.preventDefault(),R())}function B(M){let k=M.clipboardData,I="",U="";try{I=k.getData("text/plain"),U=k.getData("text/html")}catch{return}let G=(0,iQ.pasteHandler)({HTML:U,plainText:I});if(M.preventDefault(),!!G.length)if(typeof G!="string"){let[Y]=G;if(!c&&(Y.name==="core/heading"||Y.name==="core/paragraph")){let Z=(0,k4.__unstableStripHTML)(Y.attributes.content);u(Z),S(G.slice(1))}else S(G)}else{let Y=(0,k4.__unstableStripHTML)(G);b((0,hg.insert)(y,(0,hg.create)({html:Y})))}}let z=re(RP,{"is-selected":i}),L=o?{opacity:.2}:void 0;return(0,FP.jsx)("h1",{ref:(0,sQ.useMergeRefs)([_,l]),contentEditable:!o&&!n,className:z,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:x,onBlur:T,onKeyDown:F,onPaste:B,style:L})}),BP=(0,pg.forwardRef)((e,t)=>(0,FP.jsx)(tr,{supportKeys:"title",children:(0,FP.jsx)(xTe,{ref:t})}));var aQ=s(A(),1),lQ=s(E(),1),cQ=s(ft(),1),uQ=s(O(),1),dQ=s($(),1),MP=s(D(),1);var fQ=s(C(),1);function CTe(e,t){let{placeholder:r}=(0,uQ.useSelect)(h=>{let{getSettings:g}=h(dQ.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,MP.useState)(!1),{title:i,setTitle:a}=NP(),{ref:l}=OP(t);function c(h){a(h.replace(AP," "))}function u(){n(!0)}function d(){n(!1)}let f=re(RP,{"is-selected":o,"is-raw-text":!0}),m=(0,cQ.decodeEntities)(r)||(0,lQ.__)("Add title");return(0,fQ.jsx)(aQ.TextareaControl,{ref:l,value:i,onChange:c,onFocus:u,onBlur:d,label:r,className:f,placeholder:m,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1})}var LP=(0,MP.forwardRef)(CTe);var gg=s(E(),1),jP=s(A(),1),vg=s(O(),1),hQ=s(D(),1);var mQ=s(O(),1),pQ=s(W(),1);function VP({children:e}){let{canTrashPost:t}=(0,mQ.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(w),{canUser:a}=r(pQ.store),l=i(),c=n(),u=o(),d=c?a("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!qF.includes(l)}},[]);return t?e:null}var x0=s(C(),1);function zP({onActionPerformed:e}){let t=(0,vg.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,vg.useSelect)(d=>{let f=d(w);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:a}=(0,vg.useDispatch)(w),[l,c]=(0,hQ.useState)(!1);if(r||!n)return null;let u=async()=>{c(!1),await a();let d=await t.resolveSelect(w).getCurrentPost();e?.("move-to-trash",[d])};return(0,x0.jsxs)(VP,{children:[(0,x0.jsx)(jP.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,gg.__)("Move to trash")}),(0,x0.jsx)(jP.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,gg.__)("Move to trash"),size:"small",children:(0,gg.sprintf)((0,gg.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var C0=s(O(),1),T0=s(Ir(),1),UP=s(D(),1),gQ=s($(),1),Cm=s(E(),1),di=s(A(),1),vQ=s(ct(),1);var yQ=s(W(),1),HP=s(he(),1);var hr=s(C(),1);function P0({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:a}=(0,C0.useSelect)(h=>{let g=h(w).getCurrentPost(),v=h(w).getCurrentPostType(),y=h(yQ.store).getPostType(v),b=h(w).getPermalinkParts(),_=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(w).isPermalinkEditable()&&_,postSlug:(0,T0.safeDecodeURIComponent)(h(w).getEditedPostSlug()),viewPostLabel:y?.labels.view_item,postLink:g.link,permalinkPrefix:b?.prefix,permalinkSuffix:b?.suffix,permalink:(0,T0.safeDecodeURIComponent)(h(w).getPermalink())}},[]),{editPost:l}=(0,C0.useDispatch)(w),{createNotice:c}=(0,C0.useDispatch)(vQ.store),[u,d]=(0,UP.useState)(!1),f=(0,HP.useCopyToClipboard)(a,()=>{c("info",(0,Cm.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,HP.useInstanceId)(P0);return(0,hr.jsxs)("div",{className:"editor-post-url",children:[(0,hr.jsx)(gQ.__experimentalInspectorPopoverHeader,{title:(0,Cm.__)("Slug"),onClose:e}),(0,hr.jsxs)(di.__experimentalVStack,{spacing:3,children:[t&&(0,hr.jsx)("p",{className:"editor-post-url__intro",children:(0,UP.createInterpolateElement)((0,Cm.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,hr.jsx)("span",{id:m}),a:(0,hr.jsx)(di.ExternalLink,{href:(0,Cm.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,hr.jsxs)("div",{children:[t&&(0,hr.jsxs)(hr.Fragment,{children:[(0,hr.jsx)(di.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,hr.jsx)(di.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,hr.jsx)(di.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,hr.jsx)(di.Button,{icon:kv,ref:f,size:"small",label:"Copy"})}),label:(0,Cm.__)("Slug"),hideLabelFromVision:!0,value:u?"":r,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:h=>{if(l({slug:h}),!h){u||d(!0);return}u&&d(!1)},onBlur:h=>{l({slug:(0,T0.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,hr.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,hr.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,Cm.__)("Permalink:")}),(0,hr.jsxs)(di.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,hr.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,hr.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,hr.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,hr.jsx)(di.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var bQ=s(O(),1),SQ=s(W(),1);function GP({children:e}){return(0,bQ.useSelect)(r=>{let o=r(w).getCurrentPostType();return!(!r(SQ.store).getPostType(o)?.viewable||!r(w).getCurrentPost().link||!r(w).getPermalinkParts())},[])?e:null}var _Q=s(O(),1),WP=s(Ir(),1);function wQ(){return E4()}function E4(){let e=(0,_Q.useSelect)(t=>t(w).getPermalink(),[]);return(0,WP.filterURLForDisplay)((0,WP.safeDecodeURIComponent)(e))}var YP=s(D(),1),qP=s(O(),1),bg=s(A(),1),yg=s(E(),1),xQ=s(Ir(),1),CQ=s(W(),1);var ji=s(C(),1);function ZP(){let{isFrontPage:e}=(0,qP.useSelect)(i=>{let{getCurrentPostId:a}=i(w),{getEditedEntityRecord:l,canUser:c}=i(CQ.store),u=c("read",{kind:"root",name:"site"})?l("root","site"):void 0,d=a();return{isFrontPage:u?.page_on_front===d}},[]),[t,r]=(0,YP.useState)(null),o=(0,YP.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,yg.__)("Link"):(0,yg.__)("Slug");return(0,ji.jsx)(GP,{children:(0,ji.jsxs)(ht,{label:n,ref:r,children:[!e&&(0,ji.jsx)(bg.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,ji.jsx)(TTe,{isOpen:i,onClick:a}),renderContent:({onClose:i})=>(0,ji.jsx)(P0,{onClose:i})}),e&&(0,ji.jsx)(PTe,{})]})})}function TTe({isOpen:e,onClick:t}){let{slug:r}=(0,qP.useSelect)(n=>({slug:n(w).getEditedPostSlug()}),[]),o=(0,xQ.safeDecodeURIComponent)(r);return(0,ji.jsx)(bg.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,yg.sprintf)((0,yg.__)("Change link: %s"),o),onClick:t,children:(0,ji.jsx)(ji.Fragment,{children:o})})}function PTe(){let{postLink:e}=(0,qP.useSelect)(t=>{let{getCurrentPost:r}=t(w);return{postLink:r()?.link}},[]);return(0,ji.jsx)(bg.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var TQ=s(O(),1);function PQ({render:e}){let t=(0,TQ.useSelect)(r=>r(w).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var VQ=s(E(),1),QP=s(A(),1),jQ=s(O(),1);var zQ=s(D(),1),UQ=s($(),1);var kc=s(E(),1),BQ=s(O(),1),MQ=s($(),1);var EQ=s(O(),1),RQ=s(E(),1),AQ=s(k0(),1);var OQ=s(C(),1);function Sg(){let e=(0,EQ.useSelect)(r=>r(w).getEditedPostAttribute("content"),[]),t=(0,RQ._x)("words","Word count type. Do not translate!");return(0,OQ.jsx)("span",{className:"word-count",children:(0,AQ.count)(e,t)})}var IQ=s(O(),1),ad=s(E(),1),NQ=s(k0(),1),R4=s(D(),1);var KP=s(C(),1),kTe=189;function _g(){let e=(0,IQ.useSelect)(n=>n(w).getEditedPostAttribute("content"),[]),t=(0,ad._x)("words","Word count type. Do not translate!"),r=Math.round((0,NQ.count)(e,t)/kTe),o=r===0?(0,R4.createInterpolateElement)((0,ad.__)("<span>< 1</span> minute"),{span:(0,KP.jsx)("span",{})}):(0,R4.createInterpolateElement)((0,ad.sprintf)((0,ad._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,KP.jsx)("span",{})});return(0,KP.jsx)("span",{className:"time-to-read",children:o})}var FQ=s(O(),1),DQ=s(k0(),1);function wg(){let e=(0,FQ.useSelect)(t=>t(w).getEditedPostAttribute("content"),[]);return(0,DQ.count)(e,"characters_including_spaces")}var Xt=s(C(),1);function ETe({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,BQ.useSelect)(i=>{let{getGlobalBlockCount:a}=i(MQ.store);return{headingCount:a("core/heading"),paragraphCount:a("core/paragraph"),numberOfBlocks:a()}},[]);return(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,kc.__)("Document Statistics"),tabIndex:"0",children:(0,Xt.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Words"),(0,Xt.jsx)(Sg,{})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Characters"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:(0,Xt.jsx)(wg,{})})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Time to read"),(0,Xt.jsx)(_g,{})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Headings"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Paragraphs"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,Xt.jsxs)("li",{className:"table-of-contents__count",children:[(0,kc.__)("Blocks"),(0,Xt.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)("hr",{}),(0,Xt.jsx)("h2",{className:"table-of-contents__title",children:(0,kc.__)("Document Outline")}),(0,Xt.jsx)(Ah,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var LQ=ETe;var XP=s(C(),1);function RTe({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,jQ.useSelect)(i=>!!i(UQ.store).getBlockCount(),[]);return(0,XP.jsx)(QP.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:a})=>(0,XP.jsx)(QP.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?a:void 0,icon:iA,"aria-expanded":i,"aria-haspopup":"true",label:(0,VQ.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,XP.jsx)(LQ,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var HQ=(0,zQ.forwardRef)(RTe);var GQ=s(E(),1),WQ=s(D(),1),YQ=s(O(),1),qQ=s(W(),1);function ZQ(){let{__experimentalGetDirtyEntityRecords:e}=(0,YQ.useSelect)(qQ.store);return(0,WQ.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,GQ.__)("You have unsaved changes. If you proceed, they will be lost."),r.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e]),null}var A4=s(Yi(),1),QQ=s(D(),1),te=s($(),1),JQ=s(XQ(),1),$Q=s(C(),1);function Ze(e,t,r=[]){let o=(0,QQ.forwardRef)((n,i)=>((0,A4.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,$Q.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=Ze(e+"."+n,t[n])}),o}function Xa(e,t){return(...r)=>((0,A4.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var eJ=Ze("RichText",te.RichText,["Content"]);eJ.isEmpty=Xa("RichText.isEmpty",te.RichText.isEmpty);var ATe=Ze("Autocomplete",te.Autocomplete),OTe=Ze("AlignmentToolbar",te.AlignmentToolbar),ITe=Ze("BlockAlignmentToolbar",te.BlockAlignmentToolbar),NTe=Ze("BlockControls",te.BlockControls,["Slot"]),FTe=Ze("BlockEdit",te.BlockEdit),DTe=Ze("BlockEditorKeyboardShortcuts",te.BlockEditorKeyboardShortcuts),BTe=Ze("BlockFormatControls",te.BlockFormatControls,["Slot"]),MTe=Ze("BlockIcon",te.BlockIcon),LTe=Ze("BlockInspector",te.BlockInspector),VTe=Ze("BlockList",te.BlockList),jTe=Ze("BlockMover",te.BlockMover),zTe=Ze("BlockNavigationDropdown",te.BlockNavigationDropdown),UTe=Ze("BlockSelectionClearer",te.BlockSelectionClearer),HTe=Ze("BlockSettingsMenu",te.BlockSettingsMenu),GTe=Ze("BlockTitle",te.BlockTitle),WTe=Ze("BlockToolbar",te.BlockToolbar),YTe=Ze("ColorPalette",te.ColorPalette),qTe=Ze("ContrastChecker",te.ContrastChecker),ZTe=Ze("CopyHandler",te.CopyHandler),KTe=Ze("DefaultBlockAppender",te.DefaultBlockAppender),XTe=Ze("FontSizePicker",te.FontSizePicker),QTe=Ze("Inserter",te.Inserter),JTe=Ze("InnerBlocks",te.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),$Te=Ze("InspectorAdvancedControls",te.InspectorAdvancedControls,["Slot"]),ePe=Ze("InspectorControls",te.InspectorControls,["Slot"]),tPe=Ze("PanelColorSettings",te.PanelColorSettings),rPe=Ze("PlainText",te.PlainText),oPe=Ze("RichTextShortcut",te.RichTextShortcut),nPe=Ze("RichTextToolbarButton",te.RichTextToolbarButton),iPe=Ze("__unstableRichTextInputEvent",te.__unstableRichTextInputEvent),sPe=Ze("MediaPlaceholder",te.MediaPlaceholder),aPe=Ze("MediaUpload",te.MediaUpload),lPe=Ze("MediaUploadCheck",te.MediaUploadCheck),cPe=Ze("MultiSelectScrollIntoView",te.MultiSelectScrollIntoView),uPe=Ze("NavigableToolbar",te.NavigableToolbar),dPe=Ze("ObserveTyping",te.ObserveTyping),fPe=Ze("SkipToSelectedBlock",te.SkipToSelectedBlock),mPe=Ze("URLInput",te.URLInput),pPe=Ze("URLInputButton",te.URLInputButton),hPe=Ze("URLPopover",te.URLPopover),gPe=Ze("Warning",te.Warning),vPe=Ze("WritingFlow",te.WritingFlow),yPe=Xa("createCustomColorsHOC",te.createCustomColorsHOC),bPe=Xa("getColorClassName",te.getColorClassName),SPe=Xa("getColorObjectByAttributeValues",te.getColorObjectByAttributeValues),_Pe=Xa("getColorObjectByColorValue",te.getColorObjectByColorValue),wPe=Xa("getFontSize",te.getFontSize),xPe=Xa("getFontSizeClass",te.getFontSizeClass),CPe=Xa("withColorContext",te.withColorContext),TPe=Xa("withColors",te.withColors),PPe=Xa("withFontSizes",te.withFontSizes);var kPe=Tf,EPe=Tf;function RPe(e=[]){return e.push({...Zx}),e}(0,tJ.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",RPe);var rJ=s(D(),1),O4=s(mo(),1),oJ=s(Yi(),1),JP=s(Yd(),1);var xg=s(C(),1),{MediaUploadModal:APe}=N(JP.privateApis),OPe=class extends rJ.Component{constructor(e){super(e),this.state={isOpen:!1},this.openModal=this.openModal.bind(this),this.closeModal=this.closeModal.bind(this)}openModal(){this.setState({isOpen:!0})}closeModal(){this.setState({isOpen:!1}),this.props.onClose?.()}render(){let{allowedTypes:e,multiple:t,value:r,onSelect:o,title:n,modalClass:i,render:a}=this.props,{isOpen:l}=this.state;return(0,xg.jsxs)(xg.Fragment,{children:[a({open:this.openModal}),(0,xg.jsx)(APe,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,O4.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,oJ.default)("Extending MediaUpload as a class component",{since:"7.0",version:"7.2",hint:"MediaUpload will become a function component in WordPress 7.2 Please update any custom implementations to use function components instead."}),OPe)):(0,O4.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>JP.MediaUpload);var iJ=s(mo(),1),sJ=s(Ls(),1),aJ=s(he(),1),$P=s($(),1),I4=s(O(),1),lJ=s(Xe(),1);var da=s(C(),1),{PatternOverridesControls:IPe,ResetOverridesControl:NPe,PATTERN_TYPES:FPe,PATTERN_SYNC_TYPES:nJ}=N(sJ.privateApis),DPe=(0,aJ.createHigherOrderComponent)(e=>t=>{let r=(0,I4.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o($P.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,da.jsxs)(da.Fragment,{children:[(0,da.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,da.jsx)(BPe,{...t})]})},"withPatternOverrideControls");function BPe(e){let t=(0,$P.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,I4.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(w);return{hasPatternOverridesSource:!!(0,lJ.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===FPe.user&&d("meta")?.wp_pattern_sync_status!==nJ.unsynced&&d("wp_pattern_sync_status")!==nJ.unsynced}},[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some(c=>c.source==="core/pattern-overrides"),a=o&&t==="default",l=!o&&!!e.attributes.metadata?.name&&t!=="disabled"&&i;return r?(0,da.jsxs)(da.Fragment,{children:[a&&(0,da.jsx)(IPe,{...e}),l&&(0,da.jsx)(NPe,{...e})]}):null}(0,iJ.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",DPe);var cJ=s(mo(),1),uJ=s(he(),1),dJ=s(D(),1),N4=s(E(),1),Cg=s($(),1),ek=s(A(),1),fJ=s(O(),1),Qa=s(C(),1),MPe=["core/navigation-link","core/navigation-submenu"];function LPe({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,Cg.useBlockEditingMode)(),i=(0,fJ.useSelect)(l=>l(Cg.store).getSettings().onNavigateToEntityRecord,[]),a=(0,dJ.useCallback)(()=>{t==="post-type"&&o==="page"&&r&&i&&i({postId:r,postType:o})},[t,r,o,i]);return t!=="post-type"||o!=="page"||!r||!i||n!=="contentOnly"?null:(0,Qa.jsx)(Cg.__unstableBlockToolbarLastItem,{children:(0,Qa.jsx)(ek.ToolbarGroup,{children:(0,Qa.jsx)(ek.ToolbarButton,{name:"view",title:(0,N4.__)("View"),onClick:a,children:(0,N4.__)("View")})})})}var VPe=(0,uJ.createHigherOrderComponent)(e=>t=>{let r=MPe.includes(t.name);return(0,Qa.jsxs)(Qa.Fragment,{children:[(0,Qa.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Qa.jsx)(LPe,{...t})]})},"withNavigationViewButton");(0,cJ.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",VPe);var mJ=s(mo(),1),pJ=s(he(),1),hJ=s(D(),1),F4=s(E(),1),Tg=s($(),1),tk=s(A(),1),ld=s(O(),1);var Ja=s(C(),1),jPe="core/navigation",zPe="core/template-part",UPe="edit-post/block";function HPe({clientId:e}){let t=(0,ld.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,ld.useDispatch)(Tg.store),{requestInspectorTab:n}=N((0,ld.useDispatch)(Tg.store)),{enableComplementaryArea:i}=(0,ld.useDispatch)(Ce),{hasNavigationBlocks:a,firstNavigationBlockId:l,isNavigationEditable:c}=(0,ld.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(Tg.store),v=f(e).filter(_=>m(_)===jPe),y=v.length>0,b=y?v[0]:null;return{hasNavigationBlocks:y,firstNavigationBlockId:b,isNavigationEditable:h(b)!=="disabled"}},[e]),u=(0,hJ.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",UPe),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!a||!c?null:(0,Ja.jsx)(Tg.__unstableBlockToolbarLastItem,{children:(0,Ja.jsx)(tk.ToolbarGroup,{children:(0,Ja.jsx)(tk.ToolbarButton,{label:(0,F4.__)("Edit navigation"),onClick:u,children:(0,F4.__)("Edit navigation")})})})}var GPe=(0,pJ.createHigherOrderComponent)(e=>t=>{let r=t.name===zPe;return(0,Ja.jsxs)(Ja.Fragment,{children:[(0,Ja.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Ja.jsx)(HPe,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,mJ.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",GPe);var yJ=s(mo(),1),bJ=s(he(),1),cd=s($(),1),E0=s(A(),1),Ec=s(E(),1),Rc=s(Xe(),1),ok=s(D(),1),Pg=s(O(),1),SJ=s(ct(),1),_J=s(W(),1);function D4(e,t,r){return!e||typeof e!="object"||t.reduce((o,n,i)=>(o[n]===void 0&&(Number.isInteger(t[i+1])?o[n]=[]:o[n]={}),i===t.length-1&&(o[n]=r),o[n]),e),e}var Ss=s(C(),1),{cleanEmptyObject:WPe}=N(cd.privateApis),gJ={...Rc.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},YPe={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},qPe={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},ZPe=["border","color","spacing","typography"],vJ=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},KPe=["borderColor","borderWidth","borderStyle"],wJ=["top","right","bottom","left"];function XPe(e,t,r){if(!e&&!t)return[];let o=[...rk("top",e,r),...rk("right",e,r),...rk("bottom",e,r),...rk("left",e,r)],{color:n,style:i,width:a}=e||{};return(t||n||a)&&!i&&wJ.forEach(c=>{r?.[c]?.style||o.push({path:["border",c,"style"],value:"solid"})}),o}function rk(e,t,r){if(!t?.[e]||r?.[e]?.style)return[];let{color:o,style:n,width:i}=t[e];return!(o||i)||n?[]:[{path:["border",e,"style"],value:"solid"}]}function QPe(e,t,r){let o=(0,Pg.useSelect)(i=>N(i(Rc.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,ok.useMemo)(()=>{let i=o.flatMap(a=>{if(!gJ[a])return[];let{value:l}=gJ[a],c=l.join("."),u=t[qPe[c]],d=u?`var:preset|${YPe[c]}|${u}`:vJ(t.style,l);if(a==="linkColor"){let f=d?[{path:l,value:d}]:[],m=["elements","link",":hover","color","text"],h=vJ(t.style,m);return h&&f.push({path:m,value:h}),f}if(KPe.includes(a)&&d){let f=[{path:l,value:d}];return wJ.forEach(m=>{let h=[...l];h.splice(-1,0,m),f.push({path:h,value:d})}),f}return d?[{path:l,value:d}]:[]});return XPe(t.style?.border,t.borderColor,n?.border).forEach(a=>i.push(a)),i},[o,t,n])}function JPe({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=xo(),i=QPe(e,t,o),{__unstableMarkNextChangeAsNotPersistent:a}=(0,Pg.useDispatch)(cd.store),{createSuccessNotice:l}=(0,Pg.useDispatch)(SJ.store),c=(0,ok.useCallback)(()=>{if(i.length!==0&&i.length>0){let{style:u}=t,d=structuredClone(u),f=structuredClone(o);for(let{path:h,value:g}of i)D4(d,h,void 0),D4(f,["styles","blocks",e,...h],g);let m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:WPe(d)};a(),r(m),n(f,{undoIgnore:!0}),l((0,Ec.sprintf)((0,Ec.__)("%s styles applied."),(0,Rc.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,Ec.__)("Undo"),onClick(){a(),r(t),n(o,{undoIgnore:!0})}}]})}},[a,t,i,l,e,r,n,o]);return(0,Ss.jsxs)(E0.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,Ec.sprintf)((0,Ec.__)("Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,Rc.getBlockType)(e).title),children:[(0,Ss.jsx)(E0.BaseControl.VisualLabel,{children:(0,Ec.__)("Styles")}),(0,Ss.jsx)(E0.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:c,children:(0,Ec.__)("Apply globally")})]})}function $Pe(e){let t=(0,cd.useBlockEditingMode)(),r=(0,Pg.useSelect)(i=>i(_J.store).getCurrentTheme()?.is_block_theme,[]),o=ZPe.some(i=>(0,Rc.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,Ss.jsx)(cd.InspectorAdvancedControls,{children:(0,Ss.jsx)(JPe,{...e})}):null}var eke=(0,bJ.createHigherOrderComponent)(e=>t=>(0,Ss.jsxs)(Ss.Fragment,{children:[(0,Ss.jsx)(e,{...t},"edit"),t.isSelected&&(0,Ss.jsx)($Pe,{...t})]}));(0,yJ.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",eke);var R0=s(A(),1),xJ=s(C(),1),B4="__experimentalMainDashboardButton",CJ=()=>{let e=(0,R0.__experimentalUseSlotFills)(B4);return!!(e&&e.length)},{Fill:tke,Slot:rke}=(0,R0.createSlotFill)(B4),TJ=tke,oke=()=>{let e=(0,R0.__experimentalUseSlotFills)(B4);return(0,xJ.jsx)(rke,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};TJ.Slot=oke;var nk=TJ;var Ose=s(O(),1),Ise=s(W(),1),Nse=s(A(),1),Fse=s(E(),1);var fE=s(O(),1),Nd=s(E(),1),une=s(lt(),1),mE=s($(),1),dne=s(he(),1),pE=s(D(),1),fne=s(ft(),1),mne=s(ct(),1);var Q$=s($(),1),J$=s(O(),1),B0=s(he(),1),$$=s(lt(),1),eee=s(D(),1);var kg=s($(),1),PJ=s(D(),1),ik=s(A(),1),M4=s(E(),1);var kJ=s(O(),1);var Ac=s(C(),1),{useHasBlockToolbar:nke}=N(kg.privateApis);function EJ({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,kJ.useSelect)(i=>({blockSelectionStart:i(kg.store).getBlockSelectionStart()}),[]),o=nke(),n=!!r;return(0,PJ.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,Ac.jsxs)(Ac.Fragment,{children:[(0,Ac.jsx)("div",{className:re("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,Ac.jsx)(kg.BlockToolbar,{hideDragHandle:!0})}),(0,Ac.jsx)(ik.Popover.Slot,{name:"block-toolbar"}),(0,Ac.jsx)(ik.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?Tl:kl,onClick:()=>{t(!e)},label:e?(0,M4.__)("Show block tools"):(0,M4.__)("Hide block tools"),size:"compact"})]}):null}var RJ=s(he(),1),sk=s(O(),1),Tm=s(E(),1),AJ=s($(),1),Eg=s(A(),1);var L4=s(D(),1),OJ=s(Oi(),1),IJ=s(lt(),1);var fa=s(C(),1);function ike({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,sk.useDispatch)(w),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:a,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,sk.useSelect)(_=>{let{get:S}=_(IJ.store),{isListViewOpened:x,getEditorMode:T,getInserterSidebarToggleRef:R,getListViewToggleRef:F}=N(_(w)),{getShortcutRepresentation:B}=_(OJ.store);return{isInserterOpened:_(w).isInserterOpened(),isListViewOpen:x(),listViewShortcut:B("core/editor/toggle-list-view"),inserterSidebarToggleRef:R(),listViewToggleRef:F(),showIconLabels:S("core","showIconLabels"),isDistractionFree:S("core","distractionFree"),isVisualMode:T()==="visual"}},[]),f=_=>{i&&_.preventDefault()},m=(0,RJ.useViewportMatch)("wide"),h=(0,Tm.__)("Document tools"),g=(0,L4.useCallback)(()=>o(!a),[o,a]),v=(0,L4.useCallback)(()=>r(!i),[i,r]),y=(0,Tm._x)("Block Inserter","Generic label for block inserter button"),b=i?(0,Tm.__)("Close"):(0,Tm.__)("Add");return(0,fa.jsx)(AJ.NavigableToolbar,{className:re("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,fa.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,fa.jsx)(Eg.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:Pl,label:d?b:y,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,fa.jsxs)(fa.Fragment,{children:[(0,fa.jsx)(Eg.ToolbarItem,{as:_C,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,fa.jsx)(Eg.ToolbarItem,{as:yC,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,fa.jsx)(Eg.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:Iv,disabled:t,isPressed:a,label:(0,Tm.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":a,ref:u})]})]})})}var NJ=ike;var A0=s(A(),1);var ud=s(C(),1),V4={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},ske={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function ak({className:e,toolbar:t,center:r,settings:o}){let n=CJ();return(0,ud.jsxs)("div",{className:re("editor-header edit-post-header",e),children:[n&&(0,ud.jsx)(A0.__unstableMotion.div,{className:"editor-header__back-button",variants:ske,transition:{type:"tween"},children:(0,ud.jsx)(nk.Slot,{})}),(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,ud.jsx)(A0.__unstableMotion.div,{variants:V4,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var gr=s(E(),1),Rg=s(O(),1),U4=s(yo(),1);var _s=s(A(),1),Pm=s(lt(),1);var FJ=s(A(),1),O0=s(O(),1),j4=s(E(),1),DJ=s(he(),1),BJ=s(ct(),1),MJ=s(W(),1),LJ=s(Xe(),1);var VJ=s(C(),1);function jJ(){let{createNotice:e}=(0,O0.useDispatch)(BJ.store),{getCurrentPostId:t,getCurrentPostType:r}=(0,O0.useSelect)(w),{getEditedEntityRecord:o}=(0,O0.useSelect)(MJ.store);function n(){let l=o("postType",r(),t());if(!l)return"";if(typeof l.content=="function")return l.content(l);if(l.blocks)return(0,LJ.__unstableSerializeAndClean)(l.blocks);if(l.content)return l.content}function i(){e("info",(0,j4.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let a=(0,DJ.useCopyToClipboard)(n,i);return(0,VJ.jsx)(FJ.MenuItem,{ref:a,children:(0,j4.__)("Copy all blocks")})}var I0=s(E(),1),lk=s(A(),1),ck=s(O(),1),zJ=s(Oi(),1);var z4=s(C(),1),ake=[{value:"visual",label:(0,I0.__)("Visual editor")},{value:"text",label:(0,I0.__)("Code editor")}];function lke(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,ck.useSelect)(l=>({shortcut:l(zJ.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(w).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(w).getEditorSettings().codeEditingEnabled,mode:l(w).getEditorMode()}),[]),{switchEditorMode:n}=(0,ck.useDispatch)(w),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let a=ake.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,I0.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,z4.jsx)(lk.MenuGroup,{label:(0,I0.__)("Editor"),children:(0,z4.jsx)(lk.MenuItemsChoice,{choices:a,value:i,onSelect:n})})}var UJ=lke;var HJ=s(A(),1),GJ=s(C(),1),{Fill:WJ,Slot:cke}=(0,HJ.createSlotFill)("ToolsMoreMenuGroup");WJ.Slot=({fillProps:e})=>(0,GJ.jsx)(cke,{fillProps:e});var uk=WJ;var YJ=s(A(),1),qJ=s(D(),1),ZJ=s(C(),1),{Fill:KJ,Slot:uke}=(0,YJ.createSlotFill)(qJ.Platform.OS==="web"?Symbol("ViewMoreMenuGroup"):"ViewMoreMenuGroup");KJ.Slot=({fillProps:e})=>(0,ZJ.jsx)(uke,{fillProps:e});var dk=KJ;var vr=s(C(),1);function fk({disabled:e=!1}){let{openModal:t}=(0,Rg.useDispatch)(Ce),{set:r}=(0,Rg.useDispatch)(Pm.store),{toggleDistractionFree:o}=(0,Rg.useDispatch)(w),n=(0,Rg.useSelect)(a=>a(Pm.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,vr.jsx)(vr.Fragment,{children:(0,vr.jsx)(_s.DropdownMenu,{icon:Nr,label:(0,gr.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact",disabled:e},children:({onClose:a})=>(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsxs)(_s.MenuGroup,{label:(0,gr._x)("View","noun"),children:[(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,gr.__)("Top toolbar"),info:(0,gr.__)("Access all block and document tools in a single place"),messageActivated:(0,gr.__)("Top toolbar activated."),messageDeactivated:(0,gr.__)("Top toolbar deactivated.")}),(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,gr.__)("Distraction free"),info:(0,gr.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,gr.__)("Distraction free mode activated."),messageDeactivated:(0,gr.__)("Distraction free mode deactivated."),shortcut:U4.displayShortcut.primaryShift("\\")}),(0,vr.jsx)(Pm.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,gr.__)("Spotlight mode"),info:(0,gr.__)("Focus on one block at a time"),messageActivated:(0,gr.__)("Spotlight mode activated."),messageDeactivated:(0,gr.__)("Spotlight mode deactivated.")}),(0,vr.jsx)(dk.Slot,{fillProps:{onClose:a}})]}),(0,vr.jsx)(UJ,{}),(0,vr.jsx)(rs.Slot,{name:"core/plugin-more-menu",label:(0,gr.__)("Panels"),fillProps:{onClick:a}}),(0,vr.jsxs)(_s.MenuGroup,{label:(0,gr.__)("Tools"),children:[(0,vr.jsx)(_s.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:U4.displayShortcut.access("h"),children:(0,gr.__)("Keyboard shortcuts")}),(0,vr.jsx)(jJ,{}),(0,vr.jsxs)(_s.MenuItem,{icon:Xn,href:(0,gr.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener noreferrer",children:[(0,gr.__)("Help"),(0,vr.jsx)(_s.VisuallyHidden,{as:"span",children:(0,gr.__)("(opens in a new tab)")})]}),(0,vr.jsx)(uk.Slot,{fillProps:{onClose:a}})]}),(0,vr.jsx)(_s.MenuGroup,{children:(0,vr.jsx)(_s.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,gr.__)("Preferences")})})]})})})}var QJ=s(he(),1),mk=s(O(),1);var JJ=s(C(),1),XJ="toggle",H4="button";function $J({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,QJ.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,mk.useDispatch)(w),{hasPublishAction:i,isBeingScheduled:a,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,mk.useSelect)(v=>({hasPublishAction:!!v(w).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:v(w).isEditedPostBeingScheduled(),isPending:v(w).isCurrentPostPending(),isPublished:v(w).isCurrentPostPublished(),isPublishSidebarEnabled:v(w).isPublishSidebarEnabled(),isPublishSidebarOpened:v(w).isPublishSidebarOpened(),isScheduled:v(w).isCurrentPostScheduled(),postStatus:v(w).getEditedPostAttribute("status"),postStatusHasChanged:v(w).getPostEdits()?.status,postType:v(w).getCurrentPostType()}),[]);return g===ur||c||h&&!["future","publish"].includes(m)||f&&a||l&&!i&&!o?r=H4:o||u?r=XJ:r=H4,(0,JJ.jsx)(eg,{forceIsDirty:e,isOpen:d,isToggle:r===XJ,onToggle:n,setEntitiesSavedStatesCallback:t})}var e$=s(E(),1),t$=s(A(),1);var r$=s(W(),1),o$=s(O(),1),n$=s(lt(),1);var i$=s(C(),1);function s$(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,o$.useSelect)(i=>{let a=i(w).getCurrentPostType(),l=i(r$.store).getPostType(a),{get:c}=i(n$.store);return{permalink:i(w).getPermalink(),isPublished:i(w).isCurrentPostPublished(),label:l?.labels.view_item,hasLoaded:!!l,showIconLabels:c("core","showIconLabels")}},[]);return!r||!t||!e?null:(0,i$.jsx)(t$.Button,{icon:Xn,label:o||(0,e$.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var a$=s(he(),1),un=s(A(),1),ma=s(E(),1);var N0=s(O(),1),l$=s(W(),1),c$=s(lt(),1);var u$=s($(),1);var ao=s(C(),1);function d$({forceIsAutosaveable:e,disabled:t}){let{deviceType:r,homeUrl:o,isTemplate:n,isViewable:i,showIconLabels:a,isTemplateHidden:l,templateId:c}=(0,N0.useSelect)(x=>{let{getDeviceType:T,getCurrentPostType:R,getCurrentTemplateId:F,getRenderingMode:B}=x(w),{getEntityRecord:z,getPostType:L}=x(l$.store),{get:M}=x(c$.store),k=R();return{deviceType:T(),homeUrl:z("root","__unstableBase")?.home,isTemplate:k==="wp_template",isViewable:L(k)?.viewable??!1,showIconLabels:M("core","showIconLabels"),isTemplateHidden:B()==="post-only",templateId:F()}},[]),{setDeviceType:u,setRenderingMode:d,setDefaultRenderingMode:f}=N((0,N0.useDispatch)(w)),{resetZoomLevel:m}=N((0,N0.useDispatch)(u$.store)),h=x=>{u(x),m()};if((0,a$.useViewportMatch)("medium","<"))return null;let v={placement:"bottom-end"},y={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!a,disabled:t,accessibleWhenDisabled:t},b={"aria-label":(0,ma.__)("View options")},_={desktop:J1,mobile:Ym,tablet:US},S=[{value:"Desktop",label:(0,ma.__)("Desktop"),icon:J1},{value:"Tablet",label:(0,ma.__)("Tablet"),icon:US},{value:"Mobile",label:(0,ma.__)("Mobile"),icon:Ym}];return(0,ao.jsx)(un.DropdownMenu,{className:re("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`),popoverProps:v,toggleProps:y,menuProps:b,icon:_[r.toLowerCase()],label:(0,ma.__)("View"),disableOpenOnArrowDown:t,children:({onClose:x})=>(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(un.MenuItemsChoice,{choices:S,value:r,onSelect:h})}),n&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsxs)(un.MenuItem,{href:o,target:"_blank",icon:Xn,onClick:x,children:[(0,ma.__)("View site"),(0,ao.jsx)(un.VisuallyHidden,{as:"span",children:(0,ma.__)("(opens in a new tab)")})]})}),!n&&!!c&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(un.MenuItem,{icon:l?void 0:Pi,isSelected:!l,role:"menuitemcheckbox",onClick:()=>{let T=l?"template-locked":"post-only";d(T),f(T),m()},children:(0,ma.__)("Show template")})}),i&&(0,ao.jsx)(un.MenuGroup,{children:(0,ao.jsx)(od,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,ma.__)("Preview in new tab"),textContent:(0,ao.jsxs)(ao.Fragment,{children:[(0,ma.__)("Preview in new tab"),(0,ao.jsx)(un.Icon,{icon:Xn})]}),onPreview:x})}),(0,ao.jsx)(rs.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:x}})]})})}var f$=s(A(),1),G4=s(E(),1),m$=s(D(),1),F0=s(O(),1),W4=s($(),1);var Y4=s(lt(),1),pk=s(Oi(),1),p$=s(yo(),1);var h$=s(C(),1),dke=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,F0.useSelect)(u=>({isZoomOut:N(u(W4.store)).isZoomOut(),showIconLabels:u(Y4.store).get("core","showIconLabels"),isDistractionFree:u(Y4.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=N((0,F0.useDispatch)(W4.store)),{registerShortcut:a,unregisterShortcut:l}=(0,F0.useDispatch)(pk.store);return(0,m$.useEffect)(()=>(a({name:"core/editor/zoom",category:"global",description:(0,G4.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,p$.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[a,l]),(0,pk.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,h$.jsx)(f$.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:jA,label:(0,G4.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},g$=dke;var Z$=s(A(),1),Dg=s(D(),1),K$=s(W(),1),Rk=s(E(),1);var hk=s(A(),1),b$=s(D(),1);var Ag=s(D(),1);function v$(e){let[t,r]=(0,Ag.useState)(e),[o,n]=(0,Ag.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,Ag.useCallback)(()=>n("loaded"),[]),a=(0,Ag.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:a}}var Oc=s(C(),1);uw([Xw]);var y$="#1e1e1e",fke="#fff";function mke({className:e,src:t,name:r,label:o,variant:n,size:i="default",borderColor:a,dimmed:l=!1,statusIndicator:c,style:u,...d}){let{status:f,handleLoad:m,handleError:h}=v$(t),g=f==="loaded",v=n==="badge"&&!!r,y=r?r.split(/\s+/).slice(0,2).map(x=>x[0]).join("").toUpperCase():void 0,b=(0,b$.useMemo)(()=>a&&xr(a).isReadable(y$,{level:"AA",size:"normal"})?y$:fke,[a]),_={...u,...a?{"--editor-avatar-outline-color":a,"--editor-avatar-name-color":b}:{}},S=(0,Oc.jsxs)("div",{className:re("editor-avatar",e,{"has-avatar-border-color":!!a,"has-src":g,"is-badge":v,"is-small":i==="small","is-dimmed":l}),style:_,role:r?"img":void 0,"aria-label":r||void 0,...d,children:[(0,Oc.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,Oc.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&y]}),l&&!!c&&(0,Oc.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,Oc.jsx)(hk.Icon,{icon:c})}),v&&(0,Oc.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,Oc.jsx)(hk.Tooltip,{text:r,children:S}):S}var Ic=mke;var S$=s(D(),1),gk=s(E(),1),vk=s(C(),1);function pke({className:e,max:t=3,children:r,...o}){let n=S$.Children.toArray(r),i=n.slice(0,t),a=n.length-t;return(0,vk.jsxs)("div",{role:"group",className:re("editor-avatar-group",e),...o,children:[i,a>0&&(0,vk.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,gk.sprintf)((0,gk._n)("%d more collaborator","%d more collaborators",a),a),children:`+${a}`})]})}var q4=pke;var D0=s(E(),1),yk=s(A(),1);var T$=s(Xm(),1);function Nc(e){return e?.["48"]||e?.["96"]||e?.["24"]}var w$=s(E(),1);function x$(e){return e.trim()}function Og(){}var _$=["#C36EFF","#FF51A8","#E4780A","#FF35EE","#879F11","#46A494","#00A2C3"];function ws(e){return _$[e%_$.length]}function C$(e,t=10){if(!e)return"";let r=(0,w$._x)("words","Word count type. Do not translate!"),o=e.trim(),n="";if(r==="words")n=o.split(" ",t).join(" ");else if(r==="characters_excluding_spaces"){let a=o.split("",t).join(""),l=a.length-a.replaceAll(" ","").length;n=o.split("",t+l).join("")}else r==="characters_including_spaces"&&(n=o.split("",t).join(""));return n!==o?n+"\u2026":n}function dn(e,t,r){if(!t)return;let o=e&&e!=="new"?`[role=treeitem][id="comment-thread-${e}"]`:"[role=treeitem]:not([id])",n=r?`${o} ${r}`:o;return new Promise(i=>{if(t.querySelector(n))return i(t.querySelector(n));let a=null,l=new window.MutationObserver(()=>{t.querySelector(n)&&(clearTimeout(a),l.disconnect(),i(t.querySelector(n)))});l.observe(t,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),i(null)},3e3)}).then(i=>i?.focus())}var fi=s(C(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='9537a5e604']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","9537a5e604"),e.appendChild(document.createTextNode(".editor-collaborators-presence__list.components-popover .components-popover__content{background:#fff;border:1px solid #ddd;border-radius:8px;border-width:1px 0 0 1px;box-shadow:0 1px 2px #0000000d,0 2px 3px #0000000a,0 6px 6px #00000008,0 8px 8px #00000005}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-content{min-width:280px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header{align-items:center;display:flex;justify-content:space-between;padding:8px 16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title{display:flex;font-size:13px;font-weight:499;gap:4px;line-height:20px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-title span{color:#757575}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action{padding:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-header-action button{color:#1e1e1e;height:32px;padding:0;width:32px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-items{display:flex;flex-direction:column;padding-bottom:16px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item{all:unset;align-items:center;box-sizing:border-box;cursor:pointer;display:flex;gap:8px;padding:12px 16px;transition:background-color .2s ease;width:100%}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:hover:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.04)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:active:not(:disabled){background-color:rgba(var(--wp-admin-theme-color--rgb),.08)}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:focus-visible{outline:2px solid var(--wp-admin-theme-color,#3858e9);outline-offset:-2px}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item:disabled{cursor:default}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-info{display:flex;flex:1;flex-direction:column;min-width:0}.editor-collaborators-presence__list.components-popover .editor-collaborators-presence__list-item-name{color:#1e1e1e;font-size:13px;font-weight:499;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")),document.head.appendChild(e)}function P$({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,T$.speak)((0,D0.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,fi.jsx)(yk.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,fi.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,D0.__)("Collaborators"),(0,fi.jsx)("span",{children:e.length})]}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,fi.jsx)(yk.Button,{__next40pxDefaultSize:!0,icon:Kn,iconSize:24,label:(0,D0.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let a=i.isMe;return(0,fi.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:a,onClick:()=>n(i.clientId),children:[(0,fi.jsx)(Ic,{src:Nc(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:a?"var(--wp-admin-theme-color)":ws(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,fi.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:a?(0,D0.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function hke(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function k$(){let e=new Map;return{registerCursor(t,r){e.set(t,r)},unregisterCursor(t){e.delete(t)},scrollToCursor(t,r){let o=e.get(t);return o?(o.scrollIntoView({behavior:r?.behavior??"smooth",block:r?.block??"center",inline:r?.inline??"nearest"}),r?.highlightDuration&&hke(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var q$=s($(),1);var kk=s(he(),1),pa=s(D(),1),W$=s(E(),1);var bk="0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",Z4="9999px",K4="32px",X4="24px",Sk="4px",_k="8px",Q4="1px",E$="2px",dd="#fff",R$="11px",A$="13px",J4="499",O$="20px";var I$=`
.editor-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	border-radius: ${Z4};
	flex-shrink: 0;
	box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd}, ${bk};
}
.editor-avatar__image {
	box-sizing: border-box;
	position: relative;
	width: ${K4};
	height: ${K4};
	border-radius: ${Z4};
	border: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	overflow: hidden;
	overflow: clip;
	flex-shrink: 0;
	font-size: 0;
	color: ${dd};
}
.is-small > .editor-avatar__image {
	width: ${X4};
	height: ${X4};
}
.has-avatar-border-color > .editor-avatar__image {
	border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
	background-clip: padding-box;
}
.has-avatar-border-color > .editor-avatar__image::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${dd};
	pointer-events: none;
	z-index: 1;
}
.editor-avatar__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	opacity: 0;
}
.has-src > .editor-avatar__image > .editor-avatar__img {
	opacity: 1;
}
.editor-avatar:not(.has-src) > .editor-avatar__image {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: ${R$};
	font-weight: ${J4};
	border: 0;
	background-clip: border-box;
}
.editor-avatar:not(.has-src) > .editor-avatar__image::after {
	content: none;
}
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
	background-color: var(--editor-avatar-outline-color);
}
.editor-avatar__name {
	font-size: ${A$};
	font-weight: ${J4};
	line-height: ${O$};
	color: var(--editor-avatar-name-color, ${dd});
	min-width: 0;
	padding-bottom: 2px; /* $grid-unit-05 / 2 */
	overflow: hidden;
	opacity: 0;
	white-space: nowrap;
	transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge {
	display: inline-grid;
	grid-template-columns: min-content 0fr;
	column-gap: 0;
	padding-inline-end: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	transition:
		grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge:hover {
	grid-template-columns: min-content 1fr;
	column-gap: ${Sk};
	padding-inline-end: ${_k};
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge:hover .editor-avatar__name {
	opacity: 1;
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge.has-avatar-border-color {
	background-color: var(--editor-avatar-outline-color);
}
@media (prefers-reduced-motion: reduce) {
	.editor-avatar.is-badge,
	.editor-avatar__name {
		transition: none;
	}
}
`;var N$=`
.block-canvas-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20000;
}
.block-canvas-cover .collaborators-overlay-full {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.block-canvas-cover .collaborators-overlay-fixed {
	position: fixed;
	width: 100%;
	height: 100%;
}
.collaborators-overlay-user {
	position: absolute;
}
/* Cursor lines render below avatar labels across all users. The parent
   .collaborators-overlay-user has no z-index so it does not create a
   stacking context \u2014 children participate in the shared overlay context. */
.collaborators-overlay-user-cursor {
	position: absolute;
	z-index: 0;
	width: ${E$};
	border-radius: ${Q4};
	outline: ${Q4} solid ${dd};
	box-shadow: ${bk};
	animation: collaborators-overlay-cursor-blink 1s infinite;
}
.collaborators-overlay-selection-rect {
	position: absolute;
	opacity: 0.15;
	pointer-events: none;
	border-radius: 2px;
}

/* Overlay-specific positioning applied to the Avatar cursor label. */
.collaborators-overlay-user-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translate(-11px, -100%);
	margin-top: -${Sk};
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}
/* Avatar positioned above a highlighted block as a label. */
.collaborators-overlay-block-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translateY(calc(-100% - ${_k}));
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}

@keyframes collaborators-overlay-cursor-blink {
	0%, 45% { opacity: 1; }
	55%, 95% { opacity: 0; }
	100% { opacity: 1; }
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
	animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
	animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
}
@keyframes collaborators-overlay-cursor-highlight {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: scale(1.2);
		filter: drop-shadow(0 0 8px currentColor);
	}
}
@keyframes collaborators-overlay-label-highlight {
	0%, 100% {
		transform: translate(-11px, -100%) scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: translate(-11px, -100%) scale(1.1);
		filter: drop-shadow(0 0 6px currentColor);
	}
}
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
	content: "";
	position: absolute;
	pointer-events: none;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	outline-color: var(--collaborator-outline-color);
	outline-style: solid;
	outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${dd}, 0.7);
	z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
	.collaborators-overlay-user-label,
	.collaborators-overlay-user-cursor {
		animation: none;
	}
}
`;function F$(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var eN=s(W(),1),Ng=s(D(),1);var Ig=s(D(),1);function wk(e){let[t,r]=(0,Ig.useState)(0),o=(0,Ig.useRef)(null),n=(0,Ig.useCallback)(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(i=>i+1)},e),()=>{o.current&&clearTimeout(o.current)}),[e]);return[t,n]}var{useActiveCollaborators:gke,useResolvedSelection:vke}=N(eN.privateApis),{SelectionType:yke}=N(eN.privateApis);function D$(e,t,r,o,n){let i=(0,Ng.useRef)(new Set),a=gke(r??null,o??null),l=vke(r??null,o??null),[c,u]=(0,Ng.useState)([]),[d,f]=wk(n);return(0,Ng.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=a.filter(_=>{let S=_.editorState?.selection?.type===yke.WholeBlock;return!_.isMe&&S}).map(_=>{let S;try{({localClientId:S}=l(_.editorState?.selection))}catch{return null}return S?{blockId:S,color:_.isMe?"var(--wp-admin-theme-color)":ws(_.collaboratorInfo.id),userName:_.collaboratorInfo.name,avatarUrl:Nc(_.collaboratorInfo.avatar_urls)}:null}).filter(_=>!_||h.has(_.blockId)?!1:(h.add(_.blockId),!0)),v=new Set(g.map(_=>_.blockId));for(let _ of m)if(!v.has(_)){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color")),m.delete(_)}let y=[],b=e?.getBoundingClientRect()??null;return g.forEach(_=>{let{color:S,blockId:x,userName:T,avatarUrl:R}=_,F=$4(t,x);if(F&&(F.classList.add("is-collaborator-selected"),F.style.setProperty("--collaborator-outline-color",S),m.add(x),b)){let B=F.getBoundingClientRect();y.push({blockId:x,userName:T,avatarUrl:R,color:S,x:B.left-b.left,y:B.top-b.top})}}),u(y),()=>{for(let _ of m){let S=$4(t,_);S&&(S.classList.remove("is-collaborator-selected"),S.style.removeProperty("--collaborator-outline-color"))}m.clear()}},[a,t,e,d,l]),{highlights:c,rerenderHighlightsAfterDelay:f}}var $4=(e,t)=>e.querySelector(`[data-block="${t}"]`);var rN=s(W(),1),z$=s(O(),1),Pk=s(D(),1),U$=s(lt(),1);var V$=s(W(),1);var bke=500,xk=(e,t,r,o)=>e===null||!t?null:Ske(t,e,r,o)??null,Ske=(e,t,r,o)=>{let{node:n,offset:i}=tN(e,t,r),a=r.createRange();try{a.setStart(n,i)}catch{return null}a.collapse(!0);let l=a.getBoundingClientRect(),c=e.getBoundingClientRect(),u=0,d=0;l.x===0&&l.y===0&&l.width===0&&l.height===0?(u=c.left-o.left,d=c.top-o.top):(u=l.left-o.left,d=l.top-o.top);let f=l.height;if(f===0){let m=r.defaultView??window;f=parseInt(m.getComputedStyle(e).lineHeight,10)||c.height}return{x:u,y:d,height:f}},Ck=(e,t,r,o,n)=>{let i=t,a=r;i>a&&([i,a]=[a,i]);let l=tN(e,i,o),c=tN(e,a,o),u=o.createRange();try{u.setStart(l.node,l.offset),u.setEnd(c.node,c.offset)}catch{return null}let d=u.getClientRects(),f=[];for(let m of d){if(m.width===0&&m.height===0)continue;let h=m.left-n.left,g=m.top-n.top;f.some(y=>y.x===h&&y.y===g&&y.width===m.width&&y.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},B$=(e,t,r)=>{let o=t.createRange();o.selectNodeContents(e);let n=o.getClientRects(),i=[];for(let a of n)a.width===0&&a.height===0||i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height});if(i.length===0){let a=e.getBoundingClientRect();a.width>0&&a.height>0&&i.push({x:a.left-r.left,y:a.top-r.top,width:a.width,height:a.height})}return i},M$=(e,t,r)=>{let o=r.querySelectorAll("[data-block]"),n=-1,i=-1;for(let l=0;l<o.length;l++){let c=o[l].getAttribute("data-block");c===e&&(n=l),c===t&&(i=l)}if(n===-1||i===-1)return[];n>i&&([n,i]=[i,n]);let a=[];for(let l=n+1;l<i;l++)a.push(o[l]);return a},tN=(e,t,r)=>{let o=r.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT),n=0,i=null,a=null,l=1;for(;a=o.nextNode();){if(l++,l>bke)return i?{node:i,offset:0}:{node:e,offset:0};let c=a.nodeValue?.length??0;if(a.nodeType===Node.ELEMENT_NODE)if(a.nodeName==="BR"){if(n+1>=t){let u=o.nextNode();return u?.nodeType===Node.TEXT_NODE?{node:u,offset:0}:i?{node:i,offset:i.nodeValue?.length??0}:{node:e,offset:0}}n+=1;continue}else continue;if(c!==0){if(n+c>=t)return{node:a,offset:t-n};n+=c,a.nodeType===Node.TEXT_NODE&&(i=a)}}return i&&i.nodeValue?.length?{node:i,offset:i.nodeValue.length}:{node:e,offset:0}},L$=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:_ke,SelectionType:Tk}=N(V$.privateApis);function j$(e,t,r,o){return e.type===Tk.None||e.type===Tk.WholeBlock?{}:e.type===Tk.Cursor?wke(t,o):r?xke(e,t,r,o):{}}function wke(e,t){if(!e.localClientId)return{};let r=t.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return{coords:xk(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function xke(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===_ke.Backward?t:r,a,l=null;if(e.type===Tk.SelectionInOneBlock){let u=Cke(t,r,o);a=u.rects,l=u.blockElement}else{let u=Tke(t,r,o);a=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(a.length>0)return{coords:xk(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:a};let c=o.editorDocument.querySelector(`[data-block="${t.localClientId}"]`);return{coords:xk(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function Cke(e,t,r){let o=r.editorDocument.querySelector(`[data-block="${e.localClientId}"]`);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:Ck(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function Tke(e,t,r){let o=e,n=t,i=r.editorDocument.querySelector(`[data-block="${o.localClientId}"]`),a=r.editorDocument.querySelector(`[data-block="${n.localClientId}"]`);if(i&&a&&L$(a,i)&&(o=t,n=e,[i,a]=[a,i]),!i||!a||o.richTextOffset===null||n.richTextOffset===null||!o.localClientId||!n.localClientId)return{rects:[],firstBlock:null,lastBlock:null,firstBlockClientId:null};let l=[],c=Ck(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=M$(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=B$(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=Ck(a,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:a,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:Pke,useResolvedSelection:kke}=N(rN.privateApis),{SelectionType:Fg}=N(rN.privateApis);function H$(e,t,r,o,n){let i=Pke(r??null,o??null),a=kke(r??null,o??null),l=(0,z$.useSelect)(m=>m(U$.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,Pk.useState)([]),[d,f]=wk(n);return(0,Pk.useEffect)(()=>{if(!e||!t){u([]);return}let m=e.getBoundingClientRect(),h={editorDocument:t,overlayRect:m},g=[],v=i.some(y=>!y.isMe);i.forEach(y=>{if(y.isMe&&(!l||!v))return;let b=y.editorState?.selection??{type:Fg.None},_={richTextOffset:null,localClientId:null},S;if(b.type===Fg.Cursor)try{_=a(b)}catch{return}else if(b.type===Fg.SelectionInOneBlock||b.type===Fg.SelectionInMultipleBlocks)try{_=a({type:Fg.Cursor,cursorPosition:b.cursorStartPosition}),S=a({type:Fg.Cursor,cursorPosition:b.cursorEndPosition})}catch{return}let x=y.collaboratorInfo.name,T=y.clientId,R=y.isMe?"var(--wp-admin-theme-color)":ws(y.collaboratorInfo.id),F=Nc(y.collaboratorInfo.avatar_urls),B=j$(b,_,S,h);if(B.coords){let z={userName:x,clientId:T,color:R,avatarUrl:F,isMe:y.isMe,...B.coords};B.selectionRects&&(z.selectionRects=B.selectionRects),g.push(z)}}),u(g)},[t,a,e,i,l,d]),{cursors:c,rerenderCursorsAfterDelay:f}}var $a=s(C(),1),G$=500,Eke=1e4;function Y$({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,pa.useState)(null),{cursors:a,rerenderCursorsAfterDelay:l}=H$(n,e??null,t??null,r??null,G$),{highlights:c,rerenderHighlightsAfterDelay:u}=D$(n,e??null,t??null,r??null,G$),d=(0,pa.useCallback)(()=>{l(),u()},[l,u]),f=(0,kk.useResizeObserver)(d);(0,pa.useEffect)(()=>{let v=l(),y=u();return()=>{v(),y()}},[l,u]),(0,pa.useEffect)(()=>{if(a.length!==0)return F$(l,Eke)},[a.length,l]);let m=(0,kk.useMergeRefs)([i,f]),h=(0,pa.useRef)(new Map);(0,pa.useEffect)(()=>{if(!o)return;let v=h.current,y=new Set(a.map(b=>b.clientId));for(let b of v.keys())y.has(b)||(o.unregisterCursor(b),v.delete(b));for(let[b,_]of v.entries())o.registerCursor(b,_);return()=>o.removeAll()},[a,o]);let g=(0,pa.useCallback)(v=>y=>{y?h.current.set(v,y):h.current.delete(v)},[]);return(0,$a.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,$a.jsx)("style",{children:I$+N$}),a.map(v=>(0,$a.jsxs)("div",{children:[v.selectionRects?.map((y,b)=>(0,$a.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${y.x}px`,top:`${y.y}px`,width:`${y.width}px`,height:`${y.height}px`,backgroundColor:v.color}},`${v.clientId}-sel-${b}`)),(0,$a.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,$a.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,$a.jsx)(Ic,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,W$.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,$a.jsx)(Ic,{className:"collaborators-overlay-block-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,borderColor:v.color,style:{left:`${v.x}px`,top:`${v.y}px`}},v.blockId))]})}var oN=s(C(),1),{BlockCanvasCover:Rke}=N(q$.privateApis);function Ek({postId:e,postType:t,cursorRegistry:r}){return(0,oN.jsx)(Rke.Fill,{children:({containerRef:o})=>(0,oN.jsx)(Y$,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var xs=s(C(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='eee1778bc0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","eee1778bc0"),e.appendChild(document.createTextNode(".editor-collaborators-presence{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;flex-shrink:0;height:32px;margin-right:8px}.editor-collaborators-presence:has(.is-pressed),.editor-collaborators-presence:hover{background-color:#e0e0e0}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button{align-items:center;background:#0000;border-radius:4px;box-sizing:border-box;color:#2f2f2f;cursor:pointer;display:flex;height:100%;padding:4px;position:relative}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button.is-pressed:hover,.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:hover{background:#0000;color:#2f2f2f}.editor-collaborators-presence__button.editor-collaborators-presence__button.components-button:focus:not(:active){box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus,2px) var(--wp-admin-theme-color,#007cba);outline:none}")),document.head.appendChild(e)}var{useActiveCollaborators:Ake}=N(K$.privateApis);function X$({postId:e,postType:t}){let r=Ake(e,t),o=r.filter(f=>!f.isMe),n=(0,Dg.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,Dg.useState)(k$),[a,l]=(0,Dg.useState)(!1),[c,u]=(0,Dg.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,xs.jsxs)(xs.Fragment,{children:[(0,xs.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,xs.jsx)(Z$.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!a),isPressed:a,ref:u,"aria-label":(0,Rk.sprintf)((0,Rk.__)("Collaborators list, %d online"),n.length),children:(0,xs.jsxs)(q4,{max:4,children:[d&&(0,xs.jsx)(Ic,{src:Nc(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,xs.jsx)(Ic,{src:Nc(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:ws(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),a&&(0,xs.jsx)(P$,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,xs.jsx)(Ek,{postId:e,postType:t,cursorRegistry:i})]})}var Er=s(C(),1);function Oke({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,B0.useViewportMatch)("large"),n=(0,B0.useViewportMatch)("medium"),i=(0,B0.useMediaQuery)("(max-width: 403px)"),{postId:a,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g,isAttachment:v}=(0,J$.useSelect)(T=>{let{get:R}=T($$.store),{getEditorMode:F,getCurrentPostType:B,getCurrentPostId:z,isPublishSidebarOpened:L}=T(w),{getStylesPath:M,getShowStylebook:k}=N(T(w)),{getBlockSelectionStart:I,getSectionRootClientId:U}=N(T(Q$.store));return{postId:z(),postType:B(),isTextEditor:F()==="text",isPublishSidebarOpened:L(),showIconLabels:R("core","showIconLabels"),hasFixedToolbar:R("core","fixedToolbar"),hasBlockSelection:!!I(),hasSectionRootClientId:!!U(),isStylesCanvasActive:!!M()?.startsWith("/revisions")||k(),isAttachment:B()===ur&&window?.__experimentalMediaEditor}},[]),y=["post","page","wp_template"].includes(l)&&h,b=[ur,jd,Ur,qi].includes(l)||g,[_,S]=(0,eee.useState)(!0);return(0,Er.jsx)(ak,{toolbar:(0,Er.jsxs)(Er.Fragment,{children:[!v&&(0,Er.jsx)(NJ,{disableBlockTools:g||c}),f&&n&&(0,Er.jsx)(EJ,{isCollapsed:_,onToggle:S})]}),center:!i&&(!f||f&&(!m||_))?(0,Er.jsxs)(Er.Fragment,{children:[(0,Er.jsx)(X$,{postType:l,postId:a}),(0,Er.jsx)(fC,{})]}):void 0,settings:(0,Er.jsxs)(Er.Fragment,{children:[!e&&!u&&(0,Er.jsx)(pP,{forceIsDirty:t}),(0,Er.jsx)(s$,{}),(0,Er.jsx)(d$,{forceIsAutosaveable:t,disabled:b}),(0,Er.jsx)(od,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&y&&(0,Er.jsx)(g$,{disabled:g}),(o||!d)&&(0,Er.jsx)(zp.Slot,{scope:"core"}),!e&&(0,Er.jsx)($J,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,!v&&(0,Er.jsx)(fk,{})]})})}var tee=Oke;var M0=s(O(),1),Ok=s($(),1),ree=s(he(),1),L0=s(D(),1),oee=s(lt(),1),nee=s(yo(),1);var Ak=s(C(),1),{PrivateInserterLibrary:Ike}=N(Ok.privateApis);function iee(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,M0.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=N(m(w)),{getBlockRootClientId:y,isZoomOut:b,getSectionRootClientId:_}=N(m(Ok.store)),{get:S}=m(oee.store),{getActiveComplementaryArea:x}=m(Ce),T=()=>{if(b()){let R=_();if(R)return R}return y()};return{inserterSidebarToggleRef:h(),inserter:g(),showMostUsedBlocks:S("core","mostUsedBlocks"),blockSectionRootClientId:T(),sidebarIsOpened:!!(x("core")||v())}},[]),{setIsInserterOpened:i}=(0,M0.useDispatch)(w),{disableComplementaryArea:a}=(0,M0.useDispatch)(Ce),l=(0,ree.useViewportMatch)("medium","<"),c=(0,L0.useRef)(),u=(0,L0.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,L0.useCallback)(m=>{m.keyCode===nee.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,Ak.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,Ak.jsx)(Ike,{showMostUsedBlocks:o,showInserterHelpPanel:!0,shouldFocusBlock:l,rootClientId:e??r.rootClientId,__experimentalInsertionIndex:r.insertionIndex,onSelect:r.onSelect,__experimentalInitialTab:r.tab,__experimentalInitialCategory:r.category,__experimentalFilterValue:r.filterValue,onPatternCategorySelection:n?()=>a("core"):void 0,ref:c,onClose:u})});return(0,Ak.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var Nk=s($(),1),Fk=s(he(),1),Dk=s(O(),1),nN=s(xh(),1),ha=s(D(),1),j0=s(E(),1),aee=s(Oi(),1),lee=s(yo(),1);var V0=s(A(),1),Ik=s(E(),1);var Ho=s(C(),1);function see(){return(0,Ho.jsxs)(Ho.Fragment,{children:[(0,Ho.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Characters:")}),(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ho.jsx)(wg,{})})]}),(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Words:")}),(0,Ho.jsx)(Sg,{})]}),(0,Ho.jsxs)("div",{children:[(0,Ho.jsx)(V0.__experimentalText,{children:(0,Ik.__)("Time to read:")}),(0,Ho.jsx)(_g,{})]})]}),(0,Ho.jsx)(Ah,{})]})}var fd=s(C(),1),{TabbedSidebar:Nke}=N(Nk.privateApis);function cee(){let{setIsListViewOpened:e}=(0,Dk.useDispatch)(w),{getListViewToggleRef:t}=N((0,Dk.useSelect)(w)),r=(0,Fk.useFocusOnMount)("firstElement"),o=(0,ha.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,ha.useCallback)(v=>{v.keyCode===lee.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,a]=(0,ha.useState)(null),[l,c]=(0,ha.useState)("list-view"),u=(0,ha.useRef)(),d=(0,ha.useRef)(),f=(0,ha.useRef)(),m=(0,Fk.useMergeRefs)([r,f,a]);function h(v){let y=nN.focus.tabbable.find(d.current)[0];if(v==="list-view"){let b=nN.focus.tabbable.find(f.current)[0];(u.current.contains(b)?b:y).focus()}else y.focus()}let g=(0,ha.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,aee.useShortcut)("core/editor/toggle-list-view",g),(0,fd.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,fd.jsx)(Nke,{tabs:[{name:"list-view",title:(0,j0._x)("List View","Post overview"),panel:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,fd.jsx)(Nk.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,j0._x)("Outline","Post overview"),panel:(0,fd.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,fd.jsx)(see,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,j0.__)("Close")})})}var U0=s(O(),1),z0=s(A(),1);var md=s(E(),1);var Bk=s(O(),1),el=s(A(),1),uee=s(W(),1),Fc=s(E(),1),Mk=s(po(),1),dee=s(D(),1);var ga=s(C(),1);function Fke(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,Bk.useSelect)(_=>{let{getCurrentRevisionId:S,getRevisionPage:x,getPageRevisions:T,getRevisionsPerPage:R}=N(_(w)),F=_(w).getCurrentPostType();if(!F)return{};let z=_(uee.store).getEntityConfig("postType",F)?.revisionKey||"id",L=x();return{revisions:T(L),perPage:R(),currentRevisionId:S(),revisionKey:z,revisionPage:L,totalRevisions:_(w).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:a,setRevisionPage:l}=N((0,Bk.useDispatch)(w)),c=!e,u=Math.ceil(i/t)||1,d=(0,dee.useMemo)(()=>e&&[...e].reverse(),[e]),f=d?.findIndex(_=>_[o]===r),m=_=>{let S=d?.[_];S&&a(S[o])},h=(0,Mk.getSettings)(),g=_=>{let S=d?.[_];return S?(0,Mk.dateI18n)(h.formats.datetime,S.date):_},v=u>1;if(c&&!v)return(0,ga.jsx)(el.Spinner,{});if(!c&&!d?.length)return(0,ga.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Fc.__)("No revisions found.")});if(i<=1)return(0,ga.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,Fc.__)("Only one revision found.")});let y=_=>{let S=i-(_-1)*t,x=Math.max(1,S-t+1);return(0,Fc.sprintf)((0,Fc.__)("Revisions %1$s\u2013%2$s"),x,S)},b=c||f===-1?(0,ga.jsx)(el.Spinner,{}):(0,ga.jsx)(el.RangeControl,{__next40pxDefaultSize:!0,"aria-valuetext":g(f),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,Fc.__)("Revision"),max:d?.length-1,min:0,marks:!0,onChange:m,renderTooltipContent:g,value:f,withInputField:!1});return v?(0,ga.jsxs)(el.__experimentalHStack,{spacing:2,expanded:!0,wrap:!1,children:[(0,ga.jsx)(el.Button,{icon:Nt,label:n<u?y(n+1):(0,Fc.__)("No older revisions"),onClick:()=>l(n+1),disabled:c||n>=u,size:"compact",accessibleWhenDisabled:!0}),(0,ga.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:b}),(0,ga.jsx)(el.Button,{icon:Ft,label:n>1?y(n-1):(0,Fc.__)("No newer revisions"),onClick:()=>l(n-1),disabled:c||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):b}var fee=Fke;var mi={document:"edit-post/document",block:"edit-post/block"};var zi=s(C(),1);function Dke({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,U0.useSelect)(d=>({currentRevisionId:N(d(w)).getCurrentRevisionId(),sidebarIsOpened:!!d(Ce).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=N((0,U0.useDispatch)(w)),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,U0.useDispatch)(Ce),c=!!r,u=()=>{r&&i(r)};return(0,zi.jsx)(ak,{className:"editor-revisions-header",toolbar:(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,size:"compact",icon:Gd,label:(0,md._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,zi.jsx)(fee,{}),settings:(0,zi.jsxs)(zi.Fragment,{children:[(0,zi.jsx)(od,{className:"editor-header__post-preview-button"}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,icon:(0,md.isRTL)()?zd:Ud,label:(0,md._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):a("core",mi.document)},size:"compact"}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,md.__)("Exit")}),(0,zi.jsx)(z0.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,md.__)("Restore")}),(0,zi.jsx)(fk,{disabled:!0})]})})}var iN=Dke;var Gee=s(A(),1),Wee=s($(),1),Yee=s(O(),1),qee=s(D(),1),Zee=s(mo(),1);var fn=s($(),1),Cs=s(D(),1),qk=s(O(),1),dN=s(Xe(),1),Fee=s(W(),1),Zk=s(he(),1);var sN=s(O(),1),mee=s(W(),1),Lk=s(D(),1),aN=s(E(),1),pee=s(A(),1);var hee=s(C(),1);function gee({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,sN.useSelect)(a=>{let{getEditorSettings:l,getCurrentTemplateId:c}=a(w);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,sN.useSelect)(a=>!!a(mee.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,Lk.useState)(!1);return(0,Lk.useEffect)(()=>{let a=c=>{o&&(!c.target.classList.contains("is-root-container")||c.target.dataset?.type==="core/template-part"||c.defaultPrevented||(c.preventDefault(),i(!0)))},l=e.current;return l?.addEventListener("dblclick",a),()=>{l?.removeEventListener("dblclick",a)}},[e,o]),o?(0,hee.jsx)(pee.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,aN.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,aN.__)("You\u2019ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?")}):null}var yee=s(he(),1),Vk=s(O(),1),lN=s($(),1);var Bke=500;function vee(e,t,r){return Math.min(Math.max(e,t),r)}function Mke(e,t,r){let o=e-vee(e,r.left,r.right),n=t-vee(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function bee({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=N((0,Vk.useSelect)(lN.store)),{selectBlock:n}=(0,Vk.useDispatch)(lN.store);return(0,yee.useRefEffect)(i=>{if(!e)return;let a=(c,u)=>{let d=t().flatMap(({clientId:h})=>{let g=r(h);if(g==="core/template-part")return[];if(g==="core/post-content"){let v=o(h);if(v.length)return v}return[h]}),f=1/0,m=null;for(let h of d){let g=i.querySelector(`[data-block="${h}"]`);if(!g)continue;let v=g.getBoundingClientRect(),y=Mke(c,u,v);y<f&&y<Bke&&(f=y,m=h)}m&&n(m)},l=c=>{(c.target===i||c.target.classList.contains("is-root-container"))&&a(c.clientX,c.clientY)};return i.addEventListener("click",l),()=>i.removeEventListener("click",l)},[e])}var jk=s(O(),1),See=s(he(),1),cN=s($(),1);function _ee(){let{getSettings:e,isZoomOut:t}=N((0,jk.useSelect)(cN.store)),{resetZoomLevel:r}=N((0,jk.useDispatch)(cN.store));return(0,See.useRefEffect)(o=>{function n(i){if(t()&&!i.defaultPrevented){i.preventDefault();let{__experimentalSetIsInserterOpened:a}=e();typeof a=="function"&&a(!1),r()}}return o.addEventListener("dblclick",n),()=>{o.removeEventListener("dblclick",n)}},[e,t,r])}var wee=s(O(),1),xee=s(he(),1),zk=s($(),1),Cee=s(Xe(),1),Lke=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function Tee(e){let t=(0,wee.useRegistry)(),r=(0,xee.useRefEffect)(o=>{function n(a){if(a.target!==o&&a.target!==o.parentElement)return;let l=o.lastElementChild;if(!l)return;let c=l.getBoundingClientRect();if(a.clientY<c.bottom)return;a.preventDefault();let u=t.select(zk.store).getBlockOrder(""),d=u[u.length-1],f=t.select(zk.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(zk.store);f&&(0,Cee.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,Lke]:[]}var Uk=s(O(),1),Pee=s(he(),1),uN=s($(),1);function kee(){let{getEditedContentOnlySection:e}=N((0,Uk.useSelect)(uN.store)),{stopEditingContentOnlySection:t}=N((0,Uk.useDispatch)(uN.store));return(0,Pee.useRefEffect)(r=>{function o(n){let i=e();if(!i)return;!n.target.closest(`[data-block="${i}"]`)&&!n.defaultPrevented&&(n.preventDefault(),t())}return r.addEventListener("click",o),()=>{r.removeEventListener("click",o)}},[e,t])}var Hk=s(O(),1),Ree=s(he(),1),Aee=s(Xe(),1),Gk=s(W(),1),Wk=s($(),1),tl=s(A(),1),Oee=s(mo(),1),pd=s(D(),1),ya=s(E(),1);var Bg=s(D(),1);function Eee(e){let[t,r]=(0,Bg.useState)(),o=(0,Bg.useRef)(!1);return(0,Bg.useEffect)(()=>{if(!e)return;if(e.status==="connected"){r(void 0),o.current=!1;return}if(e.status!=="disconnected"||!e.willAutoRetryInMs)return;let{willAutoRetryInMs:n}=e,i=Date.now()+n,a=o.current;o.current=!0,a&&r(0);let l=null,c=()=>{r(Math.ceil((i-Date.now())/1e3)),l=setInterval(()=>{let d=Math.ceil((i-Date.now())/1e3);r(Math.max(0,d)),d<=0&&l&&clearInterval(l)},1e3)},u=a?setTimeout(c,500):null;return u||c(),()=>{u&&clearTimeout(u),l&&clearInterval(l)}},[e]),{onManualRetry:()=>{r(0)},secondsRemaining:t}}var va=s(C(),1),{BlockCanvasCover:Vke}=N(Wk.privateApis),{retrySyncConnection:jke}=N(Gk.privateApis),zke=2e4;function Iee(){let[e,t]=(0,pd.useState)(!1),[r,o]=(0,pd.useState)(!1),[n,i]=(0,pd.useState)(!1),{connectionStatus:a,isCollaborationEnabled:l,postType:c}=(0,Hk.useSelect)(S=>{let{getSyncConnectionStatus:x,getPostType:T}=N(S(Gk.store)),{getCurrentPostType:R,isCollaborationEnabledForCurrentPost:F}=N(S(w)),B=R();return{connectionStatus:x()||null,isCollaborationEnabled:F(),postType:B?T(B):null}},[]),{onManualRetry:u,secondsRemaining:d}=Eee(a),f=(0,Ree.useCopyToClipboard)(()=>{let S=(0,Hk.select)(Wk.store).getBlocks();return(0,Aee.serialize)(S)});(0,pd.useEffect)(()=>{let S=setTimeout(()=>{t(!0)},zke);return()=>clearTimeout(S)},[]),(0,pd.useEffect)(()=>{a?.status!=="connecting"&&i(a!==null&&"canManuallyRetry"in a&&a.canManuallyRetry===!0)},[a]);let m=a&&a.status==="disconnected"&&(a.canManuallyRetry||a.willAutoRetryInMs);if((0,pd.useEffect)(()=>{if(a?.status==="connected"){o(!1);return}a?.status&&a.status!=="connecting"&&(!m||a.backgroundRetriesFailed)&&o(!0)},[a,m]),!l||!e||!r)return null;let h=a&&"error"in a?a?.error:void 0;if(!m&&(0,Oee.applyFilters)("editor.isSyncConnectionErrorHandled",!1,h?.code)!==!1)return null;let g=n?()=>{u(),jke()}:void 0,v=qZ(h),y="",b=!1;d&&d>0?y=(0,ya.sprintf)((0,ya._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(b=!0,y=(0,ya.__)("Retrying\u2026"));let _="edit.php";return c?.slug&&(_=`edit.php?post_type=${c.slug}`),(0,va.jsx)(Vke.Fill,{children:(0,va.jsx)(tl.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:v.title,children:(0,va.jsxs)(tl.__experimentalVStack,{spacing:6,children:[(0,va.jsx)("p",{children:v.description}),y&&(0,va.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:y}),(0,va.jsxs)(tl.__experimentalHStack,{justify:"right",children:[(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,href:_,isDestructive:!0,variant:"tertiary",children:(0,ya.sprintf)((0,ya.__)("Back to %s"),c?.labels?.name??(0,ya.__)("Posts"))}),(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,ref:f,variant:g?"secondary":"primary",children:(0,ya.__)("Copy Post Content")}),g&&(0,va.jsx)(tl.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":b,disabled:b,isBusy:b,variant:"primary",onClick:g,children:(0,ya.__)("Retry")})]})]})})})}var Ao=s(C(),1),{LayoutStyle:Yk,useLayoutClasses:Uke,useLayoutStyles:Hke,ExperimentalBlockCanvas:Gke,useFlashEditableBlocks:Wke}=N(fn.privateApis);function fN(e){for(let t=0;t<e.length;t++){if(e[t].name==="core/post-content")return e[t].attributes;if(e[t].innerBlocks.length){let r=fN(e[t].innerBlocks);if(r)return r}}}function Nee(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function Yke({autoFocus:e,disableIframe:t=!1,iframeProps:r,contentRef:o,className:n}){let i=(0,Zk.useViewportMatch)("small","<"),{renderingMode:a,postContentAttributes:l,editedPostTemplate:c={},wrapperBlockName:u,wrapperUniqueId:d,deviceType:f,isFocusedEntity:m,isDesignPostType:h,postType:g,isPreview:v,styles:y,canvasMinHeight:b}=(0,qk.useSelect)(ze=>{let{getCurrentPostId:Ve,getCurrentPostType:tt,getCurrentTemplateId:vt,getEditorSettings:le,getRenderingMode:J,getDeviceType:ie,getCanvasMinHeight:ee}=N(ze(w)),{getPostType:se,getEditedEntityRecord:Ue}=ze(Fee.store),ke=tt(),Be=J(),Je;ke===qi?Je="core/block":Be==="post-only"&&(Je="core/post-content");let Fe=le(),Se=Fe.supportsTemplateMode,yt=se(ke),Jr=vt(),bn=Jr?Ue("postType",xt,Jr):void 0;return{renderingMode:Be,postContentAttributes:Fe.postContentAttributes,isDesignPostType:Jc.includes(ke),editedPostTemplate:yt?.viewable&&Se?bn:void 0,wrapperBlockName:Je,wrapperUniqueId:Ve(),deviceType:ie(),isFocusedEntity:!!Fe.onNavigateToPreviousEntityRecord,postType:ke,isPreview:Fe.isPreviewMode,styles:Fe.styles,canvasMinHeight:ee()}},[]),{isCleanNewPost:_}=(0,qk.useSelect)(w),{hasRootPaddingAwareAlignments:S,themeHasDisabledLayoutStyles:x,themeSupportsLayout:T,isZoomedOut:R}=(0,qk.useSelect)(ze=>{let{getSettings:Ve,isZoomOut:tt}=N(ze(fn.store)),vt=Ve();return{themeHasDisabledLayoutStyles:vt.disableLayoutStyles,themeSupportsLayout:vt.supportsLayout,hasRootPaddingAwareAlignments:vt.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:tt()}},[]),F=(0,Cs.useRef)(),B=(0,fn.__experimentalUseResizeCanvas)(f),[z]=(0,fn.useSettings)("layout"),L=(0,Cs.useMemo)(()=>a!=="post-only"||h?{type:"default"}:T?{...z,type:"constrained"}:{type:"default"},[a,T,z,h]),M=(0,Cs.useMemo)(()=>{if(!c?.content&&!c?.blocks&&l)return l;if(c?.blocks)return fN(c?.blocks);let ze=typeof c?.content=="string"?c?.content:"";return fN((0,dN.parse)(ze))||{}},[c?.content,c?.blocks,l]),k=(0,Cs.useMemo)(()=>{if(!c?.content&&!c?.blocks)return!1;if(c?.blocks)return Nee(c?.blocks);let ze=typeof c?.content=="string"?c?.content:"";return Nee((0,dN.parse)(ze))||!1},[c?.content,c?.blocks]),{layout:I={},align:U=""}=M||{},G=Uke(M,"core/post-content"),Y=re({"is-layout-flow":!T},T&&G,U&&`align${U}`),Z=Hke(M,"core/post-content",".block-editor-block-list__layout.is-root-container"),V=(0,Cs.useMemo)(()=>I&&(I?.type==="constrained"||I?.inherit||I?.contentSize||I?.wideSize)?{...z,...I,type:"constrained"}:{...z,...I,type:"default"},[I?.type,I?.inherit,I?.contentSize,I?.wideSize,z]),j=l?V:L,H=j?.type==="default"&&!k?L:j,X=(0,fn.__unstableUseTypingObserver)(),ae=(0,Cs.useRef)();(0,Cs.useEffect)(()=>{!e||!_()||ae?.current?.focus()},[e,_]);let ne=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
		.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
		.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
		.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,ue=[jd,Ur,qi].includes(g)&&!v&&!i&&!R,Ye=(0,Cs.useMemo)(()=>{if(!F.current)return b;let{ownerDocument:ze}=F.current,Ve=ze.documentElement.scrollTop||ze.body.scrollTop;return b+Ve},[b]),[ye,oe]=Tee(!v&&a==="post-only"&&!h),ge=(0,Cs.useMemo)(()=>[...y??[],{css:`:where(.block-editor-iframe__body){display:flow-root;${Ye?`min-height:${Ye}px;`:""}}.is-root-container{display:flow-root;${ue?"min-height:0!important;":""}}
				${oe||""}
				${ue?".block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}":""}`}],[y,ue,Ye,oe]),Re=(0,fn.__unstableUseTypewriter)();return o=(0,Zk.useMergeRefs)([F,o,a==="post-only"?Re:null,Wke({isEnabled:a==="template-locked"}),bee({isEnabled:a==="template-locked"}),_ee(),ye,kee()]),(0,Ao.jsxs)("div",{className:re("editor-visual-editor","edit-post-visual-editor",n,{"has-padding":m||ue,"is-resizable":ue,"is-iframed":!t}),children:[(0,Ao.jsx)(Iee,{}),(0,Ao.jsx)(Eh,{enableResizing:ue,height:"100%",children:(0,Ao.jsxs)(Gke,{shouldIframe:!t,contentRef:o,styles:ge,height:"100%",iframeProps:{...r,style:{...r?.style,...B}},children:[T&&!x&&a==="post-only"&&!h&&(0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsx)(Yk,{selector:".editor-visual-editor__post-title-wrapper",layout:L}),(0,Ao.jsx)(Yk,{selector:".block-editor-block-list__layout.is-root-container",layout:H}),U&&(0,Ao.jsx)(Yk,{css:ne}),Z&&(0,Ao.jsx)(Yk,{layout:V,css:Z})]}),a==="post-only"&&!h&&(0,Ao.jsx)("div",{className:re("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":S}),contentEditable:!1,ref:X,style:{marginTop:"4rem"},children:(0,Ao.jsx)(BP,{ref:ae})}),(0,Ao.jsxs)(fn.RecursionProvider,{blockName:u,uniqueId:d,children:[(0,Ao.jsx)(fn.BlockList,{className:re("is-"+f.toLowerCase()+"-preview",a!=="post-only"||h?"wp-site-blocks":`${Y} wp-block-post-content`,{"has-global-padding":a==="post-only"&&!h&&S}),layout:j,dropZoneElement:t?F.current:F.current?.parentNode,__unstableDisableDropZone:a==="template-locked"}),a==="template-locked"&&(0,Ao.jsx)(gee,{contentRef:F})]})]})})]})}var Kk=Yke;var Mg=s(E(),1),Xk=s(Wy(),1),Dee=[{name:"revision/diff-removed",title:(0,Mg.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,Mg.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,Mg.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,Mg.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,Mg.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function Bee(){for(let e of Dee)(0,Xk.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function Mee(){for(let e of Dee)(0,Xk.unregisterFormatType)(e.name)}var Ui=s(D(),1),Qk=s(he(),1),Vee=s(O(),1),Jk=s($(),1),H0=s(E(),1),jee=s(A(),1);var G0=s(C(),1),{useBlockElementRef:qke}=N(Jk.privateApis);function zee(e){let t=[];for(let r of e)r.__revisionDiffStatus?.status&&t.push({clientId:r.clientId,status:r.__revisionDiffStatus.status}),r.innerBlocks?.length&&t.push(...zee(r.innerBlocks));return t}var Lee={added:(0,H0.__)("Go to added block"),removed:(0,H0.__)("Go to removed block"),modified:(0,H0.__)("Go to modified block")};function mN(e){if(!e)return null;let t=e.ownerDocument,r=t.documentElement.scrollHeight,o=e.getBoundingClientRect(),n=t.documentElement.scrollTop;return{top:(o.top+n)/r*100,height:o.height/r*100}}function Zke({clientId:e,status:t,subscribe:r}){let o=(0,Ui.useRef)();qke(e,o);let[n,i]=(0,Ui.useState)(()=>mN(o.current));return(0,Ui.useEffect)(()=>r(()=>{i(mN(o.current))}),[r]),(0,Ui.useEffect)(()=>{i(mN(o.current))},[t]),n?(0,G0.jsx)(jee.Tooltip,{text:Lee[t],children:(0,G0.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":Lee[t]})}):null}function Uee(){let[e,t]=(0,Ui.useState)(!1),r=(0,Ui.useRef)(new Set),o=(0,Vee.useSelect)(l=>l(Jk.store).getBlocks(),[]),n=(0,Ui.useMemo)(()=>zee(o),[o]),i=(0,Ui.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),a=(0,Qk.useRefEffect)(l=>{let{ownerDocument:c}=l,{defaultView:u}=c,d=new u.ResizeObserver(()=>{r.current.forEach(f=>f())});return d.observe(c.body),()=>{d.disconnect()}},[]);return[(0,Qk.useMergeRefs)([a,t]),(0,G0.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,H0.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,G0.jsx)(Zke,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var pi=s(C(),1),{usePrivateStyleOverride:Hee}=N(Wee.privateApis),Kke=`
<svg
	xmlns="http://www.w3.org/2000/svg"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
			<!-- Desaturate and add red tint -->
			<feColorMatrix type="matrix"
				values="0.5 0.3 0.2 0 0.15
				        0.2 0.2 0.1 0 0
				        0.2 0.2 0.1 0 0
				        0   0   0   0.8 0"/>
		</filter>
	</defs>
</svg>
`,Xke=`
	.is-revision-added {
		box-shadow: inset 0 0 0 9999px color-mix(in srgb, currentColor 5%, #00a32a 15%), 0 0 0 4px color-mix(in srgb, currentColor 5%, #00a32a 15%);
	}
	.is-revision-removed,
	.revision-diff-removed {
		text-decoration: line-through;
		filter: url(#revision-removed-filter);
	}
	.is-revision-modified {
		outline: 2px solid color-mix(in srgb, currentColor 30%, #dba617 70%) !important;
		outline-offset: 2px;
	}
	.revision-diff-added {
		background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
		text-decoration: none;
	}
	.revision-diff-format-added {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-removed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-changed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
		text-decoration-thickness: 2px;
	}
`;function Qke(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=re(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,pi.jsx)(e,{...t,className:i})}}var Jke="editor/revisions-canvas/withRevisionDiffClasses";(0,Zee.addFilter)("editor.BlockListBlock",Jke,Qke);function $ke({showDiff:e}){return Hee({css:e?Xke:""}),Hee({assets:e?Kke:"",__unstableType:"svgs"}),null}function e2e({showDiff:e}){let[t,r]=Uee();return(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)(Kk,{contentRef:t}),e&&r]})}function pN(){(0,qee.useEffect)(()=>(Bee(),()=>{Mee()}),[]);let{revision:e,showDiff:t}=(0,Yee.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=N(r(w));return{revision:o(),showDiff:n()}},[]);return e?(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsx)($ke,{showDiff:t}),(0,pi.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,pi.jsx)(e2e,{showDiff:t})})]}):(0,pi.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,pi.jsx)(Gee.Spinner,{})})}var e2=s(O(),1),$k=s(D(),1),Ts=s(E(),1),Kee=s(ct(),1),Xee=s(W(),1),Qee=s(lt(),1);var{useOnCollaboratorJoin:t2e,useOnCollaboratorLeave:r2e,useOnPostSave:o2e}=N(Xee.privateApis),hN={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},gN=["publish","private","future"];function n2e(e,t,r){return r?(0,Ts.sprintf)((0,Ts.__)("Post published by %s."),e):gN.includes(t)?(0,Ts.sprintf)((0,Ts.__)("Post updated by %s."),e):(0,Ts.sprintf)((0,Ts.__)("Draft saved by %s."),e)}function Jee(e,t){let{postStatus:r,isCollaborationEnabled:o,showNotifications:n}=(0,e2.useSelect)(u=>{let{getCurrentPostAttribute:d,isCollaborationEnabledForCurrentPost:f}=N(u(w));return{postStatus:d("status"),isCollaborationEnabled:f(),showNotifications:u(Qee.store).get("core","showCollaborationNotifications")??!0}},[]),{createNotice:i}=(0,e2.useDispatch)(Kee.store),a=o&&n,l=a?e:null,c=a?t:null;t2e(l,c,(0,$k.useCallback)((u,d)=>{d&&u.collaboratorInfo.enteredAt<d.collaboratorInfo.enteredAt||i("info",(0,Ts.sprintf)((0,Ts.__)("%s has joined the post."),u.collaboratorInfo.name),{id:`${hN.COLLAB_USER_ENTERED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),r2e(l,c,(0,$k.useCallback)(u=>{i("info",(0,Ts.sprintf)((0,Ts.__)("%s has left the post."),u.collaboratorInfo.name),{id:`${hN.COLLAB_USER_EXITED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),o2e(l,c,(0,$k.useCallback)((u,d,f)=>{if(!r)return;let m=u.postStatus??r??"draft",h=f?.postStatus??r,g=!(h&&gN.includes(h))&&gN.includes(m),v=n2e(d.collaboratorInfo.name,m,g);i("info",v,{id:`${hN.COLLAB_POST_UPDATED}-${d.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i,r]))}var t2=s(O(),1),W0=s(A(),1),vN=s(E(),1),$ee=s(D(),1);var Ps=s(C(),1),{Fill:ilt,Slot:i2e}=(0,W0.createSlotFill)("ActionsPanel");function ete({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,t2.useDispatch)(w),{publishSidebarOpened:a,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,t2.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:y,hasNonPostEntityChanges:b}=m(w),_=b();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:_||y(),hasOtherEntitiesChanges:_}},[]),d=(0,$ee.useCallback)(()=>e(!0),[]),f;return a?f=(0,Ps.jsx)(oP,{onClose:n,forceIsDirty:o,PrePublishExtension:XC.Slot,PostPublishExtension:YC.Slot}):l&&!u?f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,vN.__)("Open publish panel")})}):f=(0,Ps.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,Ps.jsx)(W0.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,vN.__)("Open save panel")})}),(0,Ps.jsxs)(Ps.Fragment,{children:[r&&(0,Ps.jsx)(RC,{close:t,renderDialog:!0}),(0,Ps.jsx)(i2e,{bubblesVirtually:!0}),!r&&f]})}var tte=s(A(),1),r2=s(O(),1),yN=s(E(),1),rte=s(Oi(),1),o2=s(D(),1);var Dc=s(C(),1);function ote({autoFocus:e=!1}){let{switchEditorMode:t}=(0,r2.useDispatch)(w),{shortcut:r,isRichEditingEnabled:o}=(0,r2.useSelect)(i=>{let{getEditorSettings:a}=i(w),{getShortcutRepresentation:l}=i(rte.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:a().richEditingEnabled}},[]),n=(0,o2.useRef)();return(0,o2.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,Dc.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,Dc.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,Dc.jsx)("h2",{children:(0,yN.__)("Editing code")}),(0,Dc.jsx)(tte.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,yN.__)("Exit code editor")})]}),(0,Dc.jsxs)("div",{className:"editor-text-editor__body",children:[(0,Dc.jsx)(LP,{ref:n}),(0,Dc.jsx)(w0,{})]})]})}var n2=s(D(),1),nte=s(C(),1),ite=(0,n2.createContext)(void 0);function Y0({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,nte.jsx)(ite.Provider,{value:n,children:o})}function i2(){let e=(0,n2.useContext)(ite);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var ste=s(A(),1),ate=s(D(),1),s2=s(E(),1);function bN(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Oo=s(C(),1);function s2e({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:a,loadingState:l}){switch(e.type){case"image":return(0,Oo.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:a});case"video":return(0,Oo.jsx)("video",{src:t,controls:!0,onError:a,children:o});case"audio":return(0,Oo.jsx)("audio",{src:t,controls:!0,onError:a,children:o});default:return(0,Oo.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Oo.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Oo.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Oo.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"media-editor-preview__download-link",children:(0,s2.__)("View file")})]})}}function SN(e){let[t,r]=(0,ate.useState)("loading"),{media:o}=i2(),{source_url:n,mime_type:i,alt_text:a,title:l}=o||{},c=bN(i);if(!n)return(0,Oo.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Oo.jsx)("p",{children:(0,s2.__)("No media file available.")})});if(t==="error")return(0,Oo.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Oo.jsx)("p",{children:(0,s2.__)("Failed to load media file.")}),(0,Oo.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Oo.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Oo.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Oo.jsx)(ste.Spinner,{})}),(0,Oo.jsx)(s2e,{mediaType:c,mediaUrl:n,altText:a,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var _N=s(E(),1);var nr="isAny",ir="isNone",mn="isAll",pn="isNotAll",Vn="between",jn="inThePast",hi="over",yr="is",br="isNot",hd="lessThan",gd="greaterThan",vd="lessThanOrEqual",yd="greaterThanOrEqual",bd="before",Sd="after",_d="beforeInc",wd="afterInc",rl="contains",ol="notContains",nl="startsWith",xd="on",Cd="notOn";var ylt={asc:(0,_N.__)("Sort ascending"),desc:(0,_N.__)("Sort descending")};var lte=s(qv(),1),{lock:Slt,unlock:Wt}=(0,lte.__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 q0=s(D(),1),a2e=[];function gi({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:a2e,[o,n]=(0,q0.useState)(r),[i,a]=(0,q0.useState)(!1);return(0,q0.useEffect)(()=>{if(!t){n(r);return}let l=!1;return a(!0),t().then(c=>{if(!l){let u=Array.isArray(c)&&c.length>0?c:r;n(u)}}).catch(()=>{l||n(r)}).finally(()=>{l||a(!1)}),()=>{l=!0}},[t,r]),{elements:o,isLoading:i}}var l2e=Math.pow(10,8)*24*60*60*1e3,xlt=-l2e,a2=6048e5,cte=864e5;var c2e=3600;var ute=c2e*24,Clt=ute*7,u2e=ute*365.2425,d2e=u2e/12,Tlt=d2e*3,wN=Symbol.for("constructDateFrom");function lo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&wN in e?e[wN](t):e instanceof Date?new e.constructor(t):new Date(t)}function At(e,t){return lo(t||e,e)}function l2(e,t,r){let o=At(e,r?.in);return isNaN(t)?lo(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function c2(e,t,r){let o=At(e,r?.in);if(isNaN(t))return lo(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=lo(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let a=i.getDate();return n>=a?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var f2e={};function Td(){return f2e}function Bc(e,t){let r=Td(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=At(e,t?.in),i=n.getDay(),a=(i<o?7:0)+i-o;return n.setDate(n.getDate()-a),n.setHours(0,0,0,0),n}function km(e,t){return Bc(e,{...t,weekStartsOn:1})}function u2(e,t){let r=At(e,t?.in),o=r.getFullYear(),n=lo(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=km(n),a=lo(r,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);let l=km(a);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function xN(e){let t=At(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function dte(e,...t){let r=lo.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function CN(e,t){let r=At(e,t?.in);return r.setHours(0,0,0,0),r}function fte(e,t,r){let[o,n]=dte(r?.in,e,t),i=CN(o),a=CN(n),l=+i-xN(i),c=+a-xN(a);return Math.round((l-c)/cte)}function mte(e,t){let r=u2(e,t),o=lo(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),km(o)}function pte(e,t,r){return l2(e,t*7,r)}function hte(e,t,r){return c2(e,t*12,r)}function gte(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Lg(e){return!(!gte(e)&&typeof e!="number"||isNaN(+At(e)))}function vte(e,t){let r=At(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function d2(e,t){let r=At(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var m2e={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"}},yte=(e,t,r)=>{let o,n=m2e[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function f2(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var p2e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},h2e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},g2e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bte={date:f2({formats:p2e,defaultWidth:"full"}),time:f2({formats:h2e,defaultWidth:"full"}),dateTime:f2({formats:g2e,defaultWidth:"full"})};var v2e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ste=(e,t,r,o)=>v2e[e];function Vg(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):a;n=e.formattingValues[l]||e.formattingValues[a]}else{let a=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[a]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var y2e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b2e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S2e={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"]},_2e={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"]},w2e={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"}},x2e={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"}},C2e=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},_te={ordinalNumber:C2e,era:Vg({values:y2e,defaultWidth:"wide"}),quarter:Vg({values:b2e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vg({values:S2e,defaultWidth:"wide"}),day:Vg({values:_2e,defaultWidth:"wide"}),dayPeriod:Vg({values:w2e,defaultWidth:"wide",formattingValues:x2e,defaultFormattingWidth:"wide"})};function jg(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let a=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?P2e(l,f=>f.test(a)):T2e(l,f=>f.test(a)),u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let d=t.slice(a.length);return{value:u,rest:d}}}function T2e(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function P2e(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function wte(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;let l=t.slice(n.length);return{value:a,rest:l}}}var k2e=/^(\d+)(th|st|nd|rd)?/i,E2e=/\d+/i,R2e={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},A2e={any:[/^b/i,/^(a|c)/i]},O2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I2e={any:[/1/i,/2/i,/3/i,/4/i]},N2e={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},F2e={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]},D2e={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},B2e={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]},M2e={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},L2e={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}},xte={ordinalNumber:wte({matchPattern:k2e,parsePattern:E2e,valueCallback:e=>parseInt(e,10)}),era:jg({matchPatterns:R2e,defaultMatchWidth:"wide",parsePatterns:A2e,defaultParseWidth:"any"}),quarter:jg({matchPatterns:O2e,defaultMatchWidth:"wide",parsePatterns:I2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:jg({matchPatterns:N2e,defaultMatchWidth:"wide",parsePatterns:F2e,defaultParseWidth:"any"}),day:jg({matchPatterns:D2e,defaultMatchWidth:"wide",parsePatterns:B2e,defaultParseWidth:"any"}),dayPeriod:jg({matchPatterns:M2e,defaultMatchWidth:"any",parsePatterns:L2e,defaultParseWidth:"any"})};var TN={code:"en-US",formatDistance:yte,formatLong:bte,formatRelative:Ste,localize:_te,match:xte,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cte(e,t){let r=At(e,t?.in);return fte(r,d2(r))+1}function Tte(e,t){let r=At(e,t?.in),o=+km(r)-+mte(r);return Math.round(o/a2)+1}function m2(e,t){let r=At(e,t?.in),o=r.getFullYear(),n=Td(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=lo(t?.in||e,0);a.setFullYear(o+1,0,i),a.setHours(0,0,0,0);let l=Bc(a,t),c=lo(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=Bc(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function Pte(e,t){let r=Td(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=m2(e,t),i=lo(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Bc(i,t)}function kte(e,t){let r=At(e,t?.in),o=+Bc(r,t)-+Pte(r,t);return Math.round(o/a2)+1}function wt(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Mc={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return wt(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):wt(r+1,2)},d(e,t){return wt(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return wt(e.getHours()%12||12,t.length)},H(e,t){return wt(e.getHours(),t.length)},m(e,t){return wt(e.getMinutes(),t.length)},s(e,t){return wt(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return wt(n,t.length)}};var zg={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},PN={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Mc.y(e,t)},Y:function(e,t,r,o){let n=m2(e,o),i=n>0?n:1-n;if(t==="YY"){let a=i%100;return wt(a,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):wt(i,t.length)},R:function(e,t){let r=u2(e);return wt(r,t.length)},u:function(e,t){let r=e.getFullYear();return wt(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return wt(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return wt(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Mc.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return wt(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=kte(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):wt(n,t.length)},I:function(e,t,r){let o=Tte(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):wt(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Mc.d(e,t)},D:function(e,t,r){let o=Cte(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):wt(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return wt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return wt(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return wt(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=zg.noon:o===0?n=zg.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=zg.evening:o>=12?n=zg.afternoon:o>=4?n=zg.morning:n=zg.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Mc.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Mc.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):wt(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):wt(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Mc.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Mc.s(e,t)},S:function(e,t){return Mc.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Rte(o);case"XXXX":case"XX":return Em(o);default:return Em(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return Rte(o);case"xxxx":case"xx":return Em(o);default:return Em(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ete(o,":");default:return"GMT"+Em(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ete(o,":");default:return"GMT"+Em(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return wt(o,t.length)},T:function(e,t,r){return wt(+e,t.length)}};function Ete(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+wt(i,2)}function Rte(e,t){return e%60===0?(e>0?"-":"+")+wt(Math.abs(e)/60,2):Em(e,t)}function Em(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=wt(Math.trunc(o/60),2),i=wt(o%60,2);return r+n+t+i}var Ate=(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"})}},Ote=(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"})}},V2e=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Ate(e,t);let i;switch(o){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}}",Ate(o,t)).replace("{{time}}",Ote(n,t))},Ite={p:Ote,P:V2e};var j2e=/^D+$/,z2e=/^Y+$/,U2e=["D","DD","YY","YYYY"];function Nte(e){return j2e.test(e)}function Fte(e){return z2e.test(e)}function Dte(e,t,r){let o=H2e(e,t,r);if(console.warn(o),U2e.includes(e))throw new RangeError(o)}function H2e(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var G2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,W2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y2e=/^'([^]*?)'?$/,q2e=/''/g,Z2e=/[a-zA-Z]/;function kN(e,t,r){let o=Td(),n=r?.locale??o.locale??TN,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=At(e,r?.in);if(!Lg(l))throw new RangeError("Invalid time value");let c=t.match(W2e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Ite[f];return m(d,n.formatLong)}return d}).join("").match(G2e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:K2e(d)};if(PN[f])return{isToken:!0,value:d};if(f.match(Z2e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(l,c));let u={firstWeekContainsDate:i,weekStartsOn:a,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!r?.useAdditionalWeekYearTokens&&Fte(f)||!r?.useAdditionalDayOfYearTokens&&Nte(f))&&Dte(f,t,String(e));let m=PN[f[0]];return m(l,f,n.localize,u)}).join("")}function K2e(e){let t=e.match(Y2e);return t?t[1].replace(q2e,"'"):e}function Rm(e,t,r){return l2(e,-t,r)}function p2(e,t,r){return c2(e,-t,r)}function Bte(e,t,r){return pte(e,-t,r)}function h2(e,t,r){return hte(e,-t,r)}var _e=s(E(),1),Rr=s(D(),1),zn=s(po(),1);var EN=s(C(),1),Lr={Name:(0,EN.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,EN.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function Mte(e,t){switch(t){case"days":return Rm(new Date,e);case"weeks":return Bte(new Date,e);case"months":return p2(new Date,e);case"years":return h2(new Date,e);default:return new Date}}var Lte={label:(0,_e.__)("Is none of"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Lr),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},Vte=[{name:nr,label:(0,_e.__)("Includes"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Lr),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:ir,...Lte},{name:mn,label:(0,_e.__)("Includes all"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),Lr),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:pn,...Lte},{name:Vn,label:(0,_e.__)("Between (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<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,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:jn,label:(0,_e.__)("In the past"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<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,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mte(r.value,r.unit),n=(0,zn.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:hi,label:(0,_e.__)("Over"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),Lr),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=Mte(r.value,r.unit);return(0,zn.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:yr,label:(0,_e.__)("Is"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:br,label:(0,_e.__)("Is not"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:hd,label:(0,_e.__)("Less than"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:gd,label:(0,_e.__)("Greater than"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:vd,label:(0,_e.__)("Less than or equal"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:yd,label:(0,_e.__)("Greater than or equal"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:bd,label:(0,_e.__)("Before"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:Sd,label:(0,_e.__)("After"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:_d,label:(0,_e.__)("Before (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:wd,label:(0,_e.__)("After (inc)"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r);return(0,zn.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:rl,label:(0,_e.__)("Contains"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:ol,label:(0,_e.__)("Doesn't contain"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:nl,label:(0,_e.__)("Starts with"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:xd,label:(0,_e.__)("On"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r),n=(0,zn.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:Cd,label:(0,_e.__)("Not on"),filterText:(e,t)=>(0,Rr.createInterpolateElement)((0,_e.sprintf)((0,_e.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),Lr),filter(e,t,r){if(r===void 0)return!0;let o=(0,zn.getDate)(r),n=(0,zn.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],jte=e=>Vte.find(t=>t.name===e),zte=()=>Vte.map(e=>e.name);var Ute=s(A(),1),Hte=s(D(),1);function Lt(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var Gte=s(C(),1),{ValidatedCheckboxControl:X2e}=Wt(Ute.privateApis);function Wte({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,label:c,description:u,isValid:d}=e,f=(0,Hte.useCallback)(()=>{t(l({item:r,value:!a({item:r})}))},[r,a,t,l]);return(0,Gte.jsx)(X2e,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),hidden:o,label:c,help:u,checked:a({item:r}),onChange:f})}var g2=s(A(),1),Yte=s(D(),1);var RN=s(C(),1),{ValidatedComboboxControl:Q2e}=Wt(g2.privateApis);function v2({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:a,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,Yte.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=gi({elements:t.elements,getElements:t.getElements});return g?(0,RN.jsx)(g2.Spinner,{}):(0,RN.jsx)(Q2e,{required:!!t.isValid?.required,customValidity:Lt(d,n),label:i,value:f,help:a,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var _2=s(A(),1),ks=s(D(),1),S2=s(E(),1),Hi=s(po(),1);var Hg=s(A(),1),AN=s(D(),1),il=s(E(),1);var Ug=s(C(),1),J2e={[jn]:[{value:"days",label:(0,il.__)("Days")},{value:"weeks",label:(0,il.__)("Weeks")},{value:"months",label:(0,il.__)("Months")},{value:"years",label:(0,il.__)("Years")}],[hi]:[{value:"days",label:(0,il.__)("Days ago")},{value:"weeks",label:(0,il.__)("Weeks ago")},{value:"months",label:(0,il.__)("Months ago")},{value:"years",label:(0,il.__)("Years ago")}]};function y2({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let a=J2e[i===jn?"inThePast":"over"],{id:l,label:c,getValue:u,setValue:d}=r,f=u({item:t}),{value:m="",unit:h=a[0].value}=f&&typeof f=="object"?f:{},g=(0,AN.useCallback)(y=>o(d({item:t,value:{value:Number(y),unit:h}})),[o,d,t,h]),v=(0,AN.useCallback)(y=>o(d({item:t,value:{value:m,unit:y}})),[o,d,t,m]);return(0,Ug.jsx)(Hg.BaseControl,{id:l,className:re(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,children:(0,Ug.jsxs)(it,{direction:"row",gap:"sm",children:[(0,Ug.jsx)(Hg.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:m,onChange:g}),(0,Ug.jsx)(Hg.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,il.__)("Unit"),value:h,options:a,onChange:v,hideLabelFromVision:!0})]})})}var qte=s(po(),1);function b2(e){if(!e)return null;let t=(0,qte.getDate)(e);return t&&Lg(t)?t:null}var Pd=s(C(),1),{DateCalendar:$2e,ValidatedInputControl:eEe}=Wt(_2.privateApis),tEe=e=>e?(0,Hi.dateI18n)("Y-m-d\\TH:i",(0,Hi.getDate)(e)):"";function rEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,description:c,setValue:u,getValue:d,isValid:f}=t,m=d({item:e}),h=typeof m=="string"?m:void 0,[g,v]=(0,ks.useState)(()=>b2(h)||new Date),y=(0,ks.useRef)(null),b=(0,ks.useRef)(void 0),_=(0,ks.useRef)(null),S=(0,ks.useCallback)(L=>r(u({item:e,value:L})),[e,r,u]);(0,ks.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let x=(0,ks.useCallback)(L=>{let M;if(L){let k=(0,Hi.dateI18n)("Y-m-d",L),I;h?I=(0,Hi.dateI18n)("H:i",(0,Hi.getDate)(h)):I=(0,Hi.dateI18n)("H:i",L),M=(0,Hi.getDate)(`${k}T${I}`).toISOString(),S(M),b.current&&clearTimeout(b.current)}else S(void 0);_.current=y.current&&y.current.ownerDocument.activeElement,b.current=setTimeout(()=>{y.current&&(y.current.focus(),y.current.blur(),S(M),_.current&&_.current instanceof HTMLElement&&_.current.focus())},0)},[S,h]),T=(0,ks.useCallback)(L=>{if(L){let M=(0,Hi.getDate)(L);S(M.toISOString());let k=b2(M.toISOString());k&&v(k)}else S(void 0)},[S]),{format:R}=t,F=R.weekStartsOn??(0,Hi.getSettings)().l10n.startOfWeek,{timezone:{string:B}}=(0,Hi.getSettings)(),z=l;return f?.required&&!n&&!o?z=`${l} (${(0,S2.__)("Required")})`:!f?.required&&n&&!o&&(z=`${l} (${(0,S2.__)("Optional")})`),(0,Pd.jsx)(_2.BaseControl,{id:a,label:z,help:c,hideLabelFromVision:o,children:(0,Pd.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Pd.jsx)($2e,{style:{width:"100%"},selected:h&&b2(h)||void 0,onSelect:x,month:g,onMonthChange:v,timeZone:B||void 0,weekStartsOn:F}),(0,Pd.jsx)(eEe,{ref:y,__next40pxDefaultSize:!0,required:!!f?.required,customValidity:Lt(f,i),type:"datetime-local",label:(0,S2.__)("Date time"),hideLabelFromVision:!0,value:tEe(h),onChange:T})]})})}function Zte({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===jn||i===hi?(0,Pd.jsx)(y2,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Pd.jsx)(rEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var gn=s(A(),1),Rt=s(D(),1),co=s(E(),1),hn=s(po(),1);var Vt=s(C(),1),{DateCalendar:oEe,DateRangeCalendar:nEe}=Wt(gn.privateApis),iEe=[{id:"today",label:(0,co.__)("Today"),getValue:()=>(0,hn.getDate)(null)},{id:"yesterday",label:(0,co.__)("Yesterday"),getValue:()=>{let e=(0,hn.getDate)(null);return Rm(e,1)}},{id:"past-week",label:(0,co.__)("Past week"),getValue:()=>{let e=(0,hn.getDate)(null);return Rm(e,7)}},{id:"past-month",label:(0,co.__)("Past month"),getValue:()=>{let e=(0,hn.getDate)(null);return p2(e,1)}}],sEe=[{id:"last-7-days",label:(0,co.__)("Last 7 days"),getValue:()=>{let e=(0,hn.getDate)(null);return[Rm(e,7),e]}},{id:"last-30-days",label:(0,co.__)("Last 30 days"),getValue:()=>{let e=(0,hn.getDate)(null);return[Rm(e,30),e]}},{id:"month-to-date",label:(0,co.__)("Month to date"),getValue:()=>{let e=(0,hn.getDate)(null);return[vte(e),e]}},{id:"last-year",label:(0,co.__)("Last year"),getValue:()=>{let e=(0,hn.getDate)(null);return[h2(e,1),e]}},{id:"year-to-date",label:(0,co.__)("Year to date"),getValue:()=>{let e=(0,hn.getDate)(null);return[d2(e),e]}}],Gg=e=>{if(!e)return null;let t=(0,hn.getDate)(e);return t&&Lg(t)?t:null},ON=e=>e?typeof e=="string"?e:kN(e,"yyyy-MM-dd"):"";function Kte({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:a}=e,[l,c]=(0,Rt.useState)(void 0),u=(0,Rt.useCallback)(()=>{let f=Array.isArray(r)?r:[r];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[r]);return(0,Rt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?Lt(a,t):void 0;for(let h of f){let g=h.current;g&&g.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[r,a,t]),(0,Rt.useEffect)(()=>{let f=Array.isArray(r)?r:[r],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)}},[r,n]),(0,Rt.useEffect)(()=>{if(!o)return;let f=t?Lt(a,t):void 0;f?c(f):u()},[o,a,t,u]),(0,Vt.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,Vt.jsx)("div",{"aria-live":"polite",children:l&&(0,Vt.jsxs)("p",{className:re("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,Vt.jsx)(gn.Icon,{className:"components-validated-control__indicator-icon",icon:Cl,size:16,fill:"currentColor"}),l.message]})})]})}function aEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,setValue:c,getValue:u,isValid:d,format:f}=t,[m,h]=(0,Rt.useState)(null),g=f.weekStartsOn??(0,hn.getSettings)().l10n.startOfWeek,v=u({item:e}),y=typeof v=="string"?v:void 0,[b,_]=(0,Rt.useState)(()=>Gg(y)||new Date),[S,x]=(0,Rt.useState)(!1),T=(0,Rt.useRef)(null),R=(0,Rt.useCallback)(k=>r(c({item:e,value:k})),[e,r,c]),F=(0,Rt.useCallback)(k=>{let I=k?kN(k,"yyyy-MM-dd"):void 0;R(I),h(null),x(!0)},[R]),B=(0,Rt.useCallback)(k=>{let I=k.getValue(),U=ON(I);_(I),R(U),h(k.id),x(!0)},[R]),z=(0,Rt.useCallback)(k=>{if(R(k),k){let I=Gg(k);I&&_(I)}h(null),x(!0)},[R]),{timezone:{string:L}}=(0,hn.getSettings)(),M=l;return d?.required&&!n?M=`${l} (${(0,co.__)("Required")})`:!d?.required&&n&&(M=`${l} (${(0,co.__)("Optional")})`),(0,Vt.jsx)(Kte,{field:t,validity:i,inputRefs:T,isTouched:S,setIsTouched:x,children:(0,Vt.jsx)(gn.BaseControl,{id:a,className:"dataviews-controls__date",label:M,hideLabelFromVision:o,children:(0,Vt.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Vt.jsxs)(it,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[iEe.map(k=>{let I=m===k.id;return(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:I,size:"small",onClick:()=>B(k),children:k.label},k.id)}),(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!m,size:"small",disabled:!!m,accessibleWhenDisabled:!1,children:(0,co.__)("Custom")})]}),(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:T,type:"date",label:(0,co.__)("Date"),hideLabelFromVision:!0,value:y,onChange:z,required:!!t.isValid?.required}),(0,Vt.jsx)(oEe,{style:{width:"100%"},selected:y&&Gg(y)||void 0,onSelect:F,month:b,onMonthChange:_,timeZone:L||void 0,weekStartsOn:g})]})})})}function lEe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:a,label:l,getValue:c,setValue:u,format:d}=t,f,m=c({item:e});Array.isArray(m)&&m.length===2&&m.every(U=>typeof U=="string")&&(f=m);let h=d.weekStartsOn??(0,hn.getSettings)().l10n.startOfWeek,g=(0,Rt.useCallback)(U=>{r(u({item:e,value:U}))},[e,r,u]),[v,y]=(0,Rt.useState)(null),b=(0,Rt.useMemo)(()=>{if(!f)return{from:void 0,to:void 0};let[U,G]=f;return{from:Gg(U)||void 0,to:Gg(G)||void 0}},[f]),[_,S]=(0,Rt.useState)(()=>b.from||new Date),[x,T]=(0,Rt.useState)(!1),R=(0,Rt.useRef)(null),F=(0,Rt.useRef)(null),B=(0,Rt.useCallback)((U,G)=>{U&&G?g([ON(U),ON(G)]):!U&&!G&&g(void 0)},[g]),z=(0,Rt.useCallback)(U=>{B(U?.from,U?.to),y(null),T(!0)},[B]),L=(0,Rt.useCallback)(U=>{let[G,Y]=U.getValue();S(G),B(G,Y),y(U.id),T(!0)},[B]),M=(0,Rt.useCallback)((U,G)=>{let[Y,Z]=f||[void 0,void 0];if(B(U==="from"?G:Y,U==="to"?G:Z),G){let H=Gg(G);H&&S(H)}y(null),T(!0)},[f,B]),{timezone:k}=(0,hn.getSettings)(),I=l;return t.isValid?.required&&!n?I=`${l} (${(0,co.__)("Required")})`:!t.isValid?.required&&n&&(I=`${l} (${(0,co.__)("Optional")})`),(0,Vt.jsx)(Kte,{field:t,validity:i,inputRefs:[R,F],isTouched:x,setIsTouched:T,children:(0,Vt.jsx)(gn.BaseControl,{id:a,className:"dataviews-controls__date",label:I,hideLabelFromVision:o,children:(0,Vt.jsxs)(it,{direction:"column",gap:"lg",children:[(0,Vt.jsxs)(it,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[sEe.map(U=>{let G=v===U.id;return(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:G,size:"small",onClick:()=>L(U),children:U.label},U.id)}),(0,Vt.jsx)(gn.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!v,size:"small",accessibleWhenDisabled:!1,disabled:!!v,children:(0,co.__)("Custom")})]}),(0,Vt.jsxs)(it,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:R,type:"date",label:(0,co.__)("From"),hideLabelFromVision:!0,value:f?.[0],onChange:U=>M("from",U),required:!!t.isValid?.required}),(0,Vt.jsx)(gn.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:F,type:"date",label:(0,co.__)("To"),hideLabelFromVision:!0,value:f?.[1],onChange:U=>M("to",U),required:!!t.isValid?.required})]}),(0,Vt.jsx)(nEe,{style:{width:"100%"},selected:b,onSelect:z,month:_,onMonthChange:S,timeZone:k.string||void 0,weekStartsOn:h})]})})})}function Xte({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){return i===jn||i===hi?(0,Vt.jsx)(y2,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===Vn?(0,Vt.jsx)(lEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a}):(0,Vt.jsx)(aEe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a})}var w2=s(A(),1),Qte=s(D(),1);var IN=s(C(),1),{ValidatedSelectControl:cEe}=Wt(w2.privateApis);function x2({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:a,label:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=a==="array",h=u({item:e})??(m?[]:""),g=(0,Qte.useCallback)(b=>r(d({item:e,value:b})),[e,r,d]),{elements:v,isLoading:y}=gi({elements:t.elements,getElements:t.getElements});return y?(0,IN.jsx)(w2.Spinner,{}):(0,IN.jsx)(cEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(f,i),label:l,value:h,help:c,options:v,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:m})}var NN=s(C(),1),uEe=10;function Jte(e){let{field:t}=e,{elements:r}=gi({elements:t.elements,getElements:t.getElements});return r.length>=uEe?(0,NN.jsx)(v2,{...e}):(0,NN.jsx)(x2,{...e})}var T2=s(A(),1);var $te=s(A(),1),ere=s(D(),1);var tre=s(C(),1),{ValidatedInputControl:dEe}=Wt($te.privateApis);function sl({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:a,suffix:l,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:g}=t,v=m({item:e}),y=(0,ere.useCallback)(b=>r(h({item:e,value:b})),[e,h,r]);return(0,tre.jsx)(dEe,{required:!!g.required,markWhenOptional:n,customValidity:Lt(g,c),label:u,placeholder:d,value:v??"",help:f,onChange:y,hideLabelFromVision:o,type:i,prefix:a,suffix:l,pattern:g.pattern?g.pattern.constraint:void 0,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var C2=s(C(),1);function rre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,C2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,C2.jsx)(T2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,C2.jsx)(T2.Icon,{icon:KR})})})}var k2=s(A(),1);var P2=s(C(),1);function ore({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,P2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,P2.jsx)(k2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,P2.jsx)(k2.Icon,{icon:Ym})})})}var R2=s(A(),1);var E2=s(C(),1);function nre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,E2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,E2.jsx)(R2.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,E2.jsx)(R2.Icon,{icon:cA})})})}var Lc=s(A(),1),Z0=s(D(),1),A2=s(E(),1);var kd=s(C(),1),{ValidatedNumberControl:fEe}=Wt(Lc.privateApis);function ire(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function mEe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,a=(0,Z0.useCallback)(c=>t([ire(c),i]),[t,i]),l=(0,Z0.useCallback)(c=>t([n,ire(c)]),[t,n]);return(0,kd.jsx)(Lc.BaseControl,{help:(0,A2.__)("The max. value must be greater than the min. value."),children:(0,kd.jsxs)(Lc.Flex,{direction:"row",gap:4,children:[(0,kd.jsx)(Lc.__experimentalNumberControl,{label:(0,A2.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:a,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,kd.jsx)(Lc.__experimentalNumberControl,{label:(0,A2.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function O2({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:a}){let l=t.format?.decimals??0,c=Math.pow(10,Math.abs(l)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,g=f({item:e})??"",v=(0,Z0.useCallback)(b=>{r(m({item:e,value:["",void 0].includes(b)?void 0:Number(b)}))},[e,r,m]),y=(0,Z0.useCallback)(b=>{r(m({item:e,value:b}))},[e,r,m]);if(i===Vn){let b=["",""];return Array.isArray(g)&&g.length===2&&g.every(_=>typeof _=="number"||_==="")&&(b=g),(0,kd.jsx)(mEe,{value:b,onChange:y,hideLabelFromVision:o,step:c})}return(0,kd.jsx)(fEe,{required:!!h.required,markWhenOptional:n,customValidity:Lt(h,a),label:u,help:d,value:g,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0})}var sre=s(C(),1);function are(e){return(0,sre.jsx)(O2,{...e})}var lre=s(C(),1);function cre(e){return(0,lre.jsx)(O2,{...e})}var I2=s(A(),1),ure=s(D(),1);var FN=s(C(),1),{ValidatedRadioControl:pEe}=Wt(I2.privateApis);function dre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=t,{elements:f,isLoading:m}=gi({elements:t.elements,getElements:t.getElements}),h=c({item:e}),g=(0,ure.useCallback)(v=>r(u({item:e,value:v})),[e,r,u]);return m?(0,FN.jsx)(I2.Spinner,{}):(0,FN.jsx)(pEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),label:a,help:l,onChange:g,options:f,selected:h,hideLabelFromVision:o})}var DN=s(D(),1);var fre=s(C(),1);function mre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{prefix:l,suffix:c}=i||{};return(0,fre.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:a,prefix:l?(0,DN.createElement)(l):void 0,suffix:c?(0,DN.createElement)(c):void 0})}var pre=s(A(),1),hre=s(D(),1);var gre=s(C(),1),{ValidatedToggleControl:hEe}=Wt(pre.privateApis);function vre({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,description:l,getValue:c,setValue:u,isValid:d}=e,f=(0,hre.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,gre.jsx)(hEe,{required:!!d.required,markWhenOptional:n,customValidity:Lt(d,i),hidden:o,label:a,help:l,checked:c({item:r}),onChange:f})}var yre=s(A(),1),bre=s(D(),1);var Sre=s(C(),1),{ValidatedTextareaControl:gEe}=Wt(yre.privateApis);function _re({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:a}){let{rows:l=4}=i||{},{label:c,placeholder:u,description:d,setValue:f,isValid:m}=t,h=t.getValue({item:e}),g=(0,bre.useCallback)(v=>r(f({item:e,value:v})),[e,r,f]);return(0,Sre.jsx)(gEe,{required:!!m.required,markWhenOptional:n,customValidity:Lt(m,a),label:c,placeholder:u,value:h??"",help:d,onChange:g,rows:l,minLength:m.minLength?m.minLength.constraint:void 0,maxLength:m.maxLength?m.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var Wg=s(A(),1),wre=s(D(),1);var N2=s(C(),1),{ValidatedToggleGroupControl:vEe}=Wt(Wg.privateApis);function xre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:a,setValue:l,isValid:c}=t,u=a({item:e}),d=(0,wre.useCallback)(g=>r(l({item:e,value:g})),[e,r,l]),{elements:f,isLoading:m}=gi({elements:t.elements,getElements:t.getElements});if(m)return(0,N2.jsx)(Wg.Spinner,{});if(f.length===0)return null;let h=f.find(g=>g.value===u);return(0,N2.jsx)(vEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:h?.description||t.description,onChange:d,value:u,hideLabelFromVision:o,children:f.map(g=>(0,N2.jsx)(Wg.__experimentalToggleGroupControlOption,{label:g.label,value:g.value},g.value))})}var F2=s(A(),1),D2=s(D(),1);var K0=s(C(),1),{ValidatedFormTokenField:yEe}=Wt(F2.privateApis);function Cre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e}),{elements:m,isLoading:h}=gi({elements:t.elements,getElements:t.getElements}),g=(0,D2.useMemo)(()=>Array.isArray(f)?f.map(y=>m?.find(_=>_.value===y)||{value:y,label:y}):[],[f,m]),v=(0,D2.useCallback)(y=>{let b=y.map(_=>typeof _=="object"&&"value"in _?_.value:_);r(u({item:e,value:b}))},[r,u,e]);return h?(0,K0.jsx)(F2.Spinner,{}):(0,K0.jsx)(yEe,{required:!!d?.required,markWhenOptional:n,customValidity:Lt(d,i),label:o?void 0:a,value:g,onChange:v,placeholder:l,suggestions:m?.map(y=>y.value),__experimentalValidateInput:y=>t.isValid?.elements&&m?m.some(b=>b.value===y||b.label===y):!0,__experimentalExpandOnFocus:m&&m.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:y=>typeof y=="object"&&"label"in y?y.label:typeof y=="string"&&m&&m.find(_=>_.value===y)?.label||y,__experimentalRenderItem:({item:y})=>{if(typeof y=="string"&&m){let b=m.find(_=>_.value===y);return(0,K0.jsx)("span",{children:b?.label||y})}return(0,K0.jsx)("span",{children:y})}})}var vi=s(A(),1),BN=s(D(),1),Tre=s(E(),1);var Vc=s(C(),1),{ValidatedInputControl:bEe}=Wt(vi.privateApis),SEe=({color:e,onColorChange:t})=>{let r=e&&xr(e).isValid()?e:"#ffffff";return(0,Vc.jsx)(vi.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:o})=>(0,Vc.jsx)(vi.Button,{onClick:o,"aria-label":(0,Tre.__)("Open color picker"),size:"small",icon:()=>(0,Vc.jsx)(vi.ColorIndicator,{colorValue:r})}),renderContent:()=>(0,Vc.jsx)(vi.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Vc.jsx)(vi.ColorPicker,{color:r,onChange:t,enableAlpha:!0})})})};function Pre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:a,placeholder:l,description:c,setValue:u,isValid:d}=t,f=t.getValue({item:e})||"",m=(0,BN.useCallback)(g=>{r(u({item:e,value:g}))},[e,r,u]),h=(0,BN.useCallback)(g=>{r(u({item:e,value:g||""}))},[e,r,u]);return(0,Vc.jsx)(bEe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Lt(d,i),label:a,placeholder:l,value:f,help:c,onChange:h,hideLabelFromVision:o,type:"text",prefix:(0,Vc.jsx)(vi.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Vc.jsx)(SEe,{color:f,onColorChange:m})})})}var M2=s(A(),1),L2=s(D(),1),MN=s(E(),1);var B2=s(C(),1);function kre({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[a,l]=(0,L2.useState)(!1),c=(0,L2.useCallback)(()=>{l(u=>!u)},[]);return(0,B2.jsx)(sl,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:a?"text":"password",suffix:(0,B2.jsx)(M2.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,B2.jsx)(M2.Button,{icon:a?tO:Gd,onClick:c,size:"small",label:a?(0,MN.__)("Hide password"):(0,MN.__)("Show password")})})})}function V2(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var Rre=s(C(),1),Ere={adaptiveSelect:Jte,array:Cre,checkbox:Wte,color:Pre,combobox:v2,datetime:Zte,date:Xte,email:rre,telephone:ore,url:nre,integer:are,number:cre,password:kre,radio:dre,select:x2,text:mre,toggle:vre,textarea:_re,toggleGroup:xre};function _Ee(e){return e&&typeof e=="object"&&typeof e.control=="string"}function wEe(e){let{control:t,...r}=e,o=j2(t);return o===null?null:function(i){return(0,Rre.jsx)(o,{...i,config:r})}}function Are(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?j2(e.Edit):_Ee(e.Edit)?wEe(e.Edit):V2(e)&&e.type!=="array"?j2("adaptiveSelect"):t===null?null:j2(t)}function j2(e){return Object.keys(Ere).includes(e)?Ere[e]:null}function xEe(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var Ore=xEe;var CEe=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},Ire=CEe;var TEe=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},Nre=TEe;var Dre=s(E(),1);function z2({item:e,field:t}){let{elements:r,isLoading:o}=gi({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var Fre=s(C(),1);function Ar({item:e,field:t}){return t.hasElements?(0,Fre.jsx)(z2,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var al=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function Or(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function ll(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function cl(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function ul(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function Yt(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function PEe({item:e,field:t}){return t.getValue({item:e})}var Un=PEe;var kEe=/^[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 EEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!kEe.test(r)?(0,Dre.__)("Value must be a valid email address."):null}var Bre={type:"email",render:Ar,Edit:"email",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt,custom:EEe}};var Mre=s(E(),1);var Yg=(e,t,r)=>r==="asc"?e-t:t-e;function U2(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function H2(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var Lre={separatorThousand:","};function REe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=Lre:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function AEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,Mre.__)("Value must be an integer."):null}var Vre={type:"integer",render:Ar,Edit:"integer",sort:Yg,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br,hd,gd,vd,yd,Vn],validOperators:[yr,br,hd,gd,vd,yd,Vn,nr,ir,mn,pn],format:Lre,getValueFormatted:REe,validate:{required:Or,min:U2,max:H2,elements:Yt,custom:AEe}};var jre=s(E(),1);var zre={separatorThousand:",",separatorDecimal:".",decimals:2};function OEe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=zre:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:a}=o,l=r.toFixed(a),[c,u]=l.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return a===0?d:d+i+u}function IEe(e){return e===""||e===void 0||e===null}function NEe(e,t){let r=t.getValue({item:e});return!IEe(r)&&!Number.isFinite(r)?(0,jre.__)("Value must be a number."):null}var Ure={type:"number",render:Ar,Edit:"number",sort:Yg,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br,hd,gd,vd,yd,Vn],validOperators:[yr,br,hd,gd,vd,yd,Vn,nr,ir,mn,pn],format:zre,getValueFormatted:OEe,validate:{required:Or,min:U2,max:H2,elements:Yt,custom:NEe}};var Hre={type:"text",render:Ar,Edit:"text",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var Am=s(po(),1);var Gre={datetime:(0,Am.getSettings)().formats.datetime,weekStartsOn:(0,Am.getSettings)().l10n.startOfWeek};function FEe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=Gre:o=t.format,(0,Am.dateI18n)(o.datetime,(0,Am.getDate)(r))}var DEe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Wre={type:"datetime",render:Ar,Edit:"datetime",sort:DEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi],validOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi],format:Gre,getValueFormatted:FEe,validate:{required:Or,elements:Yt}};var Om=s(po(),1);var Yre={date:(0,Om.getSettings)().formats.date,weekStartsOn:(0,Om.getSettings)().l10n.startOfWeek};function BEe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Yre:o=t.format,(0,Om.dateI18n)(o.date,(0,Om.getDate)(r))}var MEe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},qre={type:"date",render:Ar,Edit:"date",sort:MEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi,Vn],validOperators:[xd,Cd,bd,Sd,_d,wd,jn,hi,Vn],format:Yre,getValueFormatted:BEe,validate:{required:Or,elements:Yt}};var G2=s(E(),1);function Zre(e,t){return t.getValue({item:e})===!0}function LEe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,G2.__)("True"):r===!1?(0,G2.__)("False"):""}function VEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,G2.__)("Value must be true, false, or undefined"):null}var jEe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},Kre={type:"boolean",render:Ar,Edit:"checkbox",sort:jEe,validate:{required:Zre,elements:Yt,custom:VEe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br],validOperators:[yr,br],format:{},getValueFormatted:LEe};var Xre={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:Un,validate:{}};var LN=s(E(),1);function Qre(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Jre({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function zEe({item:e,field:t}){return Jre({item:e,field:t})}function UEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,LN.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,LN.__)("Every value must be a string.")}var HEe=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),a=n.join(",");return r==="asc"?i.localeCompare(a):a.localeCompare(i)},$re={type:"array",render:zEe,Edit:"array",sort:HEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[nr,ir,mn,pn],format:{},getValueFormatted:Jre,validate:{required:Qre,elements:Yt,custom:UEe}};function GEe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var eoe={type:"password",render:Ar,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:GEe,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var toe={type:"telephone",render:Ar,Edit:"telephone",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var roe=s(E(),1);var qg=s(C(),1);function WEe({item:e,field:t}){if(t.hasElements)return(0,qg.jsx)(z2,{item:e,field:t});let r=Un({item:e,field:t});return!r||!xr(r).isValid()?r:(0,qg.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,qg.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,qg.jsx)("span",{children:r})]})}function YEe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!xr(r).isValid()?(0,roe.__)("Value must be a valid color."):null}var qEe=(e,t,r)=>{let o=xr(e),n=xr(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),a=n.toHsl();return i.h!==a.h?r==="asc"?i.h-a.h:a.h-i.h:i.s!==a.s?r==="asc"?i.s-a.s:a.s-i.s:r==="asc"?i.l-a.l:a.l-i.l},ooe={type:"color",render:WEe,Edit:"color",sort:qEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,nr,ir],format:{},getValueFormatted:Un,validate:{required:Or,elements:Yt,custom:YEe}};var noe={type:"url",render:Ar,Edit:"url",sort:al,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[nr,ir],validOperators:[yr,br,rl,ol,nl,nr,ir,mn,pn],format:{},getValueFormatted:Un,validate:{required:Or,pattern:ul,minLength:ll,maxLength:cl,elements:Yt}};var ZEe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?Yg(e,t,r):al(e,t,r),ioe={render:Ar,Edit:null,sort:ZEe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[yr,br],validOperators:zte(),format:{},getValueFormatted:Un,validate:{required:Or,elements:Yt}};function soe(e,t){let r;e.isValid?.required===!0&&t.validate.required!==void 0&&(r={constraint:!0,validate:t.validate.required});let o;(e.isValid?.elements===!0||e.isValid?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(o={constraint:!0,validate:t.validate.elements});let n;typeof e.isValid?.min=="number"&&t.validate.min!==void 0&&(n={constraint:e.isValid.min,validate:t.validate.min});let i;typeof e.isValid?.max=="number"&&t.validate.max!==void 0&&(i={constraint:e.isValid.max,validate:t.validate.max});let a;typeof e.isValid?.minLength=="number"&&t.validate.minLength!==void 0&&(a={constraint:e.isValid.minLength,validate:t.validate.minLength});let l;typeof e.isValid?.maxLength=="number"&&t.validate.maxLength!==void 0&&(l={constraint:e.isValid.maxLength,validate:t.validate.maxLength});let c;e.isValid?.pattern!==void 0&&t.validate.pattern!==void 0&&(c={constraint:e.isValid?.pattern,validate:t.validate.pattern});let u=e.isValid?.custom??t.validate.custom;return{required:r,elements:o,min:n,max:i,minLength:a,maxLength:l,pattern:c,custom:u}}function aoe(e){return e.validOperators.reduce((t,r)=>{let o=jte(r);return o?.filter&&(t[r]=o.filter),t},{})}function KEe(e,t){return{...t.format,...e.format}}var loe=KEe;function XEe(e){let t=[Bre,Vre,Ure,Hre,Wre,qre,Kre,Xre,$re,eoe,toe,ooe,noe].find(r=>r?.type===e);return t||ioe}function X0(e){return e.map(t=>{let r=XEe(t.type),o=t.getValue||Ire(t.id),n=function(i,a,l){let c=o({item:i}),u=o({item:a});return t.sort?t.sort(c,u,l):r.sort(c,u,l)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||Nre(t.id),elements:t.elements,getElements:t.getElements,hasElements:V2(t),isVisible:t.isVisible,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:Are(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:soe(t,r),filterBy:Ore(t,r.defaultOperators,r.validOperators),filter:aoe(r),format:loe(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var YN=s(D(),1);var coe=s(D(),1),uoe=s(C(),1),VN=(0,coe.createContext)({fields:[]});VN.displayName="DataFormContext";function doe({fields:e,children:t}){return(0,uoe.jsx)(VN.Provider,{value:{fields:e},children:t})}var Es=VN;var eE=s(D(),1);var Y2=s(D(),1),Q0=s(A(),1);var vn={type:"regular",labelPosition:"top"},QEe=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 foe(e){let t=vn;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let r=e.summary??[],o=Array.isArray(r)?r:[r];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:o,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 r=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:QEe(r),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 moe(e){let t=foe(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?foe(o.layout):t;return{id:o.id,layout:n,...!!o.label&&{label:o.label},...!!o.description&&{description:o.description},..."children"in o&&Array.isArray(o.children)&&{children:moe({fields:o.children,layout:vn}).fields}}});return{layout:t,fields:r}}var W2=moe;var sr=s(C(),1);function JEe({title:e}){return(0,sr.jsx)(it,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,sr.jsx)(it,{direction:"row",align:"center",children:(0,sr.jsx)(Q0.__experimentalHeading,{level:2,size:13,children:e})})})}function poe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,Y2.useContext)(Es),l=t.layout,c=(0,Y2.useMemo)(()=>({layout:vn,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,sr.jsxs)(sr.Fragment,{children:[!o&&t.label&&(0,sr.jsx)(JEe,{title:t.label}),(0,sr.jsx)(yi,{data:e,form:c,onChange:r,validity:i?.children})]});let u=l.labelPosition,d=a.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,sr.jsxs)(it,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,sr.jsx)("div",{className:re("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,sr.jsx)(Q0.BaseControl.VisualLabel,{children:d.label})}),(0,sr.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,sr.jsx)(d.render,{item:e,field:d}):(0,sr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,sr.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,sr.jsx)(sr.Fragment,{children:(0,sr.jsxs)(sr.Fragment,{children:[!o&&u!=="none"&&(0,sr.jsx)(Q0.BaseControl.VisualLabel,{children:d.label}),(0,sr.jsx)(d.render,{item:e,field:d})]})}):(0,sr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var zN=s(sw(),1),Im=s(A(),1),UN=s(E(),1),ba=s(D(),1),X2=s(he(),1);var Kg=s(A(),1),Zg=s(E(),1);var boe=s(he(),1),Soe=s(D(),1);function $Ee(e,t){return re("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var hoe=$Ee;var q2=s(A(),1);var J0=s(C(),1);function eRe(e,t,r){return e?(0,J0.jsx)(q2.Tooltip,{text:t,placement:"top",children:(0,J0.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,J0.jsx)(q2.Icon,{icon:Cl,size:16}),r]})}):r}var goe=eRe;function voe(e){if(!e)return;let t=Object.keys(e).filter(r=>r!=="children");for(let r of t){let o=e[r];if(o!==void 0&&o.type==="invalid")return o.message?o.message:r==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let r of Object.values(e.children)){let o=voe(r);if(o)return o}}var yoe=voe;var Gi=s(C(),1);function $0({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:a,onClick:l,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=yoe(n),m=i&&!!f,h=hoe(u,m),g=goe(m,f,r),v=re("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":a,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),y=(0,boe.useInstanceId)($0,"dataforms-layouts-panel__field-control"),b=m?(0,Zg.sprintf)((0,Zg._x)("Edit %s (has errors)","field"),r||""):(0,Zg.sprintf)((0,Zg._x)("Edit %s","field"),r||""),_=(0,Soe.useRef)(null);return(0,Gi.jsxs)("div",{ref:_,className:v,onClick:a?void 0:()=>{let T=_.current?.ownerDocument.defaultView?.getSelection();T&&T.toString().length>0||l()},onKeyDown:a?void 0:T=>{T.target===T.currentTarget&&(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),l())},children:[u!=="none"&&(0,Gi.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,Gi.jsx)(Kg.Tooltip,{text:f,placement:"top",children:(0,Gi.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,Gi.jsx)(Kg.Icon,{icon:Cl,size:16})})}),(0,Gi.jsx)("span",{id:`${y}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,Gi.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(T=>(0,Gi.jsx)("span",{style:{width:"100%"},children:(0,Gi.jsx)(T.render,{item:e,field:T})},T.id))}):o.map(T=>(0,Gi.jsx)(T.render,{item:e,field:T},T.id))}),!a&&(0,Gi.jsx)(Kg.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:b,showTooltip:!1,icon:Mv,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${y}`})]})}var _oe=s(sw(),1),jN=s(yI(),1),dl=s(D(),1),Hn=s(E(),1);function woe(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?woe(o):o.type!=="invalid"&&o.type!=="validating")):!0}function tRe(e,t){let r=W2(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(a=>{o.set(a.id,a)});function n(a){if("children"in a&&Array.isArray(a.children)){let u=a.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=o.get(a.id);if(d){let[f]=X0([d]);return{id:a.id,children:u,field:f}}return{id:a.id,children:u}}let l=o.get(a.id);if(!l)return null;let[c]=X0([l]);return{id:a.id,children:[],field:c}}return r.fields.map(n).filter(a=>a!==null)}function Xg(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let a=0;a<r.length-1;a++){let l=r[a];n[l]||(n[l]={}),n[l]={...n[l]},n=n[l]}let i=r[r.length-1];return n[i]={...n[i]||{},...t},o}function xoe(e,t,r){if(!e||t.length===0)return e;let o={...e},n=o;for(let l=0;l<t.length-1;l++){let c=t[l];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let a={...n[i]};if(delete a[r],Object.keys(a).length===0?delete n[i]:n[i]=a,Object.keys(o).length!==0)return o}function rRe(e,t,r){let{elementsCounterRef:o,setFormValidity:n,path:i,item:a}=r,l=(o.current[t.id]||0)+1;o.current[t.id]=l,e.then(c=>{if(l===o.current[t.id]){if(!Array.isArray(c)){n(u=>Xg(u,{elements:{type:"invalid",message:(0,Hn.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(a,{...t.field,elements:c})?n(u=>Xg(u,{elements:{type:"invalid",message:(0,Hn.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>xoe(u,[...i,t.id],"elements"))}}).catch(c=>{if(l!==o.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,Hn.__)("Unknown error when running elements validation asynchronously."),n(d=>Xg(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function oRe(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,a=(o.current[t.id]||0)+1;o.current[t.id]=a,e.then(l=>{if(a===o.current[t.id]){if(l===null){n(c=>xoe(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>Xg(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>Xg(c,{custom:{type:"invalid",message:(0,Hn.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(l=>{if(a!==o.current[t.id])return;let c;l instanceof Error?c=l.message:c=String(l)||(0,Hn.__)("Unknown error when running custom validation asynchronously."),n(u=>Xg(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function Coe(e,t,r){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,Hn.__)("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,Hn.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,Hn.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,Hn.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,Hn.__)("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,Hn.__)("Value must be one of the elements.")}};let o;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});o=t.field.isValid.custom((0,_oe.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let a;return i instanceof Error?a=i.message:a=String(i)||(0,Hn.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:a}}}if(typeof o=="string")return{custom:{type:"invalid",message:o}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(rRe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,Hn.__)("Validating\u2026")}),o instanceof Promise&&(oRe(o,t,r),n.custom={type:"validating",message:(0,Hn.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=Coe(e,l,{...r,path:[...r.path,t.id,"children"]})});let a={};return Object.entries(i).forEach(([l,c])=>{c!==void 0&&(a[l]=c)}),Object.keys(a).length===0?void 0:{children:a}}}function Toe(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>Toe(n,t));return o?{value:r,children:o}:r}function nRe(e,t,r){let[o,n]=(0,dl.useState)(),i=(0,dl.useRef)({}),a=(0,dl.useRef)({}),l=(0,dl.useRef)({}),c=(0,dl.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:a,setFormValidity:n,path:[],item:e},d=tRe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=Toe(h,e);if(l.current.hasOwnProperty(h.id)&&(0,jN.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=Coe(e,h,u);v!==void 0&&(f[h.id]=v)}),n(h=>{let g={...h,...f},v=[...m,...Object.keys(f)];return Object.keys(g).forEach(b=>{g&&!v.includes(b)&&delete g[b]}),Object.keys(g).length===0&&(g=void 0),(0,jN.default)(h,g)?h:g})},[e,t,r]);return(0,dl.useEffect)(()=>{c()},[c]),{validity:o,isValid:woe(o)}}var Poe=nRe;var koe=s(D(),1);function Ed(e,t){(0,koe.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var Eoe=s(D(),1);function iRe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var Z2=(e,t)=>Array.isArray(e)&&e.length>0?iRe(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var sRe=(e,t)=>{let r=t.find(o=>o.id===e.id);return r||t.find(o=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:o.id===n[0].id}return o.id===e.id})};function aRe(e){let{fields:t}=(0,Eoe.useContext)(Es),r=e.layout,o=Z2(r.summary,t),n=sRe(e,t),i=e.children?e.label:n?.label;return o.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:o,fieldDefinition:n,fieldLabel:i}}var K2=aRe;var Gn=s(C(),1);function lRe({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{fields:a}=(0,ba.useContext)(Es),[l,c]=(0,ba.useState)({}),u=(0,ba.useMemo)(()=>(0,zN.default)(e,l,{arrayMerge:(_,S)=>S}),[e,l]),d=(0,ba.useMemo)(()=>({layout:vn,fields:t.children?t.children:[{id:t.id,layout:vn}]}),[t]),f=a.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:m}=Poe(u,f,d),h=()=>{r(l),n()},g=_=>{c(S=>(0,zN.default)(S,_,{arrayMerge:(x,T)=>T}))},v=(0,X2.useFocusOnMount)("firstInputElement"),y=(0,ba.useRef)(null),b=(0,X2.useMergeRefs)([v,y]);return Ed(y,i),(0,Gn.jsxs)(Im.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Gn.jsx)("div",{ref:b,children:(0,Gn.jsx)(yi,{data:u,form:d,onChange:g,validity:m,children:(_,S,x,T)=>(0,Gn.jsx)(_,{data:u,field:S,onChange:g,hideLabelFromVision:d.fields.length<2,markWhenOptional:T,validity:x},S.id)})}),(0,Gn.jsxs)(it,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Gn.jsx)(Im.__experimentalSpacer,{style:{flex:1}}),(0,Gn.jsx)(Im.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:(0,UN.__)("Cancel")}),(0,Gn.jsx)(Im.Button,{variant:"primary",onClick:h,__next40pxDefaultSize:!0,children:(0,UN.__)("Apply")})]})]})}function cRe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,ba.useState)(!1),[a,l]=(0,ba.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=K2(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Gn.jsxs)(Gn.Fragment,{children:[(0,Gn.jsx)($0,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),"aria-expanded":a}),a&&(0,Gn.jsx)(lRe,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var Roe=cRe;var Rd=s(A(),1),Aoe=s(E(),1),jc=s(D(),1);var Ooe=s(he(),1);var yn=s(C(),1);function uRe({title:e,onClose:t}){return(0,yn.jsx)(it,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,yn.jsxs)(it,{direction:"row",gap:"sm",align:"center",children:[e&&(0,yn.jsx)(Rd.__experimentalHeading,{level:2,size:13,children:e}),(0,yn.jsx)(Rd.__experimentalSpacer,{style:{flex:1}}),t&&(0,yn.jsx)(Rd.Button,{label:(0,Aoe.__)("Close"),icon:Kn,onClick:t,size:"small"})]})})}function dRe({touched:e,children:t}){let r=(0,jc.useRef)(null);return Ed(r,e),(0,yn.jsx)("div",{ref:r,children:t})}function fRe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,jc.useState)(!1),[a,l]=(0,jc.useState)(null),c=(0,jc.useMemo)(()=>({anchor:a,placement:"left-start",offset:36,shift:!0}),[a]),[u,d]=(0,Ooe.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,jc.useMemo)(()=>({layout:vn,fields:t.children?t.children:[{id:t.id,layout:vn}]}),[t]),m=(0,jc.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=K2(t);return h?(0,yn.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,yn.jsx)(Rd.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:y=>{y||i(!0)},renderToggle:({isOpen:y,onToggle:b})=>(0,yn.jsx)($0,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,onClick:b,"aria-expanded":y}),renderContent:({onClose:y})=>(0,yn.jsx)(dRe,{touched:n,children:(0,yn.jsxs)("div",{ref:u,...d,children:[(0,yn.jsx)(uRe,{title:g,onClose:y}),(0,yn.jsx)(yi,{data:e,form:f,onChange:r,validity:m,children:(b,_,S,x)=>(0,yn.jsx)(b,{data:e,field:_,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:x,validity:S},_.id)})]})})})}):null}var Ioe=fRe;var HN=s(C(),1);function Noe({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs==="modal"?(0,HN.jsx)(Roe,{data:e,field:t,onChange:r,validity:o}):(0,HN.jsx)(Ioe,{data:e,field:t,onChange:r,validity:o})}var Ad=s(A(),1),Boe=s(he(),1),bi=s(D(),1),GN=s(E(),1);var Q2=s(E(),1),Foe=s(C(),1);function Doe(e){if(!e)return 0;let t=0,r=Object.keys(e).filter(o=>o!=="children");for(let o of r)e[o]?.type==="invalid"&&t++;if(e.children)for(let o of Object.values(e.children))t+=Doe(o);return t}function J2({validity:e}){let t=Doe(e);return t===0?null:(0,Foe.jsx)(n6,{intent:"high",children:(0,Q2.sprintf)((0,Q2._n)("%d field needs attention","%d fields need attention",t),t)})}var Go=s(C(),1);function mRe(e,t,r){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"&&!r:!0:!1}function WN({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:a}=(0,bi.useContext)(Es),l=t.layout,c=(0,bi.useRef)(null),u=(0,Boe.useInstanceId)(WN,"dataforms-layouts-card-card-body"),d=(0,bi.useMemo)(()=>({layout:vn,fields:t.children??[]}),[t]),{isOpened:f,isCollapsible:m}=l,[h,g]=(0,bi.useState)(f),[v,y]=(0,bi.useState)(!1);(0,bi.useEffect)(()=>{g(f)},[f]);let b=(0,bi.useCallback)(()=>{g(k=>(k&&y(!0),!k))},[]),_=m?h:!0,S=(0,bi.useCallback)(()=>{y(!0)},[y]);Ed(c,_&&v);let T=Z2(l.summary,a).filter(k=>mRe(k,l.summary,_)),R=v&&l.isCollapsible?(0,Go.jsx)(J2,{validity:i}):null,F={blockStart:"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"},B=t.label,z,L;if(t.children)z=!!B&&l.withHeader,L=(0,Go.jsxs)(Go.Fragment,{children:[t.description&&(0,Go.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,Go.jsx)(yi,{data:e,form:d,onChange:r,validity:i?.children})]});else{let k=a.find(U=>U.id===t.id);if(!k||!k.Edit)return null;let I=Nm("regular")?.component;if(!I)return null;B=k.label,z=!!B&&l.withHeader,L=(0,Go.jsx)(I,{data:e,field:t,onChange:r,hideLabelFromVision:o||z,markWhenOptional:n,validity:i})}let M={blockStart:z?"none":"medium",blockEnd:"medium",inlineStart:"medium",inlineEnd:"medium"};return(0,Go.jsxs)(Ad.Card,{className:"dataforms-layouts-card__field",size:F,children:[z&&(0,Go.jsxs)(Ad.CardHeader,{className:"dataforms-layouts-card__field-header",onClick:m?b:void 0,style:{cursor:m?"pointer":void 0},isBorderless:!0,children:[(0,Go.jsxs)("div",{style:{height:m?void 0:"40px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Go.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:B}),R,T.length>0&&l.withHeader&&(0,Go.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:T.map(k=>(0,Go.jsx)(k.render,{item:e,field:k},k.id))})]}),m&&(0,Go.jsx)(Ad.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:_?Tv:Cv,"aria-expanded":_,"aria-controls":u,"aria-label":_?(0,GN.__)("Collapse"):(0,GN.__)("Expand")})]}),(_||!z)&&(0,Go.jsx)(Ad.CardBody,{id:u,size:M,className:"dataforms-layouts-card__field-control",ref:c,onBlur:S,children:L})]})}var Moe=s(A(),1);var Io=s(C(),1);function pRe({title:e}){return(0,Io.jsx)(it,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Io.jsx)(it,{direction:"row",align:"center",children:(0,Io.jsx)(Moe.__experimentalHeading,{level:2,size:13,children:e})})})}var hRe=({children:e})=>(0,Io.jsx)(Io.Fragment,{children:e});function Loe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let a=t.layout;if(t.children){let c={layout:vn,fields:t.children};return(0,Io.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Io.jsx)(pRe,{title:t.label}),(0,Io.jsx)(it,{direction:"row",align:a.alignment,gap:"lg",children:(0,Io.jsx)(yi,{data:e,form:c,onChange:r,validity:i?.children,as:hRe,children:(u,d,f)=>(0,Io.jsx)("div",{className:"dataforms-layouts-row__field-control",style:a.styles[d.id],children:(0,Io.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=Nm("regular")?.component;return l?(0,Io.jsx)(Io.Fragment,{children:(0,Io.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Io.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var Si=s(D(),1),Voe=s(E(),1);var zc=s(C(),1);function joe({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,Si.useContext)(Es),i=(0,Si.useRef)(null),a=(0,Si.useRef)(null),[l,c]=(0,Si.useState)(!1),[u,d]=(0,Si.useState)(!1),f=(0,Si.useMemo)(()=>({layout:vn,fields:t.children??[]}),[t]);(0,Si.useEffect)(()=>{let y=i.current;if(!y)return;let b=()=>{let _=y.open;_||c(!0),d(_)};return y.addEventListener("toggle",b),()=>{y.removeEventListener("toggle",b)}},[]),Ed(a,u&&l);let m=(0,Si.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(y=>y.id===h):void 0,v;return g&&g.render?v=(0,zc.jsx)(g.render,{item:e,field:g}):v=t.label||(0,Voe.__)("More details"),(0,zc.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,zc.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,zc.jsxs)(it,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,zc.jsx)(J2,{validity:o})]})}),(0,zc.jsx)("div",{ref:a,className:"dataforms-layouts-details__content",onBlur:m,children:(0,zc.jsx)(yi,{data:e,form:f,onChange:r,validity:o?.children})})]})}var Fm=s(C(),1),gRe=[{type:"regular",component:poe,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:Noe,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:WN,wrapper:({children:e})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Loe,wrapper:({children:e,layout:t})=>(0,Fm.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Fm.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Fm.jsx)(it,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:joe}];function Nm(e){return gRe.find(t=>t.type===e)}var $2=s(C(),1),vRe=({children:e})=>(0,$2.jsx)(it,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function yi({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:a}=(0,eE.useContext)(Es),l=(0,eE.useMemo)(()=>{let d=a.filter(m=>!!m.isValid?.required).length,f=a.length-d;return d>f},[a]);function c(d){return a.find(f=>f.id===d.id)}let u=i??Nm(t.layout.type)?.wrapper??vRe;return(0,$2.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Nm(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,o?.[d.id],l):(0,$2.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var qN=s(C(),1);function ZN({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,YN.useMemo)(()=>W2(t),[t]),a=(0,YN.useMemo)(()=>X0(r),[r]);return t.fields?(0,qN.jsx)(doe,{fields:a,children:(0,qN.jsx)(yi,{data:e,form:i,onChange:o,validity:n})}):null}var tE=s(A(),1);var Dm=s(C(),1);function KN({form:e,header:t}){let{media:r,fields:o,onChange:n}=i2();if(!r||!n)return(0,Dm.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,Dm.jsx)(tE.Spinner,{})});let i={layout:{type:"panel"},fields:o.map(l=>["title","alt_text","caption","description"].includes(l.id)?{id:l.id,layout:{type:"regular",labelPosition:"top"}}:l.id)};return(0,Dm.jsx)("div",{className:"media-editor-form",children:(0,Dm.jsxs)(tE.__experimentalVStack,{spacing:4,children:[t,(0,Dm.jsx)(ZN,{data:r,fields:o,form:e||i,onChange:n})]})})}var zoe=s(O(),1);var XN=s(C(),1);function QN(e){let{media:t}=(0,zoe.useSelect)(r=>({media:r(w).getCurrentPost()}),[]);return(0,XN.jsx)(Y0,{value:t,children:(0,XN.jsx)(SN,{...e})})}var dE=s(O(),1),sne=s(D(),1),ane=s(W(),1);var Uoe=s(D(),1),rE=s(O(),1);function yRe({postType:e}){let{registerPostTypeSchema:t}=N((0,rE.useDispatch)(w));(0,Uoe.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,rE.useSelect)(o=>{let{getEntityFields:n}=N(o(w));return{fields:n("postType",e)}},[e]);return r}var oE=yRe;var _i=s(A(),1);var ene=s(W(),1),tne=s(O(),1),rne=s(D(),1),Gc=s(E(),1),one=s(xh(),1);var cE=s(O(),1),t1=s(D(),1),Qoe=s(E(),1),tv=s(A(),1);var Joe=s(W(),1);var e1=s(O(),1),aE=s(D(),1),Koe=s(W(),1);var Rs=s(E(),1),Hoe=s(D(),1),Uc=s(A(),1),Jg=s(O(),1),iE=s(W(),1),Goe=s(ct(),1);var nE=s(ft(),1);function Qg(e){return typeof e.title=="string"?(0,nE.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,nE.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,nE.decodeEntities)(e.title.raw):""}var Od=s(C(),1),bRe=({items:e,closeModal:t})=>{let[r]=e,o=Qg(r),{showOnFront:n,currentHomePage:i,isSaving:a}=(0,Jg.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(iE.store),b=v("root","site"),_=v("postType","page",b?.page_on_front);return{showOnFront:b?.show_on_front,currentHomePage:_,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,Jg.useDispatch)(iE.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Jg.useDispatch)(Goe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,Rs.__)("Homepage updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,Rs.__)("An error occurred while setting the homepage.");u(y,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,Rs.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,Rs.sprintf)((0,Rs.__)('This will replace the current homepage: "%s"'),Qg(i)));let m=(0,Rs.sprintf)((0,Rs.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,Rs.__)("Set homepage");return(0,Od.jsx)("form",{onSubmit:d,children:(0,Od.jsxs)(Uc.__experimentalVStack,{spacing:"5",children:[(0,Od.jsx)(Uc.__experimentalText,{children:m}),(0,Od.jsxs)(Uc.__experimentalHStack,{justify:"right",children:[(0,Od.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,Rs.__)("Cancel")}),(0,Od.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Woe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,Jg.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(iE.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Hoe.useMemo)(()=>({id:"set-as-homepage",label:(0,Rs.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:bRe}),[t,e])};var As=s(E(),1),Yoe=s(D(),1),Hc=s(A(),1),$g=s(O(),1),sE=s(W(),1),qoe=s(ct(),1);var Id=s(C(),1),SRe=({items:e,closeModal:t})=>{let[r]=e,o=Qg(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:a}=(0,$g.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(sE.store),b=v("root","site");return{currentPostsPage:v("postType","page",b?.page_for_posts),isPageForPostsSet:b?.page_for_posts!==0,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,$g.useDispatch)(sE.store),{createSuccessNotice:c,createErrorNotice:u}=(0,$g.useDispatch)(qoe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,As.__)("Posts page updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,As.__)("An error occurred while setting the posts page.");u(y,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,As.sprintf)((0,As.__)('This will replace the current posts page: "%s"'),Qg(n)):(0,As.__)("This page will show the latest posts."),m=(0,As.sprintf)((0,As.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,As.__)("Set posts page");return(0,Id.jsx)("form",{onSubmit:d,children:(0,Id.jsxs)(Hc.__experimentalVStack,{spacing:"5",children:[(0,Id.jsx)(Hc.__experimentalText,{children:m}),(0,Id.jsxs)(Hc.__experimentalHStack,{justify:"right",children:[(0,Id.jsx)(Hc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:a,accessibleWhenDisabled:!0,children:(0,As.__)("Cancel")}),(0,Id.jsx)(Hc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:a,accessibleWhenDisabled:!0,children:h})]})]})})},Zoe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,$g.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(sE.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,Yoe.useMemo)(()=>({id:"set-as-posts-page",label:(0,As.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:SRe}),[t,e])};var Xoe=s(C(),1);function lE({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,e1.useSelect)(c=>{let{getEntityActions:u}=N(c(w));return{defaultActions:u("postType",e)}},[e]),n=(0,e1.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(Koe.store);if(!f("update",{kind:"root",name:"site"}))return!1;let h=u({slug:"front-page"});if(!h)return!0;let g=d("postType","wp_template",h);return g?g.slug!=="front-page":!0},[e]),i=Woe(),a=Zoe(),{registerPostTypeSchema:l}=N((0,e1.useDispatch)(w));return(0,aE.useEffect)(()=>{l(e)},[l,e]),(0,aE.useMemo)(()=>{let c=[...o];if(n&&c.push(i,a),c=c.sort((u,d)=>d.id==="move-to-trash"?-1:0),c=c.filter(u=>u.context?u.context===r:!0),t)for(let u=0;u<c.length;++u){if(c[u].callback){let d=c[u].callback;c[u]={...c[u],callback:(f,m)=>{d(f,{...m,onActionPerformed:h=>{m?.onActionPerformed&&m.onActionPerformed(h),t(c[u].id,h)}})}}}if(c[u].RenderModal){let d=c[u].RenderModal;c[u]={...c[u],RenderModal:f=>(0,Xoe.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,a,n])}var Wo=s(C(),1),{Menu:ev,kebabCase:_Re}=N(tv.privateApis);function $oe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,t1.useState)(null),{item:i,permissions:a}=(0,cE.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=N(d(Joe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,t1.useMemo)(()=>({...i,permissions:a}),[i,a]),c=lE({postType:e,onActionPerformed:r}),u=(0,t1.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,Wo.jsxs)(Wo.Fragment,{children:[(0,Wo.jsxs)(ev,{placement:"bottom-end",children:[(0,Wo.jsx)(ev.TriggerButton,{render:(0,Wo.jsx)(tv.Button,{size:"small",icon:Nr,label:(0,Qoe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,Wo.jsx)(ev.Popover,{children:(0,Wo.jsx)(CRe,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,Wo.jsx)(xRe,{action:o,items:[l],closeModal:()=>n(null)})]})}function wRe({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Wo.jsx)(ev.Item,{onClick:t,children:(0,Wo.jsx)(ev.ItemLabel,{children:o})})}function xRe({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,Wo.jsx)(tv.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${_Re(e.id)}`,children:(0,Wo.jsx)(e.RenderModal,{items:t,closeModal:r})})}function CRe({actions:e,items:t,setActiveModalAction:r}){let o=(0,cE.useRegistry)();return(0,Wo.jsx)(ev.Group,{children:e.map(n=>(0,Wo.jsx)(wRe,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var Wn=s(C(),1),{Badge:TRe}=N(_i.privateApis);function rv({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,rne.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:a,icon:l,labels:c,isRevision:u}=(0,tne.useSelect)(m=>{let{getEditedEntityRecord:h,getCurrentTheme:g,getPostType:v}=m(ene.store),{getPostIcon:y,getCurrentPostType:b,isRevisionsMode:_,getCurrentRevision:S}=N(m(w)),x="";if(_()){let R=b(),F=S();return x=F?.title?.rendered||F?.title?.raw||"",{postTitle:x,icon:y(R,{area:F?.area}),labels:v(R)?.labels,isRevision:!0}}let T=h("postType",e,i[0]);if(i.length===1){let{default_template_types:R=[]}=g()??{};x=([xt,Ur].includes(e)?Zi({template:T,templateTypes:R}):{})?.title||T?.title}return{postTitle:x,icon:y(e,{area:T?.area}),labels:v(e)?.labels}},[i,e]),d=Qx(t),f=(0,Gc.__)("No title");return c?.name&&i.length>1?f=(0,Gc.sprintf)((0,Gc.__)("%1$d %2$s"),i.length,c?.name):a&&(f=(0,one.__unstableStripHTML)(a)),(0,Wn.jsxs)(_i.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,Wn.jsxs)(_i.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,Wn.jsx)(_i.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,Wn.jsxs)(_i.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,Wn.jsx)("span",{className:"editor-post-card-panel__title-name",children:f}),d&&i.length===1&&(0,Wn.jsx)(TRe,{children:d})]}),!r&&i.length===1&&(0,Wn.jsx)(Wn.Fragment,{children:u?(0,Wn.jsx)(_i.Button,{size:"small",icon:Nr,label:(0,Gc.__)("Actions"),disabled:!0,accessibleWhenDisabled:!0,className:"editor-all-actions-button"}):(0,Wn.jsx)($oe,{postType:e,postId:i[0],onActionPerformed:o})}),n&&(0,Wn.jsx)(_i.Button,{size:"small",icon:RR,label:(0,Gc.__)("Close"),onClick:n})]}),i.length>1&&(0,Wn.jsx)(_i.__experimentalText,{className:"editor-post-card-panel__description",children:(0,Gc.sprintf)((0,Gc.__)("Changes will be applied to all selected %s."),c?.name.toLowerCase())})]})}var nne=s(A(),1),ine=s(C(),1);function PRe({className:e,children:t}){return(0,ine.jsx)(nne.__experimentalVStack,{className:re("editor-post-panel__section",e),children:t})}var uE=PRe;var r1=s(C(),1);function JN({onActionPerformed:e}){let{media:t,postType:r,postId:o}=(0,dE.useSelect)(c=>{let u=c(w).getCurrentPostType(),d=c(w).getCurrentPostId();return{media:c(ane.store).getEditedEntityRecord("postType",u,d,{_embed:"author,wp:attached-to"}),postType:u,postId:d}},[]),{editPost:n}=(0,dE.useDispatch)(w),i=oE({postType:"attachment"}),a=(0,sne.useMemo)(()=>({fields:i}),[i]);return(0,r1.jsx)(uE,{className:"editor-media-metadata-panel",children:(0,r1.jsx)(Y0,{value:t,settings:a,onChange:c=>{n(c)},children:(0,r1.jsx)(KN,{header:(0,r1.jsx)(rv,{postType:r,postId:o,onActionPerformed:e})})})})}var Ot=s(C(),1),lne={header:(0,Nd.__)("Editor top bar"),body:(0,Nd.__)("Editor content"),sidebar:(0,Nd.__)("Editor settings"),actions:(0,Nd.__)("Editor publish"),footer:(0,Nd.__)("Editor footer")},cne=()=>(0,Ot.jsx)(mne.InlineNotices,{pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:(0,Ot.jsx)(CC,{})});function pne({className:e,children:t,forceIsDirty:r,contentRef:o,disableIframe:n,autoFocus:i,customSaveButton:a,customSavePanel:l,forceDisableBlockTools:c,iframeProps:u}){let{mode:d,postId:f,postType:m,isAttachment:h,isInserterOpened:g,isListViewOpened:v,isDistractionFree:y,isPreviewMode:b,showBlockBreadcrumbs:_,postTypeLabel:S,stylesPath:x,showStylebook:T,isRevisionsMode:R,showDiff:F}=(0,fE.useSelect)(Z=>{let{get:V}=Z(une.store),{getEditorSettings:j,getPostTypeLabel:H,getCurrentPostType:X,getCurrentPostId:ae}=Z(w),{getStylesPath:ne,getShowStylebook:ue,isRevisionsMode:Ye,isShowingRevisionDiff:ye}=N(Z(w)),oe=j(),ge=Z(w).getEditorMode();return!oe.richEditingEnabled&&ge==="visual"&&(ge="text"),!oe.codeEditingEnabled&&ge==="text"&&(ge="visual"),{mode:ge,postId:ae(),postType:X(),isInserterOpened:Z(w).isInserterOpened(),isListViewOpened:Z(w).isListViewOpened(),isDistractionFree:V("core","distractionFree"),isPreviewMode:oe.isPreviewMode,showBlockBreadcrumbs:V("core","showBlockBreadcrumbs"),postTypeLabel:H(),stylesPath:ne(),showStylebook:ue(),isAttachment:X()==="attachment"&&window?.__experimentalMediaEditor,isRevisionsMode:Ye(),showDiff:ye()}},[]),{setShowRevisionDiff:B}=N((0,fE.useDispatch)(w));Jee(f,m);let z=(0,dne.useViewportMatch)("medium"),L=v?(0,Nd.__)("Document Overview"):(0,Nd.__)("Block Library"),M=!!h,k=!h&&(T||x?.startsWith("/revisions")),I=!M&&!k,[U,G]=(0,pE.useState)(!1),Y=(0,pE.useCallback)(Z=>{typeof U=="function"&&U(Z),G(!1)},[U]);return R?(0,Ot.jsx)(ib,{className:re("editor-editor-interface",e),labels:lne,header:(0,Ot.jsx)(iN,{showDiff:F,onToggleDiff:()=>B(!F)}),content:(0,Ot.jsx)(pN,{}),sidebar:(0,Ot.jsx)(ql.Slot,{scope:"core"})}):(0,Ot.jsx)(ib,{isDistractionFree:y,className:re("editor-editor-interface",e,{"is-entity-save-view-open":!!U,"is-distraction-free":y&&!b}),labels:{...lne,secondarySidebar:L},header:!b&&(0,Ot.jsx)(tee,{forceIsDirty:r,setEntitiesSavedStatesCallback:G,customSaveButton:a,forceDisableBlockTools:c}),editorNotices:(0,Ot.jsx)(cne,{}),secondarySidebar:!h&&!b&&d==="visual"&&(g&&(0,Ot.jsx)(iee,{})||v&&(0,Ot.jsx)(cee,{})),sidebar:!b&&!y&&(0,Ot.jsx)(ql.Slot,{scope:"core"}),content:(0,Ot.jsxs)(Ot.Fragment,{children:[!y&&!b&&(0,Ot.jsx)(cne,{}),M&&(0,Ot.jsx)(QN,{...u}),k&&(0,Ot.jsx)(CW,{}),I&&(0,Ot.jsxs)(Ot.Fragment,{children:[!b&&d==="text"&&(0,Ot.jsx)(ote,{autoFocus:i}),!b&&!z&&d==="visual"&&(0,Ot.jsx)(mE.BlockToolbar,{hideDragHandle:!0}),(b||d==="visual")&&(0,Ot.jsx)(Kk,{contentRef:o,disableIframe:n,autoFocus:i,iframeProps:u}),t,(0,Ot.jsx)(Ek,{postId:f,postType:m})]})]}),footer:!b&&!y&&z&&_&&d==="visual"&&(0,Ot.jsx)(mE.BlockBreadcrumb,{rootLabelText:S?(0,fne.decodeEntities)(S):void 0}),actions:b?void 0:l||(0,Ot.jsx)(ete,{closeEntitiesSavedStates:Y,isEntitiesSavedStatesOpen:U,setEntitiesSavedStatesCallback:G,forceIsDirtyPublishPanel:r})})}var AE=s($(),1),l1=s(O(),1),hl=s(D(),1),cv=s(E(),1);var jie=s(Oi(),1),zie=s(A(),1);var hne=s(O(),1),gne=s(Ls(),1);var vne=s(C(),1),{OverridesPanel:kRe}=N(gne.privateApis);function yne(){return(0,hne.useSelect)(t=>t(w).getCurrentPostType()==="wp_block",[])?(0,vne.jsx)(kRe,{}):null}var Bm=s(A(),1),Kne=s(O(),1),Xne=s(E(),1),Qne=s(Ir(),1);var bne=s(A(),1),Sne=s(O(),1),Os=s(E(),1),_ne=s(k0(),1),wne=s(D(),1),$N=s(W(),1);var eF=s(C(),1),ERe=189;function xne(){let{postContent:e}=(0,Sne.useSelect)(a=>{let{getEditedPostAttribute:l,getCurrentPostType:c,getCurrentPostId:u}=a(w),{getCurrentRevision:d,isRevisionsMode:f}=N(a(w));if(f())return{postContent:d()?.content?.raw};let{canUser:m}=a($N.store),{getEntityRecord:h}=a($N.store),g=m("read",{kind:"root",name:"site"})?h("root","site"):void 0,v=c();return{postContent:!(+u()===g?.page_for_posts)&&![xt,Ur].includes(v)&&l("content")}},[]),t=(0,Os._x)("words","Word count type. Do not translate!"),r=(0,wne.useMemo)(()=>e?(0,_ne.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/ERe),n=(0,Os.sprintf)((0,Os._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,Os.__)("1 minute"):(0,Os.sprintf)((0,Os._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,eF.jsx)("div",{className:"editor-post-content-information",children:(0,eF.jsx)(bne.__experimentalText,{children:(0,Os.sprintf)((0,Os.__)("%1$s, %2$s read time."),n,i)})})}var hE=s(A(),1),ov=s(E(),1),Cne=s(O(),1),gE=s(D(),1),Tne=s($(),1);var Wc=s(C(),1);function RRe(){let{postFormat:e}=(0,Cne.useSelect)(i=>{let{getEditedPostAttribute:a}=i(w);return{postFormat:a("format")??"standard"}},[]),t=i0.find(i=>i.id===e),[r,o]=(0,gE.useState)(null),n=(0,gE.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,Wc.jsx)(Kh,{children:(0,Wc.jsx)(ht,{label:(0,ov.__)("Format"),ref:o,children:(0,Wc.jsx)(hE.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:a})=>(0,Wc.jsx)(hE.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,ov.sprintf)((0,ov.__)("Change format: %s"),t?.caption),onClick:a,children:t?.caption}),renderContent:({onClose:i})=>(0,Wc.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,Wc.jsx)(Tne.__experimentalInspectorPopoverHeader,{title:(0,ov.__)("Format"),onClose:i}),(0,Wc.jsx)(s0,{})]})})})})}var Pne=RRe;var kne=s(A(),1),Ene=s(O(),1),vE=s(E(),1),Rne=s(po(),1);var tF=s(C(),1);function Ane(){let e=(0,Ene.useSelect)(t=>t(w).getEditedPostAttribute("modified"),[]);return e?(0,tF.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,tF.jsx)(kne.__experimentalText,{children:(0,vE.sprintf)((0,vE.__)("Last edited %s."),(0,Rne.humanTimeDiff)(e))})}):null}var One=s(A(),1),Ine=s(O(),1),yE=s(E(),1),Nne=s(po(),1);var rF=s(C(),1);function Fne(){let e=(0,Ine.useSelect)(t=>{let{getCurrentRevision:r}=N(t(w));return r()?.date},[]);return e?(0,rF.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,rF.jsx)(One.__experimentalText,{children:(0,yE.sprintf)((0,yE.__)("Created %s."),(0,Nne.humanTimeDiff)(e))})}):null}var Yc=s(E(),1),Dne=s(he(),1),bE=s(O(),1),oF=s(W(),1),Bne=s(ft(),1),nv=s(A(),1),SE=s(D(),1),Mne=s($(),1);var fl=s(C(),1),ARe={};function Lne(){let{editEntityRecord:e}=(0,bE.useDispatch)(oF.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,bE.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(oF.store),g=h("read",{kind:"root",name:"site"})?f("root","site"):void 0,v=g?.page_for_posts?m("postType","page",g?.page_for_posts):ARe,{getEditedPostAttribute:y,getCurrentPostType:b}=d(w);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:b()===xt,postSlug:y("slug")}},[]),[i,a]=(0,SE.useState)(null),l=(0,SE.useMemo)(()=>({anchor:i,placement:"left-start",offset:36,shift:!0}),[i]);if(!o||!["home","index"].includes(n)||!r)return null;let c=d=>{e("postType","page",r,{title:d})},u=(0,Bne.decodeEntities)(t);return(0,fl.jsx)(ht,{label:(0,Yc.__)("Blog title"),ref:a,children:(0,fl.jsx)(nv.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,fl.jsx)(nv.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,Yc.sprintf)((0,Yc.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,fl.jsxs)(fl.Fragment,{children:[(0,fl.jsx)(Mne.__experimentalInspectorPopoverHeader,{title:(0,Yc.__)("Blog title"),onClose:d}),(0,fl.jsx)(nv.__experimentalInputControl,{placeholder:(0,Yc.__)("No title"),size:"__unstable-large",value:t,onChange:(0,Dne.debounce)(c,300),label:(0,Yc.__)("Blog title"),help:(0,Yc.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var iv=s(E(),1),_E=s(O(),1),nF=s(W(),1),sv=s(A(),1),wE=s(D(),1),Vne=s($(),1);var ml=s(C(),1);function jne(){let{editEntityRecord:e}=(0,_E.useDispatch)(nF.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,_E.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(w),{getEditedEntityRecord:f,canUser:m}=c(nF.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===xt,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,wE.useState)(null),a=(0,wE.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{posts_per_page:c})};return(0,ml.jsx)(ht,{label:(0,iv.__)("Posts per page"),ref:i,children:(0,ml.jsx)(sv.Dropdown,{popoverProps:a,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,ml.jsx)(sv.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,iv.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,ml.jsxs)(ml.Fragment,{children:[(0,ml.jsx)(Vne.__experimentalInspectorPopoverHeader,{title:(0,iv.__)("Posts per page"),onClose:c}),(0,ml.jsx)(sv.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,iv.__)("Posts per page"),help:(0,iv.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var wi=s(E(),1),xE=s(O(),1),iF=s(W(),1),pl=s(A(),1),CE=s(D(),1),zne=s($(),1);var Is=s(C(),1),ORe=[{label:(0,wi._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,wi.__)("Visitors can add new comments and replies.")},{label:(0,wi.__)("Closed"),value:"",description:[(0,wi.__)("Visitors cannot add new comments or replies."),(0,wi.__)("Existing comments remain visible.")].join(" ")}];function Une(){let{editEntityRecord:e}=(0,xE.useDispatch)(iF.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,xE.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(w),{getEditedEntityRecord:f,canUser:m}=c(iF.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===xt,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,CE.useState)(null),a=(0,CE.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{default_comment_status:c?"open":null})};return(0,Is.jsx)(ht,{label:(0,wi.__)("Discussion"),ref:i,children:(0,Is.jsx)(pl.Dropdown,{popoverProps:a,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,Is.jsx)(pl.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,wi.__)("Change discussion settings"),onClick:u,children:t?(0,wi.__)("Comments open"):(0,wi.__)("Comments closed")}),renderContent:({onClose:c})=>(0,Is.jsxs)(Is.Fragment,{children:[(0,Is.jsx)(zne.__experimentalInspectorPopoverHeader,{title:(0,wi.__)("Discussion"),onClose:c}),(0,Is.jsxs)(pl.__experimentalVStack,{spacing:3,children:[(0,Is.jsx)(pl.__experimentalText,{children:(0,wi.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,Is.jsx)(pl.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,wi.__)("Comment status"),options:ORe,onChange:l,selected:t})]})]})})})}var Hne=s(O(),1),Gne=s(W(),1),Wne=s(ft(),1),Yne=s(E(),1);var qne=s(C(),1);function Zne(){let e=(0,Hne.useSelect)(t=>{let{getCurrentRevision:r}=N(t(w)),o=r();return o?.author?t(Gne.store).getUser(o.author)?.name:null},[]);return e?(0,qne.jsx)(ht,{label:(0,Yne.__)("Author"),children:(0,Wne.decodeEntities)(e)}):null}var nt=s(C(),1),IRe="post-status";function Jne({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o,revisionId:n}=(0,Kne.useSelect)(l=>{let{isEditorPanelRemoved:c,getCurrentPostType:u,getCurrentPostId:d,getCurrentRevisionId:f}=N(l(w));return{isRemovedPostStatusPanel:c(IRe),postType:u(),postId:d(),revisionId:f()}},[]),i=!!n,a=!t&&!i;return(0,nt.jsx)(uE,{className:"editor-post-summary",children:(0,nt.jsx)(ZC.Slot,{children:l=>(0,nt.jsx)(nt.Fragment,{children:(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:4,children:[(0,nt.jsx)(rv,{postType:r,postId:o,onActionPerformed:e}),!i&&(0,nt.jsx)(kT,{withPanelBody:!1}),!i&&(0,nt.jsx)(TZ,{}),(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:1,children:[(0,nt.jsx)(xne,{}),i?(0,nt.jsx)(Fne,{}):(0,nt.jsx)(Ane,{})]}),i&&n&&(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(Bm.ExternalLink,{href:(0,Qne.addQueryArgs)("revision.php",{revision:n}),children:(0,Xne.__)("Open classic revisions screen")}),(0,nt.jsx)(Zne,{})]}),a&&(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:4,children:[(0,nt.jsxs)(Bm.__experimentalVStack,{spacing:1,children:[(0,nt.jsx)(y4,{}),(0,nt.jsx)(yP,{}),(0,nt.jsx)(ZP,{}),(0,nt.jsx)(aT,{}),(0,nt.jsx)(eT,{}),(0,nt.jsx)(vT,{}),(0,nt.jsx)(UZ,{}),(0,nt.jsx)(DC,{}),(0,nt.jsx)(_P,{}),(0,nt.jsx)(Lne,{}),(0,nt.jsx)(jne,{}),(0,nt.jsx)(Une,{}),(0,nt.jsx)(Pne,{}),l]}),(0,nt.jsx)(zP,{onActionPerformed:e})]})]})})})})}var tie=s(BI(),1),rie=s(O(),1),oie=s(D(),1),nie=s(E(),1);var $ne=s(A(),1);var Mm=s(C(),1);function TE({title:e,entries:t,initialOpen:r}){if(!t)return null;let o=Object.entries(t).map(([n,i])=>(0,Mm.jsx)(ht,{label:n,children:(0,Mm.jsx)("span",{className:"editor-revision-fields-diff__value",children:i.map((a,l)=>a.added?(0,Mm.jsx)("ins",{className:"editor-revision-fields-diff__added",children:a.value},l):a.removed?(0,Mm.jsx)("del",{className:"editor-revision-fields-diff__removed",children:a.value},l):(0,Mm.jsx)("span",{children:a.value},l))})},n));return(0,Mm.jsx)($ne.PanelBody,{title:e,initialOpen:r,children:o})}var iie=s(C(),1);function eie(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function sie(){let{revision:e,previousRevision:t}=(0,rie.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=N(o(w));return{revision:n(),previousRevision:i()}},[]),r=(0,oie.useMemo)(()=>{if(!e)return null;let o=e.meta??{},n=t?.meta??{},i=new Set([...Object.keys(o),...Object.keys(n)]),a={};for(let l of i){let c=eie(o[l]),u=eie(n[l]);!c&&!u||(a[l]=(0,tie.diffWords)(u,c))}return Object.keys(a).length===0?null:a},[e,t]);return(0,iie.jsx)(TE,{title:(0,nie.__)("Meta"),entries:r,initialOpen:!1})}var n1=s(O(),1),aF=s(W(),1),mie=s(A(),1),lF=s(E(),1),pie=s($(),1),hie=s(Xe(),1);var aie=s(O(),1),lie=s(D(),1),sF=s(W(),1),cie=s(Xe(),1),uie=s(Ls(),1);var{EXCLUDED_PATTERN_SOURCES:NRe,PATTERN_TYPES:FRe}=N(uie.privateApis);function die(e,t){return e.innerBlocks=e.innerBlocks.map(r=>die(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function DRe(e,t){let r=(i,a,l)=>a===l.findIndex(c=>i.name===c.name),o=i=>t.area==="navigation-overlay"&&i.blockTypes?.includes("core/template-part/navigation-overlay")?!0:!NRe.includes(i.source),n=i=>i.templateTypes?.includes(t.slug)||i.blockTypes?.includes("core/template-part/"+t.area);return e.filter((i,a,l)=>r(i,a,l)&&o(i)&&n(i))}function BRe(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:FRe.theme,blocks:(0,cie.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>die(o,t))}))}function fie({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,aie.useSelect)(a=>{let{getEditorSettings:l}=a(w),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:a(sF.store).getBlockPatterns(),currentThemeStylesheet:a(sF.store).getCurrentTheme().stylesheet}},[]);return(0,lie.useMemo)(()=>{let a=[...o||[],...n||[]],l=DRe(a,{area:e,name:t,slug:r});return BRe(l,i)},[e,t,r,o,n,i])}var o1=s(C(),1);function MRe({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,o1.jsx)(pie.__experimentalBlockPatternsList,{label:(0,lF.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function LRe(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,n1.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(w),{getEditedEntityRecord:f}=c(aF.store),m=u(),h=d(),g=f("postType",m,h);return{area:g?.area,name:g?.name,slug:g?.slug,postType:m,postId:h}},[]),{editEntityRecord:i}=(0,n1.useDispatch)(aF.store),a=fie({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,hie.serialize)(c.blocks)})};return a?.length?(0,o1.jsx)(mie.PanelBody,{title:(0,lF.__)("Design"),initialOpen:o===Ur,children:(0,o1.jsx)(MRe,{availableTemplates:a,onSelect:l})}):null}function gie(){let{postType:e}=(0,n1.useSelect)(t=>{let{getCurrentPostType:r}=t(w);return{postType:r()}},[]);return[Ur,xt].includes(e)?(0,o1.jsx)(LRe,{}):null}var vie=s(A(),1),i1=s(E(),1),yie=s(O(),1),bie=s(D(),1),Sie=s(ft(),1);var s1=s(C(),1),{Tabs:cF}=N(vie.privateApis),VRe=(e,t)=>{let{postTypeLabel:r,isAttachment:o,isRevisionsMode:n}=(0,yie.useSelect)(a=>{let{getPostTypeLabel:l,getCurrentPostType:c}=a(w),{isRevisionsMode:u}=N(a(w));return{postTypeLabel:l(),isAttachment:c()===ur&&window?.__experimentalMediaEditor,isRevisionsMode:u()}},[]),i;return n?i=(0,i1.__)("Revision"):r?i=(0,Sie.decodeEntities)(r):i=(0,i1._x)("Document","noun, panel"),(0,s1.jsxs)(cF.TabList,{ref:t,children:[(0,s1.jsx)(cF.Tab,{tabId:mi.document,"data-tab-id":mi.document,children:i}),!o&&(0,s1.jsx)(cF.Tab,{tabId:mi.block,"data-tab-id":mi.block,children:(0,i1.__)("Block")})]})},_ie=(0,bie.forwardRef)(VRe);var a1=s(O(),1),wie=s($(),1),xie=s(A(),1),Cie=s(E(),1);var PE=s(C(),1),{BlockQuickNavigation:jRe}=N(wie.privateApis),zRe="core/template-part";function URe({postType:e}){let t=pw(),r=(0,a1.useSelect)(n=>{let{getPostBlocksByName:i}=N(n(w));return i(xt===e?zRe:t)},[e,t]),{enableComplementaryArea:o}=(0,a1.useDispatch)(Ce);return r.length===0?null:(0,PE.jsx)(xie.PanelBody,{title:(0,Cie.__)("Content"),children:(0,PE.jsx)(jRe,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function Tie(){let{postType:e,renderingMode:t}=(0,a1.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=N(r(w));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==xt?null:(0,PE.jsx)(URe,{postType:e})}var kE=s(O(),1),Pie=s(D(),1),kie=s(Xe(),1),RE=s($(),1),Eie=s(A(),1),Rie=s(E(),1);var EE=s(C(),1),{BlockQuickNavigation:HRe}=N(RE.privateApis);function GRe(){let e=(0,kE.useSelect)(o=>{let{getBlockTypes:n}=o(kie.store);return n()},[]),t=(0,Pie.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,kE.useSelect)(o=>{let{getBlocksByName:n}=o(RE.store);return n(t)},[t]);return r.length===0?null:(0,EE.jsx)(Eie.PanelBody,{title:(0,Rie.__)("Content"),children:(0,EE.jsx)(HRe,{clientIds:r})})}function Aie(){return(0,kE.useSelect)(t=>{let{getCurrentPostType:r}=t(w);return r()},[])!==Ur?null:(0,EE.jsx)(GRe,{})}var Oie=s($(),1),Iie=s(O(),1),Nie=s(E(),1);var Fie=s(C(),1);function Die(){let{block:e}=(0,Iie.useSelect)(r=>{let{getSelectedBlock:o}=r(Oie.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,Fie.jsx)(TE,{title:(0,Nie.__)("Changed attributes"),entries:t,initialOpen:!0})}var av=s(O(),1),Bie=s(D(),1),Mie=s($(),1),Lie=s(lt(),1);function WRe(){let{hasBlockSelection:e}=(0,av.useSelect)(n=>({hasBlockSelection:!!n(Mie.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,av.useSelect)(Ce),{enableComplementaryArea:r}=(0,av.useDispatch)(Ce),{get:o}=(0,av.useSelect)(Lie.store);(0,Bie.useEffect)(()=>{let n=t("core"),i=["edit-post/document","edit-post/block"].includes(n),a=o("core","distractionFree");!i||a||(e?r("core","edit-post/block"):r("core","edit-post/document"))},[e,t,r,o])}var Vie=WRe;var qt=s(C(),1),{Tabs:lv}=N(zie.privateApis),YRe=hl.Platform.select({web:!0,native:!1}),qRe=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o,postType:n})=>{let i=(0,hl.useRef)(null),a=(0,hl.useContext)(lv.Context),l=n===ur,c=(0,l1.useSelect)(u=>N(u(w)).isRevisionsMode());return(0,hl.useEffect)(()=>{let u=Array.from(i.current?.querySelectorAll('[role="tab"]')||[]),d=u.find(h=>h.getAttribute("data-tab-id")===e),f=d?.ownerDocument.activeElement;u.some(h=>f&&f.id===h.id)&&d&&d.id!==f?.id&&d?.focus()},[e]),(0,qt.jsx)(nm,{identifier:e,header:(0,qt.jsx)(lv.Context.Provider,{value:a,children:(0,qt.jsx)(_ie,{ref:i})}),closeLabel:(0,cv.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,cv._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,cv.isRTL)()?zd:Ud,isActiveByDefault:YRe,children:(0,qt.jsxs)(lv.Context.Provider,{value:a,children:[(0,qt.jsx)(lv.TabPanel,{tabId:mi.document,focusable:!1,children:l?(0,qt.jsx)(JN,{onActionPerformed:r}):(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(Jne,{onActionPerformed:r}),c&&(0,qt.jsx)(sie,{}),!c&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(GC.Slot,{}),(0,qt.jsx)(Tie,{}),(0,qt.jsx)(Aie,{}),(0,qt.jsx)(gie,{}),(0,qt.jsx)(CP,{}),(0,qt.jsx)(yne,{}),o]})]})}),!l&&(0,qt.jsxs)(lv.TabPanel,{tabId:mi.block,focusable:!1,children:[(0,qt.jsx)(AE.BlockInspector,{}),c&&(0,qt.jsx)(Die,{})]})]})})},ZRe=({extraPanels:e,onActionPerformed:t})=>{Vie();let{tabName:r,keyboardShortcut:o,showSummary:n,postType:i}=(0,l1.useSelect)(c=>{let u=c(jie.store).getShortcutRepresentation("core/editor/toggle-sidebar"),d=c(Ce).getActiveComplementaryArea("core"),f=[mi.block,mi.document].includes(d),m=d;f||(m=c(AE.store).getBlockSelectionStart()?mi.block:mi.document);let h=c(w).getCurrentPostType();return{tabName:m,keyboardShortcut:u,showSummary:![xt,Ur,jd].includes(h),postType:h}},[]),{enableComplementaryArea:a}=(0,l1.useDispatch)(Ce),l=(0,hl.useCallback)(c=>{c&&a("core",c)},[a]);return(0,qt.jsx)(lv,{selectedTabId:r,onSelect:l,selectOnMove:!1,children:(0,qt.jsx)(qRe,{tabName:r,keyboardShortcut:o,showSummary:n,onActionPerformed:t,extraPanels:e,postType:i})})},Uie=ZRe;var gv=s(E(),1),bl=s(O(),1),yse=s(A(),1),bse=s(D(),1),Sse=s(he(),1),_se=s(Oi(),1);var hF=s($(),1);var wse=s(lt(),1);var uv="edit-post/collab-history-sidebar",Fd="edit-post/collab-sidebar",uF=[uv,Fd];var uo=s(D(),1),ar=s(A(),1),ase=s(he(),1);var gt=s(E(),1),Zc=s(O(),1),lse=s(xh(),1),mv=s($(),1);var OE=s(A(),1),IE=s(E(),1),vl=s(po(),1),Hie=s(W(),1),Gie=s(O(),1),Wie=s($(),1);var gl=s(C(),1);function KRe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,vl.getSettings)(),{currentUserAvatar:a,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,Gie.useSelect)(v=>{let{canUser:y,getCurrentUser:b,getEntityRecord:_}=v(Hie.store),S=y("read",{kind:"root",name:"site"})?_("root","site"):void 0;if(n)return{dateFormat:S?.date_format};let{getSettings:x}=v(Wie.store),{__experimentalDiscussionSettings:T}=x(),R=T?.avatarURL,F=b();return{currentUserAvatar:F?.avatar_urls?.[48]??R,currentUserName:F?.name,currentUserId:F?.id,dateFormat:S?.date_format}},[n]),d=(0,vl.getDate)(r),f=(0,vl.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,vl.humanTimeDiff)(d):(0,vl.dateI18n)(u,d),g=(0,vl.dateI18n)((0,IE._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,gl.jsxs)(gl.Fragment,{children:[(0,gl.jsx)("img",{src:e||a,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,IE.__)("User avatar"),width:32,height:32,style:{borderColor:ws(o??c)}}),(0,gl.jsxs)(OE.__experimentalVStack,{spacing:"0",children:[(0,gl.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,gl.jsx)(OE.Tooltip,{text:g,children:(0,gl.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})})]})]})}var c1=KRe;var Yie=s(x4(),1),qie=s(D(),1),Ns=s(A(),1),dF=s(E(),1),NE=s(he(),1),Zie=s(yo(),1);var yl=s(C(),1);function Kie({onSubmit:e,onCancel:t,thread:r,submitButtonText:o,labelText:n,reflowComments:i=Og}){let[a,l]=(0,qie.useState)(r?.content?.raw??""),c=(0,NE.useDebounce)(i,100),u=m=>{l(m)},d=(0,NE.useInstanceId)(Kie,"comment-input"),f=a===r?.content?.raw||!x$(a).length;return(0,yl.jsxs)(Ns.__experimentalVStack,{className:"editor-collab-sidebar-panel__comment-form",spacing:"4",as:"form",onSubmit:m=>{m.preventDefault(),e(a),l("")},children:[(0,yl.jsx)(Ns.VisuallyHidden,{as:"label",htmlFor:d,children:n??(0,dF.__)("Note")}),(0,yl.jsx)(Yie.default,{id:d,value:a??"",onChange:m=>{u(m.target.value),c()},rows:1,maxRows:20,onKeyDown:m=>{Zie.isKeyboardEvent.primary(m,"Enter")&&!f&&m.target.parentNode.requestSubmit(),m.key==="Escape"&&(m.preventDefault(),t(m))}}),(0,yl.jsxs)(Ns.__experimentalHStack,{spacing:"2",justify:"flex-end",wrap:!0,children:[(0,yl.jsx)(Ns.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,yl.jsx)(Ns.__experimentalTruncate,{children:(0,dF.__)("Cancel")})}),(0,yl.jsx)(Ns.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:f,children:(0,yl.jsx)(Ns.__experimentalTruncate,{children:o})})]})]})}var u1=Kie;var Qr=s(Jn(),1),BE=s(Jn(),1),Jie=s(s5(),1);var FE=typeof document<"u"?BE.useLayoutEffect:BE.useEffect;function DE(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 r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!DE(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let i=n[o];if(!(i==="_owner"&&e.$$typeof)&&!DE(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $ie(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xie(e,t){let r=$ie(e);return Math.round(t*r)/r}function Qie(e){let t=Qr.useRef(e);return FE(()=>{t.current=e}),t}function ese(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=Qr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=Qr.useState(o);DE(m,o)||h(o);let[g,v]=Qr.useState(null),[y,b]=Qr.useState(null),_=Qr.useCallback(Z=>{Z!==R.current&&(R.current=Z,v(Z))},[]),S=Qr.useCallback(Z=>{Z!==F.current&&(F.current=Z,b(Z))},[]),x=i||g,T=a||y,R=Qr.useRef(null),F=Qr.useRef(null),B=Qr.useRef(d),z=c!=null,L=Qie(c),M=Qie(n),k=Qr.useCallback(()=>{if(!R.current||!F.current)return;let Z={placement:t,strategy:r,middleware:m};M.current&&(Z.platform=M.current),o6(R.current,F.current,Z).then(V=>{let j={...V,isPositioned:!0};I.current&&!DE(B.current,j)&&(B.current=j,Jie.flushSync(()=>{f(j)}))})},[m,t,r,M]);FE(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,f(Z=>({...Z,isPositioned:!1})))},[u]);let I=Qr.useRef(!1);FE(()=>(I.current=!0,()=>{I.current=!1}),[]),FE(()=>{if(x&&(R.current=x),T&&(F.current=T),x&&T){if(L.current)return L.current(x,T,k);k()}},[x,T,k,L,z]);let U=Qr.useMemo(()=>({reference:R,floating:F,setReference:_,setFloating:S}),[_,S]),G=Qr.useMemo(()=>({reference:x,floating:T}),[x,T]),Y=Qr.useMemo(()=>{let Z={position:r,left:0,top:0};if(!G.floating)return Z;let V=Xie(G.floating,d.x),j=Xie(G.floating,d.y);return l?{...Z,transform:"translate("+V+"px, "+j+"px)",...$ie(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:j}},[r,l,G.floating,d.x,d.y]);return Qr.useMemo(()=>({...d,update:k,refs:U,elements:G,floatingStyles:Y}),[d,k,U,G,Y])}var qc=s(E(),1),Sa=s(D(),1),ME=s(W(),1),_a=s(O(),1),Lm=s($(),1),tse=s(ct(),1),rse=s(ft(),1);var{useBlockElement:XRe,cleanEmptyObject:QRe}=N(Lm.privateApis);function ose(e){let[t,r]=(0,Sa.useReducer)(()=>Date.now(),0),o={post:e,type:"note",status:"all",per_page:-1},{records:n}=(0,ME.useEntityRecords)("root","comment",o,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:i}=(0,_a.useSelect)(Lm.store),{clientIds:a}=(0,_a.useSelect)(u=>{let{getClientIdsWithDescendants:d}=u(Lm.store);return{clientIds:d()}},[]),{resultComments:l,unresolvedSortedThreads:c}=(0,Sa.useMemo)(()=>{if(!n||n.length===0)return{resultComments:[],unresolvedSortedThreads:[]};let u=a.reduce((x,T)=>{let R=i(T)?.metadata?.noteId;return R&&(x[T]=R),x},{}),d={},f=[],m=Object.keys(u).reduce((x,T)=>(x[u[T]]=T,x),{});if(n.forEach(x=>{let T=m[x.id];d[x.id]={...x,reply:[],blockClientId:x.parent===0?T:null}}),n.forEach(x=>{x.parent===0?f.push(d[x.id]):d[x.parent]&&d[x.parent].reply.push(d[x.id])}),f?.length===0)return{resultComments:[],unresolvedSortedThreads:[]};let h=f.map(x=>({...x,reply:[...x.reply].reverse()})),g=new Map(h.map(x=>[String(x.id),x])),v=new Set(Object.values(u).map(x=>String(x))),y=Object.values(u).map(x=>g.get(String(x))).filter(x=>x!==void 0&&x.status==="hold"),b=Object.values(u).map(x=>g.get(String(x))).filter(x=>x!==void 0&&x.status==="approved"),_=h.filter(x=>!v.has(String(x.id)));return{resultComments:[...y,...b,..._],unresolvedSortedThreads:y}},[a,n,i]);return{resultComments:l,unresolvedSortedThreads:c,reflowComments:r,commentLastUpdated:t}}function nse(e=Og){let{createNotice:t}=(0,_a.useDispatch)(tse.store),{saveEntityRecord:r,deleteEntityRecord:o}=(0,_a.useDispatch)(ME.store),{getCurrentPostId:n}=(0,_a.useSelect)(w),{getBlockAttributes:i,getSelectedBlockClientId:a}=(0,_a.useSelect)(Lm.store),{updateBlockAttributes:l}=(0,_a.useDispatch)(Lm.store),c=m=>{let h=m.message&&m.code!=="unknown_error"?(0,rse.decodeEntities)(m.message):(0,qc.__)("An error occurred while performing an update.");t("error",h,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:m,parent:h})=>{try{let g=await r("root","comment",{post:n(),content:m,status:"hold",type:"note",parent:h||0},{throwOnError:!0});if(!h&&g?.id){let v=a(),y=i(v)?.metadata;l(v,{metadata:{...y,noteId:g.id}})}return t("snackbar",h?(0,qc.__)("Reply added."):(0,qc.__)("Note added."),{type:"snackbar",isDismissible:!0}),setTimeout(e,300),g}catch(g){e(),c(g)}},onEdit:async({id:m,content:h,status:g})=>{let v=g||"updated",y={approved:(0,qc.__)("Note marked as resolved."),hold:(0,qc.__)("Note reopened."),updated:(0,qc.__)("Note updated.")};try{if(g==="approved"||g==="hold"){await r("root","comment",{id:m,status:g},{throwOnError:!0});let b={post:n(),content:h||"",type:"note",status:g,parent:m,meta:{_wp_note_status:g==="approved"?"resolved":"reopen"}};await r("root","comment",b,{throwOnError:!0})}else await r("root","comment",{id:m,content:h,status:g},{throwOnError:!0});t("snackbar",y[v]??(0,qc.__)("Note updated."),{type:"snackbar",isDismissible:!0}),e()}catch(b){e(),c(b)}},onDelete:async m=>{try{if(await o("root","comment",m.id,void 0,{throwOnError:!0}),!m.parent){let h=a(),g=i(h)?.metadata;l(h,{metadata:QRe({...g,noteId:void 0})})}t("snackbar",(0,qc.__)("Note deleted."),{type:"snackbar",isDismissible:!0}),e()}catch(h){e(),c(h)}}}}function ise(e=!1){let t=(0,_a.useRegistry)();(0,Sa.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(Ce),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(Ce),i=t.subscribe(()=>{r("core")===null&&n("core",Fd)});return()=>{i(),r("core")===Fd&&o("core",Fd)}},[e,t])}function sse({thread:e,calculatedOffset:t,setHeights:r,selectedThread:o,setBlockRef:n,commentLastUpdated:i}){let a=XRe(e.blockClientId),l=(0,Sa.useCallback)((d,f)=>{r(m=>m[d]!==f?{...m,[d]:f}:m)},[r]),{y:c,refs:u}=ese({placement:"right-start",middleware:[r6({crossAxis:t||-16})],whileElementsMounted:t6});return(0,Sa.useEffect)(()=>{a&&u.setReference(a)},[a,u,i]),(0,Sa.useEffect)(()=>{u.floating?.current&&n(e.id,a)},[a,e.id,u.floating,n]),(0,Sa.useEffect)(()=>{if(u.floating?.current){let d=u.floating.current.scrollHeight;l(e.id,d)}},[e.id,l,u.floating,o,i]),{y:c,refs:u}}var LE=s(E(),1),fv=s(O(),1),VE=s(A(),1),d1=s($(),1);var dv=s(C(),1),{useBlockElement:JRe}=N(d1.privateApis);function jE({onSubmit:e,commentSidebarRef:t,reflowComments:r=Og,isFloating:o=!1,y:n,refs:i}){let{clientId:a}=(0,fv.useSelect)(m=>{let{getSelectedBlockClientId:h}=m(d1.store);return{clientId:h()}},[]),l=(0,fv.useSelect)(m=>N(m(w)).getSelectedNote(),[]),c=JRe(a),{toggleBlockSpotlight:u}=N((0,fv.useDispatch)(d1.store)),{selectNote:d}=N((0,fv.useDispatch)(w)),f=()=>{d(void 0),c?.focus(),u(a,!1)};return l!=="new"||!a?null:(0,dv.jsxs)(VE.__experimentalVStack,{className:re("editor-collab-sidebar-panel__thread is-selected",{"is-floating":o}),spacing:"3",tabIndex:0,"aria-label":(0,LE.__)("New note"),role:"treeitem",ref:o?i.setFloating:void 0,style:o?{top:n,opacity:n?void 0:0}:void 0,onBlur:m=>{m.currentTarget.contains(m.relatedTarget)||(u(a,!1),d(void 0))},children:[(0,dv.jsx)(VE.__experimentalHStack,{alignment:"left",spacing:"3",children:(0,dv.jsx)(c1,{})}),(0,dv.jsx)(u1,{onSubmit:async m=>{let{id:h}=await e({content:m});d(h),dn(h,t.current)},onCancel:f,reflowComments:r,submitButtonText:(0,LE.__)("Add note"),labelText:(0,LE.__)("New note")})]})}var et=s(C(),1),{useBlockElement:cse}=N(mv.privateApis),{Menu:f1}=N(ar.privateApis);function use({threads:e,onEditComment:t,onAddReply:r,onCommentDelete:o,commentSidebarRef:n,reflowComments:i,isFloating:a=!1,commentLastUpdated:l}){let[c,u]=(0,uo.useState)({}),[d,f]=(0,uo.useState)({}),[m,h]=(0,uo.useState)({}),{setCanvasMinHeight:g,selectNote:v}=N((0,Zc.useDispatch)(w)),{selectBlock:y,toggleBlockSpotlight:b}=N((0,Zc.useDispatch)(mv.store)),{blockCommentId:_,selectedBlockClientId:S,orderedBlockIds:x}=(0,Zc.useSelect)(I=>{let{getBlockAttributes:U,getSelectedBlockClientId:G,getClientIdsWithDescendants:Y}=I(mv.store),Z=G();return{blockCommentId:Z?U(Z)?.metadata?.noteId:null,selectedBlockClientId:Z,orderedBlockIds:Y()}},[]),{selectedNote:T,noteFocused:R}=(0,Zc.useSelect)(I=>{let{getSelectedNote:U,isNoteFocused:G}=N(I(w));return{selectedNote:U(),noteFocused:G()}},[]),F=cse(S),B=(0,uo.useMemo)(()=>{let I=[...e],U=[];if(a&&T==="new"){let G={id:"new",blockClientId:S,content:{rendered:""}};return x.forEach(Y=>{if(Y===S)U.push(G);else{let Z=I.find(V=>V.blockClientId===Y);Z&&U.push(Z)}}),U}return I},[e,a,T,S,x]),z=async I=>{let U=B.findIndex(Z=>Z.id===I.id),G=B[U+1],Y=B[U-1];if(await o(I),I.parent!==0){v(I.parent),dn(I.parent,n.current);return}G?(v(G.id),dn(G.id,n.current)):Y?(v(Y.id),dn(Y.id,n.current)):(v(void 0),b(I.blockClientId,!1),F?.focus())};(0,uo.useEffect)(()=>{v(_??void 0)},[_,v]),(0,uo.useEffect)(()=>{R&&T&&(dn(T,n.current,T==="new"?"textarea":void 0),v(T))},[R,T,v,n]),(0,uo.useEffect)(()=>{let I=()=>{let Y={};if(!a)return{offsets:Y,minHeight:0};let Z=B.findIndex(ge=>ge.id===T),V=Z===-1?0:Z,j=B[V];if(!j||!m[j.id])return{offsets:Y,minHeight:0};let H=m[j.id],X=H?.getBoundingClientRect(),ae=X?.top||0,ne=c[j.id]||0;Y[j.id]=-16;let ue={threadTop:ae-16,threadHeight:ne};for(let ge=V+1;ge<B.length;ge++){let Re=B[ge];if(!m[Re.id])continue;H=m[Re.id],X=H?.getBoundingClientRect();let ze=X?.top||0,Ve=c[Re.id]||0,tt=-16,vt=ue.threadTop+ue.threadHeight;ze<vt+16&&(tt=vt-ze+20),Y[Re.id]=tt,ue={threadTop:ze+tt,threadHeight:Ve}}let Ye={threadTop:ae-16};for(let ge=Z-1;ge>=0;ge--){let Re=B[ge];if(!m[Re.id])continue;H=m[Re.id],X=H?.getBoundingClientRect();let ze=X?.top||0,Ve=c[Re.id]||0,tt=-16;ze+Ve>Ye.threadTop&&(tt=Ye.threadTop-ze-Ve-20),Y[Re.id]=tt,Ye={threadTop:ze+tt}}let ye=0,oe=B[B.length-1];if(m[oe.id]){let ze=m[oe.id]?.getBoundingClientRect()?.top||0,Ve=c[oe.id]||0,tt=Y[oe.id]||0;ye=ze+Ve+tt+32}return{offsets:Y,minHeight:ye}},{offsets:U,minHeight:G}=I();Object.keys(U).length>0&&f(U),g(G)},[c,m,a,B,T,g]);let L=(I,U,G)=>{if(I.defaultPrevented)return;let Y=B.findIndex(Z=>Z.id===U.id);if((I.key==="Enter"||I.key==="ArrowRight")&&I.currentTarget===I.target&&!G)v(U.id),U.blockClientId&&(y(U.blockClientId,null),b(U.blockClientId,!0));else if((I.key==="Enter"||I.key==="ArrowLeft")&&I.currentTarget===I.target&&G||I.key==="Escape")v(void 0),U.blockClientId&&b(U.blockClientId,!1),dn(U.id,n.current);else if(I.key==="ArrowDown"&&Y<B.length-1&&I.currentTarget===I.target){let Z=B[Y+1];dn(Z.id,n.current)}else if(I.key==="ArrowUp"&&Y>0&&I.currentTarget===I.target){let Z=B[Y-1];dn(Z.id,n.current)}else I.key==="Home"&&I.currentTarget===I.target?dn(B[0].id,n.current):I.key==="End"&&I.currentTarget===I.target&&dn(B[B.length-1].id,n.current)},M=(0,uo.useCallback)((I,U)=>{h(G=>({...G,[I]:U}))},[]);return!(Array.isArray(B)&&B.length>0)&&!a?(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:n}):(0,et.jsxs)(et.Fragment,{children:[!a&&T==="new"&&(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:n}),B.map(I=>(0,et.jsx)($Re,{thread:I,onAddReply:r,onCommentDelete:z,onEditComment:t,isSelected:T===I.id,commentSidebarRef:n,reflowComments:i,isFloating:a,calculatedOffset:d[I.id]??0,setHeights:u,setBlockRef:M,commentLastUpdated:l,onKeyDown:U=>L(U,I,T===I.id)},I.id))]})}function $Re({thread:e,onEditComment:t,onAddReply:r,onCommentDelete:o,isSelected:n,commentSidebarRef:i,reflowComments:a,isFloating:l,calculatedOffset:c,setHeights:u,setBlockRef:d,commentLastUpdated:f,onKeyDown:m}){let{toggleBlockHighlight:h,selectBlock:g,toggleBlockSpotlight:v}=N((0,Zc.useDispatch)(mv.store)),{selectNote:y}=N((0,Zc.useDispatch)(w)),b=(0,Zc.useSelect)(V=>N(V(w)).getSelectedNote(),[]),_=cse(e.blockClientId),S=(0,ase.useDebounce)(h,50),{y:x,refs:T}=sse({thread:e,calculatedOffset:c,setHeights:u,setBlockRef:d,selectedThread:b,commentLastUpdated:f}),R=(0,uo.useRef)(!1),F=()=>{S(e.blockClientId,!0)},B=()=>{S(e.blockClientId,!1)},z=()=>{h(e.blockClientId,!0)},L=V=>{let j=V.relatedTarget?.closest(".editor-collab-sidebar-panel__thread"),H=V.relatedTarget?.closest('[role="dialog"]'),X=R.current;j&&!X||H||X&&V.currentTarget.contains(V.relatedTarget)||(h(e.blockClientId,!1),k())},M=()=>{y(e.id),v(e.blockClientId,!0),e.blockClientId&&g(e.blockClientId,null)},k=()=>{y(void 0),v(e.blockClientId,!1)},I=e?.reply||[],U=I.length>0?I[I.length-1]:void 0,G=I.length>0?I.slice(0,-1):[],Y=C$((0,lse.__unstableStripHTML)(e.content?.rendered),10),Z=e.blockClientId?(0,gt.sprintf)((0,gt.__)("Note: %s"),Y):(0,gt.sprintf)((0,gt.__)("Original block deleted. Note: %s"),Y);return l&&e.id==="new"?(0,et.jsx)(jE,{onSubmit:r,commentSidebarRef:i,reflowComments:a,isFloating:l,y:x,refs:T}):(0,et.jsxs)(ar.__experimentalVStack,{className:re("editor-collab-sidebar-panel__thread",{"is-selected":n,"is-floating":l}),id:`comment-thread-${e.id}`,spacing:"3",onClick:M,onMouseEnter:F,onMouseLeave:B,onFocus:z,onBlur:L,onKeyUp:V=>{V.key==="Tab"&&(R.current=!1)},onKeyDown:V=>{V.key==="Tab"?R.current=!0:m(V)},tabIndex:0,role:"treeitem","aria-label":Z,"aria-expanded":n,ref:l?T.setFloating:void 0,style:l?{top:x}:void 0,children:[(0,et.jsx)(ar.Button,{className:"editor-collab-sidebar-panel__skip-to-comment",variant:"secondary",size:"compact",onClick:()=>{dn(e.id,i.current,"textarea")},children:(0,gt.__)("Add new reply")}),!e.blockClientId&&(0,et.jsx)(ar.__experimentalText,{as:"p",weight:500,variant:"muted",children:(0,gt.__)("Original block deleted.")}),(0,et.jsx)(fF,{thread:e,isExpanded:n,onEdit:(V={})=>{t(V),V.status==="approved"&&(k(),l?_?.focus():dn(e.id,i.current))},onDelete:o,reflowComments:a}),n&&I.map(V=>(0,et.jsx)(fF,{thread:V,parent:e,isExpanded:n,onEdit:t,onDelete:o,reflowComments:a},V.id)),!n&&G.length>0&&(0,et.jsx)(ar.__experimentalHStack,{className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,et.jsx)(ar.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:()=>{y(e.id),dn(e.id,i.current)},children:(0,gt.sprintf)((0,gt._n)("%s more reply","%s more replies",G.length),G.length)})}),!n&&U&&(0,et.jsx)(fF,{thread:U,parent:e,isExpanded:n,onEdit:t,onDelete:o,reflowComments:a}),n&&(0,et.jsxs)(ar.__experimentalVStack,{spacing:"2",role:"treeitem",children:[(0,et.jsx)(ar.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:(0,et.jsx)(c1,{})}),(0,et.jsx)(ar.__experimentalVStack,{spacing:"2",children:(0,et.jsx)(u1,{onSubmit:V=>{e.status==="approved"?t({id:e.id,status:"hold",content:V}):r({content:V,parent:e.id})},onCancel:V=>{V.stopPropagation(),k(),dn(e.id,i.current)},submitButtonText:e.status==="approved"?(0,gt.__)("Reopen & Reply"):(0,gt.__)("Reply"),rows:e.status==="approved"?2:4,labelText:(0,gt.sprintf)((0,gt.__)("Reply to note %1$s by %2$s"),e.id,e.author_name),reflowComments:a})})]}),!!e.blockClientId&&(0,et.jsx)(ar.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:V=>{V.stopPropagation(),_?.focus()},children:(0,gt.__)("Back to block")})]})}var fF=({thread:e,parent:t,isExpanded:r,onEdit:o,onDelete:n,reflowComments:i})=>{let[a,l]=(0,uo.useState)(!1),[c,u]=(0,uo.useState)(!1),d=(0,uo.useRef)(null),f=()=>{n(e),l(!1),u(!1)},m=()=>{l(!1),u(!1),d.current?.focus()},h=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),g=[{id:"edit",title:(0,gt.__)("Edit"),isEligible:({status:_})=>_!=="approved",onClick:()=>{l("edit")}},{id:"reopen",title:(0,gt._x)("Reopen","Reopen note"),isEligible:({status:_})=>_==="approved",onClick:()=>{o({id:e.id,status:"hold"})}},{id:"delete",title:(0,gt.__)("Delete"),isEligible:()=>!0,onClick:()=>{l("delete"),u(!0)}}],v=e.parent===0,y=t?.status!=="approved"?g.filter(_=>_.isEligible(e)):[],b=e.parent===0?(0,gt.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,gt.__)("Are you sure you want to delete this reply?");return(0,et.jsxs)(ar.__experimentalVStack,{spacing:"2",role:e.parent!==0?"treeitem":void 0,children:[(0,et.jsxs)(ar.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:[(0,et.jsx)(c1,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),r&&(0,et.jsx)(ar.FlexItem,{className:"editor-collab-sidebar-panel__comment-status",onClick:_=>{_.stopPropagation()},children:(0,et.jsxs)(ar.__experimentalHStack,{spacing:"0",children:[v&&(0,et.jsx)(ar.Button,{label:(0,gt._x)("Resolve","Mark note as resolved"),size:"small",icon:Hd,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:()=>{o({id:e.id,status:"approved"})}}),(0,et.jsxs)(f1,{placement:"bottom-end",children:[(0,et.jsx)(f1.TriggerButton,{render:(0,et.jsx)(ar.Button,{ref:d,size:"small",icon:Nr,label:(0,gt.__)("Actions"),disabled:!y.length,accessibleWhenDisabled:!0})}),(0,et.jsx)(f1.Popover,{modal:!1,children:y.map(_=>(0,et.jsx)(f1.Item,{onClick:()=>_.onClick(),children:(0,et.jsx)(f1.ItemLabel,{children:_.title})},_.id))})]})]})})]}),a==="edit"?(0,et.jsx)(u1,{onSubmit:_=>{o({id:e.id,content:_}),l(!1),d.current?.focus()},onCancel:()=>m(),thread:e,submitButtonText:(0,gt._x)("Update","verb"),labelText:(0,gt.sprintf)((0,gt.__)("Edit note %1$s by %2$s"),e.id,e.author_name),reflowComments:i}):(0,et.jsx)(uo.RawHTML,{className:re("editor-collab-sidebar-panel__user-comment",{"editor-collab-sidebar-panel__resolution-text":h}),children:h?(()=>{let _=e.meta._wp_note_status==="resolved"?(0,gt.__)("Marked as resolved"):(0,gt.__)("Reopened"),S=e?.content?.raw;return S&&typeof S=="string"&&S.trim()!==""?(0,gt.sprintf)((0,gt.__)("%1$s: %2$s"),_,S):_})():e?.content?.rendered}),a==="delete"&&(0,et.jsx)(ar.__experimentalConfirmDialog,{isOpen:c,onConfirm:f,onCancel:m,confirmButtonText:(0,gt.__)("Delete"),children:b})]})};var dse=s(A(),1),zE=s(E(),1),HE=s($(),1),mF=s(O(),1),fse=s(Xe(),1),mse=s(Oi(),1);var UE=s(C(),1),{CommentIconSlotFill:eAe}=N(HE.privateApis),tAe=({clientId:e,onClick:t,isDistractionFree:r})=>{let o=(0,mF.useSelect)(l=>l(HE.store).getBlock(e),[e]),n=(0,mF.useSelect)(l=>l(mse.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,fse.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",a;return r?a=(0,zE.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(a=(0,zE.__)("Convert to blocks to add notes.")),(0,UE.jsx)(dse.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:a,shortcut:n,children:(0,zE.__)("Add note")})},rAe=({onClick:e,isDistractionFree:t})=>(0,UE.jsx)(eAe.Fill,{children:({clientId:r,onClose:o})=>(0,UE.jsx)(tAe,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})}),pF=rAe;var hv=s(A(),1),pv=s(E(),1),pse=s(D(),1),hse=s($(),1);var Vm=s(C(),1),{CommentIconToolbarSlotFill:oAe}=N(hse.privateApis),nAe=({onClick:e,thread:t})=>{let r=(0,pse.useMemo)(()=>{if(!t)return[];let u=new Map,d=[t,...t.reply];return d.sort((f,m)=>new Date(f.date)-new Date(m.date)),d.forEach(f=>{f.author_name&&f.author_avatar_urls&&(u.has(f.author)||u.set(f.author,{name:f.author_name,avatar:f.author_avatar_urls?.["48"]||f.author_avatar_urls?.["96"],id:f.author,date:f.date}))}),Array.from(u.values())},[t]);if(!r.length)return null;let o=3,i=r.length>o?r.slice(0,o-1):r,a=Math.max(0,r.length-i.length),c=r.length>100&&a>0?(0,pv.__)("100+"):(0,pv.sprintf)((0,pv.__)("+%s"),a);return(0,Vm.jsx)(oAe.Fill,{children:(0,Vm.jsx)(hv.ToolbarButton,{className:"comment-avatar-indicator",label:(0,pv.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,Vm.jsxs)(hv.__experimentalHStack,{spacing:"1",children:[i.map(u=>(0,Vm.jsx)("img",{src:u.avatar,alt:u.name,className:"comment-avatar",style:{borderColor:ws(u.id)}},u.id)),a>0&&(0,Vm.jsx)(hv.__experimentalText,{weight:500,children:c})]})})})},gse=nAe;var Yo=s(C(),1);function vse({styles:e,comments:t,commentSidebarRef:r,reflowComments:o,commentLastUpdated:n,isFloating:i=!1}){let{onCreate:a,onEdit:l,onDelete:c}=nse(o);return(0,Yo.jsx)(yse.__experimentalVStack,{className:"editor-collab-sidebar-panel",style:e,role:"tree",spacing:"3",justify:"flex-start",ref:u=>{u&&(r.current=u)},"aria-label":i?(0,gv.__)("Unresolved notes"):(0,gv.__)("All notes"),children:(0,Yo.jsx)(use,{threads:t,onEditComment:l,onAddReply:a,onCommentDelete:c,commentSidebarRef:r,reflowComments:o,commentLastUpdated:n,isFloating:i})})}function iAe({postId:e}){let{getActiveComplementaryArea:t}=(0,bl.useSelect)(Ce),{enableComplementaryArea:r}=(0,bl.useDispatch)(Ce),{toggleBlockSpotlight:o,selectBlock:n}=N((0,bl.useDispatch)(hF.store)),{selectNote:i}=N((0,bl.useDispatch)(w)),a=(0,Sse.useViewportMatch)("medium"),l=(0,bse.useRef)(null),{clientId:c,blockCommentId:u,isClassicBlock:d}=(0,bl.useSelect)(F=>{let{getBlockAttributes:B,getSelectedBlockClientId:z,getBlockName:L}=F(hF.store),M=z();return{clientId:M,blockCommentId:M?B(M)?.metadata?.noteId:null,isClassicBlock:M?L(M)==="core/freeform":!1}},[]),{isDistractionFree:f}=(0,bl.useSelect)(F=>{let{get:B}=F(wse.store);return{isDistractionFree:B("core","distractionFree")}},[]),m=(0,bl.useSelect)(F=>N(F(w)).getSelectedNote(),[]),{resultComments:h,unresolvedSortedThreads:g,reflowComments:v,commentLastUpdated:y}=ose(e),b=a,_=h.length>0||!b;ise(b&&(g.length>0||m!==void 0)),(0,_se.useShortcut)("core/editor/new-note",F=>{F.preventDefault(),R()},{isDisabled:f||d||!c||!!u});let{merged:S}=fw(),x=S?.styles?.color?.background,T=u?h.find(F=>F.id===u):null;async function R(F){let B=await t("core"),z=uF.find(I=>I===B),L=F&&F!==c?F:c,M=h.find(I=>I.blockClientId===L);M?.status==="approved"?r("core",uv):(!z||!_)&&r("core",b?Fd:uv);let k=await t("core");uF.includes(k)&&(n(L,null),o(L,!0),i(M?M.id:"new",{focus:!0}))}return f?(0,Yo.jsx)(pF,{isDistractionFree:!0}):(0,Yo.jsxs)(Yo.Fragment,{children:[!!T&&(0,Yo.jsx)(gse,{thread:T,onClick:R}),(0,Yo.jsx)(pF,{onClick:R}),_&&(0,Yo.jsx)(nm,{identifier:uv,name:uv,title:(0,gv.__)("All notes"),header:(0,Yo.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,gv.__)("All notes")}),icon:jR,closeLabel:(0,gv.__)("Close Notes"),children:(0,Yo.jsx)(vse,{comments:h,commentSidebarRef:l})}),a&&(0,Yo.jsx)(nm,{isPinnable:!1,header:!1,identifier:Fd,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:x,children:(0,Yo.jsx)(vse,{comments:g,commentSidebarRef:l,reflowComments:v,commentLastUpdated:y,styles:{backgroundColor:x},isFloating:!0})})]})}function xse(){let{postId:e,editorMode:t,revisionsMode:r}=(0,bl.useSelect)(o=>{let{getCurrentPostId:n,getEditorMode:i,isRevisionsMode:a}=N(o(w));return{postId:n(),editorMode:i(),revisionsMode:a()}},[]);return!e||typeof e!="number"||t==="text"||r?null:(0,Yo.jsx)(tr,{supportKeys:"editor.notes",children:(0,Yo.jsx)(iAe,{postId:e})})}var Sl=s(A(),1),vv=s(E(),1);var g1=s(O(),1),vF=s(D(),1),Ese=s(lt(),1),ZE=s(he(),1),Rse=s(W(),1);var Kc=s(A(),1),GE=s(O(),1),m1=s(E(),1),Cse=s(lt(),1);var Tse=s(W(),1);var wa=s(C(),1);function WE({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=xo(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:a}=(0,GE.useDispatch)(Cse.store),{canEditCSS:l}=(0,GE.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(Tse.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,wa.jsx)(Kc.DropdownMenu,{icon:Nr,label:(0,m1.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,wa.jsxs)(wa.Fragment,{children:[(0,wa.jsxs)(Kc.MenuGroup,{children:[l&&(0,wa.jsx)(Kc.MenuItem,{onClick:c,children:(0,m1.__)("Additional CSS")}),!e&&(0,wa.jsx)(Kc.MenuItem,{onClick:()=>{a("core/edit-site","welcomeGuideStyles"),u()},children:(0,m1.__)("Welcome Guide")})]}),(0,wa.jsx)(Kc.MenuGroup,{children:(0,wa.jsx)(Kc.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,m1.__)("Reset styles")})})]})})}var jm=s(C(),1);function Pse({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,jm.jsxs)(jm.Fragment,{children:[(0,jm.jsx)(ql,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:a,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,jm.jsx)(xu,{scope:"core",identifier:t,icon:o,children:r})]})}var YE=s(O(),1),qE=s(A(),1),Fs=s(E(),1),gF=s(lt(),1);var p1=s(C(),1);function h1({nonAnimatedSrc:e,animatedSrc:t}){return(0,p1.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,p1.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,p1.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var Qt=s(C(),1);function kse(){let{toggle:e}=(0,YE.useDispatch)(gF.store),{isActive:t,isStylesOpen:r}=(0,YE.useSelect)(n=>{let i=n(Ce).getActiveComplementaryArea("core");return{isActive:!!n(gF.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,Fs.__)("Welcome to Styles");return(0,Qt.jsx)(qE.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,Fs.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("Tweak your site, or give it a whole new look! Get creative \u2014 how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Set the design")}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Personalize blocks")}),(0,Qt.jsx)("p",{className:"editor-welcome-guide__text",children:(0,Fs.__)("You can adjust your blocks to ensure a cohesive experience across your site \u2014 add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,Qt.jsx)(h1,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,Fs.__)("Learn more")}),(0,Qt.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,Fs.__)("New to block themes and styling your site?")," ",(0,Qt.jsx)(qE.ExternalLink,{href:(0,Fs.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,Fs.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var qo=s(C(),1);function Ase(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i}=(0,g1.useSelect)(y=>{let{getActiveComplementaryArea:b}=y(Ce),{getStylesPath:_,getShowStylebook:S}=N(y(w)),x=y(w).getEditorMode()==="visual",T=y(Ese.store).get("core","showListViewByDefault"),{getEntityRecord:R,__experimentalGetCurrentGlobalStylesId:F}=y(Rse.store),B=F(),z=B?R("root","globalStyles",B):void 0;return{stylesPath:_(),showStylebook:S(),shouldResetNavigation:b("core")!=="edit-site/global-styles"||!x,showListViewByDefault:T,hasRevisions:!!z?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:y(Ce).getActiveComplementaryArea("core")}},[]),{setStylesPath:a,setShowStylebook:l,resetStylesNavigation:c}=N((0,g1.useDispatch)(w)),u=(0,ZE.useViewportMatch)("medium","<"),d=t.startsWith("/revisions")&&!r,f=t.startsWith("/revisions")&&r,m=(0,ZE.usePrevious)(i);(0,vF.useEffect)(()=>{i==="edit-site/global-styles"&&m!=="edit-site/global-styles"&&c()},[i,m,c]),(0,vF.useEffect)(()=>{e&&c()},[e,c]);let{setIsListViewOpened:h}=(0,g1.useDispatch)(w),g=()=>{h(!1),a(d||f?"/":"/revisions")},v=()=>{h(r&&o),l(!r)};return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Pse,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,vv.__)("Styles"),icon:YA,closeLabel:(0,vv.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,qo.jsxs)(Sl.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,vv.__)("Styles")})}),(0,qo.jsxs)(Sl.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!u&&(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)(Sl.Button,{icon:Gd,label:(0,vv.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:v,size:"compact"})}),(0,qo.jsx)(Sl.FlexItem,{children:(0,qo.jsx)(Sl.Button,{label:(0,vv.__)("Revisions"),icon:xl,onClick:g,accessibleWhenDisabled:!0,disabled:!n,isPressed:d||f,size:"compact"})}),(0,qo.jsx)(WE,{onChangePath:a})]})]}),children:(0,qo.jsx)(Hx,{path:t,onPathChange:a})}),(0,qo.jsx)(kse,{})]})}var Ds=s(C(),1);function sAe({postType:e,postId:t,templateId:r,settings:o,children:n,initialEdits:i,onActionPerformed:a,extraContent:l,extraSidebarPanels:c,...u}){let{post:d,template:f,hasLoadedPost:m,error:h,isBlockTheme:g,showGlobalStyles:v}=(0,Ose.useSelect)(y=>{let{getEntityRecord:b,getResolutionError:_,hasFinishedResolution:S,getCurrentTheme:x,__experimentalGetCurrentGlobalStylesId:T,canUser:R}=y(Ise.store),{getRenderingMode:F,getCurrentPostType:B}=y(w),z=["postType",e,t],L=F(),M=B(),k=x()?.is_block_theme,I=T(),U=I?R("update",{kind:"root",name:"globalStyles",id:I}):!1;return{post:b(...z),template:r?b("postType",xt,r):void 0,hasLoadedPost:S("getEntityRecord",z),error:_("getEntityRecord",z)?.message,isBlockTheme:k,showGlobalStyles:k&&U&&(M==="wp_template"||L==="template-locked")}},[e,t,r]);return(0,Ds.jsxs)(Ds.Fragment,{children:[m&&!d&&(0,Ds.jsx)(Nse.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,Fse.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,Ds.jsxs)(v6,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,Ds.jsx)(pne,{...u,children:l}),n,(0,Ds.jsx)(Uie,{onActionPerformed:a,extraPanels:c}),(0,Ds.jsx)(xse,{}),g&&(0,Ds.jsx)(oC,{}),v&&(0,Ds.jsx)(Ase,{})]})]})}var Dse=sAe;var Ne=s(E(),1),Gse=s(he(),1),zm=s(O(),1),Wse=s(D(),1),v1=s(lt(),1);var KE=s(O(),1),Bse=s(lt(),1);var Mse=s(C(),1),{PreferenceBaseOption:aAe}=N(Bse.privateApis);function Lse(e){let t=(0,KE.useSelect)(n=>n(w).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,KE.useDispatch)(w);return(0,Mse.jsx)(aAe,{isChecked:t,onChange:n=>n?r():o(),...e})}var XE=s(O(),1),Vse=s(lt(),1),QE=s(Xe(),1),jse=s(D(),1),zse=s(A(),1),bv=s(E(),1),Use=s($(),1);var yv=s(C(),1),{BlockManager:lAe}=N(Use.privateApis),cAe=[];function Hse(){let{showBlockTypes:e,hideBlockTypes:t}=N((0,XE.useDispatch)(w)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,XE.useSelect)(m=>({blockTypes:m(QE.store).getBlockTypes(),allowedBlockTypes:m(w).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(Vse.store).get("core","hiddenBlockTypes")??cAe}),[]),a=(0,jse.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,QE.hasBlockSupport)(m,"inserter",!0)&&(!m.parent||m.parent.includes("core/post-content"))),l=n.filter(m=>a.some(h=>h.name===m)),c=a.filter(m=>!l.includes(m.name)),u=a.length-c.length;function d(){f(a)}let f=m=>{if(c.length>m.length){let h=c.filter(g=>!m.find(({name:v})=>v===g.name));t(h.map(({name:g})=>g))}else if(c.length<m.length){let h=m.filter(g=>!c.find(({name:v})=>v===g.name));e(h.map(({name:g})=>g))}};return(0,yv.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,yv.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,bv.sprintf)((0,bv._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,yv.jsx)(zse.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,bv.__)("Reset")})]}),(0,yv.jsx)(lAe,{blockTypes:a,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var Me=s(C(),1),{PreferencesModal:uAe,PreferencesModalTabs:dAe,PreferencesModalSection:Xc,PreferenceToggleControl:xi}=N(v1.privateApis);function Yse({extraSections:e={}}){let t=(0,zm.useSelect)(o=>o(Ce).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,zm.useDispatch)(Ce);return t?(0,Me.jsx)(uAe,{closeModal:r,children:(0,Me.jsx)(fAe,{extraSections:e})}):null}function fAe({extraSections:e={}}){let t=(0,Gse.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,zm.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=N(c(w)),{get:f}=c(v1.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,zm.useDispatch)(w),{set:a}=(0,zm.useDispatch)(v1.store),l=(0,Wse.useMemo)(()=>[{name:"general",tabLabel:(0,Ne.__)("General"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Interface"),children:[(0,Me.jsx)(xi,{scope:"core",featureName:"showListViewByDefault",help:(0,Ne.__)("Opens the List View panel by default."),label:(0,Ne.__)("Always open List View")}),r&&(0,Me.jsx)(xi,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,Ne.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,Ne.__)("Show block breadcrumbs")}),(0,Me.jsx)(xi,{scope:"core",featureName:"allowRightClickOverrides",help:(0,Ne.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,Ne.__)("Allow right-click contextual menus")}),(0,Me.jsx)(xi,{scope:"core",featureName:"enableChoosePatternModal",help:(0,Ne.__)("Pick from starter content when creating a new page."),label:(0,Ne.__)("Show starter patterns")}),o&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(xi,{scope:"core",featureName:"showCollaborationCursor",help:(0,Ne.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,Ne.__)("Show avatar in blocks")}),(0,Me.jsx)(xi,{scope:"core",featureName:"showCollaborationNotifications",help:(0,Ne.__)("Show notifications when collaborators join, leave, or save the post."),label:(0,Ne.__)("Show collaboration notifications")})]})]}),(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Document settings"),description:(0,Ne.__)("Select what settings are shown in the document panel."),children:[(0,Me.jsx)(zC.Slot,{}),(0,Me.jsx)(fg,{taxonomyWrapper:(c,u)=>(0,Me.jsx)($u,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,Me.jsx)(_c,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Featured image"),panelName:"featured-image"})}),(0,Me.jsx)(lm,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Excerpt"),panelName:"post-excerpt"})}),(0,Me.jsx)(tr,{supportKeys:["comments","trackbacks"],children:(0,Me.jsx)($u,{label:(0,Ne.__)("Discussion"),panelName:"discussion-panel"})}),(0,Me.jsx)(Nh,{children:(0,Me.jsx)($u,{label:(0,Ne.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,Me.jsx)(Xc,{title:(0,Ne.__)("Publishing"),children:(0,Me.jsx)(Lse,{help:(0,Ne.__)("Review settings, such as visibility and tags."),label:(0,Ne.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,Ne.__)("Appearance"),content:(0,Me.jsxs)(Xc,{title:(0,Ne.__)("Appearance"),description:(0,Ne.__)("Customize the editor interface to suit your needs."),children:[(0,Me.jsx)(xi,{scope:"core",featureName:"fixedToolbar",onToggle:()=>a("core","distractionFree",!1),help:(0,Ne.__)("Access all block and document tools in a single place."),label:(0,Ne.__)("Top toolbar")}),(0,Me.jsx)(xi,{scope:"core",featureName:"distractionFree",onToggle:()=>{a("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,Ne.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,Ne.__)("Distraction free")}),(0,Me.jsx)(xi,{scope:"core",featureName:"focusMode",help:(0,Ne.__)("Highlights the current block and fades other content."),label:(0,Ne.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,Ne.__)("Accessibility"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(Xc,{title:(0,Ne.__)("Navigation"),description:(0,Ne.__)("Optimize the editing experience for enhanced control."),children:(0,Me.jsx)(xi,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,Ne.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,Ne.__)("Contain text cursor inside block")})}),(0,Me.jsx)(Xc,{title:(0,Ne.__)("Interface"),children:(0,Me.jsx)(xi,{scope:"core",featureName:"showIconLabels",label:(0,Ne.__)("Show button text labels"),help:(0,Ne.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,Ne.__)("Blocks"),content:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(Xc,{title:(0,Ne.__)("Inserter"),children:(0,Me.jsx)(xi,{scope:"core",featureName:"mostUsedBlocks",help:(0,Ne.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,Ne.__)("Show most used blocks")})}),(0,Me.jsx)(Xc,{title:(0,Ne.__)("Manage block visibility"),description:(0,Ne.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,Me.jsx)(Hse,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,Ne.__)("Media"),content:(0,Me.jsx)(Me.Fragment,{children:(0,Me.jsxs)(Xc,{title:(0,Ne.__)("General"),description:(0,Ne.__)("Customize options related to the media upload flow."),children:[(0,Me.jsx)(xi,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,Ne.__)("Compress media items before uploading to the server."),label:(0,Ne.__)("Pre-upload compression")}),(0,Me.jsx)(xi,{scope:"core/media",featureName:"requireApproval",help:(0,Ne.__)("Require approval step when optimizing existing media."),label:(0,Ne.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,a,t]);return(0,Me.jsx)(dAe,{sections:l})}var _1=s(Xe(),1);var y1=s($(),1),qse="content",Zse={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(y1.store),a=i(t),l={};for(let c of Object.keys(o)){let u=n?.[a?.metadata?.name]?.[c];if(u===void 0){l[c]=a[c];continue}else l[c]=u===""?void 0:u}return l},setValues({select:e,dispatch:t,clientId:r,bindings:o}){let{getBlockAttributes:n,getBlockParentsByBlockName:i,getBlocks:a}=e(y1.store),c=n(r)?.metadata?.name;if(!c)return;let[u]=i(r,"core/block",!0),d=Object.entries(o).reduce((m,[h,{newValue:g}])=>(m[h]=g,m),{});if(!u){let m=h=>{for(let g of h)g.attributes?.metadata?.name===c&&t(y1.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(a());return}let f=n(u)?.[qse];t(y1.store).updateBlockAttributes(u,{[qse]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var JE=s(E(),1),$E=s(W(),1),b1=s($(),1),yF=["core/navigation-link","core/navigation-submenu"],Kse=[{label:(0,JE.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,JE.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,JE.__)("Post Link"),args:{field:"link"},type:"string"}],Xse={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(b1.store),a=i(o),l=yF.includes(a),c,u;if(l){let h=n(o);c=h?.id,u=h?.type}else c=t?.postId,u=t?.postType;let{getEditedEntityRecord:d}=e($E.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=Kse.find(y=>y.args.field===g.args.field);v?f?m[h]=f[g.args.field]:m[h]=v.label:m[h]=g.args.field}return m},setValues({dispatch:e,context:t,bindings:r,clientId:o,select:n}){let{getBlockName:i}=n(b1.store),a=i(o);if(yF.includes(a))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e($E.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(b1.store),n=o(),i=r(n);return!(yF.includes(i)||t?.query||t?.queryId||!t?.postType||!e($E.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(b1.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:Kse}};var S1=s(W(),1);function bF(e,t){let{getRegisteredPostMeta:r}=N(e(S1.store)),o=r(t?.postType),n=[];return Object.entries(o).forEach(([i,a])=>{i==="footnotes"||i.charAt(0)==="_"||n.push({label:a.title||i,args:{key:i},default:a.default,type:a.type})}),n}function mAe({select:e,context:t,args:r}){let n=bF(e,t).find(l=>l.args.key===r.key);if(!n)return r.key;if(!t?.postId)return n.default||n.label||r.key;let{getEditedEntityRecord:i}=e(S1.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var Qse={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=mAe({select:e,context:t,args:i.args});return o},setValues({dispatch:e,context:t,bindings:r}){let o={};Object.values(r).forEach(({args:n,newValue:i})=>{o[n.key]=i}),e(S1.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!bF(e,t).some(l=>l.args.key===r.key)||e(w).getEditorSettings().enableCustomFields||!e(S1.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return bF(e,t).map(({default:o,...n})=>({...n}))}};var Dd=s(E(),1),Jse=s(W(),1),eR=s($(),1),SF=["core/navigation-link","core/navigation-submenu"],_F=[{label:(0,Dd.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,Dd.__)("Name"),args:{field:"name"},type:"string"},{label:(0,Dd.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,Dd.__)("Link"),args:{field:"link"},type:"string"},{label:(0,Dd.__)("Description"),args:{field:"description"},type:"string"},{label:(0,Dd.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,Dd.__)("Count"),args:{field:"count"},type:"string"}],$se={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(Jse.store),{getBlockAttributes:i,getBlockName:a}=e(eR.store),l=a(o),c=SF.includes(l),u;if(c){let f=i(o),m=f?.type;u=n("taxonomy",m==="tag"?"post_tag":m,f?.id)}else t.termId&&t.taxonomy&&(u=n("taxonomy",t.taxonomy,t.termId));!u&&t?.termData&&!c&&(u=t.termData);let d={};for(let[f,m]of Object.entries(r)){let h=_F.find(g=>g.args.field===m.args.field);h?!u||u[m.args.field]===void 0?d[f]=h.label:m.args.field==="count"?d[f]="("+u[m.args.field]+")":d[f]=u[m.args.field]:d[f]=m.args.field}return d},setValues({dispatch:e,context:t,bindings:r}){return!1},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(eR.store),n=o(),i=r(n);return SF.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(eR.store),i=n(),a=o(i);if(SF.includes(a)){let l=r(i);return!l||!l.id||!l.type?[]:_F}return e?e.taxonomy&&e.termId||e.termData?_F:[]:[]}};function eae(){(0,_1.registerBlockBindingsSource)(Zse),(0,_1.registerBlockBindingsSource)(Xse),(0,_1.registerBlockBindingsSource)(Qse),(0,_1.registerBlockBindingsSource)($se)}var{store:pAe,...hAe}=i6,tae={};JF(tae,{CreateTemplatePartModal:Cp,patternTitleField:iy,templateTitleField:ny,BackButton:nk,EntitiesSavedStatesExtensible:Kb,Editor:Dse,PluginPostExcerpt:r0,PostCardPanel:rv,PreferencesModal:Yse,usePostActions:lE,usePostFields:oE,ToolsMoreMenuGroup:uk,ViewMoreMenuGroup:dk,ResizableEditor:Eh,registerCoreBlockBindingsSources:eae,getTemplateInfo:Zi,GlobalStylesUIWrapper:Hx,GlobalStylesActionMenu:WE,StyleBookPreview:uW,useGlobalStyles:xo,useStyle:Hu,interfaceStore:pAe,...hAe});var w1=s(O(),1);function gAe(e,t,r){let{registerEntityAction:o}=N((0,w1.dispatch)(w))}function vAe(e,t,r){let{unregisterEntityAction:o}=N((0,w1.dispatch)(w))}function yAe(e,t,r){let{registerEntityField:o}=N((0,w1.dispatch)(w))}function bAe(e,t,r){let{unregisterEntityField:o}=N((0,w1.dispatch)(w))}var rae=s($(),1);return uae(SAe);})();
/*! Bundled license information:

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/;