initial
This commit is contained in:
commit
9883323161
17470 files changed
+4470592
No files matched your search
+43
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Main entry point for auto-generated asset registration.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
// Load script module registration.
|
||||
$modules_file = __DIR__ . '/modules.php';
|
||||
if ( file_exists( $modules_file ) ) {
|
||||
require_once $modules_file;
|
||||
}
|
||||
|
||||
// Load script registration.
|
||||
$scripts_file = __DIR__ . '/scripts.php';
|
||||
if ( file_exists( $scripts_file ) ) {
|
||||
require_once $scripts_file;
|
||||
}
|
||||
|
||||
// Load style registration.
|
||||
$styles_file = __DIR__ . '/styles.php';
|
||||
if ( file_exists( $styles_file ) ) {
|
||||
require_once $styles_file;
|
||||
}
|
||||
|
||||
// Load routes registration.
|
||||
$routes_file = __DIR__ . '/routes.php';
|
||||
if ( file_exists( $routes_file ) ) {
|
||||
require_once $routes_file;
|
||||
}
|
||||
|
||||
// Load widgets registration.
|
||||
$widgets_file = __DIR__ . '/widgets.php';
|
||||
if ( file_exists( $widgets_file ) ) {
|
||||
require_once $widgets_file;
|
||||
}
|
||||
|
||||
// Load pages registration.
|
||||
$pages_file = __DIR__ . '/pages.php';
|
||||
if ( file_exists( $pages_file ) ) {
|
||||
require_once $pages_file;
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin constants - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* Returns an array of constants for use in other templates.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
return array(
|
||||
'version' => '0.11.1',
|
||||
'build_url' => plugin_dir_url( __FILE__ ),
|
||||
);
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<svg width="380" height="183" viewBox="0 0 380 183" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.75" filter="url(#filter0_f_5953_11924)">
|
||||
<path d="M360 -60C360 7.93102 304.931 63 237 63C169.069 63 114 7.93102 114 -60C114 -127.931 169.069 -183 237 -183C304.931 -183 360 -127.931 360 -60Z" fill="url(#paint0_linear_5953_11924)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_f_5953_11924" x="-6" y="-303" width="486" height="486" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feGaussianBlur stdDeviation="60" result="effect1_foregroundBlur_5953_11924"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_5953_11924" x1="360" y1="-60" x2="114" y2="-60" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#48FF50"/>
|
||||
<stop offset="0.471846" stop-color="#108642"/>
|
||||
<stop offset="1" stop-color="#2E38FA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 990 B |
+63
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Script module registration - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
/**
|
||||
* Register all script modules.
|
||||
*/
|
||||
function jetpack_newsletter_register_script_modules() {
|
||||
// Ensure this only runs once. wp_default_scripts can fire multiple times,
|
||||
// and each wp_deregister_script_module() call also dequeues the module.
|
||||
// If a module was enqueued between calls, repeated deregister/register
|
||||
// cycles would lose the enqueue state.
|
||||
static $already_registered = false;
|
||||
if ( $already_registered ) {
|
||||
return;
|
||||
}
|
||||
$already_registered = true;
|
||||
|
||||
// Load build constants
|
||||
$constants_file = __DIR__ . '/constants.php';
|
||||
if ( ! file_exists( $constants_file ) ) {
|
||||
return;
|
||||
}
|
||||
$build_constants = require $constants_file;
|
||||
$modules_dir = __DIR__ . '/modules';
|
||||
$modules_file = $modules_dir . '/registry.php';
|
||||
|
||||
if ( ! file_exists( $modules_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$modules = require $modules_file;
|
||||
$base_url = $build_constants['build_url'] . 'modules/';
|
||||
|
||||
foreach ( $modules as $module ) {
|
||||
// WASM-only modules (e.g., vips worker) only have .min.js; use it even when SCRIPT_DEBUG is `true`.
|
||||
$extension = '.min.js';
|
||||
|
||||
$asset_path = $modules_dir . '/' . $module['asset'];
|
||||
$asset = file_exists( $asset_path ) ? require $asset_path : array();
|
||||
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $module['id'] );
|
||||
|
||||
wp_register_script_module(
|
||||
$module['id'],
|
||||
$base_url . $module['path'] . $extension,
|
||||
$asset['module_dependencies'] ?? array(),
|
||||
$asset['version'] ?? false,
|
||||
array(
|
||||
'fetchpriority' => 'low',
|
||||
'in_footer' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_default_scripts', 'jetpack_newsletter_register_script_modules' );
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/lazy-editor', 'import' => 'dynamic'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '188faf6c64fdd1b4');
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Script module registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
return array(
|
||||
|
||||
);
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => 'ffce2c4026fe2ea03c4f');
|
||||
+1
@@ -0,0 +1 @@
|
||||
.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-end:0;inset-block-start:auto;inset-inline:0;position:fixed;z-index:100001}@media(min-width:600px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:4rem;inset-inline:unset;inset-inline-end:1rem;width:auto}}@media(min-width:782px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:3rem}}.jetpack-footer{border-top:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);box-sizing:border-box;font-size:var(--wpds-typography-font-size-md,13px);padding:var(--wpds-dimension-padding-xl) var(--wpds-dimension-padding-2xl);width:100%}.jetpack-footer :is(.jetpack-footer__menu-item:any-link,.jetpack-footer__menu-item[role=button]){color:var(--wpds-color-fg-interactive-neutral-weak);cursor:pointer;text-decoration:none}.jetpack-footer .jetpack-footer__menu-item:hover{text-decoration:underline}.jetpack-footer>ul{list-style:none;margin:0;padding:0}.jetpack-footer>ul>li{margin:0}.jetpack-footer__logo{flex-shrink:0}@media(min-width:480px){a.jetpack-footer__a8c{margin-inline-start:auto}}a.jetpack-footer__a8c svg{fill:var(--wpds-color-fg-interactive-neutral-weak)}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1040px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));max-width:calc(var(--max-container-width) + 32px);padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));max-width:calc(var(--max-container-width) + 36px);padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));max-width:calc(var(--max-container-width) + 48px);padding:0 2Line truncated
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
(()=>{var e,t,n={3764(e){"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=r(e[t],n)}),a(t).forEach(function(a){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(o(e,a)&&n.isMergeableObject(t[a])?i[a]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(a,n)(e[a],t[a],n):i[a]=r(t[a],n))}),i}function l(e,n,a){(a=a||{}).arrayMerge=a.arrayMerge||i,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=r;var o=Array.isArray(n);return o===Array.isArray(e)?o?a.arrayMerge(e,n,a):s(e,n,a):r(n,a)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})};var d=l;e.exports=d},4168(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!==i--;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},8796(e,t,n){"use strict";n.d(t,{A:()=>r});const r={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj","without-bottom-border":"zWDcRnnZPA743KzSQdUg","admin-page-header":"iWGAhN9gOB48g0jEO1OQ","admin-page-footer":"N7JAnsuu_FtPrtDg8bVw","sandbox-domain-badge":"JOYmuxQjG4FArIIUxJfA"}},1837(e,t,n){"use strict";n.d(t,{A:()=>r});const r={"global-notices":"jT9Kt2ZTvxPKDQ1pa7sN"}},8749(){},8782(e,t,n){"use strict";n.d(t,{A:()=>r});const r={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",smcols:"4",mdcols:"8",lgcols:"12","col-sm-1":"RuVLl3q4lxTQa3wbhBJB","col-sm-1-start":"f9LZTRG4MMK42rS89afW","col-sm-1-end":"bHe_zKxjjpUwHw_MdYE1","col-sm-2":"QZbNrOqE2aNSn50xVhpU","col-sm-2-start":"ev7W3z7zVYPeHAlYqZjf","col-sm-2-end":"NJWd1m_e7lOiPYru2ZMP","col-sm-3":"Xc6nt1Qc1DI0Z2A3gt1r","col-sm-3-start":"UIcN_GXiPRoIsin8Kohg","col-sm-3-end":"GRKCyqb5LufCSCgykKFc","col-sm-4":"i_qTq8gqhhC3vIUepVRB","col-sm-4-start":"G3qaZ3Jpbvam_1XvGxgc","col-sm-4-end":"VRCNYKZtO9zukEwmgP1y","col-md-1":"tRm008K_WJL79WoNZTNL","col-md-1-start":"l5T2P_bgKts4tdaRkS1d","col-md-1-end":"zOCxfLZpF6BlgC7a_Yq1","col-md-2":"F80DdgVn0m5OpvtSQWka","col-md-2-start":"oI1c7JYfiJtMQHbhngtU","col-md-2-end":"pMQtA_4jh1_1lVknqEP5","col-md-3":"VenqMpdgyKQVUNNQcfqd","col-md-3-start":"seNYL99uoczf9V4MxBxT","col-md-3-end":"YKfF1HFhI9KygA5l3b2J","col-md-4":"yAi0Cv1xDWkoqsaUhvhR","col-md-4-start":"ubhnyZOnkgxNhh6XtVWv","col-md-4-end":"RGOPGQbWMJ9Ei5oFxS7X","col-md-5":"Sz1E2aWbX483ijdi6yge","col-md-5-start":"tku6_bRYrX9tMbgYGmIl","col-md-5-end":"b5JHttOhSEcI1WBlqAjk","col-md-6":"FboSx5MoKTAWbxXyYlCw","col-md-6-start":"Jhs8yEEmodG30edbJvag","col-md-6-end":"IpzbbKVqEqPcfIGkXkwt","col-md-7":"mhCPwfAZ4Kmm_empzJAq","col-md-7-start":"x034ilrJF7rO9UJB2rI1","col-md-7-end":"Wt8t2e16viRrOJ1lLA5v","col-md-8":"S6pIrEy9AMLKx9bgh_Ae","col-md-8-start":"kEfI4tGyuWfHTlRnvIab","col-md-8-end":"PUzX4RRsKq1dnsz3gebS","col-lg-1":"X_pdcLJikd8LS_YAdJlB","col-lg-1-start":"tl936d14Huby4khYp05X","col-lg-1-end":"hnge0LnR69d3NXEtEE1t","col-lg-2":"fj0NUMuyZQcPNgKcjp5Z","col-lg-2-start":"R2ncBX7a2NigdYCcV1OX","col-lg-2-end":"t8vMSDVYno9k9itRwnXb","col-lg-3":"wsDuEN2GqHx6qzo8dUdk","col-lg-3-start":"cIEVPUweWtLBy3xaXnMx","col-lg-3-end":"fajUWBwu1m2B479j3jmz","col-lg-4":"YR0c7fQTgMkDdWzLine truncated
|
||||
__("There was an error testing Jetpack. Error: %s","jetpack-newsletter"),e.message))}},[]);return n&&(y||C)?(0,f.jsx)("div",{className:V,children:(0,f.jsxs)(i.A,{className:"jp-admin-page__page",visual:j||(0,f.jsx)(d.A,{showText:!1,height:20}),breadcrumbs:C,title:y,subTitle:x,actions:k,showSidebarToggle:!1,children:[S,N?e:(0,f.jsx)(u.A,{fluid:!0,horizontalSpacing:0,children:(0,f.jsx)(c.A,{children:e})}),h&&(0,f.jsx)(l.A,{menu:w})]})}):(0,f.jsxs)("div",{className:V,children:[n&&(0,f.jsx)(u.A,{horizontalSpacing:5,children:(0,f.jsxs)(c.A,{className:(0,o.A)(p.A["admin-page-header"],"jp-admin-page-header"),children:[_||(0,f.jsx)(d.A,{}),m&&(0,f.jsx)("code",{className:p.A["sandbox-domain-badge"],onClick:z,onKeyDown:z,role:"button",tabIndex:0,title:`Sandboxing via ${m}. Click to test connection.`,children:"API Sandboxed"})]})}),(0,f.jsx)(u.A,{fluid:!0,horizontalSpacing:0,children:(0,f.jsx)(c.A,{children:e})}),h&&(0,f.jsx)(l.A,{menu:w})]})}},8907(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(7723),i=n(3022),a=n(790);const __=r.__,o=({title:e=__("An Automattic Airline","jetpack-newsletter"),height:t=7,className:n,...r})=>(0,a.jsxs)("svg",{role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:t,className:(0,i.A)("jp-automattic-byline-logo",n),...r,children:[(0,a.jsx)("desc",{id:"jp-automattic-byline-logo-title",children:e}),(0,a.jsx)("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),(0,a.jsx)("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),(0,a.jsx)("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"})]})},9244(e,t,n){"use strict";n.d(t,{D:()=>s});var r=n(6427),i=n(1837),a=n(3406),o=n(790);function s({maxVisibleNotices:e=3}){const{getNotices:t,removeNotice:n}=(0,a.I)(),s=t().filter(({type:e})=>"snackbar"===e).slice(-e);return(0,o.jsx)(r.SnackbarList,{notices:s,className:i.A["global-notices"],onRemove:n})}},3406(e,t,n){"use strict";n.d(t,{I:()=>a});var r=n(7143),i=n(692);function a(){const e=(0,r.useDispatch)(i.store),t=(0,r.useSelect)(e=>e(i.store).getNotices(),[]);return{...e,createNotice:(t,n,r)=>e.createNotice(t,n,{type:"snackbar",...r}),createErrorNotice:(t,n)=>e.createErrorNotice(t,{type:"snackbar",...n}),createInfoNotice:(t,n)=>e.createInfoNotice(t,{type:"snackbar",...n}),createSuccessNotice:(t,n)=>e.createSuccessNotice(t,{type:"snackbar",...n}),createWarningNotice:(t,n)=>e.createWarningNotice(t,{type:"snackbar",...n}),getNotices:()=>t}}},8250(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(7999),i=n(7723),a=n(1220),o=n(9968),s=n(9654),l=n(3022),d=n(3924),c=n(8907),u=(n(8749),n(7142)),p=n(790);const __=i.__,f=({className:e,menu:t,...n})=>{let i=[];return(0,r.isWpcomPlatformSite)()||window?.JetpackNetworkAdminData||(i=[{label:__("Products","jetpack-newsletter"),href:(0,r.getAdminUrl)("admin.php?page=my-jetpack#/products")},{label:__("Help","jetpack-newsletter"),href:(0,r.getAdminUrl)("admin.php?page=my-jetpack#/help")},...i]),t&&(i=[...i,...t]),(0,p.jsxs)(a.B,{render:(0,p.jsx)("footer",{}),className:(0,l.A)("jetpack-footer",e),"aria-label":__(Line truncated
|
||||
__("<Preview>Preview:</Preview> <Empty>Byline will be empty</Empty>","jetpack-newsletter"),{Preview:(0,a.jsx)("span",{className:"byline-preview__label"}),Empty:(0,a.jsx)("em",{})})})});let d="";return t&&n?d=(0,r.createInterpolateElement)((0,i.sprintf)(/* translators: %1$s placeholder is the user display name, %2$s is example date */
|
||||
__("By <Author>%1$s</Author> on <Date>%2$s</Date>","jetpack-newsletter"),s,l),{Author:(0,a.jsx)("strong",{className:"byline-preview__author"}),Date:(0,a.jsx)("span",{className:"byline-preview__date"})}):t&&!n?d=(0,r.createInterpolateElement)(/* translators: %1$s placeholder is the user display name */ /* translators: %1$s placeholder is the user display name */
|
||||
(0,i.sprintf)(__("By <Author>%1$s</Author>","jetpack-newsletter"),s),{Author:(0,a.jsx)("strong",{className:"byline-preview__author"})}):!t&&n&&(d=(0,a.jsx)("span",{className:"byline-preview__date",children:l})),(0,a.jsxs)("div",{className:"byline-preview",children:[(0,a.jsx)("span",{className:"byline-preview__label",children:__("Preview:","jetpack-newsletter")}),e&&o&&(0,a.jsx)("img",{className:"byline-preview__gravatar",src:o,alt:/* translators: %s is the display name of the author */ /* translators: %s is the display name of the author */
|
||||
(0,i.sprintf)(__("Avatar for %s","jetpack-newsletter"),s)}),(0,a.jsx)("span",{children:d})]})}},1050(e,t,n){"use strict";n.d(t,{F:()=>u,m:()=>p});var r=n(372),i=n(7999),a=n(6427),o=n(6087),s=n(7723),l=n(9654),d=n(3832),c=n(790);const __=s.__;function u({data:e,field:t,onChange:n,url:r,linkText:i,isExternal:s=!0,onLinkClick:d}){const u=(0,o.useCallback)(()=>{n({[t.id]:!e[t.id]})},[e,t.id,n]);return(0,c.jsx)(a.ToggleControl,{__nextHasNoMarginBottom:!0,checked:!!e[t.id],onChange:u,label:(0,c.jsxs)("span",{children:[t.label," ",s?(0,c.jsx)(l.N,{openInNewTab:!0,href:r,onClick:d,children:i}):(0,c.jsx)("a",{href:r,onClick:d,children:i})]}),help:t.description})}function p({data:e,field:t,onChange:n,themeStylesheet:a,postType:s,templateId:l,siteType:p}){const f=(0,d.addQueryArgs)((0,i.getAdminUrl)("site-editor.php"),{postType:s,postId:`${a}//${l}`,canvas:"edit"}),h=(0,o.useCallback)(()=>{p&&r.A.tracks.recordEvent("jetpack_newsletter_edit_link_click",{site_type:p,template:l})},[p,l]);return(0,c.jsx)(u,{data:e,field:t,onChange:n,url:f,linkText:__("Preview and edit","jetpack-newsletter"),isExternal:!1,onLinkClick:h})}},3810(e,t,n){"use strict";n.d(t,{z:()=>w});var r=n(372),i=n(7999),a=n(6427),o=n(7143),s=n(6087),l=n(7723),d=n(692),c=n(1220),u=n(8050),p=n(1868),f=n(6537),h=n(7083),g=n(4110),m=n(790);const __=l.__;let b=null,v=null;function w({hasConnectedOwner:e=!0,connectUrl:t,isModernized:n=!1}){const[l,w]=(0,s.useState)(()=>b),[_,y]=(0,s.useState)(()=>v),[x,j]=(0,s.useState)(()=>!b),[k,C]=(0,s.useState)(null),[S,A]=(0,s.useState)({}),[N,V]=(0,s.useState)(!1),[z,E]=(0,s.useState)({}),[M,O]=(0,s.useState)(!1),[R,T]=(0,s.useState)({}),[F,P]=(0,s.useState)(!1),[D,I]=(0,s.useState)({}),[L,$]=(0,s.useState)(!1),[W,B]=(0,s.useState)({}),[q,U]=(0,s.useState)(!1),H=(0,s.useMemo)(()=>(0,h.v)(),[]),{createNotice:G}=(0,o.useDispatch)(d.store),Y=(0,s.useCallback)(e=>G("success",e,{type:"snackbar"}),[G]),J=(0,s.useCallback)(e=>G("error",e,{type:"snackbar",explicitDismiss:!0}),[G]),K=(0,s.useMemo)(()=>(0,i.getSiteType)(),[]);(0,s.useEffect)(()=>{const e=H?.tracksUserData;e&&"object"==typeof e&&r.A.initialize(e.userid,e.username)},[H]),(0,s.useEffect)(()=>{(0,f.Uc)().then(e=>{const t=function(e){return{...e,wpcom_newsletter_categories:(e.wpcom_newsletter_categories||[]).map(String),wpcom_subscription_emails_use_excerpt:String(Number(e.wpcom_subscription_emails_use_excerpt)||0)}}(e);w(t),y(t),j(!1)}).catch(e=>{console.error("Newsletter settings load error:",e),b||C(e.message||__("Failed to load settings","jetpack-newsletter")),j(!1)})},[]),(0,s.useEffect)(()=>{l&&(b=l)},[l]),(0,s.useEffect)(()=>{_&&(v=_)},[_]);const Z=(0,s.useCallback)(e=>{if(l){for(const t of Object.keys(e)){const n=e[t];n!==l[t]&&("boolean"==typeof n?r.A.tracks.recordEvent("jetpack_newsletter_setting_toggle",{site_type:K,setting:String(t),enabled:n}):"string"==typeof n&&r.A.tracks.recordEvent("jetpack_newsletter_setting_change",{site_type:K,setting:String(t),value:n}))}w(t=>({...t,...e})),(0,f.Xx)(e).then(()=>{y(t=>({...t,...e})),Y(__("Settings saved","jetpack-newsletter"))}).catch(e=>{console.error("Newsletter settings auto-save error:",e),J(e.message||__("Failed to save settings","jetpack-newsletter")),w(l)})}},[J,Y,l,K]),X=(0,s.useCallback)(e=>{w(t=>({...t,...e})),E(t=>({...t,...e}))},[]),Q=(0,s.useCallback)(()=>{l&&(O(!0),(0,f.Xx)(z).then(()=>{y(e=>({...e,...z})),E({}),Y(__("Sender name saved","jetpack-newsletter"))}).catch(e=>{console.error("Newsletter sender name save error:",e),J(e.message||__("Failed to save sender name","jetpack-newsletter"))}).finally(()=>{O(!1)}))},[J,Y,z,l]),ee=(0,s.useCallback)(e=>{w(t=>({...t,...e})),A(t=>({...t,...e}))},[]),te=(0,s.useCallback)(()=>{l&&(V(!0),(0,f.Xx)(S).then(()=>{y(e=>({...e,...S})),A({}),Y(__("Settings saved","jetpack-newsletter"))}).catch(e=>{console.error("Newsletter subscription settings save error:",e),J(e.message||__("Failed to save subscription settings","jetpack-newsletter"))}).finally(()=>{V(!1)}))},[J,Y,S,l]),ne=(0,s.useCallback)(e=>{w(t=>({...t,...e})),T(t=>({...t,...e}))},[]),re=(0,s.useCallback)(()=>{if(!l)return;P(!0);const e={...R};e.wpcom_newsletter_categories&&Array.isArray(e.wpcom_newsletter_categories)&&(e.wpcom_newsletter_categories.length>0?e.wpcom_newsletter_categories=e.wpcom_newsletter_categories.map(Number):delete e.wpcom_newsletter_categories),(0,f.Xx)(e).then(()=>{y(e=>({...e,...R})),T({}),Y(__("Newsletter categories saved","jetpack-newsletter"))}).catch(e=>{console.error("Newsletter categories save error:",e),J(e.message||__("Failed to save newsletter categories","jetpack-newsletter"))}).finally(()=>{P(!1)})},[J,Y,R,l]),ie=(0,s.useCallback)(e=>{w(t=>({...t,...e})),I(t=>({...t,...e}))},[]),ae=(0,s.useCallback)(()=>{l&&($(!0),(0,f.Xx)(D).then(()=>{y(e=>({...e,...D})),I({}),Y(__("Welcome email message saved","jetpack-newsletter"))}).catch(e=>{console.error("Newsletter welcome email save error:",e),J(e.message||__("Failed to save welcome email message","jetpack-newsletter"))}).finally(()=>{$Line truncated
|
||||
__("Preview: <strong>%1$s</strong> <author-name@example.com>","jetpack-newsletter"),S||k||__("Your Name","jetpack-newsletter")),{strong:(0,g.jsx)("strong",{})})})})]}),(0,g.jsx)("div",{className:"newsletter-card-footer",children:(0,g.jsx)(d.$,{onClick:j,disabled:!w||m||!b,loading:m,loadingAnnouncement:y,children:x})})]})]})}},4110(e,t,n){"use strict";n.d(t,{Ex:()=>a.E,Ki:()=>f.K,Lh:()=>c.L,W9:()=>o.W,WY:()=>s.W,X2:()=>r.X,aq:()=>h.a,dJ:()=>l.d,j:()=>u.j,n$:()=>d.n,ro:()=>i.r,tb:()=>p.t});var r=n(3036),i=n(926),a=n(9861),o=n(7500),s=n(1535),l=n(8066),d=n(1382),c=n(3179),u=n(1962),p=n(6152),f=n(6254),h=n(9935)},8066(e,t,n){"use strict";n.d(t,{d:()=>b});var r=n(372),i=n(7999),a=n(6427),o=n(72),s=n(6087),l=n(7723),d=n(9968),c=n(3889),u=n(9112),p=n(7961),f=n(6296),h=n(1050),g=n(7083),m=n(790);const __=l.__;function b({data:e,onChange:t,onSave:n,isSaving:l,hasChanges:b,isNewsletterEnabled:v}){const w=(0,i.getSiteType)(),_=(0,g.v)(),y=__("Saving…","jetpack-newsletter"),x=__("Save","jetpack-newsletter"),j=(0,s.useCallback)(()=>{r.A.tracks.recordEvent("jetpack_newsletter_section_save",{site_type:w,section:"subscriptions"}),n()},[n,w]),k=_?.isBlockTheme&&_?.themeStylesheet,C=_?.isSubscriptionSiteEditSupported&&_?.themeStylesheet,S=[{id:"jetpack_subscriptions_subscribe_post_end_enabled",label:__("Add the Subscribe Block at the end of each post","jetpack-newsletter"),type:"boolean",Edit:C?({data:e,field:t,onChange:n})=>(0,m.jsx)(h.m,{data:e,field:t,onChange:n,themeStylesheet:_.themeStylesheet,postType:"wp_template",templateId:"single",siteType:w}):"toggle"},{id:"sm_enabled",label:__("Show subscription pop-up when scrolling a post","jetpack-newsletter"),type:"boolean",Edit:k?({data:e,field:t,onChange:n})=>(0,m.jsx)(h.m,{data:e,field:t,onChange:n,themeStylesheet:_.themeStylesheet,postType:"wp_template_part",templateId:"jetpack-subscribe-modal",siteType:w}):"toggle"},{id:"jetpack_subscribe_overlay_enabled",label:__("Subscription overlay on homepage","jetpack-newsletter"),type:"boolean",Edit:k?({data:e,field:t,onChange:n})=>(0,m.jsx)(h.m,{data:e,field:t,onChange:n,themeStylesheet:_.themeStylesheet,postType:"wp_template_part",templateId:"jetpack-subscribe-overlay",siteType:w}):"toggle"},{id:"jetpack_subscribe_floating_button_enabled",label:__("Floating subscribe button on site's bottom corner","jetpack-newsletter"),type:"boolean",Edit:k?({data:e,field:t,onChange:n})=>(0,m.jsx)(h.m,{data:e,field:t,onChange:n,themeStylesheet:_.themeStylesheet,postType:"wp_template_part",templateId:"jetpack-subscribe-floating-button",siteType:w}):"toggle"},{id:"jetpack_subscriptions_subscribe_navigation_enabled",label:__("Add the Subscribe Block to the navigation","jetpack-newsletter"),type:"boolean",Edit:C?({data:e,field:t,onChange:n})=>(0,m.jsx)(h.m,{data:e,field:t,onChange:n,themeStylesheet:_.themeStylesheet,postType:"wp_template",templateId:"index",siteType:w}):"toggle"},{id:"jetpack_subscriptions_login_navigation_enabled",label:__("Add the Subscriber Login Block to the navigation","jetpack-newsletter"),type:"boolean",Edit:C?({data:e,field:t,onChange:n})=>(0,m.jsx)(h.m,{data:e,field:t,onChange:n,themeStylesheet:_.themeStylesheet,postType:"wp_template",templateId:"index",siteType:w}):"toggle"},{id:"stb_enabled",label:__('Enable the "Subscribe to site" option on your comment form',"jetpack-newsletter"),type:"boolean",Edit:"toggle"},{id:"stc_enabled",label:__('Enable the "Subscribe to comments" option on your comment form',"jetpack-newsletter"),type:"boolean",Edit:"toggle"}];return(0,m.jsxs)(c.b,{children:[(0,m.jsx)(u.Y,{children:(0,m.jsx)(p.h,{children:__("Subscriptions","jetpack-newsletter")})}),(0,m.jsxs)(f.U,{children:[(0,m.jsx)("p",{children:(0,m.jsx)(d.E,{children:__("Automatically add subscription forms to your site and turn visitors into subscribers.","jetpack-newsletter")})}),(0,m.jsx)("fieldset",{disabled:!v,children:(0,m.jsx)(o.A,{data:e,fields:S,form:{layout:{type:"regular",labelPosition:"top"},fields:[{id:"homepage_and_posts",label:__("Homepage and posts","jetpack-newsletter"),children:["jetpack_subscriptions_subscribe_post_end_enabled","sm_enabled","jetpack_subscribe_overlay_enabled","jetpack_subscribe_floating_button_enabled"]},{id:"navigation",label:__("Navigation","jetpack-newsletter"),children:["jetpack_subscriptions_subscribe_navigation_enabled","jetpack_subscriptions_login_navigation_enabled"]},{id:"comments",label:__("Comments","jetpack-newsletter"),children:["stb_enabled","stc_enabled"]}]},onChange:t})}),(0,m.jsx)("div",{className:"newsletter-card-footer",children:(0,m.jsx)(a.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:j,disabled:!v||l||!b,isBusy:l,children:l?y:x})})]})]})}},1382(e,t,n){"use strict";n.d(t,{n:()=>x});var r=n(372),i=n(7999),a=n(2308),o=n(8103),s=n(72),l=n(6087),d=n(7723),c=n(9654),u=n(9968),p=n(2326),f=n(3889),h=n(9112),g=n(7961),m=n(6296),b=n(4404),v=n(8050),w=n(1868),_=n(6537),y=n(790);const __=d.__;function x({data:e,onChange:t,onSave:n,isSaving:d,hasChanges:x,changedKeys:j,isNewsletteLine truncated
|
||||
// translators: %s: Field name.
|
||||
// translators: %s: Field name.
|
||||
(0,a._x)("Edit %s (has errors)","field","jetpack-newsletter"),n||""):(0,a.sprintf)(
|
||||
// translators: %s: Field name.
|
||||
// translators: %s: Field name.
|
||||
(0,a._x)("Edit %s","field","jetpack-newsletter"),n||""),z=(0,d.useRef)(null);return(0,f.jsxs)("div",{ref:z,className:A,onClick:v?void 0:()=>{const e=z.current?.ownerDocument.defaultView?.getSelection();e&&e.toString().length>0||w()},onKeyDown:v?void 0:e=>{e.target!==e.currentTarget||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),w())},children:["none"!==y&&(0,f.jsx)("span",{className:C,children:S}),"none"===y&&k&&(0,f.jsx)(i.Tooltip,{text:j,placement:"top",children:(0,f.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:(0,f.jsx)(i.Icon,{icon:o.A,size:16})})}),(0,f.jsx)("span",{id:`${N}`,className:"dataforms-layouts-panel__field-control",children:g.length>1?(0,f.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:g.map(t=>(0,f.jsx)("span",{style:{width:"100%"},children:(0,f.jsx)(t.render,{item:e,field:t})},t.id))}):g.map(t=>(0,f.jsx)(t.render,{item:e,field:t},t.id))}),!v&&(0,f.jsx)(i.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:V,icon:s.A,size:"small","aria-expanded":_,"aria-haspopup":"dialog","aria-describedby":`${N}`})]})}},4492(e,t,n){"use strict";n.d(t,{A:()=>r});var r=function e(t){if(!t)return;const n=Object.keys(t).filter(e=>"children"!==e);for(const e of n){const n=t[e];if(void 0!==n&&"invalid"===n.type)return n.message?n.message:"required"===e?"A required field is empty":"Unidentified validation error"}if(t.children)for(const n of Object.values(t.children)){const t=e(n);if(t)return t}}},6301(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(3022);var i=function(e,t){return(0,r.A)("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}},31(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6427),i=n(9099),a=n(790);var o=function(e,t,n){return e?(0,a.jsx)(r.Tooltip,{text:t,placement:"top",children:(0,a.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,a.jsx)(r.Icon,{icon:i.A,size:16}),n]})}):n}},8539(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6087),i=n(4030),a=n(9475);var o=function(e){const{fields:t}=(0,r.useContext)(a.A),n=e.layout,o=(0,i.Y)(n.summary,t),s=((e,t)=>{const n=t.find(t=>t.id===e.id);return n||t.find(t=>{if(e.children){const n=e.children.filter(e=>!e.children);return 0!==n.length&&t.id===n[0].id}return t.id===e.id})})(e,t),l=e.children?e.label:s?.label;return 0===o.length?{summaryFields:s?[s]:[],fieldDefinition:s,fieldLabel:l}:{summaryFields:o,fieldDefinition:s,fieldLabel:l}}},5598(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(3022),i=n(6087),a=n(6427),o=n(8839),s=n(9475),l=n(7451),d=n(7289),c=n(790);function u({title:e}){return(0,c.jsx)(o.B,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,c.jsx)(o.B,{direction:"row",align:"center",children:(0,c.jsx)(a.__experimentalHeading,{level:2,size:13,children:e})})})}function p({data:e,field:t,onChange:n,hideLabelFromVision:p,markWhenOptional:f,validity:h}){const{fields:g}=(0,i.useContext)(s.A),m=t.layout,b=(0,i.useMemo)(()=>({layout:d.z,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,c.jsxs)(c.Fragment,{children:[!p&&t.label&&(0,c.jsx)(u,{title:t.label}),(0,c.jsx)(l.Z,{data:e,form:b,onChange:n,validity:h?.children})]});const v=m.labelPosition,w=g.find(e=>e.id===t.id);return w&&w.Edit?"side"===v?(0,c.jsxs)(o.B,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,c.jsx)("div",{className:(0,r.A)("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${v}`),children:(0,c.jsx)(a.BaseControl.VisualLabel,{children:w.label})}),(0,c.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:!0===w.readOnly?(0,c.jsx)(w.render,{item:e,field:w}):(0,c.jsx)(w.Edit,{data:e,field:w,onChange:n,hideLabelFromVision:!0,markWhenOptional:f,validity:h},w.id)})]}):(0,c.jsx)("div",{className:"dataforms-layouts-regular__field",children:!0===w.readOnly?(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(c.Fragment,{children:[!p&&"none"!==v&&(0,c.jsx)(a.BaseControl.VisualLabel,{children:w.label}),(0,c.jsx)(w.render,{item:e,field:w})]})}):(0,c.jsx)(w.Edit,{data:e,field:w,onChange:n,hideLabelFromVision:"none"===v||p,markWhenOptional:f,validity:h})}):null}},2106(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(6427),i=n(8839),a=n(7451),o=n(7289),s=n(1083),l=n(790);function d({title:e}){return(0,l.jsx)(i.B,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,l.jsx)(i.B,{direction:"row",align:"center",children:(0,l.jsx)(r.__experimentalHeading,{level:2,size:13,children:e})})})}var c=({children:e})=>(0,l.jsx)(l.Fragment,{children:e});function u({data:e,field:t,onChange:n,hideLabelFromVision:r,markWhenOptional:u,validity:p}){const f=t.layout;if(t.children){const s={layout:o.z,fields:t.children};return(0,l.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!r&&t.label&&(0,l.jsx)(d,{title:t.label}),(0,lLine truncated
|
||||
(0,i._n)("%d field needs attention","%d fields need attention",t,"jetpack-newsletter"),t)})}},6310(e,t,n){"use strict";n.d(t,{CX:()=>l,Ie:()=>g,Ld:()=>C,MD:()=>c,NN:()=>_,Py:()=>y,QF:()=>v,UX:()=>s,Vm:()=>x,Vw:()=>a,X4:()=>f,Xd:()=>b,YH:()=>j,_h:()=>d,_k:()=>p,gm:()=>u,ld:()=>i,o8:()=>w,u5:()=>h,x4:()=>m,xz:()=>k,y5:()=>o});var r=n(7723),i="isAny",a="isNone",o="isAll",s="isNotAll",l="between",d="inThePast",c="over",u="is",p="isNot",f="lessThan",h="greaterThan",g="lessThanOrEqual",m="greaterThanOrEqual",b="before",v="after",w="beforeInc",_="afterInc",y="contains",x="notContains",j="startsWith",k="on",C="notOn";(0,r.__)("Sort ascending","jetpack-newsletter"),(0,r.__)("Sort descending","jetpack-newsletter")},72(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(6087),i=n(7256),a=n(9475),o=n(7451),s=n(7289),l=n(790);function d({data:e,form:t,fields:n,onChange:d,validity:c}){const u=(0,r.useMemo)(()=>(0,s.A)(t),[t]),p=(0,r.useMemo)(()=>(0,i.A)(n),[n]);return t.fields?(0,l.jsx)(a.u,{fields:p,children:(0,l.jsx)(o.Z,{data:e,form:u,onChange:d,validity:c})}):null}},3435(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(7723),i=n(6310),a=n(4601),o=n(4851);function s({item:e,field:t}){const n=t.getValue({item:e});return(Array.isArray(n)?n:[]).join(", ")}var l={type:"array",render:function({item:e,field:t}){return s({item:e,field:t})},Edit:"array",sort:(e,t,n)=>{const r=Array.isArray(e)?e:[],i=Array.isArray(t)?t:[];if(r.length!==i.length)return"asc"===n?r.length-i.length:i.length-r.length;const a=r.join(","),o=i.join(",");return"asc"===n?a.localeCompare(o):o.localeCompare(a)},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[i.ld,i.Vw],validOperators:[i.ld,i.Vw,i.y5,i.UX],format:{},getValueFormatted:s,validate:{required:a.A,elements:o.A,custom:function(e,t){const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Array.isArray(n)?n.every(e=>"string"==typeof e)?null:(0,r.__)("Every value must be a string.","jetpack-newsletter"):(0,r.__)("Value must be an array.","jetpack-newsletter")}}}},5172(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(7723),i=n(6310),a=n(4851),o=n(1377);var s={type:"boolean",render:n(5266).A,Edit:"checkbox",sort:(e,t,n)=>{const r=Boolean(e);return r===Boolean(t)?0:"asc"===n?r?1:-1:r?-1:1},validate:{required:o.A,elements:a.A,custom:function(e,t){const n=t.getValue({item:e});return[void 0,"",null].includes(n)||[!0,!1].includes(n)?null:(0,r.__)("Value must be true, false, or undefined","jetpack-newsletter")}},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[i.gm,i._k],validOperators:[i.gm,i._k],format:{},getValueFormatted:function({item:e,field:t}){const n=t.getValue({item:e});return!0===n?(0,r.__)("True","jetpack-newsletter"):!1===n?(0,r.__)("False","jetpack-newsletter"):""}}},2909(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(3270),i=n(7723),a=n(315),o=n(6310),s=n(4851),l=n(8235),d=n(1189),c=n(790);var u={type:"color",render:function({item:e,field:t}){if(t.hasElements)return(0,c.jsx)(a.A,{item:e,field:t});const n=(0,d.A)({item:e,field:t});return n&&(0,r.Mj)(n).isValid()?(0,c.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,c.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:n,border:"1px solid #ddd",flexShrink:0}}),(0,c.jsx)("span",{children:n})]}):n},Edit:"color",sort:(e,t,n)=>{const i=(0,r.Mj)(e),a=(0,r.Mj)(t);if(!i.isValid()&&!a.isValid())return 0;if(!i.isValid())return"asc"===n?1:-1;if(!a.isValid())return"asc"===n?-1:1;const o=i.toHsl(),s=a.toHsl();return o.h!==s.h?"asc"===n?o.h-s.h:s.h-o.h:o.s!==s.s?"asc"===n?o.s-s.s:s.s-o.s:"asc"===n?o.l-s.l:s.l-o.l},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[o.ld,o.Vw],validOperators:[o.gm,o._k,o.ld,o.Vw],format:{},getValueFormatted:d.A,validate:{required:l.A,elements:s.A,custom:function(e,t){const n=t.getValue({item:e});return[void 0,"",null].includes(n)||(0,r.Mj)(n).isValid()?null:(0,i.__)("Value must be a valid color.","jetpack-newsletter")}}}},2720(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(8443),i=n(4851),a=n(6310),o=n(8235),s=n(8731),l=n(5266),d={date:(0,r.getSettings)().formats.date,weekStartsOn:(0,r.getSettings)().l10n.startOfWeek};var c={type:"date",render:l.A,Edit:"date",sort:(e,t,n)=>{const r=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===n?r-i:i-r},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[a.xz,a.Ld,a.Xd,a.QF,a.o8,a.NN,a._h,a.MD,a.CX],validOperators:[a.xz,a.Ld,a.Xd,a.QF,a.o8,a.NN,a._h,a.MD,a.CX],format:d,getValueFormatted:function({item:e,field:t}){const n=t.getValue({item:e});if(["",void 0,null].includes(n))return"";let i;return i="date"!==t.type?d:t.format,(0,r.dateI18n)(i.date,(0,r.getDate)(n))},validate:{required:o.A,elements:i.A,min:s.p,max:s.P}}},1463(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(8443),i=n(4851),a=n(6310),o=n(8235),s=n(8731),l=n(5266),d={datetime:(0,r.getSettings)().formats.datetime,weekStartsOn:(0,r.getSettings)().l10n.startOfWeek};var c={type:"datetime",render:l.A,Edit:"datetime",sort:(e,t,n)=>{const r=new Date(eLine truncated
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Is none of","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */
|
||||
(0,s.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t.map(e=>e.label).join(", ")),p),filter:(e,t,n)=>{if(!n?.length)return!0;const r=t.getValue({item:e});return Array.isArray(r)?!n.some(e=>r.includes(e)):"string"==typeof r&&!n.includes(r)},selection:"multi"},g=[{name:c.ld,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Includes","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */
|
||||
(0,s.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t.map(e=>e.label).join(", ")),p),filter(e,t,n){if(!n?.length)return!0;const r=t.getValue({item:e});return Array.isArray(r)?n.some(e=>r.includes(e)):"string"==typeof r&&n.includes(r)},selection:"multi"},{name:c.Vw,...h},{name:c.y5,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Includes all","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */
|
||||
(0,s.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t.map(e=>e.label).join(", ")),p),filter:(e,t,n)=>!n?.length||n.every(n=>t.getValue({item:e})?.includes(n)),selection:"multi"},{name:c.UX,...h},{name:c.CX,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Between (inc)","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */ /* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */
|
||||
(0,s.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>","jetpack-newsletter"),e.name,t[0].label[0],t[0].label[1]),p),filter(e,t,n){if(!Array.isArray(n)||2!==n.length||void 0===n[0]||void 0===n[1])return!0;const r=t.getValue({item:e});return("number"==typeof r||r instanceof Date||"string"==typeof r)&&(r>=n[0]&&r<=n[1])},selection:"custom"},{name:c._h,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("In the past","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */
|
||||
(0,s.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,`${t[0].value.value} ${t[0].value.unit}`),p),filter(e,t,n){if(void 0===n?.value||void 0===n?.unit)return!0;const r=f(n.value,n.unit),i=(0,d.getDate)(t.getValue({item:e}));return i>=r&&i<=new Date},selection:"custom"},{name:c.MD,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Over","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */
|
||||
(0,s.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,`${t[0].value.value} ${t[0].value.unit}`),p),filter(e,t,n){if(void 0===n?.value||void 0===n?.unit)return!0;const r=f(n.value,n.unit);return(0,d.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:c.gm,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Is","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */
|
||||
(0,s.__)("<Name>%1$s is: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter:(e,t,n)=>n===t.getValue({item:e})||void 0===n,selection:"single"},{name:c._k,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Is not","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */
|
||||
(0,s.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter:(e,t,n)=>n!==t.getValue({item:e}),selection:"single"},{name:c.X4,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Less than","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */
|
||||
(0,s.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})<n},selection:"single"},{name:c.u5,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Greater than","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */
|
||||
(0,s.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})>n},selection:"single"},{name:c.Ie,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Less than or equal","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */
|
||||
(0,s.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})<=n},selection:"single"},{name:c.x4,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Greater than or equal","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */
|
||||
(0,s.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})>=n},selection:"single"},{name:c.Xd,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Before","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */
|
||||
(0,s.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,d.getDate)(n);return(0,d.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:c.QF,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("After","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */
|
||||
(0,s.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,d.getDate)(n);return(0,d.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:c.o8,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Before (inc)","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */
|
||||
(0,s.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,d.getDate)(n);return(0,d.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:c.NN,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("After (inc)","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */
|
||||
(0,s.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,d.getDate)(n);return(0,d.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:c.Py,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Contains","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */
|
||||
(0,s.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&r.toLowerCase().includes(String(n).toLowerCase())},selection:"single"},{name:c.Vm,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Doesn't contain","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */
|
||||
(0,s.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&!r.toLowerCase().includes(String(n).toLowerCase())},selection:"single"},{name:c.YH,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Starts with","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */
|
||||
(0,s.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&r.toLowerCase().startsWith(String(n).toLowerCase())},selection:"single"},{name:c.xz,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("On","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */
|
||||
(0,s.__)("<Name>%1$s is: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,d.getDate)(n),i=(0,d.getDate)(t.getValue({item:e}));return r.getTime()===i.getTime()},selection:"single"},{name:c.Ld,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,s.__)("Not on","jetpack-newsletter"),filterText:(e,t)=>(0,l.createInterpolateElement)((0,s.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */
|
||||
(0,s.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>","jetpack-newsletter"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,d.getDate)(n),i=(0,d.getDate)(t.getValue({item:e}));return r.getTime()!==i.getTime()},selection:"single"}],m=e=>g.find(t=>t.name===e),b=()=>g.map(e=>e.name)},3407(e,t,n){"use strict";n.d(t,{E:()=>u});var r=n(3022),i=n(6087),a=n(7587),o=n(790),s="data-wp-hash";function l(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=l();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)d(e,n,r)}(document)),e.__wpStyleRuntime}function d(e,t,n){if(!e.head)return;const r=l();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${s}]`))if(n.getAttribute(s)===t)return!0;return!1}(e,t))return void i.add(t);const a=e.createElement("style");a.setAttribute(s,t),a.appendChild(e.createTextNode(n)),e.head.appendChild(a),i.add(t)}(function(e,t){const n=l();n.styles.set(e,t);for(const r of n.documents.keys())d(r,e,t)})("d6a685e1aa","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6be);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee995);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c6f7cd);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-fg-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}");var c={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},u=(0,i.forwardRef)(function({intent:e="none",className:t,...n},i){return(0,o.jsx)(a.E,{ref:i,className:(0,r.A)(c.badge,c[`is-${e}-intent`],t),...n,variant:"body-sm"})})},3915(e,t,n){"use strict";n.d(t,{U:()=>c});var r=n(815),i=n(6919),a=n(6087),o="data-wp-hash";function s(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=s();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)l(e,n,r)}(document)),e.__wpStyleRuntime}function l(e,t,n){if(!e.head)return;const r=s();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${o}]`))if(n.getAttribute(o)===t)return!0;return!1}(e,t))return void i.add(t);const a=e.createElement("style");a.setAttribute(o,t),a.appendChild(e.createTextNode(n)),e.head.appendChild(a),i.add(t)}(function(e,t){const n=s();n.styles.set(e,t);for(const r of n.documents.keys())l(r,e,t)})("14f5e9ddeb","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:colLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-end:0;inset-block-start:auto;inset-inline:0;position:fixed;z-index:100001}@media(min-width:600px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:4rem;inset-inline:unset;inset-inline-end:1rem;width:auto}}@media(min-width:782px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:3rem}}.jetpack-footer{border-top:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);box-sizing:border-box;font-size:var(--wpds-typography-font-size-md,13px);padding:var(--wpds-dimension-padding-xl) var(--wpds-dimension-padding-2xl);width:100%}.jetpack-footer :is(.jetpack-footer__menu-item:any-link,.jetpack-footer__menu-item[role=button]){color:var(--wpds-color-fg-interactive-neutral-weak);cursor:pointer;text-decoration:none}.jetpack-footer .jetpack-footer__menu-item:hover{text-decoration:underline}.jetpack-footer>ul{list-style:none;margin:0;padding:0}.jetpack-footer>ul>li{margin:0}.jetpack-footer__logo{flex-shrink:0}@media(min-width:480px){a.jetpack-footer__a8c{margin-inline-start:auto}}a.jetpack-footer__a8c svg{fill:var(--wpds-color-fg-interactive-neutral-weak)}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1040px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));max-width:calc(var(--max-container-width) + 32px);padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));max-width:calc(var(--max-container-width) + 36px);padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));max-width:calc(var(--max-container-width) + 48px);padding:0 2Line truncated
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Pages loader - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
foreach ( [
|
||||
__DIR__ . '/pages/jetpack-newsletter-dashboard/page.php',
|
||||
__DIR__ . '/pages/jetpack-newsletter-dashboard/page-wp-admin.php',
|
||||
__DIR__ . '/pages/jetpack-subscribers-announcement/page.php',
|
||||
__DIR__ . '/pages/jetpack-subscribers-announcement/page-wp-admin.php',
|
||||
] as $file ) {
|
||||
if ( file_exists( $file ) ) {
|
||||
require_once $file;
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
// Empty module loader for page dependencies
|
||||
+317
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: jetpack-newsletter-dashboard (wp-admin integrated)
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* This version integrates with the standard WordPress admin interface,
|
||||
* keeping the wp-admin sidebar and scripts/styles intact.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
// Global storage for jetpack-newsletter-dashboard routes and menu items
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_routes, $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_menu_items;
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_routes = array();
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the jetpack-newsletter-dashboard-wp-admin page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_newsletter_dashboard_wp_admin_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_routes;
|
||||
|
||||
$route = array( 'path' => $path );
|
||||
if ( ! empty( $content_module ) ) {
|
||||
$route['content_module'] = $content_module;
|
||||
}
|
||||
if ( ! empty( $route_module ) ) {
|
||||
$route['route_module'] = $route_module;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the jetpack-newsletter-dashboard-wp-admin page.
|
||||
* Note: Menu items are registered but not displayed in single-page mode.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_newsletter_dashboard_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the jetpack-newsletter-dashboard-wp-admin page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_newsletter_dashboard_wp_admin_routes() {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_routes;
|
||||
return $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the jetpack-newsletter-dashboard-wp-admin page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_newsletter_dashboard_wp_admin_menu_items() {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_menu_items;
|
||||
return $jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the jetpack-newsletter-dashboard-wp-admin page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles for the jetpack-newsletter-dashboard-wp-admin page.
|
||||
* Hooked to admin_enqueue_scripts.
|
||||
*
|
||||
* @param string $hook_suffix The current admin page.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_enqueue_scripts( $hook_suffix ) {
|
||||
// Check all possible ways this page can be accessed:
|
||||
// 1. Menu page via admin.php?page=jetpack-newsletter-dashboard-wp-admin (plugin)
|
||||
// 2. Direct file via jetpack-newsletter-dashboard.php (Core) - screen ID will be 'jetpack-newsletter-dashboard'
|
||||
$current_screen = get_current_screen();
|
||||
$is_our_page = (
|
||||
( isset( $_GET['page'] ) && 'jetpack-newsletter-dashboard-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
( $current_screen && 'jetpack-newsletter-dashboard' === $current_screen->id )
|
||||
);
|
||||
|
||||
if ( ! $is_our_page ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
/**
|
||||
* Fires when the jetpack-newsletter-dashboard admin page is initialized so extensions can register routes and menu items.
|
||||
*/
|
||||
do_action( 'jetpack-newsletter-dashboard-wp-admin_init' );
|
||||
|
||||
// Preload REST API data
|
||||
jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_preload_data();
|
||||
|
||||
// Get all registered routes
|
||||
$routes = jetpack_newsletter_get_jetpack_newsletter_dashboard_wp_admin_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'jetpack-newsletter-dashboard-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
/*
|
||||
* Add inline script to initialize the app using initSinglePage (no menuItems).
|
||||
* The dynamic import is deferred until DOMContentLoaded so that all classic
|
||||
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
|
||||
* wp-theme, etc.) have finished parsing and executing before the boot module
|
||||
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
|
||||
* against the classic-script-printing pass on fast CDN-fronted hosts in
|
||||
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
|
||||
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
|
||||
*/
|
||||
$init_js_function = <<<'JS'
|
||||
( mountId, routes ) => {
|
||||
const run = async () => {
|
||||
const mod = await import( "@wordpress/boot" );
|
||||
mod.initSinglePage( { mountId, routes } );
|
||||
};
|
||||
if ( document.readyState === "loading" ) {
|
||||
document.addEventListener( "DOMContentLoaded", run );
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
}
|
||||
JS;
|
||||
wp_add_inline_script(
|
||||
'jetpack-newsletter-dashboard-wp-admin-prerequisites',
|
||||
sprintf(
|
||||
'( %s )( %s, %s );',
|
||||
$init_js_function,
|
||||
wp_json_encode( 'jetpack-newsletter-dashboard-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'jetpack-newsletter-dashboard-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for jetpack-newsletter-dashboard-wp-admin module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the boot script-module dependencies for the
|
||||
* jetpack-newsletter-dashboard-wp-admin page.
|
||||
*
|
||||
* Surfaces extending this page can append entries to the boot
|
||||
* dependency list. Each entry is an array with 'import' (string
|
||||
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
|
||||
*
|
||||
* @param array $boot_dependencies Boot dependencies for the page.
|
||||
*/
|
||||
$boot_dependencies = apply_filters(
|
||||
'jetpack-newsletter-dashboard-wp-admin_boot_dependencies',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'jetpack-newsletter-dashboard-wp-admin',
|
||||
$build_constants['build_url'] . 'pages/jetpack-newsletter-dashboard/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'jetpack-newsletter-dashboard-wp-admin-prerequisites' );
|
||||
wp_enqueue_script_module( 'jetpack-newsletter-dashboard-wp-admin' );
|
||||
wp_enqueue_style( 'jetpack-newsletter-dashboard-wp-admin-prerequisites' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the jetpack-newsletter-dashboard-wp-admin page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
* This renders within the normal WordPress admin interface.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_render_page() {
|
||||
?>
|
||||
<style>
|
||||
/* Critical styles to prevent layout shifts - inlined for immediate application */
|
||||
|
||||
#wpwrap {
|
||||
overflow-y: auto;
|
||||
}
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Reset wp-admin padding */
|
||||
#wpcontent {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
#wpbody-content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* Hide legacy admin elements */
|
||||
#wpbody-content > div:not(.boot-layout-container):not(#screen-meta) {
|
||||
display: none;
|
||||
}
|
||||
#wpfooter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Accessibility regions */
|
||||
.a11y-speak-region {
|
||||
inset-inline-start: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
/* Admin menu indicators */
|
||||
ul#adminmenu a.wp-has-current-submenu::after,
|
||||
ul#adminmenu > li.current > a.current::after {
|
||||
border-inline-end-color: #fff;
|
||||
}
|
||||
|
||||
/* Media frame fix */
|
||||
.media-frame select.attachment-filters:last-of-type {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Responsive overflow fix for #wpwrap */
|
||||
@media (min-width: 782px) {
|
||||
#wpwrap {
|
||||
overflow-y: initial;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="jetpack-newsletter-dashboard-wp-admin-app" class="boot-layout-container"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Hook the enqueue function to admin_enqueue_scripts
|
||||
add_action( 'admin_enqueue_scripts', 'jetpack_newsletter_jetpack_newsletter_dashboard_wp_admin_enqueue_scripts' );
|
||||
|
||||
+318
@@ -0,0 +1,318 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: jetpack-newsletter-dashboard
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
// Global storage for jetpack-newsletter-dashboard routes and menu items
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_routes, $jetpack_newsletter_jetpack_newsletter_dashboard_menu_items;
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_routes = array();
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the jetpack-newsletter-dashboard page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_newsletter_dashboard_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_routes;
|
||||
|
||||
$route = array( 'path' => $path );
|
||||
if ( ! empty( $content_module ) ) {
|
||||
$route['content_module'] = $content_module;
|
||||
}
|
||||
if ( ! empty( $route_module ) ) {
|
||||
$route['route_module'] = $route_module;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the jetpack-newsletter-dashboard page.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
* @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_newsletter_dashboard_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) {
|
||||
$menu_item['parent_type'] = $parent_type;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_newsletter_dashboard_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the jetpack-newsletter-dashboard page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_newsletter_dashboard_routes() {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_routes;
|
||||
return $jetpack_newsletter_jetpack_newsletter_dashboard_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the jetpack-newsletter-dashboard page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_newsletter_dashboard_menu_items() {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_menu_items;
|
||||
return $jetpack_newsletter_jetpack_newsletter_dashboard_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the jetpack-newsletter-dashboard page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_newsletter_dashboard_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the jetpack-newsletter-dashboard page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_newsletter_dashboard_render_page() {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
// Set current screen
|
||||
set_current_screen();
|
||||
|
||||
// Remove unwanted deprecated handler
|
||||
remove_action( 'admin_head', 'wp_admin_bar_header' );
|
||||
|
||||
// Remove unwanted scripts and styles that were enqueued during `admin_init`
|
||||
foreach ( wp_scripts()->queue as $script ) {
|
||||
wp_dequeue_script( $script );
|
||||
}
|
||||
foreach ( wp_styles()->queue as $style ) {
|
||||
wp_dequeue_style( $style );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires when the jetpack-newsletter-dashboard page is initialized so extensions can register routes and menu items.
|
||||
*/
|
||||
do_action( 'jetpack-newsletter-dashboard_init' );
|
||||
|
||||
// Enqueue command palette assets for boot-based pages
|
||||
if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) {
|
||||
wp_enqueue_command_palette_assets();
|
||||
}
|
||||
|
||||
// Preload REST API data
|
||||
jetpack_newsletter_jetpack_newsletter_dashboard_preload_data();
|
||||
|
||||
// Get all registered routes and menu items
|
||||
$menu_items = jetpack_newsletter_get_jetpack_newsletter_dashboard_menu_items();
|
||||
$routes = jetpack_newsletter_get_jetpack_newsletter_dashboard_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'jetpack-newsletter-dashboard-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
// Add inline script to initialize the app
|
||||
$init_modules = [];
|
||||
wp_add_inline_script(
|
||||
'jetpack-newsletter-dashboard-prerequisites',
|
||||
sprintf(
|
||||
'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));',
|
||||
'jetpack-newsletter-dashboard-app',
|
||||
wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
esc_url( admin_url( '/' ) )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'jetpack-newsletter-dashboard-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for jetpack-newsletter-dashboard module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add init modules as static dependencies
|
||||
// No init modules configured
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the boot script-module dependencies for the
|
||||
* jetpack-newsletter-dashboard page.
|
||||
*
|
||||
* Surfaces extending this page can append entries to the boot
|
||||
* dependency list. Each entry is an array with 'import' (string
|
||||
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
|
||||
*
|
||||
* @param array $boot_dependencies Boot dependencies for the page.
|
||||
*/
|
||||
$boot_dependencies = apply_filters(
|
||||
'jetpack-newsletter-dashboard_boot_dependencies',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'jetpack-newsletter-dashboard',
|
||||
$build_constants['build_url'] . 'pages/jetpack-newsletter-dashboard/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'jetpack-newsletter-dashboard-prerequisites' );
|
||||
wp_enqueue_script_module( 'jetpack-newsletter-dashboard' );
|
||||
wp_enqueue_style( 'jetpack-newsletter-dashboard-prerequisites' );
|
||||
}
|
||||
|
||||
// Output the HTML
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php echo esc_html( get_admin_page_title() ); ?></title>
|
||||
<style>
|
||||
html {
|
||||
background: #f1f1f1;
|
||||
color: #444;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#wpadminbar { display: none; }
|
||||
</style>
|
||||
<?php
|
||||
global $hook_suffix;
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$hook_suffix = 'jetpack-newsletter-dashboard';
|
||||
|
||||
// BEGIN see wp-admin/admin-header.php
|
||||
print_admin_styles();
|
||||
print_head_scripts();
|
||||
|
||||
/** This action is documented in wp-admin/admin-header.php */
|
||||
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
/** This action is documented in wp-admin/admin-header.php */
|
||||
do_action( 'admin_head' );
|
||||
// END see wp-admin/admin-header.php
|
||||
?>
|
||||
</head>
|
||||
<body class="jetpack-newsletter-dashboard">
|
||||
<div id="jetpack-newsletter-dashboard-app" style="height: 100vh; box-sizing: border-box;"></div>
|
||||
<?php
|
||||
// BEGIN see wp-admin/admin-footer.php
|
||||
|
||||
/** This action is documented in wp-admin/admin-footer.php */
|
||||
do_action( 'admin_footer', '' );
|
||||
|
||||
// Print import map first so it's available for inline scripts
|
||||
wp_script_modules()->print_import_map();
|
||||
print_footer_scripts();
|
||||
wp_script_modules()->print_enqueued_script_modules();
|
||||
wp_script_modules()->print_script_module_preloads();
|
||||
wp_script_modules()->print_script_module_data();
|
||||
|
||||
/** This action is documented in wp-admin/admin-footer.php */
|
||||
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
// END see wp-admin/admin-footer.php
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intercept admin_init to render the page early.
|
||||
* This bypasses the default WordPress admin template.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_newsletter_dashboard_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'jetpack-newsletter-dashboard' === $_GET['page'] ) {
|
||||
jetpack_newsletter_jetpack_newsletter_dashboard_render_page();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Hook the interceptor to admin_init
|
||||
add_action( 'admin_init', 'jetpack_newsletter_jetpack_newsletter_dashboard_intercept_render' );
|
||||
+1
@@ -0,0 +1 @@
|
||||
// Empty module loader for page dependencies
|
||||
+317
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: jetpack-subscribers-announcement (wp-admin integrated)
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* This version integrates with the standard WordPress admin interface,
|
||||
* keeping the wp-admin sidebar and scripts/styles intact.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
// Global storage for jetpack-subscribers-announcement routes and menu items
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_routes, $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_menu_items;
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_routes = array();
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the jetpack-subscribers-announcement-wp-admin page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_subscribers_announcement_wp_admin_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_routes;
|
||||
|
||||
$route = array( 'path' => $path );
|
||||
if ( ! empty( $content_module ) ) {
|
||||
$route['content_module'] = $content_module;
|
||||
}
|
||||
if ( ! empty( $route_module ) ) {
|
||||
$route['route_module'] = $route_module;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the jetpack-subscribers-announcement-wp-admin page.
|
||||
* Note: Menu items are registered but not displayed in single-page mode.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_subscribers_announcement_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the jetpack-subscribers-announcement-wp-admin page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_subscribers_announcement_wp_admin_routes() {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_routes;
|
||||
return $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the jetpack-subscribers-announcement-wp-admin page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_subscribers_announcement_wp_admin_menu_items() {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_menu_items;
|
||||
return $jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the jetpack-subscribers-announcement-wp-admin page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles for the jetpack-subscribers-announcement-wp-admin page.
|
||||
* Hooked to admin_enqueue_scripts.
|
||||
*
|
||||
* @param string $hook_suffix The current admin page.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_enqueue_scripts( $hook_suffix ) {
|
||||
// Check all possible ways this page can be accessed:
|
||||
// 1. Menu page via admin.php?page=jetpack-subscribers-announcement-wp-admin (plugin)
|
||||
// 2. Direct file via jetpack-subscribers-announcement.php (Core) - screen ID will be 'jetpack-subscribers-announcement'
|
||||
$current_screen = get_current_screen();
|
||||
$is_our_page = (
|
||||
( isset( $_GET['page'] ) && 'jetpack-subscribers-announcement-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
( $current_screen && 'jetpack-subscribers-announcement' === $current_screen->id )
|
||||
);
|
||||
|
||||
if ( ! $is_our_page ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
/**
|
||||
* Fires when the jetpack-subscribers-announcement admin page is initialized so extensions can register routes and menu items.
|
||||
*/
|
||||
do_action( 'jetpack-subscribers-announcement-wp-admin_init' );
|
||||
|
||||
// Preload REST API data
|
||||
jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_preload_data();
|
||||
|
||||
// Get all registered routes
|
||||
$routes = jetpack_newsletter_get_jetpack_subscribers_announcement_wp_admin_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'jetpack-subscribers-announcement-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
/*
|
||||
* Add inline script to initialize the app using initSinglePage (no menuItems).
|
||||
* The dynamic import is deferred until DOMContentLoaded so that all classic
|
||||
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
|
||||
* wp-theme, etc.) have finished parsing and executing before the boot module
|
||||
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
|
||||
* against the classic-script-printing pass on fast CDN-fronted hosts in
|
||||
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
|
||||
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
|
||||
*/
|
||||
$init_js_function = <<<'JS'
|
||||
( mountId, routes ) => {
|
||||
const run = async () => {
|
||||
const mod = await import( "@wordpress/boot" );
|
||||
mod.initSinglePage( { mountId, routes } );
|
||||
};
|
||||
if ( document.readyState === "loading" ) {
|
||||
document.addEventListener( "DOMContentLoaded", run );
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
}
|
||||
JS;
|
||||
wp_add_inline_script(
|
||||
'jetpack-subscribers-announcement-wp-admin-prerequisites',
|
||||
sprintf(
|
||||
'( %s )( %s, %s );',
|
||||
$init_js_function,
|
||||
wp_json_encode( 'jetpack-subscribers-announcement-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'jetpack-subscribers-announcement-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for jetpack-subscribers-announcement-wp-admin module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the boot script-module dependencies for the
|
||||
* jetpack-subscribers-announcement-wp-admin page.
|
||||
*
|
||||
* Surfaces extending this page can append entries to the boot
|
||||
* dependency list. Each entry is an array with 'import' (string
|
||||
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
|
||||
*
|
||||
* @param array $boot_dependencies Boot dependencies for the page.
|
||||
*/
|
||||
$boot_dependencies = apply_filters(
|
||||
'jetpack-subscribers-announcement-wp-admin_boot_dependencies',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'jetpack-subscribers-announcement-wp-admin',
|
||||
$build_constants['build_url'] . 'pages/jetpack-subscribers-announcement/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'jetpack-subscribers-announcement-wp-admin-prerequisites' );
|
||||
wp_enqueue_script_module( 'jetpack-subscribers-announcement-wp-admin' );
|
||||
wp_enqueue_style( 'jetpack-subscribers-announcement-wp-admin-prerequisites' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the jetpack-subscribers-announcement-wp-admin page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
* This renders within the normal WordPress admin interface.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_render_page() {
|
||||
?>
|
||||
<style>
|
||||
/* Critical styles to prevent layout shifts - inlined for immediate application */
|
||||
|
||||
#wpwrap {
|
||||
overflow-y: auto;
|
||||
}
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Reset wp-admin padding */
|
||||
#wpcontent {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
#wpbody-content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* Hide legacy admin elements */
|
||||
#wpbody-content > div:not(.boot-layout-container):not(#screen-meta) {
|
||||
display: none;
|
||||
}
|
||||
#wpfooter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Accessibility regions */
|
||||
.a11y-speak-region {
|
||||
inset-inline-start: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
/* Admin menu indicators */
|
||||
ul#adminmenu a.wp-has-current-submenu::after,
|
||||
ul#adminmenu > li.current > a.current::after {
|
||||
border-inline-end-color: #fff;
|
||||
}
|
||||
|
||||
/* Media frame fix */
|
||||
.media-frame select.attachment-filters:last-of-type {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Responsive overflow fix for #wpwrap */
|
||||
@media (min-width: 782px) {
|
||||
#wpwrap {
|
||||
overflow-y: initial;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="jetpack-subscribers-announcement-wp-admin-app" class="boot-layout-container"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Hook the enqueue function to admin_enqueue_scripts
|
||||
add_action( 'admin_enqueue_scripts', 'jetpack_newsletter_jetpack_subscribers_announcement_wp_admin_enqueue_scripts' );
|
||||
|
||||
+318
@@ -0,0 +1,318 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: jetpack-subscribers-announcement
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
// Global storage for jetpack-subscribers-announcement routes and menu items
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_routes, $jetpack_newsletter_jetpack_subscribers_announcement_menu_items;
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_routes = array();
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the jetpack-subscribers-announcement page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_subscribers_announcement_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_routes;
|
||||
|
||||
$route = array( 'path' => $path );
|
||||
if ( ! empty( $content_module ) ) {
|
||||
$route['content_module'] = $content_module;
|
||||
}
|
||||
if ( ! empty( $route_module ) ) {
|
||||
$route['route_module'] = $route_module;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the jetpack-subscribers-announcement page.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
* @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'.
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_subscribers_announcement_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) {
|
||||
$menu_item['parent_type'] = $parent_type;
|
||||
}
|
||||
|
||||
$jetpack_newsletter_jetpack_subscribers_announcement_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the jetpack-subscribers-announcement page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_subscribers_announcement_routes() {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_routes;
|
||||
return $jetpack_newsletter_jetpack_subscribers_announcement_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the jetpack-subscribers-announcement page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function jetpack_newsletter_get_jetpack_subscribers_announcement_menu_items() {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_menu_items;
|
||||
return $jetpack_newsletter_jetpack_subscribers_announcement_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the jetpack-subscribers-announcement page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_subscribers_announcement_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the jetpack-subscribers-announcement page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_subscribers_announcement_render_page() {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
// Set current screen
|
||||
set_current_screen();
|
||||
|
||||
// Remove unwanted deprecated handler
|
||||
remove_action( 'admin_head', 'wp_admin_bar_header' );
|
||||
|
||||
// Remove unwanted scripts and styles that were enqueued during `admin_init`
|
||||
foreach ( wp_scripts()->queue as $script ) {
|
||||
wp_dequeue_script( $script );
|
||||
}
|
||||
foreach ( wp_styles()->queue as $style ) {
|
||||
wp_dequeue_style( $style );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires when the jetpack-subscribers-announcement page is initialized so extensions can register routes and menu items.
|
||||
*/
|
||||
do_action( 'jetpack-subscribers-announcement_init' );
|
||||
|
||||
// Enqueue command palette assets for boot-based pages
|
||||
if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) {
|
||||
wp_enqueue_command_palette_assets();
|
||||
}
|
||||
|
||||
// Preload REST API data
|
||||
jetpack_newsletter_jetpack_subscribers_announcement_preload_data();
|
||||
|
||||
// Get all registered routes and menu items
|
||||
$menu_items = jetpack_newsletter_get_jetpack_subscribers_announcement_menu_items();
|
||||
$routes = jetpack_newsletter_get_jetpack_subscribers_announcement_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'jetpack-subscribers-announcement-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
// Add inline script to initialize the app
|
||||
$init_modules = [];
|
||||
wp_add_inline_script(
|
||||
'jetpack-subscribers-announcement-prerequisites',
|
||||
sprintf(
|
||||
'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));',
|
||||
'jetpack-subscribers-announcement-app',
|
||||
wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
esc_url( admin_url( '/' ) )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'jetpack-subscribers-announcement-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for jetpack-subscribers-announcement module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add init modules as static dependencies
|
||||
// No init modules configured
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the boot script-module dependencies for the
|
||||
* jetpack-subscribers-announcement page.
|
||||
*
|
||||
* Surfaces extending this page can append entries to the boot
|
||||
* dependency list. Each entry is an array with 'import' (string
|
||||
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
|
||||
*
|
||||
* @param array $boot_dependencies Boot dependencies for the page.
|
||||
*/
|
||||
$boot_dependencies = apply_filters(
|
||||
'jetpack-subscribers-announcement_boot_dependencies',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'jetpack-subscribers-announcement',
|
||||
$build_constants['build_url'] . 'pages/jetpack-subscribers-announcement/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'jetpack-subscribers-announcement-prerequisites' );
|
||||
wp_enqueue_script_module( 'jetpack-subscribers-announcement' );
|
||||
wp_enqueue_style( 'jetpack-subscribers-announcement-prerequisites' );
|
||||
}
|
||||
|
||||
// Output the HTML
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php echo esc_html( get_admin_page_title() ); ?></title>
|
||||
<style>
|
||||
html {
|
||||
background: #f1f1f1;
|
||||
color: #444;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#wpadminbar { display: none; }
|
||||
</style>
|
||||
<?php
|
||||
global $hook_suffix;
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$hook_suffix = 'jetpack-subscribers-announcement';
|
||||
|
||||
// BEGIN see wp-admin/admin-header.php
|
||||
print_admin_styles();
|
||||
print_head_scripts();
|
||||
|
||||
/** This action is documented in wp-admin/admin-header.php */
|
||||
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
/** This action is documented in wp-admin/admin-header.php */
|
||||
do_action( 'admin_head' );
|
||||
// END see wp-admin/admin-header.php
|
||||
?>
|
||||
</head>
|
||||
<body class="jetpack-subscribers-announcement">
|
||||
<div id="jetpack-subscribers-announcement-app" style="height: 100vh; box-sizing: border-box;"></div>
|
||||
<?php
|
||||
// BEGIN see wp-admin/admin-footer.php
|
||||
|
||||
/** This action is documented in wp-admin/admin-footer.php */
|
||||
do_action( 'admin_footer', '' );
|
||||
|
||||
// Print import map first so it's available for inline scripts
|
||||
wp_script_modules()->print_import_map();
|
||||
print_footer_scripts();
|
||||
wp_script_modules()->print_enqueued_script_modules();
|
||||
wp_script_modules()->print_script_module_preloads();
|
||||
wp_script_modules()->print_script_module_data();
|
||||
|
||||
/** This action is documented in wp-admin/admin-footer.php */
|
||||
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
// END see wp-admin/admin-footer.php
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intercept admin_init to render the page early.
|
||||
* This bypasses the default WordPress admin template.
|
||||
*/
|
||||
function jetpack_newsletter_jetpack_subscribers_announcement_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'jetpack-subscribers-announcement' === $_GET['page'] ) {
|
||||
jetpack_newsletter_jetpack_subscribers_announcement_render_page();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Hook the interceptor to admin_init
|
||||
add_action( 'admin_init', 'jetpack_newsletter_jetpack_subscribers_announcement_intercept_render' );
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '6569e23e23e0349e92b7');
|
||||
+1
@@ -0,0 +1 @@
|
||||
@media(max-width:360px){#wpadminbar .wp-admin-bar-reader{display:none!important}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-item{padding:0}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-item{display:flex;justify-content:center}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon{align-items:center;display:flex;height:100%;margin:0;padding:0 6px}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon{justify-content:center;padding:0}}@media(max-width:480px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon{max-width:40px}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon:before{background-color:currentColor;content:"";display:flex;height:20px;margin:0;mask-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="11" fill="none" viewBox="0 0 24 11"><path fill="%23000" d="m22.875 4.607-.055-.25C22.335 2.175 20.276.584 17.924.584c-1.271 0-2.488.447-3.412 1.264-.32.283-.568.593-.769.894a9.5 9.5 0 0 0-1.711-.18h-.027c-.586 0-1.163.085-1.73.188a4.7 4.7 0 0 0-.777-.91C8.573 1.013 7.356.575 6.085.575 3.724.584 1.665 2.174 1.18 4.358l-.055.249H0v1.4h1.125l.055.25c.458 2.183 2.517 3.773 4.895 3.773 2.764 0 5.005-2.114 5.005-4.718 0 0 .01-.585-.228-1.341a9 9 0 0 1 1.153-.095c.366 0 .75.035 1.143.086-.247.765-.229 1.35-.229 1.35 0 2.604 2.242 4.718 5.005 4.718 2.38 0 4.438-1.581 4.896-3.773l.055-.25H24v-1.4zm-16.8 4.022c-1.94 0-3.522-1.487-3.522-3.326 0-1.84 1.583-3.326 3.522-3.326 1.94 0 3.523 1.487 3.523 3.326 0 1.84-1.583 3.326-3.523 3.326m11.85 0c-1.94 0-3.523-1.487-3.523-3.326 0-1.84 1.583-3.326 3.522-3.326 1.94 0 3.523 1.487 3.523 3.326 0 1.84-1.583 3.326-3.523 3.326"/></svg>');mask-position:center;mask-repeat:no-repeat;width:24px}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon:before{height:36px;margin:0;mask-size:contain;width:36px}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-label{padding-inline-end:8px}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-label{display:none}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader{display:block}}@media(max-width:480px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader{width:46px}}
|
||||
Whitespace-only changes.
+1
@@ -0,0 +1 @@
|
||||
@media(max-width:360px){#wpadminbar .wp-admin-bar-reader{display:none!important}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-item{padding:0}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-item{display:flex;justify-content:center}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon{align-items:center;display:flex;height:100%;margin:0;padding:0 6px}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon{justify-content:center;padding:0}}@media(max-width:480px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon{max-width:40px}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon:before{background-color:currentColor;content:"";display:flex;height:20px;margin:0;mask-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="11" fill="none" viewBox="0 0 24 11"><path fill="%23000" d="m22.875 4.607-.055-.25C22.335 2.175 20.276.584 17.924.584c-1.271 0-2.488.447-3.412 1.264-.32.283-.568.593-.769.894a9.5 9.5 0 0 0-1.711-.18h-.027c-.586 0-1.163.085-1.73.188a4.7 4.7 0 0 0-.777-.91C8.573 1.013 7.356.575 6.085.575 3.724.584 1.665 2.174 1.18 4.358l-.055.249H0v1.4h1.125l.055.25c.458 2.183 2.517 3.773 4.895 3.773 2.764 0 5.005-2.114 5.005-4.718 0 0 .01-.585-.228-1.341a9 9 0 0 1 1.153-.095c.366 0 .75.035 1.143.086-.247.765-.229 1.35-.229 1.35 0 2.604 2.242 4.718 5.005 4.718 2.38 0 4.438-1.581 4.896-3.773l.055-.25H24v-1.4zm-16.8 4.022c-1.94 0-3.522-1.487-3.522-3.326 0-1.84 1.583-3.326 3.522-3.326 1.94 0 3.523 1.487 3.523 3.326 0 1.84-1.583 3.326-3.523 3.326m11.85 0c-1.94 0-3.523-1.487-3.523-3.326 0-1.84 1.583-3.326 3.522-3.326 1.94 0 3.523 1.487 3.523 3.326 0 1.84-1.583 3.326-3.523 3.326"/></svg>');mask-position:center;mask-repeat:no-repeat;width:24px}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-icon:before{height:36px;margin:0;mask-size:contain;width:36px}}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-label{padding-inline-end:8px}@media(max-width:782px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader .ab-label{display:none}#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader{display:block}}@media(max-width:480px){#wpadminbar #wp-admin-bar-top-secondary #wp-admin-bar-reader{width:46px}}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
* Routes registration - Auto-generated by build process.
|
||||
* Registers all routes on their respective page init hooks.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
// Load routes registry
|
||||
$routes_file = __DIR__ . '/routes/registry.php';
|
||||
if ( ! file_exists( $routes_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$routes = require $routes_file;
|
||||
|
||||
// Group routes by page and store in globals for page-specific functions
|
||||
$routes_by_page = array();
|
||||
foreach ( $routes as $route ) {
|
||||
$page_slug = $route['page'];
|
||||
if ( ! isset( $routes_by_page[ $page_slug ] ) ) {
|
||||
$routes_by_page[ $page_slug ] = array();
|
||||
}
|
||||
$routes_by_page[ $page_slug ][] = $route;
|
||||
}
|
||||
|
||||
// Store routes data in globals for each page
|
||||
foreach ( $routes_by_page as $page_slug => $page_routes ) {
|
||||
$page_slug_underscore = str_replace( '-', '_', $page_slug );
|
||||
$global_name = 'jetpack_newsletter_' . $page_slug_underscore . '_routes_data';
|
||||
$GLOBALS[ $global_name ] = $page_routes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic helper function to register routes for a page.
|
||||
*
|
||||
* @param array $page_routes Array of route data for the page.
|
||||
* @param string $register_function_name Name of the function to call for registering each route.
|
||||
*/
|
||||
function jetpack_newsletter_register_page_routes( $page_routes, $register_function_name ) {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/constants.php';
|
||||
|
||||
foreach ( $page_routes as $route ) {
|
||||
$content_handle = null;
|
||||
$route_handle = null;
|
||||
|
||||
// Register content module if exists
|
||||
if ( $route['has_content'] ) {
|
||||
$content_asset_path = __DIR__ . "/routes/{$route['name']}/content.min.asset.php";
|
||||
if ( file_exists( $content_asset_path ) ) {
|
||||
$content_asset = require $content_asset_path;
|
||||
$content_handle = 'jetpack-newsletter/routes/' . $route['name'] . '/content';
|
||||
$extension = '.min.js';
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $content_handle );
|
||||
wp_register_script_module(
|
||||
$content_handle,
|
||||
$build_constants['build_url'] . 'routes/' . $route['name'] . '/content' . $extension,
|
||||
$content_asset['module_dependencies'] ?? array(),
|
||||
$content_asset['version'] ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Register route module if exists
|
||||
if ( $route['has_route'] ) {
|
||||
$route_asset_path = __DIR__ . "/routes/{$route['name']}/route.min.asset.php";
|
||||
if ( file_exists( $route_asset_path ) ) {
|
||||
$route_asset = require $route_asset_path;
|
||||
$route_handle = 'jetpack-newsletter/routes/' . $route['name'] . '/route';
|
||||
$extension = '.min.js';
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $route_handle );
|
||||
wp_register_script_module(
|
||||
$route_handle,
|
||||
$build_constants['build_url'] . 'routes/' . $route['name'] . '/route' . $extension,
|
||||
$route_asset['module_dependencies'] ?? array(),
|
||||
$route_asset['version'] ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Register route with page
|
||||
if ( function_exists( $register_function_name ) ) {
|
||||
call_user_func( $register_function_name, $route['path'], $content_handle, $route_handle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Page-specific route registration functions
|
||||
// Page-specific route registration functions for jetpack-newsletter-dashboard
|
||||
/**
|
||||
* Register routes for jetpack-newsletter-dashboard page (full-page mode).
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_newsletter_dashboard_page_routes() {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_routes_data;
|
||||
jetpack_newsletter_register_page_routes( $jetpack_newsletter_jetpack_newsletter_dashboard_routes_data, 'jetpack_newsletter_register_jetpack_newsletter_dashboard_route' );
|
||||
}
|
||||
add_action( 'jetpack-newsletter-dashboard_init', 'jetpack_newsletter_register_jetpack_newsletter_dashboard_page_routes' );
|
||||
|
||||
/**
|
||||
* Register routes for jetpack-newsletter-dashboard page (wp-admin mode).
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_newsletter_dashboard_wp_admin_page_routes() {
|
||||
global $jetpack_newsletter_jetpack_newsletter_dashboard_routes_data;
|
||||
jetpack_newsletter_register_page_routes( $jetpack_newsletter_jetpack_newsletter_dashboard_routes_data, 'jetpack_newsletter_register_jetpack_newsletter_dashboard_wp_admin_route' );
|
||||
}
|
||||
add_action( 'jetpack-newsletter-dashboard-wp-admin_init', 'jetpack_newsletter_register_jetpack_newsletter_dashboard_wp_admin_page_routes' );
|
||||
|
||||
// Page-specific route registration functions for jetpack-subscribers-announcement
|
||||
/**
|
||||
* Register routes for jetpack-subscribers-announcement page (full-page mode).
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_subscribers_announcement_page_routes() {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_routes_data;
|
||||
jetpack_newsletter_register_page_routes( $jetpack_newsletter_jetpack_subscribers_announcement_routes_data, 'jetpack_newsletter_register_jetpack_subscribers_announcement_route' );
|
||||
}
|
||||
add_action( 'jetpack-subscribers-announcement_init', 'jetpack_newsletter_register_jetpack_subscribers_announcement_page_routes' );
|
||||
|
||||
/**
|
||||
* Register routes for jetpack-subscribers-announcement page (wp-admin mode).
|
||||
*/
|
||||
function jetpack_newsletter_register_jetpack_subscribers_announcement_wp_admin_page_routes() {
|
||||
global $jetpack_newsletter_jetpack_subscribers_announcement_routes_data;
|
||||
jetpack_newsletter_register_page_routes( $jetpack_newsletter_jetpack_subscribers_announcement_routes_data, 'jetpack_newsletter_register_jetpack_subscribers_announcement_wp_admin_route' );
|
||||
}
|
||||
add_action( 'jetpack-subscribers-announcement-wp-admin_init', 'jetpack_newsletter_register_jetpack_subscribers_announcement_wp_admin_page_routes' );
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url', 'wp-warning'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'aaece2843ec8199bb63f');
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
var rD=Object.create;var ew=Object.defineProperty;var oD=Object.getOwnPropertyDescriptor;var iD=Object.getOwnPropertyNames;var nD=Object.getPrototypeOf,aD=Object.prototype.hasOwnProperty;var sD=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var et=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Mr=(e,t)=>{for(var r in t)ew(e,r,{get:t[r],enumerable:!0})},cD=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of iD(t))!aD.call(e,i)&&i!==r&&ew(e,i,{get:()=>t[i],enumerable:!(o=oD(t,i))||o.enumerable});return e};var u=(e,t,r)=>(r=e!=null?rD(nD(e)):{},cD(t||!e||!e.__esModule?ew(r,"default",{value:e,enumerable:!0}):r,e));var Ck=et((rte,Sk)=>{var bl=1e3,vl=bl*60,_l=vl*60,Xs=_l*24,lD=Xs*7,dD=Xs*365.25;Sk.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return uD(e);if(r==="number"&&isFinite(e))return t.long?pD(e):fD(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function uD(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\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(t){var r=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*dD;case"weeks":case"week":case"w":return r*lD;case"days":case"day":case"d":return r*Xs;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_l;case"minutes":case"minute":case"mins":case"min":case"m":return r*vl;case"seconds":case"second":case"secs":case"sec":case"s":return r*bl;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function fD(e){var t=Math.abs(e);return t>=Xs?Math.round(e/Xs)+"d":t>=_l?Math.round(e/_l)+"h":t>=vl?Math.round(e/vl)+"m":t>=bl?Math.round(e/bl)+"s":e+"ms"}function pD(e){var t=Math.abs(e);return t>=Xs?Dp(e,t,Xs,"day"):t>=_l?Dp(e,t,_l,"hour"):t>=vl?Dp(e,t,vl,"minute"):t>=bl?Dp(e,t,bl,"second"):e+" ms"}function Dp(e,t,r,o){var i=t>=r*1.5;return Math.round(e/r)+" "+o+(i?"s":"")}});var Rk=et((ote,kk)=>{function mD(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=s,r.humanize=Ck(),r.destroy=d,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let g=0;g<l.length;g++)f=(f<<5)-f+l.charCodeAt(g),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(l){let f,g=null,m,p;function h(...b){if(!h.enabled)return;let _=h,v=Number(new Date),x=v-(f||v);_.diff=x,_.prev=f,_.curr=v,f=v,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let w=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(S,R)=>{if(S==="%%")return"%";w++;let T=r.formatters[R];if(typeof T=="function"){let y=b[w];S=T.call(_,y),b.splice(w,1),w--}return S}),r.formatArgs.call(_,b),(_.log||r.log).apply(_,b)}return h.namespace=l,h.useColors=r.useColors(),h.color=r.selectColor(l),h.extend=o,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,p=r.enabled(l)),p),set:b=>{g=b}}),typeof r.init=="function"&&r.init(h),h}function o(l,f){let g=r(this.namespace+(typeof f>"u"?":":f)+l);return g.log=this.log,g}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of f)g[0]==="-"?r.skips.push(g.slice(1)):r.names.push(g)}function n(l,f){let g=0,m=0,p=-1,h=0;for(;g<l.length;)if(m<f.length&&(f[m]===l[g]||f[m]==="*"))f[m]==="*"?(p=m,h=g,m++):(g++,m++);else if(p!==-1)m=p+1,h++,g=h;else return!1;for(;m<f.length&&f[m]==="*";)m++;return m===f.length}function a(){let l=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),l}function s(l){for(let f of r.skips)if(n(l,f))return!1;for(let f of r.names)if(n(l,f))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}kk.exports=mD});var Ek=et((zo,Lp)=>{zo.formatArgs=hD;zo.save=bD;zo.load=vD;zo.useColors=gD;zo.storage=_D();zo.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`."))}})();zo.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","#9933Line truncated
|
||||
&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
|
||||
[role=tab]:is([aria-selected=true])
|
||||
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}`);var gf={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},s7=1,d7=(0,xc.forwardRef)(function({children:t,variant:r="default",className:o,activateOnFocus:i,...n},a){let[s,c]=(0,xc.useState)(null),[d,l]=(0,xc.useState)({first:!1,last:!1,isScrolling:!1});(0,xc.useEffect)(()=>{if(!s)return;let g=()=>{let{scrollWidth:b,clientWidth:_,scrollLeft:v}=s,x=Math.max(b-_,0),k=(s.dir||(typeof window<"u"?window.getComputedStyle(s).direction:"ltr"))==="rtl"&&v<0?-v:v;l({first:k>s7,last:k<x-s7,isScrolling:b>_})},m=new ResizeObserver(g);m.observe(s);let p=!1,h=()=>{p||(requestAnimationFrame(()=>{g(),p=!1}),p=!0)};return s.addEventListener("scroll",h,{passive:!0}),g(),()=>{s.removeEventListener("scroll",h),m.disconnect()}},[s]);let f=(0,c7.useMergeRefs)([a,g=>c(g)]);return(0,Yh.jsxs)(cn.List,{ref:f,activateOnFocus:i,"data-select-on-move":i?"true":"false",className:H(gf.tablist,d.first&&gf["is-overflowing-first"],d.last&&gf["is-overflowing-last"],gf[`is-${r}-variant`],o),...n,tabIndex:n.tabIndex??(d.isScrolling?-1:void 0),children:[t,(0,Yh.jsx)(cn.Indicator,{className:gf.indicator})]})});var m7=u(z(),1);var eo=u(z(),1);var hf=u(M(),1),Kh=!1,o2=Kh?(0,eo.createContext)(null):null;function fq(){let e=(0,eo.useContext)(o2);(0,eo.useEffect)(()=>{if(e)return e.registerTab()},[e])}function pq(){}var u7=Kh?fq:pq;function mq(){let e=(0,eo.useContext)(o2);(0,eo.useEffect)(()=>{if(e)return e.registerPanel()},[e])}function gq(){}var f7=Kh?mq:gq;function hq({children:e}){let t=(0,eo.useRef)(0),r=(0,eo.useRef)(0),o=Hh(()=>{let s=t.current,c=r.current;if(s!==c)throw new Error(`Tabs: Tab/Panel count mismatch (${s} Tabs, ${c} Panels). Each Tab must be associated with exactly one Panel. Mismatched or missing associations can break screen reader navigation and violate WAI-ARIA Tabs pattern requirements.`)}),i=(0,eo.useCallback)(()=>(t.current+=1,o(),()=>{t.current-=1,o()}),[o]),n=(0,eo.useCallback)(()=>(r.current+=1,o(),()=>{r.current-=1,o()}),[o]),a=(0,eo.useMemo)(()=>({registerTab:i,registerPanel:n}),[i,n]);return(0,hf.jsx)(o2.Provider,{value:a,children:e})}function bq({children:e}){return(0,hf.jsx)(hf.Fragment,{children:e})}var p7=Kh?hq:bq;var b7=u(M(),1),i2="data-wp-hash";function n2(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&_q(document)),e.__wpStyleRuntime}function vq(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${i2}]`))if(r.getAttribute(i2)===t)return!0;return!1}function g7(e,t,r){if(!e.head)return;let o=n2(),i=o.injectedStyles.get(e);if(i||(i=new Set,o.injectedStyles.set(e,i)),i.has(t))return;if(vq(e,t)){i.add(t);return}let n=e.createElement("style");n.setAttribute(i2,t),n.appendChild(e.createTextNode(r)),e.head.appendChild(n),i.add(t)}function _q(e){let t=n2();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)g7(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function h7(e,t){let r=n2();r.styles.set(e,t);for(let o of r.documents.keys())g7(o,e,t)}typeof process>"u",h7("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-inpu
Line truncated
|
||||
&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
|
||||
[role=tab]:is([aria-selected=true])
|
||||
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}`);var s2={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},S7=(0,y7.forwardRef)(function({className:t,children:r,...o},i){return u7(),(0,bf.jsxs)(cn.Tab,{ref:i,className:H(s2.tab,t),...o,children:[(0,bf.jsx)("span",{className:s2["tab-children"],children:r}),(0,bf.jsx)(ln,{icon:W0,className:s2["tab-chevron"]})]})});var ro=u(M(),1);var C7=u(z(),1),k7=u(M(),1),R7=(0,C7.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...i},n)=>(0,k7.jsx)(o,{ref:n,className:H("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...i,children:e}));R7.displayName="NavigableRegion";var E7=R7;var P7=u(ge(),1),{Fill:O7,Slot:N7}=(0,P7.createSlotFill)("SidebarToggle");var zi=u(M(),1),d2="data-wp-hash";function u2(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Rq(document)),e.__wpStyleRuntime}function kq(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${d2}]`))if(r.getAttribute(d2)===t)return!0;return!1}function A7(e,t,r){if(!e.head)return;let o=u2(),i=o.injectedStyles.get(e);if(i||(i=new Set,o.injectedStyles.set(e,i)),i.has(t))return;if(kq(e,t)){i.add(t);return}let n=e.createElement("style");n.setAttribute(d2,t),n.appendChild(e.createTextNode(r)),e.head.appendChild(n),i.add(t)}function Rq(e){let t=u2();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)A7(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function Eq(e,t){let r=u2();r.styles.set(e,t);for(let o of r.documents.keys())A7(o,e,t)}typeof process>"u",Eq("aa9c241ccc","._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");var Sc={page:"_956b6df0898efed0__page",header:"_0625b55e82a0d93d__header","header-content":"a43c44d5ae28b2e8__header-content","header-actions":"b7cb5b9daf3a3b25__header-actions","header-title":"_8113be94e7caf73c__header-title","header-visual":"_9a776c7f70996f61__header-visual","sidebar-toggle-slot":"d5e0920cd15d35bc__sidebar-toggle-slot","header-subtitle":"_60fea2f6bf5319cd__header-subtitle",content:"be5e57d029ec4036__content","has-padding":"_128806d0b26e3a50__has-padding"};function I7({headingLevel:e=1,breadcrumbs:t,badges:r,visual:o,title:i,subTitle:n,actions:a,showSidebarToggle:s=!0}){let c=`h${e}`;return(0,zi.jsxs)(ve,{direction:"column",className:Sc.header,children:[(0,zi.jsxs)(ve,{className:Sc["header-content"],direction:"row",gap:"sm",justify:"space-between",children:[(0,zi.jsxs)(ve,{direction:"row",gap:"sm",align:"center",justify:"start",children:[s&&(0,zi.jsx)(N7,{bubblesVirtually:!0,className:Sc["sidebar-toggle-slot"]}),o&&(0,zi.jsx)("div",{className:Sc["header-visual"],"aria-hidden":"true",children:o}),i&&(0,zi.jsx)(de,{className:Sc["header-title"],render:(0,zi.jsx)(c,{}),variant:"heading-lg",children:i}),t,r]}),a&&(0,zi.jsx)(ve,{align:"center",className:Sc["header-actions"],direction:"row",gap:"sm",children:a})]}),n&&(0,zi.jsx)(de,{render:(0,zi.jsx)("p",{}),variant:"body-md",className:Sc["header-subtitle"],children:n})]})}var vf=u(M(),1),p2="data-wp-hash";function m2(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyle
Line truncated
|
||||
<div class="gravatar-hovercard__drawer" data-drawer-name="`+o+`">
|
||||
<div class="gravatar-hovercard__drawer-backdrop" data-target-drawer="`+o+`"></div>
|
||||
<div class="gravatar-hovercard__drawer-card">
|
||||
<div class="gravatar-hovercard__drawer-header">
|
||||
<h2 class="gravatar-hovercard__drawer-title">`+i+`</h2>
|
||||
<button class="gravatar-hovercard__drawer-close" data-target-drawer="`+o+`">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 13.0607L15.7123 16.773L16.773 15.7123L13.0607 12L16.773 8.28772L15.7123 7.22706L12 10.9394L8.28771 7.22705L7.22705 8.28771L10.9394 12L7.22706 15.7123L8.28772 16.773L12 13.0607Z" fill="#101517"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<ul class="gravatar-hovercard__drawer-items">
|
||||
`+n+`
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
`},e._openDrawer=function(o,i){var n=i.querySelector('.gravatar-hovercard__drawer[data-drawer-name="'+o.dataset.targetDrawer+'"]');n&&n.classList.add("gravatar-hovercard__drawer--open")},e._closeDrawer=function(o,i){var n=i.querySelector('.gravatar-hovercard__drawer[data-drawer-name="'+o.dataset.targetDrawer+'"]');n&&(n.classList.add("gravatar-hovercard__drawer--closing"),n.classList.remove("gravatar-hovercard__drawer--open"),setTimeout(function(){n.classList.remove("gravatar-hovercard__drawer--closing")},300))},e._createContactDrawerContent=function(o,i){var n=i===void 0?{}:i,a=n.i18n,s=a===void 0?{}:a,c={email:"icons/mail.svg",home_phone:"icons/home-phone.svg",work_phone:"icons/work-phone.svg",cell_phone:"icons/mobile-phone.svg",contact_form:"icons/envelope.svg",calendar:"icons/calendar.svg",calendly:"icons/calendly.svg"},d={email:hr(s,"Email"),home_phone:hr(s,"Home Phone"),work_phone:hr(s,"Work Phone"),cell_phone:hr(s,"Cell Phone"),contact_form:hr(s,"Contact Form"),calendar:hr(s,"Calendar")},l=function(m,p){switch(m){case"email":return"mailto:"+p;case"contact_form":case"calendar":case"calendly":return p.startsWith("http")?p:"https://"+p;default:return null}},f=o.map(function(g){var m,p=g[0],h=g[1],b=l(p,h),_=h.replace(/^(https?:\/\/)?(www\.)?/,"");return _=_.endsWith("/")?_.slice(0,-1):_,b&&(_='<a class="gravatar-hovercard__drawer-item-link" href="'+b+'" target="_blank">'+_+"</a>"),`
|
||||
<li class="gravatar-hovercard__drawer-item">
|
||||
<img
|
||||
class="gravatar-hovercard__drawer-item-icon"
|
||||
width="24"
|
||||
height="24"
|
||||
src="https://s.gravatar.com/`+c[p]+`"
|
||||
alt=""
|
||||
>
|
||||
<div class="gravatar-hovercard__drawer-item-info">
|
||||
<span class="gravatar-hovercard__drawer-item-label">`+((m=d[p])!=null?m:p.replace("_"," "))+`</span>
|
||||
<span class="gravatar-hovercard__drawer-item-text">`+_+`</span>
|
||||
</div>
|
||||
</li>
|
||||
`});return f.join("")},e._createSendMoneyDrawerContent=function(o){var i,n,a=[];return(i=o.links)==null||i.forEach(function(s){a.push(`
|
||||
<li class="gravatar-hovercard__drawer-item">
|
||||
<img class="gravatar-hovercard__drawer-item-icon" width="24" height="24" src="https://s.gravatar.com/icons/link.svg" alt="">
|
||||
<div class="gravatar-hovercard__drawer-item-info">
|
||||
<span class="gravatar-hovercard__drawer-item-label">`+s.label+`</span>
|
||||
<span class="gravatar-hovercard__drawer-item-text">
|
||||
<a class="gravatar-hovercard__drawer-item-link" href="`+s.url+`" target="_blank">
|
||||
`+s.url.replace(/^(https?:\/\/)/,"")+`
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
`)}),(n=o.crypto_wallets)==null||n.forEach(function(s){a.push(`
|
||||
<li class="gravatar-hovercard__drawer-item">
|
||||
<img class="gravatar-hovercard__drawer-item-icon" width="24" height="24" src="https://s.gravatar.com/icons/link.svg" alt="">
|
||||
<div class="gravatar-hovercard__drawer-item-info">
|
||||
<span class="gravatar-hovercard__drawer-item-label">`+s.label+`</span>
|
||||
<span class="gravatar-hovercard__drawer-item-text">`+s.address+`</span>
|
||||
</div>
|
||||
</li>
|
||||
`)}),a.join("")},t._showHovercard=function(o){var i=this,n=o.id,a=o.hash,s=o.params,c=o.ref,d=setTimeout(function(){if(!dn.getElementById(n)&&i._canShowHovercard(a)){var l=new URLSearchParams(s);l.delete("size"),l.set("s","256"),s="?"+l.toString();var f,g={placement:i._placement,offset:i._offset,autoFlip:i._autoFlip,autoShift:i._autoShift};if(i._cachedProfiles.has(a)){var m=i._cachedProfiles.get(a);f=e.createHovercard(Sf({},m,{avatarUrl:m.avatarUrl+s}),{additionalClass:i._additionalClass,myHash:i._myHash,i18n:i._i18n}),i._onHovercardShown(a,f)}else f=e.createHovercardSkeleton({additionalClass:i._additionalClass}),i._onFetchProfileStart(a),fetch(H7(Mq+"/"+a,"source","hovercard")).then(function(p){if(p.status!==200)throw p.status;return p.json()}).then(function(p){var h;i._cachedProfiles.set(a,{hash:p.hash,avatarUrl:p.avatar_url,profileUrl:p.profile_url,displayName:p.display_name,location:p.location,description:p.description,jobTitle:p.job_title,company:p.company,headerImage:p.header_image,hideDefaultHeaderImage:p.hide_default_header_image,backgroundColor:p.background_color,verifiedAccounts:(h=p.verified_accounts)==null?void 0:h.map(function(v){return{type:v.service_type,label:v.service_label,icon:v.service_icon,url:v.url,isHidden:v.is_hidden}}),contactInfo:p.contact_info,payments:p.payments});var b=i._cachedProfiles.get(a),_=e.createHovercard(Sf({},b,{avatarUrl:b.avatarUrl+s}),{additionalClass:i._additionalClass,myHash:i._myHash,i18n:i._i18n}).firstElementChild;f.classList.remove("gravatar-hovercard--skeleton"),f.replaceChildren(_),L7(c,f,g),i._onFetchProfileSuccess(a,i._cachedProfiles.get(a)),i._onHovercardShown(a,f)}).catch(function(p){var h=hr(i._i18n,"Sorry, we are unable to load this Gravatar profile.");switch(p){case 403:h=hr(i._i18n,"This profile is private.");break;case 404:h=hr(i._i18n,"Gravatar not found.");break;case 429:h=hr(i._i18n,"Too Many Requests.");break;case 500:h=hr(i._i18n,"Internal Server Error.");break}var b=p===404?`
|
||||
<i class="gravatar-hovercard__error-message gravatar-hovercard__error-message--claim-gravatar">
|
||||
`+hr(i._i18n,"Is this you?")+`
|
||||
<a href="https://gravatar.com/signup?utm_source=hovercard" target="_blank">
|
||||
`+hr(i._i18n,"Claim your free profile.")+`
|
||||
</a>
|
||||
</i>
|
||||
`:"",_=e.createHovercardError("https://0.gravatar.com/avatar/"+a+s,h,{additionalClass:i._additionalClass,additionalMessage:b}).firstElementChild;f.classList.add("gravatar-hovercard--error"),f.classList.remove("gravatar-hovercard--skeleton"),f.replaceChildren(_),i._onFetchProfileFailure(a,{code:p,message:h})});f.id=n,f.addEventListener("mouseenter",function(){return clearInterval(i._hideHovercardTimeoutIds.get(n))}),f.addEventListener("mouseleave",function(){return i._hideHovercard(n)}),dn.body.appendChild(f),L7(c,f,g)}},this._delayToShow);this._showHovercardTimeoutIds.set(n,d)},t._hideHovercard=function(o,i){var n=this;i===void 0&&(i=this._delayToHide);var a=setTimeout(function(){var s=dn.getElementById(o);s&&(s.remove(),n._onHovercardHidden(o,s))},i);this._hideHovercardTimeoutIds.set(o,a)},t._handleMouseEnter=function(o,i){"ontouchstart"in dn||(o.stopImmediatePropagation(),clearInterval(this._hideHovercardTimeoutIds.get(i.id)),this._showHovercard(i))},t._handleMouseLeave=function(o,i){var n=i.id;"ontouchstart"in dn||(o.stopImmediatePropagation(),clearInterval(this._showHovercardTimeoutIds.get(n)),this._hideHovercard(n))},t._handleMouseClick=function(o){var i=o.id;"ontouchstart"in dn||!this._hideOnTargetClick||(clearInterval(this._showHovercardTimeoutIds.get(i)),this._hideHovercard(i,0))},e})();gs=Cf;Cf.createHovercard=function(e,t){var r,o,i=t===void 0?{}:t,n=i.additionalClass,a=i.myHash,s=i.i18n,c=s===void 0?{}:s,d=e.hash,l=e.avatarUrl,f=e.profileUrl,g=e.displayName,m=e.location,p=e.description,h=e.jobTitle,b=e.company,_=e.headerImage,v=e.hideDefaultHeaderImage,x=e.verifiedAccounts,w=x===void 0?[]:x,k=e.payments,S=e.contactInfo,R=e.backgroundColor,T=dn.createElement("div");T.className="gravatar-hovercard"+(n?" "+n:"");var y=w.find(function(ee){return ee.type==="calendly"&&!ee.isHidden});S&&y&&(S.calendly=y.url);var E=yf(H7(f,"utm_source","hovercard")),C=wf(g),N=!p&&a===d,P=[h,b].filter(Boolean).join(", "),F=(k==null||(r=k.links)==null?void 0:r.length)||(k==null||(o=k.crypto_wallets)==null?void 0:o.length),O=Object.entries(S||{}).filter(function(ee){var ie=ee[0],se=ee[1];return!!se}),A=w.slice(0,3).reduce(function(ee,ie){var se=ie.label,q=ie.icon,Q=ie.url,ue=ie.type,Ae=ie.isHidden;return Ae||ee.push(`
|
||||
<a class="gravatar-hovercard__social-link" href="`+yf(Q)+'" target="_blank" data-service-name="'+ue+`">
|
||||
<img class="gravatar-hovercard__social-icon" src="`+yf(q)+'" width="32" height="32" alt="'+wf(se)+`" />
|
||||
</a>
|
||||
`),ee},[]).join(""),I="",V="",j="",D="";if(_||!v){var L='<img class="gravatar-hovercard__header-image-img" src="'+yf(l)+'" alt=""/>';I='<div class="gravatar-hovercard__header-image">'+(_?"":L)+"</div>"}(O.length||F)&&(O.length&&(V+=`
|
||||
<button class="gravatar-hovercard__button" data-target-drawer="contact">`+hr(c,"Contact")+`</button>
|
||||
`,j=gs._createDrawer("contact",hr(c,"Contact"),gs._createContactDrawerContent(O,{i18n:c}))),F&&(V+=`
|
||||
<button class="gravatar-hovercard__button" data-target-drawer="send-money">`+hr(c,"Send money")+`</button>
|
||||
`,D=gs._createDrawer("send-money",hr(c,"Send money"),gs._createSendMoneyDrawerContent(k))),V=`
|
||||
<div class="gravatar-hovercard__buttons">`+V+`</div>
|
||||
`),T.innerHTML=`
|
||||
<div class="gravatar-hovercard__inner">
|
||||
`+I+`
|
||||
<div class="gravatar-hovercard__header">
|
||||
<a class="gravatar-hovercard__avatar-link" href="`+E+`" target="_blank">
|
||||
<img class="gravatar-hovercard__avatar" src="`+yf(l)+'" width="104" height="104" alt="'+C+`" />
|
||||
</a>
|
||||
<a class="gravatar-hovercard__personal-info-link" href="`+E+`" target="_blank">
|
||||
<h4 class="gravatar-hovercard__name">`+C+`</h4>
|
||||
`+(P?'<p class="gravatar-hovercard__job">'+wf(P)+"</p>":"")+`
|
||||
`+(m?'<p class="gravatar-hovercard__location">'+wf(m)+"</p>":"")+`
|
||||
</a>
|
||||
</div>
|
||||
`+(p?`<div class="gravatar-hovercard__body">
|
||||
<p class="gravatar-hovercard__description">`+wf(p)+`</p>
|
||||
</div>`:"")+`
|
||||
<div class="gravatar-hovercard__social-links">
|
||||
<a class="gravatar-hovercard__social-link" href="`+E+`" target="_blank" data-service-name="gravatar">
|
||||
<img class="gravatar-hovercard__social-icon" src="https://s.gravatar.com/icons/gravatar.svg" width="32" height="32" alt="Gravatar" />
|
||||
</a>
|
||||
`+A+`
|
||||
</div>
|
||||
`+V+`
|
||||
<div class="gravatar-hovercard__footer">
|
||||
<a class="gravatar-hovercard__profile-url" title="`+f+'" href="'+E+`" target="_blank">
|
||||
`+f.replace("https://","")+`
|
||||
</a>
|
||||
<a
|
||||
class="gravatar-hovercard__profile-link`+(N?" gravatar-hovercard__profile-link--edit":"")+`"
|
||||
href="`+(N?"https://gravatar.com/profiles/edit?utm_source=hovercard":E)+`"
|
||||
target="_blank"
|
||||
>
|
||||
`+(N?hr(c,"Edit your profile \u2192"):hr(c,"View profile \u2192"))+`
|
||||
</a>
|
||||
</div>
|
||||
`+j+`
|
||||
`+D+`
|
||||
`+(R?'<div class="gravatar-hovercard__profile-color"></div>':"")+`
|
||||
</div>
|
||||
`;var G=T.querySelector(".gravatar-hovercard__inner"),Y=G.querySelector(".gravatar-hovercard__header-image"),Z=G.querySelector(".gravatar-hovercard__profile-color");return _&&Y&&(Y.style.background=_),R&&Z&&(Z.style.background=R),G.querySelectorAll(".gravatar-hovercard__button").forEach(function(ee){ee.addEventListener("click",function(){return gs._openDrawer(ee,G)})}),G.querySelectorAll(".gravatar-hovercard__drawer-close").forEach(function(ee){ee.addEventListener("click",function(){return gs._closeDrawer(ee,G)})}),G.querySelectorAll(".gravatar-hovercard__drawer-backdrop").forEach(function(ee){ee.addEventListener("click",function(){return gs._closeDrawer(ee,G)})}),T};Cf.createHovercardSkeleton=function(e){var t=e===void 0?{}:e,r=t.additionalClass,o=dn.createElement("div");return o.className="gravatar-hovercard gravatar-hovercard--skeleton"+(r?" "+r:""),o.innerHTML=`
|
||||
<div class="gravatar-hovercard__inner">
|
||||
<div class="gravatar-hovercard__header">
|
||||
<div class="gravatar-hovercard__avatar-link"></div>
|
||||
<div class="gravatar-hovercard__personal-info-link"></div>
|
||||
</div>
|
||||
<div class="gravatar-hovercard__social-links">
|
||||
<div class="gravatar-hovercard__social-link"></div>
|
||||
<div class="gravatar-hovercard__social-link"></div>
|
||||
</div>
|
||||
<div class="gravatar-hovercard__footer">
|
||||
<div class="gravatar-hovercard__profile-url"></div>
|
||||
<div class="gravatar-hovercard__profile-link"></div>
|
||||
</div>
|
||||
</div>
|
||||
`,o};Cf.createHovercardError=function(e,t,r){var o=r===void 0?{}:r,i=o.avatarAlt,n=i===void 0?"Avatar":i,a=o.additionalClass,s=o.additionalMessage,c=s===void 0?"":s,d=dn.createElement("div");return d.className="gravatar-hovercard gravatar-hovercard--error"+(a?" "+a:""),d.innerHTML=`
|
||||
<div class="gravatar-hovercard__inner">
|
||||
<img class="gravatar-hovercard__avatar" src="`+e+'" width="104" height="104" alt="'+n+`" />
|
||||
<div class="gravatar-hovercard__error-message-wrapper">
|
||||
<i class="gravatar-hovercard__error-message">`+t+`</i>
|
||||
`+c+`
|
||||
</div>
|
||||
</div>
|
||||
`,d};var B7=z7.S;if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='0ce1648af6']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","0ce1648af6"),e.appendChild(document.createTextNode(".gravatar-hovercard{color:#000;display:inline-block;font-family:SF Pro Text,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:14px;line-height:1.5;z-index:10000000}.gravatar-hovercard,.gravatar-hovercard:after,.gravatar-hovercard:before{box-sizing:border-box}.gravatar-hovercard *{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;box-sizing:inherit;color:inherit;font:inherit;line-height:inherit;list-style:none;margin:0;padding:0;vertical-align:baseline}.gravatar-hovercard a{cursor:pointer;text-decoration:none}.gravatar-hovercard button{background:none;border:none;cursor:pointer;padding:0}.gravatar-hovercard img,.gravatar-hovercard svg{display:block;height:auto;max-width:100%}.gravatar-hovercard a:focus-visible,.gravatar-hovercard button:focus-visible{outline:2px solid revert}.gravatar-hovercard .gravatar-hovercard__inner{background-color:#fff;border:1px solid #d8dbdd;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,.08);display:flex;flex-direction:column;justify-content:space-between;min-height:273px;overflow:hidden;padding:24px 24px 16px;position:relative;width:336px}.gravatar-hovercard .gravatar-hovercard__header-image{height:75px;left:50%;overflow-y:hidden;position:absolute;top:0;transform:translateX(-50%);width:100%}.gravatar-hovercard .gravatar-hovercard__header-image-img{filter:blur(40px);-o-object-fit:cover;object-fit:cover;transform:translateY(-30%);width:100%}.gravatar-hovercard .gravatar-hovercard__header{display:flex;flex-direction:column;gap:8px;z-index:1}.gravatar-hovercard .gravatar-hovercard__avatar-link{width:-moz-fit-content;width:fit-content}.gravatar-hovercard .gravatar-hovercard__avatar{background-color:#eee;border-radius:50%}.gravatar-hovercard .gravatar-hovercard__name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-family:SF Pro Text,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:32px;font-weight:700;line-height:38px;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.gravatar-hovercard .gravatar-hovercard__job,.gravatar-hovercard .gravatar-hovercard__location{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;color:#707070;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.gravatar-hovercard .gravatar-hovercard__body{margin-top:8px}.gravatar-hovercard .gravatar-hovercard__description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.gravatar-hovercard .gravatar-hovercard__social-links{align-items:center;display:flex;gap:4px;margin-top:16px}.gravatar-hovercard .gravatar-hovercard__buttons{display:flex;gap:16px;margin-top:16px}.gravatar-hovercard .gravatar-hovercard__button{border:1px solid rgba(29,79,196,.3);border-radius:4px;color:#1d4fc4;font-family:SF Pro Text,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:15px;font-weight:600;line-height:21px;min-height:42px;padding:8px;width:100%}.gravatar-hovercard .gravatar-hovercard__button:hover{border:1px solid rgba(29,79,196,.6)}.gravatar-hovercard .gravatar-hovercard__footer{align-items:center;display:flex;gap:12px;justify-content:space-between;margin-top:12px}.gravatar-hovercard .gravatar-hovercard__profile-url{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;color:#707070;overflow:hidden;text-overflow:ellipsis;word-break:break-word;word-break:break-all}.gravatar-hovercard .gravatar-hovercard__profile-link{color:#707070;flex-shrink:0}.gravatar-hovercard .gravatar-hovercard__profile-color{bottom:0;height:4px;left:0;position:absolute;width:100%}.gravatar-hovercard--skeleton .gravatar-hovercard__avatar-link,.gravatar-hovercard--skeleton .gravatar-hovercard__personal-info-link,.gravatar-hovercard--skeleton .gravatar-hovercard__profile-link,.gravatar-hovercard--skeleton .gravatar-hovercard__profile-url,.gravatar-hovercard--skeleton .gravatar-hovercard__social-link{background-color:#eee}.gravatar-hovercard--skeleton .gravatar-hovercard__avatar-link{border-radius:50%;height:104px;width:104px}.gravatar-hovercard--skeleton .gravatar-hovercard__personal-info-link{height:38px;width:70%}.gravatar-hovercard--skeleton .gravatar-hovercard__social-link{border-radius:50%;height:32px;width:32px}.gravatar-hovercard--skeleton .gravatar-hovercard__profile-url{height:21px;width:50%}.gravatar-hovercard--skeleton .gravatar-hovercard__profile-link{height:21px;width:96px}.gravatar-hovercard--error .gravatar-hovercard__inner{align-items:center;gap:34px;justify-content:center}.gravatar-hovercard--error .gravatar-hovercard__error-message-wra
Line truncated
|
||||
another@example.com`}),(0,pe.jsx)(V8,{}),(0,pe.jsx)(Qq,{invalid:l}),(0,pe.jsx)(ve,{direction:"row",justify:"end",gap:"sm",children:(0,pe.jsx)(D8,{count:n.length,isPending:e.isPending,disabled:t,onClick:f})})]})}function Zq({fileName:e,disabled:t,onFile:r,inputRef:o}){let i=(0,vt.useCallback)(()=>{t||o.current?.click()},[t,o]),n=(0,vt.useCallback)(c=>{let d=c.target.files?.[0];d&&r(d)},[r]),a=(0,vt.useCallback)(c=>{let d=c?.[0];d&&r(d)},[r]),s=["jetpack-newsletter__csv-dropzone",e&&"has-file"].filter(Boolean).join(" ");return(0,pe.jsxs)("div",{className:"jetpack-newsletter__csv-dropzone-wrap",children:[(0,pe.jsxs)("button",{type:"button",className:s,onClick:i,disabled:t,children:[(0,pe.jsx)(T0,{className:"jetpack-newsletter__csv-dropzone-icon",icon:e?bc:ch,size:32}),(0,pe.jsx)(de,{variant:"body-md",children:e??(0,lt.__)("Drag a file here, or click to upload a file","jetpack-newsletter")})]}),!t&&(0,pe.jsx)(lb.DropZone,{icon:ch,label:(0,lt.__)("Drop your CSV file to upload","jetpack-newsletter"),onFilesDrop:a}),(0,pe.jsx)("input",{ref:o,type:"file",accept:Gq,className:"jetpack-newsletter__csv-dropzone-input",onChange:n,disabled:t})]})}function eG({mutation:e,importInProgress:t,onClose:r}){let o=(0,vt.useRef)(null),[i,n]=(0,vt.useState)(null),[a,s]=(0,vt.useState)([]),[c,d]=(0,vt.useState)(null),l=(0,vt.useCallback)(g=>{if(!Yq(g)){n(null),s([]),d((0,lt.__)("That file type isn\u2019t supported. Please upload a CSV file (.csv, .txt, or .tsv).","jetpack-newsletter"));return}n(g.name),d(null),s([]);let m=new FileReader;m.onerror=()=>{d((0,lt.__)("Could not read the file. Try again.","jetpack-newsletter"))},m.onload=()=>{let p=typeof m.result=="string"?m.result:"";s(A8(p))},m.readAsText(g)},[]),f=(0,vt.useCallback)(()=>{a.length!==0&&e.mutate(a,{onSuccess:()=>{s([]),n(null),o.current&&(o.current.value=""),r()}})},[e,r,a]);return(0,pe.jsxs)(ve,{direction:"column",gap:"md",children:[(0,pe.jsx)(de,{variant:"body-md",children:(0,vt.createInterpolateElement)((0,lt.__)("Upload a CSV file with your existing subscribers list from platforms like <beehiiv>Beehiiv</beehiiv>, <ghost>Ghost</ghost>, <kit>Kit</kit>, <mailchimp>Mailchimp</mailchimp>, <medium>Medium</medium>, <patreon>Patreon</patreon>, and many others.","jetpack-newsletter"),{beehiiv:(0,pe.jsx)("a",{href:md.beehiiv,target:"_blank",rel:"noreferrer"}),ghost:(0,pe.jsx)("a",{href:md.ghost,target:"_blank",rel:"noreferrer"}),kit:(0,pe.jsx)("a",{href:md.kit,target:"_blank",rel:"noreferrer"}),mailchimp:(0,pe.jsx)("a",{href:md.mailchimp,target:"_blank",rel:"noreferrer"}),medium:(0,pe.jsx)("a",{href:md.medium,target:"_blank",rel:"noreferrer"}),patreon:(0,pe.jsx)("a",{href:md.patreon,target:"_blank",rel:"noreferrer"})})}),(0,pe.jsx)(Zq,{fileName:i,disabled:e.isPending,onFile:l,inputRef:o}),(0,pe.jsx)(V8,{}),c?(0,pe.jsx)(Ge.Root,{intent:"error",children:(0,pe.jsx)(Ge.Description,{children:c})}):null,i&&!c?(0,pe.jsx)(de,{variant:"body-sm",children:(0,lt.sprintf)((0,lt._n)("Found %2$d email address in %1$s.","Found %2$d email addresses in %1$s.",a.length,"jetpack-newsletter"),i,a.length)}):null,(0,pe.jsx)(ve,{direction:"row",justify:"end",gap:"sm",children:(0,pe.jsx)(D8,{count:a.length,isPending:e.isPending,disabled:t,onClick:f})})]})}function tG(){let e=typeof window<"u"?window.location.hostname:"",t=Kq(e),r=(0,vt.useCallback)(()=>{window.location.href=t},[t]);return(0,pe.jsxs)(ve,{direction:"column",gap:"md",children:[(0,pe.jsx)(de,{variant:"body-md",children:(0,lt.__)("Bring your Substack publication over: posts, paid plans (when applicable) and subscribers. The Substack importer runs as a guided wizard on WordPress.com.","jetpack-newsletter")}),(0,pe.jsx)(ve,{direction:"row",justify:"end",gap:"sm",children:(0,pe.jsx)(st,{onClick:r,children:(0,lt.__)("Open Substack importer","jetpack-newsletter")})})]})}function k2({isOpen:e,onClose:t}){let r=k8(),[o,i]=(0,vt.useState)("manual"),n=E8(e),a=(0,vt.useCallback)(l=>{l||t()},[t]),s=(0,vt.useCallback)(l=>{i(l),Gt("jetpack_subscribers_add_question",{method:l})},[]);if(!e)return null;let c=n.data??[],d=c.some(Pf);return(0,pe.jsx)(xr.Root,{open:!0,onOpenChange:a,children:(0,pe.jsxs)(xr.Popup,{children:[(0,pe.jsxs)(xr.Header,{children:[(0,pe.jsx)(xr.Title,{children:(0,lt.__)("Add subscribers","jetpack-newsletter")}),(0,pe.jsx)(xr.CloseIcon,{})]}),(0,pe.jsx)(xr.Content,{children:(0,pe.jsxs)(ve,{direction:"column",gap:"lg",children:[(0,pe.jsx)(Jq,{jobs:c}),(0,pe.jsxs)(gr.Root,{value:o,onValueChange:s,render:(0,pe.jsx)(ve,{direction:"column",gap:"lg"}),children:[(0,pe.jsxs)(gr.List,{variant:"minimal",children:[(0,pe.jsx)(gr.Tab,{value:"manual",children:(0,lt.__)("Manual","jetpack-newsletter")}),(0,pe.jsx)(gr.Tab,{value:"upload",children:(0,lt.__)("Upload CSV","jetpack-newsletter")}),(0,pe.jsx)(gr.Tab,{value:"substack",children:(0,lt.__)("Substack","jetpack-newsletter")})]}),(0,pe.jsx)(gr.Panel,{value:"manual",children:(0,pe.jsx)(Xq,{mutation:r,importInProgress:d,onClose:t})}),(0,pe.jsx)(gr.Panel,{value:"upload",children:(0,pe.jsx)(eG,{mu
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
||||
(**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
|
||||
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
||||
(**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
|
||||
js-sha256/src/sha256.js:
|
||||
(**
|
||||
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
||||
*
|
||||
* @version 0.11.1
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2025
|
||||
* @license MIT
|
||||
*)
|
||||
|
||||
tabbable/dist/index.esm.js:
|
||||
(*!
|
||||
* tabbable 6.4.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*)
|
||||
|
||||
@automattic/format-currency/dist/esm/number-format.js:
|
||||
(*
|
||||
* Exposes number format capability
|
||||
*
|
||||
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
||||
* @license See CREDITS.md
|
||||
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
||||
*)
|
||||
*/
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '214f7487552bc80b234d');
|
||||
+1
@@ -0,0 +1 @@
|
||||
var e={inspector:({search:r})=>r?.tab==="settings"?!1:!!(r?.subscriber||r?.u)};export{e as route};
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Route registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
return array(
|
||||
array(
|
||||
'name' => 'dashboard',
|
||||
'path' => '/',
|
||||
'page' => 'jetpack-newsletter-dashboard',
|
||||
'has_route' => true,
|
||||
'has_content' => true,
|
||||
),
|
||||
array(
|
||||
'name' => 'subscribers-announcement',
|
||||
'path' => '/',
|
||||
'page' => 'jetpack-subscribers-announcement',
|
||||
'has_route' => false,
|
||||
'has_content' => true,
|
||||
)
|
||||
);
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'ad0755c97021548579db');
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
var Ju=Object.create;var Or=Object.defineProperty;var qu=Object.getOwnPropertyDescriptor;var Ku=Object.getOwnPropertyNames;var Gu=Object.getPrototypeOf,Xu=Object.prototype.hasOwnProperty;var Zu=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Le=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}},Ar=(e,t)=>{for(var o in t)Or(e,o,{get:t[o],enumerable:!0})},Qu=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ku(t))!Xu.call(e,r)&&r!==o&&Or(e,r,{get:()=>t[r],enumerable:!(n=qu(t,r))||n.enumerable});return e};var h=(e,t,o)=>(o=e!=null?Ju(Gu(e)):{},Qu(t||!e||!e.__esModule?Or(o,"default",{value:e,enumerable:!0}):o,e));var G=Le((yb,Ds)=>{Ds.exports=window.ReactJSXRuntime});var Ws=Le((xb,Us)=>{var _n={};try{_n=Zu("jetpackConfig")}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),_n={missingConfig:!0}}var $s=e=>Object.hasOwn(_n,e),ef=e=>{if(!$s(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return _n[e]};Us.exports={jetpackConfigHas:$s,jetpackConfigGet:ef}});var Js=Le((Rb,Ys)=>{Ys.exports=window.wp.url});var kt=Le((kb,Gs)=>{Gs.exports=window.wp.i18n});var fe=Le((Tb,Zs)=>{Zs.exports=window.wp.element});var V=Le((Cb,Qs)=>{Qs.exports=window.React});var Vt=Le((o_,Ua)=>{Ua.exports=window.ReactDOM});var Vc=Le(zc=>{"use strict";var wo=V();function sm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var am=typeof Object.is=="function"?Object.is:sm,cm=wo.useState,lm=wo.useEffect,dm=wo.useLayoutEffect,um=wo.useDebugValue;function fm(e,t){var o=t(),n=cm({inst:{value:o,getSnapshot:t}}),r=n[0].inst,i=n[1];return dm(function(){r.value=o,r.getSnapshot=t,li(r)&&i({inst:r})},[e,o,t]),lm(function(){return li(r)&&i({inst:r}),e(function(){li(r)&&i({inst:r})})},[e]),um(o),o}function li(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!am(e,o)}catch{return!0}}function pm(e,t){return t()}var mm=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?pm:fm;zc.useSyncExternalStore=wo.useSyncExternalStore!==void 0?wo.useSyncExternalStore:mm});var di=Le((Ew,Hc)=>{"use strict";Hc.exports=Vc()});var Bc=Le(Fc=>{"use strict";var $n=V(),gm=di();function bm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hm=typeof Object.is=="function"?Object.is:bm,_m=gm.useSyncExternalStore,wm=$n.useRef,vm=$n.useEffect,ym=$n.useMemo,xm=$n.useDebugValue;Fc.useSyncExternalStoreWithSelector=function(e,t,o,n,r){var i=wm(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=ym(function(){function d(p){if(!f){if(f=!0,l=p,p=n(p),r!==void 0&&s.hasValue){var a=s.value;if(r(a,p))return u=a}return u=p}if(a=u,hm(l,p))return a;var g=n(p);return r!==void 0&&r(a,g)?(l=p,a):(l=p,u=g)}var f=!1,l,u,m=o===void 0?null:o;return[function(){return d(t())},m===null?void 0:function(){return d(m())}]},[t,o,n,r]);var c=_m(e,i[0],i[1]);return vm(function(){s.hasValue=!0,s.value=c},[c]),xm(c),c}});var $c=Le((Cw,Dc)=>{"use strict";Dc.exports=Bc()});var eo=Le((qx,fd)=>{fd.exports=window.wp.primitives});var wd=Le((m2,_d)=>{_d.exports=window.wp.theme});var xd=Le((b2,yd)=>{yd.exports=window.wp.privateApis});var Ts=Le((Y3,ku)=>{ku.exports=window.wp.components});var Ne=h(G(),1);var wn=h(Ws(),1),qs=h(Js(),1);function Ho(e){class t extends Error{constructor(...n){super(...n),this.name=e}}return t}var tf=Ho("JsonParseError"),of=Ho("JsonParseAfterRedirectError"),nf=Ho("Api404Error"),rf=Ho("Api404AfterRedirectError"),sf=Ho("FetchNetworkError");function af(e,t){let o=e,n=e,r={"X-WP-Nonce":t},i={credentials:"same-origin",headers:r},s={method:"post",credentials:"same-origin",headers:Object.assign({},r,{"Content-type":"application/json"})},c=f,d={setApiRoot(a){o=a},setWpcomOriginApiUrl(a){n=a},setApiNonce(a){r={"X-WP-Nonce":a},i={credentials:"same-origin",headers:r},s={method:"post",credentials:"same-origin",headers:Object.assign({},r,{"Content-type":"application/json"})}},setCacheBusterCallback:a=>{c=a},registerSite:(a,g,_)=>{let y={};return(0,wn.jetpackConfigHas)("consumer_slug")&&(y.plugin_slug=(0,wn.jetpackConfigGet)("consumer_slug")),g!==null&&(y.redirect_uri=g),_&&(y.from=_),u(`${o}jetpack/v4/connection/register`,s,{body:JSON.stringify(y)}).then(T).then(P)},fetchAuthorizationUrl:a=>l((0,qs.addQueryArgs)(`${o}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:a}),i).then(T).then(P),fetchSiteConnectionData:()=>l(`${o}jetpack/v4/connection/data`,i).then(P),fetchSiteConnectionStatus:()=>l(`${o}jetpack/v4/connection`,i).then(P),fetchSiteConnectionTest:()=>l(`${o}jetpack/v4/connection/test`,i).then(T).then(P),fetchUserConnectionData:()=>l(`${o}jetpack/v4/connection/data`,i).then(P),fetchUserTrLine truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
||||
(**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
|
||||
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
||||
(**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
*/
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* Script registration - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
/**
|
||||
* Registers a script according to `wp_register_script`. Honors this request by
|
||||
* reassigning internal dependency properties of any script handle already
|
||||
* registered by that name. It does not deregister the original script, to
|
||||
* avoid losing inline scripts which may have been attached.
|
||||
*
|
||||
* @param WP_Scripts $scripts WP_Scripts instance.
|
||||
* @param string $handle Name of the script. Should be unique.
|
||||
* @param string $src Full URL of the script, or path of the script relative to the WordPress root directory.
|
||||
* @param array $deps Optional. An array of registered script handles this script depends on. Default empty array.
|
||||
* @param string|bool|null $ver Optional. String specifying script version number, if it has one, which is added to the URL
|
||||
* as a query string for cache busting purposes. If version is set to false, a version
|
||||
* number is automatically added equal to current installed WordPress version.
|
||||
* If set to null, no version is added.
|
||||
* @param bool $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>.
|
||||
* Default 'false'.
|
||||
*/
|
||||
function jetpack_newsletter_override_script( $scripts, $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
|
||||
$script = $scripts->query( $handle, 'registered' );
|
||||
if ( $script ) {
|
||||
/*
|
||||
* In many ways, this is a reimplementation of `wp_register_script` but
|
||||
* bypassing consideration of whether a script by the given handle had
|
||||
* already been registered.
|
||||
*/
|
||||
|
||||
// See: `_WP_Dependency::__construct` .
|
||||
$script->src = $src;
|
||||
$script->deps = $deps;
|
||||
$script->ver = $ver;
|
||||
$script->args = $in_footer ? 1 : null;
|
||||
} else {
|
||||
$scripts->add( $handle, $src, $deps, $ver, ( $in_footer ? 1 : null ) );
|
||||
}
|
||||
|
||||
if ( in_array( 'wp-i18n', $deps, true ) ) {
|
||||
$scripts->set_translations( $handle );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all package scripts.
|
||||
*/
|
||||
function jetpack_newsletter_register_package_scripts( $scripts ) {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/constants.php';
|
||||
$default_version = ! SCRIPT_DEBUG ? $build_constants['version'] : time();
|
||||
$extension = '.min.js';
|
||||
|
||||
$scripts_dir = __DIR__ . '/scripts';
|
||||
$scripts_file = $scripts_dir . '/registry.php';
|
||||
|
||||
if ( ! file_exists( $scripts_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$scripts_data = require $scripts_file;
|
||||
$plugin_dir = dirname( __FILE__ );
|
||||
|
||||
foreach ( $scripts_data as $script_data ) {
|
||||
$asset_file = $scripts_dir . '/' . $script_data['asset'];
|
||||
$asset = file_exists( $asset_file ) ? require $asset_file : array();
|
||||
$dependencies = $asset['dependencies'] ?? array();
|
||||
$version = $asset['version'] ?? $default_version;
|
||||
|
||||
jetpack_newsletter_override_script(
|
||||
$scripts,
|
||||
$script_data['handle'],
|
||||
$build_constants['build_url'] . 'scripts/' . $script_data['path'] . $extension,
|
||||
$dependencies,
|
||||
$version,
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_default_scripts', 'jetpack_newsletter_register_package_scripts' );
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Script registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
return array(
|
||||
|
||||
);
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* Style registration - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* Note: These styles can be overridden by calling jetpack_newsletter_override_style()
|
||||
* in lib/client-assets.php for complex cases (multiple files, conditional deps, etc.)
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
/**
|
||||
* Registers a style according to `wp_register_style`. Honors this request by
|
||||
* deregistering any style by the same handler before registration.
|
||||
*
|
||||
* @param WP_Styles $styles WP_Styles instance.
|
||||
* @param string $handle Name of the stylesheet. Should be unique.
|
||||
* @param string $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
|
||||
* @param array $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
|
||||
* @param string|bool|null $ver Optional. String specifying stylesheet version number, if it has one, which is added to the URL
|
||||
* as a query string for cache busting purposes. If version is set to false, a version
|
||||
* number is automatically added equal to current installed WordPress version.
|
||||
* If set to null, no version is added.
|
||||
* @param string $media Optional. The media for which this stylesheet has been defined.
|
||||
* Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
|
||||
* '(orientation: portrait)' and '(max-width: 640px)'.
|
||||
*/
|
||||
function jetpack_newsletter_override_style( $styles, $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
|
||||
$style = $styles->query( $handle, 'registered' );
|
||||
if ( $style ) {
|
||||
$styles->remove( $handle );
|
||||
}
|
||||
$styles->add( $handle, $src, $deps, $ver, $media );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all package styles (simple cases only).
|
||||
* Complex cases should be manually registered in lib/client-assets.php.
|
||||
*
|
||||
* @param WP_Styles $styles WP_Styles instance.
|
||||
*/
|
||||
function jetpack_newsletter_register_package_styles( $styles ) {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/constants.php';
|
||||
$default_version = ! SCRIPT_DEBUG ? $build_constants['version'] : time();
|
||||
$suffix = '.min';
|
||||
|
||||
$styles_dir = __DIR__ . '/styles';
|
||||
$styles_file = $styles_dir . '/registry.php';
|
||||
|
||||
if ( ! file_exists( $styles_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$styles_data = require $styles_file;
|
||||
$plugin_dir = dirname( __FILE__ );
|
||||
|
||||
foreach ( $styles_data as $style_data ) {
|
||||
jetpack_newsletter_override_style(
|
||||
$styles,
|
||||
$style_data['handle'],
|
||||
$build_constants['build_url'] . 'styles/' . $style_data['path'] . $suffix . '.css',
|
||||
$style_data['dependencies'],
|
||||
$default_version
|
||||
);
|
||||
|
||||
// Enable RTL support (WordPress automatically loads -rtl.css variant)
|
||||
$styles->add_data( $style_data['handle'], 'rtl', 'replace' );
|
||||
$styles->add_data( $style_data['handle'], 'suffix', $suffix );
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_default_styles', 'jetpack_newsletter_register_package_styles' );
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Style registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_newsletter
|
||||
*/
|
||||
|
||||
return array(
|
||||
|
||||
);
|
||||
+1
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '2225f15b2a464a861605');
|
||||
+1
@@ -0,0 +1 @@
|
||||
.wpcom-daily-writing-prompt--prompt{background-color:var(--wpds-color-bg-surface-neutral-weak);border-radius:var(--wpds-border-radius-md);padding:var(--wpds-dimension-padding-md)}.wpcom-daily-writing-prompt--branding{border-block-start:var(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-neutral-weak);padding-block-start:var(--wpds-dimension-padding-md)}.wpcom-daily-writing-prompt--answered-users a{color:var(--wp-ui-button-foreground-color)}.wpcom-daily-writing-prompt--answered-users img{border:var(--wpds-border-width-sm) solid var(--wpds-color-bg-surface-neutral);border-radius:50%;margin-inline-start:calc((var(--wpds-dimension-gap-sm) + var(--wpds-border-width-sm))*-1);vertical-align:middle}.wpcom-daily-writing-prompt--answered-users img:first-child{margin-inline-start:0}
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{var e,t,o={9758(){},4997(e){var t=1e3,o=60*t,r=60*o,n=24*r,i=7*n,a=365.25*n;function s(e,t,o,r){var n=t>=1.5*o;return Math.round(e/o)+" "+r+(n?"s":"")}e.exports=function(e,d){d=d||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\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(!s)return;var d=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return d*a;case"weeks":case"week":case"w":return d*i;case"days":case"day":case"d":return d*n;case"hours":case"hour":case"hrs":case"hr":case"h":return d*r;case"minutes":case"minute":case"mins":case"min":case"m":return d*o;case"seconds":case"second":case"secs":case"sec":case"s":return d*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}(e);if("number"===c&&isFinite(e))return d.long?function(e){var i=Math.abs(e);if(i>=n)return s(e,i,n,"day");if(i>=r)return s(e,i,r,"hour");if(i>=o)return s(e,i,o,"minute");if(i>=t)return s(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=n)return Math.round(e/n)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=o)return Math.round(e/o)+"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))}},372(e,t,o){"use strict";o.d(t,{A:()=>d});var r=o(67);const n=o.n(r)()("dops:analytics");let i,a;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const s={initialize:function(e,t,o){s.setUser(e,t),s.setSuperProps(o),s.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){a={ID:e,username:t}},setSuperProps:function(e){i=e},assignSuperProps:function(e){i=Object.assign(i||{},e)},mc:{bumpStat:function(e,t){const o=function(e,t){let o="";if("object"==typeof e){for(const t in e)o+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);n("Bumping stats %o",e)}else o="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),n('Bumping stat "%s" in group "%s"',t,e);return o}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+o+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const o=function(e,t){let o="";if("object"==typeof e){for(const t in e)o+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);n("Built stats %o",e)}else o="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),n('Built stat "%s" in group "%s"',t,e);return o}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+o+"&t="+Math.random())}},pageView:{record:function(e,t){s.tracks.recordPageView(e),s.ga.recordPageView(e,t)}},purchase:{record:function(e,t,o,r,n,i,a){s.ga.recordPurchase(e,t,o,r,n,i,a)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(!t.blog_id&&"object"==typeof window.jpTracksContext&&window.jpTracksContext.blog_id&&(t.blog_id=window.jpTracksContext.blog_id),i&&(n("- Super Props: %o",i),t=Object.assign(t,i)),n('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):n('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};s.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){s.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){n("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};s.ga.initialized||(a&&(e={userId:"u-"+a.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),s.ga.initialized=!0)},recordPageView:function(e,t){s.ga.initialize(),n("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,o,r){s.ga.initialize();let i="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==o&&(i+=" [Option Label: "+o+"]"),void 0!==r&&(i+=" [Option Value: "+r+"]"),n(i),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,o,r)},recordPurchase:function(e,t,o,r,n,i,a){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:a}),window.ga("ecommerce:addItem",{id:e,name:t,sku:o,price:n,quantity:i}),window.ga("ecommerce:send")}},identifyUser:function(){a&&window._tkq.push(["identifyUser",a.ID,a.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},d=s},7142(e,t,o){"use strict";o.d(t,{A:()=>a});var r=o(7723),n=o(3022),i=o(790);const __=r.__,a=({logoColor:e="#069e08",showText:tLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
.wpcom-daily-writing-prompt--prompt{background-color:var(--wpds-color-bg-surface-neutral-weak);border-radius:var(--wpds-border-radius-md);padding:var(--wpds-dimension-padding-md)}.wpcom-daily-writing-prompt--branding{border-block-start:var(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-neutral-weak);padding-block-start:var(--wpds-dimension-padding-md)}.wpcom-daily-writing-prompt--answered-users a{color:var(--wp-ui-button-foreground-color)}.wpcom-daily-writing-prompt--answered-users img{border:var(--wpds-border-width-sm) solid var(--wpds-color-bg-surface-neutral);border-radius:50%;margin-inline-start:calc((var(--wpds-dimension-gap-sm) + var(--wpds-border-width-sm))*-1);vertical-align:middle}.wpcom-daily-writing-prompt--answered-users img:first-child{margin-inline-start:0}
|
||||
Reference in new issue
Block a user