mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-25 18:48:57 +01:00
5023368035
Because of the scripts that run when `build:dev` is run, it’s more common for this Grunt task to change version-controlled files than when building WordPress to run from `build`. This moves the `build:dev` tests before the `build` ones in order to detect changes earlier in the workflow. See #55652. Built from https://develop.svn.wordpress.org/trunk@54297 git-svn-id: http://core.svn.wordpress.org/trunk@53856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
53 KiB
JavaScript
2 lines
53 KiB
JavaScript
/*! This file is auto-generated */
|
|
!function(){var e={2167:function(e){"use strict";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 n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t){var n=e._map,r=e._arrayTreeMap,i=e._objectTreeMap;if(n.has(t))return n.get(t);for(var o=Object.keys(t).sort(),s=Array.isArray(t)?r:i,a=0;a<o.length;a++){var u=o[a];if(void 0===(s=s.get(u)))return;var c=t[u];if(void 0===(s=s.get(c)))return}var l=s.get("_ekm_value");return l?(n.delete(l[0]),l[0]=t,s.set("_ekm_value",l),n.set(t,l),l):void 0}var i=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 n=[];t.forEach((function(e,t){n.push([t,e])})),t=n}if(null!=t)for(var r=0;r<t.length;r++)this.set(t[r][0],t[r][1])}var i,o,s;return i=e,o=[{key:"set",value:function(n,r){if(null===n||"object"!==t(n))return this._map.set(n,r),this;for(var i=Object.keys(n).sort(),o=[n,r],s=Array.isArray(n)?this._arrayTreeMap:this._objectTreeMap,a=0;a<i.length;a++){var u=i[a];s.has(u)||s.set(u,new e),s=s.get(u);var c=n[u];s.has(c)||s.set(c,new e),s=s.get(c)}var l=s.get("_ekm_value");return l&&this._map.delete(l[0]),s.set("_ekm_value",o),this._map.set(n,o),this}},{key:"get",value:function(e){if(null===e||"object"!==t(e))return this._map.get(e);var n=r(this,e);return n?n[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==t(e)?this._map.has(e):void 0!==r(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(i,o){null!==o&&"object"===t(o)&&(i=i[1]),e.call(r,i,o,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}}],o&&n(i.prototype,o),s&&n(i,s),e}();e.exports=i},9756:function(e){e.exports=function(e,t){var n,r,i=0;function o(){var o,s,a=n,u=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s<u;s++)if(a.args[s]!==arguments[s]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(o=new Array(u),s=0;s<u;s++)o[s]=arguments[s];return a={args:o,val:e.apply(null,o)},n?(n.prev=a,a.next=n):r=a,i===t.maxSize?(r=r.prev).next=null:i++,n=a,a.val}return t=t||{},o.clear=function(){n=null,r=null,i=0},o}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{EntityProvider:function(){return fn},__experimentalFetchLinkSuggestions:function(){return En},__experimentalFetchUrlData:function(){return mn},__experimentalUseEntityRecord:function(){return In},__experimentalUseEntityRecords:function(){return An},__experimentalUseResourcePermissions:function(){return Ln},store:function(){return Dn},useEntityBlockEditor:function(){return hn},useEntityId:function(){return pn},useEntityProp:function(){return vn},useEntityRecord:function(){return Sn},useEntityRecords:function(){return Un},useResourcePermissions:function(){return xn}});var e={};n.r(e),n.d(e,{__experimentalBatch:function(){return se},__experimentalReceiveCurrentGlobalStylesId:function(){return z},__experimentalReceiveThemeBaseGlobalStyles:function(){return W},__experimentalReceiveThemeGlobalStyleVariations:function(){return Z},__experimentalSaveSpecifiedEntityEdits:function(){return ue},__unstableCreateUndoLevel:function(){return ie},addEntities:function(){return Y},deleteEntityRecord:function(){return ee},editEntityRecord:function(){return te},receiveAutosaves:function(){return de},receiveCurrentTheme:function(){return H},receiveCurrentUser:function(){return Q},receiveEmbedPreview:function(){return J},receiveEntityRecords:function(){return K},receiveThemeSupports:function(){return X},receiveUploadPermissions:function(){return ce},receiveUserPermission:function(){return le},receiveUserQuery:function(){return F},redo:function(){return re},saveEditedEntityRecord:function(){return ae},saveEntityRecord:function(){return oe},undo:function(){return ne}});var t={};n.r(t),n.d(t,{__experimentalGetCurrentGlobalStylesId:function(){return yt},__experimentalGetCurrentThemeBaseGlobalStyles:function(){return It},__experimentalGetCurrentThemeGlobalStylesVariations:function(){return Ct},__experimentalGetDirtyEntityRecords:function(){return Je},__experimentalGetEntitiesBeingSaved:function(){return et},__experimentalGetEntityRecordNoResolver:function(){return ze},__experimentalGetTemplateForLink:function(){return St},canUser:function(){return _t},canUserEditEntityRecord:function(){return Rt},getAuthors:function(){return Ge},getAutosave:function(){return wt},getAutosaves:function(){return bt},getBlockPatternCategories:function(){return At},getBlockPatterns:function(){return Ut},getCurrentTheme:function(){return ht},getCurrentUser:function(){return Be},getEditedEntityRecord:function(){return it},getEmbedPreview:function(){return gt},getEntitiesByKind:function(){return Fe},getEntitiesConfig:function(){return Qe},getEntity:function(){return Ye},getEntityConfig:function(){return Ke},getEntityRecord:function(){return He},getEntityRecordEdits:function(){return tt},getEntityRecordNonTransientEdits:function(){return nt},getEntityRecords:function(){return Xe},getLastEntityDeleteError:function(){return ct},getLastEntitySaveError:function(){return ut},getRawEntityRecord:function(){return We},getRedoEdit:function(){return ft},getReferenceByDistinctEdits:function(){return kt},getThemeSupports:function(){return Et},getUndoEdit:function(){return dt},getUserQueryResults:function(){return $e},hasEditsForEntityRecord:function(){return rt},hasEntityRecords:function(){return Ze},hasFetchedAutosaves:function(){return Tt},hasRedo:function(){return vt},hasUndo:function(){return pt},isAutosavingEntityRecord:function(){return ot},isDeletingEntityRecord:function(){return at},isPreviewEmbedFallback:function(){return mt},isRequestingEmbedPreview:function(){return qe},isSavingEntityRecord:function(){return st}});var i={};n.r(i),n.d(i,{__experimentalGetCurrentGlobalStylesId:function(){return Kt},__experimentalGetCurrentThemeBaseGlobalStyles:function(){return Ht},__experimentalGetCurrentThemeGlobalStylesVariations:function(){return zt},__experimentalGetTemplateForLink:function(){return Yt},canUser:function(){return Bt},canUserEditEntityRecord:function(){return $t},getAuthors:function(){return Ot},getAutosave:function(){return Qt},getAutosaves:function(){return Ft},getBlockPatternCategories:function(){return Zt},getBlockPatterns:function(){return Wt},getCurrentTheme:function(){return Mt},getCurrentUser:function(){return Pt},getEditedEntityRecord:function(){return jt},getEmbedPreview:function(){return Gt},getEntityRecord:function(){return Vt},getEntityRecords:function(){return Nt},getRawEntityRecord:function(){return Dt},getThemeSupports:function(){return qt}});var o=window.wp.data,s=window.lodash,a=window.wp.isShallowEqual,u=n.n(a);var c=e=>t=>(n,r)=>void 0===n||e(r)?t(n,r):n;var l=e=>t=>(n,r)=>t(n,e(r));function d(e,t){if(!e)return t;let n=!1;const r={};for(const i in t)(0,s.isEqual)(e[i],t[i])?r[i]=e[i]:(n=!0,r[i]=t[i]);if(!n)return e;for(const t in e)r.hasOwnProperty(t)||(r[t]=e[t]);return r}var f=e=>t=>function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;const i=r[e];if(void 0===i)return n;const o=t(n[i],r);return o===n[i]?n:{...n,[i]:o}};var p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.apply(this,arguments)};Object.create;Object.create;function v(e){return e.toLowerCase()}var h=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],y=/[^A-Z0-9]+/gi;function E(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?h:n,i=t.stripRegexp,o=void 0===i?y:i,s=t.transform,a=void 0===s?v:s,u=t.delimiter,c=void 0===u?" ":u,l=g(g(e,r,"$1\0$2"),o,"\0"),d=0,f=l.length;"\0"===l.charAt(d);)d++;for(;"\0"===l.charAt(f-1);)f--;return l.slice(d,f).split("\0").map(a).join(c)}function g(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function m(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}function _(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function R(e,t){return void 0===t&&(t={}),E(e,p({delimiter:"",transform:_},t))}var b,w=window.wp.apiFetch,T=n.n(w),k=window.wp.i18n,S=new Uint8Array(16);function I(){if(!b&&!(b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b(S)}var C=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var U=function(e){return"string"==typeof e&&C.test(e)},A=[],x=0;x<256;++x)A.push((x+256).toString(16).substr(1));var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(A[e[t+0]]+A[e[t+1]]+A[e[t+2]]+A[e[t+3]]+"-"+A[e[t+4]]+A[e[t+5]]+"-"+A[e[t+6]]+A[e[t+7]]+"-"+A[e[t+8]]+A[e[t+9]]+"-"+A[e[t+10]]+A[e[t+11]]+A[e[t+12]]+A[e[t+13]]+A[e[t+14]]+A[e[t+15]]).toLowerCase();if(!U(n))throw TypeError("Stringified UUID is invalid");return n};var O=function(e,t,n){var r=(e=e||{}).random||(e.rng||I)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return L(r)},P=window.wp.url,V=window.wp.deprecated,D=n.n(V);function j(e,t){return{type:"RECEIVE_ITEMS",items:(0,s.castArray)(e),persistedEdits:t}}function N(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{type:"REMOVE_ITEMS",itemIds:(0,s.castArray)(n),kind:e,name:t,invalidateCache:r}}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return{...j(e,n),query:t}}let q=null;async function G(e){if(null===q){const e=await T()({path:"/batch/v1",method:"OPTIONS"});q=e.endpoints[0].args.requests.maxItems}const t=[];for(const n of function(e,t){const n=[...e],r=[];for(;n.length;)r.push(n.splice(0,t));return r}(e,q)){const e=await T()({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map((e=>({path:e.path,body:e.data,method:e.method,headers:e.headers})))}});let r;r=e.failed?e.responses.map((e=>({error:null==e?void 0: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(...r)}return t}class B{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.set=new Set(...t),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)}}}const $="core";function F(e,t){return{type:"RECEIVE_USER_QUERY",users:(0,s.castArray)(t),queryID:e}}function Q(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function Y(e){return{type:"ADD_ENTITIES",entities:e}}function K(e,t,n,r){let i,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;return"postType"===e&&(n=(0,s.castArray)(n).map((e=>"auto-draft"===e.status?{...e,title:""}:e))),i=r?M(n,r,a):j(n,a),{...i,kind:e,name:t,invalidateCache:o}}function H(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function z(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function W(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function Z(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function X(){return D()("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function J(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const ee=function(e,t,n,r){let{__unstableFetch:i=T(),throwOnError:o=!1}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return async a=>{let{dispatch:u}=a;const c=await u(ge(e)),l=(0,s.find)(c,{kind:e,name:t});let d,f=!1;if(!l||null!=l&&l.__experimentalNoFetch)return;const p=await u.__unstableAcquireStoreLock($,["entities","records",e,t,n],{exclusive:!0});try{u({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let s=!1;try{let o=`${l.baseURL}/${n}`;r&&(o=(0,P.addQueryArgs)(o,r)),f=await i({path:o,method:"DELETE"}),await u(N(e,t,n,!0))}catch(e){s=!0,d=e}if(u({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:d}),s&&o)throw d;return f}finally{u.__unstableReleaseStoreLock(p)}}},te=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return o=>{let{select:a,dispatch:u}=o;const c=a.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{transientEdits:l={},mergedEdits:d={}}=c,f=a.getRawEntityRecord(e,t,n),p=a.getEditedEntityRecord(e,t,n),v={kind:e,name:t,recordId:n,edits:Object.keys(r).reduce(((e,t)=>{const n=f[t],i=p[t],o=d[t]?{...i,...r[t]}:r[t];return e[t]=(0,s.isEqual)(n,o)?void 0:o,e}),{}),transientEdits:l};u({type:"EDIT_ENTITY_RECORD",...v,meta:{undo:!i.undoIgnore&&{...v,edits:Object.keys(r).reduce(((e,t)=>(e[t]=p[t],e)),{})}}})}},ne=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getUndoEdit();r&&n({type:"EDIT_ENTITY_RECORD",...r,meta:{isUndo:!0}})},re=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getRedoEdit();r&&n({type:"EDIT_ENTITY_RECORD",...r,meta:{isRedo:!0}})};function ie(){return{type:"CREATE_UNDO_LEVEL"}}const oe=function(e,t,n){let{isAutosave:r=!1,__unstableFetch:i=T(),throwOnError:o=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return async a=>{let{select:u,resolveSelect:c,dispatch:l}=a;const d=await l(ge(e)),f=(0,s.find)(d,{kind:e,name:t});if(!f||null!=f&&f.__experimentalNoFetch)return;const p=f.key||fe,v=n[p],h=await l.__unstableAcquireStoreLock($,["entities","records",e,t,v||O()],{exclusive:!0});try{for(const[r,i]of Object.entries(n))if("function"==typeof i){const o=i(u.getEditedEntityRecord(e,t,v));l.editEntityRecord(e,t,v,{[r]:o},{undoIgnore:!0}),n[r]=o}let s,a;l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:v,isAutosave:r});let d=!1;try{const o=`${f.baseURL}${v?"/"+v:""}`,a=u.getRawEntityRecord(e,t,v);if(r){const r=u.getCurrentUser(),d=r?r.id:void 0,f=await c.getAutosave(a.type,a.id,d);let p={...a,...f,...n};if(p=Object.keys(p).reduce(((e,t)=>(["title","excerpt","content"].includes(t)&&(e[t]=p[t]),e)),{status:"auto-draft"===p.status?"draft":p.status}),s=await i({path:`${o}/autosaves`,method:"POST",data:p}),a.id===s.id){let n={...a,...p,...s};n=Object.keys(n).reduce(((e,t)=>(["title","excerpt","content"].includes(t)?e[t]=n[t]:e[t]="status"===t?"auto-draft"===a.status&&"draft"===n.status?n.status:a.status:a[t],e)),{}),l.receiveEntityRecords(e,t,n,void 0,!0)}else l.receiveAutosaves(a.id,s)}else{let r=n;f.__unstablePrePersist&&(r={...r,...f.__unstablePrePersist(a,r)}),s=await i({path:o,method:v?"PUT":"POST",data:r}),l.receiveEntityRecords(e,t,s,void 0,!0,r)}}catch(e){d=!0,a=e}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:v,error:a,isAutosave:r}),d&&o)throw a;return s}finally{l.__unstableReleaseStoreLock(h)}}},se=e=>async t=>{let{dispatch:n}=t;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G,t=0,n=[];const r=new B;return{add(e){const i=++t;r.add(i);const o=e=>new Promise(((t,o)=>{n.push({input:e,resolve:t,reject:o}),r.delete(i)}));return"function"==typeof e?Promise.resolve(e(o)).finally((()=>{r.delete(i)})):o(e)},async run(){let t;r.size&&await new Promise((e=>{const t=r.subscribe((()=>{r.size||(t(),e(void 0))}))}));try{if(t=await e(n.map((e=>{let{input:t}=e;return t}))),t.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(e){for(const{reject:t}of n)t(e);throw e}let i=!0;return t.forEach(((e,t)=>{const r=n[t];var o;null!=e&&e.error?(null==r||r.reject(e.error),i=!1):null==r||r.resolve(null!==(o=null==e?void 0:e.output)&&void 0!==o?o:e)})),n=[],i}}}(),i={saveEntityRecord(e,t,i,o){return r.add((r=>n.saveEntityRecord(e,t,i,{...o,__unstableFetch:r})))},saveEditedEntityRecord(e,t,i,o){return r.add((r=>n.saveEditedEntityRecord(e,t,i,{...o,__unstableFetch:r})))},deleteEntityRecord(e,t,i,o,s){return r.add((r=>n.deleteEntityRecord(e,t,i,o,{...s,__unstableFetch:r})))}},o=e.map((e=>e(i))),[,...s]=await Promise.all([r.run(),...o]);return s},ae=(e,t,n,r)=>async i=>{let{select:o,dispatch:a}=i;if(!o.hasEditsForEntityRecord(e,t,n))return;const u=await a(ge(e)),c=(0,s.find)(u,{kind:e,name:t});if(!c)return;const l=c.key||fe,d=o.getEntityRecordNonTransientEdits(e,t,n),f={[l]:n,...d};return await a.saveEntityRecord(e,t,f,r)},ue=(e,t,n,r,i)=>async o=>{let{select:s,dispatch:a}=o;if(!s.hasEditsForEntityRecord(e,t,n))return;const u=s.getEntityRecordNonTransientEdits(e,t,n),c={};for(const e in u)r.some((t=>t===e))&&(c[e]=u[e]);return await a.saveEntityRecord(e,t,c,i)};function ce(e){return D()("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),le("create/media",e)}function le(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function de(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:(0,s.castArray)(t)}}const fe="id",pe=["title","excerpt","content"],ve=[{label:(0,k.__)("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url"].join(",")}},{label:(0,k.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:e=>(0,s.get)(e,["title"],(0,k.__)("Site Title"))},{label:(0,k.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"}},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:(0,k.__)("Media"),rawAttributes:["caption","title","description"]},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:(0,k.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:(0,k.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:(0,k.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:(0,k.__)("Widget types")},{label:(0,k.__)("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,k.__)("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:(0,k.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:(0,k.__)("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:(0,k.__)("Menu Location"),key:"name"},{label:(0,k.__)("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>{var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)}},{label:(0,k.__)("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},key:"stylesheet"},{label:(0,k.__)("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},key:"plugin"}],he=[{kind:"postType",loadEntities:async function(){const e=await T()({path:"/wp/v2/types?context=view"});return(0,s.map)(e,((e,t)=>{var n;const r=["wp_template","wp_template_part"].includes(t);return{kind:"postType",baseURL:`/${null!==(n=null==e?void 0:e.rest_namespace)&&void 0!==n?n:"wp/v2"}/${e.rest_base}`,baseURLParams:{context:"edit"},name:t,label:e.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:pe,getTitle:e=>{var t,n,i,o;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)||(r?(i=null!==(n=e.slug)&&void 0!==n?n:"",void 0===o&&(o={}),E(i,p({delimiter:" ",transform:m},o))):String(e.id))},__unstablePrePersist:r?void 0:ye,__unstable_rest_base:e.rest_base}}))}},{kind:"taxonomy",loadEntities:async function(){const e=await T()({path:"/wp/v2/taxonomies?context=view"});return(0,s.map)(e,((e,t)=>{var n;return{kind:"taxonomy",baseURL:`/${null!==(n=null==e?void 0:e.rest_namespace)&&void 0!==n?n:"wp/v2"}/${e.rest_base}`,baseURLParams:{context:"edit"},name:t,label:e.name}}))}}],ye=(e,t)=>{const n={};return"auto-draft"===(null==e?void 0:e.status)&&(t.status||n.status||(n.status="draft"),t.title&&"Auto Draft"!==t.title||n.title||null!=e&&e.title&&"Auto Draft"!==(null==e?void 0:e.title)||(n.title="")),n};const Ee=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"get",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=(0,s.find)(ve,{kind:e,name:t}),o="root"===e?"":R(e),a=R(t)+(r?"s":""),u=r&&"plural"in i&&null!=i&&i.plural?R(i.plural):a;return`${n}${o}${u}`},ge=e=>async t=>{let{select:n,dispatch:r}=t,i=n.getEntitiesConfig(e);if(i&&0!==i.length)return i;const o=(0,s.find)(he,{kind:e});return o?(i=await o.loadEntities(),r(Y(i)),i):[]};var me=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};var _e=function(e){const t=new WeakMap;return n=>{let r;return t.has(n)?r=t.get(n):(r=e(n),null!==n&&"object"==typeof n&&t.set(n,r)),r}}((function(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let o=0;o<n.length;o++){const s=n[o];let a=e[s];switch(s){case"page":t[s]=Number(a);break;case"per_page":t.perPage=Number(a);break;case"context":t.context=a;break;default:var r,i;if("_fields"===s)t.fields=null!==(r=me(a))&&void 0!==r?r:[],a=t.fields.join();if("include"===s)"number"==typeof a&&(a=a.toString()),t.include=(null!==(i=me(a))&&void 0!==i?i:[]).map(Number),a=t.include.join();t.stableKey+=(t.stableKey?"&":"")+(0,P.addQueryArgs)("",{[s]:a}).slice(1)}}return t}));function Re(e){const{query:t}=e;if(!t)return"default";return _e(t).context}function be(e,t,n,r){var i;if(1===n&&-1===r)return t;const o=(n-1)*r,s=Math.max(null!==(i=null==e?void 0:e.length)&&void 0!==i?i:0,o+t.length),a=new Array(s);for(let n=0;n<s;n++){const r=n>=o&&n<o+t.length;a[n]=r?t[n-o]:null==e?void 0:e[n]}return a}const we=(0,s.flowRight)([c((e=>"query"in e)),l((e=>e.query?{...e,..._e(e.query)}:e)),f("context"),f("stableKey")])((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;const{type:n,page:r,perPage:i,key:o=fe}=t;return"RECEIVE_ITEMS"!==n?e:be(e||[],(0,s.map)(t.items,o),r,i)}));var Te=(0,o.combineReducers)({items:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":{const n=Re(t),r=t.key||fe;return{...e,[n]:{...e[n],...t.items.reduce(((t,i)=>{var o;const s=i[r];return t[s]=d(null==e||null===(o=e[n])||void 0===o?void 0:o[s],i),t}),{})}}}case"REMOVE_ITEMS":return(0,s.mapValues)(e,(e=>(0,s.omit)(e,t.itemIds)))}return e},itemIsComplete:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":{const n=Re(t),{query:r,key:i=fe}=t,o=r?_e(r):{},s=!r||!Array.isArray(o.fields);return{...e,[n]:{...e[n],...t.items.reduce(((t,r)=>{var o;const a=r[i];return t[a]=(null==e||null===(o=e[n])||void 0===o?void 0:o[a])||s,t}),{})}}}case"REMOVE_ITEMS":return(0,s.mapValues)(e,(e=>(0,s.omit)(e,t.itemIds)))}return e},queries:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":return we(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce(((e,t)=>(e[t]=!0,e)),{});return(0,s.mapValues)(e,(e=>(0,s.mapValues)(e,(e=>(0,s.filter)(e,(e=>!n[e]))))));default:return e}}});function ke(e){return(0,s.flowRight)([c((t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind)),l((t=>({...t,key:e.key||fe})))])((0,o.combineReducers)({queriedData:Te,edits:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"RECEIVE_ITEMS":if("default"!==(null!==(e=null==r||null===(t=r.query)||void 0===t?void 0:t.context)&&void 0!==e?e:"default"))return n;const i={...n};for(const e of r.items){const t=e[r.key],n=i[t];if(!n)continue;const o=Object.keys(n).reduce(((t,i)=>((0,s.isEqual)(n[i],(0,s.get)(e[i],"raw",e[i]))||r.persistedEdits&&(0,s.isEqual)(n[i],r.persistedEdits[i])||(t[i]=n[i]),t)),{});Object.keys(o).length?i[t]=o:delete i[t]}return i;case"EDIT_ENTITY_RECORD":const o={...n[r.recordId],...r.edits};return Object.keys(o).forEach((e=>{void 0===o[e]&&delete o[e]})),{...n,[r.recordId]:o}}return n},saving:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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}}))}function Se(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ve,t=arguments.length>1?arguments[1]:void 0;return"ADD_ENTITIES"===t.type?[...e,...t.entities]:e}const Ie=Object.assign([],{offset:0});let Ce;var Ue=(0,o.combineReducers)({terms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_TERMS"===t.type?{...e,[t.taxonomy]:t.terms}:e},users:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{byId:{},queries:{}},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_USER_QUERY"===t.type?{byId:{...e.byId,...t.users.reduce(((e,t)=>({...e,[t.id]:t})),{})},queries:{...e.queries,[t.queryID]:(0,s.map)(t.users,(e=>e.id))}}:e},currentTheme:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_CURRENT_THEME"===t.type?t.currentTheme.stylesheet:e},currentGlobalStylesId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_CURRENT_GLOBAL_STYLES_ID"===t.type?t.id:e},currentUser:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_CURRENT_USER"===t.type?t.currentUser:e},themeGlobalStyleVariations:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS"===t.type?{...e,[t.stylesheet]:t.variations}:e},themeBaseGlobalStyles:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_THEME_GLOBAL_STYLES"===t.type?{...e,[t.stylesheet]:t.globalStyles}:e},taxonomies:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_TAXONOMIES"===t.type?t.taxonomies:e},entities:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const n=Se(e.config,t);let r=e.reducer;if(!r||n!==e.config){const e=(0,s.groupBy)(n,"kind");r=(0,o.combineReducers)(Object.entries(e).reduce(((e,t)=>{let[n,r]=t;const i=(0,o.combineReducers)(r.reduce(((e,t)=>({...e,[t.name]:ke(t)})),{}));return e[n]=i,e}),{}))}const i=r(e.records,t);return i===e.records&&n===e.config&&r===e.reducer?e:{reducer:r,records:i,config:n}},undo:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ie,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":let n="CREATE_UNDO_LEVEL"===t.type;const r=!n&&(t.meta.isUndo||t.meta.isRedo);let i;if(n?t=Ce:r||(Ce=Object.keys(t.edits).some((e=>!t.transientEdits[e]))?t:{...t,edits:{...Ce&&Ce.edits,...t.edits}}),r){if(i=[...e],i.offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return i;n=!0,Ce.meta.undo||(Ce.meta.undo={edits:{}}),t=Ce}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((e=>!t.transientEdits[e])))return i=[...e],i.flattenedUndo={...e.flattenedUndo,...t.edits},i.offset=e.offset,i;i=i||e.slice(0,e.offset||void 0),i.offset=i.offset||0,i.pop(),n||i.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:{...e.flattenedUndo,...t.meta.undo.edits}});const o=Object.values(t.meta.undo.edits).filter((e=>"function"!=typeof e)),s=Object.values(t.edits).filter((e=>"function"!=typeof e));return u()(o,s)||i.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?{...e.flattenedUndo,...t.edits}:t.edits}),i}return e},embedPreviews:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECEIVE_EMBED_PREVIEW"===t.type){const{url:n,preview:r}=t;return{...e,[n]:r}}return e},userPermissions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_USER_PERMISSION"===t.type?{...e,[t.key]:t.isAllowed}:e},autosaves:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECEIVE_AUTOSAVES"===t.type){const{postId:n,autosaves:r}=t;return{...e,[n]:r}}return e},blockPatterns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_BLOCK_PATTERNS"===t.type?t.patterns:e},blockPatternCategories:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_BLOCK_PATTERN_CATEGORIES"===t.type?t.categories:e}}),Ae={};function xe(e){return[e]}function Le(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Oe(e,t){var n,r=t||xe;function i(e){var t,r,i,o,s,a=n,u=!0;for(t=0;t<e.length;t++){if(r=e[t],!(s=r)||"object"!=typeof s){u=!1;break}a.has(r)?a=a.get(r):(i=new WeakMap,a.set(r,i),a=i)}return a.has(Ae)||((o=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=u,a.set(Ae,o)),a.get(Ae)}function o(){n=new WeakMap}function s(){var t,n,o,s,a,u=arguments.length;for(s=new Array(u),o=0;o<u;o++)s[o]=arguments[o];for((t=i(a=r.apply(null,s))).isUniqueByDependants||(t.lastDependants&&!Le(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),n=t.head;n;){if(Le(n.args,s,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,s)},s[0]=null,n.args=s,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return s.getDependants=r,s.clear=o,o(),s}var Pe=n(2167),Ve=n.n(Pe);const De=new WeakMap;function je(e,t){var n,r;const{stableKey:i,page:o,perPage:a,include:u,fields:c,context:l}=_e(t);let d;if(null!==(n=e.queries)&&void 0!==n&&null!==(r=n[l])&&void 0!==r&&r[i]&&(d=e.queries[l][i]),!d)return null;const f=-1===a?0:(o-1)*a,p=-1===a?d.length:Math.min(f+a,d.length),v=[];for(let t=f;t<p;t++){var h;const n=d[t];if(Array.isArray(u)&&!u.includes(n))continue;if(null===(h=e.items[l])||void 0===h||!h.hasOwnProperty(n))return null;const r=e.items[l][n];let i;if(Array.isArray(c)){i={};for(let e=0;e<c.length;e++){const t=c[e].split("."),n=(0,s.get)(r,t);(0,s.set)(i,t,n)}}else{var y;if(null===(y=e.itemIsComplete[l])||void 0===y||!y[n])return null;i=r}v.push(i)}return v}const Ne=Oe((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=De.get(e);if(n){const e=n.get(t);if(void 0!==e)return e}else n=new(Ve()),De.set(e,n);const r=je(e,t);return n.set(t,r),r}));const Me={},qe=(0,o.createRegistrySelector)((e=>(t,n)=>e($).isResolving("getEmbedPreview",[n])));function Ge(e,t){D()("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=(0,P.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t);return $e(e,n)}function Be(e){return e.currentUser}const $e=Oe(((e,t)=>{const n=e.users.queries[t];return(0,s.map)(n,(t=>e.users.byId[t]))}),((e,t)=>[e.users.queries[t],e.users.byId]));function Fe(e,t){return D()("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),Qe(e,t)}function Qe(e,t){return(0,s.filter)(e.entities.config,{kind:t})}function Ye(e,t,n){return D()("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Ke(e,t,n)}function Ke(e,t,n){return(0,s.find)(e.entities.config,{kind:t,name:n})}const He=Oe(((e,t,n,r,i)=>{var o,a;const u=(0,s.get)(e.entities.records,[t,n,"queriedData"]);if(!u)return;const c=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";if(void 0===i){var l;if(null===(l=u.itemIsComplete[c])||void 0===l||!l[r])return;return u.items[c][r]}const d=null===(a=u.items[c])||void 0===a?void 0:a[r];if(d&&i._fields){var f;const e={},t=null!==(f=me(i._fields))&&void 0!==f?f:[];for(let n=0;n<t.length;n++){const r=t[n].split("."),i=(0,s.get)(d,r);(0,s.set)(e,r,i)}return e}return d}),((e,t,n,r,i)=>{var o;const a=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";return[(0,s.get)(e.entities.records,[t,n,"queriedData","items",a,r]),(0,s.get)(e.entities.records,[t,n,"queriedData","itemIsComplete",a,r])]}));function ze(e,t,n,r){return He(e,t,n,r)}const We=Oe(((e,t,n,r)=>{const i=He(e,t,n,r);return i&&Object.keys(i).reduce(((r,o)=>(!function(e,t){return(e.rawAttributes||[]).includes(t)}(Ke(e,t,n),o)?r[o]=i[o]:r[o]=(0,s.get)(i[o],"raw",i[o]),r)),{})}),((e,t,n,r,i)=>{var o;const a=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";return[e.entities.config,(0,s.get)(e.entities.records,[t,n,"queriedData","items",a,r]),(0,s.get)(e.entities.records,[t,n,"queriedData","itemIsComplete",a,r])]}));function Ze(e,t,n,r){return Array.isArray(Xe(e,t,n,r))}const Xe=(e,t,n,r)=>{const i=(0,s.get)(e.entities.records,[t,n,"queriedData"]);return i?Ne(i,r):null},Je=Oe((e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((i=>{const o=Object.keys(t[r][i].edits).filter((t=>He(e,r,i,t)&&rt(e,r,i,t)));if(o.length){const t=Ke(e,r,i);o.forEach((o=>{var s;const a=it(e,r,i,o);n.push({key:a?a[t.key||fe]:void 0,title:(null==t||null===(s=t.getTitle)||void 0===s?void 0:s.call(t,a))||"",name:i,kind:r})}))}}))})),n}),(e=>[e.entities.records])),et=Oe((e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((i=>{const o=Object.keys(t[r][i].saving).filter((t=>st(e,r,i,t)));if(o.length){const t=Ke(e,r,i);o.forEach((o=>{var s;const a=it(e,r,i,o);n.push({key:a?a[t.key||fe]:void 0,title:(null==t||null===(s=t.getTitle)||void 0===s?void 0:s.call(t,a))||"",name:i,kind:r})}))}}))})),n}),(e=>[e.entities.records]));function tt(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"edits",r])}const nt=Oe(((e,t,n,r)=>{const{transientEdits:i}=Ke(e,t,n)||{},o=tt(e,t,n,r)||{};return i?Object.keys(o).reduce(((e,t)=>(i[t]||(e[t]=o[t]),e)),{}):o}),((e,t,n,r)=>[e.entities.config,(0,s.get)(e.entities.records,[t,n,"edits",r])]));function rt(e,t,n,r){return st(e,t,n,r)||Object.keys(nt(e,t,n,r)).length>0}const it=Oe(((e,t,n,r)=>({...We(e,t,n,r),...tt(e,t,n,r)})),((e,t,n,r,i)=>{var o;const a=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";return[e.entities.config,(0,s.get)(e.entities.records,[t,n,"queriedData","items",a,r]),(0,s.get)(e.entities.records,[t,n,"queriedData","itemIsComplete",a,r]),(0,s.get)(e.entities.records,[t,n,"edits",r])]}));function ot(e,t,n,r){const{pending:i,isAutosave:o}=(0,s.get)(e.entities.records,[t,n,"saving",r],{});return Boolean(i&&o)}function st(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"saving",r,"pending"],!1)}function at(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"deleting",r,"pending"],!1)}function ut(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"saving",r,"error"])}function ct(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"deleting",r,"error"])}function lt(e){return e.undo.offset}function dt(e){return e.undo[e.undo.length-2+lt(e)]}function ft(e){return e.undo[e.undo.length+lt(e)]}function pt(e){return Boolean(dt(e))}function vt(e){return Boolean(ft(e))}function ht(e){return He(e,"root","theme",e.currentTheme)}function yt(e){return e.currentGlobalStylesId}function Et(e){var t,n;return null!==(t=null===(n=ht(e))||void 0===n?void 0:n.theme_supports)&&void 0!==t?t:Me}function gt(e,t){return e.embedPreviews[t]}function mt(e,t){const n=e.embedPreviews[t],r='<a href="'+t+'">'+t+"</a>";return!!n&&n.html===r}function _t(e,t,n,r){const i=[t,n,r].filter(Boolean).join("/");return(0,s.get)(e,["userPermissions",i])}function Rt(e,t,n,r){const i=Ke(e,t,n);if(!i)return!1;return _t(e,"update",i.__unstable_rest_base,r)}function bt(e,t,n){return e.autosaves[n]}function wt(e,t,n,r){if(void 0===r)return;const i=e.autosaves[n];return(0,s.find)(i,{author:r})}const Tt=(0,o.createRegistrySelector)((e=>(t,n,r)=>e($).hasFinishedResolution("getAutosaves",[n,r]))),kt=Oe((e=>[]),(e=>[e.undo.length,e.undo.offset,e.undo.flattenedUndo]));function St(e,t){const n=Xe(e,"postType","wp_template",{"find-template":t});return null!=n&&n.length?it(e,"postType","wp_template",n[0].id):null}function It(e){const t=ht(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function Ct(e){const t=ht(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function Ut(e){return e.blockPatterns}function At(e){return e.blockPatternCategories}function xt(e,t){return 0===t?e.toLowerCase():_(e,t)}var Lt=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return async t=>{let{resolveSelect:r}=t;await r[e](...n)}};const Ot=e=>async t=>{let{dispatch:n}=t;const r=(0,P.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e),i=await T()({path:r});n.receiveUserQuery(r,i)},Pt=()=>async e=>{let{dispatch:t}=e;const n=await T()({path:"/wp/v2/users/me"});t.receiveCurrentUser(n)},Vt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return async i=>{let{select:o,dispatch:s}=i;const a=(await s(ge(e))).find((n=>n.name===t&&n.kind===e));if(!a||null!=a&&a.__experimentalNoFetch)return;const u=await s.__unstableAcquireStoreLock($,["entities","records",e,t,n],{exclusive:!1});try{void 0!==r&&r._fields&&(r={...r,_fields:[...new Set([...me(r._fields)||[],a.key||fe])].join()});const i=(0,P.addQueryArgs)(a.baseURL+(n?"/"+n:""),{...a.baseURLParams,...r});if(void 0!==r){r={...r,include:[n]};if(o.hasEntityRecords(e,t,r))return}const c=await T()({path:i});s.receiveEntityRecords(e,t,c,r)}finally{s.__unstableReleaseStoreLock(u)}}},Dt=Lt("getEntityRecord"),jt=Lt("getEntityRecord"),Nt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async r=>{let{dispatch:i}=r;const o=(await i(ge(e))).find((n=>n.name===t&&n.kind===e));if(!o||null!=o&&o.__experimentalNoFetch)return;const s=await i.__unstableAcquireStoreLock($,["entities","records",e,t],{exclusive:!1});try{var a;n._fields&&(n={...n,_fields:[...new Set([...me(n._fields)||[],o.key||fe])].join()});const r=(0,P.addQueryArgs)(o.baseURL,{...o.baseURLParams,...n});let u=Object.values(await T()({path:r}));if(n._fields&&(u=u.map((e=>(n._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),i.receiveEntityRecords(e,t,u,n),!(null!==(a=n)&&void 0!==a&&a._fields||n.context)){const n=o.key||fe,r=u.filter((e=>e[n])).map((r=>[e,t,r[n]]));i({type:"START_RESOLUTIONS",selectorName:"getEntityRecord",args:r}),i({type:"FINISH_RESOLUTIONS",selectorName:"getEntityRecord",args:r})}}finally{i.__unstableReleaseStoreLock(s)}}};Nt.shouldInvalidate=(e,t,n)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&n===e.name;const Mt=()=>async e=>{let{dispatch:t,resolveSelect:n}=e;const r=await n.getEntityRecords("root","theme",{status:"active"});t.receiveCurrentTheme(r[0])},qt=Lt("getCurrentTheme"),Gt=e=>async t=>{let{dispatch:n}=t;try{const t=await T()({path:(0,P.addQueryArgs)("/oembed/1.0/proxy",{url:e})});n.receiveEmbedPreview(e,t)}catch(t){n.receiveEmbedPreview(e,!1)}},Bt=(e,t,n)=>async r=>{var i;let{dispatch:o,registry:s}=r;const{hasStartedResolution:a}=s.select($),u=n?`${t}/${n}`:t,c=["create","read","update","delete"];if(!c.includes(e))throw new Error(`'${e}' is not a valid action.`);for(const r of c){if(r===e)continue;if(a("canUser",[r,t,n]))return}let l;try{l=await T()({path:`/wp/v2/${u}`,method:"OPTIONS",parse:!1})}catch(e){return}const d=null===(i=l.headers)||void 0===i?void 0:i.get("allow"),f=(null==d?void 0:d.allow)||d||"",p={},v={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[e,t]of Object.entries(v))p[e]=f.includes(t);for(const e of c)o.receiveUserPermission(`${e}/${u}`,p[e])},$t=(e,t,n)=>async r=>{let{dispatch:i}=r;const o=(await i(ge(e))).find((n=>n.name===t&&n.kind===e));if(!o)return;const s=o.__unstable_rest_base;await i(Bt("update",s,n))},Ft=(e,t)=>async n=>{let{dispatch:r,resolveSelect:i}=n;const{rest_base:o,rest_namespace:s="wp/v2"}=await i.getPostType(e),a=await T()({path:`/${s}/${o}/${t}/autosaves?context=edit`});a&&a.length&&r.receiveAutosaves(t,a)},Qt=(e,t)=>async n=>{let{resolveSelect:r}=n;await r.getAutosaves(e,t)},Yt=e=>async t=>{let n,{dispatch:r,resolveSelect:i}=t;try{n=await window.fetch((0,P.addQueryArgs)(e,{"_wp-find-template":!0})).then((e=>e.json())).then((e=>{let{data:t}=e;return t}))}catch(e){}if(!n)return;const o=await i.getEntityRecord("postType","wp_template",n.id);o&&r.receiveEntityRecords("postType","wp_template",[o],{"find-template":e})};Yt.shouldInvalidate=e=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&"postType"===e.kind&&"wp_template"===e.name;const Kt=()=>async e=>{var t,n,r,i;let{dispatch:o,resolveSelect:s}=e;const a=await s.getEntityRecords("root","theme",{status:"active"}),u=null==a||null===(t=a[0])||void 0===t||null===(n=t._links)||void 0===n||null===(r=n["wp:user-global-styles"])||void 0===r||null===(i=r[0])||void 0===i?void 0:i.href;if(u){const e=await T()({url:u});o.__experimentalReceiveCurrentGlobalStylesId(e.id)}},Ht=()=>async e=>{let{resolveSelect:t,dispatch:n}=e;const r=await t.getCurrentTheme(),i=await T()({path:`/wp/v2/global-styles/themes/${r.stylesheet}`});n.__experimentalReceiveThemeBaseGlobalStyles(r.stylesheet,i)},zt=()=>async e=>{let{resolveSelect:t,dispatch:n}=e;const r=await t.getCurrentTheme(),i=await T()({path:`/wp/v2/global-styles/themes/${r.stylesheet}/variations`});n.__experimentalReceiveThemeGlobalStyleVariations(r.stylesheet,i)},Wt=()=>async e=>{let{dispatch:t}=e;const n=await T()({path:"/wp/v2/block-patterns/patterns"});t({type:"RECEIVE_BLOCK_PATTERNS",patterns:null==n?void 0:n.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[(r=t,void 0===i&&(i={}),R(r,p({transform:xt},i))),n];var r,i})))))})},Zt=()=>async e=>{let{dispatch:t}=e;t({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:await T()({path:"/wp/v2/block-patterns/categories"})})};function Xt(e,t){const n={...e};let r=n;for(const e of t)r.children={...r.children,[e]:{locks:[],children:{},...r.children[e]}},r=r.children[e];return n}function Jt(e,t){let n=e;for(const e of t){const t=n.children[e];if(!t)return null;n=t}return n}function en(e,t){let{exclusive:n}=e;return!(!n||!t.length)||!(n||!t.filter((e=>e.exclusive)).length)}const tn={requests:[],tree:{locks:[],children:{}}};function nn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:r}=t,{store:i,path:o}=r,s=[i,...o],a=Xt(e.tree,s),u=Jt(a,s);return u.locks=[...u.locks,n],{...e,requests:e.requests.filter((e=>e!==r)),tree:a}}case"RELEASE_LOCK":{const{lock:n}=t,r=[n.store,...n.path],i=Xt(e.tree,r),o=Jt(i,r);return o.locks=o.locks.filter((e=>e!==n)),{...e,tree:i}}}return e}function rn(e,t,n,r){let{exclusive:i}=r;const o=[t,...n],s=e.tree;for(const e of function*(e,t){let n=e;yield n;for(const e of t){const t=n.children[e];if(!t)break;yield t,n=t}}(s,o))if(en({exclusive:i},e.locks))return!1;const a=Jt(s,o);if(!a)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))}}(a))if(en({exclusive:i},e.locks))return!1;return!0}function on(){let e=nn(void 0,{type:"@@INIT"});function t(){for(const t of function(e){return e.requests}(e)){const{store:n,path:r,exclusive:i,notifyAcquired:o}=t;if(rn(e,n,r,{exclusive:i})){const s={store:n,path:r,exclusive:i};e=nn(e,{type:"GRANT_LOCK_REQUEST",lock:s,request:t}),o(s)}}}return{acquire:function(n,r,i){return new Promise((o=>{e=nn(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:n,path:r,exclusive:i,notifyAcquired:o}}),t()}))},release:function(n){e=nn(e,{type:"RELEASE_LOCK",lock:n}),t()}}}function sn(){const e=on();return{__unstableAcquireStoreLock:function(t,n,r){let{exclusive:i}=r;return()=>e.acquire(t,n,i)},__unstableReleaseStoreLock:function(t){return()=>e.release(t)}}}var an=window.wp.element,un=window.wp.blocks;const cn=[],ln={...ve.reduce(((e,t)=>(e[t.kind]||(e[t.kind]={}),e[t.kind][t.name]={context:(0,an.createContext)(void 0)},e)),{}),...he.reduce(((e,t)=>(e[t.kind]={},e)),{})},dn=(e,t)=>{if(!ln[e])throw new Error(`Missing entity config for kind: ${e}.`);return ln[e][t]||(ln[e][t]={context:(0,an.createContext)(void 0)}),ln[e][t].context};function fn(e){let{kind:t,type:n,id:r,children:i}=e;const o=dn(t,n).Provider;return(0,an.createElement)(o,{value:r},i)}function pn(e,t){return(0,an.useContext)(dn(e,t))}function vn(e,t,n,r){const i=pn(e,t),s=null!=r?r:i,{value:a,fullValue:u}=(0,o.useSelect)((r=>{const{getEntityRecord:i,getEditedEntityRecord:o}=r($),a=i(e,t,s),u=o(e,t,s);return a&&u?{value:u[n],fullValue:a[n]}:{}}),[e,t,s,n]),{editEntityRecord:c}=(0,o.useDispatch)($);return[a,(0,an.useCallback)((r=>{c(e,t,s,{[n]:r})}),[e,t,s,n]),u]}function hn(e,t){let{id:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=pn(e,t),i=null!=n?n:r,{content:s,blocks:a}=(0,o.useSelect)((n=>{const{getEditedEntityRecord:r}=n($),o=r(e,t,i);return{blocks:o.blocks,content:o.content}}),[e,t,i]),{__unstableCreateUndoLevel:u,editEntityRecord:c}=(0,o.useDispatch)($);(0,an.useEffect)((()=>{if(s&&"function"!=typeof s&&!a){const n=(0,un.parse)(s);c(e,t,i,{blocks:n},{undoIgnore:!0})}}),[s]);const l=(0,an.useCallback)(((n,r)=>{const{selection:o}=r,s={blocks:n,selection:o};if(a===s.blocks)return u(e,t,i);s.content=e=>{let{blocks:t=[]}=e;return(0,un.__unstableSerializeAndClean)(t)},c(e,t,i,s)}),[e,t,i,a]),d=(0,an.useCallback)(((n,r)=>{const{selection:o}=r;c(e,t,i,{blocks:n,selection:o})}),[e,t,i]);return[null!=a?a:cn,d,l]}var yn=window.wp.htmlEntities;var En=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{isInitialSuggestions:r=!1,type:i,subtype:o,page:s,perPage:a=(r?3:20)}=t,{disablePostFormats:u=!1}=n,c=[];return i&&"post"!==i||c.push(T()({path:(0,P.addQueryArgs)("/wp/v2/search",{search:e,page:s,per_page:a,type:"post",subtype:o})}).then((e=>e.map((e=>({...e,meta:{kind:"post-type",subtype:o}}))))).catch((()=>[]))),i&&"term"!==i||c.push(T()({path:(0,P.addQueryArgs)("/wp/v2/search",{search:e,page:s,per_page:a,type:"term",subtype:o})}).then((e=>e.map((e=>({...e,meta:{kind:"taxonomy",subtype:o}}))))).catch((()=>[]))),u||i&&"post-format"!==i||c.push(T()({path:(0,P.addQueryArgs)("/wp/v2/search",{search:e,page:s,per_page:a,type:"post-format",subtype:o})}).then((e=>e.map((e=>({...e,meta:{kind:"taxonomy",subtype:o}}))))).catch((()=>[]))),i&&"attachment"!==i||c.push(T()({path:(0,P.addQueryArgs)("/wp/v2/media",{search:e,page:s,per_page:a})}).then((e=>e.map((e=>({...e,meta:{kind:"media"}}))))).catch((()=>[]))),Promise.all(c).then((e=>e.reduce(((e,t)=>e.concat(t)),[]).filter((e=>!!e.id)).slice(0,a).map((e=>{var t;const n="attachment"===e.type;return{id:e.id,url:n?e.source_url:e.url,title:(0,yn.decodeEntities)(n?e.title.rendered:e.title||"")||(0,k.__)("(no title)"),type:e.subtype||e.type,kind:null==e||null===(t=e.meta)||void 0===t?void 0:t.kind}}))))};const gn=new Map;var mn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n="/wp-block-editor/v1/url-details",r={url:(0,P.prependHTTP)(e)};if(!(0,P.isURL)(e))return Promise.reject(`${e} is not a valid URL.`);const i=(0,P.getProtocol)(e);return i&&(0,P.isValidProtocol)(i)&&i.startsWith("http")&&/^https?:\/\/[^\/\s]/i.test(e)?gn.has(e)?gn.get(e):T()({path:(0,P.addQueryArgs)(n,r),...t}).then((t=>(gn.set(e,t),t))):Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`)},_n=n(9756),Rn=n.n(_n)();let bn;!function(e){e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS"}(bn||(bn={}));const wn=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function Tn(e,t){return(0,o.useSelect)(((t,n)=>e((e=>kn(t(e))),n)),t)}const kn=Rn((e=>{const t={};for(const n in e)wn.includes(n)||Object.defineProperty(t,n,{get:()=>function(){const{getIsResolving:t,hasFinishedResolution:r}=e;for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];const a=!!t(n,o),u=!a&&r(n,o),c=e[n](...o);let l;return l=a?bn.Resolving:u?c?bn.Success:bn.Error:bn.Idle,{data:c,status:l,isResolving:a,hasResolved:u}}});return t}));function Sn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{enabled:!0};const{editEntityRecord:i,saveEditedEntityRecord:s}=(0,o.useDispatch)(Dn),a=(0,an.useMemo)((()=>({edit:r=>i(e,t,n,r),save:function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(e,t,n,{throwOnError:!0,...r})}})),[n]),{editedRecord:u,hasEdits:c}=(0,o.useSelect)((r=>({editedRecord:r(Dn).getEditedEntityRecord(e,t,n),hasEdits:r(Dn).hasEditsForEntityRecord(e,t,n)})),[e,t,n]),{data:l,...d}=Tn((i=>r.enabled?i(Dn).getEntityRecord(e,t,n):null),[e,t,n,r.enabled]);return{record:l,editedRecord:u,hasEdits:c,...d,...a}}function In(e,t,n,r){return D()("wp.data.__experimentalUseEntityRecord",{alternative:"wp.data.useEntityRecord",since:"6.1"}),Sn(e,t,n,r)}const Cn=[];function Un(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{enabled:!0};const i=(0,P.addQueryArgs)("",n),{data:o,...s}=Tn((i=>r.enabled?i(Dn).getEntityRecords(e,t,n):{data:Cn}),[e,t,i,r.enabled]);return{records:o,...s}}function An(e,t,n,r){return D()("wp.data.__experimentalUseEntityRecords",{alternative:"wp.data.useEntityRecords",since:"6.1"}),Un(e,t,n,r)}function xn(e,t){return Tn((n=>{const{canUser:r}=n(Dn),i=r("create",e);if(!t){const t=r("read",e),n=i.isResolving||t.isResolving,o=i.hasResolved&&t.hasResolved;let s=bn.Idle;return n?s=bn.Resolving:o&&(s=bn.Success),{status:s,isResolving:n,hasResolved:o,canCreate:i.hasResolved&&i.data,canRead:t.hasResolved&&t.data}}const o=r("read",e,t),s=r("update",e,t),a=r("delete",e,t),u=o.isResolving||i.isResolving||s.isResolving||a.isResolving,c=o.hasResolved&&i.hasResolved&&s.hasResolved&&a.hasResolved;let l=bn.Idle;return u?l=bn.Resolving:c&&(l=bn.Success),{status:l,isResolving:u,hasResolved:c,canRead:c&&o.data,canCreate:c&&i.data,canUpdate:c&&s.data,canDelete:c&&a.data}}),[e,t])}function Ln(e,t){return D()("wp.data.__experimentalUseResourcePermissions",{alternative:"wp.data.useResourcePermissions",since:"6.1"}),xn(e,t)}const On=ve.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[Ee(n,r)]=(e,t,i)=>He(e,n,r,t,i),e[Ee(n,r,"get",!0)]=(e,t)=>Xe(e,n,r,t),e}),{}),Pn=ve.reduce(((e,t)=>{const{kind:n,name:r}=t;e[Ee(n,r)]=(e,t)=>Vt(n,r,e,t);const i=Ee(n,r,"get",!0);return e[i]=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Nt(n,r,...t)},e[i].shouldInvalidate=e=>Nt.shouldInvalidate(e,n,r),e}),{}),Vn=ve.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[Ee(n,r,"save")]=e=>oe(n,r,e),e[Ee(n,r,"delete")]=(e,t)=>ee(n,r,e,t),e}),{}),Dn=(0,o.createReduxStore)($,{reducer:Ue,actions:{...e,...Vn,...sn()},selectors:{...t,...On},resolvers:{...i,...Pn}});(0,o.register)(Dn)}(),(window.wp=window.wp||{}).coreData=r}(); |