@automattic/newspack-blocks 4.31.1 → 4.32.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/composer.lock +73 -994
- package/dist/blocks/checkout-button/block.json +3 -0
- package/dist/carousel/view-rtl.css +1 -1
- package/dist/carousel/view.asset.php +1 -1
- package/dist/carousel/view.css +1 -1
- package/dist/editor-rtl.css +20 -16
- package/dist/editor.asset.php +1 -1
- package/dist/editor.css +20 -16
- package/dist/editor.js +32 -28
- package/dist/homepage-articles/view-rtl.css +1 -1
- package/dist/homepage-articles/view.asset.php +1 -1
- package/dist/homepage-articles/view.css +1 -1
- package/dist/modal.asset.php +1 -1
- package/dist/modal.js +1 -1
- package/dist/modalCheckout-rtl.css +1 -1
- package/dist/modalCheckout.asset.php +1 -1
- package/dist/modalCheckout.css +1 -1
- package/dist/modalCheckout.js +1 -1
- package/dist/tiersBased.asset.php +1 -1
- package/dist/tiersBased.js +1 -1
- package/includes/class-modal-checkout.php +354 -5
- package/includes/modal-checkout/class-checkout-data.php +30 -6
- package/languages/newspack-blocks-de_DE-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
- package/languages/newspack-blocks-de_DE-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
- package/languages/newspack-blocks-de_DE-5c566531829f64486c13d7d8df1d6151.json +1 -0
- package/languages/newspack-blocks-de_DE-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
- package/languages/newspack-blocks-de_DE-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
- package/languages/newspack-blocks-de_DE-fef17c08abbcd3d3c4cdc0fd13a9bff5.json +1 -0
- package/languages/newspack-blocks-de_DE.po +427 -322
- package/languages/newspack-blocks-es_ES-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
- package/languages/newspack-blocks-es_ES-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
- package/languages/newspack-blocks-es_ES-5c566531829f64486c13d7d8df1d6151.json +1 -0
- package/languages/newspack-blocks-es_ES-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
- package/languages/newspack-blocks-es_ES-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
- package/languages/newspack-blocks-es_ES-fef17c08abbcd3d3c4cdc0fd13a9bff5.json +1 -0
- package/languages/newspack-blocks-es_ES.po +425 -322
- package/languages/newspack-blocks-fr_BE-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
- package/languages/newspack-blocks-fr_BE-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
- package/languages/newspack-blocks-fr_BE-5c566531829f64486c13d7d8df1d6151.json +1 -0
- package/languages/newspack-blocks-fr_BE-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
- package/languages/newspack-blocks-fr_BE-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
- package/languages/newspack-blocks-fr_BE-fef17c08abbcd3d3c4cdc0fd13a9bff5.json +1 -0
- package/languages/newspack-blocks-fr_BE.po +427 -322
- package/languages/newspack-blocks-nb_NO-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
- package/languages/newspack-blocks-nb_NO-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
- package/languages/newspack-blocks-nb_NO-5c566531829f64486c13d7d8df1d6151.json +1 -0
- package/languages/newspack-blocks-nb_NO-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
- package/languages/newspack-blocks-nb_NO-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
- package/languages/newspack-blocks-nb_NO-fef17c08abbcd3d3c4cdc0fd13a9bff5.json +1 -0
- package/languages/newspack-blocks-nb_NO.po +426 -322
- package/languages/newspack-blocks-pt_PT-37552bb09e2a9fceec1970e3c6d46557.json +1 -1
- package/languages/newspack-blocks-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
- package/languages/newspack-blocks-pt_PT-5c566531829f64486c13d7d8df1d6151.json +1 -0
- package/languages/newspack-blocks-pt_PT-7c29764d5ef91723f5ce454f66431b9e.json +1 -1
- package/languages/newspack-blocks-pt_PT-eeb28f99adedd5fad3081d2756d6f4a4.json +1 -1
- package/languages/newspack-blocks-pt_PT-fef17c08abbcd3d3c4cdc0fd13a9bff5.json +1 -0
- package/languages/newspack-blocks-pt_PT.po +426 -322
- package/languages/newspack-blocks.pot +506 -379
- package/newspack-blocks.php +2 -2
- package/package.json +3 -2
- package/src/blocks/carousel/edit.js +1 -1
- package/src/blocks/carousel/view.scss +5 -1
- package/src/blocks/checkout-button/block.json +3 -0
- package/src/blocks/checkout-button/edit.js +32 -5
- package/src/blocks/checkout-button/view.php +37 -0
- package/src/blocks/donate/consts.ts +2 -1
- package/src/blocks/donate/frequency-slugs.js +10 -0
- package/src/blocks/donate/tiers-based/view.ts +8 -0
- package/src/blocks/homepage-articles/edit.tsx +1 -1
- package/src/blocks/homepage-articles/editor.scss +2 -1
- package/src/blocks/homepage-articles/view.scss +15 -5
- package/src/components/autocomplete-tokenfield.js +21 -7
- package/src/components/autocomplete-tokenfield.scss +1 -1
- package/src/components/autocomplete-tokenfield.test.js +58 -0
- package/src/components/query-controls.js +28 -6
- package/src/components/query-controls.test.js +56 -0
- package/src/components/reorder-modal.js +382 -0
- package/src/components/reorder-modal.scss +87 -0
- package/src/components/reorder-modal.test.js +487 -0
- package/src/components/specific-posts-control.js +91 -0
- package/src/components/specific-posts-control.scss +5 -0
- package/src/components/specific-posts-control.test.js +173 -0
- package/src/modal-checkout/analytics/ga4/utils/index.js +1 -0
- package/src/modal-checkout/checkout-button-trigger.js +29 -2
- package/src/modal-checkout/checkout-button-trigger.test.js +37 -0
- package/src/modal-checkout/checkout.scss +28 -0
- package/src/modal-checkout/donate-trigger.js +134 -0
- package/src/modal-checkout/donate-trigger.test.js +233 -0
- package/src/modal-checkout/index.js +91 -0
- package/src/modal-checkout/modal.js +129 -45
- package/src/modal-checkout/utils.test.js +49 -0
- package/src/shared/js/tiers-based-ready.js +26 -0
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +2 -2
- package/vendor/composer/installed.php +2 -2
package/dist/modalCheckout.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:export{primary-000:#dfe7f4;primary-050:#bfcfe9;primary-100:#9fb6dd;primary-200:#809ed2;primary-300:#6086c7;primary-400:#406ebc;primary-500:#2055b0;primary-600:#003da5;primary-700:#00296e;primary-800:#001f53;primary-900:#001437;primary-1000:#000a1c;secondary-000:#eff9f2;secondary-050:#ddf3e3;secondary-100:#c8ecd4;secondary-200:#b1e6c3;secondary-300:#95dfaf;secondary-400:#6fd898;secondary-500:#26d07c;secondary-600:#1fb36a;secondary-700:#1ba25f;secondary-800:#178e53;secondary-900:#117644;secondary-1000:#09552f;tertiary-000:#fff4f6;tertiary-050:#fee8ed;tertiary-100:#fedbe3;tertiary-200:#fdced8;tertiary-300:#fdbfcd;tertiary-400:#fcaec0;tertiary-500:#fc9bb3;tertiary-600:#d9859a;tertiary-700:#c5788b;tertiary-800:#ad697a;tertiary-900:#905665;tertiary-1000:#683d48;quaternary-000:#fff5ee;quaternary-050:#ffeadc;quaternary-100:#ffdec7;quaternary-200:#ffd1af;quaternary-300:#ffc392;quaternary-400:#ffb46a;quaternary-500:#ffa300;quaternary-600:#dc8c00;quaternary-700:#c77e00;quaternary-800:#af6e00;quaternary-900:#925b00;quaternary-1000:#6a4100;neutral-000:#fff;neutral-050:#f7f7f7;neutral-100:#f0f0f0;neutral-200:#e0e0e0;neutral-300:#ddd;neutral-400:#ccc;neutral-500:#949494;neutral-600:#6c6c6c;neutral-700:#5d5d5d;neutral-800:#393939;neutral-900:#1e1e1e;neutral-1000:#000;overlay-000:rgba(0,0,0,.051);overlay-050:rgba(0,0,0,.102);overlay-100:rgba(0,0,0,.149);overlay-200:#0003;overlay-300:rgba(0,0,0,.302);overlay-400:#0006;overlay-500:rgba(0,0,0,.502);overlay-600:#0009;overlay-700:rgba(0,0,0,.702);overlay-800:#000c;overlay-900:rgba(0,0,0,.902);overlay-1000:rgba(0,0,0,.949);success-000:#edfaef;success-050:#b8e6bf;success-500:#008a20;success-600:#007017;error-000:#fcf0f1;error-050:#facfd2;error-500:#d63638;error-600:#b32d2e;warning-000:#fcf9e8;warning-050:#f5e6ab;warning-300:#dba617;warning-400:#bd8600}#newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);outline:none;padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container a,#newspack_modal_checkout_container a:hover{text-decoration:none}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tr{font-weight:400}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-right:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-applepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-googlepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details .order-review-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details .order-review-wrapper #order_review{margin:0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper:after{clear:both;content:"";display:table}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-right:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{left:0;padding-left:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-left:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing{opacity:.5}#newspack_modal_checkout_container .wc_payment_methods{margin:var(--newspack-ui-spacer-5,24px) 0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method:only-child>span.newspack-ui__input-card{background-color:#0000;border:none;gap:0;grid-template-columns:0;padding:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method:only-child>span.newspack-ui__input-card>label{display:none}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box{background:#0000;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-s,16px);font-weight:400;line-height:var(--newspack-ui-line-height-s,1.5);margin:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-right:var(--newspack-ui-spacer-base,8px);margin-top:calc(var(--newspack-ui-font-size-s, 16px)*var(--newspack-ui-line-height-s, 1.5)/2 - 10px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card{border:1px solid var(--newspack-ui-color-border,#ddd);border-radius:var(--newspack-ui-border-radius-m);color:var(--newspack-ui-label-color,#000);cursor:pointer;display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);font-weight:600;gap:0 var(--newspack-ui-spacer-3,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin-bottom:var(--newspack-ui-spacer-5);margin-top:calc(var(--newspack-ui-spacer-2)*-1);padding:var(--newspack-ui-spacer-3,16px);transition:background-color 125ms ease-in-out,border-color 125ms ease-in-out}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(>input){background:var(--newspack-ui-color-neutral-0,#fff);border-color:var(--newspack-ui-color-border,#ddd)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(>input:checked){background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-neutral-90,#1e1e1e)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox]),#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio]){display:grid!important;grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>:not(input),#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>:not(input){grid-column:2/span 1}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>label,#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>label{grid-column:1/span 2}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>label:before,#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>label:before{margin-right:var(--newspack-ui-spacer-3,16px);transform:translateY(0)!important}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>input,#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>input{margin-top:.125em}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>input+label:before{background:var(--newspack-ui-color-neutral-0,#fff)!important;border:1px solid var(--newspack-ui-color-input-border,#ccc)!important;box-shadow:none;height:var(--newspack-ui-spacer-4,20px);margin:auto 0;width:var(--newspack-ui-spacer-4,20px)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>input:checked+label:before{border:6px solid var(--newspack-ui-color-neutral-90,#1e1e1e)!important}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>label{align-items:center;display:flex;font-weight:var(--newspack-ui-font-weight-strong,600);margin:unset}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>label img{margin-left:auto}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card a{text-decoration:underline}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card .required{color:var(--newspack-ui-color-error-50)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card+span.newspack-ui__input-card{margin-top:calc(var(--newspack-ui-spacer-2, 12px)*-1)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-left:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:#0000;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .sv-wc-payment-gateway-card-icons,#newspack_modal_checkout_container li.payment_method_braintree_paypal .sv-wc-payment-gateway-card-icons{float:right}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_paypal .sv-wc-payment-gateway-payment-form-manage-payment-methods{display:none}#newspack_modal_checkout_container li.payment_method_braintree_credit_card>p.form-row,#newspack_modal_checkout_container li.payment_method_braintree_paypal>p.form-row{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .form-row:after,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .form-row:before,#newspack_modal_checkout_container li.payment_method_braintree_paypal .form-row:after,#newspack_modal_checkout_container li.payment_method_braintree_paypal .form-row:before{display:none}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .form-row input[type=radio]+label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .form-row input[type=radio]+label{display:inline-block}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row{display:block;margin:var(--newspack-ui-spacer-base,8px) 0;padding:0!important}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row label{font-size:var(--newspack-ui-font-size-s,16px);font-weight:600;line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row .wc-braintree-hosted-field-card-number,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row .wc-braintree-hosted-field-card-number,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row .wc-braintree-hosted-field-card-number,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row .wc-braintree-hosted-field-card-number{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-context-hosted]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-context-hosted]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-context-hosted]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-context-hosted]){margin:0}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-paypal-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-paypal-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-paypal-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-paypal-test-amount]){display:none}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method){display:grid!important;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label{font-weight:600;margin:0}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:last-child label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:last-child label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:last-child label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:last-child label{margin:0}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table{width:100%}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:#0000}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{border:solid var(--newspack-ui-color-border,#ddd);border-width:0 0 1px;word-break:break-all}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table tfoot tr:last-child td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table tfoot tr:last-child th{border-bottom:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row label,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row label>input,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field label>input{margin:0 var(--newspack-ui-spacer-2,12px) 0 0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row label>span,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field label>span{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin,#newspack_modal_checkout_container form .newspack-subscription-confirmation-checkbox{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-express-checkout-button-separator,#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_edit_billing{margin-top:0}#newspack_modal_checkout_container #checkout_cancel{margin-bottom:0;margin-top:var(--newspack-ui-spacer-2)}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper:not(:empty){border-left:none;margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0;padding:0!important}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error.newspack-ui__notice--error{padding:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .modal-processing{opacity:.5}#newspack_modal_checkout_container #address_rdi_field{display:none}#newspack_modal_checkout_container .woocommerce-info:has(+#order_review.change-payment-method){background:#0000;font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:0}#newspack_modal_checkout_container #order_review.change-payment-method .payment_box ul.wc-saved-payment-methods{margin-top:0}#newspack_modal_checkout_container #order_review.change-payment-method .update-all-subscriptions-payment-method-wrap label{font-size:var(--newspack-ui-font-size-s,16px);font-weight:400;line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container #update_all_subscriptions_payment_method_field label{margin-bottom:0}
|
|
1
|
+
:export{primary-000:#dfe7f4;primary-050:#bfcfe9;primary-100:#9fb6dd;primary-200:#809ed2;primary-300:#6086c7;primary-400:#406ebc;primary-500:#2055b0;primary-600:#003da5;primary-700:#00296e;primary-800:#001f53;primary-900:#001437;primary-1000:#000a1c;secondary-000:#eff9f2;secondary-050:#ddf3e3;secondary-100:#c8ecd4;secondary-200:#b1e6c3;secondary-300:#95dfaf;secondary-400:#6fd898;secondary-500:#26d07c;secondary-600:#1fb36a;secondary-700:#1ba25f;secondary-800:#178e53;secondary-900:#117644;secondary-1000:#09552f;tertiary-000:#fff4f6;tertiary-050:#fee8ed;tertiary-100:#fedbe3;tertiary-200:#fdced8;tertiary-300:#fdbfcd;tertiary-400:#fcaec0;tertiary-500:#fc9bb3;tertiary-600:#d9859a;tertiary-700:#c5788b;tertiary-800:#ad697a;tertiary-900:#905665;tertiary-1000:#683d48;quaternary-000:#fff5ee;quaternary-050:#ffeadc;quaternary-100:#ffdec7;quaternary-200:#ffd1af;quaternary-300:#ffc392;quaternary-400:#ffb46a;quaternary-500:#ffa300;quaternary-600:#dc8c00;quaternary-700:#c77e00;quaternary-800:#af6e00;quaternary-900:#925b00;quaternary-1000:#6a4100;neutral-000:#fff;neutral-050:#f7f7f7;neutral-100:#f0f0f0;neutral-200:#e0e0e0;neutral-300:#ddd;neutral-400:#ccc;neutral-500:#949494;neutral-600:#6c6c6c;neutral-700:#5d5d5d;neutral-800:#393939;neutral-900:#1e1e1e;neutral-1000:#000;overlay-000:rgba(0,0,0,.051);overlay-050:rgba(0,0,0,.102);overlay-100:rgba(0,0,0,.149);overlay-200:#0003;overlay-300:rgba(0,0,0,.302);overlay-400:#0006;overlay-500:rgba(0,0,0,.502);overlay-600:#0009;overlay-700:rgba(0,0,0,.702);overlay-800:#000c;overlay-900:rgba(0,0,0,.902);overlay-1000:rgba(0,0,0,.949);success-000:#edfaef;success-050:#b8e6bf;success-500:#008a20;success-600:#007017;error-000:#fcf0f1;error-050:#facfd2;error-500:#d63638;error-600:#b32d2e;warning-000:#fcf9e8;warning-050:#f5e6ab;warning-300:#dba617;warning-400:#bd8600}#newspack_modal_checkout_container{background:var(--newspack-ui-color-neutral-0,#fff);outline:none;padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container a,#newspack_modal_checkout_container a:hover{text-decoration:none}#newspack_modal_checkout_container form p{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container form p.form-row-first:has(+.form-row-last:last-child),#newspack_modal_checkout_container form p:last-child{margin-bottom:0}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tr{font-weight:400}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.order-total>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table tfoot>tr.recurring-totals>th,#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table thead>tr>th{font-weight:var(--newspack-ui-font-weight-strong,600)}#newspack_modal_checkout_container table.woocommerce-checkout-review-order-table td.product-name{padding-right:1em}#newspack_modal_checkout_container .order-review-wrapper.hidden,#newspack_modal_checkout_container .woocommerce-form-login-toggle{display:none}#newspack_modal_checkout_container .woocommerce form .form-row .required{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce form .form-row-first:not(:has(+.form-row-last)),#newspack_modal_checkout_container .woocommerce form .form-row-last+.form-row-last,#newspack_modal_checkout_container .woocommerce form .form-row-wide+.form-row-last{clear:both;float:none;width:100%}#newspack_modal_checkout_container .woocommerce-checkout h3{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields h3{margin:0 0 var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details h3{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-applepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-googlepay-container,#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details #ppc-button-ppcp-gateway{margin-bottom:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details .order-review-wrapper{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-checkout #after_customer_details .order-review-wrapper #order_review{margin:0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields label,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-account-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields:not(:has(>*)),#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-shipping-fields:not(:has(>*)){display:none}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper:after{clear:both;content:"";display:table}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields,#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-billing-fields__field-wrapper~.form-row{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-checkout .woocommerce-additional-fields h3{display:none}#newspack_modal_checkout_container #checkout_details{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container #checkout_details h3{margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .billing-details:not(:last-child),#newspack_modal_checkout_container .gift-details:not(:last-child),#newspack_modal_checkout_container .shipping-details:not(:last-child){margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .billing-details p,#newspack_modal_checkout_container .gift-details p,#newspack_modal_checkout_container .shipping-details p{margin:0}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) .required,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) .required{display:none}#newspack_modal_checkout_container #billing_country_field:has(input[readonly][autocomplete=country]) strong,#newspack_modal_checkout_container #shipping_country_field:has(input[readonly][autocomplete=country]) strong{font-weight:400}#newspack_modal_checkout_container #ship-to-different-address{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #ship-to-different-address label{display:flex;font-weight:600;margin:0}#newspack_modal_checkout_container #ship-to-different-address label input[type=checkbox]{display:grid}#newspack_modal_checkout_container #ship-to-different-address span{font-weight:unset}#newspack_modal_checkout_container #ship-to-different-address span:after,#newspack_modal_checkout_container #ship-to-different-address span:before{display:none}#newspack_modal_checkout_container .shipping_address{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .newspack-wcsg--wrapper{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle{align-items:center;display:flex;font-weight:700;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle label{display:flex!important;margin-bottom:0}#newspack_modal_checkout_container .newspack-wcsg--gift-toggle .woocommerce-input-wrapper{line-height:.5;margin-right:.25rem}#newspack_modal_checkout_container .newspack-wcsg--gift-email{max-height:0;overflow:hidden;transition:max-height .25s ease-in-out;visibility:hidden}#newspack_modal_checkout_container .newspack-wcsg--gift-email.visible{margin:var(--newspack-ui-spacer-5,24px) 0 0;max-height:none;visibility:visible}#newspack_modal_checkout_container .woocommerce-account-fields{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields h3:has(+.create-account){display:none}#newspack_modal_checkout_container .woocommerce-account-fields .create-account label:has(input[type=checkbox]){display:grid;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr;margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin:var(--newspack-ui-spacer-base,8px) 0 0}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.bad,#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.short{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.good{color:var(--newspack-ui-color-warning-40,#bd8600)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-strength.strong{color:var(--newspack-ui-color-success-50,#008a20)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account .woocommerce-password-hint{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .woocommerce-account-fields .create-account>p.form-row:last-of-type{margin-bottom:0}#newspack_modal_checkout_container .name-your-price{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_nyp h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_nyp .input-price{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label{align-items:center;display:flex;margin:0;position:relative;width:100%}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label span.currency{left:0;padding-left:16px;position:absolute}#newspack_modal_checkout_container .modal_checkout_nyp .input-price label input{padding-left:32px}#newspack_modal_checkout_container .modal_checkout_nyp .input-price button{margin-top:0}#newspack_modal_checkout_container .modal_checkout_quantity{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .modal_checkout_quantity h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .modal_checkout_quantity .input-quantity{align-items:center;display:flex;flex-wrap:nowrap;gap:.5em;margin:0 0 8px}#newspack_modal_checkout_container .modal_checkout_quantity .input-quantity input{margin:0;width:100%}#newspack_modal_checkout_container .modal_checkout_quantity .input-quantity button{margin-top:0}#newspack_modal_checkout_container .woocommerce-form-coupon{margin-bottom:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-form-coupon h3{color:var(--newspack-ui-label-color,inherit);margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type{align-items:center;display:flex;gap:var(--newspack-ui-spacer-base,#1e1e1e)}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type button,#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type input{margin:0!important}#newspack_modal_checkout_container .woocommerce-form-coupon p:first-of-type+.newspack-ui__helper-text{margin-top:calc(var(--newspack-ui-spacer-3, 16px)*-1)}#newspack_modal_checkout_container .modal_checkout_coupon.modal-processing,#newspack_modal_checkout_container .modal_checkout_nyp.modal-processing,#newspack_modal_checkout_container .modal_checkout_quantity.modal-processing{opacity:.5}#newspack_modal_checkout_container .wc_payment_methods{margin:var(--newspack-ui-spacer-5,24px) 0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method+.wc_payment_method{margin-top:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method:only-child>span.newspack-ui__input-card{background-color:#0000;border:none;gap:0;grid-template-columns:0;padding:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method:only-child>span.newspack-ui__input-card>label{display:none}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box{background:#0000;font-weight:400;padding:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box p{color:var(--newspack-ui-color-neutral-60,#6c6c6c);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li{display:flex}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li:not(:last-child){margin-bottom:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li label{font-size:var(--newspack-ui-font-size-s,16px);font-weight:400;line-height:var(--newspack-ui-line-height-s,1.5);margin:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box ul.wc-saved-payment-methods li input{margin-right:var(--newspack-ui-spacer-base,8px);margin-top:calc(var(--newspack-ui-font-size-s, 16px)*var(--newspack-ui-line-height-s, 1.5)/2 - 10px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0;padding:0!important}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset.wc-payment-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p.form-row{align-items:flex-start;display:flex;gap:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p.form-row input{margin:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box fieldset p.form-row label{font-weight:400;margin-bottom:0}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .newspack-cover-fees label,#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew label{font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .newspack-cover-fees:before,#newspack_modal_checkout_container .wc_payment_methods .wc_payment_method .payment_box .woocommerce-SavedPaymentMethods-saveNew:before{display:none}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card{border:1px solid var(--newspack-ui-color-border,#ddd);border-radius:var(--newspack-ui-border-radius-m);color:var(--newspack-ui-label-color,#000);cursor:pointer;display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);font-weight:600;gap:0 var(--newspack-ui-spacer-3,16px);line-height:var(--newspack-ui-line-height-s,1.5);margin-bottom:var(--newspack-ui-spacer-5);margin-top:calc(var(--newspack-ui-spacer-2)*-1);padding:var(--newspack-ui-spacer-3,16px);transition:background-color 125ms ease-in-out,border-color 125ms ease-in-out}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(>input){background:var(--newspack-ui-color-neutral-0,#fff);border-color:var(--newspack-ui-color-border,#ddd)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(>input:checked){background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-neutral-90,#1e1e1e)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox]),#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio]){display:grid!important;grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>:not(input),#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>:not(input){grid-column:2/span 1}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>label,#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>label{grid-column:1/span 2}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>label:before,#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>label:before{margin-right:var(--newspack-ui-spacer-3,16px);transform:translateY(0)!important}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=checkbox])>input,#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card:has(input[type=radio])>input{margin-top:.125em}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>input+label:before{background:var(--newspack-ui-color-neutral-0,#fff)!important;border:1px solid var(--newspack-ui-color-input-border,#ccc)!important;box-shadow:none;height:var(--newspack-ui-spacer-4,20px);margin:auto 0;width:var(--newspack-ui-spacer-4,20px)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>input:checked+label:before{border:6px solid var(--newspack-ui-color-neutral-90,#1e1e1e)!important}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>label{align-items:center;display:flex;font-weight:var(--newspack-ui-font-weight-strong,600);margin:unset}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card>label img{margin-left:auto}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card a{text-decoration:underline}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card .required{color:var(--newspack-ui-color-error-50)}#newspack_modal_checkout_container .wc_payment_methods span.newspack-ui__input-card+span.newspack-ui__input-card{margin-top:calc(var(--newspack-ui-spacer-2, 12px)*-1)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments .testmode-info{margin-bottom:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments #wc-woocommerce_payments-upe-form{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label){align-items:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label img{margin:0}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) .woopayments-rich-payment-method-label .payment-method-title{margin-left:-.25em;vertical-align:unset}#newspack_modal_checkout_container #payment .payment_method_woocommerce_payments label:has(.woopayments-rich-payment-method-label) span>img{display:none}#newspack_modal_checkout_container .wc-credit-card-form .form-row-wide{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form .wc-stripe-iban-element-field{border:1px solid var(--newspack-ui-color-input-border,#ddd);border-radius:var(--newspack-ui-border-radius-m,6px);display:block;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:calc(var(--newspack-ui-spacer-2, 12px) - 1px) calc(var(--newspack-ui-spacer-3, 16px) - 1px)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-elements-field,#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .wc-stripe-iban-element-field{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .wc-credit-card-form:has(div.stripe-source-errors[role=alert]:not(:empty)) .woocommerce_error{background:#0000;color:var(--newspack-ui-color-error-50,#d63638);font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0}@media(max-width:440px){#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-first,#newspack_modal_checkout_container .wc-credit-card-form#wc-stripe-cc-form .form-row-last{float:none;width:100%}}#newspack_modal_checkout_container #stripe-payment-data~fieldset{margin:var(--newspack-ui-spacer-3,16px) 0 0}#newspack_modal_checkout_container fieldset:has(.woocommerce-SavedPaymentMethods-saveNew[style*="display: none"]){display:none}#newspack_modal_checkout_container #wcpay-upe-element,#newspack_modal_checkout_container .wcpay-upe-element{margin:0;padding:0}#newspack_modal_checkout_container #wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew),#newspack_modal_checkout_container .wcpay-upe-element+div:has(.woocommerce-SavedPaymentMethods-saveNew){margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number{font-size:inherit;font-style:inherit;font-weight:400;line-height:var(--newspack-ui-line-height-xs,1.4286);padding:0;vertical-align:unset}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:focus,#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number:hover{color:inherit;filter:none}#newspack_modal_checkout_container .payment_method_woocommerce_payments .js-woopayments-copy-test-number i{height:1em;width:1em}#newspack_modal_checkout_container .payment_method_woocommerce_payments .testmode-info a{text-decoration:underline}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger){display:block;position:relative}#newspack_modal_checkout_container .woocommerce-input-wrapper:has(.stripe-gateway-stripelink-modal-trigger) .stripe-gateway-stripelink-modal-trigger{inset:calc(50% - 24px) 20px auto auto!important}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .sv-wc-payment-gateway-card-icons,#newspack_modal_checkout_container li.payment_method_braintree_paypal .sv-wc-payment-gateway-card-icons{float:right}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_paypal .sv-wc-payment-gateway-payment-form-manage-payment-methods{display:none}#newspack_modal_checkout_container li.payment_method_braintree_credit_card>p.form-row,#newspack_modal_checkout_container li.payment_method_braintree_paypal>p.form-row{margin-top:var(--newspack-ui-spacer-3,16px)}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .form-row:after,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .form-row:before,#newspack_modal_checkout_container li.payment_method_braintree_paypal .form-row:after,#newspack_modal_checkout_container li.payment_method_braintree_paypal .form-row:before{display:none}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .form-row input[type=radio]+label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .form-row input[type=radio]+label{display:inline-block}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row{display:block;margin:var(--newspack-ui-spacer-base,8px) 0;padding:0!important}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row label{font-size:var(--newspack-ui-font-size-s,16px);font-weight:600;line-height:var(--newspack-ui-line-height-s,1.5);margin:0 0 var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row .wc-braintree-hosted-field-card-number,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row .wc-braintree-hosted-field-card-number,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row .wc-braintree-hosted-field-card-number,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row .wc-braintree-hosted-field-card-number{margin-bottom:var(--newspack-ui-spacer-base,8px)}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-context-hosted]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-context-hosted]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-context-hosted]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-context-hosted]){margin:0}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-paypal-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-paypal-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(label[for=wc-braintree-paypal-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row .sv-wc-payment-gateway-payment-form-manage-payment-methods,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-credit-card-test-amount]),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(label[for=wc-braintree-paypal-test-amount]){display:none}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method),#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method){display:grid!important;gap:0 var(--newspack-ui-spacer-base,8px);grid-template-columns:var(--newspack-ui-spacer-4,20px) 1fr}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-credit-card-tokenize-payment-method) label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:has(#wc-braintree-paypal-tokenize-payment-method) label{font-weight:600;margin:0}#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_credit_card .form-row:last-child label,#newspack_modal_checkout_container li.payment_method_braintree_credit_card .payment_method_braintree_paypal .form-row:last-child label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_credit_card .form-row:last-child label,#newspack_modal_checkout_container li.payment_method_braintree_paypal .payment_method_braintree_paypal .form-row:last-child label{margin:0}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table{width:100%}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table small,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{font-size:var(--newspack-ui-font-size-xs,14px)!important;line-height:var(--newspack-ui-line-height-xs,1.4286)!important}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .recurring-totals th,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table thead th{background:#0000}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method label,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table .woocommerce-shipping-totals #shipping_method li{margin:0}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table th{border:solid var(--newspack-ui-color-border,#ddd);border-width:0 0 1px;word-break:break-all}#newspack_modal_checkout_container .woocommerce-checkout-review-order-table tfoot tr:last-child td,#newspack_modal_checkout_container .woocommerce-checkout-review-order-table tfoot tr:last-child th{border-bottom:0}#newspack_modal_checkout_container .woocommerce .first-payment-date{font-family:var(--newspack-ui-font-family,system-ui)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single,#newspack_modal_checkout_container .woocommerce-invalid input,#newspack_modal_checkout_container .woocommerce-invalid textarea{border-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid .select2-container--default .select2-selection--single:focus,#newspack_modal_checkout_container .woocommerce-invalid input:focus,#newspack_modal_checkout_container .woocommerce-invalid textarea:focus{outline-color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-invalid label{color:var(--newspack-ui-color-error-50,#d63638)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper{margin-bottom:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text{color:var(--newspack-ui-color-neutral-60,#6c6c6c)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions{margin-top:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions :first-child{margin-top:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field{background:var(--newspack-ui-color-neutral-5,#f7f7f7);border-color:var(--newspack-ui-color-border,#ddd);box-shadow:none;font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-top:var(--newspack-ui-spacer-5,24px);padding:var(--newspack-ui-spacer-5,24px)}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row label,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field label{align-items:center;display:flex!important;gap:0;height:20px;justify-content:flex-start;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row label>input,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field label>input{margin:0 var(--newspack-ui-spacer-2,12px) 0 0}#newspack_modal_checkout_container .woocommerce-terms-and-conditions-wrapper>p.form-row label>span,#newspack_modal_checkout_container p#newspack_subscription_confirmation_field label>span{font-size:var(--newspack-ui-font-size-xs,14px);line-height:var(--newspack-ui-line-height-xs,1.4286);margin-bottom:0}#newspack_modal_checkout_container form .automatewoo-optin,#newspack_modal_checkout_container form .newspack-subscription-confirmation-checkbox{margin:var(--newspack-ui-spacer-5,24px) 0 0}#newspack_modal_checkout_container #place-order{margin-bottom:0}#newspack_modal_checkout_container #wc-stripe-express-checkout-button-separator,#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator{display:none!important}#newspack_modal_checkout_container #wc-stripe-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wc-stripe-payment-request-button-separator[style*="display:none"]+.newspack-ui__word-divider,#newspack_modal_checkout_container #wcpay-express-checkout-button-separator[style*="display:none"]+.newspack-ui__word-divider{display:none}#newspack_modal_checkout_container #checkout_edit_billing{margin-top:0}#newspack_modal_checkout_container #checkout_cancel{margin-bottom:0;margin-top:var(--newspack-ui-spacer-2)}#newspack_modal_checkout_container #checkout_error_back{margin-bottom:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup{scroll-margin-top:var(--newspack-ui-spacer-10,64px)}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper li div,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup li div{display:block}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message{background:none;color:inherit;font-family:var(--newspack-ui-font-family,system-ui);font-size:var(--newspack-ui-font-size-xs,14px);list-style-type:none;margin:0;padding:0}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-info li,#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-message li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-error li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-info li,#newspack_modal_checkout_container form.checkout .woocommerce-NoticeGroup .woocommerce-message li{width:100%}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper:not(:empty){border-left:none;margin-bottom:var(--newspack-ui-spacer-5,24px);margin-top:0;padding:0!important}#newspack_modal_checkout_container .woocommerce .woocommerce-notices-wrapper .woocommerce-error.newspack-ui__notice--error{padding:var(--newspack-ui-spacer-2,12px)}#newspack_modal_checkout_container .modal-processing{opacity:.5}#newspack_modal_checkout_container #address_rdi_field{display:none}#newspack_modal_checkout_container .woocommerce-info:has(+#order_review.change-payment-method){background:#0000;font-size:var(--newspack-ui-font-size-s,16px);line-height:var(--newspack-ui-line-height-s,1.5);padding:0}#newspack_modal_checkout_container #order_review.change-payment-method .payment_box ul.wc-saved-payment-methods{margin-top:0}#newspack_modal_checkout_container #order_review.change-payment-method .update-all-subscriptions-payment-method-wrap label{font-size:var(--newspack-ui-font-size-s,16px);font-weight:400;line-height:var(--newspack-ui-line-height-s,1.5)}#newspack_modal_checkout_container #update_all_subscriptions_payment_method_field label{margin-bottom:0}
|
package/dist/modalCheckout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";const e=(e,t={})=>({...t,action:e}),t=["action","action_type","amount","currency","product_id","product_type","variation_id","variation_ids","is_variable","is_grouped","child_ids","price_summary","newspack_popup_id","prompt_title","gate_post_id","recurrence","referrer"],o=(e,o="np_modal_checkout_interaction")=>{if("function"==typeof window.gtag&&e){const c={};for(const o of t)e[o]&&("boolean"==typeof e[o]?e[o]=e[o]?"yes":"no":"true"===e[o]?e[o]="yes":"false"===e[o]&&(e[o]="no"),c[o]=e[o].toString());window.gtag("event",o,c)}};function c(e){"undefined"!=typeof document&&"function"==typeof e&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}function n(e){const t="string"==typeof e?document.getElementById(e):e;if(!t)return console.warn("No container found for checkout data"),{};let o={};if("FORM"===t.tagName){const e=new FormData(t);o=Object.fromEntries(e)}const c=t.dataset.checkout;if(!c)return console.warn("No checkout data found"),o;try{o={...o,...JSON.parse(c)}}catch(e){console.warn("Error parsing checkout data")}const n=new URL(t.ownerDocument.defaultView.location.href);return n.searchParams.get("action_type")&&(o.action_type=n.searchParams.get("action_type")),o}const i=(t="continue")=>{if("function"!=typeof window.gtag)return;const{action_type:c,amount:i,currency:r,product_id:s,product_type:a,recurrence:d,referrer:u,variation_id:p="",gate_post_id:l="",newspack_popup_id:_="",prompt_title:h=""}=n("modal-checkout-product-details"),m={action_type:c,amount:i,currency:r,product_id:s,product_type:a,recurrence:d,referrer:u};p&&(m.variation_id=p),l&&(m.gate_post_id=l),_&&(m.newspack_popup_id=_),h&&(m.prompt_title=h);const f=e(t,m);o(f)};var r;r=jQuery,c(()=>{if(!r)return void console.warn("jQuery is not available.");const t=document.querySelector("#newspack_modal_checkout_container"),s=newspackBlocksModalCheckout.newspack_class_prefix,a=new CustomEvent("checkout-ready"),d=new CustomEvent("checkout-complete"),u=new CustomEvent("checkout-cancel"),p=new CustomEvent("checkout-place-order-start"),l=new CustomEvent("checkout-place-order-success"),_=new CustomEvent("checkout-place-order-error"),h=new CustomEvent("checkout-place-order-critical-error");function m(){r(".woocommerce-notices-wrapper").empty(),r(`.woocommerce-NoticeGroup-checkout, .${s}__inline-error, .woocommerce-error, .woocommerce-message, .wc-block-components-notice-banner`).remove()}function f(i=!0){t.checkoutReady=!0,t.dispatchEvent(a),i&&c(function(){if("function"!=typeof window.gtag)return;const t=n("modal-checkout-product-details"),c=e("loaded",t);o(c)})}if(newspackBlocksModalCheckout.is_checkout_complete)(()=>{if("function"!=typeof window.gtag)return;const t=n("modal-checkout-product-details"),c=e("form_submission_success",t);o(c)})(),t&&(t.checkoutComplete=!0,t.dispatchEvent(d));else{function g(){r("#wcpay-express-checkout-button-separator, #wc-stripe-payment-request-button-separator, #wc-stripe-express-checkout-button-separator").after('<div class="newspack-ui__word-divider">'+newspackBlocksModalCheckout.divider_text+"</div>");let c=[];const a=r("form.checkout"),d=r("#checkout_cancel");if(d.length&&d.on("click",function(){t.dispatchEvent(u)}),!a.length)return console.warn("Checkout form is not available"),void f();const g=r("form.modal_checkout_coupon"),w=r("form.modal_checkout_nyp"),v=r("#checkout_continue"),b=r("#customer_details"),y=r("#after_customer_details"),C=r(".newspack-wcsg--wrapper");function E(){const e=r('input[name="payment_method"]:checked').val();r(".wc_payment_method").removeClass("selected"),r(".wc_payment_method.payment_method_"+e).addClass("selected")}r('input[name="payment_method"]').change(E),r(document).on("payment_method_selected",E),r(document).on("updated_checkout",E),E();let x=!1;function M(){const e=r("form.checkout");return e.length?e.serialize():""}a.on("checkout_place_order",function(){x||(x=!0,t.dispatchEvent(p))}),function(e,t){e.checkoutPlaceOrderProcessing?t():e.addEventListener("checkout-place-order-processing",t)}(t,function(){x&&(a.is(".processing")||(x=!1,t.dispatchEvent(_)))}),a.on("checkout_place_order_success",function(){x=!1,t.dispatchEvent(l)}),r(document.body).on("checkout_error",function(e,o){x&&(x=!1,o&&o.indexOf(newspackBlocksModalCheckout.labels.critical_error)>=0?t.dispatchEvent(h):t.dispatchEvent(_))}),a.on("update_checkout",function(){x&&(x=!1,t.dispatchEvent(_))}),r(document).on("updated_checkout",function(){r("#payment .wc_payment_methods").length?r("#after_customer_details > h3").show():r("#after_customer_details > h3").hide()}),r(document).on("updated_checkout",function(){const e=r(".order-review-wrapper");if(!e.length)return;const t=e.find("table");t.is(".empty")?e.addClass("hidden"):(t.unblock(),e.removeClass("hidden"));const o=r(".payment_methods");if(o.length){const t=e.clone();r(".order-review-wrapper").remove(),o.after(t)}});let $=!1;function O(e=function(){return r(".order-review-wrapper tr.order-total:not(.recurring-total) .amount").first().text().replace(/\s+/g," ").trim()}()){let t=newspackBlocksModalCheckout.labels.complete_button;if(t){if(e&&r("#place_order").has(r("span.cart-price"))){const o=r("<div>"+t+"</div>");o.find(".cart-price").html(e),t=o.html()}r("#place_order").html(t),r("#place_order_clone").html(t),e||function(e){$&&$.abort();const t=r.ajax({url:newspackBlocksModalCheckout.ajax_url,method:"POST",data:{action:"get_cart_total",modal_checkout:1,post_data:M()},success:o=>{o&&$===t&&e(o)},complete:()=>{$===t&&($=!1)}});$=t}(O)}}if(r(document).on("updated_checkout",function(){O()}),C.length){const e=C.find(".newspack-wcsg--gift-toggle input"),t=C.find(".newspack-wcsg--gift-email");e.on("change",function(){e.is(":checked")?t.addClass("visible"):t.removeClass("visible")})}function N(e){a.find(".input-text, select, input:checkbox").trigger("validate").trigger("blur");let t=!1;const o=[],c=e=>{const c=r("#"+e.data("id")+"_field");if(c?.length){t||(t=c);const o=c.find(".woocommerce-error");o.length&&o.remove(),c.addClass("woocommerce-invalid").removeClass("woocommerce-valid"),c.append(`<span class="${s}__inline-error">`+e.text()+"</span>"),e.remove()}else e.is("li")||(e=r("<li />").append(e)),o.push(e)};if(m(),0!==e.trimStart().indexOf("<")?c(r("<li />").append(e)):e.includes("<li")?r(e).find("li").each(function(){c(r(this))}):c(r(e)),o.length){t=!1;const e=r('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout"/>').append(r('<ul class="woocommerce-error" role="alert" />').append(o));a.prepend(e),e.get(0).scrollIntoView({behavior:"smooth"})}t?.length&&(window.scroll({top:t.offset().top-100,left:0,behavior:"smooth"}),t.find("input.input-text, select, input:checkbox").trigger("focus")),j(a),r(document.body).trigger("update_checkout"),r(document.body).trigger("checkout_error",[e])}function B(e){e.preventDefault(),e.stopImmediatePropagation(),P(),i("continue")}function L(e){const t=window.newspack_grecaptcha||{};if(m(),r("#checkout_details").remove(),e)a.attr("data-skip-recaptcha","1"),a.append('<input name="is_validation_only" type="hidden" value="1" />'),"v3"===t?.version&&t.destroy(a.get()),g.length&&g.hide(),w.length&&w.hide(),b.show(),y.hide(),b.find("input").first().focus(),c=function(e,t){const o=r._data(e,"events");return o?t?o[t]||[]:o:[]}(a[0],"submit").slice(0),c.forEach(e=>{a.off("submit",e.handler)}),a.on("submit",B);else{a.removeAttr("data-skip-recaptcha");const e=a.find('[name="is_validation_only"]');if(e.length&&e.remove(),t?.render){a.data("newspack-recaptcha","newspack_modal_checkout");const e=()=>{m(),a.get(0).scrollIntoView({behavior:"smooth"})},o=e=>N(e);t.render(a.get(),e,o),r(document).on("updated_checkout",()=>t.render(a.get(),e,o)),r(document.body).on("checkout_error",()=>t.render(a.get(),e,o))}g.length&&g.show(),w.length&&w.show(),b.hide(),y.show(),function(){r("#checkout_details").remove();const e={};a.serializeArray().forEach(t=>{e[t.name]=t.value});const t=`${newspackBlocksModalCheckout.newspack_class_prefix}__font--xs`,o=[];o.push('<div class="billing-details">'),o.push("<h3>"+newspackBlocksModalCheckout.labels.billing_details+"</h3>"),(e.billing_first_name||e.billing_last_name)&&o.push(`<p class="${t}">`+e.billing_first_name+" "+e.billing_last_name+"</p>"),e.billing_company&&o.push(`<p class="${t}">`+e.billing_company+"</p>");let c="";if((e.billing_address_1||e.billing_address_2)&&(c=`<p class="${t}">`,e.billing_address_1&&(c+=e.billing_address_1),e.billing_address_2&&(c+=" "+e.billing_address_2),c+="<br>",e.billing_city&&(c+=e.billing_city),e.billing_state&&(c+=", "+e.billing_state),e.billing_postcode&&(c+=" "+e.billing_postcode),c+="<br>",e.billing_country&&(c+=e.billing_country)),o.push(c),e.billing_email&&o.push(`<p class="${t}">`+e.billing_email+"</p>"),o.push("</div>"),e.hasOwnProperty("shipping_address_1")){o.push('<div class="shipping-details">'),o.push("<h3>"+newspackBlocksModalCheckout.labels.shipping_details+"</h3>");let n="";e.ship_to_different_address?(n=`<p class="${t}">`,e.shipping_address_1&&(n+=e.shipping_address_1),e.shipping_address_2&&(n+=" "+e.shipping_address_2),n+="<br>",e.shipping_city&&(n+=e.shipping_city),e.shipping_state&&(n+=", "+e.shipping_state),e.shipping_postcode&&(n+=" "+e.shipping_postcode),n+="<br>",e.shipping_country&&(n+=e.shipping_country)):n=c,o.push(n),o.push("</div>")}e.hasOwnProperty("newspack_wcsg_is_gift")&&e.hasOwnProperty("wcsg_gift_recipients_email")&&e.newspack_wcsg_is_gift&&e.wcsg_gift_recipients_email&&(o.push('<div class="gift-details">'),o.push("<h3>"+newspackBlocksModalCheckout.labels.gift_recipient+"</h3>"),o.push(`<p class="${t}">`+e.wcsg_gift_recipients_email+"</p>")),(r("#modal-checkout-product-details").length?r("#modal-checkout-product-details"):r("#after_customer_details")).after('<div id="checkout_details">'+o.join("")+"</div>")}(),a.off("submit",B),c.forEach(e=>{a.on("submit",e.handler)}),k(),r(document.body).trigger("update_checkout",{update_shipping_method:!1})}a.triggerHandler("editing_details",[e]),window.scroll({top:0,left:0,behavior:"smooth"})}function P(e=!1,t=()=>{}){if(!S(a))return console.warn("Unable to block the form"),t(),!1;m();const o=a.find(".woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout");o.length&&o.remove();const c=["save_user_in_woopay"],n=a.serializeArray().filter(e=>!c.includes(e.name));n.push({name:"newspack_blocks_checkout_action",value:"1"}),r.ajax({type:"POST",url:wc_checkout_params.checkout_url,data:n,dataType:"html",success:o=>{let c;try{c=JSON.parse(o)}catch(e){c={messages:'<div class="woocommerce-error">'+wc_checkout_params.i18n_checkout_error+"</div>"}}e||!0!==c.reload?(j(a),c.messages?e||(c.messages?N(c.messages):N(`<div class="${s}__inline-error">`+wc_checkout_params.i18n_checkout_error+"</div>")):(L(!1),r._data(a[0],"events")?.click?.some(e=>"#checkout_edit_billing"===e.selector)||a.on("click","#checkout_edit_billing",function(e){e.preventDefault(),L(!0),i("back")})),t(c)):window.location.reload()},error:(o,c,n)=>{let i="";e||(i='<div class="woocommerce-error">'+(n||wc_checkout_params.i18n_checkout_error)+"</div>",N(i)),t({messages:i})}})}function S(e){return!e.is(".modal-processing")&&(e.find("button[type=submit]").each((e,t)=>{r(t).attr("disabled",!0)}),e.addClass("modal-processing"),!0)}function j(e){return!!e.is(".modal-processing")&&(e.find("button[type=submit]").each((e,t)=>{r(t).attr("disabled",!1)}),e.removeClass("modal-processing"),!0)}v.length?(L(!0),C.length?f():P(!0,f)):f(),g.length&&(g.on("submit",function(e){if(e.preventDefault(),!S(g))return!1;const t={security:wc_checkout_params.apply_coupon_nonce,coupon_code:g.find('input[name="coupon_code"]').val()};r.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),data:t,dataType:"html",success:e=>{if(m(),g.find(".result").remove(),e){const o=e.includes("error");g.append(`<p class="result ${s}__helper-text ${o?s+"__inline-error":""}">`+r(e).text()+"</p>"),o?(g.find('input[name="coupon_code"]').focus(),g.find('h3, input[name="coupon_code"]').addClass("newspack-ui__field-error")):(g.find('input[name="coupon_code"]').focus(),g.find('h3, input[name="coupon_code"]').removeClass("newspack-ui__field-error")),r(document.body).trigger("applied_coupon_in_checkout",[t.coupon_code]),r(document.body).trigger("update_checkout",{update_shipping_method:!1})}},complete:()=>{j(g)}})}),r(document.body).on("removed_coupon_in_checkout",()=>{m(),g.find(".result").remove(),g.find('input[name="coupon_code"]').val("").focus()})),w.length&&w.on("submit",function(e){if(e.preventDefault(),!S(w))return!1;const t=w.find('input[name="price"]');t.attr("disabled",!0);const o={_ajax_nonce:newspackBlocksModalCheckout.nyp_nonce,action:"process_name_your_price_request",price:w.find('input[name="price"]').val(),product_id:w.find('input[name="product_id"]').val(),newspack_checkout_name_your_price:w.find('input[name="newspack_checkout_name_your_price"]').val()};r.ajax({type:"POST",url:newspackBlocksModalCheckout.ajax_url,data:o,success:({success:e,data:t})=>{m(),w.find(".result").remove(),w.append(`<p class="result ${s}__helper-text ${e?"":s+"__inline-error"}">`+t.message+"</p>"),e?w.find('h3, input[name="price"]').removeClass("newspack-ui__field-error"):(w.find('input[name="price"]').focus(),w.find('h3, input[name="price"]').addClass("newspack-ui__field-error")),r(document.body).trigger("update_checkout",{update_shipping_method:!1})},complete:()=>{j(w),t.attr("disabled",!1),t.focus()}})}),a.on("click","#place_order",function(){(()=>{if("function"!=typeof window.gtag)return;const t=n("modal-checkout-product-details"),c=e("form_submission",t);o(c)})()});const D=function(){if(!t)return;const e="data-newspack-error-handled",o=o=>{o.hasAttribute(e)||(o.setAttribute(e,"true"),r(o).addClass(`${s}__notice ${s}__notice--error`),t.dispatchEvent(_),o.scrollIntoView({behavior:"smooth",block:"center"}))},c=e=>!!e.classList?.contains("woocommerce-error")||!(!e.classList?.contains("wc-block-components-notice-banner")||!e.classList?.contains("is-error")),n=new MutationObserver(e=>{for(const t of e)for(const e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;if(c(e))return void o(e);const t=e.querySelector?.(".woocommerce-error, .wc-block-components-notice-banner.is-error");if(t)return void o(t)}});return n.observe(t,{childList:!0,subtree:!0}),n}();if(D){const e=()=>D.disconnect();t.addEventListener("checkout-complete",e),t.addEventListener("checkout-cancel",e),window.addEventListener("beforeunload",e)}}g()}function k(){const e=r("#newspack_subscription_terms_confirmation, #newspack_subscription_confirmation");if(e.length){const t=r("form.checkout"),o=t.find("button#place_order, button#place_order_clone");function c(){const t=e.is(":checked");o.each((e,o)=>{r(o).attr("disabled",!t)})}c(),e.on("change",c),t.on("submit",function(t){if(!e.is(":checked"))return t.preventDefault(),t.stopPropagation(),!1})}}r(document.body).on("updated_checkout payment_method_selected checkout_error",k),r(document).ready(k),r(document.body).on("checkout_error",function(){const e=r(".woocommerce-NoticeGroup-checkout, .woocommerce-notices-wrapper:not(:empty)");e.length&&e.each((e,t)=>r(t).addClass(`${s}__notice ${s}__notice--error`));const t=r("#checkout_error_back");t.length&&t.on("click",e=>{e.preventDefault(),parent.newspackCloseModalCheckout()}),f(!1)}),document.addEventListener("keydown",function(e){"Escape"===e.key&&parent.newspackCloseModalCheckout()}),newspackBlocksModalCheckout.is_error&&r(document.body).trigger("checkout_error")})})();
|
|
1
|
+
(()=>{"use strict";const e=(e,t={})=>({...t,action:e}),t=["action","action_type","amount","currency","product_id","product_type","quantity","variation_id","variation_ids","is_variable","is_grouped","child_ids","price_summary","newspack_popup_id","prompt_title","gate_post_id","recurrence","referrer"],o=(e,o="np_modal_checkout_interaction")=>{if("function"==typeof window.gtag&&e){const c={};for(const o of t)e[o]&&("boolean"==typeof e[o]?e[o]=e[o]?"yes":"no":"true"===e[o]?e[o]="yes":"false"===e[o]&&(e[o]="no"),c[o]=e[o].toString());window.gtag("event",o,c)}};function c(e){"undefined"!=typeof document&&"function"==typeof e&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}function n(e){const t="string"==typeof e?document.getElementById(e):e;if(!t)return console.warn("No container found for checkout data"),{};let o={};if("FORM"===t.tagName){const e=new FormData(t);o=Object.fromEntries(e)}const c=t.dataset.checkout;if(!c)return console.warn("No checkout data found"),o;try{o={...o,...JSON.parse(c)}}catch(e){console.warn("Error parsing checkout data")}const n=new URL(t.ownerDocument.defaultView.location.href);return n.searchParams.get("action_type")&&(o.action_type=n.searchParams.get("action_type")),o}const i=(t="continue")=>{if("function"!=typeof window.gtag)return;const{action_type:c,amount:i,currency:r,product_id:a,product_type:s,recurrence:d,referrer:u,variation_id:l="",gate_post_id:p="",newspack_popup_id:_="",prompt_title:h=""}=n("modal-checkout-product-details"),m={action_type:c,amount:i,currency:r,product_id:a,product_type:s,recurrence:d,referrer:u};l&&(m.variation_id=l),p&&(m.gate_post_id=p),_&&(m.newspack_popup_id=_),h&&(m.prompt_title=h);const f=e(t,m);o(f)};var r;r=jQuery,c(()=>{if(!r)return void console.warn("jQuery is not available.");const t=document.querySelector("#newspack_modal_checkout_container"),a=newspackBlocksModalCheckout.newspack_class_prefix,s=new CustomEvent("checkout-ready"),d=new CustomEvent("checkout-complete"),u=new CustomEvent("checkout-cancel"),l=new CustomEvent("checkout-place-order-start"),p=new CustomEvent("checkout-place-order-success"),_=new CustomEvent("checkout-place-order-error"),h=new CustomEvent("checkout-place-order-critical-error");function m(){r(".woocommerce-notices-wrapper").empty(),r(`.woocommerce-NoticeGroup-checkout, .${a}__inline-error, .woocommerce-error, .woocommerce-message, .wc-block-components-notice-banner`).remove()}function f(i=!0){t.checkoutReady=!0,t.dispatchEvent(s),i&&c(function(){if("function"!=typeof window.gtag)return;const t=n("modal-checkout-product-details"),c=e("loaded",t);o(c)})}if(newspackBlocksModalCheckout.is_checkout_complete)(()=>{if("function"!=typeof window.gtag)return;const t=n("modal-checkout-product-details"),c=e("form_submission_success",t);o(c)})(),t&&(t.checkoutComplete=!0,t.dispatchEvent(d));else{function g(){r("#wcpay-express-checkout-button-separator, #wc-stripe-payment-request-button-separator, #wc-stripe-express-checkout-button-separator").after('<div class="newspack-ui__word-divider">'+newspackBlocksModalCheckout.divider_text+"</div>");let c=[];const s=r("form.checkout"),d=r("#checkout_cancel");if(d.length&&d.on("click",function(){t.dispatchEvent(u)}),!s.length)return console.warn("Checkout form is not available"),void f();const g=r("form.modal_checkout_coupon"),w=r("form.modal_checkout_nyp"),v=r("form.modal_checkout_quantity"),y=r("#checkout_continue"),b=r("#customer_details"),C=r("#after_customer_details"),E=r(".newspack-wcsg--wrapper");function x(){const e=r('input[name="payment_method"]:checked').val();r(".wc_payment_method").removeClass("selected"),r(".wc_payment_method.payment_method_"+e).addClass("selected")}r('input[name="payment_method"]').change(x),r(document).on("payment_method_selected",x),r(document).on("updated_checkout",x),x();let M=!1;function $(){const e=r("form.checkout");return e.length?e.serialize():""}s.on("checkout_place_order",function(){M||(M=!0,t.dispatchEvent(l))}),function(e,t){e.checkoutPlaceOrderProcessing?t():e.addEventListener("checkout-place-order-processing",t)}(t,function(){M&&(s.is(".processing")||(M=!1,t.dispatchEvent(_)))}),s.on("checkout_place_order_success",function(){M=!1,t.dispatchEvent(p)}),r(document.body).on("checkout_error",function(e,o){M&&(M=!1,o&&o.indexOf(newspackBlocksModalCheckout.labels.critical_error)>=0?t.dispatchEvent(h):t.dispatchEvent(_))}),s.on("update_checkout",function(){M&&(M=!1,t.dispatchEvent(_))}),r(document).on("updated_checkout",function(){r("#payment .wc_payment_methods").length?r("#after_customer_details > h3").show():r("#after_customer_details > h3").hide()}),r(document).on("updated_checkout",function(){const e=r(".order-review-wrapper");if(!e.length)return;const t=e.find("table");t.is(".empty")?e.addClass("hidden"):(t.unblock(),e.removeClass("hidden"));const o=r(".payment_methods");if(o.length){const t=e.clone();r(".order-review-wrapper").remove(),o.after(t)}});let B=!1;function O(e=function(){return r(".order-review-wrapper tr.order-total:not(.recurring-total) .amount").first().text().replace(/\s+/g," ").trim()}()){let t=newspackBlocksModalCheckout.labels.complete_button;if(t){if(e&&r("#place_order").has(r("span.cart-price"))){const o=r("<div>"+t+"</div>");o.find(".cart-price").html(e),t=o.html()}r("#place_order").html(t),r("#place_order_clone").html(t),e||function(e){B&&B.abort();const t=r.ajax({url:newspackBlocksModalCheckout.ajax_url,method:"POST",data:{action:"get_cart_total",modal_checkout:1,post_data:$()},success:o=>{o&&B===t&&e(o)},complete:()=>{B===t&&(B=!1)}});B=t}(O)}}if(r(document).on("updated_checkout",function(){O()}),E.length){const e=E.find(".newspack-wcsg--gift-toggle input"),t=E.find(".newspack-wcsg--gift-email");e.on("change",function(){e.is(":checked")?t.addClass("visible"):t.removeClass("visible")})}function q(e){s.find(".input-text, select, input:checkbox").trigger("validate").trigger("blur");let t=!1;const o=[],c=e=>{const c=r("#"+e.data("id")+"_field");if(c?.length){t||(t=c);const o=c.find(".woocommerce-error");o.length&&o.remove(),c.addClass("woocommerce-invalid").removeClass("woocommerce-valid"),c.append(`<span class="${a}__inline-error">`+e.text()+"</span>"),e.remove()}else e.is("li")||(e=r("<li />").append(e)),o.push(e)};if(m(),0!==e.trimStart().indexOf("<")?c(r("<li />").append(e)):e.includes("<li")?r(e).find("li").each(function(){c(r(this))}):c(r(e)),o.length){t=!1;const e=r('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout"/>').append(r('<ul class="woocommerce-error" role="alert" />').append(o));s.prepend(e),e.get(0).scrollIntoView({behavior:"smooth"})}t?.length&&(window.scroll({top:t.offset().top-100,left:0,behavior:"smooth"}),t.find("input.input-text, select, input:checkbox").trigger("focus")),D(s),r(document.body).trigger("update_checkout"),r(document.body).trigger("checkout_error",[e])}function N(e,t){v.find(".result").remove(),v.append(`<p class="result ${a}__helper-text ${e?"":a+"__inline-error"}">`+t+"</p>"),v.find('h3, input[name="quantity"]').toggleClass("newspack-ui__field-error",!e)}function j(e){e.preventDefault(),e.stopImmediatePropagation(),P(),i("continue")}function S(e){const t=window.newspack_grecaptcha||{};if(m(),r("#checkout_details").remove(),e)s.attr("data-skip-recaptcha","1"),s.append('<input name="is_validation_only" type="hidden" value="1" />'),"v3"===t?.version&&t.destroy(s.get()),g.length&&g.hide(),w.length&&w.hide(),v.length&&v.hide(),b.show(),C.hide(),b.find("input").first().focus(),c=function(e,t){const o=r._data(e,"events");return o?t?o[t]||[]:o:[]}(s[0],"submit").slice(0),c.forEach(e=>{s.off("submit",e.handler)}),s.on("submit",j);else{s.removeAttr("data-skip-recaptcha");const e=s.find('[name="is_validation_only"]');if(e.length&&e.remove(),t?.render){s.data("newspack-recaptcha","newspack_modal_checkout");const e=()=>{m(),s.get(0).scrollIntoView({behavior:"smooth"})},o=e=>q(e);t.render(s.get(),e,o),r(document).on("updated_checkout",()=>t.render(s.get(),e,o)),r(document.body).on("checkout_error",()=>t.render(s.get(),e,o))}g.length&&g.show(),w.length&&w.show(),v.length&&v.show(),b.hide(),C.show(),function(){r("#checkout_details").remove();const e={};s.serializeArray().forEach(t=>{e[t.name]=t.value});const t=`${newspackBlocksModalCheckout.newspack_class_prefix}__font--xs`,o=[];o.push('<div class="billing-details">'),o.push("<h3>"+newspackBlocksModalCheckout.labels.billing_details+"</h3>"),(e.billing_first_name||e.billing_last_name)&&o.push(`<p class="${t}">`+e.billing_first_name+" "+e.billing_last_name+"</p>"),e.billing_company&&o.push(`<p class="${t}">`+e.billing_company+"</p>");let c="";if((e.billing_address_1||e.billing_address_2)&&(c=`<p class="${t}">`,e.billing_address_1&&(c+=e.billing_address_1),e.billing_address_2&&(c+=" "+e.billing_address_2),c+="<br>",e.billing_city&&(c+=e.billing_city),e.billing_state&&(c+=", "+e.billing_state),e.billing_postcode&&(c+=" "+e.billing_postcode),c+="<br>",e.billing_country&&(c+=e.billing_country)),o.push(c),e.billing_email&&o.push(`<p class="${t}">`+e.billing_email+"</p>"),o.push("</div>"),e.hasOwnProperty("shipping_address_1")){o.push('<div class="shipping-details">'),o.push("<h3>"+newspackBlocksModalCheckout.labels.shipping_details+"</h3>");let n="";e.ship_to_different_address?(n=`<p class="${t}">`,e.shipping_address_1&&(n+=e.shipping_address_1),e.shipping_address_2&&(n+=" "+e.shipping_address_2),n+="<br>",e.shipping_city&&(n+=e.shipping_city),e.shipping_state&&(n+=", "+e.shipping_state),e.shipping_postcode&&(n+=" "+e.shipping_postcode),n+="<br>",e.shipping_country&&(n+=e.shipping_country)):n=c,o.push(n),o.push("</div>")}e.hasOwnProperty("newspack_wcsg_is_gift")&&e.hasOwnProperty("wcsg_gift_recipients_email")&&e.newspack_wcsg_is_gift&&e.wcsg_gift_recipients_email&&(o.push('<div class="gift-details">'),o.push("<h3>"+newspackBlocksModalCheckout.labels.gift_recipient+"</h3>"),o.push(`<p class="${t}">`+e.wcsg_gift_recipients_email+"</p>")),(r("#modal-checkout-product-details").length?r("#modal-checkout-product-details"):r("#after_customer_details")).after('<div id="checkout_details">'+o.join("")+"</div>")}(),s.off("submit",j),c.forEach(e=>{s.on("submit",e.handler)}),k(),r(document.body).trigger("update_checkout",{update_shipping_method:!1})}s.triggerHandler("editing_details",[e]),window.scroll({top:0,left:0,behavior:"smooth"})}function P(e=!1,t=()=>{}){if(!L(s))return console.warn("Unable to block the form"),t(),!1;m();const o=s.find(".woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout");o.length&&o.remove();const c=["save_user_in_woopay"],n=s.serializeArray().filter(e=>!c.includes(e.name));n.push({name:"newspack_blocks_checkout_action",value:"1"}),r.ajax({type:"POST",url:wc_checkout_params.checkout_url,data:n,dataType:"html",success:o=>{let c;try{c=JSON.parse(o)}catch(e){c={messages:'<div class="woocommerce-error">'+wc_checkout_params.i18n_checkout_error+"</div>"}}e||!0!==c.reload?(D(s),c.messages?e||(c.messages?q(c.messages):q(`<div class="${a}__inline-error">`+wc_checkout_params.i18n_checkout_error+"</div>")):(S(!1),r._data(s[0],"events")?.click?.some(e=>"#checkout_edit_billing"===e.selector)||s.on("click","#checkout_edit_billing",function(e){e.preventDefault(),S(!0),i("back")})),t(c)):window.location.reload()},error:(o,c,n)=>{let i="";e||(i='<div class="woocommerce-error">'+(n||wc_checkout_params.i18n_checkout_error)+"</div>",q(i)),t({messages:i})}})}function L(e){return!e.is(".modal-processing")&&(e.find("button[type=submit]").each((e,t)=>{r(t).attr("disabled",!0)}),e.addClass("modal-processing"),!0)}function D(e){return!!e.is(".modal-processing")&&(e.find("button[type=submit]").each((e,t)=>{r(t).attr("disabled",!1)}),e.removeClass("modal-processing"),!0)}y.length?(S(!0),E.length?f():P(!0,f)):f(),g.length&&(g.on("submit",function(e){if(e.preventDefault(),!L(g))return!1;const t={security:wc_checkout_params.apply_coupon_nonce,coupon_code:g.find('input[name="coupon_code"]').val()};r.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),data:t,dataType:"html",success:e=>{if(m(),g.find(".result").remove(),e){const o=e.includes("error");g.append(`<p class="result ${a}__helper-text ${o?a+"__inline-error":""}">`+r(e).text()+"</p>"),o?(g.find('input[name="coupon_code"]').focus(),g.find('h3, input[name="coupon_code"]').addClass("newspack-ui__field-error")):(g.find('input[name="coupon_code"]').focus(),g.find('h3, input[name="coupon_code"]').removeClass("newspack-ui__field-error")),r(document.body).trigger("applied_coupon_in_checkout",[t.coupon_code]),r(document.body).trigger("update_checkout",{update_shipping_method:!1})}},complete:()=>{D(g)}})}),r(document.body).on("removed_coupon_in_checkout",()=>{m(),g.find(".result").remove(),g.find('input[name="coupon_code"]').val("").focus()})),w.length&&w.on("submit",function(e){if(e.preventDefault(),!L(w))return!1;const t=w.find('input[name="price"]');t.attr("disabled",!0);const o={_ajax_nonce:newspackBlocksModalCheckout.nyp_nonce,action:"process_name_your_price_request",price:w.find('input[name="price"]').val(),product_id:w.find('input[name="product_id"]').val(),newspack_checkout_name_your_price:w.find('input[name="newspack_checkout_name_your_price"]').val()};r.ajax({type:"POST",url:newspackBlocksModalCheckout.ajax_url,data:o,success:({success:e,data:t})=>{m(),w.find(".result").remove(),w.append(`<p class="result ${a}__helper-text ${e?"":a+"__inline-error"}">`+t.message+"</p>"),e?w.find('h3, input[name="price"]').removeClass("newspack-ui__field-error"):(w.find('input[name="price"]').focus(),w.find('h3, input[name="price"]').addClass("newspack-ui__field-error")),r(document.body).trigger("update_checkout",{update_shipping_method:!1})},complete:()=>{D(w),t.attr("disabled",!1),t.focus()}})}),v.length&&v.on("submit",function(e){if(e.preventDefault(),!L(v))return!1;const t=v.find('input[name="quantity"]');t.attr("disabled",!0);const o={_ajax_nonce:newspackBlocksModalCheckout.quantity_nonce,action:"process_quantity_request",quantity:t.val(),product_id:v.find('input[name="product_id"]').val()};r.ajax({type:"POST",url:newspackBlocksModalCheckout.ajax_url,data:o,success:e=>{if(!e||void 0===e.success)return void N(!1,newspackBlocksModalCheckout.quantity_error);const{success:o,data:c}=e;m(),N(o,c?.message||newspackBlocksModalCheckout.quantity_error),o?(c.checkout_data&&(r("#modal-checkout-product-details").attr("data-checkout",JSON.stringify(c.checkout_data)),c.checkout_data.quantity&&t.val(c.checkout_data.quantity)),r(document.body).trigger("update_checkout",{update_shipping_method:!1})):t.focus()},error:()=>N(!1,newspackBlocksModalCheckout.quantity_error),complete:()=>{D(v),t.attr("disabled",!1),t.focus()}})}),s.on("click","#place_order",function(){(()=>{if("function"!=typeof window.gtag)return;const t=n("modal-checkout-product-details"),c=e("form_submission",t);o(c)})()});const T=function(){if(!t)return;const e="data-newspack-error-handled",o=o=>{o.hasAttribute(e)||(o.setAttribute(e,"true"),r(o).addClass(`${a}__notice ${a}__notice--error`),t.dispatchEvent(_),o.scrollIntoView({behavior:"smooth",block:"center"}))},c=e=>!!e.classList?.contains("woocommerce-error")||!(!e.classList?.contains("wc-block-components-notice-banner")||!e.classList?.contains("is-error")),n=new MutationObserver(e=>{for(const t of e)for(const e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;if(c(e))return void o(e);const t=e.querySelector?.(".woocommerce-error, .wc-block-components-notice-banner.is-error");if(t)return void o(t)}});return n.observe(t,{childList:!0,subtree:!0}),n}();if(T){const e=()=>T.disconnect();t.addEventListener("checkout-complete",e),t.addEventListener("checkout-cancel",e),window.addEventListener("beforeunload",e)}}g()}function k(){const e=r("#newspack_subscription_terms_confirmation, #newspack_subscription_confirmation");if(e.length){const t=r("form.checkout"),o=t.find("button#place_order, button#place_order_clone");function c(){const t=e.is(":checked");o.each((e,o)=>{r(o).attr("disabled",!t)})}c(),e.on("change",c),t.on("submit",function(t){if(!e.is(":checked"))return t.preventDefault(),t.stopPropagation(),!1})}}r(document.body).on("updated_checkout payment_method_selected checkout_error",k),r(document).ready(k),r(document.body).on("checkout_error",function(){const e=r(".woocommerce-NoticeGroup-checkout, .woocommerce-notices-wrapper:not(:empty)");e.length&&e.each((e,t)=>r(t).addClass(`${a}__notice ${a}__notice--error`));const t=r("#checkout_error_back");t.length&&t.on("click",e=>{e.preventDefault(),parent.newspackCloseModalCheckout()}),f(!1)}),document.addEventListener("keydown",function(e){"Escape"===e.key&&parent.newspackCloseModalCheckout()}),newspackBlocksModalCheckout.is_error&&r(document.body).trigger("checkout_error")})})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array(), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array(), 'version' => '4e87e0fc2d67d734ccb9');
|
package/dist/tiersBased.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t={7759(t,e,r){var n=r(907).Symbol;t.exports=n},1490(t,e,r){var n=r(7759),o=r(4817),i=r(7748),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},6(t,e,r){var n=r(5082),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},6710(t){var e="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;t.exports=e},4817(t,e,r){var n=r(7759),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o}},7748(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},907(t,e,r){var n=r(6710),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},5082(t){var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},671(t,e,r){var n=r(9323),o=r(5062),i=r(9480),a=Math.max,u=Math.min;t.exports=function(t,e,r){var c,
|
|
1
|
+
(()=>{var t={7759(t,e,r){var n=r(907).Symbol;t.exports=n},1490(t,e,r){var n=r(7759),o=r(4817),i=r(7748),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},6(t,e,r){var n=r(5082),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},6710(t){var e="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;t.exports=e},4817(t,e,r){var n=r(7759),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o}},7748(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},907(t,e,r){var n=r(6710),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},5082(t){var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},671(t,e,r){var n=r(9323),o=r(5062),i=r(9480),a=Math.max,u=Math.min;t.exports=function(t,e,r){var s,c,l,d,b,f,p=0,y=!1,v=!1,_=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(e){var r=s,n=c;return s=c=void 0,p=e,d=t.apply(n,r)}function h(t){var r=t-f;return void 0===f||r>=e||r<0||v&&t-p>=l}function w(){var t=o();if(h(t))return g(t);b=setTimeout(w,function(t){var r=e-(t-f);return v?u(r,l-(t-p)):r}(t))}function g(t){return b=void 0,_&&s?m(t):(s=c=void 0,d)}function x(){var t=o(),r=h(t);if(s=arguments,c=this,f=t,r){if(void 0===b)return function(t){return p=t,b=setTimeout(w,e),y?m(t):d}(f);if(v)return clearTimeout(b),b=setTimeout(w,e),m(f)}return void 0===b&&(b=setTimeout(w,e)),d}return e=i(e)||0,n(r)&&(y=!!r.leading,l=(v="maxWait"in r)?a(i(r.maxWait)||0,e):l,_="trailing"in r?!!r.trailing:_),x.cancel=function(){void 0!==b&&clearTimeout(b),p=0,s=f=c=b=void 0},x.flush=function(){return void 0===b?d:g(o())},x}},9323(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},2292(t){t.exports=function(t){return null!=t&&"object"==typeof t}},7964(t,e,r){var n=r(1490),o=r(2292);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},5062(t,e,r){var n=r(907);t.exports=function(){return n.Date.now()}},9480(t,e,r){var n=r(6),o=r(9323),i=r(7964),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=u.test(t);return r||s.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(671),e=r.n(t);const n="wpbnbd__button--active",o=t=>`.wpbnbd__tiers__amount [data-frequency-slug="${t}"]`,i=t=>{const r=((t="")=>{try{const e=JSON.parse(t);return{params:{frequency:e[0],tierPrefix:e[1]},initialFrequency:e[2],tiersBasedOptions:e[3],amounts:e[4],renewsAt:{month:e[5],year:e[6]},buttonColor:e[7]}}catch(t){return!1}})(t.getAttribute("data-tiers-based-config")||"");if(!r)return;const i=t.querySelectorAll(".wpbnbd__tiers__selection button"),a=t.querySelectorAll(".wpbnbd__tiers__amount [data-frequency-slug]"),u=t.querySelector(`input[name="${r.params.frequency}"]`),s=t.querySelector("form[data-is-init-form]");if(!(i&&a&&u&&s))return;((t,r)=>{const n=t.querySelector(".wpbnbd__tiers__options"),o=t.querySelector(".wpbnbd__tiers__options__dots");if(!n||!o||!r)return;const i=()=>Array.from(n.children).map(t=>({el:t,width:t.clientWidth}));let a=i();const u=Math.round(a.length/2)-1,s=()=>a[u].width,c=()=>a.map((t,e)=>l*e);let l=s(),d=c();const b=u*l;window.addEventListener("resize",()=>{a=i(),l=s(),d=c(),n.scrollTo(b,0)});const f=Array.from(o.children),p=e()(()=>{const t=((t,e)=>{const r=t.reduce((t,r)=>Math.abs(r-e)<Math.abs(t)?r-e:t,1/0)+e;return t.indexOf(r)})(d,n.scrollLeft);f.forEach((e,n)=>{e.style.backgroundColor=n===t?r.buttonColor:""})},100);n.addEventListener("scroll",p),f.forEach((t,e)=>{t.addEventListener("click",()=>{n.scrollTo({left:e*l,behavior:"smooth"})})}),n.scrollTo(b,0)})(t,r);let c=r.initialFrequency;i.forEach(e=>{e.addEventListener("click",()=>{const s=e.getAttribute("data-frequency-slug");s&&(c=s,u.setAttribute("value",c),a.forEach(t=>t.style.display="none"),t.querySelectorAll(o(c)).forEach(t=>t.style.display="inline"),i.forEach(t=>{c===t.getAttribute("data-frequency-slug")?t.classList.add(n):t.classList.remove(n)}),t.querySelectorAll('button[type="submit"]').forEach(t=>{if(!c)return;t.setAttribute("name",`${r.params.tierPrefix}${c}`);const e=t.getAttribute("data-tier-index"),n=document.querySelector(`${o(c)}[data-tier-index="${e}"]`);if(!n)return;const i=n.getAttribute("data-amount");i&&t.setAttribute("value",i)}))})});const l=t.querySelector("button.wpbnbd__tiers__back-button"),d=t.querySelectorAll(".wpbnbd__tiers__tier button"),b=t.querySelectorAll(".wpbnbd__tiers__view");d.forEach(e=>{e.addEventListener("click",()=>{const n=parseInt(e.getAttribute("data-tier-index")||""),o=s.querySelector('input[name="donation_tier_index"]'),i=s.querySelector(`input[name="donation_value_${c}"]`);o&&o.remove(),i&&i.remove();const a=document.createElement("input"),u=document.createElement("input");a.setAttribute("type","hidden"),u.setAttribute("type","hidden"),a.setAttribute("name","donation_tier_index"),u.setAttribute("name",`donation_value_${c}`),a.setAttribute("value",n.toString()),u.setAttribute("value",r.amounts[c][n]),s.appendChild(a),s.appendChild(u);const l=t.querySelector(".wpbnbd__tiers__tier-tile h2"),d=t.querySelector(".wpbnbd__tiers__tier-tile span[data-amount]"),f=t.querySelector(".wpbnbd__tiers__tier-tile span[data-frequency]"),p=t.querySelector(".wpbnbd__tiers__tier-tile span[data-renews-date]");if(isNaN(n)||!l||!d||!f||!p)return;const y=r.tiersBasedOptions[n],v=t.querySelector(`[data-frequency-slug="${c}"]`)?.getAttribute("data-frequency-label");l.textContent=y.heading,f.textContent=v||"",d.textContent=r.amounts[c][n],p.textContent=r.renewsAt[c],b.forEach(t=>t.classList.toggle("wpbnbd__tiers__view--hidden"))})}),window.addEventListener(`newspackPaymentFlowComplete-${t.id}`,()=>{l&&(l.style.display="none")}),t.setAttribute("data-tiers-based-ready",""),t.dispatchEvent(new CustomEvent("newspack-tiers-based-ready",{bubbles:!0}))};var a;(Object.getOwnPropertyDescriptor(i,"name")||{}).writable||Object.defineProperty(i,"name",{value:"default",configurable:!0}),"undefined"!=typeof window&&(a=()=>((t=document)=>{t.querySelectorAll(".wpbnbd--tiers-based").forEach(i)})(),"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",a):a()))})()})();
|