1 line
37 KiB
JavaScript
1 line
37 KiB
JavaScript
this.wp=this.wp||{},this.wp.coreData=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.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 a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));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=387)}({10: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})},17:function(e,t,r){"use strict";var n=r(30);function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||Object(n.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(t,"a",function(){return a})},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t,r){e.exports=r(48)},23:function(e,t,r){"use strict";var n=r(38);var a=r(39);function o(e,t){return Object(n.a)(e)||function(e,t){var r=[],n=!0,a=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}return r}(e,t)||Object(a.a)()}r.d(t,"a",function(){return o})},26:function(e,t){!function(){e.exports=this.wp.url}()},30:function(e,t,r){"use strict";function n(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}r.d(t,"a",function(){return n})},32:function(e,t){!function(){e.exports=this.wp.apiFetch}()},35:function(e,t,r){"use strict";var n,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function u(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={},a="undefined"!=typeof WeakMap,t.a=function(e,t){var r,c;function s(){r=a?new WeakMap:i()}function f(){var r,n,a,o,i,s=arguments.length;for(o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];for(i=t.apply(null,o),(r=c(i)).isUniqueByDependants||(r.lastDependants&&!u(i,r.lastDependants,0)&&r.clear(),r.lastDependants=i),n=r.head;n;){if(u(n.args,o,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,o)},o[0]=null,n.args=o,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return t||(t=o),c=a?function(e){var t,a,o,u,c,s=r,f=!0;for(t=0;t<e.length;t++){if(a=e[t],!(c=a)||"object"!=typeof c){f=!1;break}s.has(a)?s=s.get(a):(o=new WeakMap,s.set(a,o),s=o)}return s.has(n)||((u=i()).isUniqueByDependants=f,s.set(n,u)),s.get(n)}:function(){return r},f.getDependants=t,f.clear=s,s(),f}},37:function(e,t){!function(){e.exports=this.wp.deprecated}()},38:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",function(){return n})},387:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"receiveUserQuery",function(){return V}),r.d(n,"receiveCurrentUser",function(){return q}),r.d(n,"addEntities",function(){return F}),r.d(n,"receiveEntityRecords",function(){return Y}),r.d(n,"receiveThemeSupports",function(){return B}),r.d(n,"receiveEmbedPreview",function(){return G}),r.d(n,"editEntityRecord",function(){return K}),r.d(n,"undo",function(){return Q}),r.d(n,"redo",function(){return W}),r.d(n,"saveEntityRecord",function(){return H}),r.d(n,"saveEditedEntityRecord",function(){return z}),r.d(n,"receiveUploadPermissions",function(){return X}),r.d(n,"receiveUserPermission",function(){return J}),r.d(n,"receiveAutosaves",function(){return Z});var a={};r.r(a),r.d(a,"isRequestingEmbedPreview",function(){return he}),r.d(a,"getAuthors",function(){return ye}),r.d(a,"getCurrentUser",function(){return be}),r.d(a,"getUserQueryResults",function(){return ge}),r.d(a,"getEntitiesByKind",function(){return me}),r.d(a,"getEntity",function(){return Ee}),r.d(a,"getEntityRecord",function(){return Oe}),r.d(a,"getRawEntityRecord",function(){return we}),r.d(a,"getEntityRecords",function(){return je}),r.d(a,"getEntityRecordEdits",function(){return xe}),r.d(a,"getEntityRecordNonTransientEdits",function(){return Re}),r.d(a,"hasEditsForEntityRecord",function(){return ke}),r.d(a,"getEditedEntityRecord",function(){return _e}),r.d(a,"isAutosavingEntityRecord",function(){return Te}),r.d(a,"isSavingEntityRecord",function(){return Ie}),r.d(a,"getLastEntitySaveError",function(){return Se}),r.d(a,"getUndoEdit",function(){return Pe}),r.d(a,"getRedoEdit",function(){return Ue}),r.d(a,"hasUndo",function(){return Ce}),r.d(a,"hasRedo",function(){return Le}),r.d(a,"getThemeSupports",function(){return Ne}),r.d(a,"getEmbedPreview",function(){return De}),r.d(a,"isPreviewEmbedFallback",function(){return Me}),r.d(a,"hasUploadPermissions",function(){return Ve}),r.d(a,"canUser",function(){return qe}),r.d(a,"getAutosaves",function(){return Fe}),r.d(a,"getAutosave",function(){return Ye}),r.d(a,"hasFetchedAutosaves",function(){return Be}),r.d(a,"getReferenceByDistinctEdits",function(){return Ge});var o={};r.r(o),r.d(o,"getAuthors",function(){return tt}),r.d(o,"getCurrentUser",function(){return rt}),r.d(o,"getEntityRecord",function(){return nt}),r.d(o,"getEntityRecords",function(){return at}),r.d(o,"getThemeSupports",function(){return ot}),r.d(o,"getEmbedPreview",function(){return it}),r.d(o,"hasUploadPermissions",function(){return ut}),r.d(o,"canUser",function(){return ct}),r.d(o,"getAutosaves",function(){return st}),r.d(o,"getAutosave",function(){return ft});var i=r(7),u=r(4),c=r(23),s=r(17),f=r(10),d=r(2),l=r(41),p=r.n(l);var v=function(e){return function(t){return function(r,n){return void 0===r||e(n)?t(r,n):r}}},h=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,a=n[e];if(void 0===a)return r;var o=t(r[a],n);return o===r[a]?r:Object(i.a)({},r,Object(f.a)({},a,o))}}},y=function(e){return function(t){return function(r,n){return t(r,e(n))}}};var b=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 g(e){return{type:"RECEIVE_ITEMS",items:Object(d.castArray)(e)}}var m=r(35),E=r(79),O=r.n(E),w=r(26);var j=b(function(e){for(var t={stableKey:"",page:1,perPage:10},r=Object.keys(e).sort(),n=0;n<r.length;n++){var a=r[n],o=e[a];switch(a){case"page":t[a]=Number(o);break;case"per_page":t.perPage=Number(o);break;default:t.stableKey+=(t.stableKey?"&":"")+Object(w.addQueryArgs)("",Object(f.a)({},a,o)).slice(1)}}return t}),x=new WeakMap;var R=Object(m.a)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=x.get(e);if(r){var n=r.get(t);if(void 0!==n)return n}else r=new O.a,x.set(e,r);var a=function(e,t){var r=j(t),n=r.stableKey,a=r.page,o=r.perPage;if(!e.queries[n])return null;var i=e.queries[n];if(!i)return null;for(var u=-1===o?0:(a-1)*o,c=-1===o?i.length:Math.min(u+o,i.length),s=[],f=u;f<c;f++){var d=i[f];s.push(e.items[d])}return s}(e,t);return r.set(t,a),a}),k=r(20),_=r.n(k),T=r(32),I=r.n(T);function S(e){return{type:"API_FETCH",request:e}}function A(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return{type:"SELECT",selectorName:e,args:r}}function P(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return{type:"RESOLVE_SELECT",selectorName:e,args:r}}var U={API_FETCH:function(e){var t=e.request;return I()(t)},SELECT:Object(u.createRegistryControl)(function(e){return function(t){var r,n=t.selectorName,a=t.args;return(r=e.select("core"))[n].apply(r,Object(s.a)(a))}}),RESOLVE_SELECT:Object(u.createRegistryControl)(function(e){return function(t){var r=t.selectorName,n=t.args;return new Promise(function(t){var a=function(){return e.select("core/data").hasFinishedResolution("core",r,n)},o=function(){return e.select("core")[r].apply(null,n)},i=o();if(a())return t(i);var u=e.subscribe(function(){a()&&(u(),t(o()))})})}})},C=_.a.mark(K),L=_.a.mark(Q),N=_.a.mark(W),D=_.a.mark(H),M=_.a.mark(z);function V(e,t){return{type:"RECEIVE_USER_QUERY",users:Object(d.castArray)(t),queryID:e}}function q(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function F(e){return{type:"ADD_ENTITIES",entities:e}}function Y(e,t,r,n){var a,o=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?Object(i.a)({},e,{title:""}):e})),a=n?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)({},g(e),{query:t})}(r,n):g(r),Object(i.a)({},a,{kind:e,name:t,invalidateCache:o})}function B(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function G(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function K(e,t,r,n){var a,o,u,c,s,f,l,p,v,h=arguments;return _.a.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return a=h.length>4&&void 0!==h[4]?h[4]:{},y.next=3,A("getEntity",e,t);case 3:return o=y.sent,u=o.transientEdits,c=void 0===u?{}:u,s=o.mergedEdits,f=void 0===s?{}:s,y.next=10,A("getRawEntityRecord",e,t,r);case 10:return l=y.sent,y.next=13,A("getEditedEntityRecord",e,t,r);case 13:return p=y.sent,v={kind:e,name:t,recordId:r,edits:Object.keys(n).reduce(function(e,t){var r=l[t],a=p[t],o=f[t]?Object(d.merge)({},a,n[t]):n[t];return e[t]=Object(d.isEqual)(r,o)?void 0:o,e},{}),transientEdits:c},y.abrupt("return",Object(i.a)({type:"EDIT_ENTITY_RECORD"},v,{meta:{undo:!a.undoIgnore&&Object(i.a)({},v,{edits:Object.keys(n).reduce(function(e,t){return e[t]=p[t],e},{})})}}));case 16:case"end":return y.stop()}},C)}function Q(){var e;return _.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A("getUndoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,Object(i.a)({type:"EDIT_ENTITY_RECORD"},e,{meta:{isUndo:!0}});case 7:case"end":return t.stop()}},L)}function W(){var e;return _.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A("getRedoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,Object(i.a)({type:"EDIT_ENTITY_RECORD"},e,{meta:{isRedo:!0}});case 7:case"end":return t.stop()}},N)}function H(e,t,r){var n,a,o,u,c,s,f,l,p,v,h,y,b,g,m,E,O,w=arguments;return _.a.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return n=w.length>3&&void 0!==w[3]?w[3]:{isAutosave:!1},a=n.isAutosave,o=void 0!==a&&a,j.next=3,ce(e);case 3:if(u=j.sent,c=Object(d.find)(u,{kind:e,name:t})){j.next=7;break}return j.abrupt("return");case 7:return s=c.key||re,f=r[s],j.next=11,{type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:f,isAutosave:o};case 11:return j.prev=11,v="".concat(c.baseURL).concat(f?"/"+f:""),j.next=15,A("getRawEntityRecord",e,t,f);case 15:if(h=j.sent,!o){j.next=40;break}return j.next=19,A("getCurrentUser");case 19:return y=j.sent,b=y?y.id:void 0,j.next=23,A("getAutosave",h.type,h.id,b);case 23:return g=j.sent,m=Object(i.a)({},h,g,r),m=Object.keys(m).reduce(function(e,t){return["title","excerpt","content"].includes(t)&&(e[t]=Object(d.get)(m[t],"raw",m[t])),e},{status:"auto-draft"===m.status?"draft":m.status}),j.next=28,S({path:"".concat(v,"/autosaves"),method:"POST",data:m});case 28:if(l=j.sent,h.id!==l.id){j.next=36;break}return E=Object(i.a)({},h,m,l),E=Object.keys(E).reduce(function(e,t){return["title","excerpt","content"].includes(t)?e[t]=Object(d.get)(E[t],"raw",E[t]):e[t]="status"===t?"auto-draft"===h.status&&"draft"===E.status?E.status:h.status:Object(d.get)(h[t],"raw",h[t]),e},{}),j.next=34,Y(e,t,E,void 0,!0);case 34:j.next=38;break;case 36:return j.next=38,Z(h.id,l);case 38:j.next=47;break;case 40:return O=r,"postType"!==e||"auto-draft"!==h.status||O.status||(O=Object(i.a)({},O,{status:"draft"})),j.next=44,S({path:v,method:f?"PUT":"POST",data:O});case 44:return l=j.sent,j.next=47,Y(e,t,l,void 0,!0);case 47:j.next=52;break;case 49:j.prev=49,j.t0=j.catch(11),p=j.t0;case 52:return j.next=54,{type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:f,error:p,isAutosave:o};case 54:return j.abrupt("return",l);case 55:case"end":return j.stop()}},D,null,[[11,49]])}function z(e,t,r,n){var a,o;return _.a.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,A("hasEditsForEntityRecord",e,t,r);case 2:if(u.sent){u.next=4;break}return u.abrupt("return");case 4:return u.next=6,A("getEntityRecordNonTransientEdits",e,t,r);case 6:return a=u.sent,o=Object(i.a)({id:r},a),u.delegateYield(H(e,t,o,n),"t0",9);case 9:case"end":return u.stop()}},M)}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 $=_.a.mark(oe),ee=_.a.mark(ie),te=_.a.mark(ce),re="id",ne=[{name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types"},{name:"media",kind:"root",baseURL:"/wp/v2/media",plural:"mediaItems"},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",plural:"taxonomies"},{name:"widgetArea",kind:"root",baseURL:"/__experimental/widget-areas",plural:"widgetAreas"}],ae=[{name:"postType",loadEntities:oe},{name:"taxonomy",loadEntities:ie}];function oe(){var e;return _.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S({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,transientEdits:{blocks:!0},mergedEdits:{meta:!0}}}));case 4:case"end":return t.stop()}},$)}function ie(){var e;return _.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S({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}}));case 4:case"end":return t.stop()}},ee)}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],a=Object(d.find)(ne,{kind:e,name:t}),o="root"===e?"":Object(d.upperFirst)(Object(d.camelCase)(e)),i=Object(d.upperFirst)(Object(d.camelCase)(t))+(n?"s":""),u=n&&a.plural?Object(d.upperFirst)(Object(d.camelCase)(a.plural)):i;return"".concat(r).concat(o).concat(u)};function ce(e){var t,r;return _.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,A("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,F(t);case 13:return n.abrupt("return",t);case 14:case"end":return n.stop()}},te)}var se=Object(d.flowRight)([v(function(e){return"query"in e}),y(function(e){return e.query?Object(i.a)({},e,j(e.query)):e}),h("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,a=t.perPage,o=t.key,i=void 0===o?re:o;return"RECEIVE_ITEMS"!==r?e:function(e,t,r,n){for(var a=(r-1)*n,o=Math.max(e.length,a+t.length),i=new Array(o),u=0;u<o;u++){var c=u>=a&&u<a+t.length;i[u]=c?t[u-a]:e[u]}return i}(e||[],Object(d.map)(t.items,i),n,a)}),fe=Object(u.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||re;return Object(i.a)({},e,t.items.reduce(function(t,n){var a=n[r];return t[a]=function(e,t){if(!e)return t;var r=!1,n={};for(var a in t)Object(d.isEqual)(e[a],t[a])?n[a]=e[a]:(r=!0,n[a]=t[a]);return r?n:e}(e[a],n),t},{}))}return e},queries:se});var de=[];de.offset=0;var le=Object(u.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 Object(i.a)({},e,Object(f.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:Object(i.a)({},e.byId,Object(d.keyBy)(t.users,"id")),queries:Object(i.a)({},e.queries,Object(f.a)({},t.queryID,Object(d.map)(t.users,function(e){return e.id})))}}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},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 Object(i.a)({},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=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ENTITIES":return[].concat(Object(s.a)(e),Object(s.a)(t.entities))}return e}(e.config,t),n=e.reducer;if(!n||r!==e.config){var a=Object(d.groupBy)(r,"kind");n=Object(u.combineReducers)(Object.entries(a).reduce(function(e,t){var r=Object(c.a)(t,2),n=r[0],a=r[1],o=Object(u.combineReducers)(a.reduce(function(e,t){return Object(i.a)({},e,Object(f.a)({},t.name,function(e){return Object(d.flowRight)([v(function(t){return t.name&&t.kind&&t.name===e.name&&t.kind===e.kind}),y(function(t){return Object(i.a)({},t,{key:e.key||re})})])(Object(u.combineReducers)({queriedData:fe,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=Object(i.a)({},e),n=!0,a=!1,o=void 0;try{for(var u,c=function(){var e=u.value,n=e[t.key],a=r[n];if(!a)return"continue";var o=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(o).length?r[n]=o:delete r[n]},s=t.items[Symbol.iterator]();!(n=(u=s.next()).done);n=!0)c()}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return r;case"EDIT_ENTITY_RECORD":var l=Object(i.a)({},e[t.recordId],t.edits);return Object.keys(l).forEach(function(e){void 0===l[e]&&delete l[e]}),Object(i.a)({},e,Object(f.a)({},t.recordId,l))}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 Object(i.a)({},e,Object(f.a)({},t.recordId,{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}))}return e}}))}(t)))},{}));return e[n]=o,e},{}))}var o=n(e.data,t);return o===e.data&&r===e.config&&n===e.reducer?e:{reducer:n,data:o,config:r}},undo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_ENTITY_RECORD":if(t.meta.isUndo||t.meta.isRedo){var r=Object(s.a)(e);return r.offset=e.offset+(t.meta.isUndo?-1:1),r}if(!t.meta.undo)return e;if(!Object.keys(t.edits).some(function(e){return!t.transientEdits[e]})){var n=Object(s.a)(e);return n.flattenedUndo=Object(i.a)({},e.flattenedUndo,t.edits),n.offset=e.offset,n}var a=e.slice(0,e.offset||void 0);a.offset=0,a.pop(),a.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:Object(i.a)({},e.flattenedUndo,t.meta.undo.edits)});var o=Object.values(t.meta.undo.edits).filter(function(e){return"function"!=typeof e}),u=Object.values(t.edits).filter(function(e){return"function"!=typeof e});return p()(o,u)||a.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:t.edits}),a}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 Object(i.a)({},e,Object(f.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 Object(i.a)({},e,Object(f.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 Object(i.a)({},e,Object(f.a)({},r,n))}return e}}),pe=r(37),ve=r.n(pe),he=Object(u.createRegistrySelector)(function(e){return function(t,r){return e("core/data").isResolving("core","getEmbedPreview",[r])}});function ye(e){return ge(e,"authors")}function be(e){return e.currentUser}var ge=Object(m.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 me(e,t){return Object(d.filter)(e.entities.config,{kind:t})}function Ee(e,t,r){return Object(d.find)(e.entities.config,{kind:t,name:r})}function Oe(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"queriedData","items",n])}var we=Object(m.a)(function(e,t,r,n){var a=Oe(e,t,r,n);return a&&Object.keys(a).reduce(function(e,t){return e[t]=Object(d.get)(a[t],"raw",a[t]),e},{})},function(e){return[e.entities.data]});function je(e,t,r,n){var a=Object(d.get)(e.entities.data,[t,r,"queriedData"]);return a?R(a,n):[]}function xe(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"edits",n])}var Re=Object(m.a)(function(e,t,r,n){var a=Ee(e,t,r).transientEdits,o=void 0===a?{}:a,i=xe(e,t,r,n)||[];return Object.keys(i).reduce(function(e,t){return o[t]||(e[t]=i[t]),e},{})},function(e){return[e.entities.config,e.entities.data]});function ke(e,t,r,n){return Object.keys(Re(e,t,r,n)).length>0}var _e=Object(m.a)(function(e,t,r,n){return Object(i.a)({},we(e,t,r,n),xe(e,t,r,n))},function(e){return[e.entities.data]});function Te(e,t,r,n){var a=Object(d.get)(e.entities.data,[t,r,"saving",n],{}),o=a.pending,i=a.isAutosave;return Boolean(o&&i)}function Ie(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"saving",n,"pending"],!1)}function Se(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"saving",n,"error"])}function Ae(e){return e.undo.offset}function Pe(e){return e.undo[e.undo.length-2+Ae(e)]}function Ue(e){return e.undo[e.undo.length+Ae(e)]}function Ce(e){return Boolean(Pe(e))}function Le(e){return Boolean(Ue(e))}function Ne(e){return e.themeSupports}function De(e,t){return e.embedPreviews[t]}function Me(e,t){var r=e.embedPreviews[t],n='<a href="'+t+'">'+t+"</a>";return!!r&&r.html===n}function Ve(e){return ve()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),Object(d.defaultTo)(qe(e,"create","media"),!0)}function qe(e,t,r,n){var a=Object(d.compact)([t,r,n]).join("/");return Object(d.get)(e,["userPermissions",a])}function Fe(e,t,r){return e.autosaves[r]}function Ye(e,t,r,n){if(void 0!==n){var a=e.autosaves[r];return Object(d.find)(a,{author:n})}}var Be=Object(u.createRegistrySelector)(function(e){return function(t,r,n){return e("core").hasFinishedResolution("getAutosaves",[r,n])}}),Ge=Object(m.a)(function(){return[]},function(e){return[e.undo.length,e.undo.offset]}),Ke=_.a.mark(tt),Qe=_.a.mark(rt),We=_.a.mark(nt),He=_.a.mark(at),ze=_.a.mark(ot),Xe=_.a.mark(it),Je=_.a.mark(ut),Ze=_.a.mark(ct),$e=_.a.mark(st),et=_.a.mark(ft);function tt(){var e;return _.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S({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()}},Ke)}function rt(){var e;return _.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S({path:"/wp/v2/users/me"});case 2:return e=t.sent,t.next=5,q(e);case 5:case"end":return t.stop()}},Qe)}function nt(e,t,r){var n,a,o;return _.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,ce(e);case 2:if(n=i.sent,a=Object(d.find)(n,{kind:e,name:t})){i.next=6;break}return i.abrupt("return");case 6:return i.next=8,S({path:"".concat(a.baseURL,"/").concat(r,"?context=edit")});case 8:return o=i.sent,i.next=11,Y(e,t,o);case 11:case"end":return i.stop()}},We)}function at(e,t){var r,n,a,o,u,c=arguments;return _.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return r=c.length>2&&void 0!==c[2]?c[2]:{},s.next=3,ce(e);case 3:if(n=s.sent,a=Object(d.find)(n,{kind:e,name:t})){s.next=7;break}return s.abrupt("return");case 7:return o=Object(w.addQueryArgs)(a.baseURL,Object(i.a)({},r,{context:"edit"})),s.next=10,S({path:o});case 10:return u=s.sent,s.next=13,Y(e,t,Object.values(u),r);case 13:case"end":return s.stop()}},He)}function ot(){var e;return _.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,B(e[0].theme_supports);case 5:case"end":return t.stop()}},ze)}function it(e){var t;return _.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,S({path:Object(w.addQueryArgs)("/oembed/1.0/proxy",{url:e})});case 3:return t=r.sent,r.next=6,G(e,t);case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,G(e,!1);case 12:case"end":return r.stop()}},Xe,null,[[0,8]])}function ut(){return _.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ve()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),e.delegateYield(ct("create","media"),"t0",2);case 2:case"end":return e.stop()}},Je)}function ct(e,t,r){var n,a,o,i,u,c;return _.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e]){s.next=4;break}throw new Error("'".concat(e,"' is not a valid action."));case 4:return a=r?"/wp/v2/".concat(t,"/").concat(r):"/wp/v2/".concat(t),s.prev=5,s.next=8,S({path:a,method:r?"GET":"OPTIONS",parse:!1});case 8:o=s.sent,s.next=14;break;case 11:return s.prev=11,s.t0=s.catch(5),s.abrupt("return");case 14:return i=Object(d.hasIn)(o,["headers","get"])?o.headers.get("allow"):Object(d.get)(o,["headers","Allow"],""),u=Object(d.compact)([e,t,r]).join("/"),c=Object(d.includes)(i,n),s.next=19,J(u,c);case 19:case"end":return s.stop()}},Ze,null,[[5,11]])}function st(e,t){var r,n,a;return _.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,P("getPostType",e);case 2:return r=o.sent,n=r.rest_base,o.next=6,S({path:"/wp/v2/".concat(n,"/").concat(t,"/autosaves?context=edit")});case 6:if(!(a=o.sent)||!a.length){o.next=10;break}return o.next=10,Z(t,a);case 10:case"end":return o.stop()}},$e)}function ft(e,t){return _.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,P("getAutosaves",e,t);case 2:case"end":return r.stop()}},et)}at.shouldInvalidate=function(e,t,r){return"RECEIVE_ITEMS"===e.type&&e.invalidateCache&&t===e.kind&&r===e.name};var dt=ne.reduce(function(e,t){var r=t.kind,n=t.name;return e[ue(r,n)]=function(e,t){return Oe(e,r,n,t)},e[ue(r,n,"get",!0)]=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return je.apply(a,[e,r,n].concat(o))},e},{}),lt=ne.reduce(function(e,t){var r=t.kind,n=t.name;e[ue(r,n)]=function(e){return nt(r,n,e)};var a=ue(r,n,"get",!0);return e[a]=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return at.apply(o,[r,n].concat(t))},e[a].shouldInvalidate=function(e){for(var t,a=arguments.length,o=new Array(a>1?a-1:0),i=1;i<a;i++)o[i-1]=arguments[i];return(t=at).shouldInvalidate.apply(t,[e,r,n].concat(o))},e},{}),pt=ne.reduce(function(e,t){var r=t.kind,n=t.name;return e[ue(r,n,"save")]=function(e){return H(r,n,e)},e},{});Object(u.registerStore)("core",{reducer:le,controls:U,actions:Object(i.a)({},n,pt),selectors:Object(i.a)({},a,dt),resolvers:Object(i.a)({},o,lt)})},39:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}r.d(t,"a",function(){return n})},4:function(e,t){!function(){e.exports=this.wp.data}()},41:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,r){var n=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,r,n){var a=t&&t.prototype instanceof h?t:h,o=Object.create(a.prototype),i=new _(n||[]);return o._invoke=function(e,t,r){var n=f;return function(a,o){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===a)throw o;return I()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var u=x(i,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var c=s(e,t,r);if("normal"===c.type){if(n=r.done?p:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",l="executing",p="completed",v={};function h(){}function y(){}function b(){}var g={};g[o]=function(){return this};var m=Object.getPrototypeOf,E=m&&m(m(T([])));E&&E!==r&&n.call(E,o)&&(g=E);var O=b.prototype=h.prototype=Object.create(g);function w(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function j(e){var t;this._invoke=function(r,a){function o(){return new Promise(function(t,o){!function t(r,a,o,i){var u=s(e[r],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then(function(e){t("next",e,o,i)},function(e){t("throw",e,o,i)}):Promise.resolve(f).then(function(e){c.value=e,o(c)},function(e){return t("throw",e,o,i)})}i(u.arg)}(r,a,t,o)})}return t=t?t.then(o,o):o()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var a=s(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function T(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:I}}function I(){return{value:t,done:!0}}return y.prototype=O.constructor=b,b.constructor=y,b[u]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}},w(j.prototype),j.prototype[i]=function(){return this},e.AsyncIterator=j,e.async=function(t,r,n,a){var o=new j(c(t,r,n,a));return e.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},w(O),O[u]="Generator",O[o]=function(){return this},O.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return u.type="throw",u.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},7:function(e,t,r){"use strict";r.d(t,"a",function(){return a});var n=r(10);function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){Object(n.a)(e,t,r[t])})}return e}},79: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 a(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 o(e,t){var r=e._map,n=e._arrayTreeMap,a=e._objectTreeMap;if(r.has(t))return r.get(t);for(var o=Object.keys(t).sort(),i=Array.isArray(t)?n:a,u=0;u<o.length;u++){var c=o[u];if(void 0===(i=i.get(c)))return;var s=t[c];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 a=Object.keys(t).sort(),o=[t,r],i=Array.isArray(t)?this._arrayTreeMap:this._objectTreeMap,u=0;u<a.length;u++){var c=a[u];i.has(c)||i.set(c,new e),i=i.get(c);var s=t[c];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",o),this._map.set(t,o),this}},{key:"get",value:function(e){if(null===e||"object"!==n(e))return this._map.get(e);var t=o(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!==o(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(a,o){null!==o&&"object"===n(o)&&(a=a[1]),e.call(r,a,o,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}}])&&a(t.prototype,r),i&&a(t,i),e}();e.exports=i}}); |