Current Path : /home/church/public_html/inspirewithangela.com/wp-content/plugins/woocommerce-payments/dist/ |
Current File : /home/church/public_html/inspirewithangela.com/wp-content/plugins/woocommerce-payments/dist/tos.js |
/*! For license information please see tos.js.LICENSE.txt */ !function(){var e={63109:function(e,t,n){e.exports=n(35666)},94184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var c=o.apply(null,n);c&&e.push(c)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},60139:function(e){"use strict";function t(e){return function(){return e}}var n=function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},73759:function(e){"use strict";e.exports=function(e,t,n,r,o,i,c,a){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,c,a],l=0;(u=new Error(t.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},63620:function(e,t,n){"use strict";var r=n(60139);e.exports=r},96746:function(e,t,n){"use strict";var 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},o=a(n(99196)),i=a(n(49156)),c=a(n(76743));function a(e){return e&&e.__esModule?e:{default:e}}var u=void 0;function s(e,t){var n,c,a,l,f,p,d,h,m=[],v={};for(p=0;p<e.length;p++)if("string"!==(f=e[p]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==r(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+u);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],a=p;break}m.push(t[f.value])}else m.push(f.value);return n&&(l=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(a,e),d=s(e.slice(a+1,l),t),c=o.default.cloneElement(n,{},d),m.push(c),l<e.length-1&&(h=s(e.slice(l+1),t),m=m.concat(h))),1===m.length?m[0]:(m.forEach((function(e,t){e&&(v["interpolation-child-"+t]=e)})),(0,i.default)(v))}t.Z=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(u=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,c.default)(t);try{return s(i,n)}catch(e){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},76743:function(e){"use strict";function t(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(t)}},34155:function(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,u=[],s=!1,l=-1;function f(){s&&a&&(s=!1,a.length?u=a.concat(u):l=-1,u.length&&p())}function p(){if(!s){var e=c(f);s=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,s=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||s||c(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},49156:function(e,t,n){"use strict";var r=n(99196),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(60139),c=n(73759),a=n(63620),u="function"==typeof Symbol&&Symbol.iterator;function s(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function l(e,t,n,r){var i,a=typeof e;if("undefined"!==a&&"boolean"!==a||(e=null),null===e||"string"===a||"number"===a||"object"===a&&e.$$typeof===o)return n(r,e,""===t?"."+s(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var d=0;d<e.length;d++)f+=l(i=e[d],p+s(i,d),n,r);else{var h=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h)for(var m,v=h.call(e),y=0;!(m=v.next()).done;)f+=l(i=m.value,p+s(i,y++),n,r);else if("object"===a){var g=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===g?"object with keys {"+Object.keys(e).join(", ")+"}":g,"")}}return f}var f=/\/+/g;function p(e){return(""+e).replace(f,"$&/")}var d,h,m=v,v=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)};function y(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function g(e,t,n){var o,c,a=e.result,u=e.keyPrefix,s=e.func,l=e.context,f=s.call(l,t,e.count++);Array.isArray(f)?w(f,a,n,i.thatReturnsArgument):null!=f&&(r.isValidElement(f)&&(o=f,c=u+(!f.key||t&&t.key===f.key?"":p(f.key)+"/")+n,f=r.cloneElement(o,{key:c},void 0!==o.props?o.props.children:void 0)),a.push(f))}function w(e,t,n,r,o){var i="";null!=n&&(i=p(n)+"/");var c=y.getPooled(t,i,r,o);!function(e,t,n){null==e||l(e,"",t,n)}(e,g,c),y.release(c)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},d=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},(h=y).instancePool=[],h.getPooled=d||m,h.poolSize||(h.poolSize=10),h.release=function(e){var t=this;c(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return a(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return a(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)w(e[n],t,n,i.thatReturnsArgument);return t}},35666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new T(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return D()}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var a=S(c,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?h:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,c),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",m={};function v(){}function y(){}function g(){}var w={};w[i]=function(){return this};var b=Object.getPrototypeOf,E=b&&b(b(R([])));E&&E!==n&&r.call(E,i)&&(w=E);var _=g.prototype=v.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,i,c,a){var u=l(e[o],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,a)}),(function(e){n("throw",e,c,a)})):t.resolve(f).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,a)}))}a(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function S(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function R(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,c=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return c.next=c}}return{next:D}}function D(){return{value:t,done:!0}}return y.prototype=_.constructor=g,g.constructor=y,y.displayName=u(g,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,a,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},O(C.prototype),C.prototype[c]=function(){return this},e.AsyncIterator=C,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var c=new C(s(t,n,r,o),i);return e.isGeneratorFunction(n)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},O(_),u(_,a,"Generator"),_[i]=function(){return this},_.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,T.prototype={constructor:T,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(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function o(r,o){return a.type="throw",a.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var u=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(u&&s){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(u){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var c=i?i.completion:{};return c.type=e,c.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(c)},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),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},99196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=(n(99196),window.ReactDOM),r=n.n(t);function o(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var c=e.apply(t,n);function a(e){o(c,r,i,a,u,"next",e)}function u(e){o(c,r,i,a,u,"throw",e)}a(void 0)}))}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||a(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.")}()}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var l=n(63109),f=n.n(l),p=window.wp.i18n,d=n(96746);function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function w(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}function b(e){return b="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},b(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?E(e):t}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var C=window.wp.compose,S=window.wp.deprecated,k=n.n(S),P=n(94184),T=n.n(P),R=window.wp.keycodes;function D(e){e.stopPropagation()}var x=(0,e.forwardRef)((function(t,n){var r=t.children,o=h(t,["children"]);return(0,e.createElement)("div",s({},o,{ref:n,onMouseDown:D}),r)})),N=window.lodash;var j=["button","submit"],A=(0,C.createHigherOrderComponent)((function(t){return function(n){w(c,n);var r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(r);if(o){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function c(){var e;return m(this,c),(e=i.apply(this,arguments)).bindNode=e.bindNode.bind(E(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(E(e)),e.queueBlurCheck=e.queueBlurCheck.bind(E(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(E(e)),e}return y(c,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;(0,N.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,N.includes)(j,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return(0,e.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},(0,e.createElement)(t,s({ref:this.bindNode},this.props)))}}]),c}(e.Component)}),"withFocusOutside");function L(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)||a(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.")}()}var F=(0,e.createContext)({focusHistory:[]}),I=F.Provider,M=F.Consumer;I.displayName="FocusReturnProvider",M.displayName="FocusReturnConsumer",e.Component;var B=(0,C.createHigherOrderComponent)((function t(n){if((o=n)instanceof e.Component||"function"==typeof o){var r=n;return t({})(r)}var o,i=n.onFocusReturn,c=void 0===i?N.stubTrue:i;return function(t){var n=function(n){w(a,n);var r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(r);if(o){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function a(){var e;return m(this,a),(e=i.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return y(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==c())for(var r,o=[].concat(L(N.without.apply(void 0,[this.props.focus.focusHistory].concat(L(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return(0,e.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},(0,e.createElement)(t,this.props.childProps))}}]),a}(e.Component);return function(t){return(0,e.createElement)(M,null,(function(r){return(0,e.createElement)(n,{childProps:t,focus:r})}))}}}),"withFocusReturn"),U=window.wp.dom;var W=(0,C.createHigherOrderComponent)((function(t){return function(n){w(c,n);var r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(r);if(o){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _(this,e)});function c(){var t;return m(this,c),(t=i.apply(this,arguments)).focusContainRef=(0,e.createRef)(),t.handleTabBehaviour=t.handleTabBehaviour.bind(E(t)),t}return y(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===R.TAB){var t=U.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return(0,e.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},(0,e.createElement)(t,this.props))}}]),c}(e.Component)}),"withConstrainedTabbing"),H=W;var z=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return _(this,e)});function i(){var t;return m(this,i),(t=o.apply(this,arguments)).containerRef=(0,e.createRef)(),t.handleKeyDown=t.handleKeyDown.bind(E(t)),t.handleFocusOutside=t.handleFocusOutside.bind(E(t)),t}return y(i,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.containerRef.current.focus()}},{key:"handleFocusOutside",value:function(e){this.props.shouldCloseOnClickOutside&&this.onRequestClose(e)}},{key:"handleKeyDown",value:function(e){e.keyCode===R.ESCAPE&&this.handleEscapeKeyDown(e)}},{key:"handleEscapeKeyDown",value:function(e){this.props.shouldCloseOnEsc&&(e.stopPropagation(),this.onRequestClose(e))}},{key:"onRequestClose",value:function(e){var t=this.props.onRequestClose;t&&t(e)}},{key:"render",value:function(){var t=this.props,n=t.overlayClassName,r=t.contentLabel,o=t.aria,i=o.describedby,c=o.labelledby,a=t.children,u=t.className,s=t.role,l=t.style;return(0,e.createElement)(x,{className:T()("components-modal__screen-overlay",n),onKeyDown:this.handleKeyDown},(0,e.createElement)("div",{className:T()("components-modal__frame",u),style:l,ref:this.containerRef,role:s,"aria-label":r,"aria-labelledby":r?null:c,"aria-describedby":i,tabIndex:"-1"},a))}}]),i}(e.Component),q=(0,C.compose)([B,H,A])(z),V=window.wp.primitives,G=(0,e.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(V.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e,t,n,r,o,i,c){var a=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==i&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==i&&(p=s);var d,h={popoverLeft:f,contentWidth:f-a>0?a:f},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},v=n,y=null;if(!o)if("center"===n&&l.contentWidth===a)v="center";else if("left"===n&&h.contentWidth===a)v="left";else if("right"===n&&m.contentWidth===a)v="right";else{var g="left"==(v=h.contentWidth>m.contentWidth?"left":"right")?h.contentWidth:m.contentWidth;y=g!==a?g:null}if(d="center"===v?l.popoverLeft:"left"===v?h.popoverLeft:m.popoverLeft,c){var w=c.getBoundingClientRect();d=Math.min(d,w.right-a)}return{xAxis:v,popoverLeft:d,contentWidth:y}}function Z(e,t,n,r,o,i,c){var a=t.height;if(o){var u=((0,U.getScrollContainer)(i)||document.body).getBoundingClientRect().top+a-c;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,h=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var m="top"==(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;h=m!==a?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:h}}var J=function(e){w(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=O(t);if(n){var o=O(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _(this,e)});function o(){return m(this,o),r.apply(this,arguments)}return y(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(e.Component),X=A(J);function ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}var te=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.htmlDocument,r=void 0===n?document:n,o=t.className,i=void 0===o?"lockscroll":o,c=0,a=0;function u(e){var t=r.scrollingElement||r.body;e&&(a=t.scrollTop);var n=e?"add":"remove";t.classList[n](i),r.documentElement.classList[n](i),e||(t.scrollTop=a)}function s(){0===c&&u(!0),++c}function l(){1===c&&u(!1),--c}return function(e){w(n,e);var t=ee(n);function n(){return m(this,n),t.apply(this,arguments)}return y(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(e.Component)}();function ne(e,t,n){return ne="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},ne(e,t,n||e)}window.wp.isShallowEqual;var re=(window.wp.warning,n(34155)),oe=(0,e.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==re&&re.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}});var ie=(0,e.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),ce=(ie.Provider,ie.Consumer);e.Component;var ae=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return _(this,e)});function i(){var e;return m(this,i),(e=o.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(E(e)),e}return y(i,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||ne(O(i.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.name,o=t.fillProps,i=void 0===o?{}:o,c=t.getFills,a=(0,N.map)(c(r,this),(function(t){var n=t.occurrence,r=(0,N.isFunction)(t.children)?t.children(i):t.children;return e.Children.map(r,(function(t,r){if(!t||(0,N.isString)(t))return t;var o="".concat(n,"---").concat(t.key||r);return(0,e.cloneElement)(t,{key:o})}))})).filter((0,N.negate)(e.isEmptyElement));return(0,e.createElement)(e.Fragment,null,(0,N.isFunction)(n)?n(a):a)}}]),i}(e.Component),ue=function(t){return(0,e.createElement)(ce,null,(function(n){var r=n.registerSlot,o=n.unregisterSlot,i=n.getFills;return(0,e.createElement)(ae,s({},t,{registerSlot:r,unregisterSlot:o,getFills:i}))}))},se=0;function le(t){var n=t.name,r=t.children,o=t.registerFill,i=t.unregisterFill,c=function(t){var n=(0,e.useContext)(ie),r=n.getSlot,o=n.subscribe,i=u((0,e.useState)(r(t)),2),c=i[0],a=i[1];return(0,e.useEffect)((function(){return a(r(t)),o((function(){a(r(t))}))}),[t]),c}(n),a=(0,e.useRef)({name:n,children:r});return a.current.occurrence||(a.current.occurrence=++se),(0,e.useLayoutEffect)((function(){return o(n,a.current),function(){return i(n,a.current)}}),[]),(0,e.useLayoutEffect)((function(){a.current.children=r,c&&c.forceUpdate()}),[r]),(0,e.useLayoutEffect)((function(){n!==a.current.name&&(i(a.current.name,a.current),a.current.name=n,o(n,a.current))}),[n]),c&&c.node?((0,N.isFunction)(r)&&(r=r(c.props.fillProps)),(0,e.createPortal)(r,c.node)):null}var fe=function(t){return(0,e.createElement)(ce,null,(function(n){var r=n.registerFill,o=n.unregisterFill;return(0,e.createElement)(le,s({},t,{registerFill:r,unregisterFill:o}))}))};function pe(t){var n=t.name,r=t.fillProps,o=void 0===r?{}:r,i=t.as,c=void 0===i?"div":i,a=h(t,["name","fillProps","as"]),u=(0,e.useContext)(oe),l=(0,e.useRef)();return(0,e.useLayoutEffect)((function(){return u.registerSlot(n,l,o),function(){u.unregisterSlot(n,l)}}),[u.registerSlot,u.unregisterSlot,n]),(0,e.useLayoutEffect)((function(){u.updateSlot(n,o)})),(0,e.createElement)(c,s({ref:l},a))}function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function me(t){var n=(0,e.useContext)(oe),r=n.slots[t]||{},o=n.fills[t],i=(0,e.useMemo)((function(){return o||[]}),[o]),c=(0,e.useCallback)((function(e){n.updateSlot(t,e)}),[t,n.updateSlot]),a=(0,e.useCallback)((function(e){n.unregisterSlot(t,e)}),[t,n.unregisterSlot]),u=(0,e.useCallback)((function(e){n.registerFill(t,e)}),[t,n.registerFill]),s=(0,e.useCallback)((function(e){n.unregisterFill(t,e)}),[t,n.unregisterFill]);return he(he({},r),{},{updateSlot:c,unregisterSlot:a,fills:i,registerFill:u,unregisterFill:s})}function ve(t){var n,r=t.name,o=t.children,i=me(r),c=(0,e.useRef)({rerender:(n=u((0,e.useState)({}),2)[1],function(){return n({})})});return(0,e.useEffect)((function(){return i.registerFill(c),function(){i.unregisterFill(c)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),(0,e.createPortal)(o,i.ref.current)):null}function ye(t){var n=t.bubblesVirtually,r=h(t,["bubblesVirtually"]);return n?(0,e.createElement)(pe,r):(0,e.createElement)(ue,r)}function ge(t){return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(fe,t),(0,e.createElement)(ve,t))}function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,i=u(r.split(" "),2),c=i[0],a=i[1],s=void 0===a?"center":a;return T()("components-animate__appear",(K(o={},"is-from-"+s,"center"!==s),K(o,"is-from-"+c,"middle"!==c),o))}return"slide-in"===t?T()("components-animate__slide-in","is-from-"+r):"loading"===t?T()("components-animate__loading"):void 0}function _e(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:Ee(be({type:t},r))})}var Oe=H(B((function(e){return e.children}))),Ce="Popover";function Se(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,i=r.paddingBottom,c=r.paddingLeft,a=r.paddingRight,u=o?parseInt(o,10):0,s=i?parseInt(i,10):0,l=c?parseInt(c,10):0,f=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function ke(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Pe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Te(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Re=function(t){var n=t.headerTitle,r=t.onClose,o=t.onKeyDown,i=t.children,c=t.className,a=t.noArrow,l=void 0===a||a,f=t.isAlternate,p=t.position,d=void 0===p?"bottom right":p,m=(t.range,t.focusOnMount),v=void 0===m?"firstElement":m,y=t.anchorRef,g=t.shouldAnchorIncludePadding,w=t.anchorRect,b=t.getAnchorRect,E=t.expandOnMobile,_=t.animate,O=void 0===_||_,S=t.onClickOutside,P=t.onFocusOutside,D=t.__unstableSticky,N=t.__unstableSlotName,j=void 0===N?Ce:N,A=t.__unstableObserveElement,L=t.__unstableBoundaryParent,F=h(t,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),I=(0,e.useRef)(null),M=(0,e.useRef)(null),B=(0,e.useRef)(),W=(0,C.useViewportMatch)("medium","<"),H=u((0,e.useState)(),2),z=H[0],q=H[1],V=me(j),K=E&&W,Y=u((0,C.useResizeObserver)(),2),J=Y[0],ee=Y[1];l=K||l,(0,e.useLayoutEffect)((function(){if(K)return Te(B.current,"is-without-arrow",l),Te(B.current,"is-alternate",f),ke(B.current,"data-x-axis"),ke(B.current,"data-y-axis"),Pe(B.current,"top"),Pe(B.current,"left"),Pe(M.current,"maxHeight"),void Pe(M.current,"maxWidth");var e=function(){if(B.current&&M.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return(0,U.getRectangleFromRange)(r);if(r instanceof window.Element){var i=r.getBoundingClientRect();return o?i:Se(i,r)}var c=r.top,a=r.bottom,u=c.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Se(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Se(p,f)}}(I,w,b,y,g);if(e){var t,n,r=B.current,o=r.offsetParent,i=r.ownerDocument,c=0;if(o&&o!==i.body){var a=o.getBoundingClientRect();c=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}L&&(t=null===(n=B.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var s=function(e,t){var n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,c=u((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top").split(" "),3),a=c[0],s=c[1],l=void 0===s?"center":s,f=c[2],p=Z(e,t,a,f,n,r,o);return $($({},Q(e,t,l,f,n,p.yAxis,i)),p)}(e,ee.height?ee:M.current.getBoundingClientRect(),d,D,B.current,c,t),p=s.popoverTop,h=s.popoverLeft,m=s.xAxis,v=s.yAxis,E=s.contentHeight,_=s.contentWidth;"number"==typeof p&&"number"==typeof h&&(Pe(B.current,"top",p+"px"),Pe(B.current,"left",h+"px")),Te(B.current,"is-without-arrow",l||"center"===m&&"middle"===v),Te(B.current,"is-alternate",f),ke(B.current,"data-x-axis",m),ke(B.current,"data-y-axis",v),Pe(M.current,"maxHeight","number"==typeof E?E+"px":""),Pe(M.current,"maxWidth","number"==typeof _?_+"px":""),q(({left:"right",right:"left"}[m]||"center")+" "+({top:"bottom",bottom:"top"}[v]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),A&&(n=new window.MutationObserver(e)).observe(A,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[K,w,b,y,g,d,ee,D,A,L]),function(t,n){(0,e.useEffect)((function(){var e=setTimeout((function(){if(t&&n.current)if("firstElement"!==t)"container"===t&&n.current.focus();else{var e=U.focus.tabbable.find(n.current)[0];e?e.focus():n.current.focus()}}),0);return function(){return clearTimeout(e)}}),[])}(v,M);var ne=function(e){e.keyCode===R.ESCAPE&&r&&(e.stopPropagation(),r()),o&&o(e)},re=(0,e.createElement)(X,{onFocusOutside:function(e){if(P)P(e);else if(S){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),k()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),S(t)}else r&&r()}},(0,e.createElement)(_e,{type:O&&z?"appear":null,options:{origin:z}},(function(t){var o=t.className;return(0,e.createElement)(x,s({className:T()("components-popover",c,o,{"is-expanded":K,"is-without-arrow":l,"is-alternate":f})},F,{onKeyDown:ne,ref:B}),K&&(0,e.createElement)(te,null),K&&(0,e.createElement)("div",{className:"components-popover__header"},(0,e.createElement)("span",{className:"components-popover__header-title"},n),(0,e.createElement)(Ue,{className:"components-popover__close",icon:G,onClick:r})),(0,e.createElement)("div",{ref:M,className:"components-popover__content",tabIndex:"-1"},(0,e.createElement)("div",{style:{position:"relative"}},J,i)))})));return v&&(re=(0,e.createElement)(Oe,null,re)),V.ref&&(re=(0,e.createElement)(ge,{name:j},re)),y||w?re:(0,e.createElement)("span",{ref:I},re)};Re.Slot=function(t){var n=t.name,r=void 0===n?Ce:n;return(0,e.createElement)(ye,{bubblesVirtually:!0,name:r,className:"popover-slot"})};var De=Re,xe=function(t){var n,r,o=t.shortcut,i=t.className;return o?((0,N.isString)(o)&&(n=o),(0,N.isObject)(o)&&(n=o.display,r=o.ariaLabel),(0,e.createElement)("span",{className:i,"aria-label":r},n)):null};var Ne=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return _(this,e)});function i(){var e;return m(this,i),(e=o.apply(this,arguments)).delayedSetIsOver=(0,N.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return y(i,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(t,n){var r=this.props.children;if(1===e.Children.count(r)){var o=e.Children.only(r);"function"==typeof o.props[t]&&o.props[t](n)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=(0,N.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.position,o=t.text,i=t.shortcut;if(1!==e.Children.count(n))return n;var c=e.Children.only(n),a=this.state.isOver;return(0,e.cloneElement)(c,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:(0,e.concatChildren)(c.props.children,a&&(0,e.createElement)(De,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,e.createElement)(xe,{className:"components-tooltip__shortcut",shortcut:i})))})}}]),i}(e.Component),je=Ne,Ae=function(t){var n=t.icon,r=t.className,o=h(t,["icon","className"]),i=["dashicon","dashicons","dashicons-"+n,r].filter(Boolean).join(" ");return(0,e.createElement)("span",s({className:i},o))};function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ie=function(t){var n=t.icon,r=void 0===n?null:n,o=t.size,i=h(t,["icon","size"]);if("string"==typeof r)return(0,e.createElement)(Ae,s({icon:r},i));if(r&&Ae===r.type)return(0,e.cloneElement)(r,Fe({},i));var c=o||24;if("function"==typeof r)return r.prototype instanceof e.Component?(0,e.createElement)(r,Fe({size:c},i)):r(Fe({size:c},i));if(r&&("svg"===r.type||r.type===V.SVG)){var a=Fe(Fe({width:c,height:c},r.props),i);return(0,e.createElement)(V.SVG,a)}return(0,e.isValidElement)(r)?(0,e.cloneElement)(r,Fe({size:c},i)):r};function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Be=["onMouseDown","onClick"],Ue=(0,e.forwardRef)((function(t,n){var r=t.href,o=t.target,i=t.isPrimary,c=t.isSmall,a=t.isTertiary,u=t.isPressed,l=t.isBusy,f=t.isDefault,p=t.isSecondary,d=t.isLink,m=t.isDestructive,v=t.className,y=t.disabled,g=t.icon,w=t.iconSize,b=t.showTooltip,E=t.tooltipPosition,_=t.shortcut,O=t.label,C=t.children,S=t.__experimentalIsFocusable,P=h(t,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);f&&k()("Button isDefault prop",{alternative:"isSecondary"});var R=T()("components-button",v,{"is-secondary":f||p,"is-primary":i,"is-small":c,"is-tertiary":a,"is-pressed":u,"is-busy":l,"is-link":d,"is-destructive":m,"has-text":!!g&&!!C,"has-icon":!!g}),D=y&&!S,x=void 0===r||D?"button":"a",j="a"===x?{href:r,target:o}:{type:"button",disabled:D,"aria-pressed":u};if(y&&S){j["aria-disabled"]=!0;var A,L=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}(Be);try{for(L.s();!(A=L.n()).done;)P[A.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){L.e(e)}finally{L.f()}}var F=!D&&(b&&O||_||!!O&&(!C||(0,N.isArray)(C)&&!C.length)&&!1!==b),I=(0,e.createElement)(x,s({},j,P,{className:R,"aria-label":P["aria-label"]||O,ref:n}),g&&(0,e.createElement)(Ie,{icon:g,size:w}),C);return F?(0,e.createElement)(je,{text:O,shortcut:_,position:E},I):I})),We=function(t){var n=t.icon,r=t.title,o=t.onClose,i=t.closeLabel,c=t.headingId,a=t.isDismissible,u=i||(0,p.__)("Close dialog");return(0,e.createElement)("div",{className:"components-modal__header"},(0,e.createElement)("div",{className:"components-modal__header-heading-container"},n&&(0,e.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},n),r&&(0,e.createElement)("h1",{id:c,className:"components-modal__header-heading"},r)),a&&(0,e.createElement)(Ue,{onClick:o,icon:G,label:u}))},He=new Set(["alert","status","log","marquee","timer"]),ze=[],qe=!1;var Ve,Ge=0,Ke=function(t){w(i,t);var n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(n);if(r){var o=O(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return _(this,e)});function i(e){var t;return m(this,i),(t=o.call(this,e)).prepareDOM(),t}return y(i,[{key:"componentDidMount",value:function(){1==++Ge&&this.openFirstModal()}},{key:"componentWillUnmount",value:function(){0==--Ge&&this.closeLastModal(),this.cleanDOM()}},{key:"prepareDOM",value:function(){Ve||(Ve=document.createElement("div"),document.body.appendChild(Ve)),this.node=document.createElement("div"),Ve.appendChild(this.node)}},{key:"cleanDOM",value:function(){Ve.removeChild(this.node)}},{key:"openFirstModal",value:function(){(function(e){if(!qe){var t=document.body.children;(0,N.forEach)(t,(function(t){t!==e&&function(e){var t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||He.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),ze.push(t))})),qe=!0}})(Ve),document.body.classList.add(this.props.bodyOpenClassName)}},{key:"closeLastModal",value:function(){document.body.classList.remove(this.props.bodyOpenClassName),qe&&((0,N.forEach)(ze,(function(e){e.removeAttribute("aria-hidden")})),ze=[],qe=!1)}},{key:"render",value:function(){var t=this.props,n=t.onRequestClose,r=t.title,o=t.icon,i=t.closeButtonLabel,c=t.children,a=t.aria,u=t.instanceId,l=t.isDismissible,f=t.isDismissable,p=h(t,["onRequestClose","title","icon","closeButtonLabel","children","aria","instanceId","isDismissible","isDismissable"]),d=a.labelledby||"components-modal-header-".concat(u);return f&&k()("isDismissable prop of the Modal component",{alternative:"isDismissible prop (renamed) of the Modal component"}),(0,e.createPortal)((0,e.createElement)(q,s({onRequestClose:n,aria:{labelledby:r?d:null,describedby:a.describedby}},p),(0,e.createElement)("div",{className:"components-modal__content",role:"document"},(0,e.createElement)(We,{closeLabel:i,headingId:d,icon:o,isDismissible:l||f,onClose:n,title:r}),c)),this.node)}}]),i}(e.Component);Ke.defaultProps={bodyOpenClassName:"modal-open",role:"dialog",title:null,focusOnMount:!0,shouldCloseOnEsc:!0,shouldCloseOnClickOutside:!0,isDismissible:!0,aria:{labelledby:null,describedby:null}};var Ye,$e=(0,C.withInstanceId)(Ke),Qe=window.wp.a11y,Ze=function(t){var n=t.className,r=t.status,o=void 0===r?"info":r,i=t.children,c=t.spokenMessage,a=void 0===c?i:c,u=t.onRemove,s=void 0===u?N.noop:u,l=t.isDismissible,f=void 0===l||l,d=t.actions,h=void 0===d?[]:d,m=t.politeness,v=void 0===m?function(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}(o):m,y=t.__unstableHTML;!function(t,n){var r="string"==typeof t?t:(0,e.renderToString)(t);(0,e.useEffect)((function(){r&&(0,Qe.speak)(r,n)}),[r,n])}(a,v);var g=T()(n,"components-notice","is-"+o,{"is-dismissible":f});return y&&(i=(0,e.createElement)(e.RawHTML,null,i)),(0,e.createElement)("div",{className:g},(0,e.createElement)("div",{className:"components-notice__content"},i,h.map((function(t,n){var r=t.className,o=t.label,i=t.isPrimary,c=t.noDefaultClasses,a=void 0!==c&&c,u=t.onClick,s=t.url;return(0,e.createElement)(Ue,{key:n,href:s,isPrimary:i,isSecondary:!a&&!s,isLink:!a&&!!s,onClick:s?void 0:u,className:T()("components-notice__action",r)},o)}))),f&&(0,e.createElement)(Ue,{className:"components-notice__dismiss",icon:G,label:(0,p.__)("Dismiss this notice"),onClick:s,showTooltip:!1}))},Je=window.wc.components,Xe=window.wp.url,et=(window.moment,window.wp.date,function(e){return(0,Xe.addQueryArgs)("admin.php",e)}),tt=window.wp.apiFetch,nt=n.n(tt),rt=window.wp.domReady,ot=n.n(rt),it=function(){return window.wcTracks.isEnabled},ct=function(e,t){ot()((function(){var n,r,o;(null!==(n=null===(r=window.wc)||void 0===r||null===(o=r.tracks)||void 0===o?void 0:o.recordEvent)&&void 0!==n?n:window.wcTracks.recordEvent)(e,t)}))},at={CONNECT_ACCOUNT_CLICKED:"wcpay_connect_account_clicked",CONNECT_ACCOUNT_VIEW:"page_view",CONNECT_ACCOUNT_LEARN_MORE:"wcpay_welcome_learn_more",CONNECT_ACCOUNT_STRIPE_CONNECTED:"wcpay_stripe_connected",UPE_ENABLED:"wcpay_upe_enabled",UPE_DISABLED:"wcpay_upe_disabled",MULTI_CURRENCY_ENABLED_CURRENCIES_UPDATED:"wcpay_multi_currency_enabled_currencies_updated",PAYMENT_REQUEST_SETTINGS_CHANGE:"wcpay_payment_request_settings_change",SUBSCRIPTIONS_EMPTY_STATE_VIEW:"wcpay_subscriptions_empty_state_view",SUBSCRIPTIONS_EMPTY_STATE_FINISH_SETUP:"wcpay_subscriptions_empty_state_finish_setup",SUBSCRIPTIONS_EMPTY_STATE_CREATE_PRODUCT:"wcpay_subscriptions_empty_state_create_product",SUBSCRIPTIONS_ACCOUNT_NOT_CONNECTED_PRODUCT_MODAL_VIEW:"wcpay_subscriptions_account_not_connected_product_modal_view",SUBSCRIPTIONS_ACCOUNT_NOT_CONNECTED_PRODUCT_MODAL_FINISH_SETUP:"wcpay_subscriptions_account_not_connected_product_modal_finish_setup",SUBSCRIPTIONS_ACCOUNT_NOT_CONNECTED_PRODUCT_MODAL_DISMISS:"wcpay_subscriptions_account_not_connected_product_modal_dismiss"},ut=function(){var e=i(f().mark((function e(t){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.accept,e.abrupt("return",nt()({path:"/wc/v3/payments/tos",method:"POST",data:{accept:n}}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),st=function(){var e=i(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",nt()({path:"/wc/v3/payments/tos/reactivate",method:"POST"}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),lt=function(){var e=i(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=wcpay_tos_settings.trackStripeConnected,it()&&t){e.next=3;break}return e.abrupt("return");case 3:ct(at.CONNECT_ACCOUNT_STRIPE_CONNECTED,{is_existing_stripe_account:t.is_existing_stripe_account}),nt()({path:"/wc/v3/payments/tos/stripe_track_connected",method:"POST"});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ft=function(t){return(0,e.createElement)(Je.Link,s({},t,{href:"https://wordpress.com/tos",target:"_blank",rel:"noopener noreferrer",type:"external"}))},pt=function(t){var n=t.onAccept,r=t.onDecline,o=t.isBusy,i=t.hasError,c=(0,p.__)("WooCommerce Payments: Terms of Service","woocommerce-payments"),a=(0,d.Z)({mixedString:(0,p.__)("To continue using WooCommerce Payments, please review and agree to our {{link}}Terms of Service{{/link}}. By clicking “Accept” you agree to the Terms of Service.","woocommerce-payments"),components:{link:(0,e.createElement)(ft,null)}});return(0,e.createElement)($e,{title:c,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:r,className:"woocommerce-payments__tos-modal"},i&&(0,e.createElement)(Ze,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error"},(0,p.__)("Something went wrong. Please try accepting the Terms of Service again!","woocommerce-payments")),(0,e.createElement)("div",{className:"woocommerce-payments__tos-wrapper"},(0,e.createElement)("div",{className:"woocommerce-payments__tos-modal-message"},a),(0,e.createElement)("div",{className:"woocommerce-payments__tos-footer"},(0,e.createElement)(Ue,{isSecondary:!0,onClick:r,isBusy:o},(0,p.__)("Decline","woocommerce-payments")),(0,e.createElement)(Ue,{isPrimary:!0,onClick:n,isBusy:o},(0,p.__)("Accept","woocommerce-payments")))))},dt=function(t){var n=t.onDisable,r=t.onCancel,o=t.isBusy,i=t.hasError,c=(0,p.__)("Disable WooCommerce Payments","woocommerce-payments"),a=(0,d.Z)({mixedString:(0,p.__)("By declining our {{link}}Terms of Service{{/link}}, you’ll no longer be able to capture credit card payments using WooCommerce Payments. Your previous transaction and deposit data will still be available.","woocommerce-payments"),components:{link:(0,e.createElement)(ft,null)}});return(0,e.createElement)($e,{title:c,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:n,className:"woocommerce-payments__tos-modal"},i&&(0,e.createElement)(Ze,{status:"error",isDismissible:!1,className:"woocommerce-payments__tos-error"},(0,p.__)("Something went wrong. Please try again!","woocommerce-payments")),(0,e.createElement)("div",{className:"woocommerce-payments__tos-wrapper"},(0,e.createElement)("div",{className:"woocommerce-payments__tos-modal-message"},a),(0,e.createElement)("div",{className:"woocommerce-payments__tos-footer"},(0,e.createElement)(Ue,{isTertiary:!0,onClick:r,isBusy:o},(0,p.__)("Back","woocommerce-payments")),(0,e.createElement)(Ue,{isPrimary:!0,onClick:n,isBusy:o},(0,p.__)("Disable","woocommerce-payments")))))},ht=window.wp.data;wcpay_tos_settings.tosAgreementRequired?((Ye=document.createElement("div")).id="wcpay-tos-container",document.body.appendChild(Ye),r().render((0,e.createElement)((function(){var t=u((0,e.useState)(!0),2),n=t[0],r=t[1],o=u((0,e.useState)(!1),2),c=o[0],a=o[1],s=u((0,e.useState)(!1),2),l=s[0],p=s[1],d=u((0,e.useState)(!1),2),h=d[0],m=d[1],v=u((0,e.useState)(!1),2),y=v[0],g=v[1],w=function(){return r(!1)},b=function(){return a(!1)},E=function(){var e=i(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(!1),p(!0),e.next=5,ut({accept:!0});case 5:lt(),w(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),m(!0);case 12:return e.prev=12,p(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,9,12,15]])})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=i(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,g(!1),p(!0),e.next=5,ut({accept:!1});case 5:b(),window.location=(0,Xe.addQueryArgs)(et({page:"wc-settings",tab:"checkout"}),{"tos-disabled":1}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),g(!0);case 12:return e.prev=12,p(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,9,12,15]])})));return function(){return e.apply(this,arguments)}}();return c?(0,e.createElement)(dt,{onDisable:_,onCancel:function(){b(),r(!0)},isBusy:l,hasError:y}):n?(0,e.createElement)(pt,{onAccept:E,onDecline:function(){w(),a(!0)},isBusy:l,hasError:h}):null}),null),Ye)):lt(),wcpay_tos_settings.tosAgreementDeclined&&window.addEventListener("load",(function(){!function(e){var t=(0,ht.dispatch)("core/notices").createInfoNotice,n=function(){var t=i(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,st();case 3:return t.prev=3,window.location=e,t.finish(3);case 6:case"end":return t.stop()}}),t,null,[[0,,3,6]])})));return function(){return t.apply(this,arguments)}}();t((0,p.__)("Disabled WooCommerce Payments","woocommerce-payments"),{actions:[{label:(0,p.__)("Undo","woocommerce-payments"),onClick:n}]})}(wcpay_tos_settings.settingsUrl)}))}()}();