@automattic/newspack-blocks 1.54.0 → 1.55.0

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 CHANGED
@@ -1,3 +1,25 @@
1
+ # [1.55.0](https://github.com/Automattic/newspack-blocks/compare/v1.54.1...v1.55.0) (2022-08-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * check that grecaptcha library exists before using its methods ([97b7832](https://github.com/Automattic/newspack-blocks/commit/97b783251c0f1f8d9d6921b6fc6453757a442bd1))
7
+ * esc user-inputted key value before appending to URL ([be1acb1](https://github.com/Automattic/newspack-blocks/commit/be1acb15e424f1077ad6b54d9688f182e0c49600))
8
+ * phpcs lint ([cd8fe6f](https://github.com/Automattic/newspack-blocks/commit/cd8fe6f3c7b2529adc00f17b2e8ba354ebb611be))
9
+ * replace hardcoded test secret key ([4fd9d8f](https://github.com/Automattic/newspack-blocks/commit/4fd9d8fecb718918da41f08330eb51edf747c858))
10
+
11
+
12
+ ### Features
13
+
14
+ * use reCaptcha v3 to secure Stripe donate forms ([e3c6639](https://github.com/Automattic/newspack-blocks/commit/e3c6639a066694f15404ec2c9910c71509143fec))
15
+
16
+ ## [1.54.1](https://github.com/Automattic/newspack-blocks/compare/v1.54.0...v1.54.1) (2022-07-29)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **donate-block:** handle default frequency from attributes ([4de797a](https://github.com/Automattic/newspack-blocks/commit/4de797a396c7ca3f7f07416c44a9f87a8ce37af1))
22
+
1
23
  # [1.54.0](https://github.com/Automattic/newspack-blocks/compare/v1.53.1...v1.54.0) (2022-07-26)
2
24
 
3
25
 
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => 'fa299766467ffd2c104ac8f8c6c56c15');
1
+ <?php return array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '425e81a4da17680bb1e3159cde4d8a3e');
@@ -1 +1 @@
1
- @-webkit-keyframes loader{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}@keyframes loader{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.wp-block-newspack-blocks-donate .stripe-payment{position:relative}.wp-block-newspack-blocks-donate .stripe-payment,.wp-block-newspack-blocks-donate .stripe-payment--transition,.wp-block-newspack-blocks-donate .stripe-payment:after{transition:all .3s ease-out}.wp-block-newspack-blocks-donate .stripe-payment:after{content:"";opacity:0;pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(318deg,#d5d5d5,#fff);background-size:400% 400%;-webkit-animation:loader 3s ease infinite;animation:loader 3s ease infinite;border-radius:5px}.wp-block-newspack-blocks-donate .stripe-payment__card{border:1px solid #ccc;border-radius:3px;padding:.34rem .66rem;min-height:32px}.wp-block-newspack-blocks-donate .stripe-payment__checkbox,.wp-block-newspack-blocks-donate .stripe-payment button,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:.7em}.wp-block-newspack-blocks-donate .stripe-payment__messages,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{width:100%}.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{border-radius:3px;font-family:sans-serif}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:14px;line-height:1.2}}.wp-block-newspack-blocks-donate .stripe-payment--invisible>*{opacity:0}.wp-block-newspack-blocks-donate .stripe-payment--invisible:after{opacity:1}.wp-block-newspack-blocks-donate .stripe-payment--hidden{display:none}.wp-block-newspack-blocks-donate .stripe-payment__checkbox{align-items:center;display:inline-flex;cursor:pointer}.wp-block-newspack-blocks-donate .stripe-payment__checkbox input{height:1em;width:1em;margin-right:.5em}.wp-block-newspack-blocks-donate .stripe-payment__messages>div{border:solid #dfdfdf;border-width:0 0 0 4px;font-size:.8em;margin-top:.76rem;padding:.38rem .76rem}.wp-block-newspack-blocks-donate .stripe-payment__messages>div:empty{border:0;margin:0;padding:0}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-error{background-color:rgba(222,64,64,.075);border-color:#de4040}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-success{background-color:rgba(87,200,99,.075);border-color:#57c863}.wp-block-newspack-blocks-donate .stripe-payment--disabled button,.wp-block-newspack-blocks-donate .stripe-payment--disabled input{pointer-events:none;opacity:.4}.wp-block-newspack-blocks-donate .stripe-payment__element{margin-bottom:.4rem}.wp-block-newspack-blocks-donate .stripe-payment__row{margin-bottom:.5rem}.wp-block-newspack-blocks-donate .stripe-payment__row--small{margin-bottom:5px;line-height:1.2}.wp-block-newspack-blocks-donate .stripe-payment__row--flex{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex{flex-wrap:nowrap}}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:.5rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:0;width:50%}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input:last-child{margin-left:.5rem}}.wp-block-newspack-blocks-donate .stripe-payment__info{color:#767676;font-size:.7em;font-style:italic;padding-left:1.5em}.wp-block-newspack-blocks-donate .stripe-payment__footer{align-items:flex-end;margin-bottom:1.32rem;margin-left:-10px;margin-right:-10px}.wp-block-newspack-blocks-donate .stripe-payment__footer>*{padding-left:10px;padding-right:10px}.wp-block-newspack-blocks-donate .stripe-payment__branding{margin-top:1em;height:26px;display:block;text-decoration:none}.wp-block-newspack-blocks-donate .stripe-payment__branding img{display:block}.wp-block-newspack-blocks-donate .stripe-payment__methods{display:flex;flex-wrap:wrap}.wp-block-newspack-blocks-donate .stripe-payment__methods button{margin-left:0;margin-right:0;margin-bottom:0;height:46px}.wp-block-newspack-blocks-donate .stripe-payment__methods>*{margin-top:10px;width:100%}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__methods>*{width:auto}}.wp-block-newspack-blocks-donate .stripe-payment__request-button{min-width:190px}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__request-button{margin-right:1em}}.wp-block-newspack-blocks-donate .stripe-payment__request-button--invisible{opacity:0}.wp-block-newspack-blocks-donate__stripe{margin:.38rem .76rem .76rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate__stripe{margin-left:1.5rem;margin-right:1.5rem}}.wp-block-newspack-blocks-donate__stripe--editor input:first-child{margin-top:0}#stripe-fees-amount{padding-left:3px}.wpbnbd.is-style-alternate .wp-block-newspack-blocks-donate__stripe{margin:1.12rem 1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods{display:grid;grid-gap:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-alternate .stripe-payment__footer{margin:1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-alternate .stripe-payment__footer button{border-top-left-radius:5px;border-top-right-radius:5px;margin:0;width:auto}.wpbnbd.is-style-alternate .stripe-payment__request-button{margin:0}.wpbnbd.is-style-alternate .stripe-payment__branding{margin-top:1.12rem}.wpbnbd.is-style-minimal .wp-block-newspack-blocks-donate__stripe{margin:0;text-align:left}.wpbnbd.is-style-minimal .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-minimal .stripe-payment__inputs{margin-bottom:1.12rem}.wpbnbd.is-style-minimal .stripe-payment__methods{display:grid;grid-gap:.28rem}.wpbnbd.is-style-minimal .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-minimal .stripe-payment__footer{margin:1.12rem 0 0}.wpbnbd.is-style-minimal .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-minimal .stripe-payment__footer button{margin:0;min-width:auto}.wpbnbd.is-style-minimal .stripe-payment__request-button{margin:0}.wpbnbd.is-style-minimal .stripe-payment__branding{margin-top:1.12rem}
1
+ @-webkit-keyframes loader{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}@keyframes loader{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.wp-block-newspack-blocks-donate .stripe-payment{position:relative}.wp-block-newspack-blocks-donate .stripe-payment,.wp-block-newspack-blocks-donate .stripe-payment--transition,.wp-block-newspack-blocks-donate .stripe-payment:after{transition:all .3s ease-out}.wp-block-newspack-blocks-donate .stripe-payment:after{content:"";opacity:0;pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(318deg,#d5d5d5,#fff);background-size:400% 400%;-webkit-animation:loader 3s ease infinite;animation:loader 3s ease infinite;border-radius:5px}.wp-block-newspack-blocks-donate .stripe-payment__card{border:1px solid #ccc;border-radius:3px;padding:.34rem .66rem;min-height:32px}.wp-block-newspack-blocks-donate .stripe-payment__checkbox,.wp-block-newspack-blocks-donate .stripe-payment button,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:.7em}.wp-block-newspack-blocks-donate .stripe-payment__messages,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{width:100%}.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{border-radius:3px;font-family:sans-serif}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:14px;line-height:1.2}}.wp-block-newspack-blocks-donate .stripe-payment--invisible>*{opacity:0}.wp-block-newspack-blocks-donate .stripe-payment--invisible:after{opacity:1}.wp-block-newspack-blocks-donate .stripe-payment--hidden{display:none}.wp-block-newspack-blocks-donate .stripe-payment__checkbox{align-items:center;display:inline-flex;cursor:pointer}.wp-block-newspack-blocks-donate .stripe-payment__checkbox input{height:1em;width:1em;margin-right:.5em}.wp-block-newspack-blocks-donate .stripe-payment__messages>div{border:solid #dfdfdf;border-width:0 0 0 4px;font-size:.8em;margin-top:.76rem;padding:.38rem .76rem}.wp-block-newspack-blocks-donate .stripe-payment__messages>div:empty{border:0;margin:0;padding:0}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-error{background-color:rgba(222,64,64,.075);border-color:#de4040}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-success{background-color:rgba(87,200,99,.075);border-color:#57c863;margin:1.12rem}.wp-block-newspack-blocks-donate .stripe-payment--disabled button,.wp-block-newspack-blocks-donate .stripe-payment--disabled input{pointer-events:none;opacity:.4}.wp-block-newspack-blocks-donate .stripe-payment__element{margin-bottom:.4rem}.wp-block-newspack-blocks-donate .stripe-payment__row{margin-bottom:.5rem}.wp-block-newspack-blocks-donate .stripe-payment__row--small{margin-bottom:5px;line-height:1.2}.wp-block-newspack-blocks-donate .stripe-payment__row--flex{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex{flex-wrap:nowrap}}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:.5rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:0;width:50%}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input:last-child{margin-left:.5rem}}.wp-block-newspack-blocks-donate .stripe-payment__info{color:#767676;font-size:.7em;font-style:italic;padding-left:1.5em}.wp-block-newspack-blocks-donate .stripe-payment__footer{align-items:flex-end;margin-bottom:1.32rem;margin-left:-10px;margin-right:-10px}.wp-block-newspack-blocks-donate .stripe-payment__footer>*{padding-left:10px;padding-right:10px}.wp-block-newspack-blocks-donate .stripe-payment__branding{margin-top:1em;height:26px;display:block;text-decoration:none}.wp-block-newspack-blocks-donate .stripe-payment__branding img{display:block}.wp-block-newspack-blocks-donate .stripe-payment__methods{display:flex;flex-wrap:wrap}.wp-block-newspack-blocks-donate .stripe-payment__methods button{margin-left:0;margin-right:0;margin-bottom:0;height:46px}.wp-block-newspack-blocks-donate .stripe-payment__methods>*{margin-top:10px;width:100%}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__methods>*{width:auto}}.wp-block-newspack-blocks-donate .stripe-payment__request-button{min-width:190px}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__request-button{margin-right:1em}}.wp-block-newspack-blocks-donate .stripe-payment__request-button--invisible{opacity:0}.wp-block-newspack-blocks-donate__stripe{margin:.38rem .76rem .76rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate__stripe{margin-left:1.5rem;margin-right:1.5rem}}.wp-block-newspack-blocks-donate__stripe--editor input:first-child{margin-top:0}#stripe-fees-amount{padding-left:3px}.wpbnbd.is-style-alternate .wp-block-newspack-blocks-donate__stripe{margin:1.12rem 1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods{display:grid;grid-gap:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-alternate .stripe-payment__footer{margin:1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-alternate .stripe-payment__footer button{border-top-left-radius:5px;border-top-right-radius:5px;margin:0;width:auto}.wpbnbd.is-style-alternate .stripe-payment__request-button{margin:0}.wpbnbd.is-style-alternate .stripe-payment__branding{margin-top:1.12rem}.wpbnbd.is-style-minimal .wp-block-newspack-blocks-donate__stripe{margin:0;text-align:left}.wpbnbd.is-style-minimal .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-minimal .stripe-payment__inputs{margin-bottom:1.12rem}.wpbnbd.is-style-minimal .stripe-payment__methods{display:grid;grid-gap:.28rem}.wpbnbd.is-style-minimal .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-minimal .stripe-payment__footer{margin:1.12rem 0 0}.wpbnbd.is-style-minimal .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-minimal .stripe-payment__footer button{margin:0;min-width:auto}.wpbnbd.is-style-minimal .stripe-payment__request-button{margin:0}.wpbnbd.is-style-minimal .stripe-payment__branding{margin-top:1.12rem}
@@ -1 +1 @@
1
- (()=>{var e={7597:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n,o="https://js.stripe.com/v3",a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",u=null,c=function(e){return null!==u||(u=new Promise((function(t,r){if("undefined"!=typeof window)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{var n=function(){for(var e=document.querySelectorAll('script[src^="'.concat(o,'"]')),t=0;t<e.length;t++){var r=e[t];if(a.test(r.src))return r}return null}();n&&e?console.warn(i):n||(n=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(o).concat(t);var n=document.head||document.body;if(!n)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r}(e)),n.addEventListener("load",(function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))})),n.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(u){return void r(u)}else t(null)}))),u},s=function(e,t,r){if(null===e)return null;var n=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.32.0",startTime:t})}(n,r),n},l=!1,f=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l=!0;var o=Date.now();return c(n).then((function(e){return s(e,t,o)}))};f.setLoadParameters=function(e){if(l)throw new Error("You cannot change load parameters after calling loadStripe");n=function(e){var t="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==r(e))throw new Error(t);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw new Error(t)}(e)},t.loadStripe=f},7894:(e,t,r)=>{e.exports=r(7597)},5666:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(T){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),i=new O(n||[]);return a._invoke=function(e,t,r){var n=f;return function(o,a){if(n===d)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw a;return q()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=j(i,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=l(e,t,r);if("normal"===c.type){if(n=r.done?m:p,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=m,r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(T){return{type:"throw",arg:T}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",m="completed",y={};function h(){}function v(){}function b(){}var g={};c(g,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(P([])));x&&x!==r&&n.call(x,a)&&(g=x);var _=b.prototype=h.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,i,u){var c=l(e[o],e,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,u)}))}u(c.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}}function j(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:q}}function q(){return{value:t,done:!0}}return v.prototype=b,c(_,"constructor",b),c(b,"constructor",v),v.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},S(k.prototype),c(k.prototype,i,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(_),c(_,u,"Generator"),c(_,a,(function(){return this})),c(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=P,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function a(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){a(i,n,o,u,c,"next",e)}function c(e){a(i,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.r(n),r.d(n,{processStreamlinedElements:()=>S});const l=window.wp.i18n;var f=r(7894);r(5666);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],_n=!0,i=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);_n=!0);}catch(u){i=!0,o=u}finally{try{_n||null==r.return||r.return()}finally{if(i)throw o}}return a}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var __=l.__,d=function(e){var t,r={};return t=e.email,/\S+@\S+/.test(t)||(r.email=__("Email address is invalid.","newspack-blocks")),e.amount<=0&&(r.amount=__("Amount must be greater than zero.","newspack-blocks")),0===e.full_name.length&&(r.amount=__("Full name should be provided.","newspack-blocks")),r},m=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error";t.innerHTML="",e.forEach((function(e){var n=document.createElement("div");n.classList.add("type-".concat(r)),n.innerHTML=e,t.appendChild(n)}))},y=function(e){var t=p(JSON.parse(e.getAttribute("data-settings")),9),r=t[0],n=t[1],o=t[2],a=t[3],i=t[4],u=t[5],c=t[6],s=t[7],l=t[8];return{currency:r.toLowerCase(),currencySymbol:n,siteName:o,isCurrencyZeroDecimal:a,countryCode:i,frequencies:u,feeMultiplier:parseFloat(c),feeStatic:parseFloat(s),stripePublishableKey:l}},h=function(e){var t=Object.fromEntries(new FormData(e)),r="donation_value_".concat(t.donation_frequency);return t.amount=t[r],"other"===t.amount&&(t.amount=t["".concat(r,"_other")]),t.amount||(t.amount=t["".concat(r,"_untiered")]),t.cid&&0===t.cid.indexOf("CLIENT_ID")&&(t.cid=document.cookie.split("; ").reduce((function(e,t){var r=t.split("=");return e[r[0]]=r[1],e}),{})["newspack-cid"]),t},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{convertToSubunit:!1},r=t.convertToSubunit,n=y(e),o=h(e),a=o.amount,i=o.agree_to_pay_fees,u=function(e){return parseFloat(r?e*(n.isCurrencyZeroDecimal?1:100):e)};if(a=u(a),i){var c=u(g(e));a+=c}return a},b=function(e){var t=y(e),r=h(e).donation_frequency,n=t.frequencies[r];return{label:"".concat(t.siteName," (").concat(n,")"),amount:v(e,{convertToSubunit:!0})}},g=function(e){var t=h(e).amount,r=y(e),n=r.feeMultiplier,o=r.feeStatic;return function(e,t,r){return parseFloat(((e+r)/(100-t)*100-e).toFixed(2))}(parseFloat(t),n,o)},w=function(){var e=i(regeneratorRuntime.mark((function e(t,r){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:"POST",e.abrupt("return",fetch("/wp-json/newspack-blocks/v1".concat(t),{method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(function(){var e=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(r=e.sent,!t.ok){e.next=5;break}return e.abrupt("return",r);case 5:return e.abrupt("return",{error:r});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})));return function(_x,t){return e.apply(this,arguments)}}(),x=function(e,t){var r=(0,l.sprintf)(__("Your payment has been processed. Thank you for your contribution! You will receive a confirmation email at %s.","newspack-blocks"),e);m([r],t,"success")},_=l.__,S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return s(e.querySelectorAll(".stripe-payment")).forEach(function(){var e=i(regeneratorRuntime.mark((function e(t){var r,n,a,u,c,s,l,p,S,k,j,E,L;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=t.closest("form"),l=t.querySelector(".stripe-payment__messages"),p=y(s),S=function(){return t.classList.add("stripe-payment--disabled")},(k=function(){return t.classList.remove("stripe-payment--disabled")})(),j=function(){var e=i(regeneratorRuntime.mark((function e(t){var n,a,i,c,f,p,d,y,b,g=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=g.length>1&&void 0!==g[1]?g[1]:{},i=h(s),c=o({tokenData:t,amount:v(s),email:i.email,full_name:i.full_name,frequency:i.donation_frequency,newsletter_opt_in:Boolean(i.newsletter_opt_in),clientId:i.cid},a),e.next=5,w("/donate",c);case 5:if(f=e.sent,200===(null===(n=f.data)||void 0===n?void 0:n.status)||!f.message){e.next=9;break}return m([f.message],l),e.abrupt("return",{error:!0});case 9:if(!f.error){e.next=12;break}return m([f.error],l),e.abrupt("return",{error:!0});case 12:if(p=function(e){return m([e],l),k(),{error:!0}},!f.client_secret||!u){e.next=36;break}return e.next=16,r.confirmCardPayment(f.client_secret,{payment_method:u});case 16:if(!(d=e.sent).error){e.next=21;break}return e.abrupt("return",p(d.error.message));case 21:if("succeeded"!==d.paymentIntent.status){e.next=25;break}x(c.email,l),e.next=36;break;case 25:if("requires_action"!==d.paymentIntent.status){e.next=35;break}return e.next=28,r.confirmCardPayment(f.client_secret);case 28:if(y=e.sent,!(b=y.error)){e.next=32;break}return e.abrupt("return",p(b.message));case 32:x(c.email,l),e.next=36;break;case 35:return e.abrupt("return",p(_("Something went wrong with the payment. Please try again later.","newspack-blocks")));case 36:return"success"===f.status&&x(c.email,l),e.abrupt("return",{});case 38:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=i(regeneratorRuntime.mark((function e(){var o,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,f.loadStripe)(p.stripePublishableKey);case 2:return r=e.sent,o=r.elements(),(n=o.create("card")).mount(t.querySelector(".stripe-payment__card")),a=r.paymentRequest({country:p.countryCode,currency:p.currency,total:b(s),requestPayerName:!0,requestPayerEmail:!0}),e.next=9,a.canMakePayment();case 9:e.sent&&(a.on("token",function(){var e=i(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=t.token;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),a.on("paymentmethod",function(){var e=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=t.paymentMethod.id,e.next=3,j(c,{email:t.payerEmail,full_name:t.payerName,payment_method_id:u});case 3:r=e.sent,t.complete(r.error?"fail":"success");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),s.addEventListener("change",(function(){a.update({total:b(s)})})),l=o.create("paymentRequestButton",{paymentRequest:a,style:{paymentRequestButton:{type:"donate",height:"46px"}}}),d=t.querySelector(".stripe-payment__request-button"),l.mount(d),d.classList.remove("stripe-payment--hidden"),setTimeout((function(){d.classList.remove("stripe-payment__request-button--invisible")}),0)),t.classList.remove("stripe-payment--invisible");case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E(),t.querySelector('button[type="submit"]').onclick=function(e){var r=t.querySelector(".stripe-payment__inputs.stripe-payment--hidden");r&&(e.preventDefault(),r.classList.remove("stripe-payment--hidden"))},(L=function(){var e=t.querySelector("#stripe-fees-amount");if(e){var r=Object.fromEntries(new FormData(s)),n=g(s);e.innerHTML="(".concat(p.currencySymbol).concat(n.toFixed(2)," ").concat(p.frequencies[r.donation_frequency].toLowerCase(),")")}})(),s.addEventListener("change",L),s.addEventListener("submit",function(){var e=i(regeneratorRuntime.mark((function e(t){var o,a,i,c,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),S(),m([_("Processing payment…","newspack-blocks")],l,"info"),o=h(s),!((a=Object.values(d(o))).length>0)){e.next=9;break}return m(a,l),k(),e.abrupt("return");case 9:return i=function(e){a.push(e.message),m(a,l),k()},e.next=12,r.createToken(n);case 12:if(!(c=e.sent).error){e.next=16;break}return i(c.error),e.abrupt("return");case 16:return e.next=18,r.createPaymentMethod({type:"card",card:n,billing_details:{name:o.full_name,email:o.email}});case 18:if(!(f=e.sent).error){e.next=22;break}return i(f.error),e.abrupt("return");case 22:return u={card:n},e.next=25,j(c.token,{payment_method_id:f.paymentMethod.id});case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 15:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}())};S()})();var o=window;for(var a in n)o[a]=n[a];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
1
+ (()=>{var e={7597:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n,o="https://js.stripe.com/v3",a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",c=null,u=function(e){return null!==c||(c=new Promise((function(t,r){if("undefined"!=typeof window)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{var n=function(){for(var e=document.querySelectorAll('script[src^="'.concat(o,'"]')),t=0;t<e.length;t++){var r=e[t];if(a.test(r.src))return r}return null}();n&&e?console.warn(i):n||(n=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(o).concat(t);var n=document.head||document.body;if(!n)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r}(e)),n.addEventListener("load",(function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))})),n.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(c){return void r(c)}else t(null)}))),c},s=function(e,t,r){if(null===e)return null;var n=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.32.0",startTime:t})}(n,r),n},l=!1,f=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l=!0;var o=Date.now();return u(n).then((function(e){return s(e,t,o)}))};f.setLoadParameters=function(e){if(l)throw new Error("You cannot change load parameters after calling loadStripe");n=function(e){var t="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==r(e))throw new Error(t);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw new Error(t)}(e)},t.loadStripe=f},7894:(e,t,r)=>{e.exports=r(7597)},5666:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(R){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),i=new O(n||[]);return a._invoke=function(e,t,r){var n=f;return function(o,a){if(n===d)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw a;return q()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=l(e,t,r);if("normal"===u.type){if(n=r.done?m:p,u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=m,r.method="throw",r.arg=u.arg)}}}(e,r,i),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(R){return{type:"throw",arg:R}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",m="completed",h={};function y(){}function v(){}function b(){}var g={};u(g,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(P([])));x&&x!==r&&n.call(x,a)&&(g=x);var S=b.prototype=y.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,i,c){var u=l(e[o],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(u.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}}function E(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(e){if(e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:q}}function q(){return{value:t,done:!0}}return v.prototype=b,u(S,"constructor",b),u(b,"constructor",v),v.displayName=u(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},_(k.prototype),u(k.prototype,i,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=P,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function a(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(s){return void r(s)}c.done?t(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function s(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.r(n),r.d(n,{processStreamlinedElements:()=>_});const l=window.wp.i18n;var f=r(7894);r(5666);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],_n=!0,i=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);_n=!0);}catch(c){i=!0,o=c}finally{try{_n||null==r.return||r.return()}finally{if(i)throw o}}return a}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var __=l.__,d=function(e){var t,r={};return t=e.email,/\S+@\S+/.test(t)||(r.email=__("Email address is invalid.","newspack-blocks")),e.amount<=0&&(r.amount=__("Amount must be greater than zero.","newspack-blocks")),0===e.full_name.length&&(r.amount=__("Full name should be provided.","newspack-blocks")),r},m=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"error";t.innerHTML="",e.forEach((function(e){var n=document.createElement("div");n.classList.add("type-".concat(r)),n.innerHTML=e,t.appendChild(n)})),"success"===r&&t.parentElement.replaceWith(t)},h=function(e){var t=p(JSON.parse(e.getAttribute("data-settings")),10),r=t[0],n=t[1],o=t[2],a=t[3],i=t[4],c=t[5],u=t[6],s=t[7],l=t[8],f=t[9];return{currency:r.toLowerCase(),currencySymbol:n,siteName:o,isCurrencyZeroDecimal:a,countryCode:i,frequencies:c,feeMultiplier:parseFloat(u),feeStatic:parseFloat(s),stripePublishableKey:l,captchaSiteKey:f}},y=function(e){var t=Object.fromEntries(new FormData(e)),r="donation_value_".concat(t.donation_frequency);return t.amount=t[r],"other"===t.amount&&(t.amount=t["".concat(r,"_other")]),t.amount||(t.amount=t["".concat(r,"_untiered")]),t.cid&&0===t.cid.indexOf("CLIENT_ID")&&(t.cid=document.cookie.split("; ").reduce((function(e,t){var r=t.split("=");return e[r[0]]=r[1],e}),{})["newspack-cid"]),t},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{convertToSubunit:!1},r=t.convertToSubunit,n=h(e),o=y(e),a=o.amount,i=o.agree_to_pay_fees,c=function(e){return parseFloat(r?e*(n.isCurrencyZeroDecimal?1:100):e)};if(a=c(a),i){var u=c(g(e));a+=u}return a},b=function(e){var t=h(e),r=y(e).donation_frequency,n=t.frequencies[r];return{label:"".concat(t.siteName," (").concat(n,")"),amount:v(e,{convertToSubunit:!0})}},g=function(e){var t=y(e).amount,r=h(e),n=r.feeMultiplier,o=r.feeStatic;return function(e,t,r){return parseFloat(((e+r)/(100-t)*100-e).toFixed(2))}(parseFloat(t),n,o)},w=function(){var e=i(regeneratorRuntime.mark((function e(t,r){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:"POST",e.abrupt("return",fetch("/wp-json/newspack-blocks/v1".concat(t),{method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(function(){var e=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(r=e.sent,!t.ok){e.next=5;break}return e.abrupt("return",r);case 5:return e.abrupt("return",{error:r});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})));return function(_x,t){return e.apply(this,arguments)}}(),x=function(e,t){var r=(0,l.sprintf)(__("Your payment has been processed. Thank you for your contribution! You will receive a confirmation email at %s.","newspack-blocks"),e);m([r],t,"success")},S=l.__,_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return s(e.querySelectorAll(".stripe-payment")).forEach(function(){var e=i(regeneratorRuntime.mark((function e(t){var r,n,a,c,u,s,l,p,_,k,E,j,L,O;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=t.closest("form"),l=t.querySelector(".stripe-payment__messages"),p=h(s),_=function(){return t.classList.add("stripe-payment--disabled")},(k=function(){return t.classList.remove("stripe-payment--disabled")})(),E=function(){var e=i(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){var n=window.grecaptcha;null!=n&&n.ready||r(S("Error loading the reCaptcha library.","newspack-blocks")),n.ready(i(regeneratorRuntime.mark((function o(){var a;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,n.execute(t,{action:"submit"});case 3:return a=o.sent,o.abrupt("return",e(a));case 7:o.prev=7,o.t0=o.catch(0),r(o.t0);case 10:case"end":return o.stop()}}),o,null,[[0,7]])}))))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=i(regeneratorRuntime.mark((function e(t){var n,a,i,u,f,d,h,b,g,_,j,L,O=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=O.length>1&&void 0!==O[1]?O[1]:{},!(i=null==p?void 0:p.captchaSiteKey)){e.next=14;break}return e.prev=3,e.next=6,E(i);case 6:u=e.sent,e.next=14;break;case 9:return e.prev=9,e.t0=e.catch(3),f=e.t0 instanceof Error?e.t0.message:S("Error processing captcha request.","newspack-blocks"),m([f],l),e.abrupt("return",{error:!0});case 14:return d=y(s),h=o({captchaToken:u,tokenData:t,amount:v(s),email:d.email,full_name:d.full_name,frequency:d.donation_frequency,newsletter_opt_in:Boolean(d.newsletter_opt_in),clientId:d.cid},a),e.next=18,w("/donate",h);case 18:if(b=e.sent,200===(null===(n=b.data)||void 0===n?void 0:n.status)||!b.message){e.next=22;break}return m([b.message],l),e.abrupt("return",{error:!0});case 22:if(!b.error){e.next=25;break}return m([b.error],l),e.abrupt("return",{error:!0});case 25:if(g=function(e){return m([e],l),k(),{error:!0}},!b.client_secret||!c){e.next=49;break}return e.next=29,r.confirmCardPayment(b.client_secret,{payment_method:c});case 29:if(!(_=e.sent).error){e.next=34;break}return e.abrupt("return",g(_.error.message));case 34:if("succeeded"!==_.paymentIntent.status){e.next=38;break}x(h.email,l),e.next=49;break;case 38:if("requires_action"!==_.paymentIntent.status){e.next=48;break}return e.next=41,r.confirmCardPayment(b.client_secret);case 41:if(j=e.sent,!(L=j.error)){e.next=45;break}return e.abrupt("return",g(L.message));case 45:x(h.email,l),e.next=49;break;case 48:return e.abrupt("return",g(S("Something went wrong with the payment. Please try again later.","newspack-blocks")));case 49:return"success"===b.status&&x(h.email,l),e.abrupt("return",{});case 51:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=i(regeneratorRuntime.mark((function e(){var o,l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,f.loadStripe)(p.stripePublishableKey);case 2:return r=e.sent,o=r.elements(),(n=o.create("card")).mount(t.querySelector(".stripe-payment__card")),a=r.paymentRequest({country:p.countryCode,currency:p.currency,total:b(s),requestPayerName:!0,requestPayerEmail:!0}),e.next=9,a.canMakePayment();case 9:e.sent&&(a.on("token",function(){var e=i(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=t.token;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),a.on("paymentmethod",function(){var e=i(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=t.paymentMethod.id,e.next=3,j(u,{email:t.payerEmail,full_name:t.payerName,payment_method_id:c});case 3:r=e.sent,t.complete(r.error?"fail":"success");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),s.addEventListener("change",(function(){a.update({total:b(s)})})),l=o.create("paymentRequestButton",{paymentRequest:a,style:{paymentRequestButton:{type:"donate",height:"46px"}}}),d=t.querySelector(".stripe-payment__request-button"),l.mount(d),d.classList.remove("stripe-payment--hidden"),setTimeout((function(){d.classList.remove("stripe-payment__request-button--invisible")}),0)),t.classList.remove("stripe-payment--invisible");case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L(),t.querySelector('button[type="submit"]').onclick=function(e){var r=t.querySelector(".stripe-payment__inputs.stripe-payment--hidden");r&&(e.preventDefault(),r.classList.remove("stripe-payment--hidden"))},(O=function(){var e=t.querySelector("#stripe-fees-amount");if(e){var r=Object.fromEntries(new FormData(s)),n=g(s);e.innerHTML="(".concat(p.currencySymbol).concat(n.toFixed(2)," ").concat(p.frequencies[r.donation_frequency].toLowerCase(),")")}})(),s.addEventListener("change",O),s.addEventListener("submit",function(){var e=i(regeneratorRuntime.mark((function e(t){var o,a,i,u,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),_(),m([S("Processing payment…","newspack-blocks")],l,"info"),o=y(s),!((a=Object.values(d(o))).length>0)){e.next=9;break}return m(a,l),k(),e.abrupt("return");case 9:return i=function(e){a.push(e.message),m(a,l),k()},e.next=12,r.createToken(n);case 12:if(!(u=e.sent).error){e.next=16;break}return i(u.error),e.abrupt("return");case 16:return e.next=18,r.createPaymentMethod({type:"card",card:n,billing_details:{name:o.full_name,email:o.email}});case 18:if(!(f=e.sent).error){e.next=22;break}return i(f.error),e.abrupt("return");case 22:return c={card:n},e.next=25,j(u.token,{payment_method_id:f.paymentMethod.id});case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 16:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}())};_()})();var o=window;for(var a in n)o[a]=n[a];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
@@ -1 +1 @@
1
- @-webkit-keyframes loader{0%{background-position:100% 50%}50%{background-position:0 50%}to{background-position:100% 50%}}@keyframes loader{0%{background-position:100% 50%}50%{background-position:0 50%}to{background-position:100% 50%}}.wp-block-newspack-blocks-donate .stripe-payment{position:relative}.wp-block-newspack-blocks-donate .stripe-payment,.wp-block-newspack-blocks-donate .stripe-payment--transition,.wp-block-newspack-blocks-donate .stripe-payment:after{transition:all .3s ease-out}.wp-block-newspack-blocks-donate .stripe-payment:after{content:"";opacity:0;pointer-events:none;position:absolute;top:0;right:0;width:100%;height:100%;background:linear-gradient(-318deg,#d5d5d5,#fff);background-size:400% 400%;-webkit-animation:loader 3s ease infinite;animation:loader 3s ease infinite;border-radius:5px}.wp-block-newspack-blocks-donate .stripe-payment__card{border:1px solid #ccc;border-radius:3px;padding:.34rem .66rem;min-height:32px}.wp-block-newspack-blocks-donate .stripe-payment__checkbox,.wp-block-newspack-blocks-donate .stripe-payment button,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:.7em}.wp-block-newspack-blocks-donate .stripe-payment__messages,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{width:100%}.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{border-radius:3px;font-family:sans-serif}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:14px;line-height:1.2}}.wp-block-newspack-blocks-donate .stripe-payment--invisible>*{opacity:0}.wp-block-newspack-blocks-donate .stripe-payment--invisible:after{opacity:1}.wp-block-newspack-blocks-donate .stripe-payment--hidden{display:none}.wp-block-newspack-blocks-donate .stripe-payment__checkbox{align-items:center;display:inline-flex;cursor:pointer}.wp-block-newspack-blocks-donate .stripe-payment__checkbox input{height:1em;width:1em;margin-left:.5em}.wp-block-newspack-blocks-donate .stripe-payment__messages>div{border:solid #dfdfdf;border-width:0 4px 0 0;font-size:.8em;margin-top:.76rem;padding:.38rem .76rem}.wp-block-newspack-blocks-donate .stripe-payment__messages>div:empty{border:0;margin:0;padding:0}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-error{background-color:rgba(222,64,64,.075);border-color:#de4040}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-success{background-color:rgba(87,200,99,.075);border-color:#57c863}.wp-block-newspack-blocks-donate .stripe-payment--disabled button,.wp-block-newspack-blocks-donate .stripe-payment--disabled input{pointer-events:none;opacity:.4}.wp-block-newspack-blocks-donate .stripe-payment__element{margin-bottom:.4rem}.wp-block-newspack-blocks-donate .stripe-payment__row{margin-bottom:.5rem}.wp-block-newspack-blocks-donate .stripe-payment__row--small{margin-bottom:5px;line-height:1.2}.wp-block-newspack-blocks-donate .stripe-payment__row--flex{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex{flex-wrap:nowrap}}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:.5rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:0;width:50%}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input:last-child{margin-right:.5rem}}.wp-block-newspack-blocks-donate .stripe-payment__info{color:#767676;font-size:.7em;font-style:italic;padding-right:1.5em}.wp-block-newspack-blocks-donate .stripe-payment__footer{align-items:flex-end;margin-bottom:1.32rem;margin-right:-10px;margin-left:-10px}.wp-block-newspack-blocks-donate .stripe-payment__footer>*{padding-right:10px;padding-left:10px}.wp-block-newspack-blocks-donate .stripe-payment__branding{margin-top:1em;height:26px;display:block;text-decoration:none}.wp-block-newspack-blocks-donate .stripe-payment__branding img{display:block}.wp-block-newspack-blocks-donate .stripe-payment__methods{display:flex;flex-wrap:wrap}.wp-block-newspack-blocks-donate .stripe-payment__methods button{margin-right:0;margin-left:0;margin-bottom:0;height:46px}.wp-block-newspack-blocks-donate .stripe-payment__methods>*{margin-top:10px;width:100%}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__methods>*{width:auto}}.wp-block-newspack-blocks-donate .stripe-payment__request-button{min-width:190px}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__request-button{margin-left:1em}}.wp-block-newspack-blocks-donate .stripe-payment__request-button--invisible{opacity:0}.wp-block-newspack-blocks-donate__stripe{margin:.38rem .76rem .76rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate__stripe{margin-right:1.5rem;margin-left:1.5rem}}.wp-block-newspack-blocks-donate__stripe--editor input:first-child{margin-top:0}#stripe-fees-amount{padding-right:3px}.wpbnbd.is-style-alternate .wp-block-newspack-blocks-donate__stripe{margin:1.12rem 1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods{display:grid;grid-gap:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-alternate .stripe-payment__footer{margin:1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-alternate .stripe-payment__footer button{border-top-right-radius:5px;border-top-left-radius:5px;margin:0;width:auto}.wpbnbd.is-style-alternate .stripe-payment__request-button{margin:0}.wpbnbd.is-style-alternate .stripe-payment__branding{margin-top:1.12rem}.wpbnbd.is-style-minimal .wp-block-newspack-blocks-donate__stripe{margin:0;text-align:right}.wpbnbd.is-style-minimal .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-minimal .stripe-payment__inputs{margin-bottom:1.12rem}.wpbnbd.is-style-minimal .stripe-payment__methods{display:grid;grid-gap:.28rem}.wpbnbd.is-style-minimal .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-minimal .stripe-payment__footer{margin:1.12rem 0 0}.wpbnbd.is-style-minimal .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-minimal .stripe-payment__footer button{margin:0;min-width:auto}.wpbnbd.is-style-minimal .stripe-payment__request-button{margin:0}.wpbnbd.is-style-minimal .stripe-payment__branding{margin-top:1.12rem}
1
+ @-webkit-keyframes loader{0%{background-position:100% 50%}50%{background-position:0 50%}to{background-position:100% 50%}}@keyframes loader{0%{background-position:100% 50%}50%{background-position:0 50%}to{background-position:100% 50%}}.wp-block-newspack-blocks-donate .stripe-payment{position:relative}.wp-block-newspack-blocks-donate .stripe-payment,.wp-block-newspack-blocks-donate .stripe-payment--transition,.wp-block-newspack-blocks-donate .stripe-payment:after{transition:all .3s ease-out}.wp-block-newspack-blocks-donate .stripe-payment:after{content:"";opacity:0;pointer-events:none;position:absolute;top:0;right:0;width:100%;height:100%;background:linear-gradient(-318deg,#d5d5d5,#fff);background-size:400% 400%;-webkit-animation:loader 3s ease infinite;animation:loader 3s ease infinite;border-radius:5px}.wp-block-newspack-blocks-donate .stripe-payment__card{border:1px solid #ccc;border-radius:3px;padding:.34rem .66rem;min-height:32px}.wp-block-newspack-blocks-donate .stripe-payment__checkbox,.wp-block-newspack-blocks-donate .stripe-payment button,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:.7em}.wp-block-newspack-blocks-donate .stripe-payment__messages,.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{width:100%}.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{border-radius:3px;font-family:sans-serif}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment input[type=email],.wp-block-newspack-blocks-donate .stripe-payment input[type=text]{font-size:14px;line-height:1.2}}.wp-block-newspack-blocks-donate .stripe-payment--invisible>*{opacity:0}.wp-block-newspack-blocks-donate .stripe-payment--invisible:after{opacity:1}.wp-block-newspack-blocks-donate .stripe-payment--hidden{display:none}.wp-block-newspack-blocks-donate .stripe-payment__checkbox{align-items:center;display:inline-flex;cursor:pointer}.wp-block-newspack-blocks-donate .stripe-payment__checkbox input{height:1em;width:1em;margin-left:.5em}.wp-block-newspack-blocks-donate .stripe-payment__messages>div{border:solid #dfdfdf;border-width:0 4px 0 0;font-size:.8em;margin-top:.76rem;padding:.38rem .76rem}.wp-block-newspack-blocks-donate .stripe-payment__messages>div:empty{border:0;margin:0;padding:0}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-error{background-color:rgba(222,64,64,.075);border-color:#de4040}.wp-block-newspack-blocks-donate .stripe-payment__messages>div.type-success{background-color:rgba(87,200,99,.075);border-color:#57c863;margin:1.12rem}.wp-block-newspack-blocks-donate .stripe-payment--disabled button,.wp-block-newspack-blocks-donate .stripe-payment--disabled input{pointer-events:none;opacity:.4}.wp-block-newspack-blocks-donate .stripe-payment__element{margin-bottom:.4rem}.wp-block-newspack-blocks-donate .stripe-payment__row{margin-bottom:.5rem}.wp-block-newspack-blocks-donate .stripe-payment__row--small{margin-bottom:5px;line-height:1.2}.wp-block-newspack-blocks-donate .stripe-payment__row--flex{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex{flex-wrap:nowrap}}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:.5rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate .stripe-payment__row--flex input{margin-bottom:0;width:50%}.wp-block-newspack-blocks-donate .stripe-payment__row--flex input:last-child{margin-right:.5rem}}.wp-block-newspack-blocks-donate .stripe-payment__info{color:#767676;font-size:.7em;font-style:italic;padding-right:1.5em}.wp-block-newspack-blocks-donate .stripe-payment__footer{align-items:flex-end;margin-bottom:1.32rem;margin-right:-10px;margin-left:-10px}.wp-block-newspack-blocks-donate .stripe-payment__footer>*{padding-right:10px;padding-left:10px}.wp-block-newspack-blocks-donate .stripe-payment__branding{margin-top:1em;height:26px;display:block;text-decoration:none}.wp-block-newspack-blocks-donate .stripe-payment__branding img{display:block}.wp-block-newspack-blocks-donate .stripe-payment__methods{display:flex;flex-wrap:wrap}.wp-block-newspack-blocks-donate .stripe-payment__methods button{margin-right:0;margin-left:0;margin-bottom:0;height:46px}.wp-block-newspack-blocks-donate .stripe-payment__methods>*{margin-top:10px;width:100%}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__methods>*{width:auto}}.wp-block-newspack-blocks-donate .stripe-payment__request-button{min-width:190px}@media only screen and (min-width:600px){.wp-block-newspack-blocks-donate .stripe-payment__request-button{margin-left:1em}}.wp-block-newspack-blocks-donate .stripe-payment__request-button--invisible{opacity:0}.wp-block-newspack-blocks-donate__stripe{margin:.38rem .76rem .76rem}@media only screen and (min-width:782px){.wp-block-newspack-blocks-donate__stripe{margin-right:1.5rem;margin-left:1.5rem}}.wp-block-newspack-blocks-donate__stripe--editor input:first-child{margin-top:0}#stripe-fees-amount{padding-right:3px}.wpbnbd.is-style-alternate .wp-block-newspack-blocks-donate__stripe{margin:1.12rem 1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods{display:grid;grid-gap:.56rem}.wpbnbd.is-style-alternate .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-alternate .stripe-payment__footer{margin:1.12rem 0}.wpbnbd.is-style-alternate .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-alternate .stripe-payment__footer button{border-top-right-radius:5px;border-top-left-radius:5px;margin:0;width:auto}.wpbnbd.is-style-alternate .stripe-payment__request-button{margin:0}.wpbnbd.is-style-alternate .stripe-payment__branding{margin-top:1.12rem}.wpbnbd.is-style-minimal .wp-block-newspack-blocks-donate__stripe{margin:0;text-align:right}.wpbnbd.is-style-minimal .stripe-payment__row{margin-bottom:.56rem}.wpbnbd.is-style-minimal .stripe-payment__inputs{margin-bottom:1.12rem}.wpbnbd.is-style-minimal .stripe-payment__methods{display:grid;grid-gap:.28rem}.wpbnbd.is-style-minimal .stripe-payment__methods>*{margin-top:0}.wpbnbd.is-style-minimal .stripe-payment__footer{margin:1.12rem 0 0}.wpbnbd.is-style-minimal .stripe-payment__footer>*{padding:0}.wpbnbd.is-style-minimal .stripe-payment__footer button{margin:0;min-width:auto}.wpbnbd.is-style-minimal .stripe-payment__request-button{margin:0}.wpbnbd.is-style-minimal .stripe-payment__branding{margin-top:1.12rem}
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '4b06436c98ce5e1d59254e80d68ce23a');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7d6dac1a3f39e3da92347b95214c8b80');