Version Description
Download this release
Release Info
Developer | mmtr86 |
Plugin | Full Site Editing |
Version | 3.51037 |
Comparing to | |
See all releases |
Code changes from version 3.51001 to 3.51037
- build_meta.txt +3 -3
- full-site-editing-plugin.php +2 -2
- readme.txt +1 -1
- wpcom-global-styles/dist/wpcom-global-styles-view.asset.php +1 -1
- wpcom-global-styles/dist/wpcom-global-styles-view.css +1 -1
- wpcom-global-styles/dist/wpcom-global-styles-view.js +22 -6
- wpcom-global-styles/dist/wpcom-global-styles-view.min.js +1 -1
- wpcom-global-styles/dist/wpcom-global-styles-view.rtl.css +1 -1
- wpcom-global-styles/index.php +21 -0
- wpcom-global-styles/wpcom-global-styles-view.js +17 -6
- wpcom-global-styles/wpcom-global-styles-view.scss +3 -0
build_meta.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
commit_hash=
|
2 |
-
commit_url=https://github.com/Automattic/wp-calypso/commit/
|
3 |
-
build_number=3.
|
1 |
+
commit_hash=d9456dfc610e1ea205f1763d30bd04eac059f636
|
2 |
+
commit_url=https://github.com/Automattic/wp-calypso/commit/d9456dfc610e1ea205f1763d30bd04eac059f636
|
3 |
+
build_number=3.51037
|
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.51037
|
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.51037' );
|
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: 6.0
|
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: 6.0
|
6 |
+
Stable tag: 3.51037
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
wpcom-global-styles/dist/wpcom-global-styles-view.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'd5136c4949aba15b7e14');
|
wpcom-global-styles/dist/wpcom-global-styles-view.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.launch-bar-global-styles-button{position:relative}.launch-bar-global-styles-popover{position:absolute;width:260px;top:48px;font-size:14px;left:50%;transform:translateX(-50%);background-color:#fff;padding:16px;line-height:20px;color:#24282d;box-shadow:0 3px 10px rgba(0,0,0,.2);font-weight:400;display:flex;flex-direction:column;align-items:center}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button{font-size:14px;margin-top:16px;background:#007cba;min-height:36px;box-sizing:border-box;border-radius:2px;width:100%;justify-content:center}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button:hover{background:#006ba1}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link{margin:20px 0 0;padding:0;min-height:auto;color:#0675c4;font-weight:500;font-size:12px}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link:hover{background:#fff;color:#044b7a}@media screen and (max-width: 460px){.launch-bar-global-styles-button{position:static}.launch-bar-global-styles-popover{width:auto;left:20px;right:20px;transform:none}}
|
1 |
+
.launch-bar-global-styles-button{position:relative}.launch-bar-global-styles-popover{position:absolute;width:260px;top:48px;font-size:14px;left:50%;transform:translateX(-50%);background-color:#fff;padding:16px;line-height:20px;color:#24282d;box-shadow:0 3px 10px rgba(0,0,0,.2);font-weight:400;display:flex;flex-direction:column;align-items:center;box-sizing:border-box}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button{font-size:14px;margin-top:16px;background:#007cba;min-height:36px;box-sizing:border-box;border-radius:2px;width:100%;justify-content:center;height:auto}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button:hover{background:#006ba1}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link{margin:20px 0 0;padding:0;min-height:auto;color:#0675c4;font-weight:500;font-size:12px;height:auto}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link:hover{background:#fff;color:#044b7a}@media screen and (max-width: 460px){.launch-bar-global-styles-button{position:static}.launch-bar-global-styles-popover{width:auto;left:20px;right:20px;transform:none}}
|
wpcom-global-styles/dist/wpcom-global-styles-view.js
CHANGED
@@ -2741,11 +2741,27 @@ function recordEvent(button) {
|
|
2741 |
});
|
2742 |
}
|
2743 |
|
2744 |
-
(
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2749 |
popoverToggle === null || popoverToggle === void 0 ? void 0 : popoverToggle.addEventListener('click', event => {
|
2750 |
event.preventDefault();
|
2751 |
recordEvent('wpcom_global_styles_gating_notice');
|
@@ -2761,7 +2777,7 @@ function recordEvent(button) {
|
|
2761 |
recordEvent('wpcom_global_styles_gating_notice_preview');
|
2762 |
window.location = previewButton.href;
|
2763 |
});
|
2764 |
-
})
|
2765 |
})();
|
2766 |
|
2767 |
window.EditingToolkit = __webpack_exports__;
|
2741 |
});
|
2742 |
}
|
2743 |
|
2744 |
+
document.addEventListener('DOMContentLoaded', () => {
|
2745 |
+
var _launchBarUserData2;
|
2746 |
+
|
2747 |
+
let container;
|
2748 |
+
|
2749 |
+
if ((_launchBarUserData2 = launchBarUserData) !== null && _launchBarUserData2 !== void 0 && _launchBarUserData2.isAtomic) {
|
2750 |
+
const isShadowDOM = !!(document.head.attachShadow || document.head.createShadowRoot);
|
2751 |
+
|
2752 |
+
if (isShadowDOM) {
|
2753 |
+
container = document.querySelector('#wpcom-launch-banner-wrapper').shadowRoot;
|
2754 |
+
} else {
|
2755 |
+
container = document.querySelector('#wpcom-launch-banner-wrapper');
|
2756 |
+
}
|
2757 |
+
} else {
|
2758 |
+
container = document;
|
2759 |
+
}
|
2760 |
+
|
2761 |
+
const popoverToggle = container.querySelector('.launch-bar-global-styles-toggle');
|
2762 |
+
const popover = container.querySelector('.launch-bar-global-styles-popover');
|
2763 |
+
const upgradeButton = container.querySelector('.launch-bar-global-styles-upgrade-button');
|
2764 |
+
const previewButton = container.querySelector('.launch-bar-global-styles-preview-link');
|
2765 |
popoverToggle === null || popoverToggle === void 0 ? void 0 : popoverToggle.addEventListener('click', event => {
|
2766 |
event.preventDefault();
|
2767 |
recordEvent('wpcom_global_styles_gating_notice');
|
2777 |
recordEvent('wpcom_global_styles_gating_notice_preview');
|
2778 |
window.location = previewButton.href;
|
2779 |
});
|
2780 |
+
});
|
2781 |
})();
|
2782 |
|
2783 |
window.EditingToolkit = __webpack_exports__;
|
wpcom-global-styles/dist/wpcom-global-styles-view.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(()=>{var e={421:(e,t)=>{"use strict";var n=decodeURIComponent,r=encodeURIComponent,o=/; */,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},881:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o,s=365.25*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,u){u=u||{};var a=typeof e;if("string"===a&&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 u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===a&&isFinite(e))return u.long?function(e){var i=Math.abs(e);if(i>=o)return c(e,i,o,"day");if(i>=r)return c(e,i,r,"hour");if(i>=n)return c(e,i,n,"minute");if(i>=t)return c(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=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))}},699: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 o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.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 u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function a(e,t,n,r){var o,i,s,a;if(c(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=u(e))>0&&s.length>o&&!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,a=l,console&&console.warn&&console.warn(a)}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},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]: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}(o):p(o,o.length)}function d(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 p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){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 u=i[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var a=u.length,l=p(u,a);for(n=0;n<a;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return a(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return a(this,e,t,!0)},i.prototype.once=function(e,t){return c(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,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(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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 o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);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},i.prototype.listeners=function(e){return h(this,e,!0)},i.prototype.rawListeners=function(e){return h(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},495:(e,t,n)=>{"use strict";var r=n(212),o=n(561);function i(){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=i,i.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 o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.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 o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},32:(e,t,n)=>{"use strict";var r=n(212),o=n(495),i=n(713),s=n(561),c=r.sum32,u=r.sum32_4,a=r.sum32_5,l=i.ch32,f=i.maj32,h=i.s0_256,d=i.s1_256,p=i.g0_256,g=i.g1_256,v=o.BlockHash,m=[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 y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(y,v),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.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]=u(g(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var o=this.h[0],i=this.h[1],v=this.h[2],m=this.h[3],y=this.h[4],C=this.h[5],_=this.h[6],w=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var b=a(w,d(y),l(y,C,_),this.k[r],n[r]),F=c(h(o),f(o,i,v));w=_,_=C,C=y,y=c(m,b),m=v,v=i,i=o,o=c(b,F)}this.h[0]=c(this.h[0],o),this.h[1]=c(this.h[1],i),this.h[2]=c(this.h[2],v),this.h[3]=c(this.h[3],m),this.h[4]=c(this.h[4],y),this.h[5]=c(this.h[5],C),this.h[6]=c(this.h[6],_),this.h[7]=c(this.h[7],w)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:(e,t,n)=>{"use strict";var r=n(212).rotr32;function o(e,t,n){return e&t^~e&n}function i(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?o(t,n,r):1===e||3===e?s(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,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:(e,t,n)=>{"use strict";var r=n(561),o=n(285);function i(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 u(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=o,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),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):i(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),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(o=0;o<e.length;o++)n[o]=0|e[o];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 o=e[r];"little"===t&&(o=s(o)),n+=u(o.toString(16))}return n},t.zero2=c,t.zero8=u,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var s=new Array(i/4),c=0,u=t;c<s.length;c++,u+=4){var a;a="big"===o?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[c]=a>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}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,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,s=(i<r?1:0)+n+o;e[t]=s>>>0,e[t+1]=i},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,o,i,s,c){var u=0,a=t;return u+=(a=a+r>>>0)<t?1:0,u+=(a=a+i>>>0)<i?1:0,e+n+o+s+(u+=(a=a+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,s,c){return t+r+i+c>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,s,c,u,a){var l=0,f=t;return l+=(f=f+r>>>0)<t?1:0,l+=(f=f+i>>>0)<i?1:0,l+=(f=f+c>>>0)<c?1:0,e+n+o+s+u+(l+=(f=f+a>>>0)<a?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,s,c,u,a){return t+r+i+c+a>>>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}},285: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}}},677:()=>{},561: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)}},115:(e,t,n)=>{"use strict";n.d(t,{jN:()=>r.jN});n(694),n(209),n(377);var r=n(792);n(722)},377:(e,t,n)=>{"use strict";let r=null;"undefined"!=typeof window&&window.addEventListener("popstate",(function(){r=null}))},792:(e,t,n)=>{"use strict";n.d(t,{jN:()=>h});var r=n(699),o=n(898),i=(n(421),n(819)),s=(n(377),n(209),n(358));n(694);const c=["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","wpcom_launchbar_button_click"];let u,a=Promise.resolve();function l(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(a=(0,o.ve)("//stats.wp.com/w.js?63"));const f=new r.EventEmitter;function h(e,t){if(t=t||{},(0,s.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,i.includes)(c,e)){if(u){const e=u(t);t={...t,...e}}t=(0,i.omitBy)(t,(e=>void 0===e)),(0,s.Z)('Recording event "%s" with actual props %o',e,t),l(["recordEvent",e,t]),f.emit("record-event",e,t)}else(0,s.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},722:(e,t,n)=>{"use strict";n(792)},209:(e,t,n)=>{"use strict";n(4)},358:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(49);const o=n.n(r)()("calypso:analytics")},694:(e,t,n)=>{"use strict";n(358)},4:(e,t,n)=>{"use strict";n(32)},340:(e,t,n)=>{"use strict";n.d(t,{hg:()=>c,lZ:()=>u,_W:()=>l,Yt:()=>f});var r=n(49);const o=n.n(r)()("lib/load-script/callback-handler"),i=new Map;function s(){return i}function c(e){return s().has(e)}function u(e,t){const n=s();c(e)?(o(`Adding a callback for an existing script from "${e}"`),n.get(e).add(t)):(o(`Adding a callback for a new script from "${e}"`),n.set(e,new Set([t])))}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=s(),r=n.get(e);if(r){o(`Executing callbacks for "${e}"`+(null===t?" with success":` with error "${t}"`)),r.forEach((e=>{"function"==typeof e&&e(t)})),n.delete(e)}}function l(){const e=this.getAttribute("src");o(`Handling successful request for "${e}"`),a(e),this.onload=null}function f(){const e=this.getAttribute("src");o(`Handling failed request for "${e}"`),a(e,new Error(`Failed to load script "${e}"`)),this.onerror=null}},606:(e,t,n)=>{"use strict";n.d(t,{C:()=>c,k:()=>u});var r=n(49),o=n.n(r),i=n(340);const s=o()("lib/load-script/dom-operations");function c(e,t){s(`Creating script element for "${e}"`);const n=document.createElement("script");return n.src=e,n.type="text/javascript",n.onload=i._W,n.onerror=i.Yt,n.async=!0,t&&Object.entries(t).forEach((e=>{let[t,r]=e;return n[t]=r})),n}function u(e){s("Attaching element to head"),document.head.appendChild(e)}},898:(e,t,n)=>{"use strict";n.d(t,{ve:()=>c});var r=n(49),o=n.n(r),i=n(340),s=n(606);o()("package/load-script");function c(e,t,n){if(!(0,i.hg)(e)&&(0,s.k)((0,s.C)(e,n)),"function"!=typeof t)return new Promise(((t,n)=>{(0,i.lZ)(e,(e=>{null===e?t():n(e)}))}));(0,i.lZ)(e,t)}},49:(e,t,n)=>{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;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let 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=(()=>{let e=!1;return()=>{e||(e=!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||(()=>{}),e.exports=n(632)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},632:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,s=null;function c(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(!c.enabled)return;const i=c,s=Number(new Date),u=s-(n||s);i.diff=u,i.prev=n,i.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((e,n)=>{if("%%"===e)return"%";a++;const o=t.formatters[n];if("function"==typeof o){const t=r[a];e=o.call(i,t),r.splice(a,1),a--}return e})),t.formatArgs.call(i,r);const l=i.log||t.log;l.apply(i,r)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=r,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(c),c}function r(e,n){const 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(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let 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(881),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((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},819:e=>{"use strict";e.exports=window.lodash}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r);var e=n(115);n(677);function t(t){var n;(0,e.jN)("wpcom_launchbar_button_click",{button:t,blog_id:null===(n=launchBarUserData)||void 0===n?void 0:n.blogId})}!function(){const e=document.querySelector(".launch-bar-global-styles-toggle"),n=document.querySelector(".launch-bar-global-styles-popover"),r=document.querySelector(".launch-bar-global-styles-upgrade-button"),o=document.querySelector(".launch-bar-global-styles-preview-link");null==e||e.addEventListener("click",(e=>{e.preventDefault(),t("wpcom_global_styles_gating_notice"),null==n||n.classList.toggle("hidden")})),null==r||r.addEventListener("click",(e=>{e.preventDefault(),t("wpcom_global_styles_gating_notice_upgrade"),window.location=r.href})),null==o||o.addEventListener("click",(e=>{e.preventDefault(),t("wpcom_global_styles_gating_notice_preview"),window.location=o.href}))}()})(),window.EditingToolkit=r})();
|
2 |
//# sourceMappingURL=wpcom-global-styles-view.min.js.map
|
1 |
+
(()=>{var e={421:(e,t)=>{"use strict";var n=decodeURIComponent,r=encodeURIComponent,o=/; */,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},881:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o,s=365.25*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,u){u=u||{};var a=typeof e;if("string"===a&&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 u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===a&&isFinite(e))return u.long?function(e){var i=Math.abs(e);if(i>=o)return c(e,i,o,"day");if(i>=r)return c(e,i,r,"hour");if(i>=n)return c(e,i,n,"minute");if(i>=t)return c(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=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))}},699: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 o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.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 u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function a(e,t,n,r){var o,i,s,a;if(c(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=u(e))>0&&s.length>o&&!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,a=l,console&&console.warn&&console.warn(a)}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 h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]: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}(o):p(o,o.length)}function d(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 p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){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 u=i[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var a=u.length,l=p(u,a);for(n=0;n<a;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return a(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return a(this,e,t,!0)},i.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,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(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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 o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);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},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},495:(e,t,n)=>{"use strict";var r=n(212),o=n(561);function i(){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=i,i.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 o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.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 o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},32:(e,t,n)=>{"use strict";var r=n(212),o=n(495),i=n(713),s=n(561),c=r.sum32,u=r.sum32_4,a=r.sum32_5,l=i.ch32,h=i.maj32,f=i.s0_256,d=i.s1_256,p=i.g0_256,g=i.g1_256,v=o.BlockHash,m=[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 y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(y,v),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.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]=u(g(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var o=this.h[0],i=this.h[1],v=this.h[2],m=this.h[3],y=this.h[4],C=this.h[5],_=this.h[6],w=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var b=a(w,d(y),l(y,C,_),this.k[r],n[r]),F=c(f(o),h(o,i,v));w=_,_=C,C=y,y=c(m,b),m=v,v=i,i=o,o=c(b,F)}this.h[0]=c(this.h[0],o),this.h[1]=c(this.h[1],i),this.h[2]=c(this.h[2],v),this.h[3]=c(this.h[3],m),this.h[4]=c(this.h[4],y),this.h[5]=c(this.h[5],C),this.h[6]=c(this.h[6],_),this.h[7]=c(this.h[7],w)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:(e,t,n)=>{"use strict";var r=n(212).rotr32;function o(e,t,n){return e&t^~e&n}function i(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?o(t,n,r):1===e||3===e?s(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,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:(e,t,n)=>{"use strict";var r=n(561),o=n(285);function i(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 u(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=o,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),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):i(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),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(o=0;o<e.length;o++)n[o]=0|e[o];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 o=e[r];"little"===t&&(o=s(o)),n+=u(o.toString(16))}return n},t.zero2=c,t.zero8=u,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var s=new Array(i/4),c=0,u=t;c<s.length;c++,u+=4){var a;a="big"===o?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[c]=a>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}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,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,s=(i<r?1:0)+n+o;e[t]=s>>>0,e[t+1]=i},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,o,i,s,c){var u=0,a=t;return u+=(a=a+r>>>0)<t?1:0,u+=(a=a+i>>>0)<i?1:0,e+n+o+s+(u+=(a=a+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,s,c){return t+r+i+c>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,s,c,u,a){var l=0,h=t;return l+=(h=h+r>>>0)<t?1:0,l+=(h=h+i>>>0)<i?1:0,l+=(h=h+c>>>0)<c?1:0,e+n+o+s+u+(l+=(h=h+a>>>0)<a?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,s,c,u,a){return t+r+i+c+a>>>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}},285: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}}},677:()=>{},561: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)}},115:(e,t,n)=>{"use strict";n.d(t,{jN:()=>r.jN});n(694),n(209),n(377);var r=n(792);n(722)},377:(e,t,n)=>{"use strict";let r=null;"undefined"!=typeof window&&window.addEventListener("popstate",(function(){r=null}))},792:(e,t,n)=>{"use strict";n.d(t,{jN:()=>f});var r=n(699),o=n(898),i=(n(421),n(819)),s=(n(377),n(209),n(358));n(694);const c=["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","wpcom_launchbar_button_click"];let u,a=Promise.resolve();function l(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(a=(0,o.ve)("//stats.wp.com/w.js?63"));const h=new r.EventEmitter;function f(e,t){if(t=t||{},(0,s.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,i.includes)(c,e)){if(u){const e=u(t);t={...t,...e}}t=(0,i.omitBy)(t,(e=>void 0===e)),(0,s.Z)('Recording event "%s" with actual props %o',e,t),l(["recordEvent",e,t]),h.emit("record-event",e,t)}else(0,s.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},722:(e,t,n)=>{"use strict";n(792)},209:(e,t,n)=>{"use strict";n(4)},358:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(49);const o=n.n(r)()("calypso:analytics")},694:(e,t,n)=>{"use strict";n(358)},4:(e,t,n)=>{"use strict";n(32)},340:(e,t,n)=>{"use strict";n.d(t,{hg:()=>c,lZ:()=>u,_W:()=>l,Yt:()=>h});var r=n(49);const o=n.n(r)()("lib/load-script/callback-handler"),i=new Map;function s(){return i}function c(e){return s().has(e)}function u(e,t){const n=s();c(e)?(o(`Adding a callback for an existing script from "${e}"`),n.get(e).add(t)):(o(`Adding a callback for a new script from "${e}"`),n.set(e,new Set([t])))}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=s(),r=n.get(e);if(r){o(`Executing callbacks for "${e}"`+(null===t?" with success":` with error "${t}"`)),r.forEach((e=>{"function"==typeof e&&e(t)})),n.delete(e)}}function l(){const e=this.getAttribute("src");o(`Handling successful request for "${e}"`),a(e),this.onload=null}function h(){const e=this.getAttribute("src");o(`Handling failed request for "${e}"`),a(e,new Error(`Failed to load script "${e}"`)),this.onerror=null}},606:(e,t,n)=>{"use strict";n.d(t,{C:()=>c,k:()=>u});var r=n(49),o=n.n(r),i=n(340);const s=o()("lib/load-script/dom-operations");function c(e,t){s(`Creating script element for "${e}"`);const n=document.createElement("script");return n.src=e,n.type="text/javascript",n.onload=i._W,n.onerror=i.Yt,n.async=!0,t&&Object.entries(t).forEach((e=>{let[t,r]=e;return n[t]=r})),n}function u(e){s("Attaching element to head"),document.head.appendChild(e)}},898:(e,t,n)=>{"use strict";n.d(t,{ve:()=>c});var r=n(49),o=n.n(r),i=n(340),s=n(606);o()("package/load-script");function c(e,t,n){if(!(0,i.hg)(e)&&(0,s.k)((0,s.C)(e,n)),"function"!=typeof t)return new Promise(((t,n)=>{(0,i.lZ)(e,(e=>{null===e?t():n(e)}))}));(0,i.lZ)(e,t)}},49:(e,t,n)=>{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;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let 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=(()=>{let e=!1;return()=>{e||(e=!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||(()=>{}),e.exports=n(632)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},632:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,s=null;function c(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(!c.enabled)return;const i=c,s=Number(new Date),u=s-(n||s);i.diff=u,i.prev=n,i.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((e,n)=>{if("%%"===e)return"%";a++;const o=t.formatters[n];if("function"==typeof o){const t=r[a];e=o.call(i,t),r.splice(a,1),a--}return e})),t.formatArgs.call(i,r);const l=i.log||t.log;l.apply(i,r)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=r,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(c),c}function r(e,n){const 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(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let 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(881),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((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},819:e=>{"use strict";e.exports=window.lodash}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r);var e=n(115);n(677);function t(t){var n;(0,e.jN)("wpcom_launchbar_button_click",{button:t,blog_id:null===(n=launchBarUserData)||void 0===n?void 0:n.blogId})}document.addEventListener("DOMContentLoaded",(()=>{var e;let n;if(null!==(e=launchBarUserData)&&void 0!==e&&e.isAtomic){n=!(!document.head.attachShadow&&!document.head.createShadowRoot)?document.querySelector("#wpcom-launch-banner-wrapper").shadowRoot:document.querySelector("#wpcom-launch-banner-wrapper")}else n=document;const r=n.querySelector(".launch-bar-global-styles-toggle"),o=n.querySelector(".launch-bar-global-styles-popover"),i=n.querySelector(".launch-bar-global-styles-upgrade-button"),s=n.querySelector(".launch-bar-global-styles-preview-link");null==r||r.addEventListener("click",(e=>{e.preventDefault(),t("wpcom_global_styles_gating_notice"),null==o||o.classList.toggle("hidden")})),null==i||i.addEventListener("click",(e=>{e.preventDefault(),t("wpcom_global_styles_gating_notice_upgrade"),window.location=i.href})),null==s||s.addEventListener("click",(e=>{e.preventDefault(),t("wpcom_global_styles_gating_notice_preview"),window.location=s.href}))}))})(),window.EditingToolkit=r})();
|
2 |
//# sourceMappingURL=wpcom-global-styles-view.min.js.map
|
wpcom-global-styles/dist/wpcom-global-styles-view.rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.launch-bar-global-styles-button{position:relative}.launch-bar-global-styles-popover{align-items:center;background-color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.2);color:#24282d;display:flex;flex-direction:column;font-size:14px;font-weight:400;line-height:20px;padding:16px;position:absolute;right:50%;top:48px;transform:translateX(50%);width:260px}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button{background:#007cba;border-radius:2px;box-sizing:border-box;font-size:14px;justify-content:center;margin-top:16px;min-height:36px;width:100%}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button:hover{background:#006ba1}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link{color:#0675c4;font-size:12px;font-weight:500;margin:20px 0 0;min-height:auto;padding:0}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link:hover{background:#fff;color:#044b7a}@media screen and (max-width:460px){.launch-bar-global-styles-button{position:static}.launch-bar-global-styles-popover{left:20px;right:20px;transform:none;width:auto}}
|
1 |
+
.launch-bar-global-styles-button{position:relative}.launch-bar-global-styles-popover{align-items:center;background-color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.2);box-sizing:border-box;color:#24282d;display:flex;flex-direction:column;font-size:14px;font-weight:400;line-height:20px;padding:16px;position:absolute;right:50%;top:48px;transform:translateX(50%);width:260px}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button{background:#007cba;border-radius:2px;box-sizing:border-box;font-size:14px;height:auto;justify-content:center;margin-top:16px;min-height:36px;width:100%}.launch-bar-global-styles-popover .launch-bar-global-styles-upgrade-button:hover{background:#006ba1}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link{color:#0675c4;font-size:12px;font-weight:500;height:auto;margin:20px 0 0;min-height:auto;padding:0}.launch-bar-global-styles-popover .launch-bar-global-styles-preview-link:hover{background:#fff;color:#044b7a}@media screen and (max-width:460px){.launch-bar-global-styles-button{position:static}.launch-bar-global-styles-popover{left:20px;right:20px;transform:none;width:auto}}
|
wpcom-global-styles/index.php
CHANGED
@@ -278,6 +278,27 @@ function wpcom_display_global_styles_launch_bar( $bar_controls ) {
|
|
278 |
|
279 |
ob_start(); ?>
|
280 |
<div class="launch-bar-global-styles-button">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
<div class="launch-bar-global-styles-popover hidden">
|
282 |
<div>
|
283 |
<?php echo esc_html__( 'Your site contains customized styles that will only be visible once you upgrade to a Premium plan.', 'full-site-editing' ); ?>
|
278 |
|
279 |
ob_start(); ?>
|
280 |
<div class="launch-bar-global-styles-button">
|
281 |
+
<?php if ( defined( 'IS_ATOMIC' ) && IS_ATOMIC ) : // Workaround for the shadow DOM used on Atomic sites. ?>
|
282 |
+
<style id="wpcom-launch-bar-global-styles-button-style">
|
283 |
+
<?php include __DIR__ . '/dist/wpcom-global-styles-view.css'; ?>
|
284 |
+
.hidden { display: none; }
|
285 |
+
</style>
|
286 |
+
<script id="wpcom-launch-bar-global-styles-button-script">
|
287 |
+
<?php
|
288 |
+
include __DIR__ . '/dist/wpcom-global-styles-view.min.js';
|
289 |
+
$asset_file = plugin_dir_path( __FILE__ ) . 'dist/wpcom-global-styles-view.asset.php';
|
290 |
+
$asset = file_exists( $asset_file ) ? require $asset_file : null;
|
291 |
+
$dependencies = $asset['dependencies'] ?? array();
|
292 |
+
foreach ( $dependencies as $dep ) {
|
293 |
+
$dep_script = wp_scripts()->registered[ $dep ];
|
294 |
+
if ( ! $dep_script ) {
|
295 |
+
continue;
|
296 |
+
}
|
297 |
+
include ABSPATH . $dep_script->src;
|
298 |
+
}
|
299 |
+
?>
|
300 |
+
</script>
|
301 |
+
<?php endif; ?>
|
302 |
<div class="launch-bar-global-styles-popover hidden">
|
303 |
<div>
|
304 |
<?php echo esc_html__( 'Your site contains customized styles that will only be visible once you upgrade to a Premium plan.', 'full-site-editing' ); ?>
|
wpcom-global-styles/wpcom-global-styles-view.js
CHANGED
@@ -9,11 +9,22 @@ function recordEvent( button ) {
|
|
9 |
} );
|
10 |
}
|
11 |
|
12 |
-
(
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
popoverToggle?.addEventListener( 'click', ( event ) => {
|
19 |
event.preventDefault();
|
@@ -32,4 +43,4 @@ function recordEvent( button ) {
|
|
32 |
recordEvent( 'wpcom_global_styles_gating_notice_preview' );
|
33 |
window.location = previewButton.href;
|
34 |
} );
|
35 |
-
} )
|
9 |
} );
|
10 |
}
|
11 |
|
12 |
+
document.addEventListener( 'DOMContentLoaded', () => {
|
13 |
+
let container;
|
14 |
+
if ( launchBarUserData?.isAtomic ) {
|
15 |
+
const isShadowDOM = !! ( document.head.attachShadow || document.head.createShadowRoot );
|
16 |
+
if ( isShadowDOM ) {
|
17 |
+
container = document.querySelector( '#wpcom-launch-banner-wrapper' ).shadowRoot;
|
18 |
+
} else {
|
19 |
+
container = document.querySelector( '#wpcom-launch-banner-wrapper' );
|
20 |
+
}
|
21 |
+
} else {
|
22 |
+
container = document;
|
23 |
+
}
|
24 |
+
const popoverToggle = container.querySelector( '.launch-bar-global-styles-toggle' );
|
25 |
+
const popover = container.querySelector( '.launch-bar-global-styles-popover' );
|
26 |
+
const upgradeButton = container.querySelector( '.launch-bar-global-styles-upgrade-button' );
|
27 |
+
const previewButton = container.querySelector( '.launch-bar-global-styles-preview-link' );
|
28 |
|
29 |
popoverToggle?.addEventListener( 'click', ( event ) => {
|
30 |
event.preventDefault();
|
43 |
recordEvent( 'wpcom_global_styles_gating_notice_preview' );
|
44 |
window.location = previewButton.href;
|
45 |
} );
|
46 |
+
} );
|
wpcom-global-styles/wpcom-global-styles-view.scss
CHANGED
@@ -20,6 +20,7 @@
|
|
20 |
display: flex;
|
21 |
flex-direction: column;
|
22 |
align-items: center;
|
|
|
23 |
|
24 |
.launch-bar-global-styles-upgrade-button {
|
25 |
font-size: 14px;
|
@@ -30,6 +31,7 @@
|
|
30 |
border-radius: 2px;
|
31 |
width: 100%;
|
32 |
justify-content: center;
|
|
|
33 |
|
34 |
&:hover {
|
35 |
background: #006ba1;
|
@@ -43,6 +45,7 @@
|
|
43 |
color: #0675c4;
|
44 |
font-weight: 500;
|
45 |
font-size: 12px;
|
|
|
46 |
|
47 |
&:hover {
|
48 |
background: #fff;
|
20 |
display: flex;
|
21 |
flex-direction: column;
|
22 |
align-items: center;
|
23 |
+
box-sizing: border-box;
|
24 |
|
25 |
.launch-bar-global-styles-upgrade-button {
|
26 |
font-size: 14px;
|
31 |
border-radius: 2px;
|
32 |
width: 100%;
|
33 |
justify-content: center;
|
34 |
+
height: auto;
|
35 |
|
36 |
&:hover {
|
37 |
background: #006ba1;
|
45 |
color: #0675c4;
|
46 |
font-weight: 500;
|
47 |
font-size: 12px;
|
48 |
+
height: auto;
|
49 |
|
50 |
&:hover {
|
51 |
background: #fff;
|