var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
/*! This file is auto-generated */
(()=>{"use strict";var e={3249:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t){var r=e._map,n=e._arrayTreeMap,s=e._objectTreeMap;if(r.has(t))return r.get(t);for(var i=Object.keys(t).sort(),o=Array.isArray(t)?n:s,a=0;a<i.length;a++){var c=i[a];if(void 0===(o=o.get(c)))return;var l=t[c];if(void 0===(o=o.get(l)))return}var u=o.get("_ekm_value");return u?(r.delete(u[0]),u[0]=t,o.set("_ekm_value",u),r.set(t,u),u):void 0}var s=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var r=[];t.forEach((function(e,t){r.push([t,e])})),t=r}if(null!=t)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}var s,i,o;return s=e,i=[{key:"set",value:function(r,n){if(null===r||"object"!==t(r))return this._map.set(r,n),this;for(var s=Object.keys(r).sort(),i=[r,n],o=Array.isArray(r)?this._arrayTreeMap:this._objectTreeMap,a=0;a<s.length;a++){var c=s[a];o.has(c)||o.set(c,new e),o=o.get(c);var l=r[c];o.has(l)||o.set(l,new e),o=o.get(l)}var u=o.get("_ekm_value");return u&&this._map.delete(u[0]),o.set("_ekm_value",i),this._map.set(r,i),this}},{key:"get",value:function(e){if(null===e||"object"!==t(e))return this._map.get(e);var r=n(this,e);return r?r[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==t(e)?this._map.has(e):void 0!==n(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(s,i){null!==i&&"object"===t(i)&&(s=s[1]),e.call(n,s,i,r)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}],i&&r(s.prototype,i),o&&r(s,o),e}();e.exports=s},7734:e=>{e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(s of t.entries())if(!r.has(s[0]))return!1;for(s of t.entries())if(!e(s[1],r.get(s[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(s of t.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(t[s]!==r[s])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((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;0!=s--;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{EntityProvider:()=>nn,__experimentalFetchLinkSuggestions:()=>Er,__experimentalFetchUrlData:()=>hr,__experimentalUseEntityRecord:()=>pn,__experimentalUseEntityRecords:()=>En,__experimentalUseResourcePermissions:()=>hn,fetchBlockPatterns:()=>vr,privateApis:()=>Un,store:()=>Dn,useEntityBlockEditor:()=>An,useEntityId:()=>_n,useEntityProp:()=>Pn,useEntityRecord:()=>dn,useEntityRecords:()=>yn,useResourcePermissions:()=>mn});var s={};r.r(s),r.d(s,{__experimentalGetCurrentGlobalStylesId:()=>Ke,__experimentalGetCurrentThemeBaseGlobalStyles:()=>tt,__experimentalGetCurrentThemeGlobalStylesVariations:()=>rt,__experimentalGetDirtyEntityRecords:()=>Ce,__experimentalGetEntitiesBeingSaved:()=>Ae,__experimentalGetEntityRecordNoResolver:()=>we,canUser:()=>We,canUserEditEntityRecord:()=>ze,getAuthors:()=>Ee,getAutosave:()=>Xe,getAutosaves:()=>Je,getBlockPatternCategories:()=>st,getBlockPatterns:()=>nt,getCurrentTheme:()=>Fe,getCurrentThemeGlobalStylesRevisions:()=>ot,getCurrentUser:()=>ge,getDefaultTemplateId:()=>at,getEditedEntityRecord:()=>Le,getEmbedPreview:()=>Ye,getEntitiesByKind:()=>he,getEntitiesConfig:()=>ve,getEntity:()=>_e,getEntityConfig:()=>Re,getEntityRecord:()=>be,getEntityRecordEdits:()=>Pe,getEntityRecordNonTransientEdits:()=>Ue,getEntityRecords:()=>Ie,getEntityRecordsTotalItems:()=>ke,getEntityRecordsTotalPages:()=>Oe,getLastEntityDeleteError:()=>Ve,getLastEntitySaveError:()=>Ne,getRawEntityRecord:()=>Se,getRedoEdit:()=>qe,getReferenceByDistinctEdits:()=>et,getRevision:()=>lt,getRevisions:()=>ct,getThemeSupports:()=>Qe,getUndoEdit:()=>Ge,getUserPatternCategories:()=>it,getUserQueryResults:()=>me,hasEditsForEntityRecord:()=>xe,hasEntityRecords:()=>Te,hasFetchedAutosaves:()=>Ze,hasRedo:()=>$e,hasUndo:()=>Be,isAutosavingEntityRecord:()=>je,isDeletingEntityRecord:()=>De,isPreviewEmbedFallback:()=>He,isRequestingEmbedPreview:()=>ye,isSavingEntityRecord:()=>Me});var i={};r.r(i),r.d(i,{getBlockPatternsForPostType:()=>Et,getEntityRecordPermissions:()=>mt,getEntityRecordsPermissions:()=>gt,getHomePage:()=>_t,getNavigationFallbackId:()=>yt,getPostsPageId:()=>Rt,getRegisteredPostMeta:()=>ht,getTemplateId:()=>bt,getUndoManager:()=>ft});var o={};r.r(o),r.d(o,{__experimentalBatch:()=>Zt,__experimentalReceiveCurrentGlobalStylesId:()=>qt,__experimentalReceiveThemeBaseGlobalStyles:()=>Bt,__experimentalReceiveThemeGlobalStyleVariations:()=>$t,__experimentalSaveSpecifiedEntityEdits:()=>tr,__unstableCreateUndoLevel:()=>Jt,addEntities:()=>Nt,deleteEntityRecord:()=>Yt,editEntityRecord:()=>Ht,receiveAutosaves:()=>ir,receiveCurrentTheme:()=>Gt,receiveCurrentUser:()=>Dt,receiveDefaultTemplateId:()=>ar,receiveEmbedPreview:()=>Qt,receiveEntityRecords:()=>Vt,receiveNavigationFallbackId:()=>or,receiveRevisions:()=>cr,receiveThemeGlobalStyleRevisions:()=>Kt,receiveThemeSupports:()=>Ft,receiveUploadPermissions:()=>rr,receiveUserPermission:()=>nr,receiveUserPermissions:()=>sr,receiveUserQuery:()=>Mt,redo:()=>zt,saveEditedEntityRecord:()=>er,saveEntityRecord:()=>Xt,undo:()=>Wt});var a={};r.r(a),r.d(a,{receiveRegisteredPostMeta:()=>lr});var c={};r.r(c),r.d(c,{__experimentalGetCurrentGlobalStylesId:()=>xr,__experimentalGetCurrentThemeBaseGlobalStyles:()=>Lr,__experimentalGetCurrentThemeGlobalStylesVariations:()=>jr,canUser:()=>Cr,canUserEditEntityRecord:()=>Ar,getAuthors:()=>_r,getAutosave:()=>Ur,getAutosaves:()=>Pr,getBlockPatternCategories:()=>Nr,getBlockPatterns:()=>Dr,getCurrentTheme:()=>Ir,getCurrentThemeGlobalStylesRevisions:()=>Mr,getCurrentUser:()=>Rr,getDefaultTemplateId:()=>qr,getEditedEntityRecord:()=>Sr,getEmbedPreview:()=>Or,getEntitiesConfig:()=>Kr,getEntityRecord:()=>br,getEntityRecords:()=>Tr,getNavigationFallbackId:()=>Gr,getRawEntityRecord:()=>wr,getRegisteredPostMeta:()=>Fr,getRevision:()=>$r,getRevisions:()=>Br,getThemeSupports:()=>kr,getUserPatternCategories:()=>Vr});const l=window.wp.data;var u=r(7734),d=r.n(u);const p=window.wp.compose,f=window.wp.isShallowEqual;var y=r.n(f);function E(e,t){const r={...e};return Object.entries(t).forEach((([e,t])=>{r[e]?r[e]={...r[e],to:t.to}:r[e]=t})),r}const g=(e,t)=>{const r=e?.findIndex((({id:e})=>"string"==typeof e?e===t.id:y()(e,t.id))),n=[...e];return-1!==r?n[r]={id:t.id,changes:E(n[r].changes,t.changes)}:n.push(t),n};function m(){let e=[],t=[],r=0;const n=()=>{e=e.slice(0,r||void 0),r=0},s=()=>{var r;const n=0===e.length?0:e.length-1;let s=null!==(r=e[n])&&void 0!==r?r:[];t.forEach((e=>{s=g(s,e)})),t=[],e[n]=s};return{addRecord(r,i=!1){const o=!r||(e=>!e.filter((({changes:e})=>Object.values(e).some((({from:e,to:t})=>"function"!=typeof e&&"function"!=typeof t&&!y()(e,t))))).length)(r);if(i){if(o)return;r.forEach((e=>{t=g(t,e)}))}else{if(n(),t.length&&s(),o)return;e.push(r)}},undo(){t.length&&(n(),s());const i=e[e.length-1+r];if(i)return r-=1,i},redo(){const t=e[e.length+r];if(t)return r+=1,t},hasUndo:()=>!!e[e.length-1+r],hasRedo:()=>!!e[e.length+r]}}const h=e=>t=>(r,n)=>void 0===r||e(n)?t(r,n):r,v=e=>t=>(r,n)=>t(r,e(n));const _=e=>t=>(r={},n)=>{const s=n[e];if(void 0===s)return r;const i=t(r[s],n);return i===r[s]?r:{...r,[s]:i}};var R=function(){return R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},R.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function b(e){return e.toLowerCase()}var w=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],S=/[^A-Z0-9]+/gi;function T(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,n=void 0===r?w:r,s=t.stripRegexp,i=void 0===s?S:s,o=t.transform,a=void 0===o?b:o,c=t.delimiter,l=void 0===c?" ":c,u=I(I(e,n,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(l)}function I(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}function k(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}function O(e,t){var r=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function C(e,t){return void 0===t&&(t={}),T(e,R({delimiter:"",transform:O},t))}const A=window.wp.apiFetch;var P=r.n(A);const U=window.wp.i18n,x=window.wp.richText,L="id",j=["title","excerpt","content"],M=[{label:(0,U.__)("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url","page_for_posts","page_on_front","show_on_front"].join(",")},plural:"__unstableBases",syncConfig:{fetch:async()=>P()({path:"/"}),applyChangesToDoc:(e,t)=>{const r=e.getMap("document");Object.entries(t).forEach((([e,t])=>{r.get(e)!==t&&r.set(e,t)}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:(0,U.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes",syncConfig:{fetch:async e=>P()({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const r=e.getMap("document");Object.entries(t).forEach((([e,t])=>{r.get(e)!==t&&r.set(e,t)}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:(0,U.__)("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:(0,U.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:(0,U.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:(0,U.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:(0,U.__)("Widget types")},{label:(0,U.__)("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:(0,U.__)("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:(0,U.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:(0,U.__)("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:(0,U.__)("Menu Location"),key:"name"},{label:(0,U.__)("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:(0,U.__)("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:(0,U.__)("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:(0,U.__)("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],D=[{kind:"postType",loadEntities:async function(){const e=await P()({path:"/wp/v2/types?context=view"});return Object.entries(null!=e?e:{}).map((([e,t])=>{var r;const n=["wp_template","wp_template_part"].includes(e),s=null!==(r=t?.rest_namespace)&&void 0!==r?r:"wp/v2";return{kind:"postType",baseURL:`/${s}/${t.rest_base}`,baseURLParams:{context:"edit"},name:e,label:t.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:j,getTitle:e=>{var t,r,s;return e?.title?.rendered||e?.title||(n?(r=null!==(t=e.slug)&&void 0!==t?t:"",void 0===s&&(s={}),T(r,R({delimiter:" ",transform:k},s))):String(e.id))},__unstablePrePersist:n?void 0:N,__unstable_rest_base:t.rest_base,syncConfig:{fetch:async e=>P()({path:`/${s}/${t.rest_base}/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const r=e.getMap("document");Object.entries(t).forEach((([e,t])=>{"function"!=typeof t&&("blocks"===e&&(V.has(t)||V.set(t,q(t)),t=V.get(t)),r.get(e)!==t&&r.set(e,t))}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"postType/"+t.name,getSyncObjectId:e=>e,supportsPagination:!0,getRevisionsUrl:(e,r)=>`/${s}/${t.rest_base}/${e}/revisions${r?"/"+r:""}`,revisionKey:n?"wp_id":L}}))}},{kind:"taxonomy",loadEntities:async function(){const e=await P()({path:"/wp/v2/taxonomies?context=view"});return Object.entries(null!=e?e:{}).map((([e,t])=>{var r;return{kind:"taxonomy",baseURL:`/${null!==(r=t?.rest_namespace)&&void 0!==r?r:"wp/v2"}/${t.rest_base}`,baseURLParams:{context:"edit"},name:e,label:t.name}}))}},{kind:"root",name:"site",plural:"sites",loadEntities:async function(){var e;const t={label:(0,U.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",syncConfig:{fetch:async()=>P()({path:"/wp/v2/settings"}),applyChangesToDoc:(e,t)=>{const r=e.getMap("document");Object.entries(t).forEach((([e,t])=>{r.get(e)!==t&&r.set(e,t)}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index",meta:{}},r=await P()({path:t.baseURL,method:"OPTIONS"}),n={};return Object.entries(null!==(e=r?.schema?.properties)&&void 0!==e?e:{}).forEach((([e,t])=>{"object"==typeof t&&t.title&&(n[e]=t.title)})),[{...t,meta:{labels:n}}]}}],N=(e,t)=>{const r={};return"auto-draft"===e?.status&&(t.status||r.status||(r.status="draft"),t.title&&"Auto Draft"!==t.title||r.title||e?.title&&"Auto Draft"!==e?.title||(r.title="")),r},V=new WeakMap;function G(e){const t={...e};for(const[r,n]of Object.entries(e))n instanceof x.RichTextData&&(t[r]=n.valueOf());return t}function q(e){return e.map((e=>{const{innerBlocks:t,attributes:r,...n}=e;return{...n,attributes:G(r),innerBlocks:q(t)}}))}const B=(e,t,r="get")=>`${r}${"root"===e?"":C(e)}${C(t)}`,$=window.wp.url;const F=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};const K=function(e){const t=new WeakMap;return r=>{let n;return t.has(r)?n=t.get(r):(n=e(r),null!==r&&"object"==typeof r&&t.set(r,n)),n}};const Q=K((function(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},r=Object.keys(e).sort();for(let i=0;i<r.length;i++){const o=r[i];let a=e[o];switch(o){case"page":t[o]=Number(a);break;case"per_page":t.perPage=Number(a);break;case"context":t.context=a;break;default:var n,s;if("_fields"===o)t.fields=null!==(n=F(a))&&void 0!==n?n:[],a=t.fields.join();if("include"===o)"number"==typeof a&&(a=a.toString()),t.include=(null!==(s=F(a))&&void 0!==s?s:[]).map(Number),a=t.include.join();t.stableKey+=(t.stableKey?"&":"")+(0,$.addQueryArgs)("",{[o]:a}).slice(1)}}return t}));function Y(e){const{query:t}=e;if(!t)return"default";return Q(t).context}function H(e,t,r,n){var s;if(1===r&&-1===n)return t;const i=(r-1)*n,o=Math.max(null!==(s=e?.length)&&void 0!==s?s:0,i+t.length),a=new Array(o);for(let r=0;r<o;r++){const s=r>=i&&r<i+n;a[r]=s?t[r-i]:e?.[r]}return a}function W(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.some((t=>Number.isInteger(t)?t===+e:t===e)))))}const z=(0,p.compose)([h((e=>"query"in e)),v((e=>e.query?{...e,...Q(e.query)}:e)),_("context"),_("stableKey")])(((e={},t)=>{const{type:r,page:n,perPage:s,key:i=L}=t;return"RECEIVE_ITEMS"!==r?e:{itemIds:H(e?.itemIds||[],t.items.map((e=>e?.[i])).filter(Boolean),n,s),meta:t.meta}})),J=(0,l.combineReducers)({items:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const r=Y(t),n=t.key||L;return{...e,[r]:{...e[r],...t.items.reduce(((t,s)=>{const i=s?.[n];return t[i]=function(e,t){if(!e)return t;let r=!1;const n={};for(const s in t)d()(e[s],t[s])?n[s]=e[s]:(r=!0,n[s]=t[s]);if(!r)return e;for(const t in e)n.hasOwnProperty(t)||(n[t]=e[t]);return n}(e?.[r]?.[i],s),t}),{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map((([e,r])=>[e,W(r,t.itemIds)])))}return e},itemIsComplete:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const r=Y(t),{query:n,key:s=L}=t,i=n?Q(n):{},o=!n||!Array.isArray(i.fields);return{...e,[r]:{...e[r],...t.items.reduce(((t,n)=>{const i=n?.[s];return t[i]=e?.[r]?.[i]||o,t}),{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map((([e,r])=>[e,W(r,t.itemIds)])))}return e},queries:(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return z(e,t);case"REMOVE_ITEMS":const r=t.itemIds.reduce(((e,t)=>(e[t]=!0,e)),{});return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,Object.fromEntries(Object.entries(t).map((([e,t])=>[e,{...t,itemIds:t.itemIds.filter((e=>!r[e]))}])))])));default:return e}}});const X=e=>(t,r)=>{if("UNDO"===r.type||"REDO"===r.type){const{record:n}=r;let s=t;return n.forEach((({id:{kind:t,name:n,recordId:i},changes:o})=>{s=e(s,{type:"EDIT_ENTITY_RECORD",kind:t,name:n,recordId:i,edits:Object.entries(o).reduce(((e,[t,n])=>(e[t]="UNDO"===r.type?n.from:n.to,e)),{})})})),s}return e(t,r)};function Z(e){return(0,p.compose)([X,h((t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind)),v((t=>({key:e.key||L,...t})))])((0,l.combineReducers)({queriedData:J,edits:(e={},t)=>{var r;switch(t.type){case"RECEIVE_ITEMS":if("default"!==(null!==(r=t?.query?.context)&&void 0!==r?r:"default"))return e;const n={...e};for(const e of t.items){const r=e?.[t.key],s=n[r];if(!s)continue;const i=Object.keys(s).reduce(((r,n)=>{var i;return d()(s[n],null!==(i=e[n]?.raw)&&void 0!==i?i:e[n])||t.persistedEdits&&d()(s[n],t.persistedEdits[n])||(r[n]=s[n]),r}),{});Object.keys(i).length?n[r]=i:delete n[r]}return n;case"EDIT_ENTITY_RECORD":const s={...e[t.recordId],...t.edits};return Object.keys(s).forEach((e=>{void 0===s[e]&&delete s[e]})),{...e,[t.recordId]:s}}return e},saving:(e={},t)=>{switch(t.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}}}return e},deleting:(e={},t)=>{switch(t.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...e,[t.recordId]:{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}}}return e},revisions:(e={},t)=>{if("RECEIVE_ITEM_REVISIONS"===t.type){const r=t.recordKey;delete t.recordKey;const n=J(e[r],{...t,type:"RECEIVE_ITEMS"});return{...e,[r]:n}}return"REMOVE_ITEMS"===t.type?Object.fromEntries(Object.entries(e).filter((([e])=>!t.itemIds.some((t=>Number.isInteger(t)?t===+e:t===e))))):e}}))}const ee=(0,l.combineReducers)({terms:function(e={},t){return"RECEIVE_TERMS"===t.type?{...e,[t.taxonomy]:t.terms}:e},users:function(e={byId:{},queries:{}},t){return"RECEIVE_USER_QUERY"===t.type?{byId:{...e.byId,...t.users.reduce(((e,t)=>({...e,[t.id]:t})),{})},queries:{...e.queries,[t.queryID]:t.users.map((e=>e.id))}}:e},currentTheme:function(e=void 0,t){return"RECEIVE_CURRENT_THEME"===t.type?t.currentTheme.stylesheet:e},currentGlobalStylesId:function(e=void 0,t){return"RECEIVE_CURRENT_GLOBAL_STYLES_ID"===t.type?t.id:e},currentUser:function(e={},t){return"RECEIVE_CURRENT_USER"===t.type?t.currentUser:e},themeGlobalStyleVariations:function(e={},t){return"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS"===t.type?{...e,[t.stylesheet]:t.variations}:e},themeBaseGlobalStyles:function(e={},t){return"RECEIVE_THEME_GLOBAL_STYLES"===t.type?{...e,[t.stylesheet]:t.globalStyles}:e},themeGlobalStyleRevisions:function(e={},t){return"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS"===t.type?{...e,[t.currentId]:t.revisions}:e},taxonomies:function(e=[],t){return"RECEIVE_TAXONOMIES"===t.type?t.taxonomies:e},entities:(e={},t)=>{const r=function(e=M,t){return"ADD_ENTITIES"===t.type?[...e,...t.entities]:e}(e.config,t);let n=e.reducer;if(!n||r!==e.config){const e=r.reduce(((e,t)=>{const{kind:r}=t;return e[r]||(e[r]=[]),e[r].push(t),e}),{});n=(0,l.combineReducers)(Object.entries(e).reduce(((e,[t,r])=>{const n=(0,l.combineReducers)(r.reduce(((e,t)=>({...e,[t.name]:Z(t)})),{}));return e[t]=n,e}),{}))}const s=n(e.records,t);return s===e.records&&r===e.config&&n===e.reducer?e:{reducer:n,records:s,config:r}},editsReference:function(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e},undoManager:function(e=m()){return e},embedPreviews:function(e={},t){if("RECEIVE_EMBED_PREVIEW"===t.type){const{url:r,preview:n}=t;return{...e,[r]:n}}return e},userPermissions:function(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed};case"RECEIVE_USER_PERMISSIONS":return{...e,...t.permissions}}return e},autosaves:function(e={},t){if("RECEIVE_AUTOSAVES"===t.type){const{postId:r,autosaves:n}=t;return{...e,[r]:n}}return e},blockPatterns:function(e=[],t){return"RECEIVE_BLOCK_PATTERNS"===t.type?t.patterns:e},blockPatternCategories:function(e=[],t){return"RECEIVE_BLOCK_PATTERN_CATEGORIES"===t.type?t.categories:e},userPatternCategories:function(e=[],t){return"RECEIVE_USER_PATTERN_CATEGORIES"===t.type?t.patternCategories:e},navigationFallbackId:function(e=null,t){return"RECEIVE_NAVIGATION_FALLBACK_ID"===t.type?t.fallbackId:e},defaultTemplates:function(e={},t){return"RECEIVE_DEFAULT_TEMPLATE"===t.type?{...e,[JSON.stringify(t.query)]:t.templateId}:e},registeredPostMeta:function(e={},t){return"RECEIVE_REGISTERED_POST_META"===t.type?{...e,[t.postType]:t.registeredPostMeta}:e}}),te=window.wp.deprecated;var re=r.n(te);const ne="core";var se=r(3249),ie=r.n(se);function oe(e,t,r){if(!e||"object"!=typeof e)return e;const n=Array.isArray(t)?t:t.split(".");return n.reduce(((e,t,s)=>(void 0===e[t]&&(Number.isInteger(n[s+1])?e[t]=[]:e[t]={}),s===n.length-1&&(e[t]=r),e[t])),e),e}const ae=new WeakMap;const ce=(0,l.createSelector)(((e,t={})=>{let r=ae.get(e);if(r){const e=r.get(t);if(void 0!==e)return e}else r=new(ie()),ae.set(e,r);const n=function(e,t){const{stableKey:r,page:n,perPage:s,include:i,fields:o,context:a}=Q(t);let c;if(e.queries?.[a]?.[r]&&(c=e.queries[a][r].itemIds),!c)return null;const l=-1===s?0:(n-1)*s,u=-1===s?c.length:Math.min(l+s,c.length),d=[];for(let t=l;t<u;t++){const r=c[t];if(Array.isArray(i)&&!i.includes(r))continue;if(void 0===r)continue;if(!e.items[a]?.hasOwnProperty(r))return null;const n=e.items[a][r];let s;if(Array.isArray(o)){s={};for(let e=0;e<o.length;e++){const t=o[e].split(".");let r=n;t.forEach((e=>{r=r?.[e]})),oe(s,t,r)}}else{if(!e.itemIsComplete[a]?.[r])return null;s=n}d.push(s)}return d}(e,t);return r.set(t,n),n}));function le(e,t={}){var r;const{stableKey:n,context:s}=Q(t);return null!==(r=e.queries?.[s]?.[n]?.meta?.totalItems)&&void 0!==r?r:null}const ue=["create","read","update","delete"];function de(e){const t={};if(!e)return t;const r={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[n,s]of Object.entries(r))t[n]=e.includes(s);return t}function pe(e,t,r){return("object"==typeof t?[e,t.kind,t.name,t.id]:[e,t,r]).filter(Boolean).join("/")}const fe={},ye=(0,l.createRegistrySelector)((e=>(t,r)=>e(ne).isResolving("getEmbedPreview",[r])));function Ee(e,t){re()("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const r=(0,$.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t);return me(e,r)}function ge(e){return e.currentUser}const me=(0,l.createSelector)(((e,t)=>{var r;return(null!==(r=e.users.queries[t])&&void 0!==r?r:[]).map((t=>e.users.byId[t]))}),((e,t)=>[e.users.queries[t],e.users.byId]));function he(e,t){return re()("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),ve(e,t)}const ve=(0,l.createSelector)(((e,t)=>e.entities.config.filter((e=>e.kind===t))),((e,t)=>e.entities.config));function _e(e,t,r){return re()("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Re(e,t,r)}function Re(e,t,r){return e.entities.config?.find((e=>e.kind===t&&e.name===r))}const be=(0,l.createSelector)(((e,t,r,n,s)=>{var i;const o=e.entities.records?.[t]?.[r]?.queriedData;if(!o)return;const a=null!==(i=s?.context)&&void 0!==i?i:"default";if(void 0===s){if(!o.itemIsComplete[a]?.[n])return;return o.items[a][n]}const c=o.items[a]?.[n];if(c&&s._fields){var l;const e={},t=null!==(l=F(s._fields))&&void 0!==l?l:[];for(let r=0;r<t.length;r++){const n=t[r].split(".");let s=c;n.forEach((e=>{s=s?.[e]})),oe(e,n,s)}return e}return c}),((e,t,r,n,s)=>{var i;const o=null!==(i=s?.context)&&void 0!==i?i:"default";return[e.entities.records?.[t]?.[r]?.queriedData?.items[o]?.[n],e.entities.records?.[t]?.[r]?.queriedData?.itemIsComplete[o]?.[n]]}));function we(e,t,r,n){return be(e,t,r,n)}be.__unstableNormalizeArgs=e=>{const t=[...e],r=t?.[2];return t[2]=/^\s*\d+\s*$/.test(r)?Number(r):r,t};const Se=(0,l.createSelector)(((e,t,r,n)=>{const s=be(e,t,r,n);return s&&Object.keys(s).reduce(((n,i)=>(!function(e,t){return(e.rawAttributes||[]).includes(t)}(Re(e,t,r),i)?n[i]=s[i]:n[i]=void 0!==s[i]?.raw?s[i]?.raw:s[i],n)),{})}),((e,t,r,n,s)=>{var i;const o=null!==(i=s?.context)&&void 0!==i?i:"default";return[e.entities.config,e.entities.records?.[t]?.[r]?.queriedData?.items[o]?.[n],e.entities.records?.[t]?.[r]?.queriedData?.itemIsComplete[o]?.[n]]}));function Te(e,t,r,n){return Array.isArray(Ie(e,t,r,n))}const Ie=(e,t,r,n)=>{const s=e.entities.records?.[t]?.[r]?.queriedData;return s?ce(s,n):null},ke=(e,t,r,n)=>{const s=e.entities.records?.[t]?.[r]?.queriedData;return s?le(s,n):null},Oe=(e,t,r,n)=>{const s=e.entities.records?.[t]?.[r]?.queriedData;if(!s)return null;if(-1===n.per_page)return 1;const i=le(s,n);return i?n.per_page?Math.ceil(i/n.per_page):function(e,t={}){var r;const{stableKey:n,context:s}=Q(t);return null!==(r=e.queries?.[s]?.[n]?.meta?.totalPages)&&void 0!==r?r:null}(s,n):i},Ce=(0,l.createSelector)((e=>{const{entities:{records:t}}=e,r=[];return Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((s=>{const i=Object.keys(t[n][s].edits).filter((t=>be(e,n,s,t)&&xe(e,n,s,t)));if(i.length){const t=Re(e,n,s);i.forEach((i=>{const o=Le(e,n,s,i);r.push({key:o?o[t.key||L]:void 0,title:t?.getTitle?.(o)||"",name:s,kind:n})}))}}))})),r}),(e=>[e.entities.records])),Ae=(0,l.createSelector)((e=>{const{entities:{records:t}}=e,r=[];return Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((s=>{const i=Object.keys(t[n][s].saving).filter((t=>Me(e,n,s,t)));if(i.length){const t=Re(e,n,s);i.forEach((i=>{const o=Le(e,n,s,i);r.push({key:o?o[t.key||L]:void 0,title:t?.getTitle?.(o)||"",name:s,kind:n})}))}}))})),r}),(e=>[e.entities.records]));function Pe(e,t,r,n){return e.entities.records?.[t]?.[r]?.edits?.[n]}const Ue=(0,l.createSelector)(((e,t,r,n)=>{const{transientEdits:s}=Re(e,t,r)||{},i=Pe(e,t,r,n)||{};return s?Object.keys(i).reduce(((e,t)=>(s[t]||(e[t]=i[t]),e)),{}):i}),((e,t,r,n)=>[e.entities.config,e.entities.records?.[t]?.[r]?.edits?.[n]]));function xe(e,t,r,n){return Me(e,t,r,n)||Object.keys(Ue(e,t,r,n)).length>0}const Le=(0,l.createSelector)(((e,t,r,n)=>{const s=Se(e,t,r,n),i=Pe(e,t,r,n);return!(!s&&!i)&&{...s,...i}}),((e,t,r,n,s)=>{var i;const o=null!==(i=s?.context)&&void 0!==i?i:"default";return[e.entities.config,e.entities.records?.[t]?.[r]?.queriedData.items[o]?.[n],e.entities.records?.[t]?.[r]?.queriedData.itemIsComplete[o]?.[n],e.entities.records?.[t]?.[r]?.edits?.[n]]}));function je(e,t,r,n){var s;const{pending:i,isAutosave:o}=null!==(s=e.entities.records?.[t]?.[r]?.saving?.[n])&&void 0!==s?s:{};return Boolean(i&&o)}function Me(e,t,r,n){var s;return null!==(s=e.entities.records?.[t]?.[r]?.saving?.[n]?.pending)&&void 0!==s&&s}function De(e,t,r,n){var s;return null!==(s=e.entities.records?.[t]?.[r]?.deleting?.[n]?.pending)&&void 0!==s&&s}function Ne(e,t,r,n){return e.entities.records?.[t]?.[r]?.saving?.[n]?.error}function Ve(e,t,r,n){return e.entities.records?.[t]?.[r]?.deleting?.[n]?.error}function Ge(e){re()("select( 'core' ).getUndoEdit()",{since:"6.3"})}function qe(e){re()("select( 'core' ).getRedoEdit()",{since:"6.3"})}function Be(e){return e.undoManager.hasUndo()}function $e(e){return e.undoManager.hasRedo()}function Fe(e){return e.currentTheme?be(e,"root","theme",e.currentTheme):null}function Ke(e){return e.currentGlobalStylesId}function Qe(e){var t;return null!==(t=Fe(e)?.theme_supports)&&void 0!==t?t:fe}function Ye(e,t){return e.embedPreviews[t]}function He(e,t){const r=e.embedPreviews[t],n='<a href="'+t+'">'+t+"</a>";return!!r&&r.html===n}function We(e,t,r,n){if("object"==typeof r&&(!r.kind||!r.name))return!1;const s=pe(t,r,n);return e.userPermissions[s]}function ze(e,t,r,n){return re()("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),We(e,"update",{kind:t,name:r,id:n})}function Je(e,t,r){return e.autosaves[r]}function Xe(e,t,r,n){if(void 0===n)return;const s=e.autosaves[r];return s?.find((e=>e.author===n))}const Ze=(0,l.createRegistrySelector)((e=>(t,r,n)=>e(ne).hasFinishedResolution("getAutosaves",[r,n])));function et(e){return e.editsReference}function tt(e){const t=Fe(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function rt(e){const t=Fe(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function nt(e){return e.blockPatterns}function st(e){return e.blockPatternCategories}function it(e){return e.userPatternCategories}function ot(e){re()("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=Ke(e);return t?e.themeGlobalStyleRevisions[t]:null}function at(e,t){return e.defaultTemplates[JSON.stringify(t)]}const ct=(e,t,r,n,s)=>{const i=e.entities.records?.[t]?.[r]?.revisions?.[n];return i?ce(i,s):null},lt=(0,l.createSelector)(((e,t,r,n,s,i)=>{var o;const a=e.entities.records?.[t]?.[r]?.revisions?.[n];if(!a)return;const c=null!==(o=i?.context)&&void 0!==o?o:"default";if(void 0===i){if(!a.itemIsComplete[c]?.[s])return;return a.items[c][s]}const l=a.items[c]?.[s];if(l&&i._fields){var u;const e={},t=null!==(u=F(i._fields))&&void 0!==u?u:[];for(let r=0;r<t.length;r++){const n=t[r].split(".");let s=l;n.forEach((e=>{s=s?.[e]})),oe(e,n,s)}return e}return l}),((e,t,r,n,s,i)=>{var o;const a=null!==(o=i?.context)&&void 0!==o?o:"default";return[e.entities.records?.[t]?.[r]?.revisions?.[n]?.items?.[a]?.[s],e.entities.records?.[t]?.[r]?.revisions?.[n]?.itemIsComplete?.[a]?.[s]]})),ut=window.wp.privateApis,{lock:dt,unlock:pt}=(0,ut.__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");function ft(e){return e.undoManager}function yt(e){return e.navigationFallbackId}const Et=(0,l.createRegistrySelector)((e=>(0,l.createSelector)(((t,r)=>e(ne).getBlockPatterns().filter((({postTypes:e})=>!e||Array.isArray(e)&&e.includes(r)))),(()=>[e(ne).getBlockPatterns()])))),gt=(0,l.createRegistrySelector)((e=>(0,l.createSelector)(((t,r,n,s)=>(Array.isArray(s)?s:[s]).map((t=>({delete:e(ne).canUser("delete",{kind:r,name:n,id:t}),update:e(ne).canUser("update",{kind:r,name:n,id:t})})))),(e=>[e.userPermissions]))));function mt(e,t,r,n){return gt(e,t,r,n)[0]}function ht(e,t){var r;return null!==(r=e.registeredPostMeta?.[t])&&void 0!==r?r:{}}function vt(e){return e&&["number","string"].includes(typeof e)?0===Number(e)?null:e.toString():null}const _t=(0,l.createRegistrySelector)((e=>(0,l.createSelector)((()=>{const t=e(ne).getEntityRecord("root","__unstableBase");if(!t)return null;const r="page"===t?.show_on_front?vt(t.page_on_front):null;if(r)return{postType:"page",postId:r};return{postType:"wp_template",postId:e(ne).getDefaultTemplateId({slug:"front-page"})}}),(e=>[be(e,"root","__unstableBase"),at(e,{slug:"front-page"})])))),Rt=(0,l.createRegistrySelector)((e=>()=>{const t=e(ne).getEntityRecord("root","__unstableBase");return"page"===t?.show_on_front?vt(t.page_for_posts):null})),bt=(0,l.createRegistrySelector)((e=>(t,r,n)=>{const s=pt(e(ne)).getHomePage();if(!s)return;if("page"===r&&r===s?.postType&&n.toString()===s?.postId){const t=e(ne).getEntityRecords("postType","wp_template",{per_page:-1});if(!t)return;const r=t.find((({slug:e})=>"front-page"===e))?.id;if(r)return r}const i=e(ne).getEditedEntityRecord("postType",r,n);if(!i)return;const o=pt(e(ne)).getPostsPageId();if("page"===r&&o===n.toString())return e(ne).getDefaultTemplateId({slug:"home"});const a=i.template;if(a){const t=e(ne).getEntityRecords("postType","wp_template",{per_page:-1})?.find((({slug:e})=>e===a));if(t)return t.id}let c;return c=i.slug?"page"===r?`${r}-${i.slug}`:`single-${r}-${i.slug}`:"page"===r?"page":`single-${r}`,e(ne).getDefaultTemplateId({slug:c})})),wt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let St;const Tt=new Uint8Array(16);function It(){if(!St&&(St="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!St))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return St(Tt)}const kt=[];for(let e=0;e<256;++e)kt.push((e+256).toString(16).slice(1));function Ot(e,t=0){return kt[e[t+0]]+kt[e[t+1]]+kt[e[t+2]]+kt[e[t+3]]+"-"+kt[e[t+4]]+kt[e[t+5]]+"-"+kt[e[t+6]]+kt[e[t+7]]+"-"+kt[e[t+8]]+kt[e[t+9]]+"-"+kt[e[t+10]]+kt[e[t+11]]+kt[e[t+12]]+kt[e[t+13]]+kt[e[t+14]]+kt[e[t+15]]}const Ct=function(e,t,r){if(wt.randomUUID&&!t&&!e)return wt.randomUUID();const n=(e=e||{}).random||(e.rng||It)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return Ot(n)};function At(e,t,r){if(!e||"object"!=typeof e||"string"!=typeof t&&!Array.isArray(t))return e;const n=Array.isArray(t)?t:t.split(".");let s=e;return n.forEach((e=>{s=s?.[e]})),void 0!==s?s:r}function Pt(e,t,r){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:r}}let Ut=null;async function xt(e){if(null===Ut){const e=await P()({path:"/batch/v1",method:"OPTIONS"});Ut=e.endpoints[0].args.requests.maxItems}const t=[];for(const r of function(e,t){const r=[...e],n=[];for(;r.length;)n.push(r.splice(0,t));return n}(e,Ut)){const e=await P()({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:r.map((e=>({path:e.path,body:e.data,method:e.method,headers:e.headers})))}});let n;n=e.failed?e.responses.map((e=>({error:e?.body}))):e.responses.map((e=>{const t={};return e.status>=200&&e.status<300?t.output=e.body:t.error=e.body,t})),t.push(...n)}return t}function Lt(e=xt){let t=0,r=[];const n=new jt;return{add(e){const s=++t;n.add(s);const i=e=>new Promise(((t,i)=>{r.push({input:e,resolve:t,reject:i}),n.delete(s)}));return"function"==typeof e?Promise.resolve(e(i)).finally((()=>{n.delete(s)})):i(e)},async run(){let t;n.size&&await new Promise((e=>{const t=n.subscribe((()=>{n.size||(t(),e(void 0))}))}));try{if(t=await e(r.map((({input:e})=>e))),t.length!==r.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(e){for(const{reject:t}of r)t(e);throw e}let s=!0;return t.forEach(((e,t)=>{const n=r[t];var i;e?.error?(n?.reject(e.error),s=!1):n?.resolve(null!==(i=e?.output)&&void 0!==i?i:e)})),r=[],s}}}class jt{constructor(...e){this.set=new Set(...e),this.subscribers=new Set}get size(){return this.set.size}add(e){return this.set.add(e),this.subscribers.forEach((e=>e())),this}delete(e){const t=this.set.delete(e);return this.subscribers.forEach((e=>e())),t}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}}function Mt(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function Dt(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function Nt(e){return{type:"ADD_ENTITIES",entities:e}}function Vt(e,t,r,n,s=!1,i,o){let a;return"postType"===e&&(r=(Array.isArray(r)?r:[r]).map((e=>"auto-draft"===e.status?{...e,title:""}:e))),a=n?function(e,t={},r,n){return{...Pt(e,r,n),query:t}}(r,n,i,o):Pt(r,i,o),{...a,kind:e,name:t,invalidateCache:s}}function Gt(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function qt(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function Bt(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function $t(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function Ft(){return re()("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function Kt(e,t){return re()("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function Qt(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const Yt=(e,t,r,n,{__unstableFetch:s=P(),throwOnError:i=!1}={})=>async({dispatch:o,resolveSelect:a})=>{const c=(await a.getEntitiesConfig(e)).find((r=>r.kind===e&&r.name===t));let l,u=!1;if(!c)return;const d=await o.__unstableAcquireStoreLock(ne,["entities","records",e,t,r],{exclusive:!0});try{o({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:r});let a=!1;try{let i=`${c.baseURL}/${r}`;n&&(i=(0,$.addQueryArgs)(i,n)),u=await s({path:i,method:"DELETE"}),await o(function(e,t,r,n=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(r)?r:[r],kind:e,name:t,invalidateCache:n}}(e,t,r,!0))}catch(e){a=!0,l=e}if(o({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:r,error:l}),a&&i)throw l;return u}finally{o.__unstableReleaseStoreLock(d)}},Ht=(e,t,r,n,s={})=>({select:i,dispatch:o})=>{const a=i.getEntityConfig(e,t);if(!a)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:c={}}=a,l=i.getRawEntityRecord(e,t,r),u=i.getEditedEntityRecord(e,t,r),p={kind:e,name:t,recordId:r,edits:Object.keys(n).reduce(((e,t)=>{const r=l[t],s=u[t],i=c[t]?{...s,...n[t]}:n[t];return e[t]=d()(r,i)?void 0:i,e}),{})};window.__experimentalEnableSync&&a.syncConfig||(s.undoIgnore||i.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:r},changes:Object.keys(n).reduce(((e,t)=>(e[t]={from:u[t],to:n[t]},e)),{})}],s.isCached),o({type:"EDIT_ENTITY_RECORD",...p}))},Wt=()=>({select:e,dispatch:t})=>{const r=e.getUndoManager().undo();r&&t({type:"UNDO",record:r})},zt=()=>({select:e,dispatch:t})=>{const r=e.getUndoManager().redo();r&&t({type:"REDO",record:r})},Jt=()=>({select:e})=>{e.getUndoManager().addRecord()},Xt=(e,t,r,{isAutosave:n=!1,__unstableFetch:s=P(),throwOnError:i=!1}={})=>async({select:o,resolveSelect:a,dispatch:c})=>{const l=(await a.getEntitiesConfig(e)).find((r=>r.kind===e&&r.name===t));if(!l)return;const u=l.key||L,d=r[u],p=await c.__unstableAcquireStoreLock(ne,["entities","records",e,t,d||Ct()],{exclusive:!0});try{for(const[n,s]of Object.entries(r))if("function"==typeof s){const i=s(o.getEditedEntityRecord(e,t,d));c.editEntityRecord(e,t,d,{[n]:i},{undoIgnore:!0}),r[n]=i}let u,p;c({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:d,isAutosave:n});let f=!1;try{const i=`${l.baseURL}${d?"/"+d:""}`,p=o.getRawEntityRecord(e,t,d);if(n){const n=o.getCurrentUser(),l=n?n.id:void 0,d=await a.getAutosave(p.type,p.id,l);let f={...p,...d,...r};if(f=Object.keys(f).reduce(((e,t)=>(["title","excerpt","content","meta"].includes(t)&&(e[t]=f[t]),e)),{status:"auto-draft"===f.status?"draft":void 0}),u=await s({path:`${i}/autosaves`,method:"POST",data:f}),p.id===u.id){let r={...p,...f,...u};r=Object.keys(r).reduce(((e,t)=>(["title","excerpt","content"].includes(t)?e[t]=r[t]:e[t]="status"===t?"auto-draft"===p.status&&"draft"===r.status?r.status:p.status:p[t],e)),{}),c.receiveEntityRecords(e,t,r,void 0,!0)}else c.receiveAutosaves(p.id,u)}else{let n=r;l.__unstablePrePersist&&(n={...n,...l.__unstablePrePersist(p,n)}),u=await s({path:i,method:d?"PUT":"POST",data:n}),c.receiveEntityRecords(e,t,u,void 0,!0,n)}}catch(e){f=!0,p=e}if(c({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:d,error:p,isAutosave:n}),f&&i)throw p;return u}finally{c.__unstableReleaseStoreLock(p)}},Zt=e=>async({dispatch:t})=>{const r=Lt(),n={saveEntityRecord:(e,n,s,i)=>r.add((r=>t.saveEntityRecord(e,n,s,{...i,__unstableFetch:r}))),saveEditedEntityRecord:(e,n,s,i)=>r.add((r=>t.saveEditedEntityRecord(e,n,s,{...i,__unstableFetch:r}))),deleteEntityRecord:(e,n,s,i,o)=>r.add((r=>t.deleteEntityRecord(e,n,s,i,{...o,__unstableFetch:r})))},s=e.map((e=>e(n))),[,...i]=await Promise.all([r.run(),...s]);return i},er=(e,t,r,n)=>async({select:s,dispatch:i,resolveSelect:o})=>{if(!s.hasEditsForEntityRecord(e,t,r))return;const a=(await o.getEntitiesConfig(e)).find((r=>r.kind===e&&r.name===t));if(!a)return;const c=a.key||L,l=s.getEntityRecordNonTransientEdits(e,t,r),u={[c]:r,...l};return await i.saveEntityRecord(e,t,u,n)},tr=(e,t,r,n,s)=>async({select:i,dispatch:o,resolveSelect:a})=>{if(!i.hasEditsForEntityRecord(e,t,r))return;const c=i.getEntityRecordNonTransientEdits(e,t,r),l={};for(const e of n)oe(l,e,At(c,e));const u=(await a.getEntitiesConfig(e)).find((r=>r.kind===e&&r.name===t));return r&&(l[u?.key||L]=r),await o.saveEntityRecord(e,t,l,s)};function rr(e){return re()("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),nr("create/media",e)}function nr(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function sr(e){return{type:"RECEIVE_USER_PERMISSIONS",permissions:e}}function ir(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function or(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function ar(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const cr=(e,t,r,n,s,i=!1,o)=>async({dispatch:a,resolveSelect:c})=>{const l=(await c.getEntitiesConfig(e)).find((r=>r.kind===e&&r.name===t));a({type:"RECEIVE_ITEM_REVISIONS",key:l&&l?.revisionKey?l.revisionKey:L,items:Array.isArray(n)?n:[n],recordKey:r,meta:o,query:s,kind:e,name:t,invalidateCache:i})};function lr(e,t){return{type:"RECEIVE_REGISTERED_POST_META",postType:e,registeredPostMeta:t}}function ur(e,t){return 0===t?e.toLowerCase():O(e,t)}function dr(e,t){return void 0===t&&(t={}),C(e,R({transform:ur},t))}const pr=window.wp.htmlEntities,fr=e=>(...t)=>async({resolveSelect:r})=>{await r[e](...t)},yr=Symbol("RECEIVE_INTERMEDIATE_RESULTS");async function Er(e,t={},r={}){const n=t.isInitialSuggestions&&t.initialSuggestionsSearchOptions?{...t,...t.initialSuggestionsSearchOptions}:t,{type:s,subtype:i,page:o,perPage:a=(t.isInitialSuggestions?3:20)}=n,{disablePostFormats:c=!1}=r,l=[];s&&"post"!==s||l.push(P()({path:(0,$.addQueryArgs)("/wp/v2/search",{search:e,page:o,per_page:a,type:"post",subtype:i})}).then((e=>e.map((e=>({id:e.id,url:e.url,title:(0,pr.decodeEntities)(e.title||"")||(0,U.__)("(no title)"),type:e.subtype||e.type,kind:"post-type"}))))).catch((()=>[]))),s&&"term"!==s||l.push(P()({path:(0,$.addQueryArgs)("/wp/v2/search",{search:e,page:o,per_page:a,type:"term",subtype:i})}).then((e=>e.map((e=>({id:e.id,url:e.url,title:(0,pr.decodeEntities)(e.title||"")||(0,U.__)("(no title)"),type:e.subtype||e.type,kind:"taxonomy"}))))).catch((()=>[]))),c||s&&"post-format"!==s||l.push(P()({path:(0,$.addQueryArgs)("/wp/v2/search",{search:e,page:o,per_page:a,type:"post-format",subtype:i})}).then((e=>e.map((e=>({id:e.id,url:e.url,title:(0,pr.decodeEntities)(e.title||"")||(0,U.__)("(no title)"),type:e.subtype||e.type,kind:"taxonomy"}))))).catch((()=>[]))),s&&"attachment"!==s||l.push(P()({path:(0,$.addQueryArgs)("/wp/v2/media",{search:e,page:o,per_page:a})}).then((e=>e.map((e=>({id:e.id,url:e.source_url,title:(0,pr.decodeEntities)(e.title.rendered||"")||(0,U.__)("(no title)"),type:e.type,kind:"media"}))))).catch((()=>[])));let u=(await Promise.all(l)).flat();return u=u.filter((e=>!!e.id)),u=function(e,t){const r=gr(t),n={};for(const t of e)if(t.title){const e=gr(t.title),s=e.filter((e=>r.some((t=>e===t)))),i=e.filter((e=>r.some((t=>e!==t&&e.includes(t))))),o=s.length/e.length*10,a=i.length/e.length;n[t.id]=o+a}else n[t.id]=0;return e.sort(((e,t)=>n[t.id]-n[e.id]))}(u,e),u=u.slice(0,a),u}function gr(e){return e.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}const mr=new Map,hr=async(e,t={})=>{const r={url:(0,$.prependHTTP)(e)};if(!(0,$.isURL)(e))return Promise.reject(`${e} is not a valid URL.`);const n=(0,$.getProtocol)(e);return n&&(0,$.isValidProtocol)(n)&&n.startsWith("http")&&/^https?:\/\/[^\/\s]/i.test(e)?mr.has(e)?mr.get(e):P()({path:(0,$.addQueryArgs)("/wp-block-editor/v1/url-details",r),...t}).then((t=>(mr.set(e,t),t))):Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`)};async function vr(){const e=await P()({path:"/wp/v2/block-patterns/patterns"});return e?e.map((e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[dr(e),t]))))):[]}const _r=e=>async({dispatch:t})=>{const r=(0,$.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e),n=await P()({path:r});t.receiveUserQuery(r,n)},Rr=()=>async({dispatch:e})=>{const t=await P()({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},br=(e,t,r="",n)=>async({select:s,dispatch:i,registry:o,resolveSelect:a})=>{const c=(await a.getEntitiesConfig(e)).find((r=>r.name===t&&r.kind===e));if(!c)return;const l=await i.__unstableAcquireStoreLock(ne,["entities","records",e,t,r],{exclusive:!1});try{if(window.__experimentalEnableSync&&c.syncConfig&&!n)0;else{void 0!==n&&n._fields&&(n={...n,_fields:[...new Set([...F(n._fields)||[],c.key||L])].join()});const a=(0,$.addQueryArgs)(c.baseURL+(r?"/"+r:""),{...c.baseURLParams,...n});if(void 0!==n&&n._fields){n={...n,include:[r]};if(s.hasEntityRecords(e,t,n))return}const l=await P()({path:a,parse:!1}),u=await l.json(),d=de(l.headers?.get("allow")),p=[],f={};for(const n of ue)f[pe(n,{kind:e,name:t,id:r})]=d[n],p.push([n,{kind:e,name:t,id:r}]);o.batch((()=>{i.receiveEntityRecords(e,t,u,n),i.receiveUserPermissions(f),i.finishResolutions("canUser",p)}))}}finally{i.__unstableReleaseStoreLock(l)}},wr=fr("getEntityRecord"),Sr=fr("getEntityRecord"),Tr=(e,t,r={})=>async({dispatch:n,registry:s,resolveSelect:i})=>{const o=(await i.getEntitiesConfig(e)).find((r=>r.name===t&&r.kind===e));if(!o)return;const a=await n.__unstableAcquireStoreLock(ne,["entities","records",e,t],{exclusive:!1}),c=o.key||L;function l(r){return r.filter((e=>e?.[c])).map((r=>[e,t,r[c]]))}try{r._fields&&(r={...r,_fields:[...new Set([...F(r._fields)||[],o.key||L])].join()});const i=(0,$.addQueryArgs)(o.baseURL,{...o.baseURLParams,...r});let u,d=[];if(o.supportsPagination&&-1!==r.per_page){const e=await P()({path:i,parse:!1});d=Object.values(await e.json()),u={totalItems:parseInt(e.headers.get("X-WP-Total")),totalPages:parseInt(e.headers.get("X-WP-TotalPages"))}}else if(-1===r.per_page&&!0===r[yr]){let o,a=1;do{const c=await P()({path:(0,$.addQueryArgs)(i,{page:a,per_page:100}),parse:!1}),u=Object.values(await c.json());o=parseInt(c.headers.get("X-WP-TotalPages")),d.push(...u),s.batch((()=>{n.receiveEntityRecords(e,t,d,r),n.finishResolutions("getEntityRecord",l(u))})),a++}while(a<=o);u={totalItems:d.length,totalPages:1}}else d=Object.values(await P()({path:i})),u={totalItems:d.length,totalPages:1};r._fields&&(d=d.map((e=>(r._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),s.batch((()=>{if(n.receiveEntityRecords(e,t,d,r,!1,void 0,u),!r?._fields&&!r.context){const r=d.filter((e=>e?.[c])).map((e=>({id:e[c],permissions:de(e?._links?.self?.[0].targetHints.allow)}))),s=[],i={};for(const n of r)for(const r of ue)s.push([r,{kind:e,name:t,id:n.id}]),i[pe(r,{kind:e,name:t,id:n.id})]=n.permissions[r];n.receiveUserPermissions(i),n.finishResolutions("getEntityRecord",l(d)),n.finishResolutions("canUser",s)}n.__unstableReleaseStoreLock(a)}))}catch(e){n.__unstableReleaseStoreLock(a)}};Tr.shouldInvalidate=(e,t,r)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&r===e.name;const Ir=()=>async({dispatch:e,resolveSelect:t})=>{const r=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(r[0])},kr=fr("getCurrentTheme"),Or=e=>async({dispatch:t})=>{try{const r=await P()({path:(0,$.addQueryArgs)("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,r)}catch(r){t.receiveEmbedPreview(e,!1)}},Cr=(e,t,r)=>async({dispatch:n,registry:s,resolveSelect:i})=>{if(!ue.includes(e))throw new Error(`'${e}' is not a valid action.`);const{hasStartedResolution:o}=s.select(ne);for(const n of ue){if(n===e)continue;if(o("canUser",[n,t,r]))return}let a,c=null;if("object"==typeof t){if(!t.kind||!t.name)throw new Error("The entity resource object is not valid.");const e=(await i.getEntitiesConfig(t.kind)).find((e=>e.name===t.name&&e.kind===t.kind));if(!e)return;c=e.baseURL+(t.id?"/"+t.id:"")}else c=`/wp/v2/${t}`+(r?"/"+r:"");try{a=await P()({path:c,method:"OPTIONS",parse:!1})}catch(e){return}const l=de(a.headers?.get("allow"));s.batch((()=>{for(const s of ue){const i=pe(s,t,r);n.receiveUserPermission(i,l[s]),s!==e&&n.finishResolution("canUser",[s,t,r])}}))},Ar=(e,t,r)=>async({dispatch:n})=>{await n(Cr("update",{kind:e,name:t,id:r}))},Pr=(e,t)=>async({dispatch:r,resolveSelect:n})=>{const{rest_base:s,rest_namespace:i="wp/v2",supports:o}=await n.getPostType(e);if(!o?.autosave)return;const a=await P()({path:`/${i}/${s}/${t}/autosaves?context=edit`});a&&a.length&&r.receiveAutosaves(t,a)},Ur=(e,t)=>async({resolveSelect:r})=>{await r.getAutosaves(e,t)},xr=()=>async({dispatch:e,resolveSelect:t})=>{const r=await t.getEntityRecords("root","theme",{status:"active"}),n=r?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!n)return;const s=n.match(/\/(\d+)(?:\?|$)/),i=s?Number(s[1]):null;i&&e.__experimentalReceiveCurrentGlobalStylesId(i)},Lr=()=>async({resolveSelect:e,dispatch:t})=>{const r=await e.getCurrentTheme(),n=await P()({path:`/wp/v2/global-styles/themes/${r.stylesheet}?context=view`});t.__experimentalReceiveThemeBaseGlobalStyles(r.stylesheet,n)},jr=()=>async({resolveSelect:e,dispatch:t})=>{const r=await e.getCurrentTheme(),n=await P()({path:`/wp/v2/global-styles/themes/${r.stylesheet}/variations?context=view`});t.__experimentalReceiveThemeGlobalStyleVariations(r.stylesheet,n)},Mr=()=>async({resolveSelect:e,dispatch:t})=>{const r=await e.__experimentalGetCurrentGlobalStylesId(),n=r?await e.getEntityRecord("root","globalStyles",r):void 0,s=n?._links?.["version-history"]?.[0]?.href;if(s){const e=await P()({url:s}),n=e?.map((e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[dr(e),t])))));t.receiveThemeGlobalStyleRevisions(r,n)}};Mr.shouldInvalidate=e=>"SAVE_ENTITY_RECORD_FINISH"===e.type&&"root"===e.kind&&!e.error&&"globalStyles"===e.name;const Dr=()=>async({dispatch:e})=>{e({type:"RECEIVE_BLOCK_PATTERNS",patterns:await vr()})},Nr=()=>async({dispatch:e})=>{e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:await P()({path:"/wp/v2/block-patterns/categories"})})},Vr=()=>async({dispatch:e,resolveSelect:t})=>{const r=await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"});e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:r?.map((e=>({...e,label:(0,pr.decodeEntities)(e.name),name:e.slug})))||[]})},Gr=()=>async({dispatch:e,select:t,registry:r})=>{const n=await P()({path:(0,$.addQueryArgs)("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),s=n?._embedded?.self;r.batch((()=>{if(e.receiveNavigationFallbackId(n?.id),!s)return;const r=!t.getEntityRecord("postType","wp_navigation",n.id);e.receiveEntityRecords("postType","wp_navigation",s,void 0,r),e.finishResolution("getEntityRecord",["postType","wp_navigation",n.id])}))},qr=e=>async({dispatch:t,registry:r,resolveSelect:n})=>{const s=await P()({path:(0,$.addQueryArgs)("/wp/v2/templates/lookup",e)});await n.getEntitiesConfig("postType"),s?.id&&r.batch((()=>{t.receiveDefaultTemplateId(e,s.id),t.receiveEntityRecords("postType","wp_template",[s]),t.finishResolution("getEntityRecord",["postType","wp_template",s.id])}))},Br=(e,t,r,n={})=>async({dispatch:s,registry:i,resolveSelect:o})=>{const a=(await o.getEntitiesConfig(e)).find((r=>r.name===t&&r.kind===e));if(!a)return;n._fields&&(n={...n,_fields:[...new Set([...F(n._fields)||[],a.revisionKey||L])].join()});const c=(0,$.addQueryArgs)(a.getRevisionsUrl(r),n);let l,u;const d={},p=a.supportsPagination&&-1!==n.per_page;try{u=await P()({path:c,parse:!p})}catch(e){return}u&&(p?(l=Object.values(await u.json()),d.totalItems=parseInt(u.headers.get("X-WP-Total"))):l=Object.values(u),n._fields&&(l=l.map((e=>(n._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),i.batch((()=>{if(s.receiveRevisions(e,t,r,l,n,!1,d),!n?._fields&&!n.context){const n=a.key||L,i=l.filter((e=>e[n])).map((s=>[e,t,r,s[n]]));s.finishResolutions("getRevision",i)}})))};Br.shouldInvalidate=(e,t,r,n)=>"SAVE_ENTITY_RECORD_FINISH"===e.type&&r===e.name&&t===e.kind&&!e.error&&n===e.recordId;const $r=(e,t,r,n,s)=>async({dispatch:i,resolveSelect:o})=>{const a=(await o.getEntitiesConfig(e)).find((r=>r.name===t&&r.kind===e));if(!a)return;void 0!==s&&s._fields&&(s={...s,_fields:[...new Set([...F(s._fields)||[],a.revisionKey||L])].join()});const c=(0,$.addQueryArgs)(a.getRevisionsUrl(r,n),s);let l;try{l=await P()({path:c})}catch(e){return}l&&i.receiveRevisions(e,t,r,l,s)},Fr=e=>async({dispatch:t,resolveSelect:r})=>{let n;try{const{rest_namespace:t="wp/v2",rest_base:s}=await r.getPostType(e)||{};n=await P()({path:`${t}/${s}/?context=edit`,method:"OPTIONS"})}catch(e){return}n&&t.receiveRegisteredPostMeta(e,n?.schema?.properties?.meta?.properties)},Kr=e=>async({dispatch:t})=>{const r=D.find((t=>t.kind===e));if(r)try{const e=await r.loadEntities();if(!e.length)return;t.addEntities(e)}catch{}};function Qr(e,t){const r={...e};let n=r;for(const e of t)n.children={...n.children,[e]:{locks:[],children:{},...n.children[e]}},n=n.children[e];return r}function Yr(e,t){let r=e;for(const e of t){const t=r.children[e];if(!t)return null;r=t}return r}function Hr({exclusive:e},t){return!(!e||!t.length)||!(e||!t.filter((e=>e.exclusive)).length)}const Wr={requests:[],tree:{locks:[],children:{}}};function zr(e=Wr,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:r}=t;return{...e,requests:[r,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:r,request:n}=t,{store:s,path:i}=n,o=[s,...i],a=Qr(e.tree,o),c=Yr(a,o);return c.locks=[...c.locks,r],{...e,requests:e.requests.filter((e=>e!==n)),tree:a}}case"RELEASE_LOCK":{const{lock:r}=t,n=[r.store,...r.path],s=Qr(e.tree,n),i=Yr(s,n);return i.locks=i.locks.filter((e=>e!==r)),{...e,tree:s}}}return e}function Jr(e,t,r,{exclusive:n}){const s=[t,...r],i=e.tree;for(const e of function*(e,t){let r=e;yield r;for(const e of t){const t=r.children[e];if(!t)break;yield t,r=t}}(i,s))if(Hr({exclusive:n},e.locks))return!1;const o=Yr(i,s);if(!o)return!0;for(const e of function*(e){const t=Object.values(e.children);for(;t.length;){const e=t.pop();yield e,t.push(...Object.values(e.children))}}(o))if(Hr({exclusive:n},e.locks))return!1;return!0}function Xr(){let e=zr(void 0,{type:"@@INIT"});function t(){for(const t of function(e){return e.requests}(e)){const{store:r,path:n,exclusive:s,notifyAcquired:i}=t;if(Jr(e,r,n,{exclusive:s})){const o={store:r,path:n,exclusive:s};e=zr(e,{type:"GRANT_LOCK_REQUEST",lock:o,request:t}),i(o)}}}return{acquire:function(r,n,s){return new Promise((i=>{e=zr(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:r,path:n,exclusive:s,notifyAcquired:i}}),t()}))},release:function(r){e=zr(e,{type:"RELEASE_LOCK",lock:r}),t()}}}function Zr(){const e=Xr();return{__unstableAcquireStoreLock:function(t,r,{exclusive:n}){return()=>e.acquire(t,r,n)},__unstableReleaseStoreLock:function(t){return()=>e.release(t)}}}const en=window.wp.element,tn=(0,en.createContext)({}),rn=window.ReactJSXRuntime;function nn({kind:e,type:t,id:r,children:n}){const s=(0,en.useContext)(tn),i=(0,en.useMemo)((()=>({...s,[e]:{...s?.[e],[t]:r}})),[s,e,t,r]);return(0,rn.jsx)(tn.Provider,{value:i,children:n})}const sn=function(e,t){var r,n,s=0;function i(){var i,o,a=r,c=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(o=0;o<c;o++)if(a.args[o]!==arguments[o]){a=a.next;continue e}return a!==r&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=r,a.prev=null,r.prev=a,r=a),a.val}a=a.next}for(i=new Array(c),o=0;o<c;o++)i[o]=arguments[o];return a={args:i,val:e.apply(null,i)},r?(r.prev=a,a.next=r):n=a,s===t.maxSize?(n=n.prev).next=null:s++,r=a,a.val}return t=t||{},i.clear=function(){r=null,n=null,s=0},i};let on=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const an=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function cn(e,t){return(0,l.useSelect)(((t,r)=>e((e=>ln(t(e))),r)),t)}const ln=sn((e=>{const t={};for(const r in e)an.includes(r)||Object.defineProperty(t,r,{get:()=>(...t)=>{const n=e[r](...t),s=e.getResolutionState(r,t)?.status;let i;switch(s){case"resolving":i=on.Resolving;break;case"finished":i=on.Success;break;case"error":i=on.Error;break;case void 0:i=on.Idle}return{data:n,status:i,isResolving:i===on.Resolving,hasStarted:i!==on.Idle,hasResolved:i===on.Success||i===on.Error}}});return t})),un={};function dn(e,t,r,n={enabled:!0}){const{editEntityRecord:s,saveEditedEntityRecord:i}=(0,l.useDispatch)(Dn),o=(0,en.useMemo)((()=>({edit:(n,i={})=>s(e,t,r,n,i),save:(n={})=>i(e,t,r,{throwOnError:!0,...n})})),[s,e,t,r,i]),{editedRecord:a,hasEdits:c,edits:u}=(0,l.useSelect)((s=>n.enabled?{editedRecord:s(Dn).getEditedEntityRecord(e,t,r),hasEdits:s(Dn).hasEditsForEntityRecord(e,t,r),edits:s(Dn).getEntityRecordNonTransientEdits(e,t,r)}:{editedRecord:un,hasEdits:!1,edits:un}),[e,t,r,n.enabled]),{data:d,...p}=cn((s=>n.enabled?s(Dn).getEntityRecord(e,t,r):{data:null}),[e,t,r,n.enabled]);return{record:d,editedRecord:a,hasEdits:c,edits:u,...p,...o}}function pn(e,t,r,n){return re()("wp.data.__experimentalUseEntityRecord",{alternative:"wp.data.useEntityRecord",since:"6.1"}),dn(e,t,r,n)}const fn=[];function yn(e,t,r={},n={enabled:!0}){const s=(0,$.addQueryArgs)("",r),{data:i,...o}=cn((s=>n.enabled?s(Dn).getEntityRecords(e,t,r):{data:fn}),[e,t,s,n.enabled]),{totalItems:a,totalPages:c}=(0,l.useSelect)((s=>n.enabled?{totalItems:s(Dn).getEntityRecordsTotalItems(e,t,r),totalPages:s(Dn).getEntityRecordsTotalPages(e,t,r)}:{totalItems:null,totalPages:null}),[e,t,s,n.enabled]);return{records:i,totalItems:a,totalPages:c,...o}}function En(e,t,r,n){return re()("wp.data.__experimentalUseEntityRecords",{alternative:"wp.data.useEntityRecords",since:"6.1"}),yn(e,t,r,n)}window.wp.warning;function gn(e,t){const r="object"==typeof e;return cn((n=>{const s=r?!!e.id:!!t,{canUser:i}=n(Dn),o=i("create",r?{kind:e.kind,name:e.name}:e);if(!s){const t=i("read",e),r=o.isResolving||t.isResolving,n=o.hasResolved&&t.hasResolved;let s=on.Idle;return r?s=on.Resolving:n&&(s=on.Success),{status:s,isResolving:r,hasResolved:n,canCreate:o.hasResolved&&o.data,canRead:t.hasResolved&&t.data}}const a=i("read",e,t),c=i("update",e,t),l=i("delete",e,t),u=a.isResolving||o.isResolving||c.isResolving||l.isResolving,d=a.hasResolved&&o.hasResolved&&c.hasResolved&&l.hasResolved;let p=on.Idle;return u?p=on.Resolving:d&&(p=on.Success),{status:p,isResolving:u,hasResolved:d,canRead:d&&a.data,canCreate:d&&o.data,canUpdate:d&&c.data,canDelete:d&&l.data}}),[r?JSON.stringify(e):e,t])}const mn=gn;function hn(e,t){return re()("wp.data.__experimentalUseResourcePermissions",{alternative:"wp.data.useResourcePermissions",since:"6.1"}),gn(e,t)}const vn=window.wp.blocks;function _n(e,t){const r=(0,en.useContext)(tn);return r?.[e]?.[t]}const Rn=window.wp.blockEditor;let bn;const wn=new WeakMap;const Sn=new WeakMap;function Tn(e){if(!Sn.has(e)){const t=[];for(const r of function(e){if(bn||(bn=pt(Rn.privateApis)),!wn.has(e)){const t=bn.getRichTextValues([e]);wn.set(e,t)}return wn.get(e)}(e))r&&r.replacements.forEach((({type:e,attributes:r})=>{"core/footnote"===e&&t.push(r["data-fn"])}));Sn.set(e,t)}return Sn.get(e)}let In={};function kn(e,t){const r={blocks:e};if(!t)return r;if(void 0===t.footnotes)return r;const n=function(e){return e.flatMap(Tn)}(e),s=t.footnotes?JSON.parse(t.footnotes):[];if(s.map((e=>e.id)).join("")===n.join(""))return r;const i=n.map((e=>s.find((t=>t.id===e))||In[e]||{id:e,content:""}));function o(e){if(!e||Array.isArray(e)||"object"!=typeof e)return e;e={...e};for(const t in e){const r=e[t];if(Array.isArray(r)){e[t]=r.map(o);continue}if("string"!=typeof r&&!(r instanceof x.RichTextData))continue;const s="string"==typeof r?x.RichTextData.fromHTMLString(r):new x.RichTextData(r);let i=!1;s.replacements.forEach((e=>{if("core/footnote"===e.type){const t=e.attributes["data-fn"],r=n.indexOf(t),s=(0,x.create)({html:e.innerHTML});s.text=String(r+1),s.formats=Array.from({length:s.text.length},(()=>s.formats[0])),s.replacements=Array.from({length:s.text.length},(()=>s.replacements[0])),e.innerHTML=(0,x.toHTMLString)({value:s}),i=!0}})),i&&(e[t]="string"==typeof r?s.toHTMLString():s)}return e}const a=function e(t){return t.map((t=>({...t,attributes:o(t.attributes),innerBlocks:e(t.innerBlocks)})))}(e);return In={...In,...s.reduce(((e,t)=>(n.includes(t.id)||(e[t.id]=t),e)),{})},{meta:{...t,footnotes:JSON.stringify(i)},blocks:a}}const On=[],Cn=new WeakMap;function An(e,t,{id:r}={}){const n=_n(e,t),s=null!=r?r:n,{getEntityRecord:i,getEntityRecordEdits:o}=(0,l.useSelect)(ne),{content:a,editedBlocks:c,meta:u}=(0,l.useSelect)((r=>{if(!s)return{};const{getEditedEntityRecord:n}=r(ne),i=n(e,t,s);return{editedBlocks:i.blocks,content:i.content,meta:i.meta}}),[e,t,s]),{__unstableCreateUndoLevel:d,editEntityRecord:p}=(0,l.useDispatch)(ne),f=(0,en.useMemo)((()=>{if(!s)return;if(c)return c;if(!a||"string"!=typeof a)return On;const r=o(e,t,s),n=!r||!Object.keys(r).length?i(e,t,s):r;let l=Cn.get(n);return l||(l=(0,vn.parse)(a),Cn.set(n,l)),l}),[e,t,s,c,a,i,o]),y=(0,en.useCallback)(((r,n)=>{if(f===r)return d(e,t,s);const{selection:i,...o}=n,a={selection:i,content:({blocks:e=[]})=>(0,vn.__unstableSerializeAndClean)(e),...kn(r,u)};p(e,t,s,a,{isCached:!1,...o})}),[e,t,s,f,u,d,p]),E=(0,en.useCallback)(((r,n)=>{const{selection:i,...o}=n,a={selection:i,...kn(r,u)};p(e,t,s,a,{isCached:!0,...o})}),[e,t,s,u,p]);return[f,E,y]}function Pn(e,t,r,n){const s=_n(e,t),i=null!=n?n:s,{value:o,fullValue:a}=(0,l.useSelect)((n=>{const{getEntityRecord:s,getEditedEntityRecord:o}=n(ne),a=s(e,t,i),c=o(e,t,i);return a&&c?{value:c[r],fullValue:a[r]}:{}}),[e,t,i,r]),{editEntityRecord:c}=(0,l.useDispatch)(ne);return[o,(0,en.useCallback)((n=>{c(e,t,i,{[r]:n})}),[c,e,t,i,r]),a]}const Un={};dt(Un,{useEntityRecordsWithPermissions:function(e,t,r={},n={enabled:!0}){const s=(0,l.useSelect)((r=>r(Dn).getEntityConfig(e,t)),[e,t]),{records:i,...o}=yn(e,t,r,n),a=(0,en.useMemo)((()=>{var e;return null!==(e=i?.map((e=>{var t;return e[null!==(t=s?.key)&&void 0!==t?t:"id"]})))&&void 0!==e?e:[]}),[i,s?.key]),c=(0,l.useSelect)((r=>{const{getEntityRecordsPermissions:n}=pt(r(Dn));return n(e,t,a)}),[a,e,t]);return{records:(0,en.useMemo)((()=>{var e;return null!==(e=i?.map(((e,t)=>({...e,permissions:c[t]}))))&&void 0!==e?e:[]}),[i,c]),...o}},RECEIVE_INTERMEDIATE_RESULTS:yr});const xn=[...M,...D.filter((e=>!!e.name))],Ln=xn.reduce(((e,t)=>{const{kind:r,name:n,plural:s}=t;return e[B(r,n)]=(e,t,s)=>be(e,r,n,t,s),s&&(e[B(r,s,"get")]=(e,t)=>Ie(e,r,n,t)),e}),{}),jn=xn.reduce(((e,t)=>{const{kind:r,name:n,plural:s}=t;if(e[B(r,n)]=(e,t)=>br(r,n,e,t),s){const t=B(r,s,"get");e[t]=(...e)=>Tr(r,n,...e),e[t].shouldInvalidate=e=>Tr.shouldInvalidate(e,r,n)}return e}),{}),Mn=xn.reduce(((e,t)=>{const{kind:r,name:n}=t;return e[B(r,n,"save")]=(e,t)=>Xt(r,n,e,t),e[B(r,n,"delete")]=(e,t,s)=>Yt(r,n,e,t,s),e}),{}),Dn=(0,l.createReduxStore)(ne,{reducer:ee,actions:{...o,...Mn,...Zr()},selectors:{...s,...Ln},resolvers:{...c,...jn}});pt(Dn).registerPrivateSelectors(i),pt(Dn).registerPrivateActions(a),(0,l.register)(Dn),(window.wp=window.wp||{}).coreData=n})();
}