Version Description
Download this release
Release Info
Developer | philipmjackson |
Plugin | Full Site Editing |
Version | 3.12738 |
Comparing to | |
See all releases |
Code changes from version 3.12696 to 3.12738
full-site-editing-plugin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
-
* Version: 3.
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
@@ -42,7 +42,7 @@ namespace A8C\FSE;
|
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
-
define( 'A8C_ETK_PLUGIN_VERSION', '3.
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
+
* Version: 3.12738
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
+
define( 'A8C_ETK_PLUGIN_VERSION', '3.12738' );
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic
|
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 5.6
|
6 |
-
Stable tag: 3.
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 5.6
|
6 |
+
Stable tag: 3.12738
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '8d64642c781e7fcb7e01ed1f695ef3f0');
|
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
Copyright (c) 2018 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&e.push(s)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var c in n)r.call(n,c)&&n[c]&&e.push(c);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},3421:function(e,t){"use strict";var n=decodeURIComponent,r=encodeURIComponent,i=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},2699:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,s,u;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=a(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return a(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)r(a,this,t);else{var u=a.length,l=h(a,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return c(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4495:function(e,t,n){"use strict";var r=n(212),i=n(9561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},8032:function(e,t,n){"use strict";var r=n(212),i=n(4495),o=n(713),s=n(9561),c=r.sum32,a=r.sum32_4,u=r.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,p=o.s1_256,h=o.g0_256,v=o.g1_256,m=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(v(n[r-2]),n[r-7],h(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],m=this.h[2],g=this.h[3],b=this.h[4],y=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var C=u(_,p(b),l(b,y,w),this.k[r],n[r]),E=c(d(i),f(i,o,m));_=w,w=y,y=b,b=c(g,C),g=m,m=o,o=i,i=c(C,E)}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],m),this.h[3]=c(this.h[3],g),this.h[4]=c(this.h[4],b),this.h[5]=c(this.h[5],y),this.h[6]=c(this.h[6],w),this.h[7]=c(this.h[7],_)},b.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:function(e,t,n){"use strict";var r=n(212).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?s(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},212:function(e,t,n){"use strict";var r=n(9561),i=n(1285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=a(i.toString(16))}return n},t.zero2=c,t.zero8=a,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var s=new Array(o/4),c=0,a=t;c<s.length;c++,a+=4){var u;u="big"===i?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],s[c]=u>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,s=(o<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,s,c){var a=0,u=t;return a+=(u=u+r>>>0)<t?1:0,a+=(u=u+o>>>0)<o?1:0,e+n+i+s+(a+=(u=u+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,s,c){return t+r+o+c>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,s,c,a,u){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+c>>>0)<c?1:0,e+n+i+s+a+(l+=(f=f+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,s,c,a,u){return t+r+o+c+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},1285:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},9538:function(){},9693:function(){},6914:function(){},7502:function(){},9561:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},1378:function(e){var t=1e3,n=60*t,r=60*n,i=24*r,o=7*i,s=365.25*i;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,a){a=a||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&isFinite(e))return a.long?function(e){var o=Math.abs(e);if(o>=i)return c(e,o,i,"day");if(o>=r)return c(e,o,r,"hour");if(o>=n)return c(e,o,n,"minute");if(o>=t)return c(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6970:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var r={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}},setSidebarClosing:function(e){return{type:"SET_SIDEBAR_CLOSING",isClosing:e}}}},9753:function(e,t,n){"use strict";var r,i,o=n(3258),s=n(3027),c=n(5707),a=n(7649),u=n(1200),l=(n(3804),n(6845)),f=n(3999);void 0!==a.__experimentalMainDashboardButton&&(r="a8c-full-site-editing-nav-sidebar",i={render:function(){var e=(0,c.useDispatch)("core").addEntities;(0,s.useEffect)((function(){e([{baseURL:"/wp/v2/statuses",key:"slug",kind:"root",name:"status",plural:"statuses"}])}),[]);var t=(0,s.useState)((function(){return document.createElement("div")})),n=(0,o.Z)(t,1)[0];(0,s.useEffect)((function(){return document.body.appendChild(n),function(){document.body.removeChild(n)}}));var r=(0,c.useSelect)((function(e){return!!e("core/edit-site")})),i=(0,c.useSelect)((function(e){return e("core/edit-post").isFeatureActive("fullscreenMode")}));return r||!i?null:(0,s.createElement)(a.__experimentalMainDashboardButton,null,(0,s.createElement)(f.Z,null),(0,s.createPortal)((0,s.createElement)(l.Z,null),n))}},(0,u.registerPlugin)(r,i))},9332:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(4530),i=n(3027),o=n(6115),s=n(7997),c=n(5799),a=n(3163),u=n(8270),l=n(791),f=n(1205),d=(n(3804),n(9538),["children"]),__=a.__,p=function(e){var t=e.children,n=(0,r.Z)(e,d);return(0,i.createElement)(s.Button,n,t)};function h(e){var t=e.postType,n=(0,f.get)(t,["labels","add_new_item"],__("Create","full-site-editing")),r=(0,c.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostLabel",n,t.slug),s=(0,l.addQueryArgs)("post-new.php",{post_type:t.slug}),a=(0,c.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostUrl",s,t.slug);return(0,i.createElement)(p,{target:(0,c.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isPrimary:!0,className:"wpcom-block-editor-nav-sidebar-create-page",href:a,icon:u.Z,onClick:function(){(0,o.jN)("calypso_editor_sidebar_item_add",{post_type:t.slug})}},r)}},7358:function(e,t,n){"use strict";var r=n(3027),i=n(6115),o=n(7997),s=n(5799),c=n(3163),a=n(791),u=n(2779),l=n.n(u),_x=(n(3804),n(9693),c._x),f=(0,r.forwardRef)((function(e,t){var n,c,u,f=e.item,d=e.postType,p=e.selected,h=e.statusLabel,v=l()("wpcom-block-editor-nav-item",{"is-selected":p}),m=l()("wpcom-block-editor-nav-item__title",{"is-untitled":!(null!==(n=f.title)&&void 0!==n&&n.raw)}),g=(0,a.addQueryArgs)("post.php",{post:f.id,action:"edit"}),b=(0,s.applyFilters)("a8c.WpcomBlockEditorNavSidebar.editPostUrl",g,f.id,d.slug);return(0,r.createElement)("li",{ref:t},(0,r.createElement)(o.Button,{className:v,href:b,onClick:function(){(0,i.jN)("calypso_editor_sidebar_item_edit",{post_type:d.slug})},target:(0,s.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0)},(0,r.createElement)("div",{className:m,title:null===(c=f.title)||void 0===c?void 0:c.raw},(null===(u=f.title)||void 0===u?void 0:u.raw)||_x("Untitled","post title for posts with no title","full-site-editing")),h&&(0,r.createElement)("div",{className:"wpcom-block-editor-nav-item__label"},h)))}));t.Z=f},6845:function(e,t,n){"use strict";var r=n(1119),i=n(9394),o=n(1766),s=n(3258),c=n(7560),a=n(4530),u=n(3027),l=n(6115),f=n(7997),d=n(1417),p=n(5707),h=n(5799),v=n(1424),m=n(3163),g=n(1100),b=n(3983),y=n(791),w=n(2779),_=n.n(w),C=n(1205),E=(n(3804),n(1765)),x=n(9332),k=n(7358),S=n(8869),O=(n(6914),["children"]),__=m.__,F=(0,u.forwardRef)((function(e,t){var n=e.children,r=(0,a.Z)(e,O);return(0,u.createElement)(f.Button,(0,c.Z)({ref:t},r),n)}));t.Z=(0,d.compose)([f.withConstrainedTabbing])((function(){var e,t,n,c=(0,p.useDispatch)(E.L),a=c.toggleSidebar,d=c.setSidebarClosing,m=(0,p.useSelect)((function(e){var t,n=e("core"),r=n.getPostType,i=n.getSite;return[e(E.L).isSidebarOpened(),e(E.L).isSidebarClosing(),r(e("core/editor").getCurrentPostType()),e("core/editor").getCurrentPostId(),null===(t=i())||void 0===t?void 0:t.title]})),w=(0,s.Z)(m,5),O=w[0],j=w[1],Z=w[2],L=w[3],A=w[4],N=(0,p.useSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,i=t.getCurrentPostType,c=t.getEditedPostAttribute,a=e("core").getEntityRecords("root","status");if(!a)return{current:[],drafts:[],recent:[]};var u=a.filter((function(e){return e.show_in_list})).map((function(e){return e.slug})).join(","),l=r(),f=i(),d=e("core").getEntityRecords("postType",f,{_fields:"id,status,title",exclude:[l].concat((0,o.Z)(E.$)),orderby:"modified",per_page:10,status:u})||[],p={id:l,status:n()?"draft":c("status"),title:{raw:c("title"),rendered:""}},h=(0,C.partition)(d,{status:"draft"}),v=(0,s.Z)(h,2);return{current:[p],drafts:v[0],recent:v[1]}})),P=N.current,M=N.drafts,I=N.recent,T=(0,p.useSelect)((function(e){return(e("core").getEntityRecords("root","status")||[]).reduce((function(e,t){var n=t.name,o=t.slug;return"publish"===o?e:(0,i.Z)((0,i.Z)({},e),{},(0,r.Z)({},o,n))}),{})})),R=(0,u.useRef)(O);(0,u.useLayoutEffect)((function(){!O&&R.current&&d(!0),R.current=O}),[O,R,d]);var B=(0,u.useRef)(null);if((0,u.useEffect)((function(){O||j||!B.current||(B.current.focus(),B.current=null)}),[O,j,B]),!Z)return null;if(!O&&!j)return null;var z=(0,y.addQueryArgs)("edit.php",{post_type:Z.slug}),D=(0,h.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",z),W=(0,C.get)(Z,["labels","all_items"],__("Back","full-site-editing")),U=(0,h.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",W),G=(0,C.get)(Z,["labels","name"]),H=(0,h.applyFilters)("a8c.WpcomBlockEditorNavSidebar.listHeading",G,Z.slug),$="page"===Z.slug?__("Contains links to your dashboard or to edit other pages on your site. Press the Escape key to close.","full-site-editing"):__("Contains links to your dashboard or to edit other posts on your site. Press the Escape key to close.","full-site-editing"),q=function(){O&&!j&&((0,l.jN)("calypso_editor_sidebar_dismiss"),a())};return(0,u.createElement)(f.IsolatedEventContainer,{className:_()("wpcom-block-editor-nav-sidebar-nav-sidebar__click-guard",{"is-fading-out":j}),onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar-nav-sidebar__fade"===e.animationName&&j&&d(!1)},onClick:function(e){e.currentTarget===e.target&&q()},onKeyDown:function(e){e.keyCode===b.ESCAPE&&(e.stopPropagation(),q())}},(0,u.createElement)("div",{"aria-label":__("Block editor sidebar","full-site-editing"),"aria-description":$,className:_()("wpcom-block-editor-nav-sidebar-nav-sidebar__container",{"is-sliding-left":j}),role:"dialog",tabIndex:-1},(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header"},(0,u.createElement)(F,{label:__("Close block editor sidebar","full-site-editing"),showTooltip:!0,ref:function(e){e&&(B.current=document.activeElement,e.focus())},className:_()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-nav-sidebar__dismiss-sidebar-button","has-icon"),onClick:q},(0,u.createElement)(S.Z,null)),(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__site-title"},(0,u.createElement)("h2",null,A?(0,v.decodeEntities)(A):""))),(0,u.createElement)(F,{"aria-description":__("Returns to the dashboard","full-site-editing"),href:D,className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button",icon:g.Z,onClick:function(e){(0,h.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),(0,l.jN)("calypso_editor_sidebar_editor_close"),(0,h.doAction)("a8c.wpcom-block-editor.closeEditor"))}},U),(0,u.createElement)("h2",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-heading"},H),(0,u.createElement)("h3",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-subheading"},__("Currently editing","full-site-editing")),!(0,C.isEmpty)(P)&&(0,u.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},(0,u.createElement)(k.Z,{key:null===(e=P[0])||void 0===e?void 0:e.id,item:P[0],postType:Z,selected:(null===(t=P[0])||void 0===t?void 0:t.id)===L,statusLabel:T[null===(n=P[0])||void 0===n?void 0:n.status]})),(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__post-scroll-area"},!(0,C.isEmpty)(I)&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h3",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-subheading"},__("Recently edited","full-site-editing")),(0,u.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},I.map((function(e){return(0,u.createElement)(k.Z,{key:e.id,item:e,postType:Z,selected:e.id===L,statusLabel:T[e.status]})})))),!(0,C.isEmpty)(M)&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h3",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-subheading"},__("Drafts","full-site-editing")),(0,u.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},M.map((function(e){return(0,u.createElement)(k.Z,{key:e.id,item:e,postType:Z,selected:e.id===L})}))))),(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__bottom-buttons"},(0,u.createElement)(x.Z,{postType:Z}))))}))},8869:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(3027),i=n(5707),o=n(3163),s=n(5869),c=n(1742),__=(n(3804),o.__);function a(){var e=(0,i.useSelect)((function(e){return((0,e("core").getEntityRecord)("root","__unstableBase",void 0)||{}).site_icon_url}),[]);return e?(0,r.createElement)("img",{className:"edit-post-fullscreen-mode-close_site-icon",alt:__("Site Icon","full-site-editing"),src:e}):(0,r.createElement)(s.Z,{size:36,icon:c.Z})}},3999:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(4530),i=n(3027),o=n(6115),s=n(7997),c=n(5707),a=n(3163),u=n(2779),l=n.n(u),f=(n(3804),n(1765)),d=n(8869),p=(n(7502),["children"]),__=a.__,h=function(e){var t=e.children,n=(0,r.Z)(e,p);return(0,i.createElement)(s.Button,n,t)};function v(){var e=(0,c.useDispatch)(f.L).toggleSidebar,t=(0,c.useSelect)((function(e){return e(f.L).isSidebarOpened()}));return(0,i.createElement)(h,{label:__("Block editor sidebar","full-site-editing"),showTooltip:!0,className:l()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-toggle-sidebar-button__button","has-icon",{"is-hidden":t}),onClick:function(){(0,o.jN)("calypso_editor_sidebar_open"),e()},"aria-haspopup":"dialog","aria-expanded":t},(0,i.createElement)(d.Z,null))}},1765:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return i},$:function(){return o}});var i="automattic/block-editor-nav-sidebar",o=((null===(r=window.wpcomBlockEditorNavSidebar)||void 0===r?void 0:r.postIdsToExclude)||[]).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}))},4286:function(e,t,n){"use strict";var r=n(5707),i=n(6970),o=n(1765),s=(0,r.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}},closing:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SIDEBAR_CLOSING":return t.isClosing;default:return e}}});(0,r.registerStore)(o.L,{actions:i.N,reducer:s,selectors:{isSidebarOpened:function(e){return e.opened},isSidebarClosing:function(e){return e.closing}}})},6115:function(e,t,n){"use strict";n.d(t,{jN:function(){return r.jN}});n(1694),n(6209),n(9377);var r=n(9792);n(3722)},9377:function(e,t,n){"use strict";"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}))},9792:function(e,t,n){"use strict";n.d(t,{jN:function(){return d}});var r,i=n(9394),o=n(2699),s=n(4898),c=(n(3421),n(1205)),a=(n(9377),n(6209),n(9358)),u=(n(1694),["a8c_cookie_banner_ok","wcadmin_storeprofiler_create_jetpack_account","wcadmin_storeprofiler_connect_store","wcadmin_storeprofiler_login_jetpack_account","wcadmin_storeprofiler_payment_login","wcadmin_storeprofiler_payment_create_account","calypso_checkout_switch_to_p_24","calypso_checkout_composite_p24_submit_clicked"]);Promise.resolve();function l(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(0,s.ve)("//stats.wp.com/w.js?63");var f=new o.EventEmitter;function d(e,t){if(t=t||{},(0,a.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,c.includes)(u,e)){if(r){var n=r(t);t=(0,i.Z)((0,i.Z)({},t),n)}t=(0,c.omitBy)(t,(function(e){return void 0===e})),(0,a.Z)('Recording event "%s" with actual props %o',e,t),l(["recordEvent",e,t]),f.emit("record-event",e,t)}else(0,a.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},3722:function(e,t,n){"use strict";n(9792)},6209:function(e,t,n){"use strict";n(4)},9358:function(e,t,n){"use strict";var r=n(8049),i=n.n(r);t.Z=i()("calypso:analytics")},1694:function(e,t,n){"use strict";n(9358)},4:function(e,t,n){"use strict";n(8032)},3340:function(e,t,n){"use strict";n.d(t,{hg:function(){return c},lZ:function(){return a},_W:function(){return l},Yt:function(){return f}});var r=n(8049),i=n.n(r)()("lib/load-script/callback-handler"),o=new Map;function s(){return o}function c(e){return s().has(e)}function a(e,t){var n=s();c(e)?(i('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(i('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=s(),r=n.get(e);if(r){var o='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));i(o),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function l(){var e=this.getAttribute("src");i('Handling successful request for "'.concat(e,'"')),u(e),this.onload=null}function f(){var e=this.getAttribute("src");i('Handling failed request for "'.concat(e,'"')),u(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}},5606:function(e,t,n){"use strict";n.d(t,{C:function(){return c},k:function(){return a}});var r=n(8049),i=n.n(r),o=n(3340),s=i()("lib/load-script/dom-operations");function c(e){s('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=o._W,t.onerror=o.Yt,t}function a(e){s("Attaching element to head"),document.head.appendChild(e)}},4898:function(e,t,n){"use strict";n.d(t,{ve:function(){return c}});var r=n(8049),i=n.n(r),o=n(3340),s=n(5606);i()("package/load-script");function c(e,t){if(!(0,o.hg)(e)&&(0,s.k)((0,s.C)(e)),"function"!=typeof t)return new Promise((function(t,n){(0,o.lZ)(e,(function(e){null===e?t():n(e)}))}));(0,o.lZ)(e,t)}},8049:function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(2632)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2632:function(e,t,n){var r=n(5182);e.exports=function(e){function t(e){var n,r,o,s=null;function c(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(c.enabled){var o=c,s=Number(new Date),a=s-(n||s);o.diff=a,o.prev=n,o.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var u=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return"%";u++;var i=t.formatters[n];if("function"==typeof i){var s=r[u];e=i.call(o,s),r.splice(u,1),u--}return e})),t.formatArgs.call(o,r);var l=o.log||t.log;l.apply(o,r)}}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=i,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(c),c}function i(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(o)),r(t.skips.map(o).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},3804:function(e){"use strict";e.exports=window.React},1205:function(e){"use strict";e.exports=window.lodash},7997:function(e){"use strict";e.exports=window.wp.components},1417:function(e){"use strict";e.exports=window.wp.compose},5707:function(e){"use strict";e.exports=window.wp.data},7649:function(e){"use strict";e.exports=window.wp.editPost},3027:function(e){"use strict";e.exports=window.wp.element},5799:function(e){"use strict";e.exports=window.wp.hooks},1424:function(e){"use strict";e.exports=window.wp.htmlEntities},3163:function(e){"use strict";e.exports=window.wp.i18n},3983:function(e){"use strict";e.exports=window.wp.keycodes},1200:function(e){"use strict";e.exports=window.wp.plugins},2418:function(e){"use strict";e.exports=window.wp.primitives},791:function(e){"use strict";e.exports=window.wp.url}},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(9753),n(4286)}(),window.EditingToolkit=r}();
|
3 |
Copyright (c) 2018 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&e.push(s)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var c in n)r.call(n,c)&&n[c]&&e.push(c);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},3421:function(e,t){"use strict";var n=decodeURIComponent,r=encodeURIComponent,i=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},2699:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,s,u;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=a(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return a(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)r(a,this,t);else{var u=a.length,l=h(a,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return c(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4495:function(e,t,n){"use strict";var r=n(212),i=n(9561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},8032:function(e,t,n){"use strict";var r=n(212),i=n(4495),o=n(713),s=n(9561),c=r.sum32,a=r.sum32_4,u=r.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,p=o.s1_256,h=o.g0_256,v=o.g1_256,m=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(b,m),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(v(n[r-2]),n[r-7],h(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],m=this.h[2],g=this.h[3],b=this.h[4],y=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var C=u(_,p(b),l(b,y,w),this.k[r],n[r]),E=c(d(i),f(i,o,m));_=w,w=y,y=b,b=c(g,C),g=m,m=o,o=i,i=c(C,E)}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],m),this.h[3]=c(this.h[3],g),this.h[4]=c(this.h[4],b),this.h[5]=c(this.h[5],y),this.h[6]=c(this.h[6],w),this.h[7]=c(this.h[7],_)},b.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:function(e,t,n){"use strict";var r=n(212).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?s(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},212:function(e,t,n){"use strict";var r=n(9561),i=n(1285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=a(i.toString(16))}return n},t.zero2=c,t.zero8=a,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var s=new Array(o/4),c=0,a=t;c<s.length;c++,a+=4){var u;u="big"===i?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],s[c]=u>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,s=(o<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,s,c){var a=0,u=t;return a+=(u=u+r>>>0)<t?1:0,a+=(u=u+o>>>0)<o?1:0,e+n+i+s+(a+=(u=u+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,s,c){return t+r+o+c>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,s,c,a,u){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+c>>>0)<c?1:0,e+n+i+s+a+(l+=(f=f+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,s,c,a,u){return t+r+o+c+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},1285:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},9538:function(){},9693:function(){},6914:function(){},7502:function(){},9561:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},1378:function(e){var t=1e3,n=60*t,r=60*n,i=24*r,o=7*i,s=365.25*i;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,a){a=a||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&isFinite(e))return a.long?function(e){var o=Math.abs(e);if(o>=i)return c(e,o,i,"day");if(o>=r)return c(e,o,r,"hour");if(o>=n)return c(e,o,n,"minute");if(o>=t)return c(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},6970:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var r={toggleSidebar:function(){return{type:"TOGGLE_SIDEBAR"}},setSidebarClosing:function(e){return{type:"SET_SIDEBAR_CLOSING",isClosing:e}}}},9753:function(e,t,n){"use strict";var r,i,o=n(3258),s=n(3027),c=n(5707),a=n(7649),u=n(1200),l=(n(3804),n(6845)),f=n(3999);void 0!==a.__experimentalMainDashboardButton&&(r="a8c-full-site-editing-nav-sidebar",i={render:function(){var e=(0,c.useDispatch)("core").addEntities;(0,s.useEffect)((function(){e([{baseURL:"/wp/v2/statuses",key:"slug",kind:"root",name:"status",plural:"statuses"}])}),[]);var t=(0,s.useState)((function(){return document.createElement("div")})),n=(0,o.Z)(t,1)[0];(0,s.useEffect)((function(){return document.body.appendChild(n),function(){document.body.removeChild(n)}}));var r=(0,c.useSelect)((function(e){return!!e("core/edit-site")})),i=(0,c.useSelect)((function(e){return e("core/edit-post").isFeatureActive("fullscreenMode")}));return r||!i?null:(0,s.createElement)(a.__experimentalMainDashboardButton,null,(0,s.createElement)(f.Z,null),(0,s.createPortal)((0,s.createElement)(l.Z,null),n))}},(0,u.registerPlugin)(r,i))},9332:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(4530),i=n(3027),o=n(6115),s=n(7997),c=n(5799),a=n(3163),u=n(8270),l=n(791),f=n(1205),d=(n(3804),n(9538),["children"]),__=a.__,p=function(e){var t=e.children,n=(0,r.Z)(e,d);return(0,i.createElement)(s.Button,n,t)};function h(e){var t=e.postType,n=(0,f.get)(t,["labels","add_new_item"],__("Create","full-site-editing")),r=(0,c.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostLabel",n,t.slug),s=(0,l.addQueryArgs)("post-new.php",{post_type:t.slug}),a=(0,c.applyFilters)("a8c.WpcomBlockEditorNavSidebar.createPostUrl",s,t.slug);return(0,i.createElement)(p,{target:(0,c.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0),isPrimary:!0,className:"wpcom-block-editor-nav-sidebar-create-page",href:a,icon:u.Z,onClick:function(){(0,o.jN)("calypso_editor_sidebar_item_add",{post_type:t.slug})}},r)}},7358:function(e,t,n){"use strict";var r=n(3027),i=n(6115),o=n(7997),s=n(5799),c=n(3163),a=n(791),u=n(2779),l=n.n(u),_x=(n(3804),n(9693),c._x),f=(0,r.forwardRef)((function(e,t){var n,c,u,f=e.item,d=e.postType,p=e.selected,h=e.statusLabel,v=l()("wpcom-block-editor-nav-item",{"is-selected":p}),m=l()("wpcom-block-editor-nav-item__title",{"is-untitled":!(null!==(n=f.title)&&void 0!==n&&n.raw)}),g=(0,a.addQueryArgs)("post.php",{post:f.id,action:"edit"}),b=(0,s.applyFilters)("a8c.WpcomBlockEditorNavSidebar.editPostUrl",g,f.id,d.slug);return(0,r.createElement)("li",{ref:t},(0,r.createElement)(o.Button,{className:v,href:b,onClick:function(){(0,i.jN)("calypso_editor_sidebar_item_edit",{post_type:d.slug})},target:(0,s.applyFilters)("a8c.WpcomBlockEditorNavSidebar.linkTarget",void 0)},(0,r.createElement)("div",{className:m,title:null===(c=f.title)||void 0===c?void 0:c.raw},(null===(u=f.title)||void 0===u?void 0:u.raw)||_x("Untitled","post title for posts with no title","full-site-editing")),h&&(0,r.createElement)("div",{className:"wpcom-block-editor-nav-item__label"},h)))}));t.Z=f},6845:function(e,t,n){"use strict";var r=n(1119),i=n(9394),o=n(1766),s=n(3258),c=n(7560),a=n(4530),u=n(3027),l=n(6115),f=n(7997),d=n(1417),p=n(5707),h=n(5799),v=n(1424),m=n(3163),g=n(1100),b=n(3983),y=n(791),w=n(2779),_=n.n(w),C=n(1205),E=(n(3804),n(1765)),x=n(9332),k=n(7358),S=n(8869),O=(n(6914),["children"]),__=m.__,F=(0,u.forwardRef)((function(e,t){var n=e.children,r=(0,a.Z)(e,O);return(0,u.createElement)(f.Button,(0,c.Z)({ref:t},r),n)}));t.Z=(0,d.compose)([f.withConstrainedTabbing])((function(){var e,t,n,c=(0,p.useDispatch)(E.L),a=c.toggleSidebar,d=c.setSidebarClosing,m=(0,p.useSelect)((function(e){var t,n=e("core"),r=n.getPostType,i=n.getSite;return[e(E.L).isSidebarOpened(),e(E.L).isSidebarClosing(),r(e("core/editor").getCurrentPostType()),e("core/editor").getCurrentPostId(),null===(t=i())||void 0===t?void 0:t.title]})),w=(0,s.Z)(m,5),O=w[0],j=w[1],Z=w[2],L=w[3],A=w[4],N=(0,p.useSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,i=t.getCurrentPostType,c=t.getEditedPostAttribute,a=e("core").getEntityRecords("root","status",{context:"edit"});if(!a)return{current:[],drafts:[],recent:[]};var u=a.filter((function(e){return e.show_in_list})).map((function(e){return e.slug})).join(","),l=r(),f=i(),d=e("core").getEntityRecords("postType",f,{_fields:"id,status,title",exclude:[l].concat((0,o.Z)(E.$)),orderby:"modified",per_page:10,status:u})||[],p={id:l,status:n()?"draft":c("status"),title:{raw:c("title"),rendered:""}},h=(0,C.partition)(d,{status:"draft"}),v=(0,s.Z)(h,2);return{current:[p],drafts:v[0],recent:v[1]}})),P=N.current,M=N.drafts,I=N.recent,T=(0,p.useSelect)((function(e){return(e("core").getEntityRecords("root","status")||[]).reduce((function(e,t){var n=t.name,o=t.slug;return"publish"===o?e:(0,i.Z)((0,i.Z)({},e),{},(0,r.Z)({},o,n))}),{})})),R=(0,u.useRef)(O);(0,u.useLayoutEffect)((function(){!O&&R.current&&d(!0),R.current=O}),[O,R,d]);var B=(0,u.useRef)(null);if((0,u.useEffect)((function(){O||j||!B.current||(B.current.focus(),B.current=null)}),[O,j,B]),!Z)return null;if(!O&&!j)return null;var z=(0,y.addQueryArgs)("edit.php",{post_type:Z.slug}),D=(0,h.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeUrl",z),W=(0,C.get)(Z,["labels","all_items"],__("Back","full-site-editing")),U=(0,h.applyFilters)("a8c.WpcomBlockEditorNavSidebar.closeLabel",W),G=(0,C.get)(Z,["labels","name"]),H=(0,h.applyFilters)("a8c.WpcomBlockEditorNavSidebar.listHeading",G,Z.slug),$="page"===Z.slug?__("Contains links to your dashboard or to edit other pages on your site. Press the Escape key to close.","full-site-editing"):__("Contains links to your dashboard or to edit other posts on your site. Press the Escape key to close.","full-site-editing"),q=function(){O&&!j&&((0,l.jN)("calypso_editor_sidebar_dismiss"),a())};return(0,u.createElement)(f.IsolatedEventContainer,{className:_()("wpcom-block-editor-nav-sidebar-nav-sidebar__click-guard",{"is-fading-out":j}),onAnimationEnd:function(e){"wpcom-block-editor-nav-sidebar-nav-sidebar__fade"===e.animationName&&j&&d(!1)},onClick:function(e){e.currentTarget===e.target&&q()},onKeyDown:function(e){e.keyCode===b.ESCAPE&&(e.stopPropagation(),q())}},(0,u.createElement)("div",{"aria-label":__("Block editor sidebar","full-site-editing"),"aria-description":$,className:_()("wpcom-block-editor-nav-sidebar-nav-sidebar__container",{"is-sliding-left":j}),role:"dialog",tabIndex:-1},(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__header"},(0,u.createElement)(F,{label:__("Close block editor sidebar","full-site-editing"),showTooltip:!0,ref:function(e){e&&(B.current=document.activeElement,e.focus())},className:_()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-nav-sidebar__dismiss-sidebar-button","has-icon"),onClick:q},(0,u.createElement)(S.Z,null)),(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__site-title"},(0,u.createElement)("h2",null,A?(0,v.decodeEntities)(A):""))),(0,u.createElement)(F,{"aria-description":__("Returns to the dashboard","full-site-editing"),href:D,className:"wpcom-block-editor-nav-sidebar-nav-sidebar__home-button",icon:g.Z,onClick:function(e){(0,h.hasAction)("a8c.wpcom-block-editor.closeEditor")&&(e.preventDefault(),(0,l.jN)("calypso_editor_sidebar_editor_close"),(0,h.doAction)("a8c.wpcom-block-editor.closeEditor"))}},U),(0,u.createElement)("h2",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-heading"},H),(0,u.createElement)("h3",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-subheading"},__("Currently editing","full-site-editing")),!(0,C.isEmpty)(P)&&(0,u.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},(0,u.createElement)(k.Z,{key:null===(e=P[0])||void 0===e?void 0:e.id,item:P[0],postType:Z,selected:(null===(t=P[0])||void 0===t?void 0:t.id)===L,statusLabel:T[null===(n=P[0])||void 0===n?void 0:n.status]})),(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__post-scroll-area"},!(0,C.isEmpty)(I)&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h3",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-subheading"},__("Recently edited","full-site-editing")),(0,u.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},I.map((function(e){return(0,u.createElement)(k.Z,{key:e.id,item:e,postType:Z,selected:e.id===L,statusLabel:T[e.status]})})))),!(0,C.isEmpty)(M)&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)("h3",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__list-subheading"},__("Drafts","full-site-editing")),(0,u.createElement)("ul",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__page-list"},M.map((function(e){return(0,u.createElement)(k.Z,{key:e.id,item:e,postType:Z,selected:e.id===L})}))))),(0,u.createElement)("div",{className:"wpcom-block-editor-nav-sidebar-nav-sidebar__bottom-buttons"},(0,u.createElement)(x.Z,{postType:Z}))))}))},8869:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(3027),i=n(5707),o=n(3163),s=n(5869),c=n(1742),__=(n(3804),o.__);function a(){var e=(0,i.useSelect)((function(e){return((0,e("core").getEntityRecord)("root","__unstableBase",void 0)||{}).site_icon_url}),[]);return e?(0,r.createElement)("img",{className:"edit-post-fullscreen-mode-close_site-icon",alt:__("Site Icon","full-site-editing"),src:e}):(0,r.createElement)(s.Z,{size:36,icon:c.Z})}},3999:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(4530),i=n(3027),o=n(6115),s=n(7997),c=n(5707),a=n(3163),u=n(2779),l=n.n(u),f=(n(3804),n(1765)),d=n(8869),p=(n(7502),["children"]),__=a.__,h=function(e){var t=e.children,n=(0,r.Z)(e,p);return(0,i.createElement)(s.Button,n,t)};function v(){var e=(0,c.useDispatch)(f.L).toggleSidebar,t=(0,c.useSelect)((function(e){return e(f.L).isSidebarOpened()}));return(0,i.createElement)(h,{label:__("Block editor sidebar","full-site-editing"),showTooltip:!0,className:l()("edit-post-fullscreen-mode-close","wpcom-block-editor-nav-sidebar-toggle-sidebar-button__button","has-icon",{"is-hidden":t}),onClick:function(){(0,o.jN)("calypso_editor_sidebar_open"),e()},"aria-haspopup":"dialog","aria-expanded":t},(0,i.createElement)(d.Z,null))}},1765:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return i},$:function(){return o}});var i="automattic/block-editor-nav-sidebar",o=((null===(r=window.wpcomBlockEditorNavSidebar)||void 0===r?void 0:r.postIdsToExclude)||[]).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}))},4286:function(e,t,n){"use strict";var r=n(5707),i=n(6970),o=n(1765),s=(0,r.combineReducers)({opened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SIDEBAR":return!e;default:return e}},closing:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SIDEBAR_CLOSING":return t.isClosing;default:return e}}});(0,r.registerStore)(o.L,{actions:i.N,reducer:s,selectors:{isSidebarOpened:function(e){return e.opened},isSidebarClosing:function(e){return e.closing}}})},6115:function(e,t,n){"use strict";n.d(t,{jN:function(){return r.jN}});n(1694),n(6209),n(9377);var r=n(9792);n(3722)},9377:function(e,t,n){"use strict";"undefined"!=typeof window&&window.addEventListener("popstate",(function(){null}))},9792:function(e,t,n){"use strict";n.d(t,{jN:function(){return d}});var r,i=n(9394),o=n(2699),s=n(4898),c=(n(3421),n(1205)),a=(n(9377),n(6209),n(9358)),u=(n(1694),["a8c_cookie_banner_ok","wcadmin_storeprofiler_create_jetpack_account","wcadmin_storeprofiler_connect_store","wcadmin_storeprofiler_login_jetpack_account","wcadmin_storeprofiler_payment_login","wcadmin_storeprofiler_payment_create_account","calypso_checkout_switch_to_p_24","calypso_checkout_composite_p24_submit_clicked"]);Promise.resolve();function l(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(0,s.ve)("//stats.wp.com/w.js?63");var f=new o.EventEmitter;function d(e,t){if(t=t||{},(0,a.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,c.includes)(u,e)){if(r){var n=r(t);t=(0,i.Z)((0,i.Z)({},t),n)}t=(0,c.omitBy)(t,(function(e){return void 0===e})),(0,a.Z)('Recording event "%s" with actual props %o',e,t),l(["recordEvent",e,t]),f.emit("record-event",e,t)}else(0,a.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},3722:function(e,t,n){"use strict";n(9792)},6209:function(e,t,n){"use strict";n(4)},9358:function(e,t,n){"use strict";var r=n(8049),i=n.n(r);t.Z=i()("calypso:analytics")},1694:function(e,t,n){"use strict";n(9358)},4:function(e,t,n){"use strict";n(8032)},3340:function(e,t,n){"use strict";n.d(t,{hg:function(){return c},lZ:function(){return a},_W:function(){return l},Yt:function(){return f}});var r=n(8049),i=n.n(r)()("lib/load-script/callback-handler"),o=new Map;function s(){return o}function c(e){return s().has(e)}function a(e,t){var n=s();c(e)?(i('Adding a callback for an existing script from "'.concat(e,'"')),n.get(e).add(t)):(i('Adding a callback for a new script from "'.concat(e,'"')),n.set(e,new Set([t])))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=s(),r=n.get(e);if(r){var o='Executing callbacks for "'.concat(e,'"')+(null===t?" with success":' with error "'.concat(t,'"'));i(o),r.forEach((function(e){"function"==typeof e&&e(t)})),n.delete(e)}}function l(){var e=this.getAttribute("src");i('Handling successful request for "'.concat(e,'"')),u(e),this.onload=null}function f(){var e=this.getAttribute("src");i('Handling failed request for "'.concat(e,'"')),u(e,new Error('Failed to load script "'.concat(e,'"'))),this.onerror=null}},5606:function(e,t,n){"use strict";n.d(t,{C:function(){return c},k:function(){return a}});var r=n(8049),i=n.n(r),o=n(3340),s=i()("lib/load-script/dom-operations");function c(e){s('Creating script element for "'.concat(e,'"'));var t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,t.onload=o._W,t.onerror=o.Yt,t}function a(e){s("Attaching element to head"),document.head.appendChild(e)}},4898:function(e,t,n){"use strict";n.d(t,{ve:function(){return c}});var r=n(8049),i=n.n(r),o=n(3340),s=n(5606);i()("package/load-script");function c(e,t){if(!(0,o.hg)(e)&&(0,s.k)((0,s.C)(e)),"function"!=typeof t)return new Promise((function(t,n){(0,o.lZ)(e,(function(e){null===e?t():n(e)}))}));(0,o.lZ)(e,t)}},8049:function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(2632)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2632:function(e,t,n){var r=n(5182);e.exports=function(e){function t(e){var n,r,o,s=null;function c(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(c.enabled){var o=c,s=Number(new Date),a=s-(n||s);o.diff=a,o.prev=n,o.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var u=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return"%";u++;var i=t.formatters[n];if("function"==typeof i){var s=r[u];e=i.call(o,s),r.splice(u,1),u--}return e})),t.formatArgs.call(o,r);var l=o.log||t.log;l.apply(o,r)}}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=i,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(c),c}function i(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(o)),r(t.skips.map(o).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},3804:function(e){"use strict";e.exports=window.React},1205:function(e){"use strict";e.exports=window.lodash},7997:function(e){"use strict";e.exports=window.wp.components},1417:function(e){"use strict";e.exports=window.wp.compose},5707:function(e){"use strict";e.exports=window.wp.data},7649:function(e){"use strict";e.exports=window.wp.editPost},3027:function(e){"use strict";e.exports=window.wp.element},5799:function(e){"use strict";e.exports=window.wp.hooks},1424:function(e){"use strict";e.exports=window.wp.htmlEntities},3163:function(e){"use strict";e.exports=window.wp.i18n},3983:function(e){"use strict";e.exports=window.wp.keycodes},1200:function(e){"use strict";e.exports=window.wp.plugins},2418:function(e){"use strict";e.exports=window.wp.primitives},791:function(e){"use strict";e.exports=window.wp.url}},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(9753),n(4286)}(),window.EditingToolkit=r}();
|
wpcom-block-editor-nav-sidebar/src/components/nav-sidebar/index.tsx
CHANGED
@@ -298,7 +298,7 @@ function useNavItems(): NavItemRecord {
|
|
298 |
getCurrentPostType,
|
299 |
getEditedPostAttribute,
|
300 |
} = select( 'core/editor' );
|
301 |
-
const statuses = select( 'core' ).getEntityRecords( 'root', 'status' );
|
302 |
|
303 |
if ( ! statuses ) {
|
304 |
return { current: [], drafts: [], recent: [] };
|
298 |
getCurrentPostType,
|
299 |
getEditedPostAttribute,
|
300 |
} = select( 'core/editor' );
|
301 |
+
const statuses = select( 'core' ).getEntityRecords( 'root', 'status', { context: 'edit' } );
|
302 |
|
303 |
if ( ! statuses ) {
|
304 |
return { current: [], drafts: [], recent: [] };
|