2 lines
48 KiB
JavaScript
2 lines
48 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.coreData=function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=461)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},106:function(e,t,r){"use strict";function n(e){return(n="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})(e)}function c(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 a(e,t){var r=e._map,n=e._arrayTreeMap,c=e._objectTreeMap;if(r.has(t))return r.get(t);for(var a=Object.keys(t).sort(),i=Array.isArray(t)?n:c,o=0;o<a.length;o++){var u=a[o];if(void 0===(i=i.get(u)))return;var s=t[u];if(void 0===(i=i.get(s)))return}var f=i.get("_ekm_value");return f?(r.delete(f[0]),f[0]=t,i.set("_ekm_value",f),r.set(t,f),f):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 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 t,r,i;return t=e,(r=[{key:"set",value:function(t,r){if(null===t||"object"!==n(t))return this._map.set(t,r),this;for(var c=Object.keys(t).sort(),a=[t,r],i=Array.isArray(t)?this._arrayTreeMap:this._objectTreeMap,o=0;o<c.length;o++){var u=c[o];i.has(u)||i.set(u,new e),i=i.get(u);var s=t[u];i.has(s)||i.set(s,new e),i=i.get(s)}var f=i.get("_ekm_value");return f&&this._map.delete(f[0]),i.set("_ekm_value",a),this._map.set(t,a),this}},{key:"get",value:function(e){if(null===e||"object"!==n(e))return this._map.get(e);var t=a(this,e);return t?t[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==n(e)?this._map.has(e):void 0!==a(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(c,a){null!==a&&"object"===n(a)&&(c=c[1]),e.call(r,c,a,t)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&c(t.prototype,r),i&&c(t,i),e}();e.exports=i},11:function(e,t){!function(){e.exports=this.wp.blocks}()},12:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(38);var c=r(30),a=r(39);function i(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,c=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){c=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(c)throw a}}return r}}(e,t)||Object(c.a)(e,t)||Object(a.a)()}},18:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(27);var c=r(37),a=r(30);function i(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(c.a)(e)||Object(a.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2:function(e,t){!function(){e.exports=this.lodash}()},24:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},27:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},30:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(27);function c(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},31:function(e,t){!function(){e.exports=this.wp.url}()},32:function(e,t){!function(){e.exports=this.wp.dataControls}()},35:function(e,t){!function(){e.exports=this.wp.deprecated}()},37:function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},38:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},39:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,"a",(function(){return n}))},4:function(e,t){!function(){e.exports=this.wp.data}()},41:function(e,t,r){"use strict";var n,c;function a(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function o(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n={},c="undefined"!=typeof WeakMap,t.a=function(e,t){var r,u;function s(){r=c?new WeakMap:i()}function f(){var r,n,c,a,i,s=arguments.length;for(a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];for(i=t.apply(null,a),(r=u(i)).isUniqueByDependants||(r.lastDependants&&!o(i,r.lastDependants,0)&&r.clear(),r.lastDependants=i),n=r.head;n;){if(o(n.args,a,1))return n!==r.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=r.head,n.prev=null,r.head.prev=n,r.head=n),n.val;n=n.next}return n={val:e.apply(null,a)},a[0]=null,n.args=a,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return t||(t=a),u=c?function(e){var t,c,a,o,u,s=r,f=!0;for(t=0;t<e.length;t++){if(c=e[t],!(u=c)||"object"!=typeof u){f=!1;break}s.has(c)?s=s.get(c):(a=new WeakMap,s.set(c,a),s=a)}return s.has(n)||((o=i()).isUniqueByDependants=f,s.set(n,o)),s.get(n)}:function(){return r},f.getDependants=t,f.clear=s,s(),f}},461:function(e,t,r){"use strict";r.r(t),r.d(t,"EntityProvider",(function(){return Xt})),r.d(t,"useEntityId",(function(){return Jt})),r.d(t,"useEntityProp",(function(){return Zt})),r.d(t,"useEntityBlockEditor",(function(){return er}));var n={};r.r(n),r.d(n,"receiveUserQuery",(function(){return V})),r.d(n,"receiveCurrentUser",(function(){return N})),r.d(n,"addEntities",(function(){return L})),r.d(n,"receiveEntityRecords",(function(){return q})),r.d(n,"receiveCurrentTheme",(function(){return F})),r.d(n,"receiveThemeSupports",(function(){return Y})),r.d(n,"receiveEmbedPreview",(function(){return B})),r.d(n,"deleteEntityRecord",(function(){return H})),r.d(n,"editEntityRecord",(function(){return Q})),r.d(n,"undo",(function(){return W})),r.d(n,"redo",(function(){return K})),r.d(n,"__unstableCreateUndoLevel",(function(){return G})),r.d(n,"saveEntityRecord",(function(){return z})),r.d(n,"saveEditedEntityRecord",(function(){return $})),r.d(n,"receiveUploadPermissions",(function(){return X})),r.d(n,"receiveUserPermission",(function(){return J})),r.d(n,"receiveAutosaves",(function(){return Z}));var c={};r.r(c),r.d(c,"isRequestingEmbedPreview",(function(){return Me})),r.d(c,"getAuthors",(function(){return Ve})),r.d(c,"getCurrentUser",(function(){return Ne})),r.d(c,"getUserQueryResults",(function(){return Le})),r.d(c,"getEntitiesByKind",(function(){return qe})),r.d(c,"getEntity",(function(){return Fe})),r.d(c,"getEntityRecord",(function(){return Ye})),r.d(c,"__experimentalGetEntityRecordNoResolver",(function(){return Be})),r.d(c,"getRawEntityRecord",(function(){return He})),r.d(c,"hasEntityRecords",(function(){return Qe})),r.d(c,"getEntityRecords",(function(){return We})),r.d(c,"__experimentalGetDirtyEntityRecords",(function(){return Ke})),r.d(c,"getEntityRecordEdits",(function(){return Ge})),r.d(c,"getEntityRecordNonTransientEdits",(function(){return ze})),r.d(c,"hasEditsForEntityRecord",(function(){return $e})),r.d(c,"getEditedEntityRecord",(function(){return Xe})),r.d(c,"isAutosavingEntityRecord",(function(){return Je})),r.d(c,"isSavingEntityRecord",(function(){return Ze})),r.d(c,"isDeletingEntityRecord",(function(){return et})),r.d(c,"getLastEntitySaveError",(function(){return tt})),r.d(c,"getLastEntityDeleteError",(function(){return rt})),r.d(c,"getUndoEdit",(function(){return ct})),r.d(c,"getRedoEdit",(function(){return at})),r.d(c,"hasUndo",(function(){return it})),r.d(c,"hasRedo",(function(){return ot})),r.d(c,"getCurrentTheme",(function(){return ut})),r.d(c,"getThemeSupports",(function(){return st})),r.d(c,"getEmbedPreview",(function(){return ft})),r.d(c,"isPreviewEmbedFallback",(function(){return dt})),r.d(c,"hasUploadPermissions",(function(){return lt})),r.d(c,"canUser",(function(){return pt})),r.d(c,"getAutosaves",(function(){return bt})),r.d(c,"getAutosave",(function(){return vt})),r.d(c,"hasFetchedAutosaves",(function(){return yt})),r.d(c,"getReferenceByDistinctEdits",(function(){return Ot}));var a={};r.r(a),r.d(a,"getAuthors",(function(){return At})),r.d(a,"getCurrentUser",(function(){return Dt})),r.d(a,"getEntityRecord",(function(){return Ut})),r.d(a,"getRawEntityRecord",(function(){return Ct})),r.d(a,"getEditedEntityRecord",(function(){return Mt})),r.d(a,"getEntityRecords",(function(){return Vt})),r.d(a,"getCurrentTheme",(function(){return Nt})),r.d(a,"getThemeSupports",(function(){return Lt})),r.d(a,"getEmbedPreview",(function(){return qt})),r.d(a,"hasUploadPermissions",(function(){return Ft})),r.d(a,"canUser",(function(){return Yt})),r.d(a,"getAutosaves",(function(){return Bt})),r.d(a,"getAutosave",(function(){return Ht}));var i=r(5),o=r(4),u=r(32),s=r(12),f=r(18),d=r(2),l=r(64),p=r.n(l),b=function(e){return function(t){return function(r,n){return void 0===r||e(n)?t(r,n):r}}},v=function(e){return function(t){return function(r,n){return t(r,e(n))}}};function y(e,t){if(!e)return t;var r=!1,n={};for(var c in t)Object(d.isEqual)(e[c],t[c])?n[c]=e[c]:(r=!0,n[c]=t[c]);if(!r)return e;for(var a in e)n.hasOwnProperty(a)||(n[a]=e[a]);return n}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=function(e){return function(t){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,c=n[e];if(void 0===c)return r;var a=t(r[c],n);return a===r[c]?r:h(h({},r),{},Object(i.a)({},c,a))}}},j=r(24),g=r.n(j),m=r(1),w=r(31);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function k(e){return{type:"RECEIVE_ITEMS",items:Object(d.castArray)(e)}}function x(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{type:"REMOVE_ITEMS",itemIds:Object(d.castArray)(r),kind:e,name:t,invalidateCache:n}}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(R({},k(e)),{},{query:t})}var S=g.a.mark(H),I=g.a.mark(Q),P=g.a.mark(W),A=g.a.mark(K),D=g.a.mark(z),U=g.a.mark($);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function V(e,t){return{type:"RECEIVE_USER_QUERY",users:Object(d.castArray)(t),queryID:e}}function N(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function L(e){return{type:"ADD_ENTITIES",entities:e}}function q(e,t,r,n){var c=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return"postType"===e&&(r=Object(d.castArray)(r).map((function(e){return"auto-draft"===e.status?M(M({},e),{},{title:""}):e}))),M(M({},n?T(r,n):k(r)),{},{kind:e,name:t,invalidateCache:c})}function F(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function Y(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function B(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function H(e,t,r,n){var c,a,i,o,s;return g.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,se(e);case 2:if(c=f.sent,a=Object(d.find)(c,{kind:e,name:t}),o=!1,a){f.next=7;break}return f.abrupt("return");case 7:return f.next=9,{type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:r};case 9:return f.prev=9,s="".concat(a.baseURL,"/").concat(r),n&&(s=Object(w.addQueryArgs)(s,n)),f.next=14,Object(u.apiFetch)({path:s,method:"DELETE"});case 14:return o=f.sent,f.next=17,x(e,t,r,!0);case 17:f.next=22;break;case 19:f.prev=19,f.t0=f.catch(9),i=f.t0;case 22:return f.next=24,{type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:r,error:i};case 24:return f.abrupt("return",o);case 25:case"end":return f.stop()}}),S,null,[[9,19]])}function Q(e,t,r,n){var c,a,i,o,s,f,l,p,b,v=arguments;return g.a.wrap((function(y){for(;;)switch(y.prev=y.next){case 0:return c=v.length>4&&void 0!==v[4]?v[4]:{},y.next=3,Object(u.syncSelect)("core","getEntity",e,t);case 3:if(a=y.sent){y.next=6;break}throw new Error("The entity being edited (".concat(e,", ").concat(t,") does not have a loaded config."));case 6:return i=a.transientEdits,o=void 0===i?{}:i,s=a.mergedEdits,f=void 0===s?{}:s,y.next=9,Object(u.syncSelect)("core","getRawEntityRecord",e,t,r);case 9:return l=y.sent,y.next=12,Object(u.syncSelect)("core","getEditedEntityRecord",e,t,r);case 12:return p=y.sent,b={kind:e,name:t,recordId:r,edits:Object.keys(n).reduce((function(e,t){var r=l[t],c=p[t],a=f[t]?M(M({},c),n[t]):n[t];return e[t]=Object(d.isEqual)(r,a)?void 0:a,e}),{}),transientEdits:o},y.abrupt("return",M(M({type:"EDIT_ENTITY_RECORD"},b),{},{meta:{undo:!c.undoIgnore&&M(M({},b),{},{edits:Object.keys(n).reduce((function(e,t){return e[t]=p[t],e}),{})})}}));case 15:case"end":return y.stop()}}),I)}function W(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.syncSelect)("core","getUndoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,M(M({type:"EDIT_ENTITY_RECORD"},e),{},{meta:{isUndo:!0}});case 7:case"end":return t.stop()}}),P)}function K(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.syncSelect)("core","getRedoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,M(M({type:"EDIT_ENTITY_RECORD"},e),{},{meta:{isRedo:!0}});case 7:case"end":return t.stop()}}),A)}function G(){return{type:"CREATE_UNDO_LEVEL"}}function z(e,t,r){var n,c,a,o,f,l,p,b,v,y,O,h,E,j,m,w,_,R,k,x,T,S,I,P,A,U=arguments;return g.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return n=U.length>3&&void 0!==U[3]?U[3]:{isAutosave:!1},c=n.isAutosave,a=void 0!==c&&c,g.next=3,se(e);case 3:if(o=g.sent,f=Object(d.find)(o,{kind:e,name:t})){g.next=7;break}return g.abrupt("return");case 7:l=f.key||ne,p=r[l],b=0,v=Object.entries(r);case 10:if(!(b<v.length)){g.next=24;break}if(y=Object(s.a)(v[b],2),O=y[0],"function"!=typeof(h=y[1])){g.next=21;break}return g.t0=h,g.next=16,Object(u.syncSelect)("core","getEditedEntityRecord",e,t,p);case 16:return g.t1=g.sent,E=(0,g.t0)(g.t1),g.next=20,Q(e,t,p,Object(i.a)({},O,E),{undoIgnore:!0});case 20:r[O]=E;case 21:b++,g.next=10;break;case 24:return g.next=26,{type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:p,isAutosave:a};case 26:return g.prev=26,R="".concat(f.baseURL).concat(p?"/"+p:""),g.next=30,Object(u.syncSelect)("core","getRawEntityRecord",e,t,p);case 30:if(k=g.sent,!a){g.next=55;break}return g.next=34,Object(u.syncSelect)("core","getCurrentUser");case 34:return x=g.sent,T=x?x.id:void 0,g.next=38,Object(u.syncSelect)("core","getAutosave",k.type,k.id,T);case 38:return S=g.sent,I=M(M(M({},k),S),r),I=Object.keys(I).reduce((function(e,t){return["title","excerpt","content"].includes(t)&&(e[t]=Object(d.get)(I[t],"raw",I[t])),e}),{status:"auto-draft"===I.status?"draft":I.status}),g.next=43,Object(u.apiFetch)({path:"".concat(R,"/autosaves"),method:"POST",data:I});case 43:if(j=g.sent,k.id!==j.id){g.next=51;break}return P=M(M(M({},k),I),j),P=Object.keys(P).reduce((function(e,t){return["title","excerpt","content"].includes(t)?e[t]=Object(d.get)(P[t],"raw",P[t]):e[t]="status"===t?"auto-draft"===k.status&&"draft"===P.status?P.status:k.status:Object(d.get)(k[t],"raw",k[t]),e}),{}),g.next=49,q(e,t,P,void 0,!0);case 49:g.next=53;break;case 51:return g.next=53,Z(k.id,j);case 53:g.next=70;break;case 55:return A=r,"postType"===e&&k&&"auto-draft"===k.status&&(A.status||(A=M(M({},A),{},{status:"draft"})),A.title&&"Auto Draft"!==A.title||(A=M(M({},A),{},{title:""}))),g.next=59,Object(u.syncSelect)("core","__experimentalGetEntityRecordNoResolver",e,t,p);case 59:return w=g.sent,g.next=62,Object(u.syncSelect)("core","getEntityRecordEdits",e,t,p);case 62:return _=g.sent,g.next=65,q(e,t,M(M({},w),A),void 0,!0);case 65:return g.next=67,Object(u.apiFetch)({path:R,method:p?"PUT":"POST",data:A});case 67:return j=g.sent,g.next=70,q(e,t,j,void 0,!0);case 70:g.next=91;break;case 72:if(g.prev=72,g.t2=g.catch(26),m=g.t2,!w||!_){g.next=91;break}return g.next=78,q(e,t,w,void 0,!0);case 78:return g.t3=Q,g.t4=e,g.t5=t,g.t6=p,g.t7=M,g.t8=M({},_),g.next=86,Object(u.syncSelect)("core","getEntityRecordEdits",e,t,p);case 86:return g.t9=g.sent,g.t10=(0,g.t7)(g.t8,g.t9),g.t11={undoIgnore:!0},g.next=91,(0,g.t3)(g.t4,g.t5,g.t6,g.t10,g.t11);case 91:return g.next=93,{type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:p,error:m,isAutosave:a};case 93:return g.abrupt("return",j);case 94:case"end":return g.stop()}}),D,null,[[26,72]])}function $(e,t,r,n){var c,a;return g.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(u.syncSelect)("core","hasEditsForEntityRecord",e,t,r);case 2:if(i.sent){i.next=4;break}return i.abrupt("return");case 4:return i.next=6,Object(u.syncSelect)("core","getEntityRecordNonTransientEdits",e,t,r);case 6:return c=i.sent,a=M({id:r},c),i.delegateYield(z(e,t,a,n),"t0",9);case 9:case"end":return i.stop()}}),U)}function X(e){return{type:"RECEIVE_USER_PERMISSION",key:"create/media",isAllowed:e}}function J(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function Z(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Object(d.castArray)(t)}}var ee=g.a.mark(ie),te=g.a.mark(oe),re=g.a.mark(se),ne="id",ce=[{label:Object(m.__)("Base"),name:"__unstableBase",kind:"root",baseURL:""},{label:Object(m.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:function(e){return Object(d.get)(e,["title"],Object(m.__)("Site Title"))}},{label:Object(m.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types"},{name:"media",kind:"root",baseURL:"/wp/v2/media",plural:"mediaItems",label:Object(m.__)("Media")},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",plural:"taxonomies",label:Object(m.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/__experimental/sidebars",plural:"sidebars",transientEdits:{blocks:!0},label:Object(m.__)("Widget areas")},{label:Object(m.__)("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",plural:"comments",label:Object(m.__)("Comment")},{name:"menu",kind:"root",baseURL:"/__experimental/menus",plural:"menus",label:Object(m.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/__experimental/menu-items",plural:"menuItems",label:Object(m.__)("Menu Item")},{name:"menuLocation",kind:"root",baseURL:"/__experimental/menu-locations",plural:"menuLocations",label:Object(m.__)("Menu Location"),key:"name"}],ae=[{name:"postType",loadEntities:ie},{name:"taxonomy",loadEntities:oe}];function ie(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/types?context=edit"});case 2:return e=t.sent,t.abrupt("return",Object(d.map)(e,(function(e,t){return{kind:"postType",baseURL:"/wp/v2/"+e.rest_base,name:t,label:e.labels.singular_name,transientEdits:{blocks:!0,selectionStart:!0,selectionEnd:!0},mergedEdits:{meta:!0},getTitle:function(e){return"wp_template_part"===t||"wp_template"===t?Object(d.startCase)(e.slug):Object(d.get)(e,["title","rendered"],e.id)}}})));case 4:case"end":return t.stop()}}),ee)}function oe(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/taxonomies?context=edit"});case 2:return e=t.sent,t.abrupt("return",Object(d.map)(e,(function(e,t){return{kind:"taxonomy",baseURL:"/wp/v2/"+e.rest_base,name:t,label:e.labels.singular_name}})));case 4:case"end":return t.stop()}}),te)}var ue=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"get",n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=Object(d.find)(ce,{kind:e,name:t}),a="root"===e?"":Object(d.upperFirst)(Object(d.camelCase)(e)),i=Object(d.upperFirst)(Object(d.camelCase)(t))+(n?"s":""),o=n&&c.plural?Object(d.upperFirst)(Object(d.camelCase)(c.plural)):i;return"".concat(r).concat(a).concat(o)};function se(e){var t,r;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(u.syncSelect)("core","getEntitiesByKind",e);case 2:if(!(t=n.sent)||0===t.length){n.next=5;break}return n.abrupt("return",t);case 5:if(r=Object(d.find)(ae,{name:e})){n.next=8;break}return n.abrupt("return",[]);case 8:return n.next=10,r.loadEntities();case 10:return t=n.sent,n.next=13,L(t);case 13:return n.abrupt("return",t);case 14:case"end":return n.stop()}}),re)}var fe=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};var de=function(e){var t=new WeakMap;return function(r){var n;return t.has(r)?n=t.get(r):(n=e(r),Object(d.isObjectLike)(r)&&t.set(r,n)),n}}((function(e){for(var t={stableKey:"",page:1,perPage:10,fields:null,include:null},r=Object.keys(e).sort(),n=0;n<r.length;n++){var c=r[n],a=e[c];switch(c){case"page":t[c]=Number(a);break;case"per_page":t.perPage=Number(a);break;case"include":t.include=fe(a).map(Number);break;case"_fields":t.fields=fe(a);break;default:t.stableKey+=(t.stableKey?"&":"")+Object(w.addQueryArgs)("",Object(i.a)({},c,a)).slice(1)}}return t}));function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function be(e,t,r,n){if(1===r&&-1===n)return t;for(var c=(r-1)*n,a=Math.max(e.length,c+t.length),i=new Array(a),o=0;o<a;o++){var u=o>=c&&o<c+t.length;i[o]=u?t[o-c]:e[o]}return i}var ve=Object(d.flowRight)([b((function(e){return"query"in e})),v((function(e){return e.query?pe(pe({},e),de(e.query)):e})),E("stableKey")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.page,c=t.perPage,a=t.key,i=void 0===a?ne:a;return"RECEIVE_ITEMS"!==r?e:be(e||[],Object(d.map)(t.items,i),n,c)})),ye=Object(o.combineReducers)({items:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":var r=t.key||ne;return pe(pe({},e),t.items.reduce((function(t,n){var c=n[r];return t[c]=y(e[c],n),t}),{}));case"REMOVE_ITEMS":var n=Object(d.omit)(e,t.itemIds);return n}return e},itemIsComplete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.query,c=t.key,a=void 0===c?ne:c;if("RECEIVE_ITEMS"!==r)return e;var i=!n||!Array.isArray(de(n).fields);return pe(pe({},e),t.items.reduce((function(t,r){var n=r[a];return t[n]=e[n]||i,t}),{}))},queries:function(){var 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 ve(e,t);case"REMOVE_ITEMS":var r=pe({},e),n=t.itemIds.reduce((function(e,t){return e[t]=!0,e}),{});return Object(d.forEach)(r,(function(e,t){r[t]=Object(d.filter)(e,(function(e){return!n[e]}))})),r;default:return e}}});function Oe(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return he(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw a}}}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ge(e){return Object(d.flowRight)([b((function(t){return t.name&&t.kind&&t.name===e.name&&t.kind===e.kind})),v((function(t){return je(je({},t),{},{key:e.key||ne})}))])(Object(o.combineReducers)({queriedData:ye,edits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":var r,n=je({},e),c=Oe(t.items);try{var a=function(){var e=r.value,c=e[t.key],a=n[c];if(!a)return"continue";var i=Object.keys(a).reduce((function(t,r){return Object(d.isEqual)(a[r],Object(d.get)(e[r],"raw",e[r]))||(t[r]=a[r]),t}),{});Object.keys(i).length?n[c]=i:delete n[c]};for(c.s();!(r=c.n()).done;)a()}catch(e){c.e(e)}finally{c.f()}return n;case"EDIT_ENTITY_RECORD":var o=je(je({},e[t.recordId]),t.edits);return Object.keys(o).forEach((function(e){void 0===o[e]&&delete o[e]})),je(je({},e),{},Object(i.a)({},t.recordId,o))}return e},saving:function(){var 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 je(je({},e),{},Object(i.a)({},t.recordId,{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}))}return e},deleting:function(){var 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 je(je({},e),{},Object(i.a)({},t.recordId,{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}))}return e}}))}function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ENTITIES":return[].concat(Object(f.a)(e),Object(f.a)(t.entities))}return e}var we,_e=[];_e.offset=0;var Re=Object(o.combineReducers)({terms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TERMS":return je(je({},e),{},Object(i.a)({},t.taxonomy,t.terms))}return e},users:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{byId:{},queries:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_QUERY":return{byId:je(je({},e.byId),Object(d.keyBy)(t.users,"id")),queries:je(je({},e.queries),{},Object(i.a)({},t.queryID,Object(d.map)(t.users,(function(e){return e.id}))))}}return e},currentTheme:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e},currentUser:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e},taxonomies:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e},themes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_THEME":return je(je({},e),{},Object(i.a)({},t.currentTheme.stylesheet,t.currentTheme))}return e},themeSupports:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_THEME_SUPPORTS":return je(je({},e),t.themeSupports)}return e},entities:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=me(e.config,t),n=e.reducer;if(!n||r!==e.config){var c=Object(d.groupBy)(r,"kind");n=Object(o.combineReducers)(Object.entries(c).reduce((function(e,t){var r=Object(s.a)(t,2),n=r[0],c=r[1],a=Object(o.combineReducers)(c.reduce((function(e,t){return je(je({},e),{},Object(i.a)({},t.name,ge(t)))}),{}));return e[n]=a,e}),{}))}var a=n(e.data,t);return a===e.data&&r===e.config&&n===e.reducer?e:{reducer:n,data:a,config:r}},undo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_e,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":var r,n="CREATE_UNDO_LEVEL"===t.type,c=!n&&(t.meta.isUndo||t.meta.isRedo);if(n?t=we:c||(we=Object.keys(t.edits).some((function(e){return!t.transientEdits[e]}))?t:je(je({},t),{},{edits:je(je({},we&&we.edits),t.edits)})),c){if((r=Object(f.a)(e)).offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return r;n=!0,t=we}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((function(e){return!t.transientEdits[e]})))return(r=Object(f.a)(e)).flattenedUndo=je(je({},e.flattenedUndo),t.edits),r.offset=e.offset,r;(r=r||e.slice(0,e.offset||void 0)).offset=r.offset||0,r.pop(),n||r.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:je(je({},e.flattenedUndo),t.meta.undo.edits)});var a=Object.values(t.meta.undo.edits).filter((function(e){return"function"!=typeof e})),i=Object.values(t.edits).filter((function(e){return"function"!=typeof e}));return p()(a,i)||r.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?je(je({},e.flattenedUndo),t.edits):t.edits}),r}return e},embedPreviews:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_EMBED_PREVIEW":var r=t.url,n=t.preview;return je(je({},e),{},Object(i.a)({},r,n))}return e},userPermissions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_PERMISSION":return je(je({},e),{},Object(i.a)({},t.key,t.isAllowed))}return e},autosaves:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_AUTOSAVES":var r=t.postId,n=t.autosaves;return je(je({},e),{},Object(i.a)({},r,n))}return e}}),ke=r(41),xe=r(35),Te=r.n(xe),Se=r(106),Ie=r.n(Se),Pe=new WeakMap;function Ae(e,t){var r,n=de(t),c=n.stableKey,a=n.page,i=n.perPage,o=n.include,u=n.fields;if(Array.isArray(o)&&!c?r=o:e.queries[c]&&(r=e.queries[c]),!r)return null;for(var s=-1===i?0:(a-1)*i,f=-1===i?r.length:Math.min(s+i,r.length),l=[],p=s;p<f;p++){var b=r[p];if(!Array.isArray(o)||o.includes(b)){if(!e.items.hasOwnProperty(b))return null;var v=e.items[b],y=void 0;if(Array.isArray(u)){y={};for(var O=0;O<u.length;O++){var h=u[O].split(".");if(!Object(d.has)(v,h))return null;var E=Object(d.get)(v,h);Object(d.set)(y,h,E)}}else{if(!e.itemIsComplete[b])return null;y=v}l.push(y)}}return l}var De=Object(ke.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Pe.get(e);if(r){var n=r.get(t);if(void 0!==n)return n}else r=new Ie.a,Pe.set(e,r);var c=Ae(e,t);return r.set(t,c),c}));function Ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Me=Object(o.createRegistrySelector)((function(e){return function(t,r){return e("core/data").isResolving("core","getEmbedPreview",[r])}}));function Ve(e){return Te()("select( 'core' ).getAuthors()",{alternative:"select( 'core' ).getUsers({ who: 'authors' })"}),Le(e,"authors")}function Ne(e){return e.currentUser}var Le=Object(ke.a)((function(e,t){var r=e.users.queries[t];return Object(d.map)(r,(function(t){return e.users.byId[t]}))}),(function(e,t){return[e.users.queries[t],e.users.byId]}));function qe(e,t){return Object(d.filter)(e.entities.config,{kind:t})}function Fe(e,t,r){return Object(d.find)(e.entities.config,{kind:t,name:r})}function Ye(e,t,r,n,c){var a=Object(d.get)(e.entities.data,[t,r,"queriedData"]);if(a){if(void 0===c){if(!a.itemIsComplete[n])return;return a.items[n]}return c=Ce(Ce({},c),{},{include:[n]}),Object(d.first)(De(a,c))}}function Be(e,t,r,n){return Ye(e,t,r,n)}var He=Object(ke.a)((function(e,t,r,n){var c=Ye(e,t,r,n);return c&&Object.keys(c).reduce((function(e,t){return e[t]=Object(d.get)(c[t],"raw",c[t]),e}),{})}),(function(e){return[e.entities.data]}));function Qe(e,t,r,n){return Array.isArray(We(e,t,r,n))}function We(e,t,r,n){var c=Object(d.get)(e.entities.data,[t,r,"queriedData"]);return c?De(c,n):[]}var Ke=Object(ke.a)((function(e){var t=e.entities.data,r=[];return Object.keys(t).forEach((function(n){Object.keys(t[n]).forEach((function(c){var a=Object.keys(t[n][c].edits).filter((function(t){return $e(e,n,c,t)}));if(a.length){var i=Fe(e,n,c);a.forEach((function(t){var a=Xe(e,n,c,t);r.push({key:a[i.key||ne],title:i.getTitle?i.getTitle(a):"",name:c,kind:n})}))}}))})),r}),(function(e){return[e.entities.data]}));function Ge(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"edits",n])}var ze=Object(ke.a)((function(e,t,r,n){var c=(Fe(e,t,r)||{}).transientEdits,a=Ge(e,t,r,n)||{};return c?Object.keys(a).reduce((function(e,t){return c[t]||(e[t]=a[t]),e}),{}):a}),(function(e){return[e.entities.config,e.entities.data]}));function $e(e,t,r,n){return Ze(e,t,r,n)||Object.keys(ze(e,t,r,n)).length>0}var Xe=Object(ke.a)((function(e,t,r,n){return Ce(Ce({},He(e,t,r,n)),Ge(e,t,r,n))}),(function(e){return[e.entities.data]}));function Je(e,t,r,n){var c=Object(d.get)(e.entities.data,[t,r,"saving",n],{}),a=c.pending,i=c.isAutosave;return Boolean(a&&i)}function Ze(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"saving",n,"pending"],!1)}function et(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"deleting",n,"pending"],!1)}function tt(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"saving",n,"error"])}function rt(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"deleting",n,"error"])}function nt(e){return e.undo.offset}function ct(e){return e.undo[e.undo.length-2+nt(e)]}function at(e){return e.undo[e.undo.length+nt(e)]}function it(e){return Boolean(ct(e))}function ot(e){return Boolean(at(e))}function ut(e){return e.themes[e.currentTheme]}function st(e){return e.themeSupports}function ft(e,t){return e.embedPreviews[t]}function dt(e,t){var r=e.embedPreviews[t],n='<a href="'+t+'">'+t+"</a>";return!!r&&r.html===n}function lt(e){return Te()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),Object(d.defaultTo)(pt(e,"create","media"),!0)}function pt(e,t,r,n){var c=Object(d.compact)([t,r,n]).join("/");return Object(d.get)(e,["userPermissions",c])}function bt(e,t,r){return e.autosaves[r]}function vt(e,t,r,n){if(void 0!==n){var c=e.autosaves[r];return Object(d.find)(c,{author:n})}}var yt=Object(o.createRegistrySelector)((function(e){return function(t,r,n){return e("core").hasFinishedResolution("getAutosaves",[r,n])}})),Ot=Object(ke.a)((function(){return[]}),(function(e){return[e.undo.length,e.undo.offset,e.undo.flattenedUndo]})),ht=function(e,t){return g.a.mark((function r(){var n,c,a,i=arguments;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n=i.length,c=new Array(n),a=0;a<n;a++)c[a]=i[a];return r.next=3,Object(u.select)("core","hasStartedResolution",t,c);case 3:if(r.sent){r.next=6;break}return r.delegateYield(e.apply(void 0,c),"t0",6);case 6:case"end":return r.stop()}}),r)}))};function Et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Et(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gt=g.a.mark(At),mt=g.a.mark(Dt),wt=g.a.mark(Ut),_t=g.a.mark(Vt),Rt=g.a.mark(Nt),kt=g.a.mark(Lt),xt=g.a.mark(qt),Tt=g.a.mark(Ft),St=g.a.mark(Yt),It=g.a.mark(Bt),Pt=g.a.mark(Ht);function At(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/users/?who=authors&per_page=-1"});case 2:return e=t.sent,t.next=5,V("authors",e);case 5:case"end":return t.stop()}}),gt)}function Dt(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/users/me"});case 2:return e=t.sent,t.next=5,N(e);case 5:case"end":return t.stop()}}),mt)}function Ut(e,t){var r,n,c,a,i,o,s=arguments;return g.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return r=s.length>2&&void 0!==s[2]?s[2]:"",n=s.length>3?s[3]:void 0,l.next=4,se(e);case 4:if(c=l.sent,a=Object(d.find)(c,{kind:e,name:t})){l.next=8;break}return l.abrupt("return");case 8:if(void 0!==n&&n._fields&&(n=jt(jt({},n),{},{_fields:Object(d.uniq)([].concat(Object(f.a)(fe(n._fields)||[]),[a.key||ne])).join()})),i=Object(w.addQueryArgs)(a.baseURL+"/"+r,jt(jt({},n),{},{context:"edit"})),void 0===n){l.next=17;break}return n=jt(jt({},n),{},{include:[r]}),l.next=14,Object(u.syncSelect)("core","hasEntityRecords",e,t,n);case 14:if(!l.sent){l.next=17;break}return l.abrupt("return");case 17:return l.next=19,Object(u.apiFetch)({path:i});case 19:return o=l.sent,l.next=22,q(e,t,o,n);case 22:case"end":return l.stop()}}),wt)}var Ct=ht(Ut,"getEntityRecord"),Mt=ht(Ct,"getRawEntityRecord");function Vt(e,t){var r,n,c,a,i,o=arguments;return g.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:{},s.next=3,se(e);case 3:if(n=s.sent,c=Object(d.find)(n,{kind:e,name:t})){s.next=7;break}return s.abrupt("return");case 7:return r._fields&&(r=jt(jt({},r),{},{_fields:Object(d.uniq)([].concat(Object(f.a)(fe(r._fields)||[]),[c.key||ne])).join()})),a=Object(w.addQueryArgs)(c.baseURL,jt(jt({},r),{},{context:"edit"})),s.t0=Object,s.next=12,Object(u.apiFetch)({path:a});case 12:return s.t1=s.sent,i=s.t0.values.call(s.t0,s.t1),r._fields&&(i=i.map((function(e){return r._fields.split(",").forEach((function(t){e.hasOwnProperty(t)||(e[t]=void 0)})),e}))),s.next=17,q(e,t,i,r);case 17:case"end":return s.stop()}}),_t)}function Nt(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,F(e[0]);case 5:case"end":return t.stop()}}),Rt)}function Lt(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,Y(e[0].theme_supports);case 5:case"end":return t.stop()}}),kt)}function qt(e){var t;return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(u.apiFetch)({path:Object(w.addQueryArgs)("/oembed/1.0/proxy",{url:e})});case 3:return t=r.sent,r.next=6,B(e,t);case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,B(e,!1);case 12:case"end":return r.stop()}}),xt,null,[[0,8]])}function Ft(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Te()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),e.delegateYield(Yt("create","media"),"t0",2);case 2:case"end":return e.stop()}}),Tt)}function Yt(e,t,r){var n,c,a,i,o,s;return g.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:if(n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e]){f.next=4;break}throw new Error("'".concat(e,"' is not a valid action."));case 4:return c=r?"/wp/v2/".concat(t,"/").concat(r):"/wp/v2/".concat(t),f.prev=5,f.next=8,Object(u.apiFetch)({path:c,method:r?"GET":"OPTIONS",parse:!1});case 8:a=f.sent,f.next=14;break;case 11:return f.prev=11,f.t0=f.catch(5),f.abrupt("return");case 14:return i=Object(d.hasIn)(a,["headers","get"])?a.headers.get("allow"):Object(d.get)(a,["headers","Allow"],""),o=Object(d.compact)([e,t,r]).join("/"),s=Object(d.includes)(i,n),f.next=19,J(o,s);case 19:case"end":return f.stop()}}),St,null,[[5,11]])}function Bt(e,t){var r,n,c;return g.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(u.select)("core","getPostType",e);case 2:return r=a.sent,n=r.rest_base,a.next=6,Object(u.apiFetch)({path:"/wp/v2/".concat(n,"/").concat(t,"/autosaves?context=edit")});case 6:if(!(c=a.sent)||!c.length){a.next=10;break}return a.next=10,Z(t,c);case 10:case"end":return a.stop()}}),It)}function Ht(e,t){return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(u.select)("core","getAutosaves",e,t);case 2:case"end":return r.stop()}}),Pt)}Vt.shouldInvalidate=function(e,t,r){return("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&r===e.name};var Qt=r(0),Wt=r(11);function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Gt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var zt=Gt(Gt({},ce.reduce((function(e,t){return e[t.kind]||(e[t.kind]={}),e[t.kind][t.name]={context:Object(Qt.createContext)()},e}),{})),ae.reduce((function(e,t){return e[t.name]={},e}),{})),$t=function(e,t){if(!zt[e])throw new Error("Missing entity config for kind: ".concat(e,"."));return zt[e][t]||(zt[e][t]={context:Object(Qt.createContext)()}),zt[e][t]};function Xt(e){var t=e.kind,r=e.type,n=e.id,c=e.children,a=$t(t,r).context.Provider;return Object(Qt.createElement)(a,{value:n},c)}function Jt(e,t){return Object(Qt.useContext)($t(e,t).context)}function Zt(e,t,r,n){var c=Jt(e,t),a=null!=n?n:c,u=Object(o.useSelect)((function(n){var c=n("core"),i=c.getEntityRecord,o=c.getEditedEntityRecord,u=i(e,t,a),s=o(e,t,a);return u&&s?{value:s[r],fullValue:u[r]}:{}}),[e,t,a,r]),s=u.value,f=u.fullValue,d=Object(o.useDispatch)("core").editEntityRecord;return[s,Object(Qt.useCallback)((function(n){d(e,t,a,Object(i.a)({},r,n))}),[e,t,a,r]),f]}function er(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.initialEdits,c=r.blocksProp,a=void 0===c?"blocks":c,i=r.contentProp,u=void 0===i?"content":i,f=r.id,d=Jt(e,t),l=null!=f?f:d,p=Zt(e,t,u,l),b=Object(s.a)(p,2),v=b[0],y=b[1],O=Object(o.useDispatch)("core"),h=O.editEntityRecord;Object(Qt.useEffect)((function(){n&&h(e,t,l,n,{undoIgnore:!0})}),[l]);var E=Object(Qt.useMemo)((function(){if(v&&"function"!=typeof v){var e=Object(Wt.parse)(v);return e.length?e:[]}return[]}),[v]),j=Zt(e,t,a,l),g=Object(s.a)(j,2),m=g[0],w=void 0===m?E:m,_=g[1],R=Object(Qt.useCallback)((function(e){_(e),y((function(e){var t=e.blocks;return Object(Wt.serialize)(t)}))}),[_,y]);return[w,_,R]}function tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tr(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var nr=ce.reduce((function(e,t){var r=t.kind,n=t.name;return e[ue(r,n)]=function(e,t){return Ye(e,r,n,t)},e[ue(r,n,"get",!0)]=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return We.apply(c,[e,r,n].concat(a))},e}),{}),cr=ce.reduce((function(e,t){var r=t.kind,n=t.name;e[ue(r,n)]=function(e){return Ut(r,n,e)};var c=ue(r,n,"get",!0);return e[c]=function(){for(var e=arguments.length,t=new Array(e),c=0;c<e;c++)t[c]=arguments[c];return Vt.apply(a,[r,n].concat(t))},e[c].shouldInvalidate=function(e){for(var t,c=arguments.length,a=new Array(c>1?c-1:0),i=1;i<c;i++)a[i-1]=arguments[i];return(t=Vt).shouldInvalidate.apply(t,[e,r,n].concat(a))},e}),{}),ar=ce.reduce((function(e,t){var r=t.kind,n=t.name;return e[ue(r,n,"save")]=function(e){return z(r,n,e)},e[ue(r,n,"delete")]=function(e,t){return H(r,n,e,t)},e}),{});Object(o.registerStore)("core",{reducer:Re,controls:u.controls,actions:rr(rr({},n),ar),selectors:rr(rr({},c),nr),resolvers:rr(rr({},a),cr)})},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},64:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()}}); |