Jetpack by WordPress.com - Version 10.7-a.5

Version Description

Download this release

Release Info

Developer sdixon194
Plugin Icon 128x128 Jetpack by WordPress.com
Version 10.7-a.5
Comparing to
See all releases

Code changes from version 10.7-a.3 to 10.7-a.5

3rd-party/debug-bar/class-jetpack-search-debug-bar.php CHANGED
@@ -93,11 +93,17 @@ class Jetpack_Search_Debug_Bar extends Debug_Bar_Panel {
93
  * @return void
94
  */
95
  public function render() {
96
- $jetpack_search = (
97
  Jetpack_Search\Options::is_instant_enabled() ?
98
  Jetpack_Search\Instant_Search::instance() :
99
  Jetpack_Search\Classic_Search::instance()
100
  );
 
 
 
 
 
 
101
  $last_query_info = $jetpack_search->get_last_query_info();
102
 
103
  // If not empty, let's reshuffle the order of some things.
93
  * @return void
94
  */
95
  public function render() {
96
+ $jetpack_search = (
97
  Jetpack_Search\Options::is_instant_enabled() ?
98
  Jetpack_Search\Instant_Search::instance() :
99
  Jetpack_Search\Classic_Search::instance()
100
  );
101
+
102
+ // Search hasn't been initialized. Exit early and do not display the debug bar.
103
+ if ( ! method_exists( $jetpack_search, 'get_last_query_info' ) ) {
104
+ return;
105
+ }
106
+
107
  $last_query_info = $jetpack_search->get_last_query_info();
108
 
109
  // If not empty, let's reshuffle the order of some things.
CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ## 10.7-a.3 - 2022-02-09
6
  ### Enhancements
7
  - Dashboard: the Backup banner CTA on the At-a-Glance page will now be replaced with a "Redeem Coupon" CTA when a partner coupon is detected.
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
5
+ ## 10.7-a.5 - 2022-02-16
6
+ ### Enhancements
7
+ - Blocks: add support for color and spacing block options for Form, Mailchimp, Podcast Player, and Related Posts blocks.
8
+ - Blocks: add alignment block option for Form, Mailchimp, Podcast Player, Related Posts, and Repeat Visitor blocks.
9
+ - Dashboard: update the Free plan description to consider the currently active products.
10
+
11
+ ### Improved compatibility
12
+ - Image CDN: ensure that SVG images added to posts thanks to the SVG Support plugin can be displayed even when Jetpack's Image CDN is active.
13
+ - Search: Add deprecated class to prevent third-party integrations from failing after 10.6 updates.
14
+
15
+ ### Bug fixes
16
+ - Blocks: cron requests are now considered frontend requests, so blocks will no longer be rendered as fallbacks on those.
17
+ - Form Block: custom CSS classes added to the block are now applied on the frontend.
18
+ - Media Buttons: Fix issue where external medial modal cannot be closed.
19
+ - Search: Make debug bar more reliable.
20
+ - SSO: fix a bug with SSO not cleaning up wpcom_user_id.
21
+
22
+ ### Other changes <!-- Non-user-facing changes go here. This section will not be copied to readme.txt. -->
23
+ - Add note for translators.
24
+ - Add executing the WAF as part of the Jetpack plugin.
25
+ - Init 10.7-a.4 cycle
26
+ - PHPCS Changes for the first handful of JSON endpoints.
27
+ - PHPCS: Gravatar Hovercards
28
+ - Premium Content Block: restrict registration to WPcom.
29
+ - Premium Content Block: add a "Remove block and keep content" settings menu item and fixed transformations to groups.
30
+ - Premium Content Block: don't allow core markup blocks to be transformed to Premium Content block (e.g. core/nextpage, core/spacer).
31
+ - Premium Content Block: when content within a premium-content view is selected in the editor, switch to that view.
32
+ - Premium Content Block: fix accidental inversion of the block tabs.
33
+ - Remove the unused can_connect_service method
34
+ - Reworked the redeem partner coupon component implementation to match latest requirements for post-connection display
35
+ - Unroll Twitter Threads: revert endpoint to public.
36
+ - Update the path to the extension-availability util function on native mobile, after it has been updated for the web.
37
+ - About page: only fetch a11n data when page is active.
38
+
39
  ## 10.7-a.3 - 2022-02-09
40
  ### Enhancements
41
  - Dashboard: the Backup banner CTA on the At-a-Glance page will now be replaced with a "Redeem Coupon" CTA when a partner coupon is detected.
_inc/blocks/editor-beta.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-annotations', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport'), 'version' => 'b83eacea64d0daa350fa7391570f9ef4');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-annotations', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport'), 'version' => '1bb661925f2545ca3d809f18dbc636c0');
_inc/blocks/editor-beta.js CHANGED
@@ -1,22 +1,22 @@
1
  /*! For license information please see editor-beta.js.LICENSE.txt */
2
- !function(){var e,t,n,r,a,o,i={27538:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},29183:function(e){function t(){return e.exports=t=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},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},8172:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(31354),a=n(64803);function o(e){var t=(0,r.Z)(e);return function(e){return(0,a.Z)(t,e)}}},64803:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function a(e,t){var n,a,o,i,s,l,c=[];for(n=0;n<e.length;n++){if(s=e[n],i=r[s]){for(a=i.length,o=Array(a);a--;)o[a]=c.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(s)?t[s]:+s;c.push(l)}return c[0]}},7478:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8172);function a(e){var t=(0,r.Z)(e);return function(e){return+t({n:e})}}},31354:function(e,t,n){"use strict";var r,a,o,i;function s(e){for(var t,n,s,l,c=[],u=[];t=e.match(i);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);l=u.pop();){if(o[n]){if(o[n][0]===l){n=o[n][1]||n;break}}else if(a.indexOf(l)>=0||r[l]<r[n]){u.push(l);break}c.push(l)}o[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(u.reverse())}n.d(t,{Z:function(){return s}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],o={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function a(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(r,(function(){var e,r,a,o,i;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(a=arguments[7])&&(a=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(i=t[0][r]):(void 0===e&&(e=n),n++,i=t[e-1]),"f"===o?i=parseFloat(i)||0:"d"===o&&(i=parseInt(i)||0),void 0!==a&&("f"===o?i=i.toFixed(a):"s"===o&&(i=i.substr(0,a))),null!=i?i:"")}))}},1214:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},25389:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.Z=o},55807:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.Z=o},21621:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.Z=o},16380:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.Z=o},6801:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.Z=o},93456:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=o},36696:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=o},81326:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)a(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var n=t.split(r),a=n.length,o=0;o<a;++o)e[n[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=new e;t(o,r);var i=[];for(var s in o)o[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},89105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},92213:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,o,i=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1==(1&o)?o=o>>>1^n:o>>>=1;i=i>>>8^o}return-1^i}function a(e,n){var r,o,i;if(void 0!==a.crc&&n&&e||(a.crc=-1,e)){for(r=a.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return a.crc=r,-1^r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},97115:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var a=o(n[0]);a!==n[0]&&(t[n[0]]=a)}n=r.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),s=0;s<i.length;s++){var l=i[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},89453:function(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2571:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var a,o,i,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(o){r.once&&e.removeEventListener(t,a),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,a,o,i;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(a=o[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},95946:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],s=e[i];(a?-1!==t.indexOf(i):t(i,s,e))&&(n[i]=s)}return n}},95949:function(e,t,n){"use strict";var r=n(53566),a=n(48282);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var a=1;a<n;a++)r[a]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[a++]=0;r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=e>>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,o=8;o<this.padLength;o++)r[a++]=0;return r}},69016:function(e,t,n){"use strict";var r=n(53566),a=n(95949),o=n(47574),i=r.rotl32,s=r.sum32,l=r.sum32_5,c=o.ft_1,u=a.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),f=l(i(a,5),c(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=f}this.h[0]=s(this.h[0],a),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(e,t,n){"use strict";var r=n(53566).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},53566:function(e,t,n){"use strict";var r=n(48282),a=n(59503);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),s=0,l=t;s<i.length;s++,l+=4){var c;c="big"===a?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],i[s]=c>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,a,o,i,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+n+a+i+(l+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,s,l,c){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+o>>>0)<o?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+a+i+l+(u+=(p=p+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,s,l,c){return t+r+o+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},88617:function(e,t,n){"use strict";var r=n(57810),a=n(61285),o=n(95339),i=n.n(o),s=n(94481),l=n(88090),c=n(75565),u=n.n(c),p=n(69016),d=n.n(p),m=n(2571),h=n(702),f=n(92846),g=i()("i18n-calypso"),b="number_format_decimals",v="number_format_thousands_sep",k="messages",y=[function(e){return e}],E={};function w(){x.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function _(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",_(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",_(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function j(e,t){return e.dcnpgettext(k,t.context,t.original,t.plural,t.count)}function S(e,t){for(var n=y.length-1;n>=0;n--){var r=y[n](Object.assign({},t)),a=r.context?r.context+""+r.original:r.original;if(e.state.locale[a])return j(e.state.tannin,r)}return null}function x(){if(!(this instanceof x))return new x;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:u()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}x.throwErrors=!1,x.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},x.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},x.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},x.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,f.Z)(e,n,r,a)},x.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},x.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==E[n+e])return E[n+e];var r=d()().update(e).digest("hex");return E[n+e]=t?r.substr(0,t):r},s=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)y.push(s(!1));else{var c=o.substr(5).indexOf("-");if(c<0){var u=Number(o.substr(5));y.push(s(u))}else for(var p=Number(o.substr(5,c)),m=Number(o.substr(6+c)),h=p;h<=m;h++)y.push(s(h))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new l.Z((0,a.Z)({},k,this.state.locale)),this.state.numberFormatSettings.decimal_point=j(this.state.tannin,C([b])),this.state.numberFormatSettings.thousands_sep=j(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===b&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},x.prototype.getLocale=function(){return this.state.locale},x.prototype.getLocaleSlug=function(){return this.state.localeSlug},x.prototype.isRtl=function(){return"rtl"===this.state.textDirection},x.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},x.prototype.hasTranslation=function(){return!!S(this,C(arguments))},x.prototype.translate=function(){var e=C(arguments),t=S(this,e);if(t||(t=j(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=h.Z.apply(void 0,(0,r.Z)(n))}catch(e){if(!window||!window.console)return;var a=this.throwErrors?"error":"warn";"string"!=typeof e?window.console[a](e):window.console[a]("i18n sprintf error:",n)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},x.prototype.reRenderTranslations=function(){g("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},x.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},x.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=x},63807:function(e,t,n){"use strict";n.d(t,{Y4:function(){return l}});var r=n(88617),a=n(42928),o=n(80975),i=n(24531),s=new r.Z,l=s.numberFormat.bind(s),c=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,a.Z)(s),(0,o.Z)(s),(0,i.Z)(s));c.useRtl,c.withRtl},42928:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(20623),a=n(6438),o=n(68384),i=n(75808),s=n(80601),l=n(31615),c=n(61285),u=n(99196),p=n.n(u);function d(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(n){var u,d,m=n.displayName||n.name||"";return d=u=function(u){(0,s.Z)(m,u);var d=(0,l.Z)(m);function m(){var e;(0,a.Z)(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,c.Z)((0,i.Z)(e),"boundForceUpdate",e.forceUpdate.bind((0,i.Z)(e))),e}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){e.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){e.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var a=(0,r.Z)({locale:e.getLocaleSlug()},this.props,{},t);return p().createElement(n,a)}}]),m}(p().Component),(0,c.Z)(u,"displayName","Localized("+m+")"),d}}},92846:function(e,t,n){"use strict";function r(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,i=void 0===r?",":r,s=void 0===n?".":n,l="";return l=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o):""+Math.round(a)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(s)}n.d(t,{Z:function(){return r}})},24531:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(4291),a=n(99196),o=n.n(a),i=n(20036),s=n(94333);function l(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return(0,i.useSubscription)(t)}var l=(0,s.createHigherOrderComponent)((function(e){return(0,a.forwardRef)((function(t,a){var i=n();return o().createElement(e,(0,r.Z)({},t,{isRtl:i,ref:a}))}))}),"WithRTL");return{useRtl:n,withRtl:l}}},80975:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2037),a=n(99196),o=n.n(a);function i(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}return function(){var n=o().useState(t),a=(0,r.Z)(n,2),i=a[0],s=a[1];return o().useEffect((function(){var n=function(){return s(t)};return e.on("change",n),function(){return e.off("change",n)}}),[]),i}}},59503:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},30045:function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=n(49872)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===a(n))return!function(e){return"[object RegExp]"===a(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(n)?c(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},m.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,o,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},49872:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(26285).source,t.src_Cc=n(84080).source,t.src_Z=n(76202).source,t.src_P=n(87696).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},47595:function(e,t,n){"use strict";const r=n(22199),a=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),m=Symbol("updateAgeOnGet"),h=()=>1;const f=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[m]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},b=e=>{if(e[o]>e[a])for(let t=e[p].tail;e[o]>e[a]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}};class k{constructor(e,t,n,r,a){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=a||0}}const y=(e,t,n,r)=>{let a=n.value;g(e,a)&&(v(e,n),e[s]||(a=void 0)),a&&t.call(r,a.value,a.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[a]=e.max||1/0;const t=e.length||h;if(this[i]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[m]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,b(this)}get max(){return this[a]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[i]&&(this[i]=e,this[o]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[i](t,e);if(this[d].has(e)){if(s>this[a])return v(this,this[d].get(e)),!1;const i=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[o]+=s-i.length,i.length=s,this.get(e),b(this),!0}const m=new k(e,t,s,r,n);return m.length>this[a]?(this[c]&&this[c](e,t),!1):(this[o]+=m.length,this[p].unshift(m),this[d].set(e,this[p].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{const e=a-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>f(this,t,!1)))}}},75565:function(e,t,n){var r=n(2571),a=n(59503);function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=o,a(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},o.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},o.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},o.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},29337:function(e,t,n){"use strict";e.exports=n(46202)},99257:function(e,t,n){"use strict";e.exports=n(60231)},34790:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},95918:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=a},11825:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function a(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(99257);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(87696);t.lib={},t.lib.mdurl=n(36664),t.lib.ucmicro=n(39126),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},67649:function(e,t,n){"use strict";t.parseLinkLabel=n(34122),t.parseLinkDestination=n(39438),t.parseLinkTitle=n(43587)},39438:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return s;if(60===a)return s;if(62===a)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===a&&t+1<n?t+=2:t++}return s}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},34122:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s}},43587:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},46202:function(e,t,n){"use strict";var r=n(11825),a=n(67649),o=n(5210),i=n(22237),s=n(77711),l=n(85631),c=n(30045),u=n(36664),p=n(15661),d={default:n(62679),zero:n(20255),commonmark:n(2367)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new c,this.validateLink=f,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=d[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},77711:function(e,t,n){"use strict";var r=n(91479),a=[["table",n(69200),["paragraph","reference"]],["code",n(72348)],["fence",n(98779),["paragraph","reference","blockquote","list"]],["blockquote",n(84679),["paragraph","reference","blockquote","list"]],["hr",n(11227),["paragraph","reference","blockquote","list"]],["list",n(84871),["paragraph","reference","blockquote"]],["reference",n(10175)],["html_block",n(37186),["paragraph","reference","blockquote"]],["heading",n(7768),["paragraph","reference","blockquote"]],["lheading",n(27375)],["paragraph",n(29967)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,s=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(52602),e.exports=o},22237:function(e,t,n){"use strict";var r=n(91479),a=[["normalize",n(8668)],["block",n(67082)],["inline",n(10631)],["linkify",n(29658)],["replacements",n(34803)],["smartquotes",n(74209)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},o.prototype.State=n(73172),e.exports=o},85631:function(e,t,n){"use strict";var r=n(91479),a=[["text",n(13252)],["newline",n(30938)],["escape",n(4833)],["backticks",n(89362)],["strikethrough",n(24860).w],["emphasis",n(62693).w],["link",n(62947)],["image",n(4373)],["autolink",n(11360)],["html_inline",n(52987)],["entity",n(27843)]],o=[["balance_pairs",n(26961)],["strikethrough",n(24860).g],["emphasis",n(62693).g],["text_collapse",n(93831)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](s)},i.prototype.State=n(39247),e.exports=i},2367:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},62679:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},20255:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},5210:function(e,t,n){"use strict";var r=n(11825).assign,a=n(11825).unescapeAll,o=n(11825).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",f="";return m&&(h=(c=m.split(/(\s+)/g))[0],f=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||o(d.content)).indexOf("<pre")?s+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(o=!1)),a+=o?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,s=e.length;i<s;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,o=e.length;a<o;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,a,o,i="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[o]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},91479:function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},84679:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,j=e.lineMax,S=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(S++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(S)?(S++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(S)?(y=!0,(e.bsCount[t]+m)%4==3?(S++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=S;S<x&&(i=e.src.charCodeAt(S),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,S++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=S>=x,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=S-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((S=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(S++)||C){if(u)break;for(E=!1,s=0,c=w.length;s<c;s++)if(w[s](e,d,n,!0)){E=!0;break}if(E){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(S)?(S++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(S)?(y=!0,(e.bsCount[d]+m)%4==3?(S++,l++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=S;S<x&&(i=e.src.charCodeAt(S),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,S++;u=S>=x,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=S-e.bMarks[d]}for(g=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=j,e.parentType=b,p[1]=e.line,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},72348:function(e){"use strict";e.exports=function(e,t,n){var r,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},98779:function(e){"use strict";e.exports=function(e,t,n,r){var a,o,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(o=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,a))-l<o||(d=e.skipSpaces(d))<m)){p=!0;break}return o=e.sCount[t],e.line=s+(p?1:0),(c=e.push("fence","code",0)).info=i,c.content=e.getLines(t+1,s,o,!0),c.markup=u,c.map=[t,e.line],!0}},7768:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,o=e.src.charCodeAt(++c);35===o&&c<u&&i<=6;)i++,o=e.src.charCodeAt(++c);return!(i>6||c<u&&!r(o))&&(a||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},11227:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(i=1;c<u;){if((s=e.src.charCodeAt(c++))!==o&&!r(s))return!1;s===o&&i++}return!(i<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o))),!0)}},37186:function(e,t,n){"use strict";var r=n(34790),a=n(95918).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a<o.length&&!o[a][0].test(l);a++);if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(c=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(c,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},27375:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},84871:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,j,S,x,P,T,N,A,I,M,B=!1,R=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(B=!0),(P=o(e,t))>=0){if(d=!0,N=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(N,P-1)),B&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;d=!1}if(B&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),r)return!0;for(g=e.tokens.length,d?(M=e.push("ordered_list_open","ol",1),1!==v&&(M.attrs=[["start",v]])):M=e.push("bullet_list_open","ul",1),M.map=f=[t,0],M.markup=String.fromCharCode(b),y=t,T=!1,I=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=P,k=e.eMarks[y],p=E=e.sCount[y]+P-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(i=e.src.charCodeAt(x)))E+=4-(E+e.bsCount[y])%4;else{if(32!==i)break;E++}x++}if((u=(s=x)>=k?1:E-p)>4&&(u=1),c=p+u,(M=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),M.map=m=[t,0],d&&(M.info=e.src.slice(N,P-1)),S=e.tight,j=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=E,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(R=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=j,e.sCount[t]=C,e.tight=S,(M=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(A=!1,l=0,h=I.length;l<h;l++)if(I[l](e,y,n,!0)){A=!0;break}if(A)break;if(d){if((P=o(e,y))<0)break;N=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(M=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},29967:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,o=c.length;a<o;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},10175:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t,n,o){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],j=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";j<c&&!e.isEmpty(j);j++)if(!(e.sCount[j]-e.blkIndent>3||e.sCount[j]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,j,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,j,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=v.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===v.charCodeAt(_))&&w++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;if(!(g=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,l=w+=g.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;for(g=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&g.ok?(E=g.str,_=g.pos,w+=g.lines):(E="",_=s,w=l);_<C&&(i=v.charCodeAt(_),a(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&E)for(E="",_=s,w=l;_<C&&(i=v.charCodeAt(_),a(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:E,href:u}),e.parentType=f,e.line=t+w+1),!0))}},52602:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isSpace;function o(e,t,n,r){var o,i,s,l,c,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,s=l=u=p=0,c=(i=this.src).length;l<c;l++){if(o=i.charCodeAt(l),!d){if(a(o)){u++,9===o?p+=4-p%4:p++;continue}d=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<c&&i<n;){if(s=this.src.charCodeAt(l),a(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=r,e.exports=o},69200:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;c<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(m=(l=a(e,t+1)).split("|"),g=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?g.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=v=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(E=!1,u=0,p=w.length;u<p;u++)if(w[u](e,d,n,!0)){E=!0;break}if(E)break;if(!(l=a(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},67082:function(e){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},10631:function(e){"use strict";e.exports=function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},29658:function(e,t,n){"use strict";var r=n(11825).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(n=0,o=E.length;n<o;n++)if("inline"===E[n].type&&e.md.linkify.pretest(E[n].content))for(f=0,t=(i=E[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&f>0&&f--,a(l.content)&&f++),!(f>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;u<k.length;u++)g=k[u].url,b=e.md.normalizeLink(g),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(d=k[u].index)>m&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,c.push(s)),E[n].children=i=r(i,t,c)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},8668:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},34803:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function i(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}function s(e){var n,r,a=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||a||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},74209:function(e,t,n){"use strict";var r=n(11825).isWhiteSpace,a=n(11825).isPunctChar,o=n(11825).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,i,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,j,S,x;for(j=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=j.length-1;_>=0&&!(j[_].level<=m);_--);if(j.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(c));){if(E=w=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=c.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=c.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(b=o(f)||a(String.fromCharCode(f)),v=o(g)||a(String.fromCharCode(g)),k=r(f),(y=r(g))?E=!1:v&&(k||b||(E=!1)),k?w=!1:b&&(y||v||(w=!1)),34===g&&'"'===u[0]&&f>=48&&f<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=j.length-1;_>=0&&(h=j[_],!(j[_].level<m));_--)if(h.single===C&&j[_].level===m){h=j[_],C?(S=t.md.options.quotes[2],x=t.md.options.quotes[3]):(S=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,S),p+=x.length-1,h.token===n&&(p+=S.length-1),d=(c=i.content).length,j.length=_;continue e}E?j.push({token:n,pos:u.index,single:C,level:m}):w&&C&&(i.content=l(i.content,u.index,"’"))}else C&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},73172:function(e,t,n){"use strict";var r=n(47950);function a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=r,e.exports=a},11360:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var a,o,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return a=e.src.slice(l+1,u),n.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},89362:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-i)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=i}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},26961:function(e){"use strict";function t(e,t){var n,r,a,o,i,s,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(a=t[n],h.push(0),t[d].marker===a.marker&&m===a.token-1||(d=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),i=u[a.marker][(a.open?3:0)+a.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((o=t[r]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+c,h[r]=c,a.open=!1,o.end=n,o.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},62693:function(e){"use strict";function t(e,t){var n,r,a,o,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},27843:function(e,t,n){"use strict";var r=n(99257),a=n(11825).has,o=n(11825).isValidEntityCode,i=n(11825).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(n)?i(n):i(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&a(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},4833:function(e,t,n){"use strict";for(var r=n(11825).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},52987:function(e,t,n){"use strict";var r=n(95918).n;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},4373:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d,m,h,f,g,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(g=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),g=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[r(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},62947:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<f&&40===e.src.charCodeAt(c)){for(b=!1,c++;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(c>=f)return!1;if(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",g=c;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<f&&g!==c&&u.ok)for(m=u.str,c=u.pos;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);}(c>=f||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c<f&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?i=e.src.slice(g,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=f,!0}},30938:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t){var n,a,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,a=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(o=n-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<a&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},39247:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isWhiteSpace,o=n(11825).isPunctChar,i=n(11825).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var a=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,u,p,d,m,h=e,f=!0,g=!0,b=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<b?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(l=f,c=g):(l=f&&(!g||p),c=g&&(!f||m)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},24860:function(e){"use strict";function t(e,t){var n,r,a,o,i,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,a,o,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),n=0;n<a;n+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},13252:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},93831:function(e){"use strict";e.exports=function(e){var t,n,r=0,a=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}},47950:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},62098:function(e){"use strict";var t={};function n(e,r){var a;return"string"!=typeof r&&(r=n.defaultChars),a=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),a.push(r);for(n=0;n<e.length;n++)a[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return a}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,o,i,s,l,c="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?c+=a[r]:192==(224&r)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=r<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&r)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(c+=(l=r<<12&61440|o<<6&4032|63&i)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&s))?((l=r<<18&1835008|o<<12&258048|i<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},9401:function(e){"use strict";var t={};function n(e,r,a){var o,i,s,l,c,u="";for("string"!=typeof r&&(a=r,r=n.defaultChars),void 0===a&&(a=!0),c=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?a.push(r):a.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=e[n];return a}(r),o=0,i=e.length;o<i;o++)if(s=e.charCodeAt(o),a&&37===s&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},56558:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},36664:function(e,t,n){"use strict";e.exports.encode=n(9401),e.exports.decode=n(62098),e.exports.format=n(56558),e.exports.parse=n(5)},5:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=a.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(f);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,f=f.substr(b.length)),(t||b||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||b&&p[b]||(f=f.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(r=0;r<l.length;r++)-1!==(m=f.indexOf(l[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(v=f.slice(0,k),f=f.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var E=f.slice(0,y);f=f.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var _=this.hostname.split(/\./);for(r=0,o=_.length;r<o;r++){var C=_[r];if(C&&!C.match(c)){for(var j="",S=0,x=C.length;S<x;S++)C.charCodeAt(S)>127?j+="x":j+=C[S];if(!j.match(c)){var P=_.slice(0,r),T=_.slice(r+1),N=C.match(u);N&&(P.push(N[1]),T.unshift(N[2])),T.length&&(f=T.join(".")+f),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var A=f.indexOf("#");-1!==A&&(this.hash=f.substr(A),f=f.slice(0,A));var I=f.indexOf("?");return-1!==I&&(this.search=f.substr(I),f=f.slice(0,I)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},13699:function(){},87734:function(){},53745:function(){},48282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},32002:function(e){var t=1e3,n=60*t,r=60*n,a=24*r,o=7*a,i=365.25*a;function s(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=r)return s(e,o,r,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var p=0;p<s.length;p++)r.call(i,s[p])&&(l[s[p]]=i[s[p]])}}return l}},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(92213),a=n.n(r),o=n(68211),i=n.n(o),s=n(95339),l=n.n(s)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u);function d(e,t){var n;try{n=new URL(e,p)}catch(e){return null}var r,o,s,d,m,h="https:"===n.protocol,f=new URL("https://i0.wp.com");if(m=n.host,/^i[0-2]\.wp\.com$/.test(m))f.pathname=n.pathname,f.hostname=n.hostname;else{if(n.search)return null;var g=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(g=n.pathname.replace("://","//")),n.hostname===u&&(g=n.pathname),f.pathname=g,f.hostname=(r=g,o=a()(r),s=i()(o),d="i"+Math.floor(3*s()),l('determined server "%s" to use with "%s"',d,r),d+".wp.com"),h&&f.searchParams.set("ssl",1)}if(t)for(var b in t)"host"!==b&&"hostname"!==b?"secure"!==b||t[b]?f.searchParams.set(c[b]||b,t[b]):f.protocol="http:":f.hostname=t[b];return l("generated Photon URL: %s",f.href),f.href}},9587:function(e,t,n){"use strict";var r=n(45843);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},11268:function(e,t,n){e.exports=n(9587)()},45843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},10753:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,a){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u,p,d,m,h=e[c].replace(i,"%20"),f=h.indexOf(r);f>=0?(u=h.substr(0,f),p=h.substr(f+1)):(u=h,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),t(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},68527:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,a){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+r;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[a]))})).join(n):a?encodeURIComponent(t(a))+r+encodeURIComponent(t(e)):""}},76250:function(e,t,n){"use strict";t.decode=t.parse=n(10753),t.encode=t.stringify=n(68527)},97765:function(e,t,n){"use strict";var r=n(11268),a=n.n(r),o=n(99196),i=n.n(o),s=n(63130),l=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isSupported:s.Gb&&s.WD},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.state.isSupported&&(this.handleVisibilityChange=this.handleVisibilityChange.bind(this),document.addEventListener(s.WD.event,this.handleVisibilityChange))}},{key:"componentWillUnmount",value:function(){this.state.isSupported&&document.removeEventListener(s.WD.event,this.handleVisibilityChange)}},{key:"handleVisibilityChange",value:function(){var e;"function"==typeof this.props.onChange&&(e=this.props).onChange.apply(e,c((0,s.XO)()));"function"==typeof this.props.children&&this.forceUpdate()}},{key:"render",value:function(){return this.props.children?"function"==typeof this.props.children?this.state.isSupported?(e=this.props).children.apply(e,c((0,s.XO)())):this.props.children():i().Children.only(this.props.children):null;var e}}]),t}(i().Component);u.displayName="PageVisibility",u.propTypes={onChange:a().func,children:a().oneOfType([a().node,a().func])},t.Z=u},75031:function(e,t,n){"use strict";var r=n(97765);t.Z=r.Z},63130:function(e,t,n){"use strict";n.d(t,{Gb:function(){return o},WD:function(){return i},XO:function(){return s}});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=r&&Boolean(document.addEventListener),i=function(){if(!o)return null;var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var s=r.value;if(s.hidden in document)return s}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return null}(),s=function(){if(!i)return[!0,"visible"];var e=i.hidden,t=i.state;return[!document[e],document[t]]}},2601:function(e){"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}e.exports=function(e){var n,r={};return t(r,e),(n=function(e){return function(t){return function(n){var a,o,i=r[n.type],s=t(n);if(i)for(a=0;a<i.length;a++)(o=i[a](n,e))&&e.dispatch(o);return s}}}).effects=r,n}},19551:function(e,t,n){"use strict";var r,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function s(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function l(e,t){var n,l;function c(){n=a?new WeakMap:i()}function u(){var n,r,a,o,i,c=arguments.length;for(o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];for(i=t.apply(null,o),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!s(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(s(r.args,o,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,o)},o[0]=null,r.args=o,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=o),l=a?function(e){var t,a,o,s,l,c=n,u=!0;for(t=0;t<e.length;t++){if(a=e[t],!(l=a)||"object"!=typeof l){u=!1;break}c.has(a)?c=c.get(a):(o=new WeakMap,c.set(a,o),c=o)}return c.has(r)||((s=i()).isUniqueByDependants=u,c.set(r,s)),c.get(r)}:function(){return n},u.getDependants=t,u.clear=c,c(),u}n.d(t,{Z:function(){return l}}),r={},a="undefined"!=typeof WeakMap},54166:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function s(){o(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},p=b(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=d(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,s=d(r.width),l=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=m(r,"left","right")+o),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+o)-t,h=Math.round(l+i)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(l-=h)}return b(a.left,a.top,s,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):p}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,a,o,i,s,l,u=(r=(n=t).x,a=n.y,o=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:a,width:o,height:i,top:a,right:r+o,bottom:i+a,left:r}),l);c(this,{target:e,contentRect:u})},y=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new y(t,n,this);E.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));var _=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.Z=_},68211:function(e){"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,l=Math.random;function c(e){var n,r=e.length,a=this,o=0,i=a.i=a.j=0,l=a.S=[];for(r||(e=[r++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[i=s&i+e[o%r]+(n=l[o])],l[i]=n;(a.g=function(e){for(var n,r=0,o=a.i,i=a.j,l=a.S;e--;)n=l[o=s&o+1],r=r*t+l[s&(l[o]=l[i=s&i+n])+(l[i]=n)];return a.i=o,a.j=i,r})(t)}function u(e,t){var n,r=[],a=(typeof e)[0];if(t&&"o"==a)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==a?e:e+"\0"}function p(e,t){for(var n,r=e+"",a=0;a<r.length;)t[s&a]=s&(n^=19*t[s&a])+r.charCodeAt(a++);return m(t)}function d(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),m(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,m(n)]}}function m(e){return String.fromCharCode.apply(0,e)}e.exports=function(r,s){if(s&&!0===s.global)return s.global=!1,Math.random=e.exports(r,s),s.global=!0,Math.random;var l=s&&s.entropy||!1,h=[],f=(p(u(l?[r,m(n)]:0 in arguments?r:d(),3),h),new c(h));return p(m(f.S),n),function(){for(var e=f.g(6),n=a,r=0;e<o;)e=(e+r)*t,n*=t,r=f.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),n)},45702:function(e,t,n){const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&i||s||c}}e.exports=a;const o=n(75265),{re:i,t:s}=n(75698),l=n(48937),c=n(72840),u=n(88208),p=n(55062)},55062:function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=a.get(t);if(n)return n;const r=this.options.loose,o=r?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),s("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],m)).split(/\s+/).join(" ");const l=r?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],f=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>S(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new i(e,this.options))),g=(f.length,new Map);for(const e of f){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const v=[...g.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const a=new(n(47595))({max:1e3}),o=n(75265),i=n(45702),s=n(72840),l=n(88208),{re:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=n(75698),h=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=k(e,t),s("tildes",e),e=_(e,t),s("xrange",e),e=j(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,k=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,a,o)=>{let i;return s("tilde",e,t,n,r,a,o),v(n)?i="":v(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:v(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(s("replaceTilde pr",o),i=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,s("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,o,i)=>{let l;return s("caret",e,t,n,a,o,i),v(n)?l="":v(a)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(s("replaceCaret pr",i),l="0"===n?"0"===a?`>=${n}.${a}.${o}-${i} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${i} <${+n+1}.0.0-0`):(s("no pr"),l="0"===n?"0"===a?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),s("caret return",l),l}))},_=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,a,o,i,l)=>{s("xRange",e,n,r,a,o,i,l);const c=v(a),u=c||v(o),p=u||v(i),d=p;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),i=0,">"===r?(r=">=",u?(a=+a+1,o=0,i=0):(o=+o+1,i=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+a}.${o}.${i}${l}`):u?n=`>=${a}.0.0${l} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${o}.0${l} <${a}.${+o+1}.0-0`),s("xRange return",n),n}))},j=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),S=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),x=e=>(t,n,r,a,o,i,s,l,c,u,p,d,m)=>`${n=v(r)?"":v(a)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},88208:function(e,t,n){const r=n(72840),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(29609),{re:i,t:s}=n(75698),l=n(75265),{compareIdentifiers:c}=n(15322);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},52045:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},48937:function(e,t,n){const r=n(42969),a=n(74619),o=n(74765),i=n(71767),s=n(63590),l=n(94638);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return o(e,n,c);case">=":return i(e,n,c);case"<":return s(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},12977:function(e,t,n){const r=n(88208),a=n(38675),{re:o,t:i}=n(75698);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else n=e.match(o[i.COERCE]);return null===n?null:a(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},58230:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>{const a=new r(e,n),o=new r(t,n);return a.compare(o)||a.compareBuild(o)}},25112:function(e,t,n){const r=n(50192);e.exports=(e,t)=>r(e,t,!0)},50192:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},13751:function(e,t,n){const r=n(38675),a=n(42969);e.exports=(e,t)=>{if(a(e,t))return null;{const n=r(e),a=r(t),o=n.prerelease.length||a.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==a[e])return i+e;return s}}},42969:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0===r(e,t,n)},74765:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>0},71767:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>=0},20177:function(e,t,n){const r=n(88208);e.exports=(e,t,n,a)=>{"string"==typeof n&&(a=n,n=void 0);try{return new r(e,n).inc(t,a).version}catch(e){return null}}},63590:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<0},94638:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<=0},51847:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).major},87989:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).minor},74619:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0!==r(e,t,n)},38675:function(e,t,n){const{MAX_LENGTH:r}=n(29609),{re:a,t:o}=n(75698),i=n(88208),s=n(75265);e.exports=(e,t)=>{if(t=s(t),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},8906:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).patch},85676:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},82576:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(t,e,n)},25709:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},53907:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},21978:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},55641:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},53377:function(e,t,n){const r=n(75698);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(29609).SEMVER_SPEC_VERSION,SemVer:n(88208),compareIdentifiers:n(15322).compareIdentifiers,rcompareIdentifiers:n(15322).rcompareIdentifiers,parse:n(38675),valid:n(55641),clean:n(52045),inc:n(20177),diff:n(13751),major:n(51847),minor:n(87989),patch:n(8906),prerelease:n(85676),compare:n(50192),rcompare:n(82576),compareLoose:n(25112),compareBuild:n(58230),sort:n(21978),rsort:n(25709),gt:n(74765),lt:n(63590),eq:n(42969),neq:n(74619),gte:n(71767),lte:n(94638),cmp:n(48937),coerce:n(12977),Comparator:n(45702),Range:n(55062),satisfies:n(53907),toComparators:n(76055),maxSatisfying:n(33422),minSatisfying:n(17212),minVersion:n(9077),validRange:n(53140),outside:n(44494),gtr:n(2824),ltr:n(34370),intersects:n(30723),simplifyRange:n(23589),subset:n(34992)}},29609:function(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},72840:function(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},15322:function(e){const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},75265:function(e){const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},75698:function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(29609),a=n(72840),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let l=0;const c=(e,t,n)=>{const r=l++;a(r,t),s[e]=r,i[r]=t,o[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},2824:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,">",n)},30723:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},34370:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,"<",n)},33422:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},17212:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},9077:function(e,t,n){const r=n(88208),a=n(55062),o=n(74765);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!o(n,i)||(n=i)}return n&&e.test(n)?n:null}},44494:function(e,t,n){const r=n(88208),a=n(45702),{ANY:o}=a,i=n(55062),s=n(53907),l=n(74765),c=n(63590),u=n(94638),p=n(71767);e.exports=(e,t,n,d)=>{let m,h,f,g,b;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,g=">",b=">=";break;case"<":m=c,h=p,f=l,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,s=null;if(r.forEach((e=>{e.semver===o&&(e=new a(">=0.0.0")),i=i||e,s=s||e,m(e.semver,i.semver,d)?i=e:f(e.semver,s.semver,d)&&(s=e)})),i.operator===g||i.operator===b)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===b&&f(e,s.semver))return!1}return!0}},23589:function(e,t,n){const r=n(53907),a=n(50192);e.exports=(e,t,n)=>{const o=[];let i=null,s=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l){r(e,t,n)?(s=e,i||(i=e)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},34992:function(e,t,n){const r=n(55062),a=n(45702),{ANY:o}=a,i=n(53907),s=n(50192),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new a(">=0.0.0-0")]:[new a(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new a(">=0.0.0")]}const r=new Set;let l,p,d,m,h,f,g;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?p=u(p,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&p){if(d=s(l.semver,p.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==p.operator))return null}for(const e of r){if(l&&!i(e,String(l),n))return null;if(p&&!i(e,String(p),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let b=!(!p||n.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(m=c(l,e,n),m===e&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,String(e),n))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(h=u(p,e,n),h===e&&h!==p)return!1}else if("<="===p.operator&&!i(p.semver,String(e),n))return!1;if(!e.operator&&(p||l)&&0!==d)return!1}return!(l&&f&&!p&&0!==d)&&(!(p&&g&&!l&&0!==d)&&(!v&&!b))},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},76055:function(e,t,n){const r=n(55062);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},53140:function(e,t,n){const r=n(55062);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},88090:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7478),a={contextDelimiter:"",onMissingKey:null};function o(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},a)this.options[n]=void 0!==t&&n in t?t[n]:a[n]}o.prototype.getPluralForm=function(e,t){var n,a,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(a=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(a)),i=this.pluralForms[e]=o),i(t)},o.prototype.dcnpgettext=function(e,t,n,r,a){var o,i,s;return o=void 0===a?0:this.getPluralForm(e,a),i=n,t&&(i=t+this.options.contextDelimiter+n),(s=this.data[e][i])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)}},80816:function(e,t,n){"use strict";var r=n(95339),a=n.n(r),o=n(92819);const i=a()("dops:analytics");let s,l;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(e,t,n){c.setUser(e,t),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){s=e},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Built stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){c.tracks.recordPageView(e),c.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,o,i){c.ga.recordPurchase(e,t,n,r,a,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(i("- Super Props: %o",s),t=(0,o.assign)(t,s)),i('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):i('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};c.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){c.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){i("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};c.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),c.ga.initialized=!0)},recordPageView:function(e,t){c.ga.initialize(),i("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){c.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),i(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:a,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){l&&window._tkq.push(["identifyUser",l.ID,l.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=c},4096:function(e,t,n){"use strict";n.d(t,{Pb:function(){return r.Z},lQ:function(){return a.Z},Wp:function(){return o.Wp},Ug:function(){return o.Ug},M6:function(){return o.M6},OZ:function(){return i.Z},o_:function(){return s.Z}});var r=n(34239),a=n(99574),o=n(14588),i=n(22181),s=n(2528)},34239:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(){var e,t;return"object"==typeof window&&null!==(e=null===(t=window)||void 0===t?void 0:t.Jetpack_Editor_Initial_State)&&void 0!==e?e:null}},22181:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(34239);function a(e){var t,n,a,o,i,s,l,c,u;const p=(0,r.Z)(),d=null!==(t=null==p||null===(n=p.available_blocks)||void 0===n||null===(a=n[e])||void 0===a?void 0:a.available)&&void 0!==t&&t,m=null!==(o=null==p||null===(i=p.available_blocks)||void 0===i||null===(s=i[e])||void 0===s?void 0:s.unavailable_reason)&&void 0!==o?o:"unknown",h=null!==(l=null==p||null===(c=p.available_blocks)||void 0===c||null===(u=c[e])||void 0===u?void 0:u.details)&&void 0!==l?l:[];return{available:d,...!d&&{details:h,unavailableReason:m}}}},99574:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},2528:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(98817),a=n(22181);function o(e,t){const{available:n,unavailableReason:o}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},14588:function(e,t,n){"use strict";n.d(t,{Wp:function(){return o},Ug:function(){return i},M6:function(){return s}});var r=n(34239);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function i(){return"atomic"===a()}function s(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_private_site)&&void 0!==e&&e}},9481:function(e,t){"use strict";const n={i18n_default_locale_slug:"en",mc_analytics_enabled:!0,google_analytics_enabled:!1,google_analytics_key:null};t.Z=function(e){if(e in n)return n[e];throw new Error("config key `"+e+"` does not exist")}},11973:function(e,t,n){"use strict";var r=n(9481),a=n(80816);a.Z.setMcAnalyticsEnabled((0,r.Z)("mc_analytics_enabled")),a.Z.setGoogleAnalyticsEnabled((0,r.Z)("google_analytics_enabled"),(0,r.Z)("google_analytics_key")),t.Z=a.Z},78953:function(e,t,n){"use strict";var r=n(68039);t.Z={backgroundColor:{type:"string",validator:r.Z},textColor:{type:"string",validator:r.Z},buttonAndLinkColor:{type:"string",validator:r.Z},style:{type:"string",default:"small",validValues:["small","large"]},asin:{type:"string"},showImage:{default:!0,type:"boolean"},showTitle:{default:!0,type:"boolean"},showSeller:{default:!1,type:"boolean"},showPrice:{default:!0,type:"boolean"},showPurchaseButton:{default:!0,type:"boolean"}}},44046:function(e,t){"use strict";t.Z={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]}},23609:function(e,t,n){"use strict";var r=n(69307),a=n(55066),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(4981),u=n(33352),p=n(44046);const __=i.__;t.Z=(0,l.withNotices)((function(e){let{attributes:{backgroundColor:t,textColor:n,buttonAndLinkColor:a,asin:i,showImage:d,showTitle:m,showSeller:h,showPrice:f,showPurchaseButton:g},className:b,name:v,noticeUI:k,setAttributes:y}=e;const E=(0,c.getBlockDefaultClassName)(v),[w,_]=(0,r.useState)([]),C=/^(\d+)$|\(ASIN:(.+)\)$/,j=(0,r.createElement)(l.Placeholder,{label:__("Amazon","jetpack"),instructions:__("Search by entering an Amazon product name or ID below.","jetpack"),icon:u.Z,notices:k},(0,r.createElement)("form",null,(0,r.createElement)(l.FormTokenField,{value:i,suggestions:w,onInputChange:()=>{_(p.Z.products.map((e=>`${e.title} (ASIN:${e.asin})`)))},maxSuggestions:10,label:__("Products","jetpack"),onChange:e=>{const t=e.map((e=>{const t=C.exec(e),n=t[1]||t[2];return p.Z.products.filter((e=>e.asin===n))}));y({asin:t[0][0].asin})}}),(0,r.createElement)(l.Button,{isSecondary:!0,isLarge:!0,type:"submit"},__("Preview","jetpack")))),S=(0,r.createElement)(s.InspectorControls,null,i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PanelBody,{title:__("Promotion Settings","jetpack")},(0,r.createElement)(l.ToggleControl,{label:__("Show Image","jetpack"),checked:d,onChange:()=>y({showImage:!d})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Title","jetpack"),checked:m,onChange:()=>y({showTitle:!m})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Author/Seller","jetpack"),checked:h,onChange:()=>y({showSeller:!h})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Price","jetpack"),checked:f,onChange:()=>y({showPrice:!f})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Purchase Button","jetpack"),checked:g,onChange:()=>y({showPurchaseButton:!g})})),(0,r.createElement)(s.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:t,onChange:e=>y({backgroundColor:e}),label:__("Background Color","jetpack")},{value:n,onChange:e=>y({textColor:e}),label:__("Text Color","jetpack")},{value:a,onChange:e=>y({buttonAndLinkColor:e}),label:__("Button & Link Color","jetpack")}]},(0,r.createElement)(s.ContrastChecker,{isLargeText:!1,textColor:n,backgroundColor:t}))));return(0,r.createElement)("div",{className:b},S,i?(()=>{const{title:e,detailPageUrl:s,listPrice:c,imageUrlMedium:b,imageWidthMedium:v,imageHeightMedium:k}=p.Z.products.filter((e=>e.asin===i))[0],y="TODO",w=b&&(0,r.createElement)("a",{target:"_blank",href:s,rel:"noopener noreferrer"},(0,r.createElement)("img",{alt:e,src:b,width:v,heigth:k})),_=o().mostReadable(a,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString();return i?(0,r.createElement)("div",{style:{backgroundColor:t,color:n,width:v}},d&&w,m&&(0,r.createElement)("div",{className:`${E}-title`},(0,r.createElement)(l.ExternalLink,{href:s,style:{color:a}},e)),h&&(0,r.createElement)("div",{className:`${E}-seller`},y),f&&(0,r.createElement)("div",{className:`${E}-list-price`},c),g&&(0,r.createElement)(l.Button,{href:s,icon:u.Z,isPrimary:!0,className:`${E}-button`,style:{color:_,backgroundColor:a,borderColor:a}},__("Shop Now","jetpack"))):null})():j)}))},33352:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"m13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277002-.202-.481003.154-.251003.416 2.925003 3.326 6.786003 5.326 11.076003 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",fillRule:"evenodd"}))},6007:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(65736),a=n(78953),o=n(23609),i=n(33352),s=n(57535);const __=r.__,l="amazon",c=__("Amazon","jetpack"),u={attributes:a.Z,title:c,description:__("Promote Amazon products and earn a commission from sales.","jetpack"),icon:{src:i.Z,foreground:(0,s.m)()},category:"earn",keywords:[__("amazon","jetpack"),__("affiliate","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:o.Z,save:()=>null,example:{attributes:{}}}},22874:function(e,t,n){"use strict";n.d(t,{J:function(){return p},F:function(){return d}});var r=n(4981),a=n(9818),o=n(65736),i=n(57535),s=n(41362);const _x=o._x,__=o.__;function l(e){let{spotifyShowUrl:t,spotifyImageUrl:n}=e;return[["core/image",{url:n,linkDestination:"none",href:t,align:"center",width:165,height:40,className:"is-spotify-podcast-badge"}]]}function c(e){let{episodeTrack:t,feedUrl:n}=e;const{guid:r}=t;return[["jetpack/podcast-player",{customPrimaryColor:(0,i.m)(),hexPrimaryColor:(0,i.m)(),url:n,selectedEpisodes:r?[{guid:r}]:[],showCoverArt:!1,showEpisodeTitle:!1,showEpisodeDescription:!1}]]}function u(e){let{spotifyShowUrl:t,spotifyImageUrl:n,episodeTrack:o={},feedUrl:i}=e;const s=[...c({episodeTrack:o,feedUrl:i})];return t&&n&&s.push(...l({spotifyShowUrl:t,spotifyImageUrl:n})),s.push(...function(e){let{episodeTrack:t}=e;const n=[["core/heading",{level:3,content:_x("Summary","noun: summary of a podcast episode","jetpack"),placeholder:__("Podcast episode title","jetpack")}]],a=(0,r.pasteHandler)({HTML:t.description_html,mode:"BLOCKS"});return a.length?n.push(...a):n.push(["core/paragraph",{placeholder:__("Podcast episode summary","jetpack")}]),n}({episodeTrack:o})),s.push(...function(){const e="jetpack/conversation";return(0,a.select)("core/blocks").getBlockType(e)?[[e,{participants:[{slug:"participant-0",label:__("Speaker 1","jetpack")},{slug:"participant-1",label:__("Speaker 2","jetpack")},{slug:"participant-2",label:__("Speaker 3","jetpack")}]},[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-0"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-1"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-2"}]]]]:[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}]]}()),s}function p(e){return(0,s.Z)(u(e))}function d(e){if(e.spotifyImageUrl&&e.spotifyShowUrl)return(0,s.Z)([...l(e)])}},63533:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819);const __=l.__,p="09:00",d="17:00";class m extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,{opening:r,closing:a}=e;return(0,o.createElement)(o.Fragment,{key:t},(0,o.createElement)("div",{className:"business-hours__row"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.TextControl,{type:"time",label:__("Opening","jetpack"),value:r,className:"business-hours__open",placeholder:p,onChange:e=>{this.setHour(e,"opening",t)}}),(0,o.createElement)(c.TextControl,{type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:d,onChange:e=>{this.setHour(e,"closing",t)}})),(0,o.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,o.createElement)(c.Button,{isSmall:!0,isLink:!0,icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,o.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")}," "),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.Button,{isLink:!0,label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,o.createElement)("div",{className:"business-hours__remove"}," ")))})),a()(this,"setHour",((e,t,n)=>{const{day:r,attributes:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})})),a()(this,"toggleClosed",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:p,closing:d}]:[];return{...n,hours:t}}return n}))})})),a()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),a()(this,"removeInterval",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})}))}isClosed(){const{day:e}=this.props;return(0,u.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,o.createElement)(c.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,o.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,o.createElement)("div",{className:s()(e.name,"business-hours__day")},this.renderDayToggle()),(0,o.createElement)("div",{className:s()(e.name,"closed","business-hours__hours")}," "),(0,o.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=m},20920:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(69771),l=n(92819);const _x=i._x;class c extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,r=n.hours;return(0,o.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,o.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,s.date)(t,a))}render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,o.createElement)("div",{className:"jetpack-business-hours__item"},(0,o.createElement)("dt",{className:e.name},t.days[e.name]),(0,o.createElement)("dd",null,(0,l.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,o.createElement)("br",null)))}}t.Z=c},85932:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(27538),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(89105),p=n.n(u),d=n(65736),m=n(69771),h=n(55609),f=n(63533),g=n(20920),b=n(8042);const __=d.__,v={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class k extends s.Component{constructor(){super(...arguments),i()(this,"state",{localization:v,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:v},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:v,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:o,hasFetched:i}=this.state,{startOfWeek:l}=o,c=r.concat(r.slice(0,l)).slice(l);if(!i)return(0,s.createElement)(h.Placeholder,{icon:b.qv,label:__("Loading business hours","jetpack")});if(!n){const e=(0,m.__experimentalGetSettings)(),{formats:{time:n}}=e;return(0,s.createElement)("dl",{className:p()(t,"jetpack-business-hours")},c.map(((e,t)=>(0,s.createElement)(g.Z,{key:t,day:e,localization:o,timeFormat:n}))))}return(0,s.createElement)("div",{className:p()(t,"is-edit")},c.map(((e,t)=>(0,s.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}t.Z=k},8042:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(85932),s=n(41632),l=n(57535);const __=a.__,_x=a._x,c=[{name:"Sun",hours:[]},{name:"Mon",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Tue",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Wed",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Thu",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Fri",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Sat",hours:[]}],u="business-hours",p=(0,s.Z)((0,r.createElement)(o.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),d={title:__("Business Hours","jetpack"),description:__("Display opening hours for your business.","jetpack"),icon:{src:p,foreground:(0,l.m)()},category:"grow",supports:{html:!0,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},keywords:[_x("opening hours","block search term","jetpack"),_x("closing time","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("working day","block search term","jetpack")],attributes:{days:{type:"array",default:c}},edit:e=>(0,r.createElement)(i.Z,e),save:()=>null,example:{attributes:{days:c}}}},83487:function(e,t,n){"use strict";var r=n(92819),a=n(55609);const o=(0,a.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:a}=t,o=(0,r.get)(n,"color"),i=!(0,r.get)(a,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:a||!i?void 0:getComputedStyle(i).color}}));t.Z=o},70443:function(e,t,n){"use strict";var r=n(68039);t.Z={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},24429:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(77012);const __=o.__;function s(e){let{borderRadius:t="",setAttributes:n}=e;const o=(0,r.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.RangeControl,{allowReset:!0,initialPosition:i.pg,label:__("Border radius","jetpack"),max:i.Gp,min:i.G0,onChange:o,value:t}))}},63020:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(65736);const __=o.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:o,fallbackTextColor:i,gradientValue:s,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(a.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:o,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},80790:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},h:function(){return d}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=[{value:"px",label:"px",default:150},{value:"%",label:"%",default:100},{value:"em",label:"em",default:10}],c=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function p(e){return(0,r.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,r.createElement)(d,e))}function d(e){let{align:t,width:n,onChange:a}=e;const[s,p]=(0,r.useState)(null);(0,r.useEffect)((()=>{void 0===n&&p("px")}),[n]);const d="left"===t||"right"===t;return(0,r.createElement)(i.BaseControl,{label:__("Button width","jetpack")},(0,r.createElement)("div",{className:o()("jetpack-button__width-settings",{"is-aligned":d})},!d&&(0,r.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},u.map((e=>(0,r.createElement)(i.Button,{key:e,isSmall:!0,isPrimary:e===n,onClick:()=>function(e){const t=n===e?void 0:e;p("%"),a(t)}(e)},e)))),(0,r.createElement)(i.__experimentalUnitControl,{className:"jetpack-button__custom-width",isResetValueOnUnitChange:!0,max:"%"===s||null!=n&&n.includes("%")?100:void 0,min:0,onChange:e=>a(e),onUnitChange:e=>p(e),size:"small",units:d?c:l,value:n,unit:s})))}},77012:function(e,t,n){"use strict";n.d(t,{DA:function(){return a},pg:function(){return o},Gp:function(){return i},G0:function(){return s}});var r=n(52175);const a=!!r.__experimentalUseGradient,o=5,i=50,s=0},78593:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(24429),o=n(63020),i=n(80790);function s(e){let{attributes:t,backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,setAttributes:c,setBackgroundColor:u,setTextColor:p,textColor:d,gradientValue:m,setGradient:h,isGradientAvailable:f}=e;const{align:g,borderRadius:b,width:v}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Z,{backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,gradientValue:m,setBackgroundColor:u,setGradient:h,setTextColor:p,textColor:d,isGradientAvailable:f}),(0,r.createElement)(a.Z,{borderRadius:b,setAttributes:c}),(0,r.createElement)(i.Z,{align:g,width:v,onChange:e=>c({width:e})}))}},16867:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(52175),c=n(94333),u=n(65736),p=n(83487),d=n(78593),m=n(77012),h=n(31123);const __=u.__;t.Z=(0,c.compose)((0,l.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:i,setAttributes:c,textColor:u}=e,{align:p,borderRadius:f,element:g,placeholder:b,text:v,width:k}=t,y=(e=>{const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current})(p);(0,h.Z)({attributes:t,clientId:i,setAttributes:c}),(0,o.useEffect)((()=>{y!==p&&("left"===p||"right"===p)&&null!=k&&k.includes("%")&&c({width:void 0})}),[p,y,c,k]);const{gradientClass:E,gradientValue:w,setGradient:_}=m.DA?(0,l.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},C=s()("wp-block-button",r),j=s()("wp-block-button__link",{"has-background":n.color||w,[n.class]:!w&&n.class,"has-text-color":u.color,[u.class]:u.class,[E]:E,"no-border-radius":0===f,"has-custom-width":!!k}),S={...!n.color&&w?{background:w}:{backgroundColor:n.color},color:u.color,borderRadius:f?f+"px":void 0,width:k};return(0,o.createElement)("div",{className:C},(0,o.createElement)(l.RichText,{allowedFormats:"input"===g?[]:void 0,className:j,disableLineBreaks:"input"===g,onChange:e=>{const t="input"===g?e.replace(/<br>/gim," "):e;c({text:t})},placeholder:b||__("Add text…","jetpack"),style:S,value:v,withoutInteractiveFormatting:!0}),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(d.Z,a()({gradientValue:w,setGradient:_,isGradientAvailable:m.DA},e))))}))},51245:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},32278:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(65736),a=n(70443),o=n(16867),i=n(51245),s=n(41328),l=n(20510);const __=r.__,c="button",u={title:__("Button","jetpack"),icon:i.Z,category:(0,l.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:a.Z,edit:o.Z,save:s.Z}},41328:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(77012);function l(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:b,url:v,width:k}=t;if(!f)return null;const y=(0,i.getColorClassName)("background-color",l),E=s.DA?(0,i.__experimentalGetGradientClass)(h):void 0,w=(0,i.getColorClassName)("color",b),_=o()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),C=o()("wp-block-button__link",{"has-text-color":b||m,[w]:w,"has-background":l||h||p||d,[y]:y,[E]:E,"no-border-radius":0===c,"has-custom-width":!!k}),j={background:d||void 0,backgroundColor:y||d||h?void 0:p,color:w?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,r.createElement)("div",{className:_},(0,r.createElement)(i.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:v,id:a,rel:"noopener noreferrer",role:"button",style:j,tagName:"a",target:"_blank",value:g}))}},31123:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(9818),o=n(69307);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:l}=(0,a.useSelect)((e=>{const{getBlockAttributes:a,getBlockRootClientId:o}=e("core/block-editor"),i=a(o(n))||{},l=(0,r.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,r.pickBy)(l,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,r.isEmpty)(l)||i(l)}),[l,i])}},35932:function(e,t,n){"use strict";var r=n(68039);t.Z={backgroundColor:{type:"string",default:"ffffff",validator:r.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:r.Z},textColor:{type:"string",default:"4D5055",validator:r.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},16485:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(72566);const __=i.__,_x=i._x,l=e=>{let{onEditClick:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},c=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:i,parseEmbedCode:s,setAttributes:l,setEmbedCode:c}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:s,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>c(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(o.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(o.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>l({hideEventTypeDetails:!t})})),n&&(0,r.createElement)(o.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(o.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},__("Follow these instructions to change the colors in this block.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:u}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(l,{onEditClick:u})),d&&(0,r.createElement)(s.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c,e)))}},77017:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(68039);const __=o.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:o,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},96537:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=(n(86841),n(92819)),s=n(5157),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(9818),m=n(59040),h=n(35932),f=n(14087),g=n(79042),b=n(79884),v=n(87072),k=n(16485);const __=u.__,_x=u._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:u,noticeOperations:y,noticeUI:E,setAttributes:w}=e,_=(0,p.getBlockDefaultClassName)(u),C=(0,f.S)(h.Z,t);(0,i.isEqual)(C,t)||w(C);const{backgroundColor:j,hideEventTypeDetails:S,primaryColor:x,textColor:P,style:T,url:N}=C,[A,I]=(0,o.useState)(N),[M,B]=(0,o.useState)(!1),[R,L]=(0,o.useState)(!1),[Z,D]=(0,o.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,o.useEffect)((()=>{N&&b.lR!==N&&"link"!==T&&(0,v.Z)(N,L).catch((()=>{w({url:void 0}),F()}))}),[]);const O=e=>{if(!e)return void F();e.preventDefault();const t=(0,g.CC)(A);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,d.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,d.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),D(t.buttonAttributes)}(0,v.Z)(t.url,L).then((()=>{const e=(0,f.S)(h.Z,t);w(e),B(!1),y.removeAllNotices()})).catch((()=>{w({url:void 0}),F()}))}else F()},z=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(c.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:m.Z,notices:E},(0,o.createElement)("form",{onSubmit:O},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:A||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(c.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=s.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:S?1:0,background_color:j,primary_color:x,text_color:P});return`${N}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),V=(0,o.createElement)(l.InnerBlocks,{template:[[b.Ss.name,{...b.Ss.attributes,...Z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(R)return z;let G=n;return N&&!M&&(G+=` calendly-style-${T}`),(0,o.createElement)("div",{className:G},(0,o.createElement)(k.ZP,a()({},e,{defaultClassName:_,embedCode:A,isEditingUrl:M,parseEmbedCode:O,setEmbedCode:I,setIsEditingUrl:B})),N&&!M?"inline"===T?$:V:U)}))},59040:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},79884:function(e,t,n){"use strict";n.d(t,{lR:function(){return d},Ss:function(){return m},u2:function(){return h},Xd:function(){return f}});var r=n(65736),a=n(4981),o=n(35932),i=n(77017),s=n(96537),l=n(59040),c=n(56610),u=n(79042),p=n(57535);const __=r.__,_x=r._x,d="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:d}},h="calendly",f={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:l.Z,foreground:(0,p.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:s.Z,save:c.Z,attributes:o.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:d},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&u.mL.test(e.textContent),transform:e=>{const t=(0,u.CC)(e.textContent);return(0,a.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]}},56610:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null))}},79042:function(e,t,n){"use strict";n.d(t,{mL:function(){return r},CC:function(){return a}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),a=r.get("background_color"),o=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},89534:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouHeading:{type:"string",default:__("Message Sent","jetpack")},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}}},60689:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__('The CRM Jetpack Form extension failed to activate. The error message was "<error />".',"jetpack"),{error:(0,r.createElement)("span",null,t)}))}},81316:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(60689);const __=s.__,c=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:s,crmData:c,setCRMData:u}=e;const p=((e,t,n,r)=>()=>{t(void 0),e(!0),o()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((e=>{if("success"!==e.code)throw new Error(e.code);const t=Object.assign({},n);t.jp_form_ext_enabled=!0,r(t)})).catch((e=>{t(e.message)})).finally((()=>{e(!1)}))})(n,s,c,u);return t?(0,r.createElement)(i.Spinner,null):a?(0,r.createElement)(l.Z,{error:a}):(0,r.createElement)(i.Button,{isSecondary:!0,onClick:p},__("Enable Jetpack Forms Extension","jetpack"))},u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("A site administrator must enable the CRM Jetpack Forms extension.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"));t.Z=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s}=e;return i.can_activate_extension?(0,r.createElement)("div",null,(0,r.createElement)(p,null),(0,r.createElement)("br",null),(0,r.createElement)(c,{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s})):(0,r.createElement)(u,null)}},36080:function(e,t,n){"use strict";var r=n(69307),a=n(53377),o=n.n(a),i=n(55609),s=n(65736),l=n(81316);const __=s.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Jetpack CRM is installed but has an invalid version.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Zero BS CRM plugin is now Jetpack CRM. Update to the latest version to integrate your contact form with your CRM.","jetpack")),d=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},(0,r.createInterpolateElement)(__("You can save contacts from Jetpack contact forms in Jetpack CRM. Learn more at <a>jetpackcrm.com</a>","jetpack"),{a:(0,r.createElement)(i.ExternalLink,{href:"https://jetpackcrm.com"})})),m=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You already have the Jetpack CRM plugin installed, but it's not activated. Activate the Jetpack CRM plugin to save contacts from this contact form in your Jetpack CRM.","jetpack")),h=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:s}=e;const[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(!1);return t.jp_form_ext_enabled?o().satisfies(o().coerce(t.crm_version),"3.0.19 - 4.0.0")?(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Contacts from this form will be stored in Jetpack CRM.","jetpack")):(0,r.createElement)(i.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:__("Jetpack CRM","jetpack"),checked:a,onChange:e=>s({jetpackCRM:e}),help:__("Store contact form submissions in your CRM.","jetpack")}):(0,r.createElement)(l.Z,{isActivatingExt:c,setIsActivatingExt:u,extActivationError:p,setExtActivationError:d,crmData:t,setCRMData:n})};t.Z=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}=e;const s=o().coerce(t.crm_version);if(t.crm_installed&&!s)return(0,r.createElement)(u,null);if(t.crm_installed&&o().lt(s,"3.0.19"))return(0,r.createElement)(p,null);let l=c.NOT_INSTALLED;return t.crm_active?l=c.ACTIVE:t.crm_installed&&(l=c.INSTALLED),(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===l&&(0,r.createElement)(h,{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}),c.INSTALLED===l&&(0,r.createElement)(m,null),c.NOT_INSTALLED===l&&(0,r.createElement)(d,null))}},6361:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(36080);const __=s.__,c=e=>{let{isFetchingCRMData:t,hasCRMDataError:n,crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c}=e;return t?(0,r.createElement)(i.Spinner,null):n?null:(0,r.createElement)(l.Z,{crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c})};t.Z=e=>{let{jetpackCRM:t,setAttributes:n}=e;const[a,s]=(0,r.useState)(!0),[l,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)();return(0,r.useEffect)((()=>{o()({path:"/jetpack/v4/jetpack_crm"}).then((e=>{if(e.error)throw e.message;u(!1),d(e)})).catch((()=>u(!0))).finally((()=>s(!1)))}),[]),(0,r.createElement)(i.PanelBody,{title:__("CRM Integration","jetpack"),initialOpen:!1},(0,r.createElement)(i.BaseControl,null,(0,r.createElement)(c,{isFetchingCRMData:a,hasCRMDataError:l,crmData:p,setCRMData:d,jetpackCRM:t,setAttributes:n})))}},69802:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(80500),c=n(8523);const __=a.__;t.Z=(0,s.withInstanceId)((function(e){const{id:t,instanceId:n,required:a,label:s,setAttributes:u,width:p,defaultValue:d}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-checkbox-${n}`,className:"jetpack-field jetpack-field-checkbox",label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:d}),(0,r.createElement)(l.Z,{required:a,label:s,setAttributes:u}),(0,r.createElement)(c.Z,{id:t,required:a,width:p,setAttributes:u}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Checkbox Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Checked by default","jetpack"),checked:d,onChange:e=>u({defaultValue:e?"true":""})}))))})}))},57324:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(80500),c=n(84803),u=n(10745);const __=a.__;t.Z=(0,s.withInstanceId)((e=>{var t;let{id:n,instanceId:s,width:p,consentType:d,implicitConsentMessage:m,explicitConsentMessage:h,setAttributes:f}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-consent-${s}`,className:"jetpack-field jetpack-field-consent",label:(0,r.createElement)(r.Fragment,null,"explicit"===d&&(0,r.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),(0,r.createElement)(l.Z,{required:!1,label:null!==(t={implicit:m,explicit:h}[d])&&void 0!==t?t:"",setAttributes:f,labelFieldName:`${d}ConsentMessage`,placeholder:(0,a.sprintf)(
3
  /* translators: placeholder is a type of consent: implicit or explicit */
4
- __("Add %s consent message…","jetpack"),d)}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(c.Z,{setAttributes:f,width:p}))),(0,r.createElement)(i.InspectorAdvancedControls,null,(0,r.createElement)(u.Z,{setAttributes:f,id:n})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Consent Settings","jetpack")},(0,r.createElement)(o.BaseControl,null,(0,r.createElement)(o.SelectControl,{label:__("Permission to email","jetpack"),value:d,options:[{label:__("Mention that you can email","jetpack"),value:"implicit"},{label:__("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:e=>f({consentType:e})})))))})}))},8523:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(41632),l=n(84803),c=n(10745);const __=a.__;t.Z=e=>{let{setAttributes:t,width:n,id:a,required:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{title:__("Required","jetpack"),icon:(0,s.Z)((0,r.createElement)(i.Path,{d:"M8.23118 8L16 16M8 16L15.7688 8 M6.5054 11.893L17.6567 11.9415M12.0585 17.6563L12 6.5",stroke:"currentColor"})),onClick:()=>{t({required:!u})},className:u?"is-pressed":void 0}))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Field is required","jetpack"),className:"jetpack-field-label__required",checked:u,onChange:e=>t({required:e}),help:__("Does this field have to be completed for the form to be submitted?","jetpack")}),(0,r.createElement)(l.Z,{setAttributes:t,width:n}))),(0,r.createElement)(o.InspectorAdvancedControls,null,(0,r.createElement)(c.Z,{setAttributes:t,id:a})))}},10745:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,id:n}=e;return(0,r.createElement)(o.TextControl,{label:__("Unique CSS ID","jetpack"),value:n,onChange:e=>t({id:e}),help:__("A unique ID that can be used in CSS or as an anchor.","jetpack")})}},80500:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175);const __=a.__;t.Z=e=>{let{setAttributes:t,label:n,labelFieldName:a,placeholder:i,resetFocus:s,required:l}=e;return(0,r.createElement)("div",{className:"jetpack-field-label"},(0,r.createElement)(o.RichText,{tagName:"label",value:n,className:"jetpack-field-label__input",onChange:e=>{s&&s(),t(a?{[a]:e}:{label:e})},placeholder:null!=i?i:__("Add label…","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),l&&(0,r.createElement)("span",{className:"required"},__("(required)","jetpack")))}},56764:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(80500),l=n(29110),c=n(8523);const __=a.__;t.Z=(0,i.withInstanceId)((function(e){const{id:t,type:n,instanceId:a,required:i,label:u,setAttributes:p,isSelected:d,width:m,options:h}=e,[f,g]=(0,r.useState)(null),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=h.slice(0);null===t?(n.splice(e,1),e>0&&g(e-1)):(n.splice(e,1,t),g(e)),p({options:n})},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=h.slice(0);let n=0;"object"==typeof e?(t.push(""),n=t.length-1):(t.splice(e+1,0,""),n=e+1),g(n),p({options:t})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{id:`jetpack-field-multiple-${a}`,className:"jetpack-field jetpack-field-multiple",label:(0,r.createElement)(s.Z,{required:i,label:u,setAttributes:p,isSelected:d,resetFocus:()=>g(null)})},(0,r.createElement)("ol",{className:"jetpack-field-multiple__list",id:`jetpack-field-multiple-${a}`},h.map(((e,t)=>(0,r.createElement)(l.Z,{type:n,key:t,option:e,index:t,onChangeOption:b,onAddOption:v,isInFocus:t===f&&d,isSelected:d})))),d&&(0,r.createElement)(o.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:__("Insert option","jetpack"),onClick:v},__("Add option","jetpack"))),(0,r.createElement)(c.Z,{id:t,required:i,setAttributes:p,width:m}))}))},7640:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(80500),s=n(8523);const __=a.__;function l(e){const{id:t,required:n,label:a,setAttributes:l,placeholder:c,width:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"jetpack-field"},(0,r.createElement)(i.Z,{required:n,label:a,setAttributes:l}),(0,r.createElement)(o.Disabled,null,(0,r.createElement)(o.TextareaControl,{placeholder:c,value:c,onChange:e=>l({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,r.createElement)(s.Z,{id:t,required:n,setAttributes:l,width:u}))}},84803:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,width:n}=e;return(0,r.createElement)(o.BaseControl,{label:__("Field Width","jetpack"),help:__("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},(0,r.createElement)(o.ButtonGroup,{"aria-label":__("Field Width","jetpack")},[25,50,75,100].map((e=>(0,r.createElement)(o.Button,{key:e,isSmall:!0,isPrimary:e===n,onClick:()=>t({width:e})},e,"%")))))}},36755:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(29183),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(55609),c=n(92694),u=n(80500),p=n(8523);const __=i.__;function d(e){const{id:t,type:n,required:r,label:a,setAttributes:i,placeholder:s,width:c}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"jetpack-field"},(0,o.createElement)(u.Z,{required:r,label:a,setAttributes:i}),(0,o.createElement)(l.Disabled,null,(0,o.createElement)(l.TextControl,{type:n,placeholder:s,value:s,onChange:e=>i({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,o.createElement)(p.Z,{id:t,required:r,width:c,setAttributes:i}))}const m=(0,s.createHigherOrderComponent)((e=>t=>{if(t.name.indexOf("jetpack/field")>-1){const n=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return(0,o.createElement)(e,a()({},t,{className:n}))}return(0,o.createElement)(e,t)}),"withCustomClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/contact-form",m)},32605:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(9818),s=n(4981);const __=o.__,l=()=>{const{insertConsentBlock:e}=(()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),{insertBlock:t}=(0,i.useDispatch)("core/block-editor");return{insertConsentBlock:(0,r.useCallback)((async()=>{var n;let r=(null!==(n=e.innerBlocks)&&void 0!==n?n:[]).findIndex((e=>{let{name:t}=e;return"jetpack/button"===t}));var a;-1===r&&(r=(null!==(a=e.innerBlocks)&&void 0!==a?a:[]).length);const o=await(0,s.createBlock)("jetpack/field-consent");await t(o,r,e.clientId,!1)}),[t,e.clientId,e.innerBlocks])}})();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("You’re already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),(0,r.createElement)(a.Button,{isSecondary:!0,onClick:e,style:{marginBottom:"1em"}},__("Add email permission request","jetpack")),(0,r.createElement)("br",null))};t.Z=()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);return(0,r.useMemo)((()=>(e=>{const t=e.some((e=>{let{name:t}=e;return"jetpack/field-email"===t})),n=e.some((e=>{let{name:t}=e;return"jetpack/field-consent"===t}));return!!t&&!n})(e.innerBlocks)),[e.innerBlocks])?(0,r.createElement)(l,null):null}},95363:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=(n(65736),n(92819)),i=n(99230),s=n(56994),l=n(58505);const c="creative-mail-by-constant-contact/creative-mail-plugin.php",u=e=>{let{pluginState:t,setPluginState:n}=e;const[a,o]=(0,r.useState)(),[i,c]=(0,r.useState)(!1),u=((e,t,n)=>(0,r.useCallback)(((r,a)=>{e(void 0),t(!0),r(a).then((()=>{n(l.Q.ACTIVE)})).catch((t=>{e(t)})).finally((()=>t(!1)))}),[t,e,n]))(o,c,n);return a?(0,r.createElement)(s.Z,{error:a}):(0,r.createElement)(l.Z,{pluginState:t,onCreativeMailPluginClick:u,isInstalling:i})},p=e=>{let{isFetchingPlugins:t,hasError:n,pluginState:o,setPluginState:i}=e;return t?(0,r.createElement)(a.Spinner,null):n?null:(0,r.createElement)(u,{pluginState:o,setPluginState:i})};t.Z=()=>{const[e,t]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[s,u]=(0,r.useState)(l.Q.NOT_INSTALLED);return(0,r.useEffect)((()=>{(0,i.uM)().then((e=>{a(!1),(0,o.get)(e,c)&&((0,o.get)(e,[c,"active"])?u(l.Q.ACTIVE):u(l.Q.INSTALLED))})).catch((()=>a(!0))).finally((()=>t(!1)))}),[u,t,a]),(0,r.createElement)(p,{isFetchingPlugins:e,hasError:n,pluginState:s,setPluginState:u})}},56994:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__("The plugin failed to install. <b /> Please check the <a>plugin information</a> for detailed requirements.","jetpack"),{a:(0,r.createElement)(a.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:(0,r.createElement)("span",null,t)}))}},58505:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(69307),a=n(4096),o=n(55609),i=n(65736),s=n(99230),l=n(92819);const __=i.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(o.Button,{isSecondary:!0,icon:(0,r.createElement)(o.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},p=e=>{let{installAndActivateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",null,(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,null),!n&&(0,r.createElement)(o.Button,{isSecondary:!0,onClick:t},__("Install Creative Mail plugin","jetpack"))))},d=e=>{let{activateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,{isActivating:!0}),!n&&(0,r.createElement)(o.Button,{isSecondary:!0,onClick:t},__("Activate Creative Mail Plugin","jetpack")))},m=()=>(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("You’re all setup for email marketing with Creative Mail.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:`${(0,l.get)((0,a.Pb)(),"adminUrl",!1)}admin.php?page=creativemail`},__("Open Creative Mail settings","jetpack"))));t.Z=e=>{let{pluginState:t,onCreativeMailPluginClick:n,isInstalling:a}=e;return(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===t&&(0,r.createElement)(m,null),c.INSTALLED===t&&(0,r.createElement)(d,{activateCreativeMailPlugin:()=>n(s.bu,"creative-mail-by-constant-contact/creative-mail-plugin"),isInstalling:a}),c.NOT_INSTALLED===t&&(0,r.createElement)(p,{installAndActivateCreativeMailPlugin:()=>n(s.yX,"creative-mail-by-constant-contact"),isInstalling:a}))}},31186:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(32605),s=n(95363);const __=o.__;t.Z=()=>(0,r.createElement)(a.PanelBody,{title:__("Newsletter Integration","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,null,(0,r.createElement)(i.Z,null),(0,r.createElement)(s.Z,null)))},29110:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;class i extends r.Component{constructor(){super(...arguments),this.onChangeOption=this.onChangeOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onDeleteOption=this.onDeleteOption.bind(this),this.textInput=(0,r.createRef)()}componentDidMount(){this.props.isInFocus&&this.textInput.current.focus()}componentDidUpdate(){this.props.isInFocus&&this.textInput.current.focus()}onChangeOption(e){this.props.onChangeOption(this.props.index,e.target.value)}onKeyPress(e){return"Enter"===e.key?(this.props.onAddOption(this.props.index),void e.preventDefault()):"Backspace"===e.key&&""===e.target.value?(this.props.onChangeOption(this.props.index),void e.preventDefault()):void 0}onDeleteOption(){this.props.onChangeOption(this.props.index)}render(){const{isSelected:e,option:t,type:n}=this.props;return(0,r.createElement)("li",{className:"jetpack-option"},n&&"select"!==n&&(0,r.createElement)("input",{className:"jetpack-option__type",type:n,disabled:!0}),(0,r.createElement)("input",{type:"text",className:"jetpack-option__input",value:t,placeholder:__("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),e&&(0,r.createElement)(o.Button,{className:"jetpack-option__remove",icon:"trash",label:__("Remove option","jetpack"),onClick:this.onDeleteOption}))}}t.Z=i},89998:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(4981),l=n(89534);const __=o.__,c=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"];t.Z=[{attributes:{submit_button_text:{type:"string",default:__("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:__("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"},...l.Z},migrate:(e,t)=>{const n=(0,a.omit)(e,c),r={text:e.submitButtonText||e.submit_button_text||__("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[n,t.concat((0,s.createBlock)("jetpack/button",{element:"button",...r}))]},isEligible:e=>!(!e.has_form_settings_set&&!e.hasFormSettingsSet),save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)}]},31970:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(89105),i=n.n(o),s=n(89453),l=n(65736),c=n(94333),u=n(4981),p=n(9818),d=n(39630),m=n(52175),h=n(55609),f=n(4096),g=n(22985),b=n(12289),v=n(6361),k=n(31186);const __=l.__,y=["jetpack/markdown","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/file","core/html","core/separator","core/spacer","core/subhead","core/table","core/verse","core/video"];t.Z=(0,c.compose)([(0,p.withSelect)(((e,t)=>{const{getBlockType:n,getBlockVariations:r,getDefaultBlockVariation:o}=e("core/blocks"),{getBlocks:i}=e("core/block-editor"),{getEditedPostAttribute:s}=e("core/editor"),{getSite:l,getUser:c}=e("core"),u=i(t.clientId),p=s("author"),d=p&&c(p)&&c(p).email,m=s("title");return{blockType:n&&n(t.name),defaultVariation:o&&o(t.name,"block"),variations:r&&r(t.name,"block"),innerBlocks:u,hasInnerBlocks:u.length>0,siteTitle:(0,a.get)(l&&l(),["title"]),postTitle:m,postAuthorEmail:d}})),(0,p.withDispatch)((e=>{const{replaceInnerBlocks:t,selectBlock:n}=e("core/block-editor");return{replaceInnerBlocks:t,selectBlock:n}})),c.withInstanceId])((function(e){let{attributes:t,setAttributes:n,siteTitle:o,postTitle:c,postAuthorEmail:p,hasInnerBlocks:E,replaceInnerBlocks:w,selectBlock:_,clientId:C,instanceId:j,className:S,blockType:x,variations:P,defaultVariation:T}=e;const{to:N,subject:A,customThankyou:I,customThankyouHeading:M,customThankyouMessage:B,customThankyouRedirect:R,jetpackCRM:L}=t,[Z,D]=(0,r.useState)(!1),F=i()(S,"jetpack-contact-form"),O=e=>(0,a.map)(e,(e=>{let[t,n,r=[]]=e;return(0,u.createBlock)(t,n,O(r))})),z=e=>{e.attributes&&n(e.attributes),e.innerBlocks&&w(C,O(e.innerBlocks)),_(C)};(0,r.useEffect)((()=>{E||u.registerBlockVariation||z(b.Z[0])})),(0,r.useEffect)((()=>{if(void 0===N&&p&&n({to:p}),void 0===A&&void 0!==o&&void 0!==c){n({subject:"["+o+"] "+c})}}),[N,p,A,o,c,n]);const U=e=>0!==(e=e.trim()).length&&(!s.validate(e)&&{email:e}),$=e=>{if(0===e.target.value.length)return D(!1),void n({to:p});const t=e.target.value.split(",").map(U).filter(Boolean);t&&t.length&&D(t)},V=e=>{D(!1),n({to:e.trim()})},G=()=>{const e=void 0!==N?N:"",t=void 0!==A?A:"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(h.TextControl,{"aria-describedby":`contact-form-${j}-email-${Z&&Z.length>0?"error":"help"}`,label:__("Email address to send to","jetpack"),placeholder:__("name@example.com","jetpack"),onKeyDown:e=>{"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:$,onChange:V,help:__("You can enter multiple email addresses separated by commas.","jetpack")}),(0,r.createElement)(g.Z,{isError:!0,id:`contact-form-${j}-email-error`},(()=>{if(Z){if(1===Z.length)return Z[0]&&Z[0].email?(0,l.sprintf)(
5
  /* translators: placeholder is an email address. */
6
  __("%s is not a valid email address.","jetpack"),Z[0].email):Z[0];if(2===Z.length)return(0,l.sprintf)(
7
  /* translators: placeholders are email addresses. */
8
  __("%1$s and %2$s are not a valid email address.","jetpack"),Z[0].email,Z[1].email);const e=Z.map((e=>e.email));return(0,l.sprintf)(
9
  /* translators: placeholder is a list of email addresses. */
10
- __("%s are not a valid email address.","jetpack"),e.join(", "))}return null})()),(0,r.createElement)(h.TextControl,{label:__("Email subject line","jetpack"),value:t,placeholder:__("Enter a subject","jetpack"),onChange:e=>n({subject:e}),help:__("Choose a subject line that you recognize as an email from your website.","jetpack")}),(0,r.createElement)(h.SelectControl,{label:__("On Submission","jetpack"),value:I,options:[{label:__("Show a summary of submitted fields","jetpack"),value:""},{label:__("Show a custom text message","jetpack"),value:"message"},{label:__("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:e=>n({customThankyou:e})}),"redirect"!==I&&(0,r.createElement)(h.TextControl,{label:__("Message Heading","jetpack"),value:M,placeholder:__("Message Sent","jetpack"),onChange:e=>n({customThankyouHeading:e})}),"message"===I&&(0,r.createElement)(h.TextareaControl,{label:__("Message Text","jetpack"),value:B,placeholder:__("Thank you for your submission!","jetpack"),onChange:e=>n({customThankyouMessage:e})}),"redirect"===I&&(0,r.createElement)(h.BaseControl,{label:__("Redirect Address","jetpack"),id:`contact-form-${j}-thankyou-url`},(0,r.createElement)(m.URLInput,{id:`contact-form-${j}-thankyou-url`,value:R,className:"jetpack-contact-form__thankyou-redirect-url",onChange:e=>n({customThankyouRedirect:e})})))};return!E&&u.registerBlockVariation?(0,r.createElement)("div",{className:F},(0,r.createElement)(m.__experimentalBlockVariationPicker,{icon:(0,a.get)(x,["icon","src"]),label:(0,a.get)(x,["title"]),instructions:__("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:P,allowSkip:!0,onSelect:function(){z(arguments.length>0&&void 0!==arguments[0]?arguments[0]:T)}})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m.BlockControls,null,(0,r.createElement)(h.ToolbarGroup,null,(0,r.createElement)(h.ToolbarItem,null,(()=>(0,r.createElement)(h.Dropdown,{position:"bottom right",className:"jetpack-contact-form-settings-selector",contentClassName:"jetpack-contact-form__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(h.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("Edit Form Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==d.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,r.createElement)(h.Icon,{icon:"edit"})}))(t,n)},renderContent:()=>G()}))))),(0,r.createElement)(m.InspectorControls,null,(0,r.createElement)(h.PanelBody,{title:__("Form Settings","jetpack")},G()),!(0,f.Wp)()&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(v.Z,{jetpackCRM:L,setAttributes:n}),(0,r.createElement)(k.Z,null))),(0,r.createElement)("div",{className:F},(0,r.createElement)(m.InnerBlocks,{allowedBlocks:y,templateInsertUpdatesSelection:!1})))}))},75494:function(e,t,n){"use strict";n.d(t,{u2:function(){return y},Xd:function(){return w},Nk:function(){return x}});var r=n(69307),a=n(65736),o=n(4981),i=n(55609),s=n(52175),l=n(31970),c=n(89534),u=n(12289),p=n(89998),d=n(54789),m=n(36755),h=n(7640),f=n(69802),g=n(56764),b=n(41632),v=n(57535),k=n(57324);const __=a.__,_x=a._x,y="contact-form",E=(0,b.Z)((0,r.createElement)(i.Path,{d:"M13 7.5h5v2h-5zm0 7h5v2h-5zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM11 6H6v5h5V6zm-1 4H7V7h3v3zm1 3H6v5h5v-5zm-1 4H7v-3h3v3z"})),w={title:__("Form","jetpack"),description:__("A simple way to get feedback from folks visiting your site.","jetpack"),icon:{src:E,foreground:(0,v.m)()},keywords:[_x("email","block search term","jetpack"),_x("feedback","block search term","jetpack"),_x("contact form","block search term","jetpack")],supports:{html:!1},attributes:c.Z,edit:l.Z,save:()=>(0,r.createElement)(s.InnerBlocks.Content,null),variations:u.Z,category:"grow",transforms:d.Z,deprecated:p.Z},_={category:"grow",parent:["jetpack/contact-form"],supports:{reusable:!1,html:!1},attributes:{label:{type:"string",default:null},required:{type:"boolean",default:!1},options:{type:"array",default:[]},defaultValue:{type:"string",default:""},placeholder:{type:"string",default:""},id:{type:"string",default:""},width:{type:"number",default:100}},transforms:{to:[{type:"block",blocks:["jetpack/field-text"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-text",e)},{type:"block",blocks:["jetpack/field-name"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-name",e)},{type:"block",blocks:["jetpack/field-email"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-email",e)},{type:"block",blocks:["jetpack/field-url"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-url",e)},{type:"block",blocks:["jetpack/field-date"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-date",e)},{type:"block",blocks:["jetpack/field-telephone"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-telephone",e)},{type:"block",blocks:["jetpack/field-textarea"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-textarea",e)},{type:"block",blocks:["jetpack/field-checkbox-multiple"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-checkbox-multiple",e)},{type:"block",blocks:["jetpack/field-radio"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-radio",e)},{type:"block",blocks:["jetpack/field-select"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-select",e)},{type:"block",blocks:["jetpack/field-consent"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-consent",e)}]},save:()=>null,example:{}},C=e=>{let{attributes:t,name:n}=e;return null===t.label?(0,o.getBlockType)(n).title:t.label},j=e=>t=>(0,r.createElement)(m.Z,{type:e,label:C(t),required:t.attributes.required,setAttributes:t.setAttributes,isSelected:t.isSelected,defaultValue:t.attributes.defaultValue,placeholder:t.attributes.placeholder,id:t.attributes.id,width:t.attributes.width}),S=e=>t=>(0,r.createElement)(g.Z,{label:C(t),required:t.attributes.required,options:t.attributes.options,setAttributes:t.setAttributes,type:e,isSelected:t.isSelected,id:t.attributes.id,width:t.attributes.width}),x=[{name:"field-text",settings:{..._,title:__("Text","jetpack"),description:__("When you need just a small amount of text, add a text input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:j("text")}},{name:"field-name",settings:{..._,title:__("Name","jetpack"),description:__("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})),edit:j("text")}},{name:"field-email",settings:{..._,title:__("Email","jetpack"),keywords:[__("e-mail","jetpack"),__("mail","jetpack"),"email"],description:__("Want to reply to folks? Add an email address input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),edit:j("email")}},{name:"field-url",settings:{..._,title:__("Website","jetpack"),keywords:["url",__("internet page","jetpack"),"link"],description:__("Add an address input for a website.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"})),edit:j("url")}},{name:"field-date",settings:{..._,title:__("Date Picker","jetpack"),keywords:[__("Calendar","jetpack"),_x("day month year","block search term","jetpack")],description:__("The best way to set a date. Add a date picker.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V9h14v10zm0-12H5V5h14v2zM7 11h5v5H7z"})),edit:j("text")}},{name:"field-telephone",settings:{..._,title:__("Phone Number","jetpack"),keywords:[__("Phone","jetpack"),__("Cellular phone","jetpack"),__("Mobile","jetpack")],description:__("Add a phone number input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),edit:j("tel")}},{name:"field-textarea",settings:{..._,title:__("Message","jetpack"),keywords:[__("Textarea","jetpack"),"textarea",__("Multiline text","jetpack")],description:__("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:e=>(0,r.createElement)(h.Z,{label:C(e),required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,placeholder:e.attributes.placeholder,id:e.attributes.id,width:e.attributes.width})}},{name:"field-checkbox",settings:{..._,title:__("Checkbox","jetpack"),keywords:[__("Confirm","jetpack"),__("Accept","jetpack")],description:__("Add a single checkbox.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM17.99 9l-1.41-1.42-6.59 6.59-2.58-2.57-1.42 1.41 4 3.99z"})),edit:e=>(0,r.createElement)(f.Z,{label:e.attributes.label,required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,id:e.attributes.id,width:e.attributes.width}),attributes:{..._.attributes,label:{type:"string",default:""}}}},{name:"field-consent",settings:{..._,title:__("Consent","jetpack"),keywords:[__("Consent","jetpack")],description:__("Ask for consent","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"m81 370h142v40h-142zm0-39h142v-40h-142zm0-79h245v-40h-245zm378 260h-40c0-40.253906-32.746094-73-73-73s-73 32.746094-73 73h-40c0-42.085938 23.128906-78.867188 57.34375-98.3125-11.40625-13.023438-18.34375-30.054688-18.34375-48.6875 0-40.804688 33.195312-74 74-74s74 33.195312 74 74c0 18.632812-6.9375 35.664062-18.34375 48.6875 34.214844 19.445312 57.34375 56.226562 57.34375 98.3125zm-113-113c18.746094 0 34-15.253906 34-34s-15.253906-34-34-34-34 15.253906-34 34 15.253906 34 34 34zm-286 73h138.316406c-3.460937 12.757812-5.316406 26.164062-5.316406 40h-133c-33.085938 0-60-26.914062-60-60v-392c0-33.085938 26.914062-60 60-60h203.757812l142.132813 142.855469v125.210937c-12.042969-7.476562-25.453125-12.765625-39.890625-15.324218v-81.632813h-71.109375c-33.085937 0-60-26.914063-60-60v-71.109375h-174.890625c-11.027344 0-20 8.972656-20 20v392c0 11.027344 8.972656 20 20 20zm234.890625-340.890625h42.972656l-62.972656-63.234375v43.234375c0 11.03125 8.96875 20 20 20zm0 0"}),24,25,"-26 0 512 512"),attributes:{..._.attributes,label:{type:"string",default:__("Consent","jetpack")},consentType:{type:"string",default:"implicit"},implicitConsentMessage:{type:"string",default:__("By submitting your information, you're giving us permission to email you. You may unsubscribe at any time.","jetpack")},explicitConsentMessage:{type:"string",default:__("Can we send you an email from time to time?","jetpack")}},edit:e=>{let{attributes:t,isSelected:n,setAttributes:a}=e;const{id:o,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c}=t;return(0,r.createElement)(k.Z,{id:o,isSelected:n,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c,setAttributes:a})}}},{name:"field-checkbox-multiple",settings:{..._,title:__("Checkbox Group","jetpack"),keywords:[__("Choose Multiple","jetpack"),__("Option","jetpack")],description:__("People love options. Add several checkbox items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"})),edit:S("checkbox"),attributes:{..._.attributes,label:{type:"string",default:"Choose several"}}}},{name:"field-radio",settings:{..._,title:__("Radio","jetpack"),keywords:[__("Choose","jetpack"),__("Select","jetpack"),__("Option","jetpack")],description:__("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,r.createElement)(i.Circle,{cx:"12",cy:"12",r:"5"}))),edit:S("radio"),attributes:{..._.attributes,label:{type:"string",default:"Choose one"}}}},{name:"field-select",settings:{..._,title:__("Select","jetpack"),keywords:[__("Choose","jetpack"),__("Dropdown","jetpack"),__("Option","jetpack")],description:__("Compact, but powerful. Add a select box with several items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:S("select"),attributes:{..._.attributes,label:{type:"string",default:"Select one"}}}}]},54789:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=(e,t,n)=>{const r=n.match(new RegExp(`\\[${e}[^\\]]* ${t}="([^"]*)"`,"im"));if(r&&r.length)return r[1];const a=n.match(new RegExp(`\\[${e}[^\\]]* ${t}='([^']*)'`,"im"));if(a&&a.length)return a[1];const o=n.match(new RegExp(`\\[${e}[^\\]]* ${t}=([^\\s]*)\\s`,"im"));return!(!o||!o.length)&&o[1]},s={root:{},innerBlocks:[]};t.Z={from:[{type:"raw",priority:1,isMatch:e=>!("P"!==e.nodeName||!(/\[contact-form(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[contact-field(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[\/contact-form]/g.test(e.textContent))),transform:e=>{const t=e.textContent.replace("<br>","");if(t.includes("[contact-form")&&(s.root={},s.innerBlocks=[],s.root=(e=>{const t={to:i("contact-form","to",e),subject:i("contact-form","subject",e),submitButtonText:i("contact-form","submit_button_text",e)};return{blockName:"jetpack/contact-form",attrs:(0,r.pickBy)(t,r.identity)}})(t)),t.includes("[contact-field")){const e=t.match(/(\[contact-field[\s\S]*?\/?])/g);e&&e.length>0&&e.forEach((e=>{s.innerBlocks.push((e=>{const t={label:i("contact-field","label",e),placeholder:i("contact-field","placeholder",e),required:i("contact-field","required",e),options:i("contact-field","options",e)},n=(e=>{const t={text:"jetpack/field-text",url:"jetpack/field-text",textarea:"jetpack/field-textarea",radio:"jetpack/field-radio",checkbox:"jetpack/field-checkbox","checkbox-multiple":"jetpack/field-checkbox-multiple",select:"jetpack/field-select",email:"jetpack/field-email",name:"jetpack/field-name",default:"jetpack/field-text"};return t[e]?t[e]:t.default})(i("contact-field","type",e));return t.options&&(t.options=t.options.split(",")),(0,a.createBlock)(n,(0,r.pickBy)(t,r.identity))})(e))}))}if(t.includes("[/contact-form]")){s.innerBlocks.push((0,a.createBlock)("jetpack/button",{element:"button",text:s.root.attrs.submitButtonText||__("Contact Us","jetpack")}));return(0,a.createBlock)(s.root.blockName,s.root.attrs,s.innerBlocks)}return!1}}]}},12289:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(4096),i=n(65736),s=n(55609),l=n(41632),c=n(57535);const __=i.__,u=(0,a.compact)([{name:"contact-form",title:__("Contact Form","jetpack"),description:__("Add a contact form to your page.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M21.99 8c0-.72-.37-1.35-.94-1.7l-8.04-4.71c-.62-.37-1.4-.37-2.02 0L2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zm-11.05 4.34l-7.2-4.5 7.25-4.25c.62-.37 1.4-.37 2.02 0l7.25 4.25-7.2 4.5c-.65.4-1.47.4-2.12 0z"}),48,48,"-4 -4 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-textarea",{}],["jetpack/button",{text:__("Contact Us","jetpack"),element:"button"}]]},!(0,o.Wp)()&&{name:"newsletter-form",title:__("Newsletter Sign-up","jetpack"),description:__("A simple way to collect information from folks visiting your site.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M37.9999 7.59998C49.3999 7.59998 68.3999 26.6 68.3999 26.6V68.4H7.59985V26.6C7.59985 26.6 26.5999 7.59998 37.9999 7.59998ZM64.5999 63.536L50.4259 52.44L64.5999 41.8L62.9659 40.394L54.3779 45.334L55.2899 28.956L21.9639 26.98L20.2159 44.232L12.6539 40.622L11.3999 41.8L25.5739 52.44L12.5019 63.27L14.0219 64.904L37.9999 49.4L62.8139 65.17L64.5999 63.536Z"}),48,48,"-6 -6 92 92"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-consent",{}],["jetpack/button",{text:__("Subscribe","jetpack"),element:"button"}]]},{name:"rsvp-form",title:__("RSVP Form","jetpack"),description:__("Add an RSVP form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M10 9V7.41c0-.89-1.08-1.34-1.71-.71L3.7 11.29c-.39.39-.39 1.02 0 1.41l4.59 4.59c.63.63 1.71.19 1.71-.7V14.9c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Attending?","jetpack"),required:!0,options:[__("Yes","jetpack"),__("No","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:__("A new RSVP from your website","jetpack")}},{name:"registration-form",title:__("Registration Form","jetpack"),description:__("Add a Registration form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.34 15.02c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95zm2.12-10.61L17 7.95l-4.95 4.95-3.54-3.54 4.95-4.95zm6.95 11l-2.12-2.12c-.18-.18-.44-.29-.7-.29h-.27l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2h-.42c-.27 0-.52.11-.71.29l-2.12 2.12c-.37.38-.58.89-.58 1.42V20c0 1.1.9 2 2 2h14c1.1 0 2-.89 2-2v-3.17c0-.53-.21-1.04-.59-1.42z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{label:__("Phone Number","jetpack")}],["jetpack/field-select",{label:__("How did you hear about us?","jetpack"),options:[__("Search Engine","jetpack"),__("Social Media","jetpack"),__("TV","jetpack"),__("Radio","jetpack"),__("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send","jetpack"),element:"button"}]],attributes:{subject:__("A new registration from your website","jetpack")}},{name:"appointment-form",title:__("Appointment Form","jetpack"),description:__("Add an Appointment booking form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V8c0-.55-.45-1-1-1s-1 .45-1 1v2H2c-.55 0-1 .45-1 1s.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1v-2h2c.55 0 1-.45 1-1s-.45-1-1-1H6zm9 4c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{required:!0}],["jetpack/field-date",{label:__("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:__("Time","jetpack"),required:!0,options:[__("Morning","jetpack"),__("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:__("Notes","jetpack")}],["jetpack/button",{text:__("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:__("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:__("Feedback Form","jetpack"),description:__("Add a Feedback form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.03 0 3.8-1.11 4.75-2.75.19-.33-.05-.75-.44-.75H7.69c-.38 0-.63.42-.44.75.95 1.64 2.72 2.75 4.75 2.75z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Please rate our website","jetpack"),required:!0,options:[__("1 - Very Bad","jetpack"),__("2 - Poor","jetpack"),__("3 - Average","jetpack"),__("4 - Good","jetpack"),__("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:__("How could we improve?","jetpack")}],["jetpack/button",{text:__("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:__("New feedback received from your website","jetpack")}}]);t.Z=u},4352:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(29756);const __=i.__;class u extends r.Component{constructor(){super(...arguments),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:a,region:i,postal:u,country:p,linkToGoogleMaps:d},isSelected:m,setAttributes:h}=this.props,f=[e,t,n,a,i,u,p].some((e=>""!==e)),g=o()({"jetpack-address-block":!0,"is-selected":m}),b=(0,r.createElement)(l.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:d,onChange:e=>h({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:g},!m&&f&&(0,c.Z)(this.props),(m||!f)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>h({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>h({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>h({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:a,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>h({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:i,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>h({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:u,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>h({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>h({country:e}),onKeyDown:this.preventEnterKey}),b))}}t.Z=u},47559:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(4352),s=n(29756),l=n(41632);const __=a.__,_x=a._x,c="address",u={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,l.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,r.createElement)(o.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:i.Z,save:s.Z}},29756:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:a,city:o,region:i,postal:s,country:l}}=e;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},t),n&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},n),a&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},a),o&&!(i||s)&&(0,r.createElement)("div",{className:"jetpack-address__city"},o),o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__city"},o),", ",(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),!o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),l&&(0,r.createElement)("div",{className:"jetpack-address__country"},l))},i=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}}=e;let l=o?`+${o},`:"";l=i?`${l}+${i}`:l;return`https://www.google.com/maps/search/${t?`${t},`:""}${n?`${n},`:""}${r?`${r},`:""}${a?`+${a},`:""}${l}${s?`+${s}`:""}`.replace(" ","+")};t.Z=e=>(e=>{let{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}=e;return[t,n,r,a,o,i,s].some((e=>""!==e))})(e.attributes)&&(0,r.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,r.createElement)("a",{href:i(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,r.createElement)(o,e)),!e.attributes.linkToGoogleMaps&&(0,r.createElement)(o,e))},18680:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(89105),i=n.n(o);const s=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],l=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]];t.Z=e=>{const{isSelected:t}=e;return(0,r.createElement)("div",{className:i()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:l}))}},63015:function(e,t,n){"use strict";var r=n(59861),a=n(55637),o=n(65736);const __=o.__;t.Z=e=>{const{setAttributes:t}=e;return(0,a.Z)("email",e,__("Email","jetpack"),r.Z,(e=>t({email:e})))}},52413:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(63015),s=n(41632),l=n(59861);const __=a.__,_x=a._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:i.Z,save:l.Z,parent:["jetpack/contact-info"]}},59861:function(e,t,n){"use strict";var r=n(69307),a=n(89453);t.Z=e=>{let{attributes:{email:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},t.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&a.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(r.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(r.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(r.Fragment,{key:t},e)})))}},20195:function(e,t,n){"use strict";n.d(t,{u2:function(){return h},Xd:function(){return g},Nk:function(){return b}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(4981),l=n(18680),c=n(41632),u=n(47559),p=n(52413),d=n(51592),m=n(57535);const __=a.__,_x=a._x,h="contact-info",f=(0,c.Z)((0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z"})),g={title:__("Contact Info","jetpack"),description:__("Lets you add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[_x("email","block search term","jetpack"),_x("phone","block search term","jetpack"),_x("address","block search term","jetpack")],icon:{src:f,foreground:(0,m.m)()},category:"grow",supports:{align:["wide","full"],html:!1,color:{link:!0,gradients:!0},spacing:{padding:!0},typography:{fontSize:!0,lineHeight:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"widget_contact_info"===t},transform:e=>{let{instance:t}=e,n=[(0,s.createBlock)("core/heading",{content:t.raw.title}),(0,s.createBlock)("jetpack/email",{email:t.raw.email}),(0,s.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,s.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(n=[...n,(0,s.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(n=[...n,(0,s.createBlock)("jetpack/map",{address:t.raw.address})]),(0,s.createBlock)("jetpack/contact-info",{},n)}}]},attributes:{},edit:l.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"jetpack/email",attributes:{email:"hello@yourjetpack.blog"}},{name:"jetpack/phone",attributes:{phone:"123-456-7890"}},{name:"jetpack/address",attributes:{address:"987 Photon Drive",city:"Speedyville",region:"CA",postal:"12345",country:"USA"}}]}},b=[{name:u.u,settings:u.X},{name:p.u,settings:p.X},{name:d.u,settings:d.X}]},51633:function(e,t,n){"use strict";var r=n(65736),a=n(18690),o=n(55637);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("phone",e,__("Phone number","jetpack"),a.Z,(e=>t({phone:e})))}},51592:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(51633),s=n(41632),l=n(18690);const __=a.__,_x=a._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:i.Z,save:l.Z}},18690:function(e,t,n){"use strict";var r=n(69307);t.Z=e=>{let{attributes:{phone:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let a=n?e.substring(n-1):e,o=n?e.substring(0,n):"",i=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(o=o.slice(0,-1),"+"===a[0]&&(i="+"+i)):a=a.substring(1),[o.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},a)]}(t))}},2534:function(e,t){"use strict";t.Z={participants:{type:"array"},showTimestamps:{type:"boolean",default:!1},skipUpload:{type:"boolean",default:!1}}},74113:function(e,t,n){"use strict";var r=n(69307);t.Z=(0,r.createContext)()},78e3:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(69307),a=n(55609),o=n(65736),i=n(90566);const __=o.__,_x=o._x;function s(e){let{className:t,participants:n,onDelete:o}=e;return(0,r.createElement)("div",{className:`${t}__participant-control`},n.map((e=>{let{label:n,slug:s}=e;return(0,r.createElement)("div",{key:`${s}-key`,className:`${t}__participant`},(0,r.createElement)("div",{className:`${t}__participant-label`},(0,i.iT)(n)),(0,r.createElement)(a.Button,{className:`${t}__remove-participant`,label:__("Remove participant","jetpack"),onClick:()=>o(s),isTertiary:!0,isSmall:!0},_x("Remove","verb: remove item from a list","jetpack")))})))}function l(e){let{participants:t,className:n,onChange:a,onDelete:o}=e;return(0,r.createElement)(s,{className:n,participants:t,onChange:a,onDelete:o})}},63414:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(9818),l=n(78e3),c=n(74113),u=n(51591),p=n(41362),d=n(90566);const __=a.__,m=[["jetpack/dialogue"]];t.Z=(0,i.withNotices)((function(e){let{className:t,attributes:n,setAttributes:a,noticeUI:h,clientId:f,noticeOperations:g}=e;const{participants:b=[],showTimestamps:v,skipUpload:k}=n,[y,E]=(0,r.useState)(""),{insertBlocks:w}=(0,s.useDispatch)("core/block-editor"),_=(0,r.useCallback)((e=>{a({participants:b.map((t=>t.slug!==e.slug?t:{...t,...e}))})}),[a,b]),C=(0,r.useCallback)((function(e){let{label:t,slug:n}=e;if(!t)return;const r=t.trim();if(null==r||!r.length)return;const o=(0,d.tQ)(b,r);if(o)return o;const i={slug:n||"speaker-"+ +new Date,label:r};return a({participants:[...b,i]}),i}),[b,a]),j=(0,r.useCallback)(a,[a]),S=(0,r.useMemo)((()=>({setAttributes:j,updateParticipants:_,addNewParticipant:C,attributes:{showTimestamps:v}})),[C,j,v,_]);function x(e){g.removeAllNotices(),g.createErrorNotice(e),E(!1)}const P="wp-block-jetpack-conversation";return null!=b&&b.length||k?(0,r.createElement)(c.Z.Provider,{value:S},(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.Panel,null,(0,r.createElement)(i.PanelBody,{title:__("Speakers","jetpack"),className:`${P}__participants`},(0,r.createElement)(l.C,{className:P,participants:b,onDelete:function(e){a({participants:b.filter((t=>{let{slug:n}=t;return n!==e}))})}})))),(0,r.createElement)(o.InnerBlocks,{template:m}))):(0,r.createElement)(i.Placeholder,{label:__("Conversation","jetpack"),instructions:(0,r.createElement)(r.Fragment,null,__("Upload a transcript file or create a conversation with blank content.","jetpack"),(0,r.createElement)("div",null,(0,r.createElement)("em",null,__("Accepted file formats:","jetpack"),(0,r.createElement)("strong",null," ",d.bZ),"."))),icon:(0,r.createElement)(o.BlockIcon,{icon:u.Xu}),notices:h},(0,r.createElement)("div",{className:`${P}__placeholder`},(0,r.createElement)(i.FormFileUpload,{multiple:!1,isLarge:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:function(e){var t,n;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!r)return x(__("Transcript file not found.","jetpack"));if(null!=r&&r.size&&r.size<=0||null==r||!r.size||r.size>d.$n)return x(__("Invalid transcript file size.","jetpack"));if(null!=r&&null!==(n=r.type)&&void 0!==n&&n.length&&"text/plain"!==r.type)return x(__("Invalid transcript file type.","jetpack"));const o=(0,d.Y7)(null==r?void 0:r.name);if(!(0,d.P8)(o))return x(__("Invalid transcript file extension.","jetpack"));E(!0),(0,d.Bt)(r,(function(e,t){let{conversation:n,dialogues:r}=e;if(t)return x(t);a({participants:n.speakers,skipUpload:!(null!=n&&n.length)});const o=r.map((e=>e.slug||e.timestamp?["jetpack/dialogue",e]:["core/paragraph",e])),i=(0,p.Z)(o);w(i,0,f),E(!1)}))},accept:d.bZ,isPrimary:!0,title:`${__("Accepted file formats:","jetpack")} ${d.bZ}`,disabled:y},__("Upload transcript","jetpack")),(0,r.createElement)(i.Button,{isTertiary:!0,disabled:y,onClick:()=>a({skipUpload:!0})},__("Skip upload","jetpack"))))}))},34376:function(e,t,n){"use strict";var r=n(65736);const __=r.__,a=[{slug:"participant-0",label:"Rosalind"},{slug:"participant-1",label:"Orlando"}],o=[{name:"core/heading",attributes:{content:__("Shakespeare text","jetpack"),level:4}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("O, my dear Orlando, how it grieves me to see thee wear thy heart in a scarf!","jetpack"),timestamp:"00:10"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("It is my arm.","jetpack"),timestamp:"00:15"}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("I thought thy heart had been wounded with the claws of a lion.","jetpack"),timestamp:"00:32"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("Wounded it is, but with the eyes of a lady.","jetpack"),timestamp:"00:37"}}];t.Z={attributes:{participants:a,showTimestamps:!0,className:"is-style-row"},innerBlocks:o}},36384:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(4981),o=n(51591),i=n(41362),s=n(2534),l=n(63414),c=n(22766),u=n(34376);const __=r.__,_x=r._x,p="conversation",d={title:__("Conversation","jetpack"),description:__("Create a transcription of a speech or conversation, with any number of participants, using dialogue blocks.","jetpack"),icon:o.Xu,category:"layout",keywords:[_x("conversation","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("dialogue","block search term","jetpack"),_x("speaker","block search term","jetpack")],supports:{align:!0},attributes:s.Z,example:u.Z,styles:[{name:"row",label:__("Row","jetpack"),isDefault:!0},{name:"column",label:__("Column","jetpack")}],edit:l.Z,save:c.Z,providesContext:{"jetpack/conversation-participants":"participants","jetpack/conversation-showTimestamps":"showTimestamps"},transforms:{from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>{const t=e.map((e=>{let{content:t}=e;return["jetpack/dialogue",{content:t}]}));return(0,a.createBlock)("jetpack/conversation",{},(0,i.Z)(t))}}]}}},22766:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175);function s(e){let{attributes:t}=e;return(0,r.createElement)("div",{className:o()("wp-block-jetpack-conversation",{"show-timestamps":null==t?void 0:t.showTimestamp})},(0,r.createElement)(i.InnerBlocks.Content,null))}},90566:function(e,t,n){"use strict";n.d(t,{ly:function(){return i},tQ:function(){return s},iT:function(){return l},Y7:function(){return c},bZ:function(){return m},$n:function(){return h},P8:function(){return k},Bt:function(){return y}});var r=n(72629),a=n(81975),o=n(65736);const __=o.__;function i(e,t){const n=e.filter((e=>{let{slug:n}=e;return n===t}));return null!=n&&n.length?n[0]:null}function s(e,t){const n=e.filter((e=>{let{label:n}=e;return(null==n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())}));return null!=n&&n.length?n[0]:null}function l(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=null===(t=(0,r.getTextContent)((0,r.create)({html:e})))||void 0===t?void 0:t.trim();return n?(0,a.escapeHTML)(o):o}function c(e){return`.${e.substr(e.lastIndexOf(".")+1)}`}const u=".srt",p=".txt",d=[u,p,".vtt",".sbv"],m=d.join(", "),h=1e5,f=/(.*[^\s])\s{1,}(\d{1,2}(?::\d{1,2}?)+)\s+\n([\s\S]*?(?=\n{2}|$))/,g=/(?:(.*[^\s]):\s+)?(?:\[(\d+(?::\d+)*?(?:\.\d*)?)])?(?:[\s])*?([^\s].+?(?:\n+|$))/,b=[{name:"otter",re:new RegExp(f,"gm"),testRE:new RegExp(f,"g")},{name:"sonix",re:new RegExp(g,"gm"),testRE:new RegExp(g,"g")}],v=/(\d+)\n([\d:,]+)\s+-{2}>\s+([\d:,]+)\n([\s\S]*?(?=\n{2}|$))/gm;function k(e){return d.indexOf(e)>=0}function y(e,t){const n=c(null==e?void 0:e.name),r=new FileReader;r.addEventListener("load",(e=>{var r;const a=e.target.result?e.target.result.replace(/\r\n|\r|\n/g,"\n"):null;if(null==a||!a.length)return t({},__("Transcript content is empty","jetpack"));let o={};if(n&&n!==p&&n===u&&(o=function(e){const t={conversation:{speakers:[]},dialogues:[]};let n;for(;null!==(n=v.exec(e));)t.dialogues.push({timestamp:n[2],content:n[4]});return t}(a)),n===p&&(o=function(e){const t={dialogues:[],conversation:{speakers:[]}},n=b.filter((t=>{let{testRE:n}=t;return n.test(e)}));if(null==n||!n.length)return t;const r=n[0];let a;for(;null!=(a=r.re.exec(e));){var o,i,s;const e=a[(null==r||null===(o=r.indexes)||void 0===o?void 0:o.speaker)||1]||"";null!=e&&e.length&&t.conversation.speakers.indexOf(e)<0&&t.conversation.speakers.push(e);const n={content:a[(null==r||null===(i=r.indexes)||void 0===i?void 0:i.content)||3],timestamp:a[(null==r||null===(s=r.indexes)||void 0===s?void 0:s.timestamp)||2],showTimestamp:!0};null!=e&&e.length&&(n.label=e,n.slug=`speaker-${t.conversation.speakers.indexOf(e)}`),t.dialogues.push(n)}return t.conversation.speakers=t.conversation.speakers.map(((e,t)=>({label:e,slug:`speaker-${t}`}))),t}(a)),null===(r=o.dialogues)||void 0===r||!r.length)return t({},__("Transcript format not supported","jetpack"));t(o)})),r.readAsText(e)}},60522:function(e,t){"use strict";t.Z={label:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__participant"},slug:{type:"string"},timestamp:{type:"string",default:"00:00"},showTimestamp:{type:"boolean",default:!1},placeholder:{type:"string"},content:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__content"}}},23180:function(e,t,n){"use strict";n.d(t,{Ev:function(){return m},v$:function(){return g}});n(29183);var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736),l=n(52175),c=n(90566);const __=s.__,u="is-participant-adding",p="is-participant-selecting",d="was-participant-selected";function m(e){let{participants:t,slug:n,onSelect:a}=e;return(0,r.createElement)(i.SelectControl,{label:__("Speaker name","jetpack"),value:n,options:t.map((e=>{let{slug:t,label:n}=e;return{label:(0,c.iT)(n),value:t}})),onChange:e=>a((0,c.ly)(t,e))})}const h=(0,i.withFocusOutside)(class extends r.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return(0,r.createElement)("div",{className:this.props.className},this.props.children)}});function f(e){return{name:"jetpack/conversation-participants",triggerPrefix:"",options:e,getOptionLabel:e=>{let{label:t}=e;return(0,r.createElement)("span",null,(0,c.iT)(t))},getOptionKeywords:e=>{let{label:t}=e;return[t]},getOptionCompletion:e=>({action:"replace",value:e}),popoverProps:{position:"bottom"}}}function g(e){let{className:t,label:n,participant:a,participants:i,transcriptRef:s,onParticipantChange:m,onUpdate:g=(()=>{}),onSelect:b,onAdd:v,onClean:k}=e;const[y,E]=(0,r.useState)("is-participant-ready");function w(){if(!n)return;const e=(0,c.tQ)(i,n);return a&&a.label!==n?e&&e.slug!==a.slug?(E(d),b(e)):(E("was-participant-edited"),g({...a,label:(0,c.iT)(n,!0)})):e?(E(d),b(e)):(v((0,c.iT)(n,!0)),E("was-participant-added"))}const _=(0,r.useMemo)((()=>y?y!==u&&y!==p?[]:[f(i)]:[]),[i,y]);return(0,r.createElement)(h,{className:o()(t,{"has-bold-style":null==n?void 0:n.length,[y]:y}),onFocusOutside:w},(0,r.createElement)(l.RichText,{tagName:"div",value:n,allowedFormats:[],withoutInteractiveFormatting:!0,onChange:function(e){if(null==e||!e.length)return E(u),k();m(e);const t=(0,c.tQ)(i,e);a?a.label===e?E(p):E("is-participant-editing"):E(t?p:u)},placeholder:__("Speaker","jetpack"),keepPlaceholderOnFocus:!0,onSplit:()=>{},onReplace:e=>{setTimeout((()=>{var e;return null==s||null===(e=s.current)||void 0===e?void 0:e.focus()}),10);const t=null==e?void 0:e[0];if(t){const{label:e}=t;return m(e),E(d),b(t)}return w()},autocompleters:_}))}},94371:function(e,t,n){"use strict";n.d(t,{dG:function(){return d},S6:function(){return f}});var r=n(69307),a=n(92819),o=n(55609),i=n(65736),s=n(38205),l=n(98017);const __=i.__,_x=i._x;const c=["hour","min","sec"];function u(e,t){var n,r,a;const o=null===(n=Object.keys(e))||void 0===n?void 0:n[0];if(!o)return t.join(":");let i=String((s=e[o],l="hour"===o?23:59,Math.max(0,Math.min(s,l))));var s,l;return 1===(null===(r=i)||void 0===r?void 0:r.length)?i=`0${i}`:0===(null===(a=i)||void 0===a?void 0:a.length)&&(i="00"),t[c.indexOf(o)]=i,3===t.length&&"00"===t[0]&&t.shift(),t.join(":")}const p=(0,a.debounce)((function(e,t){t((0,l.H)(e))}),250);function d(e){let{value:t,className:n,onChange:a,shortLabel:i=!1,isDisabled:c=!1,duration:d}=e;const[m,h]=(0,r.useState)((0,l.i)(t)),f=t.split(":");return f.length<=2&&f.unshift("00"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${n}__timestamp-controls`},(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__hour`,label:i?_x("Hour","hour (short form)","jetpack"):_x("Hour","hour (long form)","jetpack",0),value:f[0],min:0,max:23,onChange:e=>!c&&a(u({hour:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__minute`,label:i?_x("Min","Short for Minute","jetpack"):__("Minute","jetpack"),value:f[1],min:0,max:59,onChange:e=>!c&&a(u({min:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__second`,label:i?_x("Sec","Short for Second","jetpack"):__("Second","jetpack"),value:f[2],min:0,max:59,onChange:e=>!c&&a(u({sec:e},f)),disabled:c})),(0,r.createElement)(o.RangeControl,{disabled:void 0===d,value:m,className:`${n}__timestamp-range-control`,min:0,max:d,onChange:e=>{h(e),p(e,a)},withInputField:!1,renderTooltipContent:e=>(0,l.H)(e)}))}function m(e){let{className:t,onPlayback:n,value:a}=e;return(0,r.createElement)(o.Button,{className:t,isTertiary:!0,onClick:()=>n((0,l.i)(a))},a)}function h(e){let{className:t,currentTime:n,isTimestampButtonVisible:a,children:i,onChange:s,onToggle:c}=e;return(0,r.createElement)(o.Button,{className:t,isSmall:!0,isTertiary:!0,onClick:()=>{c(!a),a||s((0,l.H)(n),s)}},i)}function f(e){let{className:t,isSelected:n,show:a,value:o,mediaCurrentTime:i=0,onChange:s,onToggle:l,onPlayback:c}=e;return n?a?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}),(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Remove","jetpack"))):(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Add timestamp","jetpack")):a?(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}):null}},27257:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(4981),c=n(9818),u=n(55609),p=n(23180),d=n(94371),m=n(38882),h=n(74113),f=n(15111),g=n(37837),b=n(98017),v=n(90566);const __=i.__,k="core/paragraph";function y(e){let{className:t,attributes:n,setAttributes:a,context:i,onReplace:y,mergeBlocks:E,isSelected:w}=e;const{content:_,label:C,slug:j,placeholder:S,showTimestamp:x,timestamp:P}=n,{mediaSource:T,mediaCurrentTime:N,mediaDuration:A,mediaDomReference:I,isMultipleSelection:M}=(0,c.useSelect)((e=>{const{getDefaultMediaSource:t,getMediaSourceCurrentTime:n,getMediaSourceDuration:r,getMediaSourceDomReference:a}=e(f.tT);return{mediaSource:t(),mediaCurrentTime:n(),mediaDuration:r(),mediaDomReference:a(),isMultipleSelection:e("core/block-editor").getMultiSelectedBlocks().length>0}}),[]),{playMediaSource:B,setMediaSourceCurrentTime:R}=(0,c.useDispatch)(f.tT),L=(0,r.useRef)(),Z=i["jetpack/conversation-participants"],D=null!=Z&&Z.length?Z:[],F=(0,v.ly)(D,j),O=(0,r.useContext)(h.Z);function z(e){a({timestamp:e})}return(0,r.useEffect)((()=>{M||w||F&&F.slug===j&&F.label!==C&&a({label:F.label})}),[F,C,j,M,w,a]),(0,r.createElement)("div",{className:t},(0,r.createElement)(s.BlockControls,null,T&&(0,r.createElement)(g.m,{onTimestampClick:e=>{a({showTimestamp:!0}),z((0,b.H)(e))}})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u.Panel,null,(0,r.createElement)(u.PanelBody,{title:__("Speaker","jetpack")},(0,r.createElement)(p.Ev,{className:m.P,participants:D,slug:j||"",onSelect:a})),!(null==T||!T.title)&&(0,r.createElement)(u.PanelBody,{title:__("Podcast episode","jetpack")},(0,r.createElement)("p",null,T.title)),T&&x&&(0,r.createElement)(u.PanelBody,{title:__("Timestamp","jetpack")},(0,r.createElement)(d.dG,{className:m.P,value:P,onChange:z,mediaSource:T,duration:A})))),(0,r.createElement)("div",{className:o()(`${m.P}__meta`,{"has-not-media-source":!T})},(0,r.createElement)(p.v$,{className:`${m.P}__participant`,label:C,participant:F,participants:D,transcriptRef:L,onParticipantChange:e=>{a({label:e})},onSelect:e=>{M||a(e)},onClean:()=>{a({slug:null,label:""})},onAdd:e=>{const t=O.addNewParticipant({label:e,slug:j});a(t)},onUpdate:e=>{O.updateParticipants(e)}}),T&&(0,r.createElement)(d.S6,{className:m.P,show:x,isSelected:w,value:P,mediaCurrentTime:N,onChange:z,onToggle:e=>a({showTimestamp:e}),onPlayback:function(e){I&&(I.currentTime=e),R(e),B()}})),(0,r.createElement)(s.RichText,{ref:L,identifier:"content",tagName:"p",className:`${m.P}__content`,value:_,onChange:e=>a({content:e}),onMerge:E,onSplit:e=>{if(null==_||!_.length)return(0,l.createBlock)(k);const t=null!=e&&e.length?n:{};return(0,l.createBlock)("jetpack/dialogue",{...t,content:e})},onReplace:function(e){for(var t,n,r,a,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return O?(null===(t=e[0])||void 0===t?void 0:t.name)!==k||(null===(n=e[1])||void 0===n?void 0:n.name)!==k||null!==(r=e[0])&&void 0!==r&&r.attributes.content||null!==(a=e[1])&&void 0!==a&&a.attributes.content?void y(e,...i):((0,c.dispatch)("core/block-editor").selectBlock(e[0].clientId),y([e[0]],...i)):y(e,...i)},onRemove:y?()=>y([]):void 0,placeholder:S||__("Write dialogue…","jetpack"),keepPlaceholderOnFocus:!0}))}},98956:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(4981),o=n(60522),i=n(27257),s=n(57937),l=n(51591),c=n(90059),u=n(36384);const __=r.__,_x=r._x,p=c.p,d="dialogue",m={title:__("Dialogue","jetpack"),description:__("Create a dialogue paragraph, setting the participant with an optional timestamp.","jetpack"),parent:[`jetpack/${u.u2}`],icon:l.VV,category:"layout",edit:i.Z,save:s.Z,attributes:o.Z,usesContext:["jetpack/conversation-participants","jetpack/conversation-showTimestamps"],keywords:[_x("dialogue","block search term","jetpack"),_x("participant","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("speaker","block search term","jetpack")],transforms:{to:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t,label:n}=e;return(0,a.createBlock)("core/paragraph",{content:(null!=n&&n.length?`<strong>${n}</strong>: `:"")+t})}))}],from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t}=e;return(0,a.createBlock)("jetpack/dialogue",{participant:p[0],content:t})}))}]}}},57937:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(52175),o=n(38882),i=n(98017);function s(e){let{attributes:t}=e;const{content:n,label:s,showTimestamp:l,timestamp:c}=t;return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:`${o.P}__meta`},(0,r.createElement)(a.RichText.Content,{className:`${o.P}__participant has-bold-style`,tagName:"div",value:s}),l&&(0,r.createElement)("div",{className:`${o.P}__timestamp-label`},(0,r.createElement)("a",{className:`${o.P}__timestamp_link`,href:`#${(0,i.i)(c)}`},c))),(0,r.createElement)(a.RichText.Content,{className:`${o.P}__content`,tagName:"p",value:n}))}},38882:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});const r="wp-block-jetpack-dialogue"},48387:function(e,t,n){"use strict";var r=n(69307),a=n(78850),o=n(75139),i=n(89105),s=n.n(i),l=n(52175),c=n(17882);t.Z=e=>{let{className:t=null,currency:n=null,defaultValue:i=null,disabled:u=!1,label:p="",onChange:d=null,value:m=""}=e;const[h,f]=(0,r.useState)((0,a.ZP)(m,n,{symbol:""})),[g,b]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),y=(0,r.useRef)(null),E=(0,r.useCallback)((e=>{if(f(e),!d)return;const t=(0,c.Vm)(e,n);t&&t>=(0,c.hj)(n)?(d(t),k(!1)):e&&k(!0)}),[n,d]),w=()=>{y.current&&(y.current.focus(),b(!0))};return(0,r.useEffect)((()=>{y.current&&y.current.addEventListener("blur",(()=>b(!1)))}),[y]),(0,r.useEffect)((()=>{g||h||E((0,a.ZP)(i,n,{symbol:""}))}),[n,i,h,g,E]),(0,r.useEffect)((()=>{g||v||f((0,a.ZP)(m,n,{symbol:""}))}),[n,g,v,E,m]),(0,r.createElement)("div",{className:s()("donations__amount",t,{"has-focus":g,"has-error":v}),role:"button",tabIndex:0,onClick:w,onKeyDown:w},o.M[n].symbol,u?(0,r.createElement)("div",{className:"donations__amount-value"},(0,a.ZP)(m||i,n,{symbol:""})):(0,r.createElement)(l.RichText,{allowedFormats:[],"aria-label":p,keepPlaceholderOnFocus:!0,multiline:!1,onChange:e=>E(e),placeholder:(0,a.ZP)(i,n,{symbol:""}),ref:y,value:h,withoutInteractiveFormatting:!0}))}},46928:function(e,t,n){"use strict";var r=n(69307),a=n(75139),o=n(4096),i=n(52175),s=n(55609),l=n(65736),c=n(39630),u=n(17882);const __=l.__;t.Z=e=>{const{attributes:t,setAttributes:n}=e,{currency:l,monthlyDonation:p,annualDonation:d,showCustomAmount:m}=t,h=(e,r)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];n({[a]:{...o,show:r}})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(s.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(s.Button,{className:"jetpack-donations__currency-toggle",icon:(0,r.createElement)(r.Fragment,null,l+" - "+a.M[l].symbol,(0,r.createElement)(s.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:t,onKeyDown:e=>{n||e.keyCode!==c.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(s.MenuGroup,null,Object.keys(u.ck).map((e=>(0,r.createElement)(s.MenuItem,{isSelected:e===l,onClick:()=>{n({currency:e}),t()},key:`jetpack-donations-currency-${e}`},e+" - "+a.M[e].symbol))))}}))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{checked:p.show,onChange:e=>h("1 month",e),label:__("Show monthly donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:d.show,onChange:e=>h("1 year",e),label:__("Show annual donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:m,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,r.createElement)(s.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,o.lQ)()}`},__("View donation earnings","jetpack")))))}},92202:function(e,t,n){"use strict";var r=n(69307),a=n(78850),o=n(75139),i=n(52175),s=n(65736),l=n(17882);const __=s.__;t.Z={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:e=>{let{attributes:t}=e;const{currency:n,oneTimeDonation:s,monthlyDonation:c,annualDonation:u,showCustomAmount:p,chooseAmountText:d,customAmountText:m}=t;if(!s||!s.show||-1===s.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...c.show&&{"1 month":{title:__("Monthly","jetpack")}},...u.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(h).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(h).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${t} `,"data-interval":t},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:s.heading}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:c.heading}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:u.heading}),(0,r.createElement)(i.RichText.Content,{tagName:"p",value:d}),(0,r.createElement)("div",{className:"donations__amounts donations__one-time-item"},s.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),c.show&&(0,r.createElement)("div",{className:"donations__amounts donations__monthly-item"},c.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),u.show&&(0,r.createElement)("div",{className:"donations__amounts donations__annual-item"},u.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichText.Content,{tagName:"p",value:m}),(0,r.createElement)("div",{className:"donations__amount donations__custom-amount"},o.M[n].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":(0,a.ZP)(100*(0,l.hj)(n),n,{symbol:""})}))),(0,r.createElement)("div",{className:"donations__separator"},"——"),(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:s.extraText}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:c.extraText}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__annual-item",value:u.extraText}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:s.buttonText})),c.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:c.buttonText})),u.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:u.buttonText}))))))}}},53104:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(9818),s=n(65736),l=n(53823),c=n(82116),u=n(83040),p=n(10756);const __=s.__;t.Z=e=>{const{attributes:t,className:n,setAttributes:r}=e,{currency:s}=t,[d,m]=(0,o.useState)(""),[h,f]=(0,o.useState)(!1),[g,b]=(0,o.useState)(!1),[v,k]=(0,o.useState)([]),y=(0,i.useSelect)((e=>e("core/editor").getCurrentPost()),[]);(0,o.useEffect)((()=>{r({fallbackLinkUrl:y.link})}),[y.link,r]);const E=e=>{m(e)},w=e=>e.reduce(((e,t)=>{let{id:n,currency:r,type:a,interval:o}=t;return r===s&&"donation"===a&&(e[o]=n),e}),{}),_=e=>{if(!e&&"object"!=typeof e||e.errors)return void m(__("Could not load data from WordPress.com.","jetpack"));f(e.should_upgrade_to_access_memberships),b(e.connect_url);const t=w(e.products);(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(t)?k(t):e.should_upgrade_to_access_memberships||e.connect_url?k({"one-time":-1,"1 month":-1,"1 year":-1}):(0,u.Z)(s).then((e=>k(w(e))),E)};return(0,o.useEffect)((()=>{(0,p.Z)("donation").then(_,E)}),[s]),d?(0,o.createElement)(c.Z,{className:n,error:d}):(0,o.createElement)(l.Z,a()({},e,{products:v,shouldUpgrade:h,stripeConnectUrl:g}))}},83040:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z=async e=>{try{return await a()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e}})}catch(e){return Promise.reject(e.message)}}},10756:function(e,t,n){"use strict";var r=n(82827),a=n(86989),o=n.n(a),i=n(96483);t.Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{query:t}=(0,r.Qc)(window.location.href,!0),n=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.origin?"gutenberg-wpcom":"gutenberg",...e&&{type:e}});try{return await o()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},63445:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return c}});var r=n(65736),a=n(53104),o=n(56734),i=n(92202),s=n(51591);const __=r.__,l="donations",c={title:__("Donations","jetpack"),description:__("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:s.K9,category:"earn",keywords:[__("Donations","jetpack")],supports:{html:!1},edit:a.Z,save:o.Z,example:{},deprecated:[i.Z]}},82116:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=e=>{let{className:t,error:n}=e;return(0,r.createElement)(o.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:n,className:t})}},56734:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t}=e;const{fallbackLinkUrl:n,oneTimeDonation:o,monthlyDonation:i,annualDonation:s}=t;return o&&o.show&&o.planId&&-1!==o.planId?(0,r.createElement)("div",null,(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:o.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:o.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:i.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:i.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.buttonText})),s.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:s.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:s.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText}))):null}},75242:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(9818),i=n(65736),s=n(48387),l=n(17882);const __=i.__;t.Z=e=>{let{activeTab:t,attributes:n,setAttributes:c}=e;const{currency:u,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h,chooseAmountText:f,customAmountText:g}=n,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>n[b[t]][e],k=(e,r)=>{const a=b[t],o=n[a];c({[a]:{...o,[e]:r}})},[y,E]=(0,r.useState)(u),w=(0,l.hj)(u),_=(0,r.useMemo)((()=>[10*w,30*w,200*w]),[w]);(0,r.useEffect)((()=>{y!==u&&(E(u),c({oneTimeDonation:{...p,amounts:_},monthlyDonation:{...d,amounts:_},annualDonation:{...m,amounts:_}}))}),[u,y,_,p,d,m,c]);const C=v("amounts"),j=(0,o.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(a.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading"),onChange:e=>k("heading",e)}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>c({chooseAmountText:e})}),(0,r.createElement)("div",{className:"donations__amounts"},C.map(((e,t)=>(0,r.createElement)(s.Z,{currency:u,defaultValue:_[t],label:(0,i.sprintf)(// translators: %d: Tier level e.g: "1", "2", "3"
11
  __("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const n=[...C];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>c({customAmountText:e})}),(0,r.createElement)(s.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,l.hj)(u),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText"),onChange:e=>k("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(a.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText"),onChange:e=>{return t=e,void c({oneTimeDonation:{...p,buttonText:t},monthlyDonation:{...d,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:j})))}},53823:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(65736),l=n(46928),c=n(75242),u=n(43393);const __=s.__;t.Z=e=>{const{attributes:t,className:n,products:a,setAttributes:s,shouldUpgrade:p,stripeConnectUrl:d}=e,{oneTimeDonation:m,monthlyDonation:h,annualDonation:f}=t,[g,b]=(0,r.useState)("one-time"),v=(0,i.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),k=(0,r.useCallback)((e=>g===e),[g]),y={"one-time":{title:__("One-Time","jetpack")},...h.show&&{"1 month":{title:__("Monthly","jetpack")}},...f.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.useEffect)((()=>{m.planId===a["one-time"]&&h.planId===a["1 month"]&&f.planId===a["1 year"]||s({...a["one-time"]&&{oneTimeDonation:{...m,planId:a["one-time"]}},...a["1 month"]&&{monthlyDonation:{...h,planId:a["1 month"]}},...a["1 year"]&&{annualDonation:{...f,planId:a["1 year"]}}})}),[m,h,f,s,a]),(0,r.useEffect)((()=>{!h.show&&k("1 month")&&b("one-time"),!f.show&&k("1 year")&&b("one-time")}),[h,f,b,k]),(0,r.createElement)("div",{className:n},!p&&d&&(0,r.createElement)(u.Z,{blockName:"donations",postId:v,stripeConnectUrl:d}),(0,r.createElement)("div",{className:"donations__container"},Object.keys(y).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(y).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:o()("donations__nav-item",{"is-active":k(t)}),onClick:()=>b(t),onKeyDown:()=>b(t),key:`jetpack-donations-nav-item-${t} `},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(c.Z,{activeTab:g,attributes:t,setAttributes:s}))),(0,r.createElement)(l.Z,e))}},28559:function(e,t){"use strict";t.Z={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}}},77019:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},48631:function(e,t,n){"use strict";var r=n(61652);t.Z=[r.Z]},61652:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(92819),l=n(4981),c=n(65736);const _x=c._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];t.Z={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const a={...(0,s.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},o=(0,s.pick)(e,u);return[a,[(0,l.createBlock)("jetpack/button",{element:"a",text:o.text||_x("Register","verb: e.g. register for an event.","jetpack"),...o,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function(e){let{attributes:t}=e;const{eventId:n,useModal:a,url:s,style:l}=t;if(n)return a||"modal"===l?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:s,eventId:l,text:c,textColor:u,url:p}=e,d=(0,i.getColorClassName)("color",u),m=(0,i.getColorClassName)("background-color",t),h=o()("wp-block-button__link",{"has-text-color":u||s,[d]:d,"has-background":t||a,[m]:m,"no-border-radius":0===n}),f={backgroundColor:m?void 0:a,color:d?void 0:s,borderRadius:n?n+"px":void 0};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{className:h,href:p,id:`eventbrite-widget-${l}`,rel:"noopener noreferrer",role:"button",style:f,tagName:"a",target:"_blank",value:c}))}(t):s&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:s},s)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,s.isEmpty)(t)||(0,s.some)((0,s.pick)(e,u),Boolean))}},62337:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(4096),u=n(45166),p=n(28559),d=n(62194),m=n(14087),h=n(8964),f=n(72566),g=n(87072),b=n(77019);const __=i.__,_x=i._x;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1}),a()(this,"setUrl",(e=>{const{attributes:t,noticeOperations:n,setAttributes:r}=this.props,{style:a}=t;if(!e||u.Q7===e||"modal"===a)return;const o=(0,d.Ve)(e);if(o){const t={eventId:o,url:e};(0,g.Z)(t.url,this.setIsResolvingUrl).then((e=>{const a=(0,m.S)(p.Z,{...t,url:e});r(a),this.setState({editedUrl:e}),n.removeAllNotices()})).catch((()=>{r({eventId:void 0,url:void 0}),this.setErrorNotice()}))}else this.setErrorNotice()})),a()(this,"setIsResolvingUrl",(e=>this.setState({isResolvingUrl:e}))),a()(this,"setEditingUrl",(e=>this.setState({editingUrl:e}))),a()(this,"setErrorNotice",(()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:n}=this.state;e.removeAllNotices(),e.createErrorNotice((0,o.createElement)(o.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,o.createElement)(s.Button,{isLink:!0,onClick:()=>(0,d.N3)(n,t)},_x("Convert block to link","button label","jetpack"))))})),a()(this,"submitForm",(e=>{e&&e.preventDefault(),this.setUrl((0,d.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})})),a()(this,"cannotEmbed",(()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!u.Wh.test(e)}))}componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}renderLoading(){return(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(s.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:n,setAttributes:r}=this.props,a=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,o.createElement)("div",{className:"block-editor-block-preview__container"},(0,o.createElement)("img",{src:h,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,o.createElement)(f.Z,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:n,styleOptions:a,onSelectStyle:r,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:n}=this.state,r=(0,c.Wp)()||(0,c.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:u.qv,notices:t},(0,o.createElement)("form",{onSubmit:this.submitForm},(0,o.createElement)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:e=>this.setState({editedUrl:e.target.value})}),(0,o.createElement)(s.Button,{isSecondary:!0,type:"submit"},_x("Embed","submit button label","jetpack"))),(0,o.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.createElement)(s.ExternalLink,{href:r},__("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const n=`eventbrite-widget-${t}`,r=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${t},\n\t\t\t\t\tiframeContainerId: '${n}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${n}"></div>\n\t\t`;return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.SandBox,{html:r}),(0,o.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:n}=e,{editingUrl:r,isResolvingUrl:a}=this.state;return a?this.renderLoading():r||!t||this.cannotEmbed()?this.renderEditEmbed():(0,o.createElement)(o.Fragment,null,this.renderInspectorControls(),(0,o.createElement)(l.BlockControls,null,(0,o.createElement)(b.J,{setEditingUrl:this.setEditingUrl})),"modal"===n?(0,o.createElement)(l.InnerBlocks,{template:[[u.Ss.name,u.Ss.attributes]],templateLock:"all"}):this.renderInlinePreview())}}t.Z=(0,s.withNotices)(v)},45166:function(e,t,n){"use strict";n.d(t,{Ss:function(){return d},Wh:function(){return m},Q7:function(){return f},u2:function(){return g},qv:function(){return v},Xd:function(){return k}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(28559),l=n(48631),c=n(62337),u=n(74318),p=n(57535);const __=a.__,_x=a._x,d={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},m=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,h=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,f="https://www.eventbrite.com/e/test-event-tickets-123456789",g="eventbrite",b=__("Eventbrite Checkout","jetpack"),v=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,{id:"eventbrite-icon"},(0,r.createElement)(o.Path,{d:"M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z"}))),k={title:b,description:__("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:v,foreground:(0,p.m)()},category:"embed",keywords:[_x("events","block search term","jetpack"),_x("tickets","block search term","jetpack")],supports:{html:!1,align:!0},attributes:s.Z,edit:c.Z,save:u.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(m.test(e.textContent)||h.test(e.textContent)),transform:e=>(0,i.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},example:{attributes:{url:f,eventId:123456789,style:"modal"},innerBlocks:[d]},deprecated:l.Z}},74318:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:t}=e;const{eventId:n,style:o,url:i}=t;if(n)return"modal"===o?(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null)):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)}},62194:function(e,t,n){"use strict";n.d(t,{N3:function(){return o},Ve:function(){return i},qq:function(){return s}});var r=n(69307),a=n(4981);function o(e,t){const n=(0,r.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,r.renderToString)(n)}))}function i(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e&&"string"==typeof e?e.trim():null}},47271:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(4981),u=n(9818);const __=s.__;function p(e){let{onReplace:t}=e;const[n,a]=(0,i.useState)(!1),s=(0,u.useSelect)((e=>e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")));return{isGatheringStorm:n,unleashStorm:(e,n)=>{if((0,r.isEmpty)(e))return;const i=e.match(/^https?:\/\/(?:www\.)?twitter\.com\/([^/]+)\/status\/\d+/);if((0,r.isEmpty)(i))return;const p=i[1];n.removeAllNotices(),a(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((e=>{if(a(!1),!(0,r.isArray)(e))return void n.createErrorNotice(__("An error occurred. Please try again later.","jetpack"));if((0,r.isEmpty)(e))return void n.createErrorNotice(__("We were unable to get any content from this tweet.","jetpack"));t(e.map((e=>{switch(e.type){case"paragraph":return(0,c.createBlock)("core/paragraph",{content:e.content});case"gallery":return(0,c.createBlock)("core/gallery",{images:e.images});case"image":return(0,c.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return(0,c.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return(0,c.createBlock)("core/embed",{url:e.url})}})));(0,r.some)(s,(e=>"twitter"===e.service_name&&`@${p}`===e.display_name))||(0,u.dispatch)("core/notices").createWarningNotice(__("We were unable to verify that this Twitter thread was published on a Twitter account belonging to you. Please ensure you have permission to reproduce it before publishing.","jetpack")),(0,u.dispatch)("core/notices").createSuccessNotice(__("Twitter thread successfully imported","jetpack"),{type:"snackbar"})})).catch((e=>{a(!1),n.createErrorNotice(e.message)}))}}}},72966:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=(0,r.forwardRef)((function(e,t){let{onSubmit:n,onChange:a,value:i=""}=e;return(0,r.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:n},(0,r.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:i,onChange:a,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,r.createElement)(o.Button,{id:"wp-block-jetpack-gif_search-button",isSecondary:!0,type:"submit"},__("Search","jetpack")))}))},32882:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});const r="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},68055:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(52175);function i(){return(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{className:"components-panel__body-gif-branding"},(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,r.createElement)(a.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,r.createElement)(a.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"}))))}},61796:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(31072),u=n(80917),p=n(72966),d=n(68055),m=n(21835);const __=i.__;t.Z=function(e){let{attributes:t,setAttributes:n,className:a,isSelected:i}=e;const{align:h,caption:f,giphyUrl:g,searchText:b,paddingTop:v}=t,k=o()(a,`align${h}`),[y,E]=(0,r.useState)(!1),w=(0,r.createRef)(),{isFetching:_,giphyData:C,fetchGiphyData:j}=(0,m.Z)(),S=()=>{w.current.focus(),E(!1)};(0,r.useEffect)((()=>{C&&C[0]&&n((0,u.ix)(C[0]))}),[C,n]);const x=e=>{e.preventDefault(),t.searchText&&!_&&j((0,u.Gr)(t.searchText))},P=e=>n({searchText:e.target.value});return(0,r.createElement)("div",{className:k},(0,r.createElement)(d.Z,null),g?(0,r.createElement)("figure",null,i&&(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w}),i&&C&&C.length>1&&(0,r.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},C.map((e=>{const t={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,r.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:t=>{t.preventDefault(),(e=>{n((0,u.ix)(e))})(e)},style:t})}))),(0,r.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:v}},(0,r.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:S,onKeyDown:S,role:"button",tabIndex:"0"}),(0,r.createElement)("iframe",{src:g,title:b})),(!l.RichText.isEmpty(f)||i)&&!!g&&(0,r.createElement)(l.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:y,unstableOnFocus:()=>E(!1),onChange:e=>n({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:f})):(0,r.createElement)(s.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:c.qv,label:c.TN,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w})))}},21835:function(e,t,n){"use strict";var r=n(69307);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t,n]=(0,r.useState)(!1),[a,o]=(0,r.useState)(e),[i,s]=(0,r.useState)("");return(0,r.useEffect)((()=>{if(!i)return;(async()=>{n(!0);const e=await fetch(i).then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json(),n=void 0!==t.data.images?[t.data]:t.data;n[0].images&&o(n)}n(!1)})()}),[i]),{isFetching:t,giphyData:a,fetchGiphyData:s}}},31072:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},TN:function(){return c},qv:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(55609),i=n(61796),s=n(57535);const __=a.__,_x=a._x,l="gif",c=__("GIF","jetpack"),u=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"})),p={title:c,icon:{src:u,foreground:(0,s.m)()},category:"embed",keywords:[_x("animated","block search term","jetpack"),_x("giphy","block search term","jetpack"),_x("image","block search term","jetpack")],description:__("Search for and insert an animated image.","jetpack"),attributes:{align:{type:"string",default:"center"},caption:{type:"string"},giphyUrl:{type:"string"},searchText:{type:"string"},paddingTop:{type:"string",default:"56.2%"}},supports:{html:!1,align:!0},edit:i.Z,save:()=>null,example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}}},80917:function(e,t,n){"use strict";n.d(t,{Gr:function(){return s},ix:function(){return u}});var r=n(32882);const a=e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(r.U)}&limit=10`,o=e=>`https://api.giphy.com/v1/gifs/${encodeURIComponent(e)}?api_key=${encodeURIComponent(r.U)}`,i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n=e.split(t);return n[n.length-1]},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;e=e.trim();const n=/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/,r=e.match(n);return r&&r[3]&&(t=i(r[3],"-")),t?o(t):a(e)},l=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,c=e=>null==e?void 0:e.embed_url,u=e=>({giphyUrl:c(e),paddingTop:l(e)})},76280:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__,_x=o._x;t.Z=e=>{const{className:t,embedValue:n,onChange:o,onSubmit:i}=e;return(0,r.createElement)(a.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:i,className:t},(0,r.createElement)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:o}),(0,r.createElement)(a.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack"))))}},53997:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(52175),l=n(90162),c=n(4981),u=n(4096),p=n(76280),d=n(54286),m=n(3030);const __=a.__,_x=a._x;t.Z=(0,i.compose)(o.withNotices,(0,l.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:n},className:a,isMobile:i,isSelected:l,name:h,noticeOperations:f,noticeUI:g,setAttributes:b}=e,[v,k]=(0,r.useState)(t||""),[y,E]=(0,r.useState)(!1),[w,_]=(0,r.useState)(!1);(0,r.useEffect)((()=>{!l&&w&&_(!1)}),[l,w]);const C=()=>{_(!0)},j=e=>{e&&e.preventDefault();const t=(0,m.L7)(v.trim());if(!m.Wh.test(t.url))return f.removeAllNotices(),void f.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));b(t),E(!1),f.removeAllNotices()},S=(0,c.getBlockDefaultClassName)(h),x=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${i?"300":n}"></iframe>`,P=(0,r.createElement)(o.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),T=(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(p.Z,{className:`${S}-embed-form-sidebar`,embedValue:v,onChange:e=>k(e.target.value),onSubmit:j}));if(y||!t){const e=(0,u.Wp)()||(0,u.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,r.createElement)("div",{className:a},T,(0,r.createElement)(o.Placeholder,{className:a,label:__("Google Calendar","jetpack"),icon:d.Z,instructions:(0,r.createElement)("ol",{className:`${S}-placeholder-instructions`},(0,r.createElement)("li",null,P),(0,r.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),notices:g},(N=`${S}-embed-form-editor`,(0,r.createElement)("form",{onSubmit:j,className:N},(0,r.createElement)("textarea",{type:"text",value:v,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>k(e.target.value)}),(0,r.createElement)(o.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)("div",{className:`${S}-placeholder-links`},(0,r.createElement)(o.ExternalLink,{href:e},__("Learn more","jetpack")))))}var N;return(0,r.createElement)("div",{className:a},T,(0,r.createElement)("div",null,(0,r.createElement)(o.SandBox,{html:x,onFocus:C}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:C})))}))},54286:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z"}))},13984:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(4981),i=n(53997),s=n(3030),l=n(54286),c=n(57535);const __=a.__,_x=a._x,u="google-calendar",p={title:__("Google Calendar","jetpack"),description:__("Embed a Google Calendar","jetpack"),keywords:[_x("events","block search term","jetpack"),_x("dates","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack")],icon:{src:l.Z,foreground:(0,c.m)()},category:"embed",supports:{align:!0,alignWide:!0,html:!1},attributes:{url:{type:"string"},height:{type:"integer",default:600}},edit:i.Z,save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)},transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:e=>{let{named:{domain:t,dir:n,query:r}}=e;return`https://${t}.google.com/${n}?${r}`}}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&s.Wh.test(e.textContent),transform:e=>(0,o.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&s.E6.test(e.innerHTML),transform:e=>{const{url:t,height:n}=(0,s.jj)(e.innerHTML.trim());return(0,o.createBlock)("jetpack/google-calendar",{url:t,height:n})}}]},example:{attributes:{url:"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}},3030:function(e,t,n){"use strict";n.d(t,{Wh:function(){return a},E6:function(){return o},jj:function(){return c},L7:function(){return u}});const r="s*https?://calendar.google.com/calendar",a=new RegExp(`^${r}`,"i"),o=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${r}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${r}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),s=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=o.exec(e);if(!t)return;const n={};return t.forEach(((e,t)=>{if(0===t)return;if(a.test(e))return void(n.url=e);let r;for(;null!==(r=s.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}function u(e){return o.test(e)?c(e):i.test(e)?{url:l(e)}:{url:e}}},74956:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{attributes:t,setAttributes:n}=e;const{orientation:o}=t;return(0,r.createElement)(a.PanelBody,{title:__("Orientation","jetpack")},(0,r.createElement)(a.RadioControl,{selected:o||"horizontal",options:[{label:__("Side by side","jetpack"),value:"horizontal"},{label:__("Above and below","jetpack"),value:"vertical"}],onChange:e=>n({orientation:e})}))}},38544:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(94333),s=n(65736),l=n(5968),c=n(74956),u=n(91667),p=n(12379);n(728);const __=s.__;t.Z=e=>{let{attributes:t,className:n,clientId:s,isSelected:d,setAttributes:m}=e;const{align:h,imageBefore:f,imageAfter:g,caption:b,orientation:v}=t;let k=null,y=null;const E=(0,r.useRef)();i.useResizeObserver&&([k,y]=(0,i.useResizeObserver)(),(0,p.Z)((e=>{e>0&&"undefined"!=typeof juxtapose&&juxtapose.sliders&&juxtapose.sliders.forEach((t=>{t.wrapper.parentElement.id===s&&t.optimizeWrapper(e)}))}),200,y.width));const w=f&&f.url&&g&&g.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return(0,r.useLayoutEffect)((()=>{f.url&&g.url&&"undefined"!=typeof juxtapose&&juxtapose.makeSlider(null==E?void 0:E.current)}),[h,f,g,v]),(0,r.createElement)("figure",{className:n,id:s},k,(0,r.createElement)(a.InspectorControls,{key:"controls"},(0,r.createElement)(c.Z,{attributes:t,setAttributes:m})),(0,r.createElement)("div",{ref:E,className:w,"data-mode":v||"horizontal"},(0,r.createElement)(o.Placeholder,{label:null},(0,r.createElement)("div",{className:"image-compare__image-before"},(0,r.createElement)(u.Z,{image:{id:f.id,url:f.url,alt:f.alt},placeHolderLabel:__("Image before","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageBefore:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})),(0,r.createElement)("div",{className:"image-compare__image-after"},(0,r.createElement)(u.Z,{image:{id:g.id,url:g.url,alt:g.alt},placeHolderLabel:__("Image after","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageAfter:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})))),(!a.RichText.isEmpty(b)||d&&f.url&&g.url)&&(0,r.createElement)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption","jetpack"),value:b,onChange:e=>m({caption:e}),inlineToolbar:!0}))}},94703:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M21 4h-6v1.5h6c.3 0 .5.2.5.5v.4l-3.6 3.5L15 8.1v1.8l2.6 1.7c.1.1.3.1.4.1.2 0 .4-.1.5-.2l3-2.9V18c0 .3-.2.5-.5.5h-6V20h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM1 6v12c0 1.1.9 2 2 2h10.5V4H3c-1.1 0-2 .9-2 2zm11 12.5H3c-.3 0-.5-.2-.5-.5v-1.4L5 14.7l1.5-1.1.1-.1 3 1.9c.1.1.3.1.4.1.2 0 .4-.1.5-.2L12 14v4.5zm0-6.6l-2.1 2L7 12c-.1-.1-.3-.1-.4-.1h-.1c-.1 0-.3.1-.4.1l-1.1.9-2.5 1.8V6c0-.3.2-.5.5-.5h9v6.4z"}))},91667:function(e,t,n){"use strict";var r=n(69307),a=n(94333),o=n(52175),i=n(55609);t.Z=(0,a.compose)([i.withNotices])((e=>{const{image:t,noticeOperations:n,noticeUI:a,onChange:i,placeHolderLabel:s}=e,l=(0,r.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),c=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.MediaPlaceholder,{labels:{title:s},accept:"image/*",allowedTypes:["image"],onSelect:i,onError:e=>n.createErrorNotice(e),notices:a}));return t&&t.url?l:c}))},1624:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(65736),a=n(38544),o=n(94703),i=n(31105),s=n(90767),l=n(58632),c=n(20510),u=n(57535);const __=r.__,_x=r._x,p="image-compare",d={title:__("Image Compare","jetpack"),description:__("Compare two images with a slider. Works best with images of the same size.","jetpack"),icon:{src:o.Z,foreground:(0,u.m)()},category:(0,c.Z)("media","layout"),keywords:[_x("juxtapose","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("side by side","block search term","jetpack"),_x("slider","block search term","jetpack")],supports:{align:["wide","full"]},attributes:{imageBefore:{type:"object",default:{}},imageAfter:{type:"object",default:{}},caption:{type:"string"},orientation:{type:"string",default:"horizontal"}},example:{attributes:{imageBefore:{id:1,url:l,alt:__("Before","jetpack")},imageAfter:{id:2,url:s,alt:__("After","jetpack")},caption:__("Example image","jetpack")}},edit:a.Z,save:i.Z}},31105:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t,className:n}=e;const{imageBefore:o,imageAfter:i,caption:s,orientation:l}=t;return(0,r.createElement)("figure",{className:n},(0,r.createElement)("div",{className:"juxtapose","data-mode":l||"horizontal"},(0,r.createElement)("img",{id:o.id,src:o.url,alt:o.alt,width:o.width,height:o.height,className:"image-compare__image-before"}),(0,r.createElement)("img",{id:i.id,src:i.url,alt:i.alt,width:i.width,height:i.height,className:"image-compare__image-after"})),!a.RichText.isEmpty(s)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:s}))}},12379:function(e,t,n){"use strict";var r=n(69307);t.Z=(e,t,n)=>{(0,r.useEffect)((()=>{const r=setTimeout((()=>e(n)),t);return()=>clearTimeout(r)}),[n])}},728:function(e,t,n){"use strict";var r=n(47701);n.n(r)()((function(){const e={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2};function t(e,t){const n=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){n.loaded=!0,t._onLoaded()},this.image.src=e.src,this.image.alt=e.alt||"",this.label=e.label||!1}function n(e,t){e&&e.classList.add(t)}function r(e,t){e&&e.classList.remove(t)}function a(e){return{width:parseInt(window.getComputedStyle(e).width,10),height:parseInt(window.getComputedStyle(e).height,10)}}function o(e,t){let n;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{const r=e.getBoundingClientRect(),a={top:r.top+document.body.scrollTop+document.documentElement.scrollTop,left:r.left+document.body.scrollLeft+document.documentElement.scrollLeft},o=e.offsetWidth;n=(function(e){let t;return t=e.pageX?e.pageX:e.touches?e.touches[0].pageX:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t}(t)-a.left)/o*100}return n}function i(e,t,n){let r;if("string"==typeof t||"number"==typeof t)r=parseInt(t,10);else{const a=e.getBoundingClientRect(),o={top:a.top+n.body.scrollTop+n.documentElement.scrollTop,left:a.left+n.body.scrollLeft+n.documentElement.scrollLeft},i=e.offsetHeight;r=(function(e){let t;return t=e.pageY?e.pageY:e.touches?e.touches[0].pageY:e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}(t)-o.top)/i*100}return r}const s={animate:!0,showLabels:!0,makeResponsive:!0};function l(e,n,r){let a;for(a in this.element=e,this.options={animate:!0,showLabels:!0,makeResponsive:!0,startingPosition:"50%",mode:"horizontal",callback:null},this.options)a in r&&(this.options[a]=a in s?"string"!=typeof(o=r[a])?Boolean(o):!("false"===o||""===o):r[a]);var o;2===n.length&&(this.imgBefore=new t(n[0],this),this.imgAfter=new t(n[1],this))}l.prototype={updateSlider:function(e,t){let a;a="vertical"===this.options.mode?i(this.slider,e,this.sliderParentDocument):o(this.slider,e),a=a.toFixed(2)+"%";const s=parseFloat(a),l=100-s+"%";s>0&&s<100&&(r(this.handle,"transition"),r(this.rightImage,"transition"),r(this.leftImage,"transition"),this.options.animate&&t&&(n(this.handle,"transition"),n(this.leftImage,"transition"),n(this.rightImage,"transition")),"vertical"===this.options.mode?(this.handle.style.top=a,this.leftImage.style.height=a,this.rightImage.style.height=l):(this.handle.style.left=a,this.leftImage.style.width=a,this.rightImage.style.width=l),this.sliderPosition=a)},getPosition:function(){return this.sliderPosition},displayLabel:function(e,t){const n=document.createElement("div");n.className="jx-label",n.setAttribute("tabindex",0),function(e,t){document.body.textContent?e.textContent=t:e.innerText=t}(n,t),e.appendChild(n)},setStartingPosition:function(e){this.options.startingPosition=e},calculateDims:function(e,t){const n=(r=this.imgBefore.image,{width:r.naturalWidth,height:r.naturalHeight,aspect:function(){return this.width/this.height}}).aspect();var r;return e?t=e/n:t&&(e=t*n),{width:e,height:t,ratio:n}},responsivizeIframe:function(e){return e.height<window.innerHeight?e.ratio>=1&&(this.wrapper.style.paddingTop=parseInt((window.innerHeight-e.height)/2)+"px"):e.height>window.innerHeight&&(e=this.calculateDims(0,window.innerHeight),this.wrapper.style.paddingLeft=parseInt((window.innerWidth-e.width)/2)+"px"),e},setWrapperDimensions:function(){const e=a(this.wrapper.parentNode).width,t=a(this.wrapper.parentNode).height;let n=this.calculateDims(e,t);window.location===window.parent.location||this.options.makeResponsive||(n=this.responsivizeIframe(n)),this.wrapper.style.height=parseInt(n.height)+"px",this.wrapper.style.width=parseInt(n.width)+"px"},optimizeWrapper:function(t){let n=e.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=t&&this.imgAfter.image.naturalWidth>=t?(this.wrapper.style.width=t+"px",n=e.OPTIMIZATION_WAS_CONSTRAINED):this.imgAfter.image.naturalWidth<t?this.wrapper.style.width=this.imgAfter.image.naturalWidth+"px":this.wrapper.style.width=this.imgBefore.image.naturalWidth+"px",this.setWrapperDimensions(),n},_onLoaded:function(){if(this.imgBefore&&!0===this.imgBefore.loaded&&this.imgAfter&&!0===this.imgAfter.loaded){var e;if(this.wrapper=this.element,!this.wrapper||this.wrapper.querySelector(".jx-slider"))return;n(this.wrapper,"juxtapose"),this.wrapper.style.width=this.imgBefore.image.naturalWidth,this.setWrapperDimensions(),this.slider=document.createElement("div"),this.slider.className="jx-slider",this.wrapper.appendChild(this.slider),this.sliderParentDocument=this.wrapper.ownerDocument,"horizontal"!==this.options.mode&&n(this.slider,this.options.mode),this.handle=document.createElement("div"),this.handle.className="jx-handle",this.rightImage=document.createElement("div"),this.rightImage.className="jx-image jx-right",this.rightImage.appendChild(this.imgAfter.image),this.leftImage=document.createElement("div"),this.leftImage.className="jx-image jx-left",this.leftImage.appendChild(this.imgBefore.image),this.slider.appendChild(this.handle),this.slider.appendChild(this.leftImage),this.slider.appendChild(this.rightImage),this.leftArrow=document.createElement("div"),this.rightArrow=document.createElement("div"),this.control=document.createElement("div"),this.controller=document.createElement("div"),this.leftArrow.className="jx-arrow jx-left",this.rightArrow.className="jx-arrow jx-right",this.control.className="jx-control",this.controller.className="jx-controller",this.controller.setAttribute("tabindex",0),this.controller.setAttribute("role","slider"),this.controller.setAttribute("aria-valuenow",50),this.controller.setAttribute("aria-valuemin",0),this.controller.setAttribute("aria-valuemax",100),this.controller.setAttribute("aria-label",(null===(e=window.imageCompareHandle)||void 0===e?void 0:e.msg)||"Slide to compare images"),this.handle.appendChild(this.leftArrow),this.handle.appendChild(this.control),this.handle.appendChild(this.rightArrow),this.control.appendChild(this.controller),this._init()}},_init:function(){this.updateSlider(this.options.startingPosition,!1),!0===this.options.showLabels&&(this.imgBefore.label&&this.displayLabel(this.leftImage,this.imgBefore.label),this.imgAfter.label&&this.displayLabel(this.rightImage,this.imgAfter.label));const t=this;window.addEventListener("resize",(function(){t.setWrapperDimensions()})),this.slider.addEventListener("mousedown",(function(e){e.preventDefault(),t.updateSlider(e,!0);let n=!0;this.addEventListener("mousemove",(function(e){e.preventDefault(),n&&t.updateSlider(e,!1)})),this.addEventListener("mouseup",(function(e){e.preventDefault(),e.stopPropagation(),n=!1}))})),this.slider.addEventListener("touchstart",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!0),this.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!1)}))})),this.handle.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;let r=parseFloat(this.style.left);if(37===n){r-=1;const e=parseFloat(this.style.left)-1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}if(39===n){r+=1;const e=parseFloat(this.style.left)+1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}})),this.leftImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("90%",!0),t.controller.setAttribute("aria-valuenow",91))})),this.rightImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("10%",!0),t.controller.setAttribute("aria-valuenow",10))})),e.sliders.push(this),this.options.callback&&"function"==typeof this.options.callback&&this.options.callback(this)}},e.makeSlider=function(t,r){void 0===r&&(r=e.sliders.length);const a=t,o=a.querySelectorAll("img");if(o.length<2)return;const i={};a.getAttribute("data-animate")&&(i.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(i.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(i.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(i.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(i.mode=a.getAttribute("data-makeresponsive"));return n(t,"juxtapose-"+r),a.innerHTML?a.innerHTML="":a.innerText="",new e.JXSlider(t,[{src:o[0].src,label:o[0].getAttribute("data-label"),alt:o[0].alt},{src:o[1].src,label:o[1].getAttribute("data-label"),alt:o[1].alt}],i)},e.scanPage=function(){const t=document.querySelectorAll(".juxtapose");for(let n=0;n<t.length;n++)e.makeSlider(t[n],n)},e.JXSlider=l,window.juxtapose=e,e.scanPage()}))},18776:function(e,t){"use strict";t.Z={accessToken:{type:"string"},instagramUser:{type:"string"},columns:{type:"number",default:3,min:1,max:6},count:{type:"number",default:9,min:1,max:30},spacing:{type:"number",default:10,min:0,max:50},isStackedOnMobile:{type:"boolean",default:!0}}},14937:function(e,t,n){"use strict";n.d(t,{u:function(){return r},D:function(){return a}});const r=30,a="jetpack-new-instagram-connection"},3802:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(14937);const __=o.__,_n=o._n;function s(e){let{accountImageTotal:t,attributes:n,currentUserConnected:s,disconnectFromService:l,shouldRenderSidebarNotice:c,setAttributes:u}=e;const{accessToken:p,columns:d,count:m,instagramUser:h,isStackedOnMobile:f,spacing:g}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Account Settings","jetpack")},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("span",null,__("Account","jetpack")),(0,r.createElement)(a.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),s&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.Button,{isDestructive:!0,isLink:!0,onClick:()=>l(p)},__("Disconnect your account","jetpack")))),(0,r.createElement)(a.PanelBody,{title:__("Display Settings","jetpack")},c?(()=>{const e=t?(0,o.sprintf)(
12
  /* translators: placeholder is a number. */
13
- _n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(a.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,r.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:d,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:f,onChange:()=>u({isStackedOnMobile:!f})})))}},66137:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(52175),l=n(55609),c=n(65736),u=n(18776),p=n(14937),d=n(14087),m=n(10273),h=n(2992),f=n(44420),g=n(76853),b=n(63729),v=n(3802);const __=c.__;t.Z=(0,l.withNotices)((e=>{const{attributes:t,className:n,isSelected:a,noticeOperations:c,noticeUI:k,setAttributes:y}=e,{accessToken:E,align:w,columns:_,count:C,isStackedOnMobile:j,spacing:S}=t;(0,r.useEffect)((()=>{const e=(0,d.S)(u.Z,t);(0,i.isEqual)(e,t)||y(e)}),[t,y]);const[x,P]=(0,r.useState)(E),{isRequestingWpcomConnectUrl:T,wpcomConnectUrl:N}=(0,h.Z)(),{images:A,isLoadingGallery:I,setImages:M}=(0,f.Z)({accessToken:E,noticeOperations:c,setAttributes:y,setSelectedAccount:P}),{connectToService:B,disconnectFromService:R,isConnecting:L,isRequestingUserConnections:Z,userConnections:D}=(0,m.Z)({accessToken:E,noticeOperations:c,selectedAccount:x,setAttributes:y,setImages:M,setSelectedAccount:P}),F=(0,b.Z)(),O=C>A.length?A.length:C,z=!I&&(!E||(0,i.isEmpty)(A)),U=!z,$=E&&I&&(0,i.isEmpty)(A),V=!z&&!$,G=o()(n,{[`align${w}`]:w}),H=o()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${_}`,{"is-stacked-on-mobile":j}),q={gridGap:S,"--latest-instagram-posts-spacing":S?`${S}px`:void 0},W={padding:S},K=()=>{x&&p.D!==x?y({accessToken:x,instagramUser:(0,i.find)(D,{token:x}).username}):B()};return(0,r.createElement)("div",{className:G},z&&(0,r.createElement)(l.Placeholder,{icon:"instagram",instructions:F?Z||D.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:k},F?(()=>{const e=D.length>0,t=[...(0,i.map)(D,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:p.D}],n=L||Z||e&&!x;return(0,r.createElement)("div",null,e&&(0,r.createElement)(l.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>P(e),options:t,selected:x}),p.D===x&&(0,r.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,r.createElement)(l.Button,{disabled:n,isPrimary:!0,onClick:K},L&&__("Connecting…","jetpack"),Z&&__("Loading your connections…","jetpack"),!L&&!Z&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(l.Button,{disabled:T||!N,href:N,isSecondary:!0},__("Connect to WordPress.com","jetpack"))),$&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(l.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),V&&(0,r.createElement)("div",{className:H,style:q},(0,i.times)(a?C:O,(e=>(0,r.createElement)("span",{className:o()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:W},(e=>{if(A[e]){const n=A[e];return(0,r.createElement)(g.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:S})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),U&&(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(v.Z,{accountImageTotal:A.length,attributes:t,currentUserConnected:F,disconnectFromService:R,shouldRenderSidebarNotice:U&&!$&&A.length<C,setAttributes:y})))}))},76853:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{src:t,alt:n,spacing:a}=e;const[i,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)("auto"),u=(0,r.useRef)(),p=()=>{s(!0),c("auto")};(0,r.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=p}u.current&&c(u.current.parentNode.getBoundingClientRect().width)}),[t]);const d=-1*a,m=o()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),h=i?{margin:d}:{margin:d,height:l},f=o()({"is-loaded":i});return(0,r.createElement)("span",{style:h,className:m},(0,r.createElement)("img",{alt:n,className:f,ref:u,src:t}))}},77007:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(4981),i=n(18776),s=n(66137),l=n(57535);const __=a.__,_x=a._x,c="instagram-gallery",u={title:__("Latest Instagram Posts","jetpack"),description:__("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:"instagram",foreground:(0,l.m)()},category:"embed",keywords:[_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack")],supports:{align:!0,html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"wpcom_instagram_widget"===t},transform:e=>{let{instance:t}=e;return(0,o.createBlock)("jetpack/instagram-gallery",{columns:t.raw.columns,count:t.raw.count,accessToken:t.raw.token_id})}}]},attributes:i.Z,edit:s.Z,save:e=>{let{attributes:{instagramUser:t}}=e;return t&&(0,r.createElement)("div",null,(0,r.createElement)("a",{href:`https://www.instagram.com/${t}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${t}/`))}}},10273:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(59177),a=n(92819),o=n(86989),i=n.n(o),s=n(69307),l=n(65736),c=n(14937),u=n(63729);const __=l.__;function p(e){let{accessToken:t,noticeOperations:n,selectedAccount:o,setAttributes:l,setImages:p,setSelectedAccount:d}=e;const[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)([]),k=(0,u.Z)();(0,s.useEffect)((()=>{!t&&k&&(g(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{g(!1),v(e)})).catch((()=>{g(!1),v([])})))}),[t,k]),(0,s.useEffect)((()=>{c.D===o||(0,a.find)(b,{token:o})||d(void 0)}),[o,d,b]);return{connectToService:()=>{n.removeAllNotices(),h(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new r.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();l({accessToken:e}),d(e)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&h(!1)}))})).catch((()=>{n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),h(!1)}))},disconnectFromService:()=>{n.removeAllNotices(),l({accessToken:void 0,instagramUser:void 0}),p([])},isConnecting:m,isRequestingUserConnections:f,userConnections:b}}},2992:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(86989),a=n.n(r),o=n(9818),i=n(69307),s=n(96483),l=n(63729);function c(){const{isAutoDraft:e}=(0,o.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,o.useDispatch)("core/editor"),[n,r]=(0,i.useState)(),[c,u]=(0,i.useState)(!1),p=(0,l.Z)();return(0,i.useEffect)((()=>{p||n||c||(e?t():(u(!0),a()({path:(0,s.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{r(e),u(!1)}))))}),[p,e,c,t,n]),{isRequestingWpcomConnectUrl:c,wpcomConnectUrl:n}}},44420:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(14937);const __=s.__;function u(e){let{accessToken:t,noticeOperations:n,setAttributes:a,setSelectedAccount:s}=e;const[u,p]=(0,i.useState)([]),[d,m]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{t&&(n.removeAllNotices(),m(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:c.u})}).then((e=>{let{external_name:t,images:o}=e;if(m(!1),!o||!(0,r.isArray)(o))return n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p([]),a({accessToken:void 0,instagramUser:void 0}),void s(void 0);(0,r.isEmpty)(o)&&n.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),a({instagramUser:t}),p(o)})).catch((()=>{m(!1),p([]),a({accessToken:void 0,instagramUser:void 0}),s(void 0)})))}),[t,a,s]),{images:u,isLoadingGallery:d,setImages:p}}},66916:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(48355);const a="likes",o={render:r.Z}},48355:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(12238),l=n(9818),c=n(23539);const __=a.__,u=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{areLikesEnabled:t("jetpack_likes_enabled")}})),p=(0,l.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{editPost:t}}));t.Z=(0,i.compose)([u,p])((e=>{let{areLikesEnabled:t,editPost:n}=e;return(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},(0,r.createElement)(c.Z,null,(0,r.createElement)(o.CheckboxControl,{label:__("Show likes.","jetpack"),checked:t,onChange:e=>{n({jetpack_likes_enabled:e})}})))}))},25887:function(e,t,n){"use strict";n.d(t,{N3:function(){return r},sf:function(){return a},Cw:function(){return o}});const r="processing",a="success",o="error"},50013:function(e,t,n){"use strict";n.d(t,{Q:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(18417),s=n(25887);const __=a.__;function l(e){let{auditionNotification:t,clearAudition:n,setAttributes:a,emailPlaceholder:l,processingLabel:c,successLabel:u,errorLabel:p,interests:d,signupFieldTag:m,signupFieldValue:h,connectURL:f}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Email Placeholder","jetpack"),value:l,onChange:e=>{a({emailPlaceholder:e}),n()}})),(0,r.createElement)(o.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Processing text","jetpack"),value:c,onChange:e=>{a({processingLabel:e}),t(s.N3)}}),(0,r.createElement)(o.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{a({successLabel:e}),t(s.sf)}}),(0,r.createElement)(o.TextControl,{label:__("Error text","jetpack"),value:p,onChange:e=>{a({errorLabel:e}),t(s.Cw)}})),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(i.Z,{interests:d,onChange:(e,t)=>{const n=[...new Set([...d,e])].filter((n=>!(n===e&&!t)&&n));a({interests:n})}}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>a({signupFieldTag:e})}),(0,r.createElement)(o.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>a({signupFieldValue:e})}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,r.createElement)(o.ExternalLink,{href:f},__("Manage Connection","jetpack"))))}},58791:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=(0,r.omit)(e,i),n={text:(o=e).submitButtonText||__("Join my email list","jetpack"),textColor:o.textButtonColor,customTextColor:o.customTextButtonColor,backgroundColor:o.backgroundButtonColor,customBackgroundColor:o.customBackgroundButtonColor};var o;return[t,[(0,a.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,i),Boolean),save:()=>null}},87539:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(89105),c=n.n(l),u=n(65736),p=n(96483),d=n(55609),m=n(52175),h=n(19916),f=n(50013),g=n(63729),b=n(25887);const __=u.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"componentDidMount",(()=>{this.apiCall()})),a()(this,"onError",(e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)})),a()(this,"apiCall",(()=>{const e=(0,g.Z)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};s()(t).then((t=>{const n=t.connect_url,r="connected"===t.code?1:2;this.setState({currentUserConnected:e,connected:r,connectURL:n})}),(t=>{this.setState({currentUserConnected:e,connected:2,connectURL:null}),this.onError(t.message)}))}else s()({path:(0,p.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((t=>{const n=t;this.setState({currentUserConnected:e,connected:2,connectURL:n})}))})),a()(this,"auditionNotification",(e=>{this.setState({audition:e}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.clearAudition,3e3)})),a()(this,"clearAudition",(()=>{this.setState({audition:null})})),a()(this,"labelForAuditionType",(e=>{const{attributes:t}=this.props,{processingLabel:n,successLabel:r,errorLabel:a}=t;return e===b.N3?n:e===b.sf?r:e===b.Cw?a:null})),a()(this,"roleForAuditionType",(e=>e===b.Cw?"alert":"status")),a()(this,"render",(()=>{const{attributes:e,className:t,notices:n,noticeUI:r,setAttributes:a}=this.props,{audition:i,connected:s,connectURL:l,currentUserConnected:u}=this.state,{emailPlaceholder:p,consentText:g,interests:b,processingLabel:v,successLabel:k,errorLabel:y,preview:E,signupFieldTag:w,signupFieldValue:_}=e,C="wp-block-jetpack-mailchimp",j=(0,o.createElement)(d.Placeholder,{icon:h.qv,notices:n},(0,o.createElement)(d.Spinner,null)),S=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack")},(0,o.createElement)(d.Button,{isSecondary:!0,isLarge:!0,href:l,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,o.createElement)("div",{className:`${C}-recheck`},(0,o.createElement)(d.Button,{isLink:!0,onClick:this.apiCall},__("Re-check Connection","jetpack")))),x=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,o.createElement)(d.Button,{isSecondary:!0,isLarge:!0,href:l},__("Connect to WordPress.com","jetpack"))),P=(0,o.createElement)(m.InspectorControls,null,(0,o.createElement)(f.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:p,processingLabel:v,successLabel:k,errorLabel:y,interests:b,setAttributes:this.props.setAttributes,signupFieldTag:w,signupFieldValue:_,connectURL:l})),T=c()(t,{[`${C}_notication-audition`]:i}),N=(0,o.createElement)("div",{className:T},(0,o.createElement)(d.TextControl,{"aria-label":p,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:()=>!1,placeholder:p,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,o.createElement)(m.InnerBlocks,{template:[[h.Ss.name,h.Ss.attributes]],templateLock:"all"}),(0,o.createElement)(m.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:g,onChange:e=>a({consentText:e}),inlineToolbar:!0}),i&&(0,o.createElement)("div",{className:`${C}_notification ${C}_${i}`,role:this.roleForAuditionType(i)},this.labelForAuditionType(i))),A=N;return(0,o.createElement)(o.Fragment,null,r,E&&A,!E&&0===s&&j,!E&&2===s&&u&&S,!E&&2===s&&!u&&x,!E&&1===s&&P,!E&&1===s&&N)})),this.state={audition:null,connected:0,connectURL:null,currentUserConnected:null},this.timeout=null}}t.Z=(0,d.withNotices)(v)},19916:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Ss:function(){return d},Xd:function(){return m}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(58791),l=n(87539),c=n(57535);const __=a.__,_x=a._x,u="mailchimp",p=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(i.G,{transform:"translate(-45.478101,-100.73059)"},(0,r.createElement)(i.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},(0,r.createElement)(i.Path,{d:"m 176.433,197.529 c 0.657,-0.078 1.286,-0.082 1.865,0 0.335,-0.768 0.392,-2.091 0.091,-3.532 -0.447,-2.142 -1.053,-3.438 -2.305,-3.236 -1.252,0.202 -1.298,1.754 -0.85,3.895 0.252,1.205 0.7,2.235 1.199,2.873"}),(0,r.createElement)(i.Path,{d:"m 165.688,199.224 c 0.895,0.393 1.446,0.654 1.661,0.426 0.139,-0.142 0.097,-0.413 -0.117,-0.762 -0.442,-0.721 -1.351,-1.453 -2.316,-1.864 -1.972,-0.849 -4.325,-0.567 -6.14,0.737 -0.599,0.439 -1.167,1.047 -1.086,1.416 0.026,0.119 0.116,0.209 0.326,0.239 0.494,0.056 2.22,-0.816 4.209,-0.938 1.403,-0.086 2.566,0.353 3.462,0.746"}),(0,r.createElement)(i.Path,{d:"m 163.887,200.252 c -1.167,0.184 -1.81,0.569 -2.223,0.926 -0.352,0.308 -0.57,0.649 -0.568,0.888 0.001,0.114 0.05,0.18 0.089,0.213 0.053,0.047 0.116,0.073 0.192,0.073 0.263,0 0.854,-0.237 0.854,-0.237 1.623,-0.581 2.694,-0.51 3.755,-0.39 0.586,0.066 0.864,0.102 0.992,-0.099 0.038,-0.058 0.084,-0.183 -0.033,-0.373 -0.273,-0.443 -1.451,-1.192 -3.057,-1.001"}),(0,r.createElement)(i.Path,{d:"m 172.805,204.025 c 0.792,0.389 1.664,0.236 1.948,-0.341 0.284,-0.577 -0.128,-1.361 -0.92,-1.75 -0.792,-0.389 -1.664,-0.236 -1.948,0.341 -0.284,0.578 0.128,1.361 0.92,1.75"}),(0,r.createElement)(i.Path,{d:"m 177.896,199.576 c -0.643,-0.011 -1.177,0.695 -1.192,1.578 -0.015,0.883 0.495,1.606 1.138,1.617 0.643,0.011 1.177,-0.695 1.192,-1.578 0.015,-0.882 -0.495,-1.606 -1.138,-1.617"}),(0,r.createElement)(i.Path,{d:"m 134.683,215.485 c -0.16,-0.201 -0.423,-0.14 -0.678,-0.08 -0.178,0.042 -0.379,0.088 -0.6,0.085 -0.473,-0.009 -0.874,-0.211 -1.099,-0.557 -0.293,-0.45 -0.276,-1.121 0.047,-1.889 l 0.151,-0.344 c 0.516,-1.158 1.379,-3.095 0.41,-4.941 -0.73,-1.39 -1.92,-2.255 -3.351,-2.437 -1.374,-0.174 -2.788,0.335 -3.69,1.33 -1.423,1.57 -1.646,3.707 -1.371,4.462 0.101,0.276 0.259,0.353 0.373,0.369 0.242,0.032 0.6,-0.144 0.824,-0.747 l 0.064,-0.196 c 0.1,-0.319 0.286,-0.913 0.591,-1.389 0.368,-0.574 0.94,-0.969 1.612,-1.114 0.684,-0.147 1.384,-0.016 1.97,0.368 0.997,0.652 1.381,1.874 0.955,3.039 -0.22,0.603 -0.578,1.756 -0.499,2.703 0.16,1.917 1.339,2.687 2.398,2.769 1.03,0.039 1.75,-0.54 1.932,-0.962 0.107,-0.25 0.017,-0.402 -0.042,-0.467"}),(0,r.createElement)(i.Path,{d:"m 144.475,180.275 c 3.36,-3.882 7.495,-7.257 11.2,-9.152 0.128,-0.066 0.264,0.073 0.195,0.199 -0.294,0.533 -0.861,1.674 -1.04,2.539 -0.028,0.135 0.119,0.236 0.233,0.159 2.305,-1.571 6.314,-3.255 9.831,-3.471 0.151,-0.009 0.224,0.184 0.104,0.277 -0.535,0.41 -1.12,0.978 -1.547,1.552 -0.073,0.098 -0.004,0.238 0.118,0.239 2.469,0.018 5.95,0.882 8.219,2.155 0.153,0.086 0.044,0.383 -0.128,0.344 -3.433,-0.787 -9.052,-1.384 -14.89,0.04 -5.211,1.271 -9.189,3.234 -12.09,5.344 -0.147,0.107 -0.323,-0.087 -0.204,-0.224 z m 16.732,37.612 0.001,0.002 0.002,0.004 z m 13.854,1.635 c 0.1,-0.042 0.168,-0.155 0.157,-0.268 -0.014,-0.139 -0.138,-0.24 -0.277,-0.226 0,0 -7.169,1.061 -13.942,-1.418 0.738,-2.398 2.699,-1.532 5.664,-1.293 5.344,0.319 10.134,-0.462 13.674,-1.478 3.067,-0.88 7.096,-2.616 10.225,-5.086 1.055,2.318 1.428,4.87 1.428,4.87 0,0 0.817,-0.146 1.5,0.274 0.645,0.397 1.118,1.222 0.795,3.356 -0.658,3.986 -2.352,7.222 -5.2,10.199 -1.734,1.866 -3.838,3.488 -6.246,4.668 -1.279,0.672 -2.64,1.253 -4.079,1.722 -10.736,3.507 -21.726,-0.348 -25.268,-8.626 -0.283,-0.622 -0.522,-1.274 -0.71,-1.955 -1.509,-5.455 -0.228,-12 3.778,-16.12 v -0.002 c 0.247,-0.262 0.499,-0.571 0.499,-0.96 0,-0.325 -0.207,-0.668 -0.386,-0.912 -1.402,-2.033 -6.257,-5.497 -5.282,-12.201 0.7,-4.816 4.912,-8.208 8.839,-8.007 l 0.995,0.057 c 1.702,0.101 3.186,0.319 4.587,0.378 2.345,0.102 4.453,-0.239 6.951,-2.32 0.842,-0.702 1.518,-1.311 2.661,-1.504 0.12,-0.021 0.419,-0.128 1.016,-0.1 0.61,0.033 1.19,0.2 1.711,0.547 2.002,1.332 2.286,4.559 2.39,6.919 0.059,1.347 0.222,4.607 0.278,5.543 0.127,2.14 0.69,2.441 1.828,2.816 0.64,0.211 1.234,0.368 2.11,0.614 2.65,0.744 4.221,1.499 5.212,2.469 0.591,0.606 0.866,1.25 0.951,1.864 0.312,2.28 -1.77,5.096 -7.283,7.655 -6.026,2.797 -13.337,3.505 -18.388,2.942 l -1.77,-0.2 c -4.04,-0.544 -6.345,4.677 -3.92,8.255 1.563,2.306 5.82,3.806 10.079,3.807 9.765,0.001 17.271,-4.169 20.063,-7.77 l 0.223,-0.318 c 0.138,-0.207 0.024,-0.321 -0.147,-0.204 -2.281,1.561 -12.413,7.758 -23.251,5.893 0,0 -1.317,-0.217 -2.519,-0.684 -0.955,-0.372 -2.955,-1.292 -3.198,-3.343 8.746,2.705 14.253,0.148 14.253,0.148 z m -48.039,-20.785 c -3.042,0.591 -5.723,2.315 -7.362,4.697 -0.98,-0.817 -2.805,-2.399 -3.128,-3.016 -2.617,-4.97 2.856,-14.632 6.68,-20.089 9.45,-13.485 24.25,-23.692 31.101,-21.84 1.114,0.315 4.803,4.592 4.803,4.592 0,0 -6.849,3.8 -13.2,9.097 -8.558,6.589 -15.022,16.166 -18.895,26.559 z m 5.111,22.805 c -0.46,0.079 -0.93,0.11 -1.404,0.098 -4.577,-0.123 -9.52,-4.243 -10.011,-9.129 -0.543,-5.401 2.217,-9.557 7.103,-10.543 0.584,-0.118 1.29,-0.186 2.051,-0.146 2.738,0.15 6.772,2.252 7.693,8.216 0.816,5.282 -0.48,10.659 -5.432,11.503 z m 61.996,-9.564 c -0.039,-0.139 -0.295,-1.072 -0.646,-2.197 -0.351,-1.126 -0.714,-1.917 -0.714,-1.917 1.408,-2.107 1.433,-3.992 1.245,-5.059 -0.2,-1.323 -0.751,-2.45 -1.861,-3.616 -1.11,-1.165 -3.381,-2.359 -6.572,-3.255 l -1.674,-0.465 c -0.008,-0.069 -0.088,-3.947 -0.16,-5.612 -0.053,-1.204 -0.156,-3.083 -0.739,-4.933 -0.695,-2.505 -1.905,-4.697 -3.416,-6.099 4.17,-4.322 6.773,-9.084 6.766,-13.168 -0.012,-7.855 -9.659,-10.232 -21.548,-5.309 l -2.519,1.069 c -0.011,-0.011 -4.554,-4.468 -4.622,-4.528 -13.555,-11.823 -55.935,35.284 -42.386,46.725 l 2.961,2.509 c -0.768,1.99 -1.07,4.27 -0.823,6.721 0.316,3.149 1.94,6.167 4.573,8.499 2.499,2.214 5.785,3.616 8.973,3.613 5.273,12.151 17.321,19.605 31.447,20.025 15.153,0.45 27.873,-6.66 33.203,-19.432 0.349,-0.896 1.828,-4.935 1.828,-8.501 0,-3.583 -2.026,-5.068 -3.316,-5.068"})))),d={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},m={title:__("Mailchimp","jetpack"),icon:{src:p,foreground:(0,c.m)()},description:__("A form enabling readers to join a Mailchimp audience.","jetpack"),category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack")],attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},edit:l.Z,save:()=>(0,r.createElement)(o.InnerBlocks.Content,null),example:{attributes:{preview:!0},innerBlocks:[d]},deprecated:[s.Z]}},18417:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(55609);class c extends o.Component{constructor(){super(...arguments),a()(this,"state",{interest_categories:[]}),a()(this,"retrieveGroups",(()=>{s()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})}))})),a()(this,"render",(()=>{const{interest_categories:e}=this.state,{interests:t,onChange:n}=this.props;return(0,o.createElement)(o.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,o.createElement)(l.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>n(e.id,t),key:e.id}))))))}))}componentDidMount(){this.retrieveGroups()}}t.Z=c,c.defaultProps={interests:[],onChange:()=>null}},97024:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(1595);const __=a.__;class s extends r.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:a}=this.props;return(0,r.createElement)(o.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,r.createElement)(o.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,r.createElement)(o.Button,{className:"component__add-point__close",onClick:e},(0,r.createElement)(o.Dashicon,{icon:"no"})),(0,r.createElement)(i.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:a,onError:n})))}}s.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{}},t.Z=s},79267:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(55609),c=n(81041),u=n(77714),p=n(73242),d=n(87929),m=n(45388);const __=i.__;class h extends o.Component{constructor(){super(...arguments),a()(this,"onMarkerClick",(e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()})),a()(this,"onMapClick",(()=>{this.setState({activeMarker:null})})),a()(this,"clearCurrentMarker",(()=>{this.setState({activeMarker:null})})),a()(this,"updateActiveMarker",(e=>{const{points:t}=this.props,{activeMarker:n}=this.state,{index:r}=n.props,a=t.slice(0);(0,s.assign)(a[r],e),this.props.onSetPoints(a)})),a()(this,"deleteActiveMarker",(()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:n}=t.props,r=e.slice(0);r.splice(n,1),this.props.onSetPoints(r),this.setState({activeMarker:null})})),a()(this,"sizeMap",(()=>{const{mapHeight:e}=this.props,{map:t}=this.state,n=this.mapRef.current;if(e)n.style.height=e+"px";else{const e=n.offsetWidth,t=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,r=Math.min(e*(3/4),t);n.style.height=r+"px"}t.resize(),this.setBoundsByMarkers()})),a()(this,"updateZoom",(()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e),t.updateZoom(e)})),a()(this,"setBoundsByMarkers",(()=>{const{admin:e,onSetMapCenter:t,onSetZoom:n,points:r,zoom:a}=this.props,{map:o,activeMarker:i,mapboxgl:s,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!o)return;if(r.length&&e?o.dragPan.disable():o.dragPan.enable(),!r.length)return;if(i)return;const u=new s.LngLatBounds;if(r.forEach((e=>{u.extend([e.coordinates.longitude,e.coordinates.latitude])})),t(u.getCenter()),r.length>1){o.fitBounds(u,{padding:{top:80,bottom:80,left:40,right:40}}),this.setState({boundsSetProgrammatically:!0});try{o.removeControl(l)}catch(e){}}else{if(o.setCenter(u.getCenter()),c){const e=12;o.setZoom(e),n(e)}else o.setZoom(parseInt(a,10));o.addControl(l),this.setState({boundsSetProgrammatically:!1})}})),a()(this,"scriptsLoaded",(()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)})),a()(this,"googlePoint2Mapbox",(e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0})),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,o.createRef)(),this.debouncedSizeMap=(0,s.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:n,markerColor:r}=this.props,{map:a,activeMarker:i,mapboxgl:p}=this.state,{onMarkerClick:d,deleteActiveMarker:m,updateActiveMarker:h}=this,f=(0,s.get)(i,"props.point")||{},{title:g,caption:b}=f,v=o.Children.map(n,(e=>{if("AddPoint"===(0,s.get)(e,"props.tagName"))return e})),k=a&&p&&e.map(((e,t)=>(0,o.createElement)(c.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:a,mapboxgl:p,markerColor:r,onClick:d}))),y=p&&(0,o.createElement)(u.Z,{activeMarker:i,map:a,mapboxgl:p,unsetActiveMarker:()=>this.setState({activeMarker:null})},i&&t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.TextControl,{label:__("Marker Title","jetpack"),value:g,onChange:e=>h({title:e})}),(0,o.createElement)(l.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:e=>h({caption:e})}),(0,o.createElement)(l.Button,{onClick:m,className:"wp-block-jetpack-map__delete-btn"},(0,o.createElement)(l.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),i&&!t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h3",null,g),(0,o.createElement)("p",null,b)));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},k),y,v)}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:n,children:r,points:a,mapStyle:o,mapDetails:i,scrollToZoom:s,showFullscreenButton:l}=this.props,{map:c,fullscreenControl:u}=this.state;n&&n.length>0&&n!==e.apiKey&&this.loadMapLibraries(),r!==e.children&&!1!==r&&this.clearCurrentMarker(),a!==e.points&&this.setBoundsByMarkers(),a.length!==e.points.length&&this.clearCurrentMarker(),o===e.mapStyle&&i===e.mapDetails||c.setStyle(this.getMapStyle()),s!==e.scrollToZoom&&(s?c.scrollZoom.enable():c.scrollZoom.disable()),l!==e.showFullscreenButton&&(l?(c.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):c.removeControl(u))}getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,p.h)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,d.bL)(this.mapRef.current),n={"mapbox-gl-js":()=>{(0,d.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,d.Pp)(m,n,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:n,onMapLoaded:r,onError:a,scrollToZoom:o,showFullscreenButton:i,admin:s}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:this.googlePoint2Mapbox(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void a("mapbox_error",e.message)}o||l.scrollZoom.disable();const c=new t.FullscreenControl;l.on("error",(e=>{a("mapbox_error",e.error.message)}));const u=new t.NavigationControl({showCompass:!1,showZoom:!0});l.on("zoomend",(()=>{this.props.onSetZoom(l.getZoom())})),l.on("moveend",(()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(l.getCenter())})),l.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:l,zoomControl:u,fullscreenControl:c},(()=>{this.debouncedSizeMap(),l.addControl(u),i&&(l.addControl(c),s&&c._fullscreenButton&&(c._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),l.resize(),r(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)}))}}h.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{}},t.Z=h},20522:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(41626),l=n(17885);const __=a.__;t.Z=e=>{let{attributes:t,setAttributes:n,state:a,setState:c,context:u,mapRef:p,instanceId:d,minHeight:m,removeAPIKey:h,updateAPIKey:f,setPointVisibility:g}=e;const b=e=>{n({align:e}),setTimeout(p.current.sizeMap,0)};return"toolbar"===u?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockAlignmentToolbar,{value:t.align,onChange:b,controls:["center","wide","full"]}),(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{icon:l.X.markerIcon,label:__("Add a marker","jetpack"),onClick:g}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>n({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,r.createElement)(o.PanelBody,{title:__("Map Settings","jetpack")},(0,r.createElement)(o.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${d}`},(0,r.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${d}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{n({mapHeight:e.target.value}),e.target!==document.activeElement&&setTimeout(p.current.sizeMap,0)},onBlur:e=>{const{mapHeight:r}=t;let a=parseInt(e.target.value,10);isNaN(a)?a=null:null==r?a=p.current.mapRef.current.offsetHeight:a<m&&(a=m),n({mapHeight:a}),setTimeout(p.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,r.createElement)(o.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:t.zoom,onChange:e=>{n({zoom:e}),setTimeout(p.current.updateZoom,0)},min:0,max:22}),(0,r.createElement)(o.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>n({mapDetails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>n({scrollToZoom:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:t.showFullscreenButton,onChange:e=>n({showFullscreenButton:e})})),t.points.length?(0,r.createElement)(o.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,r.createElement)(s.Z,{points:t.points,onChange:e=>{n({points:e})}})):null,(0,r.createElement)(o.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,r.createElement)(o.TextControl,{help:"wpcom"===a.apiKeySource&&(0,r.createElement)(r.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,r.createElement)(o.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:a.apiKeyControl,onChange:e=>c({apiKeyControl:e})}),(0,r.createElement)(o.ButtonGroup,null,(0,r.createElement)(o.Button,{type:"button",onClick:f,disabled:!a.apiKeyControl||a.apiKeyControl===a.apiKey},__("Update Token","jetpack")),(0,r.createElement)(o.Button,{type:"button",onClick:h,disabled:"wpcom"===a.apiKeySource,isSecondary:!0},__("Remove Token","jetpack")))))}},86124:function(e,t,n){"use strict";var r=n(98372);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,showFullscreenButton:!0,className:t}},save:r.Z}},98372:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u}=e,p=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),d=t?`align${t}`:null;return(0,r.createElement)("div",{className:d,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null},o.length>0&&(0,r.createElement)("ul",null,p))}}t.Z=a},91576:function(e,t,n){"use strict";var r=n(51694);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,className:t}},save:r.Z}},51694:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:p}=e,d=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),m=t?`align${t}`:null;return(0,r.createElement)("div",{className:m,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,"data-show-fullscreen-button":p||null},o.length>0&&(0,r.createElement)("ul",null,d))}}t.Z=a},70312:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(65736),c=n(55609),u=n(52175),p=n(97024),d=n(79267),m=n(20522),h=n(17885),f=n(96406),g=n(94333),b=n(9818),v=n(98085),k=n(14499);const __=l.__,y={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class E extends o.Component{constructor(){super(...arguments),a()(this,"geoCodeAddress",((e,t)=>{t&&(0,k.P)(e,t).then((e=>{var t;if(null!==(t=e.features)&&void 0!==t&&t.length){const t=e.features[0],n=[{title:t.text,placeTitle:t.text,caption:t.place_name,id:t.id,coordinates:{latitude:t.center[1],longitude:t.center[0]}}];this.props.setAttributes({points:n})}else this.onError(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))})).catch((e=>this.onError(null,e.message)))})),a()(this,"componentDidUpdate",(e=>{var t,n;const r=null===(t=this.props.attributes)||void 0===t?void 0:t.address,a=null===(n=e.attributes)||void 0===n?void 0:n.address;r&&a!==r&&this.geoCodeAddress(r,this.state.apiKey)})),a()(this,"addPoint",(e=>{const{attributes:t,setAttributes:n}=this.props,{points:r}=t,a=r.slice(0);let o=!1;r.map((t=>{t.id===e.id&&(o=!0)})),o||(a.push(e),n({points:a}),this.setState({addPointVisibility:!1}))})),a()(this,"setPointVisibility",(()=>{this.setState({addPointVisibility:!0})})),a()(this,"updateAPIKeyControl",(e=>{this.setState({apiKeyControl:e.target.value})})),a()(this,"updateAPIKey",(()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")})),a()(this,"removeAPIKey",(()=>{this.apiCall(null,"DELETE")})),a()(this,"onError",((e,t)=>{const{noticeOperations:n}=this.props;n.removeAllNotices(),n.createErrorNotice(t)})),a()(this,"onMapResize",((e,t,n,r)=>{const{onResizeStop:a,setAttributes:o}=this.props;a();o({mapHeight:parseInt(this.mapRef.current.mapRef.current.offsetHeight+r.height,10)}),setTimeout(this.mapRef.current.sizeMap,0)})),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,o.createRef)()}apiCall(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return new Promise(((n,r)=>{const{noticeOperations:a}=this.props,o="/wpcom/v2/service-api-keys/mapbox",i=e?{path:o,method:t,data:{service_api_key:e}}:{path:o,method:t};this.setState({apiRequestOutstanding:!0},(()=>{s()(i).then((e=>{let{service_api_key:t,service_api_key_source:r}=e;a.removeAllNotices();const o=t?2:1,i="wpcom"===r?"":t;this.setState({apiState:o,apiKey:t,apiKeyControl:i,apiKeySource:r,apiRequestOutstanding:!1}),n()}),(e=>{let{message:t}=e;this.onError(null,t),this.setState({apiState:1,apiRequestOutstanding:!1}),r()}))}))}))}componentDidMount(){this.apiCall().then((()=>{var e,t;null!==(e=this.props.attributes)&&void 0!==e&&e.address&&this.geoCodeAddress(null===(t=this.props.attributes)||void 0===t?void 0:t.address,this.state.apiKey)}))}render(){const{className:e,setAttributes:t,attributes:n,noticeUI:r,notices:a,isSelected:i,instanceId:s,onResizeStart:l}=this.props,{mapDetails:g,points:b,zoom:k,mapCenter:E,markerColor:w,preview:_,mapHeight:C,showFullscreenButton:j}=n,{addPointVisibility:S,apiKey:x,apiKeyControl:P,apiState:T,apiRequestOutstanding:N}=this.state,A=(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.BlockControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef})),(0,o.createElement)(u.InspectorControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:s,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey}))),I=(0,o.createElement)(c.Placeholder,{icon:h.X.icon},(0,o.createElement)(c.Spinner,null)),M=(0,o.createElement)(o.Fragment,null,__("To use the map block, you need an Access Token.","jetpack"),(0,o.createElement)("br",null),(0,o.createElement)(c.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,o.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),B=(0,o.createElement)(c.Placeholder,{icon:h.X.icon,label:__("Map","jetpack"),notices:a,instructions:M},(0,o.createElement)(o.Fragment,null,(0,o.createElement)("form",null,(0,o.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:N,placeholder:__("Paste Token Here","jetpack"),value:P,onChange:this.updateAPIKeyControl}),(0,o.createElement)(c.Button,{isSecondary:!0,disabled:N||!P||P.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),R=i&&b.length<=1,L=(0,v.t)(h.X.styles,n.className),Z=(0,o.createElement)(o.Fragment,null,A,(0,o.createElement)("div",{className:e},(0,o.createElement)(c.ResizableBox,{size:{height:C||"auto",width:"100%"},grid:[10,10],showHandle:i,minHeight:400,enable:y,onResizeStart:l,onResizeStop:this.onMapResize},(0,o.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,o.createElement)(d.Z,{ref:this.mapRef,scrollToZoom:R,showFullscreenButton:j,mapStyle:L||"default",mapDetails:g,mapHeight:C,points:b,zoom:k,mapCenter:E,markerColor:w,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:x,onSetPoints:e=>t({points:e}),onSetMapCenter:e=>t({mapCenter:e}),onMapLoaded:()=>this.setState({addPointVisibility:!b.length}),onMarkerClick:()=>this.setState({addPointVisibility:!1}),onError:this.onError},i&&S&&(0,o.createElement)(p.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:x,onError:this.onError,tagName:"AddPoint"})))))),D=h.X.styles.find((e=>e.name===L)),F=(0,o.createElement)("div",null,(0,o.createElement)("img",{alt:__("Map Preview","jetpack"),src:D?D.preview:f}));return(0,o.createElement)(o.Fragment,null,r,_&&F,!_&&0===T&&I,!_&&1===T&&B,!_&&2===T&&Z)}}t.Z=(0,g.compose)([c.withNotices,(0,b.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(E)},14499:function(e,t,n){"use strict";function r(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then((e=>e.json()))}n.d(t,{P:function(){return r}})},92828:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(17885),a=n(70312),o=n(18156),i=n(86124),s=n(91576),l=n(57535);const{name:c}=r.X,u={title:r.X.title,icon:{src:r.X.icon,foreground:(0,l.m)()},category:r.X.category,keywords:r.X.keywords,description:r.X.description,attributes:r.X.attributes,supports:r.X.supports,styles:r.X.styles,getEditWrapperProps(e){const{align:t}=e;if(-1!==r.X.validAlignments.indexOf(t))return{"data-align":t}},edit:a.Z,save:o.Z,example:r.X.example,deprecated:[s.Z,i.Z]}},77714:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307);class i extends o.Component{constructor(){super(...arguments),a()(this,"closeClick",(()=>{this.props.unsetActiveMarker()}))}componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}}),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,o.createPortal)(this.props.children,this.el):null}openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}i.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null},t.Z=i},1595:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(95319);const c=(0,i.__)("Add a marker…","jetpack");class u extends o.Component{constructor(){super(...arguments),a()(this,"getOptionCompletion",(e=>{const{value:t}=e,n={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(n),t.text})),a()(this,"search",(e=>{const{apiKey:t,onError:n}=this.props,r="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise((function(e,t){const a=new XMLHttpRequest;a.open("GET",r),a.onload=function(){if(200===a.status){const t=JSON.parse(a.responseText);e(t.features)}else{const e=JSON.parse(a.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},a.send()}))})),a()(this,"onReset",(()=>{this.textRef.current.value=null})),this.textRef=(0,o.createRef)(),this.containerRef=(0,o.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,o.createElement)("span",null,e.place_name),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout((()=>{this.containerRef.current.querySelector("input").focus()}),50)}render(){const{label:e}=this.props;return(0,o.createElement)("div",{ref:this.containerRef},(0,o.createElement)(s.BaseControl,{label:e,className:"components-location-search"},(0,o.createElement)(l.Z,{completer:this.autocompleter,onReset:this.onReset},(e=>{let{isExpanded:t,listBoxId:n,activeId:r,onChange:a,onKeyDown:i}=e;return(0,o.createElement)(s.TextControl,{placeholder:c,ref:this.textRef,onChange:a,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":r,onKeyDown:i})}))))}}u.defaultProps={onError:()=>{}},t.Z=u},41626:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(55609);class s extends o.Component{constructor(){super(...arguments),a()(this,"onDeletePoint",(e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,a=n.slice(0);a.splice(t,1),r(a)})),this.state={selectedCell:null}}setMarkerField(e,t,n){const{points:r,onChange:a}=this.props,o=r.slice(0);o[n][e]=t,a(o)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,o.createElement)(i.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,o.createElement)(i.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,o.createElement)(i.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,o.createElement)(i.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,o.createElement)(i.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,o.createElement)("div",{className:"component__locations"},(0,o.createElement)(i.Panel,{className:"component__locations__panel"},t))}}s.defaultProps={points:Object.freeze([]),onChange:()=>{}},t.Z=s},95319:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819),p=n(39630),d=n(94333);const __=l.__,_n=l._n;function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=[];for(let r=0;r<e.length;r++){const a=e[r];let{keywords:o=[]}=a;if("string"==typeof a.label&&(o=[...o,a.label]),n.push(a),n.length===t)break}return n}class h extends o.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),a()(this,"select",(e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()})),a()(this,"reset",(()=>{this.setState(this.constructor.getInitialState())})),a()(this,"onChange",(e=>{const{completer:t}=this.props,{options:n}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const r=t?m(n):[];t&&this.setState({selectedIndex:0,filteredOptions:r,query:e})})),a()(this,"onKeyDown",(e=>{const{isOpen:t,selectedIndex:n,filteredOptions:r}=this.state;if(!t)return;let a;switch(e.keyCode){case p.UP:a=(0===n?r.length:n)-1,this.setState({selectedIndex:a});break;case p.DOWN:a=(n+1)%r.length,this.setState({selectedIndex:a});break;case p.ENTER:this.select(r[n]);break;case p.LEFT:case p.RIGHT:case p.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()})),this.debouncedLoadOptions=(0,u.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:n}=e,r=this.activePromise=Promise.resolve("function"==typeof n?n(t):n).then((t=>{if(r!==this.activePromise)return;const n=t.map(((t,n)=>({key:`${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}))),a=m(n),o=a.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:a,selectedIndex:o,isOpen:a.length>0}),this.announce(a)}))}announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,l.sprintf)(
14
  /* translators: placeholder is a number. */
15
- _n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:n,instanceId:r,completer:a}=this.props,{selectedIndex:i,filteredOptions:l}=this.state,{key:p=""}=l[i]||{},{className:d}=a,m=l.length>0,h=m?`components-autocomplete-listbox-${r}`:null,f=m?`components-autocomplete-item-${r}-${p}`:null;return(0,o.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:f,onChange:e,onKeyDown:t}),m&&(0,o.createElement)(c.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,o.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,u.map)(l,((e,t)=>(0,o.createElement)(c.Button,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:s()("components-autocomplete__result",d,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,d.compose)([c.withSpokenMessages,d.withInstanceId,c.withFocusOutside])(h)},81041:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(87929);class s extends o.Component{constructor(){super(...arguments),a()(this,"handleClick",(()=>{const{onClick:e}=this.props;e(this)})),a()(this,"getPoint",(()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]}))}componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&this.marker.remove()}componentDidUpdate(){this.renderMarker()}renderMarker(){const{map:e,point:t,mapboxgl:n,markerColor:r,mapRef:a}=this.props,{handleClick:o}=this,s=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:l}=(0,i.bL)(a.current),c=this.marker?this.marker.getElement():l.createElement("div");this.marker?this.marker.setLngLat(s):(c.className="wp-block-jetpack-map-marker",this.marker=new n.Marker(c).setLngLat(s).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",o)),c.innerHTML='<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd"><path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="'+r+'" mask="url(#c)"/></g></svg>'}render(){return null}}s.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}},t.Z=s},73242:function(e,t,n){"use strict";function r(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}n.d(t,{h:function(){return r}})},18156:function(e,t,n){"use strict";var r=n(69307),a=n(17885),o=n(98085);class i extends r.Component{render(){const{attributes:e}=this.props,{align:t,className:n,mapDetails:i,points:s,zoom:l,mapCenter:c,markerColor:u,scrollToZoom:p,mapHeight:d,showFullscreenButton:m}=e,h=(0,o.t)(a.X.styles,n),f=s.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),g=t?`align${t}`:null;return(0,r.createElement)("div",{className:g,"data-map-style":h,"data-map-details":i,"data-points":JSON.stringify(s),"data-zoom":l,"data-map-center":JSON.stringify(c),"data-marker-color":u,"data-scroll-to-zoom":p||null,"data-map-height":d||null,"data-show-fullscreen-button":m||null},s.length>0&&(0,r.createElement)("ul",null,f))}}t.Z=i},17885:function(e,t,n){"use strict";n.d(t,{X:function(){return c}});var r=n(69307),a=n(65736),o=n(56932),i=n(45107),s=n(65765),l=n(34140);const __=a.__,_x=a._x,c={name:"map",prefix:"jetpack",title:__("Map","jetpack"),icon:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)("path",{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"})),category:"embed",keywords:[_x("maps","block search term","jetpack"),_x("location","block search term","jetpack"),_x("navigation","block search term","jetpack")],description:__("Add an interactive map showing one or more locations.","jetpack"),attributes:{align:{type:"string"},points:{type:"array",default:[]},address:{type:"string",default:""},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},supports:{defaultStylePicker:!1,html:!1},styles:[{name:"default",label:__("Basic","jetpack"),preview:o,isDefault:!0},{name:"black_and_white",label:__("Black and white","jetpack"),preview:i},{name:"satellite",label:__("Satellite","jetpack"),preview:s},{name:"terrain",label:__("Terrain","jetpack"),preview:l}],validAlignments:["center","wide","full"],markerIcon:(0,r.createElement)("svg",{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,r.createElement)("g",{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,r.createElement)("polygon",{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,r.createElement)("path",{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})))),example:{attributes:{preview:!0}}}},81092:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(52175),u=n(94333),p=n(9818),d=n(4822);const __=l.__,m="editor",h="preview";class f extends o.Component{constructor(){super(...arguments),a()(this,"input",null),a()(this,"state",{activePanel:m}),a()(this,"bindInput",(e=>{this.input=e})),a()(this,"updateSource",(e=>this.props.setAttributes({source:e}))),a()(this,"handleKeyDown",(e=>{const{attributes:t,removeBlock:n}=this.props,{source:r}=t;8===e.keyCode&&""===r&&(n(),e.preventDefault())})),a()(this,"toggleMode",(e=>()=>this.setState({activePanel:e})))}componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===h&&this.toggleMode(m)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===m&&this.input&&this.input.focus()}isEmpty(){const e=this.props.attributes.source;return!e||""===e.trim()}renderToolbarButton(e,t){const{activePanel:n}=this.state,{className:r}=this.props,a=s()(r,"components-button components-tab-button",{"is-pressed":n===e});return(0,o.createElement)("button",{className:a,onClick:this.toggleMode(e)},(0,o.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{source:r}=e,{activePanel:a}=this.state;return!n&&this.isEmpty()?(0,o.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,o.createElement)("div",{className:t},(0,o.createElement)(c.BlockControls,null,(0,o.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(m,__("Markdown","jetpack")),this.renderToolbarButton(h,__("Preview","jetpack")))),a!==h&&n?(0,o.createElement)(c.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:r}):(0,o.createElement)(d.Z,{className:`${t}__preview`,source:r}))}}t.Z=(0,u.compose)([(0,p.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,p.withDispatch)(((e,t)=>{let{currentBlockId:n}=t;return{removeBlock:()=>e("core/block-editor").removeBlocks(n)}}))])(f)},7882:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4096),s=n(81092),l=n(27279),c=n(57535),u=n(20510);const __=a.__,_x=a._x,p="markdown",d=__("Try Markdown","jetpack"),m=__("Markdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters.","jetpack"),h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},(0,r.createElement)(o.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),(0,r.createElement)(o.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),f=(0,i.Wp)()||(0,i.Ug)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",g={title:__("Markdown","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Use regular characters and punctuation to style text, links, and lists.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:f},__("Support reference","jetpack"))),icon:{src:h,foreground:(0,c.m)()},category:(0,u.Z)("text","formatting"),keywords:[_x("formatting","block search term","jetpack"),_x("syntax","block search term","jetpack"),_x("markup","block search term","jetpack")],attributes:{source:{type:"string"}},supports:{align:["wide","full"],html:!1,spacing:{padding:!0}},edit:s.Z,save:l.Z,example:{attributes:{source:`## ## ${d}\n\n${m}`}}}},4822:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(29337),i=n.n(o),s=n(52175);const __=a.__,l=new(i()),c=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=null===s.__experimentalGetSpacingClassesAndStyles||void 0===s.__experimentalGetSpacingClassesAndStyles?void 0:(0,s.__experimentalGetSpacingClassesAndStyles)(e);return null!=t&&t.style?t.style:{}};t.Z=e=>{let{className:t,source:n="",attributes:a}=e;return(0,r.createElement)(r.RawHTML,{className:t,onClick:c,style:u(a)},n.length?l.render(n):"")}},27279:function(e,t,n){"use strict";var r=n(69307),a=n(4822);t.Z=e=>{let{attributes:t,className:n}=e;return(0,r.createElement)(a.Z,{className:n,source:t.source,attributes:t})}},11868:function(e,t,n){"use strict";n.d(t,{V1:function(){return i},vW:function(){return s},jn:function(){return l},Eo:function(){return c},fL:function(){return u},ez:function(){return m}});var r=n(65736),a=n(9818),o=n(92819);const __=r.__,i=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],s=i.map((e=>e.value));const l={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},c=e=>(0,o.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&l]),u=e=>c(e).map((e=>e.name)),{siteLocale:p}=(0,a.select)("core/block-editor").getSettings(),d=!(0,o.isEmpty)(p)&&s.includes(p)?p:"en-US",m={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:u()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:d,type:"string",validValues:s},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}}},65618:function(e,t,n){"use strict";var r=n(69307),a=n(11868);t.Z={attributes:a.ez,supports:{align:!0,html:!1},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)(r.Fragment,null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},77583:function(e,t,n){"use strict";var r=n(69307),a=n(11868);t.Z={attributes:a.ez,migrate:e=>{const{style:t,className:n}=e,r="standard"===t?"":`is-style-${t}`;return{...e,className:n?`${n} ${r}`:r}},isEligible:e=>{let{style:t,className:n}=e;return!(!t||"standard"===t)&&(!n||-1===n.indexOf("is-style-"))},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},97372:function(e,t,n){"use strict";var r=n(69307),a=(n(86841),n(89105)),o=n.n(a),i=n(92819),s=n(4096),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(12087),m=n(70718),h=n(18746),f=n(11868),g=n(14087),b=n(98085),v=n(88707);const __=u.__;t.Z=(0,c.withNotices)((function(e){let{attributes:t,className:n,clientId:a,isSelected:k,name:y,noticeOperations:E,noticeUI:w,setAttributes:_}=e;const C=(0,p.getBlockDefaultClassName)(y),j=(0,g.S)(f.ez,t);(0,i.isEqual)(j,t)||_(j);const{align:S,rid:x,iframe:P,domain:T,lang:N,newtab:A,negativeMargin:I}=t,M=(0,i.isEmpty)(x),B=(0,b.t)((0,f.Eo)(),t.className),R=(0,b.t)((0,f.Eo)(x),t.className),L=(0,h.Z)(R),Z=(0,i.isEqual)(x,["1"]);(0,r.useEffect)((()=>{if(E.removeAllNotices(),!M&&!Z&&"wide"===R&&"wide"!==S&&"full"!==S){const e=(0,r.createElement)(r.Fragment,null,__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack"));E.createNotice({status:"warning",content:e})}}),[Z,S,M,x,R]),(0,r.useEffect)((()=>{"button"===B&&Array.isArray(x)&&x.length>1&&_({className:"",style:""})}),[x,B,_]),(0,r.useEffect)((()=>{k&&(Array.isArray(x)&&x.length>1?(0,p.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,p.registerBlockStyle)("jetpack/opentable",f.jn))}),[k,x]),(0,r.useEffect)((()=>{"wide"===L&&"wide"===S&&_({align:""}),"wide"===R&&L&&R!==L&&_({align:"wide"}),_({style:R})}),[R]);const D=(0,f.fL)(x),F=e=>x.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],O=e=>{Array.isArray(e)?_({rid:e,style:e.length>1&&"button"===R?"standard":R}):(e=>{const t=(0,v.CC)(e);t||(E.removeAllNotices(),E.createErrorNotice((0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,__("We ran into an issue","jetpack")),(0,r.createElement)("br",null),__("Please ensure this embed matches the one from your OpenTable account","jetpack"))));const n=(0,g.S)(f.ez,t);_(n),E.removeAllNotices()})(e)},z=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorAdvancedControls,null,(0,r.createElement)(c.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>_({iframe:!P}),className:"is-opentable"}),"button"===R&&(0,r.createElement)(c.ToggleControl,{label:__("Remove button margin","jetpack"),checked:I,onChange:()=>_({negativeMargin:!I})})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(m.Z,{rids:x,onChange:O}),(0,r.createElement)(c.SelectControl,{label:__("Language","jetpack"),value:N,onChange:e=>_({lang:e}),options:f.V1}),(0,r.createElement)(c.ToggleControl,{label:__("Open in a new window","jetpack"),checked:A,onChange:()=>_({newtab:!A})})))),U=(0,s.Wp)()||(0,s.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",$=(0,r.createElement)(c.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:d.Z,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:w},(0,r.createElement)(m.Z,{rids:x,onSubmit:O}),(0,r.createElement)("div",{className:`${C}-placeholder-links`},(0,r.createElement)(c.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},__("Sign up for OpenTable","jetpack")),(0,r.createElement)(c.ExternalLink,{href:U},__("Learn more","jetpack")))),V=o()(n,{[`is-style-${R}`]:!M&&D.includes(R)&&-1===n.indexOf("is-style"),"is-placeholder":M,"is-multi":"multi"===F(R)[0],[`align${S}`]:S,"has-no-margin":I});return(0,r.createElement)(r.Fragment,null,w,(0,r.createElement)("div",{className:V},!M&&z,M?$:(e=>{const[t,n]=F(e||R);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${C}-overlay`}),(0,r.createElement)("iframe",{title:(0,u.sprintf)(
16
  /* translators: Placeholder is a unique ID. */
17
  __("Open Table Preview %s","jetpack"),a),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,i.join)(x,"%2C")}&type=${t}&theme=${n}&overlay=false&domain=${T}&lang=${N&&f.vW.includes(N)?N:"en-US"}&newtab=${A}&disablega=true`}))})()))}))},12087:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},(0,r.createElement)(a.Path,{d:"m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z"}))},5458:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},Xd:function(){return h}});var r=n(69307),a=n(65736),o=n(4981),i=n(11868),s=n(65618),l=n(77583),c=n(97372),u=n(12087),p=n(88707),d=n(57535);n(6757);const __=a.__,_x=a._x,m="opentable",h={title:__("OpenTable","jetpack"),description:__("Allow visitors to book a reservation with OpenTable","jetpack"),icon:{src:u.Z,foreground:(0,d.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1},edit:c.Z,save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:i.ez,styles:(0,i.Eo)(),example:{attributes:{rid:["1"],style:"standard",iframe:!0,domain:"com",lang:"en-US",newtab:!1,negativeMargin:!1}},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(p.pU.test(e.textContent)||p.tC.test(e.textContent)),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,o.createBlock)("jetpack/opentable",t)}}]},deprecated:[s.Z,l.Z]}},70718:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(29183),a=n.n(r),o=n(69307),i=n(92819),s=n(55609),l=n(65736),c=n(74701);const __=l.__,_n=l._n;function u(e){const[t,n]=(0,o.useState)(""),r=(0,c.Z)(t,20),[l,u]=(0,o.useState)(e.rids||[]),p=/^(\d+)$|\(\#(\d+)\)$/,d=r.filter((e=>l.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),m=(0,o.createElement)(s.FormTokenField,a()({value:l,suggestions:d,saveTransform:e=>c.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:20,label:_n("Restaurant","Restaurants",l.length,"jetpack")},e,{onChange:t=>{const n=t.map((e=>{const t=p.exec(e);return t[1]||t[2]}));u(n),e.onChange&&e.onChange(n)}}));return(0,o.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,o.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,i.isEmpty)(l)?t:l)}},m,(0,o.createElement)(s.Button,{isSecondary:!0,type:"submit"},__("Embed","jetpack"))):m)}},18746:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},74701:function(e,t,n){"use strict";n.d(t,{$:function(){return o},Z:function(){return i}});var r=n(92819),a=n(69307);const o=/^\s*(http[s]?:\/\/|\<script)/;function i(e,t){const[n,i]=(0,a.useState)([]),s=(0,a.useCallback)((0,r.throttle)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(e)).then((e=>e.json())).then((e=>i((0,r.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,a.useEffect)((()=>{(0,r.isEmpty)(e)||o.test(e)||s(e)}),[e]),n}},88707:function(e,t,n){"use strict";n.d(t,{tC:function(){return a},pU:function(){return o},CC:function(){return i}});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,o=/rid=([0-9]+)&/,i=e=>{if(e)return(e=>{if(!e)return;let t="";if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let a=n.getAll("rid");if(a&&0!==a.length||(a=n.getAll("restref")),!a||0===a.length)return;const o={};a&&(o.rid=a);const i=n.get("domain");i&&(o.domain=i);const s=n.get("iframe");s&&(o.iframe=s);const l=n.get("lang");l&&(o.lang=l);const c=n.get("newtab");return c&&(o.newtab=c),r&&(o.style=r),o})((e=>{const t=e.match(r);return t&&t[1]?t[1]:a.test(e)||o.test(e)?e:void 0})(e))}},79509:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(18161);const __=a.__,_x=a._x;function s(e){let{className:t,onSubmit:n,noticeUI:a,url:s,setUrl:l}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.Placeholder,{label:__("Pinterest","jetpack"),icon:i.qv,notices:a},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),n()}},(0,r.createElement)("input",{type:"url",value:s,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>l(e.target.value)}),(0,r.createElement)(o.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))))}},49362:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981);const __=a.__,_x=a._x;function s(e){let{fallbackUrl:t,onClick:n}=e;return(0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(o.Button,{isLink:!0,onClick:()=>{const e=(0,r.createElement)("a",{href:t},t);n((0,i.createBlock)("core/paragraph",{content:(0,r.renderToString)(e)}))}},_x("Convert block to link","button label","jetpack")))}},61989:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}},4052:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setEditingState:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},41659:function(e,t,n){"use strict";var r=n(69307),a=n(94991);t.Z={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:n}=e;const{url:o}=t;return(0,a.t)(o)?(0,r.createElement)("div",{className:n},(0,r.createElement)("a",{"data-pin-do":(0,a.t)(o),href:o})):null}}},81253:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(52175),i=n(94991),s=n(4052),l=n(61989),c=n(79509),u=n(49362),p=n(79474);t.Z=(0,a.withNotices)((function(e){let{attributes:t,isSelected:n,className:d,noticeOperations:m,noticeUI:h,setAttributes:f,onReplace:g}=e;const{url:b}=t,{isFetching:v,pinterestUrl:k,testUrl:y,hasTestUrlError:E}=(0,p.Z)(),[w,_]=(0,r.useState)(!1),[C,j]=(0,r.useState)(""),[S,x]=(0,r.useState)(!1),P=(0,r.useCallback)((()=>(0,r.createElement)(u.Z,{fallbackUrl:C,onClick:g})),[E]),T=()=>{v||(y(C),x(!1))},N=()=>{_(!0)};if((0,r.useEffect)((()=>{b&&y(b)}),[]),(0,r.useEffect)((()=>{!n&&w&&_(!1)}),[n,w]),(0,r.useEffect)((()=>{f({url:k}),m.removeAllNotices(),k&&j(k),E&&m.createErrorNotice(P())}),[k,E,f,P]),v)return(0,r.createElement)(l.Z,null);const A=(0,i.t)(b);if(S||!b||b&&!A)return(0,r.createElement)(c.Z,{className:d,onSubmit:T,noticeUI:h,url:C,setUrl:j});const I=`<a data-pin-do='${A}' href='${b}'></a>`;return(0,r.createElement)("div",{className:d},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.C,{setEditingState:x})),(0,r.createElement)("div",null,(0,r.createElement)(a.SandBox,{html:I,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:N}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:N})))}))},79474:function(e,t,n){"use strict";var r=n(69307),a=n(87072),o=n(18161);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,r.useState)(!1),[i,s]=(0,r.useState)(e),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i&&i!==o.a0&&(n(!0),(0,a.Z)(i).then((e=>{n(!1),s(e),c(!1)})).catch((()=>{n(!1),s(i||void 0),c(!0)})))}),[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:l,testUrl:s}}},18161:function(e,t,n){"use strict";n.d(t,{Wh:function(){return p},a0:function(){return d},u2:function(){return m},qv:function(){return f},Xd:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(81253),l=n(26981),c=n(57535),u=n(41659);const __=a.__,_x=a._x,p=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,d="https://pinterest.com/anapinskywalker/",m="pinterest",h=__("Pinterest","jetpack"),f=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,null,(0,r.createElement)(o.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z"}))),g={title:h,description:__("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:f,foreground:(0,c.m)()},category:"embed",keywords:[_x("social","block search term","jetpack"),_x("pinboard","block search term","jetpack"),_x("pins","block search term","jetpack")],supports:{align:!1,html:!1},attributes:{url:{type:"string"}},edit:s.Z,save:l.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&p.test(e.textContent),transform:e=>(0,i.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},example:{attributes:{url:d}},deprecated:[u.Z]}},26981:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;return(0,r.createElement)("a",{href:n},n)}},94991:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var r=n(96483),a=n(18161);function o(e){if(!a.Wh.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},45452:function(e,t,n){"use strict";n.d(t,{G:function(){return s},q:function(){return l}});var r=n(12761),a=n(86989),o=n.n(a),i=n(96483);const s=async()=>await o()({path:"/wpcom/v2/podcast-player/track-quantity"}),l=async e=>{let t,n,a,{url:s,guids:l=[],fetchEpisodeOptions:c=!1}=e;try{t=await o()({path:(0,i.addQueryArgs)("/wpcom/v2/podcast-player",{url:s,guids:l,"episode-options":c})})}catch(e){n=e}if(t)return{type:r.u,data:t};try{a=await o()({path:(0,i.addQueryArgs)("/oembed/1.0/proxy",{url:s})})}catch(e){}const u='<a href="'+s+'">'+s+"</a>";if(a&&a.html!==u)return{type:r.b};throw n}},23600:function(e,t,n){"use strict";var r=n(96483),a=n(68039);t.Z={url:{type:"string",validator:r.isUrl},selectedEpisodes:{type:"array",default:[]},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeTitle:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}}},98006:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(76814);const s=(0,r.memo)((e=>{let{playerId:t,title:n,cover:a,link:o,track:i,children:s,showEpisodeTitle:c,showCoverArt:u,showEpisodeDescription:p,colors:d}=e;return u||c||p?(0,r.createElement)("div",{className:"jetpack-podcast-player__header"},(0,r.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},u&&a&&(0,r.createElement)("div",{className:"jetpack-podcast-player__cover"},(0,r.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:a,alt:""})),c&&!!(n||i&&i.title)&&(0,r.createElement)(l,{playerId:t,title:n,link:o,track:i,colors:d})),!!(p&&i&&i.description)&&(0,r.createElement)("p",{id:`${t}__track-description`,className:"jetpack-podcast-player__track-description"},i.description),s):s})),l=(0,r.memo)((e=>{let{playerId:t,title:n,link:a,track:s,colors:l={primary:{name:null,custom:null,classes:""}}}=e;return(0,r.createElement)("h2",{id:`${t}__title`,className:"jetpack-podcast-player__title"},!(!s||!s.title)&&(0,r.createElement)("span",{className:o()("jetpack-podcast-player__current-track-title",l.primary.classes),style:{color:l.primary.custom}},s.title,(0,r.createElement)("a",{className:"jetpack-podcast-player__track-title-link",href:s.link||s.src,target:"_blank",rel:"noopener noreferrer nofollow"},i.Z)),!!(s&&s.title&&n)&&(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&(0,r.createElement)(c,{title:n,link:a,colors:l}))})),c=(0,r.memo)((e=>{let{title:t,link:n}=e;return(0,r.createElement)("span",{className:"jetpack-podcast-player__podcast-title"},n?(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:n,target:"_blank",rel:"noopener noreferrer nofollow"},t):{title:t})}));t.Z=s},66530:function(e,t,n){"use strict";var r=n(69307),a=n(15111),o=n(15020);const i=(0,r.memo)((e=>{let{playerId:t,tracks:n,selectTrack:i,currentTrack:s,playerState:l,colors:c}=e;return(0,r.createElement)("ol",{className:"jetpack-podcast-player__tracks","aria-labelledby":`jetpack-podcast-player__tracklist-title--${t}`,"aria-describedby":`jetpack-podcast-player__tracklist-description--${t}`},n.map(((e,t)=>{const n=s===t;return(0,r.createElement)(o.Z,{key:e.id,index:t,track:e,selectTrack:i,isActive:n,isPlaying:n&&l===a.Wp,isError:n&&l===a.Vy,colors:c})})))}));t.Z=i},58627:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(25158),u=n(94333),p=n(9818),d=n(15111),m=n(92924),h=n(66530),f=n(98006),g=n(74693),b=n(56551);const __=l.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{currentTrack:0,hasUserInteraction:!1}),a()(this,"recordUserInteraction",(()=>{this.state.hasUserInteraction||this.setState({hasUserInteraction:!0})})),a()(this,"selectTrack",(e=>{const{currentTrack:t}=this.state;if(t===e)return this.recordUserInteraction(),void this.props.toggleMediaSource(this.props.playerId);-1!==t&&this.props.pauseMediaSource(this.props.playerId),this.loadAndPlay(e)})),a()(this,"loadTrack",(e=>{const t=this.getTrack(e);if(!t)return!1;this.state.currentTrack!==e&&this.setState({currentTrack:e});const{title:n,link:r,description:a}=t;return this.props.updateMediaSourceData(this.props.playerId,{title:n,link:r}),(0,c.speak)(
18
  /* translators: %s is the track title. It describes the current state of the track as "Loading: [track title]". */
19
- `${(0,l.sprintf)(__("Loading: %s","jetpack"),n)} ${a}`,"assertive"),!0})),a()(this,"loadAndPlay",(e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)})),a()(this,"getTrack",(e=>this.props.tracks[e])),a()(this,"handleError",(e=>{if(!this.state.hasUserInteraction){const t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{throw new Error(t)}))}this.props.errorMediaSource(this.props.playerId),(0,c.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")})),a()(this,"handlePlay",(()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})})),a()(this,"handlePause",(()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==d.Vy&&this.props.pauseMediaSource(this.props.playerId)})),a()(this,"handleTimeChange",(e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)})),a()(this,"handleJump",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)})),a()(this,"handleSkip",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)})),a()(this,"updateMediaData",(e=>{var t,n;this.props.updateMediaSourceData(this.props.playerId,{duration:null===(t=e.target)||void 0===t?void 0:t.duration,domId:null===(n=e.target)||void 0===n?void 0:n.id})}))}registerPlayer(){const e=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:d._5}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){const t=e=>null!=e&&e.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=new Set(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}static getDerivedStateFromProps(e,t){return e.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:r,tracks:a,attributes:i,currentTime:c,playerState:u}=this.props,{itemsToShow:p,primaryColor:d,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:E,backgroundColor:w,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x}=i,{currentTrack:P}=this.state,T=a.slice(0,p),N=this.getTrack(P),A=(0,g.Aq)({primaryColor:d,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:w,customBackgroundColor:_}),I={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":E,"--jetpack-podcast-player-background":C},M=s()("jetpack-podcast-player",u,A.secondary.classes,A.background.classes);return(0,o.createElement)("section",{className:M,style:I,"aria-labelledby":t||N&&N.title?`${e}__title`:void 0,"aria-describedby":N&&N.description?`${e}__track-description`:void 0,"data-jetpack-iframe-ignore":!0},(0,o.createElement)(f.Z,{playerId:e,title:t,link:n,cover:r,track:this.getTrack(P),showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x,colors:A},(0,o.createElement)(m.Z,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(P).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:u,currentTime:c,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),T.length>1&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,l.sprintf)(// translators: %s is the track title.
20
  __("Playlist: %s","jetpack"),t)),(0,o.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,o.createElement)(h.Z,{playerId:e,playerState:u,currentTrack:P,tracks:T,selectTrack:this.selectTrack,colors:A})))}}v.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]},t.Z=(0,u.compose)([b.Z,(0,p.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(d.tT);return{currentTime:r(n),playerState:a(n)}})),(0,p.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(d.tT);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(v)},86852:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=(0,r.memo)((e=>{let{link:t,title:n,colors:o}=e;return(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),t&&(0,r.createElement)("span",{className:o.secondary.classes,style:{color:o.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,a.sprintf)(
21
  /* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */
22
  __("%s:","jetpack"),n)} `),__("Open in a new tab","jetpack"))))}));t.Z=o},71938:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(72086);const __=a.__,i=(0,r.memo)((e=>{let t,n,{isPlaying:a,isError:i,className:s}=e;i?(n="error",
@@ -29,11 +29,11 @@ t=__("Playing:","jetpack"));const l=o[n];return l?(0,r.createElement)("span",{cl
29
  /* translators: This needs to be a single word with no spaces. It describes
30
  the current item in the group. A screen reader will announce it as "[title],
31
  current track". */
32
- b=n?__("track","jetpack"):void 0;return(0,r.createElement)("li",{className:f,style:Object.keys(g).length?g:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:t.link||t.src,role:"button","aria-current":b,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),u(p))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),u(p))}},(0,r.createElement)(s.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:i}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},t.title),t.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:t.duration},t.duration)),n&&i&&(0,r.createElement)(l.Z,{link:t.link,title:t.title,colors:d}))}));t.Z=u},56551:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(27538),a=n.n(r),o=n(69307),i=n(65736);const __=i.__;function s(e){class t extends o.Component{constructor(){super(...arguments),a()(this,"state",{didError:!1,isIE11AudioIssue:!1}),a()(this,"componentDidCatch",((e,t)=>{this.props.onError(e,t)}))}render(){const{didError:t,isIE11AudioIssue:n}=this.state;return t?(0,o.createElement)("section",{className:"jetpack-podcast-player"},(0,o.createElement)("p",{className:"jetpack-podcast-player__error"},n?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,o.createElement)(e,this.props)}}return a()(t,"getDerivedStateFromError",(e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}))),t.defaultProps={onError:()=>{}},t}},12761:function(e,t,n){"use strict";n.d(t,{u:function(){return r},b:function(){return a}});const r="podcast-feed",a="embed-block"},90307:function(e,t,n){"use strict";var r=n(96483),a=n(68039);const o={url:{type:"string",validator:r.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}};t.Z={attributes:o,supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},87315:function(e,t,n){"use strict";var r=n(69307),a=n(95339),o=n.n(a),i=n(92819),s=n(4096),l=n(55609),c=n(94333),u=n(65736),p=n(52175),d=n(9818),m=n(4981),h=n(96483),f=n(14087),g=n(41820),b=n(23600),v=n(58627),k=n(74693),y=n(45452),E=n(91763),w=n(71420),_=n(12761),C=n(87929);const __=u.__,j=o()("jetpack:podcast-player:edit"),S=(0,s.Wp)()||(0,s.Ug)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/";t.Z=(0,c.compose)([(0,d.withDispatch)(((e,t)=>{let{clientId:n,attributes:r}=t;return{replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(n,(0,m.createBlock)("core/embed",{url:r.url}))}}})),(0,p.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),l.withNotices,c.withInstanceId,w.K])((e=>{var t,n;let{instanceId:a,className:o,attributes:s,setAttributes:c,noticeOperations:{createErrorNotice:u,removeAllNotices:d},noticeUI:m,primaryColor:w,setPrimaryColor:x,secondaryColor:P,setSecondaryColor:T,fallbackTextColor:N,backgroundColor:A,setBackgroundColor:I,fallbackBackgroundColor:M,isSelected:B,replaceWithEmbedBlock:R}=e;const L=(0,f.S)(b.Z,s),{url:Z,selectedEpisodes:D,itemsToShow:F,showCoverArt:O,showEpisodeTitle:z,showEpisodeDescription:U,exampleFeedData:$}=L,V=`jetpack-podcast-player-block-${a}`,[G,H]=(0,r.useState)(!1),[q,W]=(0,r.useState)(10),K=(0,r.useRef)(),[{selectedGuid:X,checkUrl:J,...Y},Q]=(0,r.useReducer)(E.J,{editedUrl:Z||"",isEditing:!Z&&!$,isLoading:!1,feedData:$||{},isInteractive:!1,selectedGuid:null==D||null===(t=D[0])||void 0===t?void 0:t.guid,checkUrl:Z||""}),ee=(0,r.useMemo)((()=>(0,i.debounce)((e=>{var t;Q({type:E.N.START_FETCH}),null===(t=K.current)||void 0===t||t.cancel(),K.current=(0,k.W4)((0,y.q)({...e,fetchEpisodeOptions:!0})),K.current.promise.then((t=>{if(d(),null!=t&&t.isCanceled)j("Block was unmounted during fetch",t);else switch(null==t?void 0:t.type){case _.u:return c({url:e.url,selectedEpisodes:e.guids.map((e=>({guid:e})))}),Q({type:E.N.FEED_RECEIVED,payload:t.data});case _.b:return R()}}),(e=>{null!=e&&e.isCanceled?j("Block was unmounted during fetch",e):(j("feed error",e),d(),u(e.message||__("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),Q({type:E.N.START_EDITING}))}))}),300)),[R,c,u,d]);(0,r.useEffect)((()=>()=>{var e,t;null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e)}),[]);const te=(0,r.useCallback)((e=>{null===e||G||((0,C.DT)(["link#mediaelement-css","link#wp-mediaelement-css"],e),H(!0))}),[G]);(0,r.useEffect)((()=>{if(""!==J)return ee({url:J,guids:X?[X]:[]}),()=>{var e,t;return null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t?void 0:t.call(e)}}),[ee,J,X]),(0,r.useEffect)((()=>{(0,y.G)().then((e=>{W(e)}))}),[]),(0,r.useEffect)((()=>{X&&1!==F&&c({itemsToShow:1})}),[X,F,c]),(0,r.useEffect)((()=>{!B&&Y.isInteractive&&Q({type:E.N.PREVENT_INTERACTIONS})}),[B,Y.isInteractive]);const ne=e=>{if(e.preventDefault(),""===Y.editedUrl)return;const t=(0,h.prependHTTP)(Y.editedUrl);if((0,h.isURL)(t)){var n;if(t===J)Q({type:E.N.CLEAR_FEED}),ee({url:J,guids:null!==(n=D[0])&&void 0!==n&&n.guid?[D[0].guid]:[]});else Q({type:E.N.CHECK_URL,payload:t});Q({type:E.N.FINISH_EDITING,payload:t})}else u(__("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))};if(Y.isEditing)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},(0,r.createElement)("form",{onSubmit:ne},m,(0,r.createElement)(l.TextControl,{type:"text",inputMode:"url",placeholder:__("Enter URL here…","jetpack"),value:Y.editedUrl,className:"components-placeholder__input",onChange:e=>Q({type:E.N.EDIT_URL,payload:e})}),(0,r.createElement)(l.Button,{isPrimary:!0,type:"submit"},__("Embed","jetpack"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(l.ExternalLink,{href:S},__("Learn more about embeds","jetpack"))));if(null===(n=Y.feedData.tracks)||void 0===n||!n.length)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Loading podcast feed…","jetpack")},(0,r.createElement)(l.Spinner,null));const re=(e,t)=>n=>{c({[e]:n}),t(n)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.BlockControls,null,(0,r.createElement)(l.ToolbarGroup,null,(0,r.createElement)(l.ToolbarButton,{"aria-label":__("Edit Podcast Feed URL","jetpack"),onClick:()=>Q({type:E.N.START_EDITING})},__("Replace","jetpack")))),(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(l.PanelBody,{title:__("Podcast settings","jetpack")},(l.ComboboxControl||0===D.length)&&(0,r.createElement)(l.RangeControl,{label:__("Number of items","jetpack"),value:F,onChange:e=>c({itemsToShow:X?1:e}),min:1,max:q,required:!0,disabled:!!X}),l.ComboboxControl&&(0,r.createElement)(l.ComboboxControl,{className:"jetpack-podcast-player__episode-selector",value:X,onChange:e=>Q({type:E.N.SELECT_EPISODE,payload:e}),options:Y.feedData.options||[],label:__("Episode","jetpack"),onFilterValueChange:i.noop}),(0,r.createElement)(l.ToggleControl,{label:__("Show Cover Art","jetpack"),checked:O,onChange:e=>c({showCoverArt:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Title","jetpack"),checked:z,onChange:e=>c({showEpisodeTitle:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Description","jetpack"),checked:U,onChange:e=>c({showEpisodeDescription:e})})),(0,r.createElement)(p.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:w.color,onChange:re("hexPrimaryColor",x),label:__("Primary Color","jetpack")},{value:P.color,onChange:re("hexSecondaryColor",T),label:__("Secondary Color","jetpack")},{value:A.color,onChange:re("hexBackgroundColor",I),label:__("Background Color","jetpack")}]},(0,r.createElement)(p.ContrastChecker,{isLargeText:!1,textColor:P.color,backgroundColor:A.color,fallbackBackgroundColor:M,fallbackTextColor:N}))),(0,r.createElement)("div",{id:V,className:o,ref:te},(0,r.createElement)(v.Z,{playerId:V,attributes:L,tracks:Y.feedData.tracks,cover:Y.feedData.cover,title:Y.feedData.title,link:Y.feedData.link}),!Y.isInteractive&&!Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:()=>Q({type:E.N.MAKE_INTERACTIVE})}),Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__loading-overlay"},(0,r.createElement)(l.Spinner,null))))}))},41820:function(e,t,n){"use strict";n.d(t,{E:function(){return r.Z}});var r=n(95506)},76814:function(e,t,n){"use strict";var r=n(69307),a=n(55609);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.Z=o},95506:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,null,(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"})),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,null),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,{transform:"matrix(1 0 0 1 144 120)"},(0,r.createElement)(a.Path,{d:"M-122-114h-5v8.18c-0.31-0.11-0.65-0.18-1-0.18c-1.66,0-3,1.34-3,3s1.34,3,3,3s3-1.34,3-3v-9h3V-114 L-122-114z M-129-114h-12v2h12V-114L-129-114z M-129-110h-12v2h12V-110L-129-110z M-133-106h-8v2h8V-106L-133-106z M-129-103 c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1s-0.45,1-1,1C-128.55-102-129-102.45-129-103z"})))))},72086:function(e,t,n){"use strict";n.r(t),n.d(t,{playing:function(){return i},error:function(){return s}});var r=n(69307),a=n(55609);const o={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},i=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"})),s=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},58495:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(65736),a=n(23600),o=n(90307),i=n(87315),s=n(99944),l=n(41820),c=n(57535);const __=r.__,_x=r._x,u="podcast-player",p={title:__("Podcast Player","jetpack"),description:__("Select and play episodes from a single podcast.","jetpack"),icon:{src:l.E,foreground:(0,c.m)()},category:"embed",keywords:[_x("audio","block search term","jetpack"),_x("embed","block search term","jetpack")],supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},edit:i.Z,save:s.Z,attributes:a.Z,example:{attributes:{customPrimaryColor:(0,c.m)(),hexPrimaryColor:(0,c.m)(),exampleFeedData:{title:__("Jetpack Example Podcast","jetpack"),link:"https://jetpack.com",cover:"https://jetpackme.files.wordpress.com/2020/05/jetpack-example-podcast-cover.png?w=160",tracks:[{id:"3",title:__("3. Our third episode","jetpack"),duration:"14:58"},{id:"2",title:__("2. Interview with a special guest","jetpack"),duration:"19:17"},{id:"1",title:__("1. Welcome to Example Podcast","jetpack"),duration:"11:25"}]}}},deprecated:[o.Z]}},99944:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;if(n&&""!==n)return(0,r.createElement)("a",{className:"jetpack-podcast-player__direct-link",href:n},n)}},91763:function(e,t,n){"use strict";n.d(t,{N:function(){return r},J:function(){return a}});const r={EDIT_URL:"EDIT_URL",FINISH_EDITING:"FINISH_EDITING",START_EDITING:"START_EDITING",SELECT_EPISODE:"SELECT_EPISODE",FEED_RECEIVED:"FEED_RECEIVED",CLEAR_FEED:"CLEAR_FEED",MAKE_INTERACTIVE:"MAKE_INTERACTIVE",PREVENT_INTERACTIONS:"PREVENT_INTERACTIONS",START_FETCH:"START_FETCH",CHECK_URL:"CHECK_URL"},a=(e,t)=>{switch(t.type){case r.EDIT_URL:return{...e,editedUrl:t.payload};case r.START_EDITING:return{...e,isEditing:!0,isLoading:!1};case r.FINISH_EDITING:return{...e,editedUrl:t.payload,isEditing:!1};case r.FEED_RECEIVED:return{...e,isLoading:!1,feedData:t.payload};case r.CLEAR_FEED:return{...e,feedData:{}};case r.MAKE_INTERACTIVE:return{...e,isInteractive:!0};case r.PREVENT_INTERACTIONS:return{...e,isInteractive:!1};case r.START_FETCH:return{...e,isLoading:!0};case r.SELECT_EPISODE:return{...e,selectedGuid:t.payload};case r.CHECK_URL:return{...e,selectedGuid:null,feedData:{},checkUrl:t.payload};default:return{...e}}}},74693:function(e,t,n){"use strict";n.d(t,{Gd:function(){return i},W4:function(){return s},Aq:function(){return l}});var r=n(89105),a=n.n(r),o=n(92819);function i(e,t){if(e&&t)return`has-${t}-${e}`}function s(e){let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}}const l=(0,o.memoize)((e=>{let{primaryColor:t,customPrimaryColor:n,secondaryColor:r,customSecondaryColor:o,backgroundColor:s,customBackgroundColor:l}=e;const c=i("color",t),u=i("color",r),p=i("background-color",s);return{primary:{name:t,custom:n,classes:a()({"has-primary":c||n,[c]:c})},secondary:{name:r,custom:o,classes:a()({"has-secondary":u||o,[u]:u})},background:{name:s,custom:l,classes:a()({"has-background":p||l,[p]:p})}}}),(e=>Object.values(e).join()))},59189:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"premium-content-wrapper"},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/logged-out-view"],["premium-content/subscriber-view"]],__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},2963:function(e,t,n){"use strict";var r=n(69307);const a={selectedTab:{id:"",className:"",label:(0,r.createElement)(r.Fragment,null)},stripeNudge:null},o=(0,r.createContext)(a);t.Z=o},76136:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(29183),a=n.n(r),o=n(69307),i=n(52175),s=n(55609),l=n(6801),c=n(36696),u=n(1214),p=n(65736),d=n(29917),m=n(20361);const __=p.__;function h(e){const{selectedPlanId:t,onSelected:n,plans:r,getPlanDescription:p}=e,h=r.find((e=>e.id===t));let f=null;h&&(f=" "+p(h));let g=l.Z;return t&&!h&&(f=__("Subscription not found","jetpack"),g=c.Z),(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(s.ToolbarGroup,null,(0,o.createElement)(s.ToolbarItem,null,(()=>(0,o.createElement)(s.DropdownMenu,{icon:(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.Z,{icon:g})," ",f&&(0,o.createElement)(o.Fragment,null,f)),label:__("Select a plan","jetpack"),className:"premium-content-toolbar-button"},(t=>{let{onClose:r}=t;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(d.Z,a()({},e,{onSelected:n,onClose:r,selectedPlan:h})),(0,o.createElement)(m.Z,a()({},e,{onClose:r})))}))))))}},47322:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z"}),(0,r.createElement)(a.Circle,{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(a.Path,{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}))},61114:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(55609),o=n(52175),i=n(65736),s=n(17882);const __=i.__;function l(e){const[t,n]=(0,r.useState)(0),{attributes:i,setAttributes:l,className:c,savePlan:u,siteSlug:p}=e;return(0,r.createElement)(o.InspectorControls,null,p&&(0,r.createElement)(a.ExternalLink,{href:`https://wordpress.com/earn/payments/${p}`,className:"wp-block-premium-content-container---link-to-earn"},__("Manage your subscriptions.","jetpack")),(0,r.createElement)(a.PanelBody,{title:__("Add a new subscription","jetpack"),initialOpen:!0,className:`${c}---settings-add_plan`},1===t&&(0,r.createElement)(a.Placeholder,{icon:"lock",label:__("Premium Content","jetpack"),instructions:__("Saving plan…","jetpack")},(0,r.createElement)(a.Spinner,null)),0===t&&(0,r.createElement)("div",null,(0,r.createElement)(a.PanelRow,{className:"plan-name"},(0,r.createElement)(a.TextControl,{id:"new-plan-name",label:__("Name","jetpack"),value:i.newPlanName,onChange:e=>l({newPlanName:e})})),(0,r.createElement)(a.PanelRow,{className:"plan-price"},(0,r.createElement)(a.SelectControl,{label:__("Currency","jetpack"),onChange:e=>l({newPlanCurrency:e}),value:i.newPlanCurrency,options:s.Xy}),(0,r.createElement)(a.TextControl,{label:__("Price","jetpack"),value:i.newPlanPrice,onChange:e=>l({newPlanPrice:parseFloat(e)}),type:"number"})),(0,r.createElement)(a.PanelRow,{className:"plan-interval"},(0,r.createElement)(a.SelectControl,{label:__("Interval","jetpack"),onChange:e=>l({newPlanInterval:e}),value:i.newPlanInterval,options:[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"}]})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.Button,{isSecondary:!0,isLarge:!0,onClick:t=>{t.preventDefault(),n(1),u(e.attributes,(e=>{n(0),e&&(l({newPlanPrice:5}),l({newPlanName:""}))}))}},__("Add subscription","jetpack"))))))}},27939:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(1214),i=n(36696),s=n(65736);const __=s.__;t.Z=()=>(0,r.createElement)(a.Warning,{className:"premium-content-block-nudge"},(0,r.createElement)("span",{className:"premium-content-block-nudge__info"},(0,r.createElement)(o.Z,{icon:i.Z}),(0,r.createElement)("span",{className:"premium-content-block-nudge__text-container"},(0,r.createElement)("span",{className:"premium-content-block-nudge__title"},__("Invalid subscription configured for this block.","jetpack")),(0,r.createElement)("span",{className:"premium-content-block-nudge__message"},__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")))))},20361:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(9818),o=n(55609),i=n(65736);const __=i.__;function s(e){return(0,r.createElement)(o.MenuGroup,null,(0,r.createElement)(o.MenuItem,{onClick:t=>{t.preventDefault(),(0,a.select)("core/edit-post").isEditorSidebarOpened()||(0,a.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");const n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},__("Add a new subscription","jetpack")))}},61556:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(55609);function o(e){const{className:t,plan:n,selectedPlan:o,onSelected:i,onClose:s,getPlanDescription:l}=e,c=o&&n.id===o.id,u=(c?["is-selected"]:[]).concat([t]).join(" "),p=c?"yes":void 0;let d=null;return n&&(d=" "+l(n)),(0,r.createElement)(a.MenuItem,{onClick:e=>{e.preventDefault(),i(n),s()},className:u,key:n.id,value:n.id,selected:c,icon:p},n.title," : ",d)}},29917:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(29183),a=n.n(r),o=n(69307),i=n(55609),s=n(61556);function l(e){const{plans:t,selectedPlan:n,onSelected:r}=e;return(0,o.createElement)(i.MenuGroup,null,t.map((t=>(0,o.createElement)(s.Z,a()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t})))))}},34411:function(e,t,n){"use strict";n.d(t,{W:function(){return a},H:function(){return o}});var r=n(9818);const a=e=>0===e.name.indexOf("premium-content/")||e.innerBlocks.some(a),o=e=>{const{getBlocksByClientId:t,getBlockParents:n}=(0,r.select)("core/block-editor");return!!t(n(e.clientId)).find((e=>0===e.name.indexOf("premium-content/")))}},97894:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(94333),i=n(9818),s=n(65736),l=n(92694);const __=s.__,c=["core/button","jetpack/recurring-payments","premium-content/login-button"];t.Z=(0,o.compose)([(0,i.withSelect)(((e,t)=>({subscribeButton:e("core/block-editor").getBlock(t.clientId).innerBlocks.find((e=>"jetpack/recurring-payments"===e.name))}))),(0,i.withDispatch)(((e,t)=>({setSubscribeButtonPlan(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})}})))])((function(e){let{context:t,subscribeButton:n,setSubscribeButtonPlan:o}=e;const i=t?t["premium-content/planId"]:null,s=!!t&&t["premium-content/isPreview"],u=[["core/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}],["premium-content/login-button"]],p=[["jetpack/recurring-payments",{planId:i},[["jetpack/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}]]],["premium-content/login-button"]];(0,r.useEffect)((()=>{i&&n&&n.attributes.planId!==i&&o(i)}),[i,n,o]),(0,r.useEffect)((()=>{n&&(0,l.addFilter)("jetpack.RecurringPayments.showControls","jetpack/premium-content-hide-recurring-payments-controls",((e,t)=>t!==n.clientId&&e))}),[n]);const d=(0,a.useBlockProps)({className:"wp-block-buttons"});return(0,r.createElement)("div",d,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:c,template:s?u:p,templateInsertUpdatesSelection:!1,__experimentalLayout:{type:"default",alignments:[]},__experimentalMoverDirection:"horizontal"}))}))},46157:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(25389),i=n(52175),s=n(97894),l=n(71586);const __=a.__,c="premium-content/buttons",u={apiVersion:2,title:__("Premium Content buttons","jetpack"),description:__("Prompt Premium Content visitors to take action with a group of button-style links.","jetpack"),category:"grow",icon:o.Z,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},keywords:[__("link","jetpack")],edit:s.Z,save:l.Z,usesContext:["premium-content/planId","premium-content/isPreview"],deprecated:[{attributes:{},supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-buttons"},(0,r.createElement)(i.InnerBlocks.Content,null))}]}},71586:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){const e=a.useBlockProps.save({className:"wp-block-buttons"});return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},86633:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(55609),s=n(52175),l=n(65736),c=n(94333),u=n(9818),p=n(96483),d=n(78850),m=n(86989),h=n.n(m),f=n(59189),g=n(76136),b=n(61114),v=n(2963),k=n(51591),y=n(17882),E=n(2368),w=n(37930),_=n(27939);const __=l.__,C=[{id:"premium",label:(0,o.createElement)("span",null,__("Subscriber View","jetpack")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:(0,o.createElement)("span",null,__("Non-subscriber View","jetpack")),className:"wp-premium-content-logged-out-view"}],j=[];function S(e){const[t,n]=(0,o.useState)(C[1]),[r,c]=(0,o.useState)(!1),[u,m]=(0,o.useState)(j),[S,P]=(0,o.useState)(null),[T,N]=(0,o.useState)(0),[A,I]=(0,o.useState)(!1),[M,B]=(0,o.useState)(""),{isPreview:R}=e.attributes;function L(t,n){if(!t.newPlanName||0===t.newPlanName.length)return x(e,__("Plan requires a name","jetpack")),void n(!1);const r=parseFloat(t.newPlanPrice),a=(0,y.hj)(t.newPlanCurrency),o=(0,l.sprintf)(// translators: %s: Price
33
- __("Minimum allowed price is %s.","jetpack"),(0,d.ZP)(a,t.newPlanCurrency));if(r<a)return x(e,o),void n(!1);if(!(0,y.vs)(t.newPlanCurrency,r))return x(e,__("Plan requires a valid price","jetpack")),void n(!1);const i={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};h()(i).then((t=>{const r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};m(u.concat([r])),Z(r),function(e,t){e.createSuccessNotice(t,{type:"snackbar"})}(e,__("Successfully created plan","jetpack")),n&&n(!0)}),(()=>{x(e,__("There was an error when adding the plan.","jetpack")),n&&n(!1)}))}function Z(t){e.setAttributes({selectedPlanId:t.id})}const D=(0,o.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}(0,o.useEffect)((()=>(document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)})))}(D,c);const{isSelected:F,className:O}=e;(0,o.useEffect)((()=>{if(R)return;const t=(0,p.getQueryArg)(window.location.href,"origin"),n={path:(0,p.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t?"gutenberg-wpcom":"gutenberg"}),method:"GET"};h()(n).then((t=>{if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return N(2),void x(e,Object.values(t.errors)[0][0]);P((0,E.Z)(e.postId,t.connect_url)),I(t.should_upgrade_to_access_memberships),B(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?L({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:__("Monthly Subscription","jetpack"),newPlanInterval:"1 month"},(()=>{N(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(m(t.products),e.attributes.selectedPlanId||Z(t.products[0])),N(t.connected_account_id?1:2))}}),(t=>{P(null),N(2),x(e,t.message)})),setTimeout((()=>e.selectBlock()),1e3)}),[]);const{autosaveAndRedirect:z}=(0,w.Z)(S);return 0!==T||R?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.BlockControls,null,!A&&1!==T&&S&&(0,o.createElement)(i.ToolbarGroup,null,(0,o.createElement)(i.ToolbarButton,{icon:k.Pw,onClick:z,className:"connect-stripe components-tab-button"},__("Connect Stripe","jetpack"))),(0,o.createElement)(i.ToolbarGroup,null,(0,o.createElement)(i.ToolbarButton,{onClick:()=>{n(C[1])},className:"components-tab-button",isPressed:"wp-premium-content-logged-out-view"===t.className},(0,o.createElement)("span",null,__("Guest View","jetpack"))),(0,o.createElement)(i.ToolbarButton,{onClick:()=>{n(C[0])},className:"components-tab-button",isPressed:"wp-premium-content-logged-out-view"!==t.className},(0,o.createElement)("span",null,__("Subscriber View","jetpack"))))),(0,o.createElement)("div",{className:O,ref:D},(F||r)&&1===T&&(0,o.createElement)(g.Z,a()({},e,{plans:u,selectedPlanId:e.attributes.selectedPlanId,onSelected:Z,getPlanDescription:function(e){const t=(0,d.ZP)(parseFloat(e.price),e.currency);return"1 month"===e.interval?(0,l.sprintf)(// translators: %s: amount
34
  __("%s / month","jetpack"),t):"1 year"===e.interval?(0,l.sprintf)(// translators: %s: amount
35
  __("%s / year","jetpack"),t):"one-time"===e.interval?t:(0,l.sprintf)(// translators: %s: amount, plan interval
36
- __("%1$s / %2$s","jetpack"),t,e.interval)}})),(F||r)&&1===T&&(0,o.createElement)(b.Z,a()({},e,{savePlan:L,siteSlug:M})),!!e.attributes.selectedPlanId&&!u.find((t=>t.id===e.attributes.selectedPlanId))&&(0,o.createElement)(_.Z,null),(0,o.createElement)(v.Z.Provider,{value:{selectedTab:t}},(0,o.createElement)(f.Z,null)))):(0,o.createElement)("div",{className:O,ref:D},(0,o.createElement)(i.Placeholder,{icon:"lock",label:__("Premium Content","jetpack"),instructions:__("Loading data…","jetpack")},(0,o.createElement)(i.Spinner,null)))}function x(e,t){e.createErrorNotice(t,{type:"snackbar"})}t.Z=(0,c.compose)([(0,u.withSelect)((e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}})),(0,u.withDispatch)(((e,t)=>{const n=e("core/block-editor"),r=e("core/notices");return{selectBlock(){n.selectBlock(t.clientId)},createErrorNotice:r.createErrorNotice,createSuccessNotice:r.createSuccessNotice}}))])((function(e){return(0,o.createElement)(i.Disabled.Consumer,null,(t=>{var n;return(0,o.createElement)(S,a()({},e,{attributes:{...e.attributes,isPreview:t||(null===(n=e.attributes)||void 0===n?void 0:n.isPreview)}}))}))}))},98034:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(65736),a=n(4981),o=n(86633),i=n(77940),s=n(47322),l=n(34411);const __=r.__,_x=r._x,c=e=>!e.some(l.W)&&!(0,l.H)(e[0]),u="premium-content/container",p={title:__("Premium Content","jetpack"),description:__("Restrict access to your content for paying subscribers.","jetpack"),icon:s.Z,category:"grow",keywords:[_x("paywall","keyword","jetpack"),_x("paid","keyword","jetpack"),_x("subscribe","keyword","jetpack"),_x("membership","keyword","jetpack")],attributes:{newPlanName:{type:"string",default:__("Monthly Subscription","jetpack")},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0},isPreview:{type:"boolean",default:!1},isPremiumContentChild:{type:"bool",default:!0}},edit:o.Z,save:i.Z,providesContext:{"premium-content/planId":"selectedPlanId","premium-content/isPreview":"isPreview",isPremiumContentChild:"isPremiumContentChild"},supports:{html:!1},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>!e.some((e=>e.isPremiumContentChild))&&(void 0===t||c(t)),__experimentalConvert(e){if(!c(e))return;const t=e.map((e=>(0,a.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,a.createBlock)("premium-content/container",{},[(0,a.createBlock)("premium-content/logged-out-view"),(0,a.createBlock)("premium-content/subscriber-view",{},t)])}}]}}},93068:function(e,t,n){"use strict";var r=n(25905),a=n(9109);t.Z=[r.Z,a.Z]},25905:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(52175);t.Z={attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:e=>{let{buttonClasses:t}=e;return!!t},migrate:(e,t)=>{if(Array.isArray(t))for(let n=0;n<t.length;n++)if(t[n].name&&"premium-content/buttons"===t[n].name)return[e,[...t]];const n=(0,a.createBlock)("premium-content/buttons",{},[(0,a.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),(0,a.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[...t,n]]},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},(0,r.createElement)(o.InnerBlocks.Content,null))}},9109:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"})}},43279:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(65736),i=n(9818),s=n(94333),l=n(2963);const __=o.__;t.Z=(0,s.compose)((0,i.withSelect)((e=>{const{getBlockParents:t,getSelectedBlockClientId:n}=e("core/block-editor"),r=t(n());return{parentClientId:r.length?r[r.length-1]:void 0}})))((function(e){let{parentClientId:t,isSelected:n}=e;const{selectBlock:o}=(0,i.useDispatch)("core/block-editor");return(0,r.useEffect)((()=>{n&&o(t)}),[o,n,t]),(0,r.createElement)(l.Z.Consumer,null,(e=>{let{selectedTab:t,stripeNudge:n}=e;return(0,r.createElement)("div",{hidden:"premium"===t.id,className:t.className},n,(0,r.createElement)(a.InnerBlocks,{templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscribe to get access","jetpack"),level:3}],["core/paragraph",{content:__("Read more of this content when you subscribe today.","jetpack")}],["premium-content/buttons"]]}))}))}))},76883:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(43279),a=n(54222),o=n(93068),i=n(47322),s=n(94333),l=n(9818),c=n(65736),u=n(72629);const __=c.__,p="premium-content/logged-out-view",d={title:__("Guest View","jetpack"),description:__("The container for all content shown to site visitors who are not subscribers.","jetpack"),icon:i.Z,category:"grow",parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:r.Z,save:a.Z,deprecated:o.Z},m=(0,l.subscribe)((()=>{const e=(0,l.select)("core/rich-text").getFormatType("core/link");if(!e)return;m(),(0,u.unregisterFormatType)("core/link");const t=(0,s.compose)((0,l.withSelect)((e=>({selectedBlock:e("core/block-editor").getSelectedBlock()}))),(0,s.ifCondition)((e=>e.selectedBlock&&e.selectedBlock.name!==p)))(e.edit);(0,u.registerFormatType)("core/link",{...e,edit:t})}))},54222:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},43110:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}}},19398:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(9818),s=n(52175);const __=o.__,l="web"===r.Platform.OS;const c=e=>{if(!(0,a.isObject)(e))return e;const t=(0,a.pickBy)((0,a.mapValues)(e,c),a.identity);return(0,a.isEqual)(t,{})?void 0:t};function u(e){let{settings:t,clientId:n,enableContrastChecking:a=!0}=e;const{getComputedStyle:o,Node:i}=window,[c,u]=(0,r.useState)(),[p,d]=(0,r.useState)(),m=l?__("Color settings","jetpack"):__("Color Settings","jetpack",0);return(0,r.useEffect)((()=>{if(l&&!a)return;const e=function(e){return document.getElementById("block-"+e)}(n);if(!e)return;d(o(e).color);let t=e,r=o(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===i.ELEMENT_NODE;)t=t.parentNode,r=o(t).backgroundColor;u(r)})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(s.__experimentalPanelColorGradientSettings,{title:m,initialOpen:!1,settings:t},l&&a&&(0,r.createElement)(s.ContrastChecker,{backgroundColor:c,textColor:p})))}t.Z=function(e){var t,n,a;const{attributes:o}=e,{colors:l,gradients:p}=(0,i.useSelect)((e=>e("core/block-editor").getSettings()),[]),d=(0,r.useRef)(o);(0,r.useEffect)((()=>{d.current=o}),[o]);const{style:m,textColor:h,backgroundColor:f,gradient:g}=o;let b;var v;b=g?(0,s.getGradientValueBySlug)(p,g):null==m||null===(v=m.color)||void 0===v?void 0:v.gradient;const k=t=>n=>{var r,a;const o=(0,s.getColorObjectByColorValue)(l,n),i=t+"Color",u={...d.current.style,color:{...null===(r=d.current)||void 0===r||null===(a=r.style)||void 0===a?void 0:a.color,[t]:null!=o&&o.slug?void 0:n}},p=null!=o&&o.slug?o.slug:void 0,m={style:c(u),[i]:p};e.setAttributes(m),d.current={...d.current,...m}};return(0,r.createElement)(u,{enableContrastChecking:!(g||null!=m&&null!==(t=m.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[{label:__("Text Color","jetpack"),onColorChange:k("text"),colorValue:(0,s.getColorObjectByAttributeValues)(l,h,null==m||null===(n=m.color)||void 0===n?void 0:n.text).color},{label:__("Background Color","jetpack"),onColorChange:k("background"),colorValue:(0,s.getColorObjectByAttributeValues)(l,f,null==m||null===(a=m.color)||void 0===a?void 0:a.background).color,gradientValue:b,onGradientChange:t=>{const n=(0,s.getGradientSlugByValue)(p,t);let r;if(n){var a,o,i;const e={...null===(a=d.current)||void 0===a?void 0:a.style,color:{...null===(o=d.current)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.color,gradient:void 0}};r={style:c(e),gradient:n}}else{var l,u,m;const e={...null===(l=d.current)||void 0===l?void 0:l.style,color:{...null===(u=d.current)||void 0===u||null===(m=u.style)||void 0===m?void 0:m.color,gradient:t}};r={style:c(e),gradient:void 0}}e.setAttributes(r),d.current={...d.current,...r}}}]})}},97209:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(89105),a=n.n(r),o=n(52175);function i(e){var t,n,r,i,s,l,c,u,p,d;const{backgroundColor:m,textColor:h,gradient:f,style:g}=e,b=(0,o.getColorClassName)("background-color",m),v=(0,o.__experimentalGetGradientClass)(f),k=(0,o.getColorClassName)("color",h),y=a()(k,v,{[b]:!(null!=g&&null!==(t=g.color)&&void 0!==t&&t.gradient||!b),"has-text-color":h||(null==g||null===(n=g.color)||void 0===n?void 0:n.text),"has-background":m||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(i=g.color)||void 0===i?void 0:i.gradient)});return{className:y||void 0,style:null!=g&&null!==(s=g.color)&&void 0!==s&&s.background||null!=g&&null!==(l=g.color)&&void 0!==l&&l.text||null!=g&&null!==(c=g.color)&&void 0!==c&&c.gradient?{background:null!=g&&null!==(u=g.color)&&void 0!==u&&u.gradient?g.color.gradient:void 0,backgroundColor:null!=g&&null!==(p=g.color)&&void 0!==p&&p.background?g.color.background:void 0,color:null!=g&&null!==(d=g.color)&&void 0!==d&&d.text?g.color.text:void 0}:{}}}},48186:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(65736),l=n(97209);const __=s.__;t.Z={attributes:{text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},save:e=>{let{attributes:t}=e;const{borderRadius:n,text:a}=t,s=(0,l.Z)(t),c=o()("wp-block-button__link",s.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...s.style};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:c,style:u,value:a}))}}},87909:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(19398),u=n(97209);const __=i.__;function p(e){let{borderRadius:t="",setAttributes:n}=e;const a=(0,r.useCallback)((e=>{n({borderRadius:e})}),[n]);return(0,r.createElement)(s.PanelBody,{title:__("Border settings","jetpack")},(0,r.createElement)(s.RangeControl,{value:t,label:__("Border radius","jetpack"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:a}))}t.Z=function(e){const{attributes:t,setAttributes:n,className:a}=e,{borderRadius:i,text:s}=t,d=(0,u.Z)(t),m=(0,l.useBlockProps)({className:"wp-block-button"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",m,(0,r.createElement)(l.RichText,{placeholder:__("Add text…","jetpack"),value:s,onChange:e=>n({text:e}),withoutInteractiveFormatting:!0,className:o()(a,"wp-block-button__link",d.className,{"no-border-radius":0===i}),style:{borderRadius:i?i+"px":void 0,...d.style}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.Z,e),(0,r.createElement)(p,{borderRadius:i,setAttributes:n})))}},37436:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(25389),a=n(65736),o=n(87909),i=n(54662),s=n(43110),l=n(48186);const __=a.__,c="premium-content/login-button",u={title:__("Premium Content login button","jetpack"),description:__("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","jetpack"),category:"grow",attributes:s.Z,icon:r.Z,keywords:[__("link","jetpack")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],edit:o.Z,save:i.Z,deprecated:[l.Z]}},54662:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(97209);function l(e){let{attributes:t}=e;const{borderRadius:n,text:a,align:l}=t,c=(0,s.Z)(t),u=o()("wp-block-button","wp-block-premium-content-login-button",{alignleft:"left"===l},{aligncenter:"center"===l},{alignright:"right"===l}),p=o()("wp-block-button__link",c.className,{"no-border-radius":0===n}),d={borderRadius:n?n+"px":void 0,...c.style},m=i.useBlockProps.save({className:u});return(0,r.createElement)("div",m,(0,r.createElement)(i.RichText.Content,{tagName:"a",className:p,style:d,value:a}))}},77940:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-container"},(0,r.createElement)(a.InnerBlocks.Content,null))}},37915:function(e,t,n){"use strict";var r=n(54682);t.Z=[r.Z]},54682:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view"})}},6627:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(65736),i=n(9818),s=n(94333),l=n(2963);const __=o.__;t.Z=(0,s.compose)([(0,i.withSelect)(((e,t)=>{const{getBlockParents:n,getSelectedBlockClientId:r}=e("core/block-editor"),a=n(r());return{parentClientId:a.length?a[a.length-1]:void 0,hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length}}))])((function(e){let{hasInnerBlocks:t,parentClientId:n,isSelected:o}=e;const{selectBlock:s}=(0,i.useDispatch)("core/block-editor");return(0,r.useEffect)((()=>{o&&s(n)}),[s,o,n]),(0,r.createElement)(l.Z.Consumer,null,(e=>{let{selectedTab:n,stripeNudge:o}=e;return(0,r.createElement)("div",{hidden:"wall"===n.id,className:n.className},o,(0,r.createElement)(a.InnerBlocks,{renderAppender:!t&&a.InnerBlocks.ButtonBlockAppender,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscriber Content","jetpack"),level:3}],["core/paragraph",{content:__("Add content here that will only be visible to your subscribers.","jetpack")}]]}))}))}))},24720:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(6627),a=n(2718),o=n(37915),i=n(47322),s=n(65736);const __=s.__,l="premium-content/subscriber-view",c={title:__("Subscriber View","jetpack"),description:__("The container for all content shown to subscribers.","jetpack"),icon:i.Z,category:"grow",attributes:{},edit:r.Z,save:a.Z,parent:["premium-content/container"],supports:{inserter:!1,html:!1},deprecated:o.Z}},2718:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},96440:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(55609),l=n(39630);const __=o.__,c=e=>{let{id:t,setRating:n,children:a}=e;return(0,r.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(o=t,e=>{let{keyCode:t}=e;return t===l.ENTER?n(o):null}),onClick:(e=>()=>n(e))(t)},a);var o};t.Z=e=>function(t){let{className:n,setAttributes:o,attributes:{align:l,color:u,rating:p,maxRating:d}}=t;const m=e=>{e===p?Math.ceil(p)===p&&(e-=.5):.5===p&&1===e&&(e=0),o({rating:e})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(i.AlignmentToolbar,{value:l,onChange:e=>o({align:e})})),(0,r.createElement)("div",{className:n,style:{textAlign:l}},(0,a.range)(1,d+1).map((t=>(0,r.createElement)(c,{key:t,id:t,setRating:m},(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t-.5?null:"is-rating-unfilled",color:u})),(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t?null:"is-rating-unfilled",color:u})))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.RangeControl,{label:__("Highest rating","jetpack"),value:d,onChange:e=>o({maxRating:e}),min:2,max:10}),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:u,onChange:e=>o({color:e}),label:__("Color","jetpack")}]}))))}},9615:function(e,t,n){"use strict";n.d(t,{d:function(){return o},r:function(){return i}});var r=n(69307),a=n(55609);const o=()=>(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})),i=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),n=(e=>e&&e.className?e.className:"")(e);return(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,r.createElement)(a.Path,{className:n,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"}))}},84807:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(65736),a=n(96440),o=n(2027),i=n(9615),s=n(57535);const __=r.__,_x=r._x,l="rating-star",c={title:__("Star Rating","jetpack"),description:__("Rate movies, books, songs, recipes — anything you can put a number on.","jetpack"),icon:{src:i.d,foreground:(0,s.m)()},keywords:[_x("star","block search term","jetpack"),_x("rating","block search term","jetpack"),_x("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:_x("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:_x("Outlined","block style","jetpack")}],attributes:{rating:{type:"number",default:1},maxRating:{type:"number",default:5},color:{type:"string"},align:{type:"string",default:"left"}},edit:(0,a.Z)(i.r),save:(0,o.Z)("★")}},2027:function(e,t,n){"use strict";var r=n(69307),a=n(92819);t.Z=e=>function(t){let{className:n,attributes:{align:o,rating:i,color:s}}=t;return(0,r.createElement)("figure",{className:n,style:{textAlign:o}},(0,a.range)(1,i+1).map((t=>(0,r.createElement)("span",{key:t,style:{color:s}},e))))}},79642:function(e,t,n){"use strict";n.d(t,{G:function(){return u},J:function(){return p}});var r=n(69307),a=n(65736),o=n(55609),i=n(4096),s=n(51591),l=n(48721),c=n(37930);const __=a.__;function u(e){let{attributes:{planId:t},products:n,setMembershipAmount:a}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Payment plan","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Payment plan","jetpack"),value:t,onChange:e=>a(e),options:n.map((e=>({label:(0,l.C)(e),value:e.id,key:e.id})))})),(0,r.createElement)(o.PanelBody,{title:__("Management","jetpack")},(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,i.lQ)()}`},__("See your earnings, subscriber list, and payment plans.","jetpack"))))}function p(e){let{connected:t,connectURL:n,hasUpgradeNudge:a,shouldUpgrade:i}=e;const{autosaveAndRedirect:l}=(0,c.Z)(n);return(0,r.createElement)(r.Fragment,null,!a&&!i&&!t&&(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{icon:s.Pw,onClick:l,className:"connect-stripe components-tab-button"},__("Connect Stripe","jetpack"))))}},2235:function(e,t,n){"use strict";var r=n(92819),a=n(4981);const o=["submitButtonText","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{planId:{type:"integer"},submitButtonText:{type:"string"},submitButtonClasses:{type:"string"},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},align:{type:"string"}},migrate:e=>{const t=(0,r.omit)(e,o),n={text:(i=e).submitButtonText,textColor:i.textButtonColor,customTextColor:i.customTextButtonColor,backgroundColor:i.backgroundButtonColor,customBackgroundColor:i.customBackgroundButtonColor};var i;return[t,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"recurring-payments-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,o),Boolean),save:()=>null}},39035:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(86989),c=n.n(l),u=n(65736),p=n(78850),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(92694),b=n(4096),v=n(17882),k=n(2368),y=n(82163),E=n(79642),w=n(48721);const __=u.__;class _ extends o.Component{constructor(){super(...arguments),a()(this,"componentDidMount",(()=>{this.apiCall()})),a()(this,"onError",(e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)})),a()(this,"apiCall",(()=>{const e={path:"/wpcom/v2/memberships/status",method:"GET"};c()(e).then((e=>{if(e.errors&&Object.values(e.errors)&&Object.values(e.errors)[0][0])return this.setState({connected:null,connectURL:2}),void this.onError(Object.values(e.errors)[0][0]);const{connect_url:t,products:n,should_upgrade_to_access_memberships:r,upgrade_url:a}=e,o=e.connected_account_id?1:2;this.setState({connected:o,connectURL:t,shouldUpgrade:r,upgradeURL:a,products:(0,y.ME)(n)})}),(e=>{this.setState({connected:2,connectURL:null}),this.onError(e.message)}))})),a()(this,"handleCurrencyChange",(e=>{let t=this.state.editedProductPrice;(0,v.vs)(e,t)||(t=(0,w.w)((0,v.hj)(e),e)),this.setState({editedProductCurrency:e,editedProductPrice:t,editedProductPriceValid:!0})})),a()(this,"handleRenewIntervalChange",(e=>this.setState({editedProductRenewInterval:e}))),a()(this,"handlePriceChange",(e=>{const t=parseFloat(e),n=(0,v.vs)(this.state.editedProductCurrency,t);this.setState({editedProductPrice:t,editedProductPriceValid:n})})),a()(this,"handleTitleChange",(e=>this.setState({editedProductTitle:e,editedProductTitleValid:e.length>0}))),a()(this,"saveProduct",(()=>{if(!this.state.editedProductTitle||0===this.state.editedProductTitle.length)return void this.setState({editedProductTitleValid:!1});if(!this.state.editedProductPrice||!(0,v.vs)(this.state.editedProductCurrency,this.state.editedProductPrice))return void this.setState({editedProductPriceValid:!1});this.setState({addingMembershipAmount:2});const e={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:this.state.editedProductCurrency,price:this.state.editedProductPrice,title:this.state.editedProductTitle,interval:this.state.editedProductRenewInterval}};c()(e).then((e=>{this.setState({addingMembershipAmount:0,products:this.state.products.concat([{id:e.id,title:e.title,interval:e.interval,price:e.price,currency:e.currency}])}),this.setMembershipAmount(e.id)}),(e=>{this.setState({addingMembershipAmount:1}),this.onError(e.message)}))})),a()(this,"renderAddMembershipAmount",(e=>{if(0===this.state.addingMembershipAmount&&!e)return(0,o.createElement)(h.Button,{isPrimary:!0,isLarge:!0,onClick:()=>this.setState({addingMembershipAmount:1})},__("Add a payment plan","jetpack"));if(2===this.state.addingMembershipAmount)return;const t=(0,p.ZP)((0,v.hj)(this.state.editedProductCurrency),this.state.editedProductCurrency),n=(0,u.sprintf)(
37
  /* translators: placeholder is a price. */
38
  __("Minimum allowed price is %s.","jetpack"),t);return(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"membership-button__price-container"},(0,o.createElement)(h.SelectControl,{className:"membership-button__field membership-button__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:v.Xy,value:this.state.editedProductCurrency}),(0,o.createElement)("div",{className:"membership-membership-button__field membership-button__field-price"},(0,o.createElement)(h.TextControl,{label:__("Price","jetpack"),className:s()({"membership-button__field-error":!this.state.editedProductPriceValid}),onChange:this.handlePriceChange,placeholder:t,required:!0,min:"0",step:"1",type:"number",value:this.state.editedProductPrice||""}),(0,o.createElement)("p",null,n))),(0,o.createElement)(h.TextControl,{className:s()({"membership-button__field":!0,"membership-button__field-error":!this.state.editedProductTitleValid}),label:__("Describe your subscription in a few words","jetpack"),onChange:this.handleTitleChange,placeholder:__("Subscription description","jetpack"),value:this.state.editedProductTitle}),(0,o.createElement)(h.SelectControl,{label:__("Renew interval","jetpack"),onChange:this.handleRenewIntervalChange,options:[{label:__("Monthly","jetpack"),value:"1 month"},{label:__("Yearly","jetpack"),value:"1 year"},{label:__("One-Time Payment","jetpack"),value:"one-time"}],value:this.state.editedProductRenewInterval}),(0,o.createElement)("div",null,(0,o.createElement)(h.Button,{isPrimary:!0,isLarge:!0,className:"membership-button__field-button membership-button__add-amount",onClick:this.saveProduct},__("Add this payment plan","jetpack")),(0,o.createElement)(h.Button,{isLarge:!0,className:"membership-button__field-button",onClick:()=>this.setState({addingMembershipAmount:0})},__("Cancel","jetpack"))))})),a()(this,"getFormattedPriceByProductId",(e=>{const t=this.state.products.filter((t=>parseInt(t.id)===parseInt(e))).pop();return(0,p.ZP)(parseFloat(t.price),t.currency)})),a()(this,"setMembershipAmount",(e=>{const{innerButtons:t,updateBlockAttributes:n,setAttributes:r}=this.props,a=this.props.attributes.planId,o=(0,u.sprintf)(
39
  /* translators: placeholder is an amount of money. */
@@ -45,11 +45,11 @@ __("%s / month","jetpack"),t):"1 year"===e.interval?(0,r.sprintf)(
45
  /* translators: placeholder is a price. */
46
  __("%s / year","jetpack"),t):"one-time"===e.interval?t:(0,r.sprintf)(
47
  /* translators: %1$s is a price, %2$s is a period (1 year for example) */
48
- __("%1$s / %2$s","jetpack"),t,e.interval)}},14823:function(e,t,n){"use strict";n.d(t,{Hj:function(){return i},AP:function(){return s}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{attributes:t,setAttributes:n}=e;const{displayContext:a,displayDate:i,displayThumbnails:s,postsToShow:l}=t;return(0,r.createElement)(o.PanelBody,{title:__("Related Posts Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display thumbnails","jetpack"),checked:s,onChange:e=>n({displayThumbnails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display date","jetpack"),checked:i,onChange:e=>n({displayDate:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:a,onChange:e=>n({displayContext:e})}),(0,r.createElement)(o.RangeControl,{label:__("Number of posts","jetpack"),value:l,onChange:e=>n({postsToShow:Math.min(e,6)}),min:1,max:6}))}function s(e){let{attributes:t,setAttributes:n}=e;const{postLayout:a}=t,i=[{icon:"grid-view",title:__("Grid View","jetpack"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===a},{icon:"list-view",title:__("List View","jetpack"),onClick:()=>n({postLayout:"list"}),isActive:"list"===a}];return(0,r.createElement)(o.ToolbarGroup,{controls:i})}},31759:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(92819),l=n(9818),c=n(94333),u=n(14823);const __=a.__;function p(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link"},e.isInSiteEditor?__("Preview unavailable in site editor.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")),e.displayThumbnails&&(0,r.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack")},(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200"},(0,r.createElement)("title",null,__("Grey square","jetpack")),(0,r.createElement)(i.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("title",null,__("Icon for image","jetpack")),(0,r.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}))),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},__("August 3, 2018","jetpack")),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},__("In “Uncategorized”","jetpack")))}function d(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank"},e.post.title),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,r.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},(0,r.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},e.post.context))}function m(e){const t="jp-related-posts-i2__row";let n=0;const a=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:n=2;break;default:n=3}return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(0,n).length},e.posts.slice(0,n)),a&&(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(n).length},e.posts.slice(n)))}class h extends r.Component{render(){const{attributes:e,className:t,posts:n,setAttributes:a,instanceId:i,isInSiteEditor:s}=this.props,{displayContext:l,displayDate:c,displayThumbnails:h,postLayout:f,postsToShow:g}=e,b="jp-relatedposts-i2",v=[];for(let e=0;e<g;e++)n[e]?v.push((0,r.createElement)(d,{id:`related-posts-${i}-post-${e}`,key:b+"-"+e,post:n[e],displayThumbnails:h,displayDate:c,displayContext:l})):v.push((0,r.createElement)(p,{id:`related-posts-${i}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:h,displayDate:c,displayContext:l,isInSiteEditor:s}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(u.Hj,{attributes:e,setAttributes:a})),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u.AP,{attributes:e,setAttributes:a})),(0,r.createElement)("div",{className:t,id:`related-posts-${i}`},(0,r.createElement)("div",{className:b,"data-layout":f},(0,r.createElement)(m,{posts:v}))))}}t.ZP=(0,c.compose)(c.withInstanceId,(0,l.withSelect)((e=>{const{getCurrentPost:t}=e("core/editor"),n=t();return{posts:(0,s.get)(n,"jetpack-related-posts",[]),isInSiteEditor:(0,s.isEmpty)(n)}})))(h)},32051:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(31759),s=n(57535);const __=a.__,_x=a._x,l="related-posts",c=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},(0,r.createElement)(o.Path,{d:"M4,4 L4,19 M4,4 L19,4 M4,9 L19,9 M4,14 L19,14 M4,19 L19,19 M9,4 L9,19 M19,4 L19,19"}))),u={title:__("Related Posts","jetpack"),icon:{src:c,foreground:(0,s.m)()},category:"embed",keywords:[_x("similar content","block search term","jetpack"),_x("linked","block search term","jetpack"),_x("connected","block search term","jetpack")],attributes:{postLayout:{type:"string",default:"grid"},displayDate:{type:"boolean",default:!0},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},postsToShow:{type:"number",default:3}},supports:{html:!1,multiple:!1,reusable:!1},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},edit:i.ZP,save:()=>null,example:{attributes:{postLayout:"grid",displayDate:!0,displayThumbnails:!0,displayContext:!1,postsToShow:2}}}},35978:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(9818),u=n(89105),p=n.n(u),d=n(46314),m=n(57368);const __=i.__,_n=i._n,h=[{value:d.FV,label:__("Show after threshold","jetpack")},{value:d.Am,label:__("Show before threshold","jetpack")}];class f extends o.Component{constructor(){super(...arguments),a()(this,"state",{isThresholdValid:!0}),a()(this,"setCriteria",(e=>this.props.setAttributes({criteria:e}))),a()(this,"setThreshold",(e=>{if(/^\d+$/.test(e)&&+e>0)return this.props.setAttributes({threshold:+e}),void this.setState({isThresholdValid:!0});this.setState({isThresholdValid:!1})}))}getNoticeLabel(){return this.props.attributes.criteria===d.FV?1===this.props.attributes.threshold?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,i.sprintf)(
49
  /* translators: placeholder is a number. */
50
  _n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold):1===this.props.attributes.threshold?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,i.sprintf)(
51
  /* translators: placeholder is a number. */
52
- _n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold)}render(){return(0,o.createElement)("div",{className:p()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,o.createElement)(s.Placeholder,{icon:m.qv,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,o.createElement)(s.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,o.createElement)(s.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:h,onChange:this.setCriteria})),(0,o.createElement)(s.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,o.createElement)(l.InnerBlocks,null))}}t.Z=(0,c.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(f)},42860:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks.Content,null))}},46314:function(e,t,n){"use strict";n.d(t,{FV:function(){return r},Am:function(){return a},Kv:function(){return o}});const r="after-visits",a="before-visits",o=3},57368:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},qv:function(){return d},Xd:function(){return m}});var r=n(69307),a=n(65736),o=n(55609),i=n(41632),s=n(35978),l=n(42860),c=n(46314),u=n(57535);const __=a.__,_x=a._x,p="repeat-visitor",d=(0,i.Z)((0,r.createElement)(o.Path,{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),m={attributes:{criteria:{type:"string",default:c.FV},threshold:{type:"number",default:c.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:d,foreground:(0,u.m)()},keywords:[_x("return","block search term","jetpack"),_x("visitors","block search term","jetpack"),_x("visibility","block search term","jetpack")],supports:{html:!1},title:__("Repeat Visitor","jetpack"),edit:s.Z,save:l.Z,example:{attributes:{criteria:c.FV,threshold:c.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]}}},92826:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={revueUsername:{type:"string"},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0}}},26246:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(4981),i=n(65736);const _x=i._x,__=i.__,s=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius","gradient","customGradient"];t.Z={attributes:{revueUsername:{type:"string"},text:{type:"string",default:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},migrate:e=>{const t=(0,a.omit)(e,s),n=(0,a.pick)(e,s);return[t,[(0,o.createBlock)("jetpack/button",{element:"button",text:n.text||"Subscribe",...n})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,s),Boolean),save:e=>{let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)("a",{href:n},n))}}},55380:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(92819),o=n(4096),i=n(52175),s=n(55609),l=n(65736),c=n(8223),u=n(92826),p=n(80500),d=n(93641),m=n(14087);const __=l.__;function h(e){let{attributes:t,className:n,setAttributes:l}=e;(0,r.useEffect)((()=>{const e=(0,m.S)(u.Z,t);(0,a.isEqual)(e,t)||l(e)}),[t,l]);const{revueUsername:h,emailLabel:f,emailPlaceholder:g,firstNameLabel:b,firstNamePlaceholder:v,firstNameShow:k,lastNameLabel:y,lastNamePlaceholder:E,lastNameShow:w}=t,[_,C]=(0,r.useState)("");(0,r.useEffect)((()=>{!_&&h&&C(h)}),[]);const j=(0,o.Wp)()||(0,o.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/revue-block/":"https://jetpack.com/support/jetpack-blocks/revue-block/";return(0,r.createElement)("div",{className:n},!h&&(0,r.createElement)(s.Placeholder,{icon:d.Z,instructions:__("Enter your Revue username.","jetpack"),label:__("Revue","jetpack")},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),l({revueUsername:_.trim()})}},(0,r.createElement)("input",{className:"components-placeholder__input",onChange:e=>C(e.target.value.trim()),placeholder:__("Enter your Revue username here…","jetpack"),type:"text",value:_}),(0,r.createElement)("div",null,(0,r.createElement)(s.Button,{disabled:!_,isDefault:!0,isLarge:!0,isSecondary:!0,type:"submit"},__("Add Form","jetpack")))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(s.ExternalLink,{href:j},__("Need help finding your Revue username?","jetpack")))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{label:__("Show first name field.","jetpack"),checked:k,onChange:()=>l({firstNameShow:!k})}),(0,r.createElement)(s.ToggleControl,{label:__("Show last name field.","jetpack"),checked:w,onChange:()=>l({lastNameShow:!w})}),(0,r.createElement)(s.TextControl,{label:__("Revue Username","jetpack"),onChange:e=>{C(e.trim()),l({revueUsername:e.trim()})},value:h}))),(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:f,labelFieldName:"emailLabel",required:!0,setAttributes:l}),onChange:e=>l({emailPlaceholder:e}),placeholder:g,value:g}),k&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:b,labelFieldName:"firstNameLabel",setAttributes:l}),onChange:e=>l({firstNamePlaceholder:e}),placeholder:v,value:v}),w&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:y,labelFieldName:"lastNameLabel",setAttributes:l}),onChange:e=>l({lastNamePlaceholder:e}),placeholder:E,value:E}),(0,r.createElement)(i.InnerBlocks,{template:[[c.Ss.name,c.Ss.attributes]],templateLock:"all"})))}},93641:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,{fillRule:"nonzero"},(0,r.createElement)(a.Path,{d:"M16.8452322,23.2301186 C13.9471277,22.2565366 12.0226052,20.2188069 10.6188359,16.5961763 C10.2565728,15.6225943 9.87166831,14.4905223 9.80374399,14.1056178 C9.66789534,13.4037331 9.6452539,13.3810917 8.96601067,13.6075061 C7.8792215,13.9697691 7.76601429,14.1282592 7.35846835,15.758443 C6.724508,18.2490015 6.45281071,18.7244718 5.56979451,18.8829619 C5.09432424,18.9735276 4.5735711,18.9282447 4.27923236,18.7697547 C3.84904498,18.5433402 3.8037621,18.3848502 3.93961075,17.501834 C4.00753507,16.9584394 4.41508101,15.3056142 4.82262695,13.8339205 C5.8414918,10.2792143 6.11318909,8.98865211 6.29432062,7.1094125 C6.43016927,5.63771883 6.47545215,5.50187018 7.08677106,5.20753145 C7.92450438,4.79998551 8.80752058,5.09432424 9.19242508,5.88677468 C9.44148093,6.38488639 9.39619805,6.90563953 8.96601067,8.98865211 C8.67167193,10.3924215 8.51318185,11.5244935 8.62638905,11.5244935 C9.12450076,11.5244935 11.2754377,10.2565728 12.0452467,9.50940525 C13.8339205,7.83393861 14.2641079,5.77356748 13.2905259,3.82640354 C12.5886412,2.4226342 11.6150593,1.94716393 9.78110255,2.08301258 C6.97356385,2.28678555 4.43772245,4.25659092 3.01131166,7.35846835 C2.21886123,9.05657643 2.19621978,9.07921787 1.49433511,8.94336923 C-1.74339096,8.28676744 0.63396035,3.39621616 5.29809721,1.19999638 C8.39997464,-0.294338734 11.5018521,-0.362263057 14.0829764,0.950940525 C17.0716466,2.51319996 18.0225871,5.93205756 16.2791961,8.96601067 C15.5999529,10.1433656 14.2641079,11.3886449 12.9509043,12.0678881 C12.5433584,12.2716611 12.2037367,12.5207169 12.2037367,12.6339241 C12.2037367,12.9509043 13.2678845,15.9395745 13.6301475,16.6641006 C14.3093908,17.9773042 16.2339133,19.8112609 17.4565511,20.377297 C18.8829619,21.0112573 21.4640861,21.0791816 23.0263456,20.5131456 L23.9772861,20.1508826 L23.9772861,20.7169186 C23.9772861,21.5320105 23.3433258,22.3471023 22.3018195,22.8904969 C21.147106,23.4791744 18.1584357,23.6603059 16.8452322,23.2301186 Z"})))},8223:function(e,t,n){"use strict";n.d(t,{Ss:function(){return u},u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(92826),o=n(26246),i=n(55380),s=n(93641),l=n(57535),c=n(12628);const __=r.__,_x=r._x,u={name:"jetpack/button",attributes:{element:"button",text:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")}},p="revue",d={title:__("Revue","jetpack"),description:__("Add a subscription form for your Revue newsletter.","jetpack"),icon:{src:s.Z,foreground:(0,l.m)()},category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("mailing list","block search term","jetpack")],supports:{html:!1},attributes:a.Z,edit:i.Z,save:c.Z,example:{attributes:{revueUsername:"example"},innerBlocks:[u]},deprecated:[o.Z]}},12628:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null),(0,r.createElement)("a",{className:"wp-block-jetpack-revue__fallback",href:n},n))}},37161:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},93636:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(37161),l=n(1720),c=n(41632),u=n(57535);const __=a.__,_x=a._x,p="send-a-message",d={title:__("Send A Message","jetpack"),description:__("Let your visitors send you messages with the tap of a button.","jetpack"),icon:{src:(0,c.Z)((0,r.createElement)(i.Path,{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"})),foreground:(0,u.m)()},category:"grow",keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1},attributes:{},edit:s.Z,save:e=>(0,r.createElement)("div",{className:e.className},(0,r.createElement)(o.InnerBlocks.Content,null)),variations:l.Z,example:{}}},64566:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});const r=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲 +237",value:"237CM"},{code:"CV",label:"🇨🇻 +238",value:"238CV"},{code:"ST",label:"🇸🇹 +239",value:"239ST"},{code:"GQ",label:"🇬🇶 +240",value:"240GQ"},{code:"GA",label:"🇬🇦 +241",value:"241GA"},{code:"CG",label:"🇨🇬 +242",value:"242CG"},{code:"CD",label:"🇨🇩 +243",value:"243CD"},{code:"AO",label:"🇦🇴 +244",value:"244AO"},{code:"GW",label:"🇬🇼 +245",value:"245GW"},{code:"IO",label:"🇮🇴 +246",value:"246IO"},{code:"SC",label:"🇸🇨 +248",value:"248SC"},{code:"SD",label:"🇸🇩 +249",value:"249SD"},{code:"RW",label:"🇷🇼 +250",value:"250RW"},{code:"ET",label:"🇪🇹 +251",value:"251ET"},{code:"SO",label:"🇸🇴 +252",value:"252SO"},{code:"DJ",label:"🇩🇯 +253",value:"253DJ"},{code:"KE",label:"🇰🇪 +254",value:"254KE"},{code:"TZ",label:"🇹🇿 +255",value:"255TZ"},{code:"UG",label:"🇺🇬 +256",value:"256UG"},{code:"BI",label:"🇧🇮 +257",value:"257BI"},{code:"MZ",label:"🇲🇿 +258",value:"258MZ"},{code:"ZM",label:"🇿🇲 +260",value:"260ZM"},{code:"MG",label:"🇲🇬 +261",value:"261MG"},{code:"YT",label:"🇾🇹 +262",value:"262YT"},{code:"RE",label:"🇷🇪 +262",value:"262RE"},{code:"ZW",label:"🇿🇼 +263",value:"263ZW"},{code:"NA",label:"🇳🇦 +264",value:"264NA"},{code:"MW",label:"🇲🇼 +265",value:"265MW"},{code:"LS",label:"🇱🇸 +266",value:"266LS"},{code:"BW",label:"🇧🇼 +267",value:"267BW"},{code:"SZ",label:"🇸🇿 +268",value:"268SZ"},{code:"KM",label:"🇰🇲 +269",value:"269KM"},{code:"ZA",label:"🇿🇦 +27",value:"27ZA"},{code:"SH",label:"🇸🇭 +290",value:"290SH"},{code:"ER",label:"🇪🇷 +291",value:"291ER"},{code:"AW",label:"🇦🇼 +297",value:"297AW"},{code:"FO",label:"🇫🇴 +298",value:"298FO"},{code:"GL",label:"🇬🇱 +299",value:"299GL"},{code:"GR",label:"🇬🇷 +30",value:"30GR"},{code:"NL",label:"🇳🇱 +31",value:"31NL"},{code:"BE",label:"🇧🇪 +32",value:"32BE"},{code:"FR",label:"🇫🇷 +33",value:"33FR"},{code:"ES",label:"🇪🇸 +34",value:"34ES"},{code:"KY",label:"🇰🇾 +345",value:"345KY"},{code:"GI",label:"🇬🇮 +350",value:"350GI"},{code:"PT",label:"🇵🇹 +351",value:"351PT"},{code:"LU",label:"🇱🇺 +352",value:"352LU"},{code:"IE",label:"🇮🇪 +353",value:"353IE"},{code:"IS",label:"🇮🇸 +354",value:"354IS"},{code:"AL",label:"🇦🇱 +355",value:"355AL"},{code:"MT",label:"🇲🇹 +356",value:"356MT"},{code:"CY",label:"🇨🇾 +357",value:"357CY"},{code:"FI",label:"🇫🇮 +358",value:"358FI"},{code:"BG",label:"🇧🇬 +359",value:"359BG"},{code:"HU",label:"🇭🇺 +36",value:"36HU"},{code:"LT",label:"🇱🇹 +370",value:"370LT"},{code:"LV",label:"🇱🇻 +371",value:"371LV"},{code:"EE",label:"🇪🇪 +372",value:"372EE"},{code:"MD",label:"🇲🇩 +373",value:"373MD"},{code:"AM",label:"🇦🇲 +374",value:"374AM"},{code:"BY",label:"🇧🇾 +375",value:"375BY"},{code:"AD",label:"🇦🇩 +376",value:"376AD"},{code:"MC",label:"🇲🇨 +377",value:"377MC"},{code:"SM",label:"🇸🇲 +378",value:"378SM"},{code:"VA",label:"🇻🇦 +379",value:"379VA"},{code:"UA",label:"🇺🇦 +380",value:"380UA"},{code:"RS",label:"🇷🇸 +381",value:"381RS"},{code:"ME",label:"🇲🇪 +382",value:"382ME"},{code:"XK",label:"🇽🇰 +383",value:"383XK"},{code:"HR",label:"🇭🇷 +385",value:"385HR"},{code:"SI",label:"🇸🇮 +386",value:"386SI"},{code:"BA",label:"🇧🇦 +387",value:"387BA"},{code:"MK",label:"🇲🇰 +389",value:"389MK"},{code:"IT",label:"🇮🇹 +39",value:"39IT"},{code:"RO",label:"🇷🇴 +40",value:"40RO"},{code:"CH",label:"🇨🇭 +41",value:"41CH"},{code:"CZ",label:"🇨🇿 +420",value:"420CZ"},{code:"SK",label:"🇸🇰 +421",value:"421SK"},{code:"LI",label:"🇱🇮 +423",value:"423LI"},{code:"AT",label:"🇦🇹 +43",value:"43AT"},{code:"IM",label:"🇮🇲 +44",value:"44IM"},{code:"GG",label:"🇬🇬 +44",value:"44GG"},{code:"JE",label:"🇯🇪 +44",value:"44JE"},{code:"GB",label:"🇬🇧 +44",value:"44GB"},{code:"DK",label:"🇩🇰 +45",value:"45DK"},{code:"SE",label:"🇸🇪 +46",value:"46SE"},{code:"NO",label:"🇳🇴 +47",value:"47NO"},{code:"SJ",label:"🇸🇯 +47",value:"47SJ"},{code:"PL",label:"🇵🇱 +48",value:"48PL"},{code:"DE",label:"🇩🇪 +49",value:"49DE"},{code:"FK",label:"🇫🇰 +500",value:"500FK"},{code:"GS",label:"🇬🇸 +500",value:"500GS"},{code:"BZ",label:"🇧🇿 +501",value:"501BZ"},{code:"GT",label:"🇬🇹 +502",value:"502GT"},{code:"SV",label:"🇸🇻 +503",value:"503SV"},{code:"HN",label:"🇭🇳 +504",value:"504HN"},{code:"NI",label:"🇳🇮 +505",value:"505NI"},{code:"CR",label:"🇨🇷 +506",value:"506CR"},{code:"PA",label:"🇵🇦 +507",value:"507PA"},{code:"PM",label:"🇵🇲 +508",value:"508PM"},{code:"HT",label:"🇭🇹 +509",value:"509HT"},{code:"PE",label:"🇵🇪 +51",value:"51PE"},{code:"MX",label:"🇲🇽 +52",value:"52MX"},{code:"CU",label:"🇨🇺 +53",value:"53CU"},{code:"AR",label:"🇦🇷 +54",value:"54AR"},{code:"BR",label:"🇧🇷 +55",value:"55BR"},{code:"CL",label:"🇨🇱 +56",value:"56CL"},{code:"CO",label:"🇨🇴 +57",value:"57CO"},{code:"VE",label:"🇻🇪 +58",value:"58VE"},{code:"BL",label:"🇧🇱 +590",value:"590BL"},{code:"MF",label:"🇲🇫 +590",value:"590MF"},{code:"GP",label:"🇬🇵 +590",value:"590GP"},{code:"BO",label:"🇧🇴 +591",value:"591BO"},{code:"GY",label:"🇬🇾 +592",value:"592GY"},{code:"EC",label:"🇪🇨 +593",value:"593EC"},{code:"GF",label:"🇬🇫 +594",value:"594GF"},{code:"PY",label:"🇵🇾 +595",value:"595PY"},{code:"MQ",label:"🇲🇶 +596",value:"596MQ"},{code:"SR",label:"🇸🇷 +597",value:"597SR"},{code:"UY",label:"🇺🇾 +598",value:"598UY"},{code:"MY",label:"🇲🇾 +60",value:"60MY"},{code:"CC",label:"🇨🇨 +61",value:"61CC"},{code:"AU",label:"🇦🇺 +61",value:"61AU"},{code:"CX",label:"🇨🇽 +61",value:"61CX"},{code:"ID",label:"🇮🇩 +62",value:"62ID"},{code:"PH",label:"🇵🇭 +63",value:"63PH"},{code:"NZ",label:"🇳🇿 +64",value:"64NZ"},{code:"SG",label:"🇸🇬 +65",value:"65SG"},{code:"TH",label:"🇹🇭 +66",value:"66TH"},{code:"TL",label:"🇹🇱 +670",value:"670TL"},{code:"NF",label:"🇳🇫 +672",value:"672NF"},{code:"BN",label:"🇧🇳 +673",value:"673BN"},{code:"NR",label:"🇳🇷 +674",value:"674NR"},{code:"PG",label:"🇵🇬 +675",value:"675PG"},{code:"TO",label:"🇹🇴 +676",value:"676TO"},{code:"SB",label:"🇸🇧 +677",value:"677SB"},{code:"VU",label:"🇻🇺 +678",value:"678VU"},{code:"FJ",label:"🇫🇯 +679",value:"679FJ"},{code:"PW",label:"🇵🇼 +680",value:"680PW"},{code:"WF",label:"🇼🇫 +681",value:"681WF"},{code:"CK",label:"🇨🇰 +682",value:"682CK"},{code:"NU",label:"🇳🇺 +683",value:"683NU"},{code:"WS",label:"🇼🇸 +685",value:"685WS"},{code:"KI",label:"🇰🇮 +686",value:"686KI"},{code:"NC",label:"🇳🇨 +687",value:"687NC"},{code:"TV",label:"🇹🇻 +688",value:"688TV"},{code:"PF",label:"🇵🇫 +689",value:"689PF"},{code:"TK",label:"🇹🇰 +690",value:"690TK"},{code:"FM",label:"🇫🇲 +691",value:"691FM"},{code:"MH",label:"🇲🇭 +692",value:"692MH"},{code:"RU",label:"🇷🇺 +7",value:"7RU"},{code:"KZ",label:"🇰🇿 +77",value:"77KZ"},{code:"JP",label:"🇯🇵 +81",value:"81JP"},{code:"KR",label:"🇰🇷 +82",value:"82KR"},{code:"VN",label:"🇻🇳 +84",value:"84VN"},{code:"KP",label:"🇰🇵 +850",value:"850KP"},{code:"HK",label:"🇭🇰 +852",value:"852HK"},{code:"MO",label:"🇲🇴 +853",value:"853MO"},{code:"KH",label:"🇰🇭 +855",value:"855KH"},{code:"LA",label:"🇱🇦 +856",value:"856LA"},{code:"CN",label:"🇨🇳 +86",value:"86CN"},{code:"PN",label:"🇵🇳 +872",value:"872PN"},{code:"BD",label:"🇧🇩 +880",value:"880BD"},{code:"TW",label:"🇹🇼 +886",value:"886TW"},{code:"TR",label:"🇹🇷 +90",value:"90TR"},{code:"IN",label:"🇮🇳 +91",value:"91IN"},{code:"PK",label:"🇵🇰 +92",value:"92PK"},{code:"AF",label:"🇦🇫 +93",value:"93AF"},{code:"LK",label:"🇱🇰 +94",value:"94LK"},{code:"MM",label:"🇲🇲 +95",value:"95MM"},{code:"MV",label:"🇲🇻 +960",value:"960MV"},{code:"LB",label:"🇱🇧 +961",value:"961LB"},{code:"JO",label:"🇯🇴 +962",value:"962JO"},{code:"SY",label:"🇸🇾 +963",value:"963SY"},{code:"IQ",label:"🇮🇶 +964",value:"964IQ"},{code:"KW",label:"🇰🇼 +965",value:"965KW"},{code:"SA",label:"🇸🇦 +966",value:"966SA"},{code:"YE",label:"🇾🇪 +967",value:"967YE"},{code:"OM",label:"🇴🇲 +968",value:"968OM"},{code:"PS",label:"🇵🇸 +970",value:"970PS"},{code:"AE",label:"🇦🇪 +971",value:"971AE"},{code:"IL",label:"🇮🇱 +972",value:"972IL"},{code:"BH",label:"🇧🇭 +973",value:"973BH"},{code:"QA",label:"🇶🇦 +974",value:"974QA"},{code:"BT",label:"🇧🇹 +975",value:"975BT"},{code:"MN",label:"🇲🇳 +976",value:"976MN"},{code:"NP",label:"🇳🇵 +977",value:"977NP"},{code:"IR",label:"🇮🇷 +98",value:"98IR"},{code:"TJ",label:"🇹🇯 +992",value:"992TJ"},{code:"TM",label:"🇹🇲 +993",value:"993TM"},{code:"AZ",label:"🇦🇿 +994",value:"994AZ"},{code:"GE",label:"🇬🇪 +995",value:"995GE"},{code:"KG",label:"🇰🇬 +996",value:"996KG"},{code:"UZ",label:"🇺🇿 +998",value:"998UZ"}]},1720:function(e,t,n){"use strict";var r=n(65736),a=n(22823),o=n(32220);const __=r.__,i=[{isDefault:!0,name:"whatsapp-button",title:__("WhatsApp Button","jetpack"),description:__("Let your visitors send you messages on WhatsApp with the tap of a button.","jetpack"),icon:(0,o.p)("send-a-message",a.Z),innerBlocks:[["jetpack/whatsapp-button",{}]]}];t.Z=i},87165:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={countryCode:{type:"string"},phoneNumber:{type:"string"},firstMessage:{type:"string",default:__("Hi, I got your WhatsApp information from your website.","jetpack")},buttonText:{type:"array",source:"children",selector:"a.whatsapp-block__button",default:__("Chat on WhatsApp","jetpack")},backgroundColor:{type:"string",default:"#25D366"},colorClass:{type:"string",default:"dark"},openInNewTab:{type:"boolean",default:!1}}},93374:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(39630),l=n(64566),c=n(41632),u=n(22985);const __=a.__,_x=a._x,p="#25D366",d="#465B64";function m(e){let{attributes:t,setAttributes:n,context:a}=e;const{countryCode:m,phoneNumber:h,firstMessage:f,openInNewTab:g,backgroundColor:b}=t,[v,k]=(0,r.useState)(!0),y=()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{label:__("Phone Number","jetpack"),help:__("Enter the phone number you use for WhatsApp and would like to be contacted on.","jetpack"),className:"jetpack-whatsapp-button__phonenumber"},(0,r.createElement)(o.SelectControl,{label:__("Country code","jetpack"),value:m,onChange:e=>n({countryCode:e}),options:l.n,hideLabelFromVision:!0}),(0,r.createElement)(o.TextControl,{placeholder:__("Your phone number…","jetpack"),onChange:e=>{n({phoneNumber:e}),0===e.length&&k(!0),e.length>2&&k((e=>{const t=RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,"g");return!(void 0===e||e.length<1)&&t.test(m.replace(/\D/g,"")+e)})(e))},value:h}),!v&&(0,r.createElement)(u.Z,{isError:!0,className:"jetpack-whatsapp-error"},__("Please enter a valid phone number.","jetpack"))),"inspector"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.TextareaControl,{label:__("Default First Message","jetpack"),help:__("The default first message that will be sent by visitors when using this button.","jetpack"),value:f,onChange:e=>n({firstMessage:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Open in new tab","jetpack"),checked:g,onChange:e=>n({openInNewTab:e}),help:__("When the button is tapped, should a new tab be opened if the visitor does not have WhatsApp installed?","jetpack")})));return"toolbar"===a?(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.Dropdown,{position:"bottom right",className:"jetpack-whatsapp-button-settings-selector",contentClassName:"jetpack-whatsapp-button__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(o.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==s.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,c.Z)((0,r.createElement)(o.Path,{d:"M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"}))}))(t,n)},renderContent:y})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("WhatsApp Button Settings","jetpack"),initialOpen:!0},y()),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:b,onChange:e=>(e=>{if(n({backgroundColor:e}),void 0===e||e===p||e===d)return n({colorClass:"dark"});n({colorClass:"light"})})(e),label:__("Background Color","jetpack"),disableCustomColors:!0,colors:[{name:_x("WhatsApp Green","background color name","jetpack"),slug:"whatsapp-green",color:p},{name:_x("WhatsApp Dark","background color name","jetpack"),slug:"whatsapp-dark",color:d},{name:_x("WhatsApp Light","background color name","jetpack"),slug:"whatsapp-light",color:"#F4F4F4"},{name:_x("White","background color name","jetpack"),slug:"whatsapp-white",color:"#FFFFFF"}]}]}))}},11026:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(59770),l=n(87165);t.Z={attributes:l.Z,supports:{html:!1,reusable:!1},save:function(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,colorClass:u,buttonText:p,backgroundColor:d,openInNewTab:m}=t,h=m?"_blank":"_self",f=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",g=o()(n,u?"is-color-"+u:void 0,p.length?void 0:"has-no-text");return(0,r.createElement)("div",{className:g},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+f;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:d},target:h,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:p})))}}},60249:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(52175),l=n(64566),c=n(93374);function u(e){let{attributes:t,setAttributes:n,className:a,clientId:u}=e;const{countryCode:p,buttonText:d,colorClass:m,backgroundColor:h}=t,{selectBlock:f}=(0,i.useDispatch)("core/block-editor"),g=(0,r.useCallback)((async()=>{n({countryCode:"1"});const e=await fetch("https://public-api.wordpress.com/geo/").then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json();l.n.forEach((e=>{e.code===t.country_short&&n({countryCode:e.value})}))}}),[n]);(0,r.useEffect)((()=>{void 0===p&&(g(),f(u))}),[u,p,g,f]);return(0,r.createElement)("div",{className:o()(a,m?"is-color-"+m:void 0)},(0,r.createElement)(s.BlockControls,null,(0,r.createElement)(c.Z,{context:"toolbar",setAttributes:n,attributes:t})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(c.Z,{context:"inspector",setAttributes:n,attributes:t})),(0,r.createElement)(s.RichText,{placeholder:d.default,value:d,onChange:e=>n({buttonText:e}),withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:h,color:"dark"===m?"#fff":"#465B64"}}))}},22823:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(57535);t.Z=(0,r.createElement)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,r.createElement)(a.Path,{fill:(0,o.m)(),d:"M24,11.6909333 C24,18.1477333 18.7256,23.3818667 12.2181333,23.3818667 C10.1522667,23.3818667 8.21146667,22.8538667 6.52293333,21.9272 L0,24 L2.12666667,17.7274667 C1.05386667,15.9658667 0.436,13.8997333 0.436,11.6909333 C0.436,5.23413333 5.71093333,0 12.2181333,0 C18.7261333,0 24,5.23413333 24,11.6909333 Z M12.2181333,1.86186667 C6.75573333,1.86186667 2.31253333,6.2712 2.31253333,11.6909333 C2.31253333,13.8416 3.0136,15.8333333 4.19946667,17.4536 L2.96186667,21.104 L6.76853333,19.8941333 C8.33253333,20.9210667 10.2061333,21.52 12.2184,21.52 C17.68,21.52 22.124,17.1112 22.124,11.6914667 C22.124,6.27173333 17.6802667,1.86186667 12.2181333,1.86186667 Z M18.1677333,14.3834667 C18.0949333,14.2642667 17.9026667,14.1922667 17.6141333,14.0490667 C17.3250667,13.9058667 15.9048,13.2122667 15.6408,13.1170667 C15.376,13.0216 15.1829333,12.9736 14.9906667,13.2602667 C14.7984,13.5472 14.2448,14.1922667 14.076,14.3834667 C13.9074667,14.5752 13.7392,14.5992 13.4501333,14.4557333 C13.1616,14.3125333 12.2312,14.0096 11.128,13.0336 C10.2696,12.2741333 9.68986667,11.3365333 9.52133333,11.0493333 C9.35306667,10.7626667 9.50373333,10.6077333 9.648,10.4650667 C9.77813333,10.3365333 9.93706667,10.1304 10.0813333,9.9632 C10.2261333,9.79573333 10.2741333,9.67653333 10.3698667,9.48506667 C10.4666667,9.29386667 10.4184,9.12666667 10.3458667,8.98293333 C10.2738667,8.83973333 9.69573333,7.4296 9.4552,6.85573333 C9.21466667,6.2824 8.9744,6.37786667 8.8056,6.37786667 C8.63733333,6.37786667 8.44453333,6.35386667 8.252,6.35386667 C8.05946667,6.35386667 7.7464,6.4256 7.4816,6.71226667 C7.21706667,6.9992 6.4712,7.69253333 6.4712,9.1024 C6.4712,10.5125333 7.5056,11.8749333 7.6504,12.0658667 C7.79466667,12.2568 9.64773333,15.2445333 12.5837333,16.392 C15.52,17.5389333 15.52,17.1562667 16.0496,17.1082667 C16.5786667,17.0605333 17.7578667,16.4152 17.9994667,15.7464 C18.2394667,15.0765333 18.2394667,14.5029333 18.1677333,14.3834667 Z"}))},59770:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},pf:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(57535),o=n(87165),i=n(60249),s=n(4114),l=n(11026),c=n(22823);const __=r.__,_x=r._x,u="whatsapp-button",p=__("WhatsApp Button","jetpack"),d="https://api.whatsapp.com/send?phone=",m=(__("Chat on WhatsApp","jetpack"),__("Hi, I got your WhatsApp information from your website.","jetpack"),{title:p,description:__("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:{src:c.Z,foreground:(0,a.m)()},category:"grow",parent:["jetpack/send-a-message"],keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1,reusable:!1,align:["left","center","right"]},attributes:o.Z,edit:i.Z,save:s.Z,example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}},deprecated:[l.Z]})},4114:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(59770);function l(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,buttonText:u,backgroundColor:p,colorClass:d,openInNewTab:m}=t,h=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",f=o()(n,d?"is-color-"+d:void 0,u.length?void 0:"has-no-text"),g=m?"_blank":"_self";return(0,r.createElement)("div",{className:f},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+h;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:p,color:"dark"===d?"#fff":"#465B64"},target:g,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:u})))}},96594:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(72067),s=n(32673),l=n(20489);const __=a.__,c="seo",u={render:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,null,(0,r.createElement)(o.PanelBody,{title:__("SEO Description","jetpack")},(0,r.createElement)(l.Z,null))),(0,r.createElement)(i.PluginPrePublishPanel,{initialOpen:!0,id:"seo-title",title:(0,r.createElement)("span",{id:"seo-defaults",key:"seo-title-span"},__("SEO Description","jetpack"))},(0,r.createElement)(l.Z,null)))}},20489:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(92819),c=n(9818);const __=i.__,_n=i._n;class u extends o.Component{constructor(){super(...arguments),a()(this,"onMessageChange",(e=>{this.props.updateSeoDescription(e.target.value)}))}render(){const{seoDescription:e}=this.props;return(0,o.createElement)("div",{className:"jetpack-seo-message-box"},(0,o.createElement)("textarea",{value:e,onChange:this.onMessageChange,placeholder:__("Write a description…","jetpack"),rows:4}),(0,o.createElement)("div",{className:"jetpack-seo-character-count"},(0,i.sprintf)(
53
  /* translators: Placeholder is a number of characters in a sentence. */
54
  _n("%d character","%d characters",e.length,"jetpack"),e.length)))}}t.Z=(0,s.compose)([(0,c.withSelect)((e=>({seoDescription:(0,l.get)(e("core/editor").getEditedPostAttribute("meta"),["advanced_seo_description"],"")}))),(0,c.withDispatch)((e=>({updateSeoDescription(t){e("core/editor").editPost({meta:{advanced_seo_description:t}})}})))])(u)},71730:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(92819),i=n(55609),s=n(9818),l=n(70609),c=n(32673);const __=a.__,u="shortlinks",p={render:()=>(0,r.createElement)(m,null)};class d extends r.Component{render(){const{shortlink:e}=this.props;return e?(0,r.createElement)(c.Z,null,(0,r.createElement)(i.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel"},(0,r.createElement)(l.Z,{link:e}))):null}}const m=(0,s.withSelect)((e=>{const t=e("core/editor").getCurrentPost();return{shortlink:(0,o.get)(t,"jetpack_shortlink","")}}))(d)},47175:function(e,t,n){"use strict";n.d(t,{LC:function(){return r},a7:function(){return a},Rh:function(){return o}});const r="jp_pay_product",a="USD",o=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},81255:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{setAttributes:t,postLinkText:n}=e;return(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(a.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>t({postLinkText:e}),value:n})))}},56511:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:e=>{let{attributes:t}=e;const{productId:n}=t;return n?(0,r.createElement)(r.RawHTML,null,`[simple-payment id="${n}"]`):null}}},75050:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(89453),c=n(92819),u=n(75139),p=n(65736),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(22985),b=n(87079),v=n(8565),k=n(37299),y=n(47175);const __=p.__,_n=p._n;class E extends o.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return y.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,u.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,k.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(
55
  /* translators: Placeholder is a number of decimals in a number. */
@@ -67,17 +67,17 @@ __("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_p
67
  /* translators: %d: Slide number. */
68
  __("Slide %d, currently selected","jetpack"),a+1):(0,i.sprintf)(
69
  /* translators: %d: Slide number. */
70
- __("Go to slide %d","jetpack"),a+1)),(0,r.createElement)(s.Button,{role:p?"presentation":"tab",key:a,className:o()("wp-story-pagination-bullet",{"wp-story-pagination-ellipsis":t}),"aria-label":d,"aria-disabled":p||l,onClick:p||l?void 0:u,disabled:p},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar"},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar-progress",style:{width:`${c}%`}})))}},9610:function(e,t,n){"use strict";n.d(t,{b:function(){return l},r:function(){return c}});var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i);const l=e=>{let{className:t,size:n,label:r,isPressed:i,...l}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":r,"aria-pressed":i,className:s()("jetpack-mdc-icon-button","circle-icon","outlined","bordered",t),style:{width:`${n}px`,height:`${n}px`}},l))},c=e=>{let{className:t,size:n=24,label:r,isPressed:i,...l}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":r,"aria-pressed":i,className:s()("jetpack-mdc-icon-button",t),style:{width:`${n}px`,height:`${n}px`}},l))}},1019:function(e,t,n){"use strict";var r=n(69307);t.Z=()=>(0,r.createElement)("div",{className:"wp-story-loading-spinner"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__outer"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__inner"})))},50281:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(9610),i=n(29089);const _x=a._x;function s(e){let{playing:t,muted:n,onPlayPressed:a,onMutePressed:s,showMute:l}=e;return(0,r.createElement)("div",{className:"wp-story-controls"},(0,r.createElement)(o.r,{isPressed:t,label:t?_x("pause","Button tooltip text","jetpack"):_x("play","Button tooltip text","jetpack",0),onClick:a},t?(0,r.createElement)(i.fp,null):(0,r.createElement)(i.o1,null)),l&&(0,r.createElement)(o.r,{isPressed:n,label:n?_x("unmute","Button tooltip text","jetpack"):_x("mute","Button tooltip text","jetpack",0),onClick:s},n?(0,r.createElement)(i.xb,null):(0,r.createElement)(i.MC,null)))}},40220:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(9610),i=n(29089);const __=a.__;function s(e){let{fullscreen:t,onExitFullscreen:n,siteIconUrl:a,storyTitle:s}=e;return t?(0,r.createElement)("div",{className:"wp-story-meta"},(0,r.createElement)("div",{className:"wp-story-icon"},(0,r.createElement)("img",{alt:__("Site icon","jetpack"),src:a,width:"40",height:"40"})),(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"wp-story-title"},s)),(0,r.createElement)(o.r,{className:"wp-story-exit-fullscreen",label:__("Exit Fullscreen","jetpack"),onClick:n},(0,r.createElement)(i.Tw,null))):null}},29089:function(e,t,n){"use strict";n.d(t,{o1:function(){return s},fp:function(){return l},Tw:function(){return c},MC:function(){return u},xb:function(){return p},JM:function(){return d},Vq:function(){return m}});var r=n(69307),a=n(55609),o=n(41632);const i=e=>{let{children:t,size:n}=e;return(0,o.Z)(t,n,n)},s=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M8 5v14l11-7z"}))},l=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}))},c=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))},u=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"}))},p=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"}))},d=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}))},m=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}))}},27870:function(e,t,n){"use strict";n.d(t,{gT:function(){return r.Z},ZX:function(){return a.Z},h4:function(){return o.Z},aV:function(){return i.Z},Aq:function(){return s.Z},WB:function(){return l.Z},pU:function(){return c.pU}});var r=n(85974),a=n(50281),o=n(40220),i=n(46531),s=n(18754),l=n(1019),c=n(64816);n(9610)},64816:function(e,t,n){"use strict";n.d(t,{pU:function(){return u}});var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i);const l=e=>{let{title:t,alt:n,className:r,id:a,mediaRef:i,mime:l,sizes:c,srcset:u,url:p}=e;return(0,o.createElement)("img",{ref:i,"data-id":a,"data-mime":l,title:t,alt:n,src:p,className:s()("wp-story-image",`wp-image-${a}`,r),srcSet:u,sizes:c})},c=e=>{let{title:t,className:n,id:r,mediaRef:a,mime:i,url:l,poster:c}=e;return(0,o.createElement)("video",{className:s()("wp-story-video","intrinsic-ignore",`wp-video-${r}`,n),ref:a,"data-id":r,title:t,type:i,src:l,poster:c,tabIndex:-1,preload:"auto",playsInline:!0})},u=e=>{let{targetAspectRatio:t,cropUpTo:n,type:r,width:i,height:s,...u}=e,p=null;if(i&&s){const e=i/s;if(e>=t){e>t/(1-n)||(p="wp-story-crop-wide")}else{e<t*(1-n)||(p="wp-story-crop-narrow")}}const d="video"===r||(u.mime||"").startsWith("video/");return(0,o.createElement)("figure",null,d?(0,o.createElement)(c,a()({},u,{className:p})):(0,o.createElement)(l,a()({},u,{className:p})))}},46531:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(48735),o=n.n(a),i=n(65736),s=n(9610),l=n(29089);const __=i.__;function c(e){let{ended:t,hasPrevious:n,onNextSlide:a,onPreviousSlide:c,icon:u,slideCount:p,showSlideCount:d}=e;const m=(0,r.useCallback)((e=>{t||(e.stopPropagation(),c())}),[c,t]),h=(0,r.useCallback)((e=>{t||(e.stopPropagation(),a())}),[a,t]);return(0,r.createElement)("div",{className:"wp-story-overlay"},d&&(0,r.createElement)("div",{className:"wp-story-embed-icon"},u,(0,r.createElement)("span",null,p)),!d&&(0,r.createElement)("div",{className:"wp-story-embed-icon-expand"},(0,r.createElement)(o(),{role:"img"})),n&&(0,r.createElement)("div",{className:"wp-story-prev-slide",onClick:m},(0,r.createElement)(s.b,{size:44,label:__("Previous Slide","jetpack"),className:"outlined-w"},(0,i.isRTL)()?(0,r.createElement)(l.Vq,{size:24}):(0,r.createElement)(l.JM,{size:24}))),(0,r.createElement)("div",{className:"wp-story-next-slide",onClick:h},(0,r.createElement)(s.b,{size:44,label:__("Next Slide","jetpack"),className:"outlined-w"},(0,i.isRTL)()?(0,r.createElement)(l.JM,{size:24}):(0,r.createElement)(l.Vq,{size:24}))))}},58871:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(89105),o=n.n(a),i=n(31158),s=n(29891),l=n(72096);const c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent);function u(e){let{className:t,fullscreenClassName:n,bodyFullscreenClassName:a,fullscreen:u,shadowDOM:p,onKeyDown:d,onExitFullscreen:m,playerQuerySelector:h,children:f}=e;const g=(0,r.useRef)(),b=(0,r.useRef)(),[v,k]=(0,r.useState)(null),y=c&&s.am(),E=u&&!y,w=u&&y;return(0,r.useLayoutEffect)((()=>{if(y)u?g.current&&s.uP(g.current,m):s.bG()&&s.JF();else if(u){if(k([document.documentElement.scrollLeft,document.documentElement.scrollTop]),document.body.classList.add(a),document.getElementsByTagName("html")[0].classList.add(a),b.current){const e=b.current.querySelector(h);e&&e.focus()}}else if(document.body.classList.remove(a),document.getElementsByTagName("html")[0].classList.remove(a),v){window.scrollTo(...v);const e=g.current.querySelector(h);e&&e.focus()}}),[u]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Z,p,(0,r.createElement)("div",{ref:g,className:o()(t,{[n]:w}),onKeyDown:d},!E&&f)),(0,r.createElement)(l.Z,{className:o()(t,{[n]:E}),isOpened:E,onRequestClose:m,shadowDOM:p,onKeyDown:E&&d,focusOnMount:!1,modalRef:b},E&&f))}},4045:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(9818),o=n(39630),i=(n(66930),n(54616)),s=n(58871);function l(e){let{id:t,slides:n,metadata:l,disabled:c,...u}=e;const p=(0,r.useMemo)((()=>t||Math.random().toString(36)),[t]),{init:d,setEnded:m,setPlaying:h,setFullscreen:f,showSlide:g}=(0,a.useDispatch)("jetpack/story/player"),{playing:b,currentSlideIndex:v,fullscreen:k,isReady:y,playerSettings:E}=(0,a.useSelect)((e=>{const{getCurrentSlideIndex:t,getSettings:n,isFullscreen:r,isPlayerReady:a,isPlaying:o}=e("jetpack/story/player");return a(p)?{playing:o(p),currentSlideIndex:t(p),isReady:!0,fullscreen:r(p),playerSettings:n(p)}:{isReady:!1}}),[p]);(0,r.useEffect)((()=>{y||d(p,{slideCount:n.length,...u})}),[y,p]);const w=(0,r.useCallback)((e=>{switch(e.keyCode){case o.ENTER:if(k)break;case o.SPACE:h(p,!b);break;case o.LEFT:v>0&&g(p,v-1);break;case o.RIGHT:v<n.length-1?g(p,v+1):m(p)}}),[p,v,k,b]),_=(0,r.useCallback)((()=>{f(p,!1)}),[p]);return y?(0,r.createElement)(s.Z,{shadowDOM:E.shadowDOM,className:"wp-story-app",fullscreenClassName:"wp-story-fullscreen",bodyFullscreenClassName:"wp-story-in-fullscreen",playerQuerySelector:".wp-story-container",fullscreen:k,onExitFullscreen:_,onKeyDown:w},(0,r.createElement)(i.Z,{id:p,slides:n,metadata:l,disabled:c})):null}},29891:function(e,t,n){"use strict";n.d(t,{am:function(){return r},bG:function(){return a},uP:function(){return o},JF:function(){return i}});const r=()=>document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled,a=()=>document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullScreenElement,o=(e,t)=>{if((e.requestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen).call(e),t){const e=()=>{document.fullscreenElement||(document.removeEventListener("fullscreenchange",e),t())};document.addEventListener("fullscreenchange",e)}},i=()=>(document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document)},31158:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307);const a=window&&window.Element&&window.Element.prototype.hasOwnProperty("attachShadow");function o(e){let{enabled:t,delegatesFocus:n=!1,mode:o="open",globalStyleElements:s=[],adoptedStyleSheets:l=null,mountOnElement:c=null,children:u}=e;const[p,d]=(0,r.useState)(null),m=c||p,[h,f]=(0,r.useState)(null),g="string"==typeof s?[...document.querySelectorAll(s)]:s,b=a&&t&&g.length>0,v=(0,r.useCallback)((e=>{null!==e&&d(e.parentNode)}),[]);if((0,r.useEffect)((()=>{if(!m)return;if(m.shadowRoot)return void f(m.shadowRoot);const e=m.attachShadow({delegatesFocus:n,mode:o});l&&(e.adoptedStyleSheets=l),f(e)}),[m]),b&&!h)return c?null:(0,r.createElement)("span",{ref:v});const k=(0,r.createElement)(r.Fragment,null,b&&(0,r.createElement)(i,{globalStyleElements:g}),u);return b?(0,r.createPortal)(k,h):k}function i(e){let{globalStyleElements:t}=e;return(0,r.createElement)(r.Fragment,null,t.map(((e,t)=>{let{id:n,tagName:a,attributes:o,innerHTML:i}=e;return"LINK"===a?(0,r.createElement)("link",{key:n||t,id:n,rel:o.rel.value,href:o.href.value}):"STYLE"===a?(0,r.createElement)("style",{key:n||t,id:n},i):void 0})))}},94292:function(e,t,n){"use strict";var r=n(69307);t.Z=e=>{const t=(0,r.useRef)(),n=(0,r.useRef)(),a=(0,r.useRef)(e),o=(0,r.useCallback)((e=>{e.touches&&1===e.touches.length&&e.preventDefault()}),[]);return(0,r.useEffect)((()=>{a.current=e}),[e]),{onTouchStart:(0,r.useCallback)((e=>{e.target&&(e.target.addEventListener("touchend",o,{passive:!1}),n.current=e.target),t.current=setTimeout((()=>{a.current&&a.current(!0),t.current=null}),200)}),[]),onTouchEnd:(0,r.useCallback)((e=>{t.current?clearTimeout(t.current):(a.current&&a.current(!1),e.stopPropagation()),n.current&&n.current.removeEventListener("touchend",o)}),[])}}},21531:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){const t=(0,r.useRef)(null),n=(0,r.useRef)(!1),a=(0,r.useRef)(e),o=(0,r.useRef)(e);return o.current=e,(0,r.useLayoutEffect)((()=>{e.forEach(((e,r)=>{const o=a.current[r];"function"==typeof e&&e!==o&&!1===n.current&&(o(null),e(t.current))})),a.current=e}),e),(0,r.useLayoutEffect)((()=>{n.current=!1})),(0,r.useCallback)((e=>{t.current=e,n.current=!0;(e?o.current:a.current).forEach((t=>{"function"==typeof t?t(e):t&&t.hasOwnProperty("current")&&(t.current=e)}))}),[])}},97524:function(e,t,n){"use strict";async function r(e){const t=e.tagName.toLowerCase();if("img"===t){if(e.complete)return;await new Promise((t=>{e.addEventListener("load",t,{once:!0})}))}else if("video"===t||"audio"===t){if(e.HAVE_ENOUGH_DATA===e.readyState)return;await new Promise((t=>{e.addEventListener("canplaythrough",t,{once:!0}),e.addEventListener("load",t,{once:!0}),e.HAVE_NOTHING===e.readyState&&e.networkState!==e.NETWORK_LOADING&&e.load()}))}}n.d(t,{Z:function(){return r}})},82295:function(e,t,n){"use strict";n.d(t,{BM:function(){return s},i1:function(){return l}});var r=n(92819);const a=new Set(["alert","status","log","marquee","timer"]);let o=[],i=!1;function s(e){if(i)return;const t=document.body.children;(0,r.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||a.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),o.push(t))})),i=!0}function l(){i&&((0,r.forEach)(o,(e=>{e.removeAttribute("aria-hidden")})),o=[],i=!1)}},97790:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(39630),o=n(94333),i=n(21531);function s(e){let{overlayClassName:t,children:n,className:s,focusOnMount:l,shouldCloseOnEsc:c=!0,onRequestClose:u,onKeyDown:p,modalRef:d}=e;const m=(0,o.useFocusOnMount)(l),h=(0,o.useConstrainedTabbing)(),f=(0,o.useFocusReturn)();return(0,r.createElement)("div",{className:t,onKeyDown:function(e){c&&e.keyCode===a.ESCAPE&&(e.stopPropagation(),u&&u(e)),e.target&&"button"===e.target.tagName.toLowerCase()&&e.keyCode===a.SPACE||p&&p(e)}},(0,r.createElement)("div",{className:s,ref:(0,i.Z)([h,f,m,d])},n))}},72096:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(94333),s=n(31158),l=n(97790),c=n(82295);let u,p=0;const d=()=>{};class m extends o.Component{constructor(e){super(e),this.prepareDOM()}componentDidMount(){p++,1===p&&this.openFirstModal()}componentWillUnmount(){p--,0===p&&this.closeLastModal(),this.cleanDOM()}prepareDOM(){u||(u=document.createElement("div"),document.body.appendChild(u)),this.node=document.createElement("div"),u.appendChild(this.node),this.node.ontouchstart=d,this.node.ontouchend=d}cleanDOM(){u.removeChild(this.node)}openFirstModal(){c.BM(u)}closeLastModal(){c.i1()}render(){const{children:e,isOpened:t,shadowDOM:n,...r}=this.props;return(0,o.createElement)(s.Z,a()({},n,{mountOnElement:this.node}),t&&(0,o.createElement)(l.Z,r,e))}}m.defaultProps={shouldCloseOnEsc:!0,isOpened:!1,focusOnMount:!0},t.Z=(0,i.withInstanceId)(m)},54616:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(92819),c=n(11313),u=n(94333),p=n(65736),d=n(9818),m=n(12378),h=n(96178),f=n(16019),g=n(27870),b=n(94292);const __=p.__;function v(e){let{id:t,slides:n,metadata:r,disabled:i}=e;const{setFullscreen:p,setEnded:v,setPlaying:k,setMuted:y,showSlide:E}=(0,d.useDispatch)("jetpack/story/player"),{playing:w,muted:_,currentSlideIndex:C,currentSlideEnded:j,ended:S,fullscreen:x,settings:P}=(0,d.useSelect)((e=>{const{getCurrentSlideIndex:n,getSettings:r,hasCurrentSlideEnded:a,hasEnded:o,isFullscreen:i,isMuted:s,isPlaying:l}=e("jetpack/story/player");return{playing:l(t),muted:s(t),currentSlideIndex:n(t),currentSlideEnded:a(t),ended:o(t),fullscreen:i(t),settings:r(t)}}),[t]),T=(0,o.useRef)(),[N,A]=(0,o.useState)(null),[I,{width:M,height:B}]=(0,u.useResizeObserver)(),[R,L]=(0,o.useState)(P.defaultAspectRatio),Z=(0,l.some)(n,(e=>(0,c.isBlobURL)(e.url))),D=e=>{E(t,e)},F=(0,o.useCallback)((()=>{i||x||P.playInFullscreen&&!w&&k(t,!0)}),[w,i,x]),{onTouchStart:O,onTouchEnd:z}=(0,b.Z)((e=>{k(t,!e)}),[]),U=(0,o.useCallback)((()=>{C>0&&D(C-1)}),[C]),$=(0,o.useCallback)((()=>{C<n.length-1?D(C+1):v(t)}),[C,n]),V=(0,o.useCallback)((()=>{p(t,!1)}),[]);let G,H;return(0,o.useEffect)((()=>{i&&w&&k(t,!1)}),[i,w]),(0,o.useEffect)((()=>{w&&j&&$()}),[w,j]),(0,o.useLayoutEffect)((()=>{if(!T.current)return;let e=Math.round(P.defaultAspectRatio*T.current.offsetHeight);x&&(e=Math.abs(1-e/M)<P.cropUpTo?M:e),A(e)}),[M,B,x]),(0,o.useLayoutEffect)((()=>{N&&T.current&&T.current.offsetHeight>0&&L(N/T.current.offsetHeight)}),[N]),G=x?[__("You are currently playing a story.","jetpack"),w?__("Press space to pause.","jetpack"):__("Press space to play.","jetpack",0),__("Press escape to exit.","jetpack")].join(" "):__("Play story","jetpack"),H=i?"presentation":x?"dialog":"button",(0,o.createElement)("div",{className:"wp-story-display-contents"},I,(0,o.createElement)("div",{role:H,"aria-label":G,tabIndex:x?-1:0,className:s()("wp-story-container",{"wp-story-with-controls":!i&&!x&&!P.playInFullscreen,"wp-story-fullscreen":x,"wp-story-ended":S,"wp-story-disabled":i,"wp-story-clickable":!i&&!x}),style:{maxWidth:`${N}px`},onClick:F,onTouchStart:O,onTouchEnd:z},(0,o.createElement)(g.h4,a()({},r,{fullscreen:x,onExitFullscreen:V})),(0,o.createElement)("div",{ref:T,className:"wp-story-wrapper"},n.map(((e,n)=>(0,o.createElement)(m.Z,{playerId:t,key:n,media:e,index:n,playing:!i&&w,uploading:Z,settings:P,targetAspectRatio:R})))),(0,o.createElement)(g.aV,{icon:h.Z,slideCount:n.length,showSlideCount:P.showSlideCount,ended:S,hasPrevious:C>0,onPreviousSlide:U,onNextSlide:$}),P.showProgressBar&&(0,o.createElement)(f.ZP,{playerId:t,slides:n,disabled:!x,onSlideSeek:D,maxBullets:x?P.maxBulletsFullscreen:P.maxBullets}),(0,o.createElement)(g.ZX,{playing:w,muted:_,onPlayPressed:()=>k(t,!w),onMutePressed:()=>y(t,!_),showMute:(e=>{const t=e<n.length?n[e]:null;return!!t&&("video"===t.type||(t.mime||"").startsWith("video/"))})(C)})),x&&(0,o.createElement)(g.Aq,{currentMedia:P.blurredBackground&&n.length>C&&n[C]}))}},16019:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(27870),i=n(9818);const s=e=>{let{key:t,playerId:n,index:a,disabled:s,isSelected:l,onClick:c}=e;const u=(0,i.useSelect)((e=>e("jetpack/story/player").getCurrentSlideProgressPercentage(n)),[]);return(0,r.createElement)(o.gT,{key:t,index:a,progress:u,disabled:s,isSelected:l,onClick:c})};t.ZP=e=>{let{playerId:t,slides:n,disabled:l,onSlideSeek:c,maxBullets:u}=e;const{currentSlideIndex:p}=(0,i.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t)})),[]),d=Math.min(n.length,u),m=Math.floor(d/2);let h,f=0,g=n.length-1;return n.length<=u||p<m?(h=p,g=d-1):p>=n.length-m?(h=p-n.length+d,f=n.length-d):(h=m,f=p-m,g=p+m),(0,r.createElement)("div",{className:"wp-story-pagination wp-story-pagination-bullets",role:"tablist"},f>0&&(0,r.createElement)(o.gT,{key:"bullet-0",index:f-1,progress:100,isEllipsis:!0}),(0,a.range)(1,d+1).map(((e,n)=>{const a=n+f;let i=null;if(a<p)i=100;else{if(!(a>p))return(0,r.createElement)(s,{playerId:t,key:`bullet-${n}`,index:a,disabled:l,isSelected:h===n,onClick:()=>c(a)});i=0}return(0,r.createElement)(o.gT,{key:`bullet-${n}`,index:a,progress:i,disabled:l,isSelected:h===n,onClick:()=>c(a)})})),g<n.length-1&&(0,r.createElement)(o.gT,{key:`bullet-${d+1}`,index:g+1,progress:0,isEllipsis:!0}))}},12378:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(97524),s=n(89105),l=n.n(s),c=n(9818),u=n(27870);t.Z=e=>{let{playerId:t,media:n,index:r,playing:s,uploading:p,settings:d,targetAspectRatio:m}=e;const{currentSlideIndex:h,buffering:f}=(0,c.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t),buffering:e("jetpack/story/player").isBuffering(t)})),[]),{slideReady:g}=(0,c.useDispatch)("jetpack/story/player"),b=r===h,v=(0,o.useRef)(null),[k,y]=(0,o.useState)(!1),[E,w]=(0,o.useState)(!0);return(0,o.useEffect)((()=>{if(b&&!E){const e=v.current&&v.current.src&&"video"===v.current.tagName.toLowerCase()?v.current:null;g(t,v.current,e?e.duration:d.imageTime)}}),[b,E]),(0,o.useEffect)((()=>{r<=h+(s?1:0)&&y(!0)}),[s,h]),(0,o.useLayoutEffect)((()=>{v.current&&(0,i.Z)(v.current).then((()=>{w(!1)}))}),[k,p]),(0,o.createElement)(o.Fragment,null,b&&(E||p||f)&&(0,o.createElement)("div",{className:l()("wp-story-slide","is-loading",{transparent:s&&f,"semi-transparent":p||!s&&f})},(0,o.createElement)(u.WB,null)),(0,o.createElement)("div",{role:"figure",className:"wp-story-slide",style:{display:b&&!E?"block":"none"},tabIndex:b?0:-1},k&&(0,o.createElement)(u.pU,a()({},n,{targetAspectRatio:m,cropUpTo:d.cropUpTo,index:r,mediaRef:v}))))}},46192:function(e,t,n){"use strict";function r(e,t){return{type:"SET_MUTED",value:t,playerId:e}}function a(e,t){return{type:"SET_PLAYING",value:t,playerId:e}}function o(e,t){return{type:"SHOW_SLIDE",index:t,playerId:e}}function i(e,t,n){return{type:"SLIDE_READY",mediaElement:t,duration:n,playerId:e}}function s(e,t){return{type:"SET_CURRENT_SLIDE_PROGRESS",value:t,playerId:e}}function l(e){return{type:"RESET_CURRENT_SLIDE_PROGRESS",playerId:e}}function c(e){return{type:"SET_CURRENT_SLIDE_ENDED",playerId:e}}function u(e,t){return{type:"SET_FULLSCREEN",playerId:e,fullscreen:t}}function p(e){return{type:"ENDED",playerId:e}}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"INIT",playerId:e,settings:t}}function m(e,t){return{type:"SET_BUFFERING",value:t,playerId:e}}n.r(t),n.d(t,{setMuted:function(){return r},setPlaying:function(){return a},showSlide:function(){return o},slideReady:function(){return i},setCurrentSlideProgress:function(){return s},resetCurrentSlideProgress:function(){return l},setCurrentSlideEnded:function(){return c},setFullscreen:function(){return u},setEnded:function(){return p},init:function(){return d},setBuffering:function(){return m}})},58571:function(e,t,n){"use strict";n.d(t,{XO:function(){return r},Qz:function(){return a},H2:function(){return o}});const r={currentTime:0,duration:null,timeout:null,lastUpdate:null},a={progress:r,index:0,mediaElement:null,duration:null,ended:!1,ready:!1},o={slideCount:0,currentSlide:a,previousSlide:null,muted:!1,playing:!1,ended:!1,buffering:!1,fullscreen:!1,settings:{imageTime:5,startMuted:!1,playInFullscreen:!0,playOnNextSlide:!0,playOnLoad:!1,exitFullscreenOnEnd:!0,loadInFullscreen:!1,blurredBackground:!0,showSlideCount:!1,showProgressBar:!0,shadowDOM:{enabled:!0,mode:"open",globalStyleElements:'#jetpack-block-story-css, link[href*="jetpack/_inc/blocks/story/view.css"]'},defaultAspectRatio:.5625,cropUpTo:.2,volume:.8,maxBullets:7,maxBulletsFullscreen:14}}},83566:function(e,t,n){"use strict";var r=n(46192),a=n(96494);const o=e=>e&&e.src&&"video"===e.tagName.toLowerCase();function i(e,t){const{getState:n}=t,r=e.playerId,i=(0,a.isMuted)(n(),r),s=(0,a.isPlaying)(n(),r),l=(0,a.getCurrentMediaElement)(n(),r),c=(0,a.getPreviousSlideMediaElement)(n(),r),u=(0,a.getSettings)(n(),r);o(c)&&(c.currentTime=0,c.onwaiting=null,c.onplaying=null,c.pause()),o(l)&&(i!==l.muted&&(l.muted=i,i||(l.volume=u.volume)),s?l.play():l.pause())}function s(e,t){const{getState:n,dispatch:i}=t,l=e.playerId,c=(0,a.isCurrentSlideReady)(n(),l),u=(0,a.isPlaying)(n(),l),p=(0,a.getCurrentSlideProgress)(n(),l);if(clearTimeout(p.timeout),!u||!c)return void(p.lastUpdate&&i((0,r.setCurrentSlideProgress)(l,{...p,lastUpdate:null})));const d=(0,a.getCurrentMediaElement)(n(),l),m=(0,a.getCurrentMediaDuration)(n(),l),h=p.lastUpdate?Date.now()-p.lastUpdate:100,f=o(d)?d.currentTime:p.currentTime+h/1e3;if(f>=m){i((0,r.setCurrentSlideEnded)(l));const e=(0,a.getSlideCount)(n(),l);(0,a.getCurrentSlideIndex)(n(),l)===e-1&&i((0,r.setEnded)(l))}else i((0,r.setCurrentSlideProgress)(l,{timeout:setTimeout((()=>s(e,t)),100),lastUpdate:Date.now(),duration:m,currentTime:f}))}t.Z={SET_PLAYING:[s,i],SLIDE_READY:[function(e,t){const{getState:n,dispatch:i}=t,s=e.playerId,l=(0,a.getCurrentMediaElement)(n(),s);if(!o(l))return;const c=(0,a.getCurrentSlideProgress)(n(),s);0===l.currentTime&&c.currentTime>0&&(l.currentTime=c.currentTime),l.onwaiting=()=>i((0,r.setBuffering)(s,!0)),l.onplaying=()=>i((0,r.setBuffering)(s,!1))},s,i],SET_MUTED:i,SHOW_SLIDE:i}},66930:function(e,t,n){"use strict";var r=n(9818),a=n(46192),o=n(96494),i=n(36978),s=n(2814);const l=(0,r.registerStore)("jetpack/story/player",{actions:a,reducer:s.Z,selectors:o});(0,i.Z)(l)},36978:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2601),a=n.n(r),o=n(92819),i=n(83566);function s(e){const t=[a()(i.Z)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return r=t.map((e=>e(s))),n=(0,o.flowRight)(...r)(e.dispatch),e.dispatch=n,e}},2814:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(58571);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.H2,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_SLIDE":{const n=e.currentSlide===t.index+1;return{...e,currentSlide:{...a.Qz,index:t.index},previousSlide:e.currentSlide,playing:n?e.settings.playOnNextSlide:e.playing}}case"SLIDE_READY":return{...e,buffering:!1,currentSlide:{...e.currentSlide,mediaElement:t.mediaElement,duration:t.duration,ready:!0},previousSlide:null};case"SET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:t.value}};case"SET_CURRENT_SLIDE_ENDED":return{...e,currentSlide:{...e.currentSlide,ended:!0}};case"RESET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:{...a.XO}}};case"SET_MUTED":return{...e,muted:t.value};case"SET_PLAYING":{const n=t.value&&e.ended;return{...e,playing:t.value,buffering:!!t.value&&e.buffering,fullscreen:!e.playing&&t.value?e.settings.playInFullscreen:e.fullscreen,ended:!n&&e.ended,currentSlide:n?{...a.Qz,index:0}:e.currentSlide,previousSlide:n?null:e.previousSlide}}case"SET_BUFFERING":return{...e,buffering:t.value};case"SET_FULLSCREEN":return{...e,fullscreen:t.fullscreen,playing:!(e.fullscreen&&!t.fullscreen&&e.settings.playInFullscreen)&&e.playing};case"INIT":{const n=(0,r.merge)({},e.settings,t.settings);return{...e,settings:n,playing:n.playOnLoad,fullscreen:n.loadInFullscreen}}case"ENDED":return{...e,currentSlide:{...a.Qz,index:e.settings.slideCount-1,progress:{...a.XO,currentTime:100,duration:100}},ended:!0,playing:!1,fullscreen:!e.settings.exitFullscreenOnEnd}}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.playerId?{...e,[t.playerId]:o(e[t.playerId],t)}:e}},96494:function(e,t,n){"use strict";function r(e,t){return!!e[t]}function a(e,t){return e[t].currentSlide.index}function o(e,t){return e[t].currentSlide.progress}function i(e,t){const n=e[t].currentSlide.progress.currentTime,r=e[t].currentSlide.progress.duration,a=Math.round(100*n/r);return a>=100?100:a}function s(e,t){return e[t].playing}function l(e,t){return e[t].muted}function c(e,t){return e[t].buffering}function u(e,t){return e[t].currentSlide.mediaElement}function p(e,t){return e[t].currentSlide.duration}function d(e,t){return e[t].currentSlide.ended}function m(e,t){return e[t].currentSlide.ready}function h(e,t){var n;return null===(n=e[t].previousSlide)||void 0===n?void 0:n.mediaElement}function f(e,t){return e[t].fullscreen}function g(e,t){return e[t].ended}function b(e,t){return e[t].settings}function v(e,t){return e[t].settings.slideCount}n.r(t),n.d(t,{isPlayerReady:function(){return r},getCurrentSlideIndex:function(){return a},getCurrentSlideProgress:function(){return o},getCurrentSlideProgressPercentage:function(){return i},isPlaying:function(){return s},isMuted:function(){return l},isBuffering:function(){return c},getCurrentMediaElement:function(){return u},getCurrentMediaDuration:function(){return p},hasCurrentSlideEnded:function(){return d},isCurrentSlideReady:function(){return m},getPreviousSlideMediaElement:function(){return h},isFullscreen:function(){return f},hasEnded:function(){return g},getSettings:function(){return b},getSlideCount:function(){return v}})},1436:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:o()("wp-story",t)})}},79885:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},87138:function(e,t,n){"use strict";n.d(t,{G0:function(){return r},Gp:function(){return a},S9:function(){return o},VF:function(){return i},K3:function(){return s},XJ:function(){return l},xV:function(){return c},bK:function(){return u},HE:function(){return p},Tr:function(){return d},pC:function(){return m},FP:function(){return h},tm:function(){return f}});const r=0,a=50,o=0,i=0,s=15,l=1,c=5,u=50,p=15,d=0,m=50,h=10,f="16px"},45643:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(4096),l=n(80790),c=n(87138);const __=a.__;function u(e){let{buttonBackgroundColor:t,borderColor:n,buttonGradient:a,borderRadius:u,borderWeight:p,buttonOnNewLine:d,emailFieldBackgroundColor:m,fallbackButtonBackgroundColor:h,fallbackTextColor:f,fontSize:g,isGradientAvailable:b,padding:v,setAttributes:k,setButtonBackgroundColor:y,setTextColor:E,showSubscribersTotal:w,spacing:_,subscriberCount:C,textColor:j,buttonWidth:S,successMessage:x}=e;return(0,r.createElement)(r.Fragment,null,b&&(0,r.createElement)(i.__experimentalPanelColorGradientSettings,{title:__("Color Settings","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:t.color,onColorChange:y,gradientValue:a.gradientValue,onGradientChange:a.setGradient,label:__("Button Background Color","jetpack")},{colorValue:j.color,onColorChange:E,label:__("Button Text Color","jetpack")},{colorValue:n.color,onColorChange:e=>{k({borderColor:e,customBorderColor:e})},label:__("Border Color","jetpack")}],initialOpen:!0},(0,r.createElement)(i.ContrastChecker,{fontSize:g.size,textColor:j.color,backgroundColor:m.color,fallbackButtonBackgroundColor:h,fallbackTextColor:f})),!b&&(0,r.createElement)(i.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:t.color,onChange:y,label:__("Button Background Color","jetpack")},{value:j.color,onChange:E,label:__("Button Text Color","jetpack")},{value:n.color,onColorChange:e=>{k({borderColor:e,customBorderColor:e})},label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(i.ContrastChecker,{fontSize:g.size,textColor:j.color,backgroundColor:m.color,fallbackButtonBackgroundColor:h,fallbackTextColor:f})),(0,r.createElement)(o.PanelBody,{title:__("Text Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(i.FontSizePicker,{withSlider:!0,value:g.size,onChange:e=>{const t=e||c.tm;k({fontSize:t,customFontSize:t})}})),(0,r.createElement)(o.PanelBody,{title:__("Border Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(o.RangeControl,{value:u,label:__("Border Radius","jetpack"),min:c.G0,max:c.Gp,initialPosition:c.S9,allowReset:!0,onChange:e=>k({borderRadius:e})}),(0,r.createElement)(o.RangeControl,{value:p,label:__("Border Weight","jetpack"),min:c.VF,max:c.K3,initialPosition:c.XJ,allowReset:!0,onChange:e=>k({borderWeight:e})})),(0,r.createElement)(o.PanelBody,{title:__("Spacing Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(o.RangeControl,{value:v,label:__("Space Inside","jetpack"),min:c.xV,max:c.bK,initialPosition:c.HE,allowReset:!0,onChange:e=>k({padding:e})}),(0,r.createElement)(o.RangeControl,{value:_,label:__("Space Between","jetpack"),min:c.Tr,max:c.pC,initialPosition:c.FP,allowReset:!0,onChange:e=>k({spacing:e})}),(0,r.createElement)(l.h,{width:S,onChange:e=>k({buttonWidth:e})})),(0,r.createElement)(o.PanelBody,{title:__("Display Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(o.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:w,onChange:()=>{k({showSubscribersTotal:!w})},help:()=>{if(!C||C<1)return __("This will remain hidden on your website until you have at least one subscriber.","jetpack")}}),(0,r.createElement)(o.ToggleControl,{label:__("Place button on new line","jetpack"),checked:d,onChange:()=>{k({buttonOnNewLine:!d})}})),!(0,s.Wp)()&&(0,r.createElement)(o.PanelBody,{title:__("Success Message Text","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__successpanel"},(0,r.createElement)(o.TextareaControl,{value:x,label:__("Success Message Text","jetpack"),hideLabelFromVision:!0,help:__("Save your custom message to display when a user subscribes your website.","jetpack"),onChange:e=>k({successMessage:e})})))}},58363:function(e,t,n){"use strict";var r=n(26233),a=n(80960),o=n(28897),i=n(73300),s=n(56286),l=n(16949);t.Z=[l.Z,s.Z,i.Z,o.Z,a.Z,r.Z]},26233:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(92819);const __=a.__;t.Z={attributes:{subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:e=>({submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal}),isEligible:e=>!(!e.hasOwnProperty("subscribeButton")||!(0,o.isEmpty)(e.subscribeButton)),save:function(e){let{attributes:t}=e;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_subscribers_total="${t.showSubscribersTotal}" show_only_email_and_button="true"]`)}}},80960:function(e,t,n){"use strict";var r=n(65736),a=n(51268);const __=r.__;t.Z={attributes:{subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},migrate:e=>({subscribePlaceholder:e.subscribePlaceholder,showSubscribersTotal:e.showSubscribersTotal,buttonOnNewLine:!0,submitButtonText:e.submitButtonText,buttonBackgroundColor:e.backgroundButtonColor?e.backgroundButtonColor:"primary",customButtonBackgroundColor:e.customBackgroundButtonColor,textColor:e.textButtonColor?e.textButtonColor:"background",customTextColor:e.customTextButtonColor}),save:a.Z}},51268:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{showSubscribersTotal:n,submitButtonClasses:a,customBackgroundButtonColor:o,customTextButtonColor:i,submitButtonText:s}=t;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_only_email_and_button="true" custom_background_button_color="${o}" custom_text_button_color="${i}" submit_button_text="${s}" submit_button_classes="${a}" show_subscribers_total="${n}" ]`)}},80929:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Enter your email address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Sign Up","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"number"},customFontSize:{type:"number"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},69283:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(80929);function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{subscribePlaceholder:o,showSubscribersTotal:l,buttonOnNewLine:c,submitButtonText:u,emailFieldBackgroundColor:p,customEmailFieldBackgroundColor:d,emailFieldGradient:m,customEmailFieldGradient:h,buttonBackgroundColor:f,customButtonBackgroundColor:g,buttonGradient:b,customButtonGradient:v,textColor:k,customTextColor:y,fontSize:E,customFontSize:w,borderRadius:_,borderWeight:C,borderColor:j,customBorderColor:S,padding:x,spacing:P}=t,T=!!a.__experimentalGetGradientClass,N=(0,a.getColorClassName)("color",k),A=(0,a.getFontSizeClass)(E),I=(0,a.getColorClassName)("border-color",j),M=(0,a.getColorClassName)("background-color",f),B=T?(0,a.__experimentalGetGradientClass)(b):void 0,R=(0,a.getColorClassName)("background-color",p),L=T?(0,a.__experimentalGetGradientClass)(m):void 0,Z=i()(0===_?"no-border-radius":void 0,A,I),D=i()(Z,k?"has-text-color":void 0,N,f||b?"has-background":void 0,M,B),F=i()(Z,R,L),O=!R&&h?h:d,z=!M&&v?v:g,U=()=>i()(e,"wp-block-jetpack-subscriptions__supports-newline",c?"wp-block-jetpack-subscriptions__use-newline":void 0,l?"wp-block-jetpack-subscriptions__show-subs":void 0);let $=o,V=u;return"check-text-defaults"===n&&($=o===s.Z.subscribePlaceholder.default?"Enter your email address":o,V=u===s.Z.submitButtonText.default?"Sign Up":u),(0,r.createElement)("div",{className:U()},(0,r.createElement)(r.RawHTML,null,`\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="${$}"\n\t\t\t\tshow_subscribers_total="${l}"\n\t\t\t\tbutton_on_newline="${c}"\n\t\t\t\tsubmit_button_text="${V}"\n\t\t\t\tcustom_background_emailfield_color="${O}"\n\t\t\t\tcustom_background_button_color="${z}"\n\t\t\t\tcustom_text_button_color="${y}"\n\t\t\t\tcustom_font_size="${w||16}"\n\t\t\t\tcustom_border_radius="${_||0}"\n\t\t\t\tcustom_border_weight="${C||1}"\n\t\t\t\tcustom_border_color="${S}"\n\t\t\t\tcustom_padding="${x||15}"\n\t\t\t\tcustom_spacing="${P||10}"\n\t\t\t\tsubmit_button_classes="${D}"\n\t\t\t\temail_field_classes="${F}"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]`))}},28897:function(e,t,n){"use strict";var r=n(80929),a=n(69283);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n)}}},73300:function(e,t,n){"use strict";var r=n(80929),a=n(69283);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n,"check-text-defaults")}}},56286:function(e,t,n){"use strict";var r=n(80929),a=n(14556);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:a.ZP}},14556:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(80929);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:j,borderColor:S,customBorderColor:x,padding:P,spacing:T}=n,N=!!a.__experimentalGetGradientClass,A=(0,a.getColorClassName)("color",y),I=(0,a.getFontSizeClass)(w),M=(0,a.getColorClassName)("border-color",S),B=(0,a.getColorClassName)("background-color",g),R=N?(0,a.__experimentalGetGradientClass)(v):void 0,L=(0,a.getColorClassName)("background-color",d),Z=N?(0,a.__experimentalGetGradientClass)(h):void 0,D=i()(0===C?"no-border-radius":void 0,I,M),F=i()(D,y?"has-text-color":void 0,A,g||v?"has-background":void 0,B,R),O=i()(D,L,Z),z=!L&&f?f:m,U=!B&&k?k:b,$={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:z,custom_background_button_color:U,custom_text_button_color:E,custom_font_size:_||16,custom_border_radius:C||0,custom_border_weight:j||1,custom_border_color:x,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:F,email_field_classes:O,show_only_email_and_button:!0},V=(0,s.reduce)($,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${V}]`))}},61798:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},16949:function(e,t,n){"use strict";var r=n(61798),a=n(75799);t.Z={attributes:r.Z,save:a.Z}},75799:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(61798);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:j,borderColor:S,customBorderColor:x,padding:P,spacing:T,buttonWidth:N}=n,A=!!a.__experimentalGetGradientClass,I=(0,a.getColorClassName)("color",y),M=(0,a.getFontSizeClass)(w),B=(0,a.getColorClassName)("border-color",S),R=(0,a.getColorClassName)("background-color",g),L=A?(0,a.__experimentalGetGradientClass)(v):void 0,Z=(0,a.getColorClassName)("background-color",d),D=A?(0,a.__experimentalGetGradientClass)(h):void 0,F=i()(0===C?"no-border-radius":void 0,M,B),O=i()(F,y?"has-text-color":void 0,I,g||v?"has-background":void 0,R,L),z=i()(F,Z,D),U=!Z&&f?f:m,$=!R&&k?k:b,V=N||void 0,G={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:U,custom_background_button_color:$,custom_text_button_color:E,custom_font_size:_||"16px",custom_border_radius:C||0,custom_border_weight:j||1,custom_border_color:x,custom_button_width:V,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:O,email_field_classes:z,show_only_email_and_button:!0},H=(0,s.reduce)(G,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${H}]`))}},73228:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(86989),l=n.n(s),c=n(65736),u=n(55609),p=n(52175),d=n(94333),m=n(79885),h=n(14087),f=n(87138),g=n(45643);const __=c.__,_n=c._n,{getComputedStyle:b}=window,v=!!p.__experimentalUseGradient,k=(0,u.withFallbackStyles)(((e,t)=>{const{buttonBackgroundColor:n,textColor:r}=t,a=n&&n.color,o=r&&r.color,i=e.querySelector(".wp-block-jetpack-subscriptions__button");return{fallbackButtonBackgroundColor:a||!e?void 0:i&&b(i).backgroundColor,fallbackTextColor:o||!e?void 0:i&&b(i).color}}));t.Z=(0,d.compose)([(0,p.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),(0,p.withFontSizes)("fontSize"),k])((function(e){const{className:t,attributes:n,setAttributes:a,emailFieldBackgroundColor:s,buttonBackgroundColor:d,setButtonBackgroundColor:b,fallbackButtonBackgroundColor:k,textColor:y,fallbackTextColor:E,setTextColor:w,borderColor:_,fontSize:C}=e,j=(0,h.S)(m.Z,n);(0,i.isEqual)(j,n)||a(j);const{borderRadius:S,borderWeight:x,buttonWidth:P,padding:T,spacing:N,submitButtonText:A,subscribePlaceholder:I,showSubscribersTotal:M,buttonOnNewLine:B,successMessage:R}=j,[L,Z]=(0,r.useState)(""),[D,F]=(0,r.useState)(""),O=v?(0,p.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},z=v?(0,p.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},U={"no-border-radius":0===S,[C.class]:C.class,"has-text-color":y.color,[y.class]:y.class},$={...U,"has-background":s.color||O.gradientValue,[s.class]:!O.gradientValue&&s.class,[O.gradientClass]:O.gradientClass},V={...U,"has-background":d.color||z.gradientValue,[d.class]:!z.gradientValue&&d.class,[z.gradientClass]:z.gradientClass},G=e=>e||f.FP,H={color:y.color,borderColor:_.color,borderRadius:S?S+"px":f.S9+"px",borderWidth:x?x+"px":f.XJ+"px",fontSize:C.size?C.size:f.tm,padding:(e=>{const t=e||f.HE;return t+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(T)},q={...H,...!s.color&&O.gradientValue?{background:O.gradientValue}:{backgroundColor:s.color}},W={...H,...!d.color&&z.gradientValue?{background:z.gradientValue}:{backgroundColor:d.color},...B?{marginTop:G(N)+"px"}:{marginLeft:G(N)+"px"},width:P};return(0,r.useEffect)((()=>{l()({path:"/wpcom/v2/subscribers/count"}).then((e=>{e.hasOwnProperty("count")?(Z((0,c.sprintf)(
71
  /* translators: Placeholder is a number of subscribers. */
72
- _n("Join %s other subscriber","Join %s other subscribers",e.count,"jetpack"),e.count)),F(e.count)):(Z(__("Subscriber count unavailable","jetpack")),F(0))}))}),[]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(g.Z,{buttonBackgroundColor:d,borderColor:_,buttonGradient:z,borderRadius:S,borderWeight:x,buttonOnNewLine:B,emailFieldBackgroundColor:s,fallbackButtonBackgroundColor:k,fallbackTextColor:E,fontSize:C,isGradientAvailable:v,padding:T,setAttributes:a,setButtonBackgroundColor:b,setTextColor:w,showSubscribersTotal:M,spacing:N,subscriberCount:D,textColor:y,buttonWidth:P,successMessage:R})),(0,r.createElement)("div",{className:o()(t,"wp-block-jetpack-subscriptions__supports-newline",B?"wp-block-jetpack-subscriptions__use-newline":void 0,M?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,r.createElement)(u.TextControl,{placeholder:I,disabled:!0,className:o()($,"wp-block-jetpack-subscriptions__textfield"),style:q}),(0,r.createElement)(p.RichText,{className:o()(V,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:W,value:A,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),M&&(0,r.createElement)("p",{className:"wp-block-jetpack-subscriptions__subscount"},L)))}))},57211:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return h}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(79885),l=n(58363),c=n(73228),u=n(5321),p=n(57535);const __=a.__,_x=a._x,d="subscriptions",m=(0,r.createElement)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Rect,{x:"4.75",y:"6.75",width:"14.5",height:"10.5",rx:"1.25",stroke:(0,p.m)(),strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(o.Path,{d:"M19 7L13.3609 12.2363C12.5935 12.9489 11.4065 12.9489 10.6391 12.2363L5 7",stroke:(0,p.m)(),strokeWidth:"1.5",strokeLinejoin:"bevel",fill:"none"})),h={title:__("Subscription Form","jetpack"),description:(0,r.createElement)("p",null,__("A form enabling readers to get notifications when new posts are published from this site.","jetpack")),icon:{src:m,foreground:(0,p.m)()},category:"grow",keywords:[_x("subscribe","block search term","jetpack"),_x("join","block search term","jetpack"),_x("follow","block search term","jetpack")],attributes:s.Z,edit:c.Z,save:u.Z,transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"blog_subscription"===t},transform:e=>{let{instance:t}=e;return(0,i.createBlock)("jetpack/subscriptions",{showSubscribersTotal:t.raw.show_subscribers_total,submitButtonText:t.raw.subscribe_button,subscribePlaceholder:t.raw.subscribe_placeholder,successMessage:t.raw.success_message})}}]},example:{attributes:{}},deprecated:l.Z}},5321:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(79885),c=n(87138);function u(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:u,buttonOnNewLine:p,submitButtonText:d,emailFieldBackgroundColor:m,customEmailFieldBackgroundColor:h,emailFieldGradient:f,customEmailFieldGradient:g,buttonBackgroundColor:b,customButtonBackgroundColor:v,buttonGradient:k,customButtonGradient:y,textColor:E,customTextColor:w,fontSize:_,customFontSize:C,borderRadius:j,borderWeight:S,borderColor:x,customBorderColor:P,padding:T,spacing:N,buttonWidth:A,successMessage:I}=n,M=!!a.__experimentalGetGradientClass,B=(0,a.getColorClassName)("color",E),R=(0,a.getFontSizeClass)(_),L=(0,a.getColorClassName)("border-color",x),Z=(0,a.getColorClassName)("background-color",b),D=M?(0,a.__experimentalGetGradientClass)(k):void 0,F=(0,a.getColorClassName)("background-color",m),O=M?(0,a.__experimentalGetGradientClass)(f):void 0,z=i()(0===j?"no-border-radius":void 0,R,L),U=i()(z,E?"has-text-color":void 0,B,b||k?"has-background":void 0,Z,D),$=i()(z,F,O),V=!F&&g?g:h,G=!Z&&y?y:v,H=A||void 0,q={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:u,button_on_newline:p,submit_button_text:d!==l.Z.submitButtonText.default?d:void 0,custom_background_emailfield_color:V,custom_background_button_color:G,custom_text_button_color:w,custom_font_size:C||c.tm,custom_border_radius:j||c.S9,custom_border_weight:S||c.XJ,custom_border_color:P,custom_button_width:H,custom_padding:T||c.HE,custom_spacing:N||c.FP,submit_button_classes:U,email_field_classes:$,show_only_email_and_button:!0,success_message:I},W=(0,s.reduce)(q,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",p?"wp-block-jetpack-subscriptions__use-newline":void 0,u?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${W}]`))}},28526:function(e,t,n){"use strict";n.d(t,{RA:function(){return r},q3:function(){return a},hI:function(){return o},Z5:function(){return i},GP:function(){return s},xJ:function(){return l},sw:function(){return c},EU:function(){return u},yw:function(){return p},P0:function(){return d}});const r=["image"],a=4,o=20,i=20,s=2e3,l="circle",c="columns",u="rectangular",p="square",d=[{isDefault:!0,name:u},{name:l},{name:p},{name:c}]},70132:function(e,t,n){"use strict";var r=n(25689),a=n(47330),o=n(35660);t.Z=[o,a,r]},66105:function(e,t,n){"use strict";n.d(t,{q3:function(){return r},hI:function(){return a},GP:function(){return o},EU:function(){return i},P0:function(){return s}});const r=4,a=20,o=2e3,i="rectangular",s=[{isDefault:!0,name:i},{name:"circle"},{name:"square"},{name:"columns"}]},2589:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(11313);function o(e){const{"aria-label":t,alt:n,height:o,id:i,link:s,linkTo:l,origUrl:c,url:u,width:p}=e;if((0,a.isBlobURL)(c))return null;let d;switch(l){case"media":d=u;break;case"attachment":d=s}const m=(0,r.createElement)("img",{alt:n,"aria-label":t,"data-height":o,"data-id":i,"data-link":s,"data-url":c,"data-width":p,src:u});return(0,r.createElement)("figure",{className:"tiled-gallery__item"},d?(0,r.createElement)("a",{href:d},m):m)}},25689:function(e,t,n){"use strict";n.r(t),n.d(t,{save:function(){return r.Z},attributes:function(){return a},support:function(){return o}});var r=n(19092);const a={align:{default:"center",type:"string"},className:{default:`is-style-${n(66105).EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},caption:{selector:"figcaption",source:"html",type:"string"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"}},o={align:["center","wide","full"],customClassName:!1,html:!1}},43064:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},7696:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},17357:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(69307),a=n(40278),o=n(65736),i=n(82827),s=n(11313),l=n(2589),c=n(1077),u=n(47536),p=n(66105);const __=o.__;class d extends r.Component{photonize(e){let{height:t,width:n,url:r}=e;if(!r)return;if((0,s.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;const o=r.split("?",1)[0],l=function(e){const{host:t}=(0,i.Qc)(e);return/\.files\.wordpress\.com$/.test(t)}(r)?h:a.Z,{layoutStyle:c}=this.props;if(m(c)&&n&&t){const e=Math.min(p.GP,n,t);return l(o,{resize:`${e},${e}`})}return l(o)}renderImage(e,t){const{images:n,linkTo:a,selectedImage:i}=this.props,s=(0,o.sprintf)(
73
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
74
- __("image %1$d of %2$d in gallery","jetpack"),t+1,n.length);return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":s,height:e.height,id:e.id,origUrl:e.url,isSelected:i===t,key:t,link:e.link,linkTo:a,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:i}=this.props,s=m(i)?u.Z:c.Z,l=this.props.images.map(this.renderImage,this);return(0,r.createElement)("div",{className:n},(0,r.createElement)(s,{align:e,columns:a,images:o,layoutStyle:i,renderedImages:l}),t)}}function m(e){return["circle","square"].includes(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},{auth:r,hash:a,port:o,query:s,search:l,...c}=(0,i.Qc)(e);return c.query=Object.keys(t).reduce(((e,r)=>Object.assign(e,{[n.hasOwnProperty(r)?n[r]:r]:t[r]})),{}),(0,i.WU)(c)}},1077:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(27538),a=n.n(r),o=n(69307),i=n(54166),s=n(43064),l=n(7696),c=n(8292),u=n(37335),p=n(54794);class d extends o.Component{constructor(){super(...arguments),a()(this,"gallery",(0,o.createRef)()),a()(this,"pendingRaf",null),a()(this,"ro",null),a()(this,"handleGalleryResize",(e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t;(0,u.W)(n).forEach((t=>(0,u.i)(t,e)))}}))}))}componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new i.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:a}=this.props,i=(0,p.h9)(n),u="columns"===r?(0,p.sv)(i,t):(0,p.T9)(i,{isWide:["full","wide"].includes(e)});let d=0;return(0,o.createElement)(l.Z,{galleryRef:this.gallery},u.map(((e,t)=>(0,o.createElement)(c.Z,{key:t},e.map(((e,t)=>{const n=a.slice(d,d+e);return d+=e,(0,o.createElement)(s.Z,{key:t},n)}))))))}}},54794:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=P([2,1,2],5),l=T([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),g=P([3,1],3),b=T([M(1.6),(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(2))]),v=P([1,2],3),k=P([1,1,1,1,1],1),y=P([1,1,1,1],1),E=P([1,1,1],3),w=T([(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(2)),M(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&s(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(e)?[1,2,1]:m(a)&&h(e)?[1,3]:f(a)&&g(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:x(e,a)?[1,1,1,1]:S(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),y=(0,r.sum)(o),E=a.slice(y);return n(i,E)};return n([],e)}function S(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}function x(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function P(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function T(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function M(e){return t=>t<e}},37335:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(66105);function a(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function o(e,t){!function(e,t,n){let[o,i]=t;const p=1/o*(n-r.q3*(e.childElementCount-1)-i);!function(e,t){let{rawHeight:n,rowWidth:o}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*c(e)[0])),d=a(p,o);i.forEach(((e,t)=>{const o=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:o}=t;const i=a(l(e).map((e=>o/u(e))),n);Array.from(e.children).forEach(((e,t)=>{const n=i[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:o})}))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){return s(e).map(c).reduce(((e,t)=>{let[n,r]=e,[a,o]=t;return[n+a,r+o]}),[0,0])}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},8292:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},47536:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(8292),i=n(43064),s=n(7696),l=n(66105);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(l.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(o.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},19092:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(17357),o=n(98085),i=n(66105);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{images:n}=t;if(!n.length)return null;const{align:l,className:c,columns:u=s(t),linkTo:p}=t;return(0,r.createElement)(a.Z,{align:l,className:c,columns:u,images:n,layoutStyle:(0,o.t)(i.P0,c),linkTo:p})}},96470:function(e,t,n){"use strict";n.d(t,{hI:function(){return r},Z5:function(){return a},GP:function(){return o},xJ:function(){return i},EU:function(){return s},P0:function(){return l}});const r=20,a=20,o=2e3,i="circle",s="rectangular",l=[{isDefault:!0,name:s},{name:i},{name:"square"},{name:"columns"}]},72285:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(11313);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,i.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p});return(0,r.createElement)("figure",{className:o()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},47330:function(e,t,n){"use strict";n.r(t),n.d(t,{save:function(){return a.Z},attributes:function(){return o},supports:function(){return i}});var r=n(96470),a=n(96659);const o={align:{default:"center",type:"string"},className:{default:`is-style-${r.EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1}},71410:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},86159:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},15515:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(69307),a=n(65736),o=n(89105),i=n.n(o),s=n(72285),l=n(56556),c=n(14916),u=n(92805),p=n(96470);const __=a.__;class d extends r.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,linkTo:l,layoutStyle:c,selectedImage:p}=this.props,d=(0,a.sprintf)(
75
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
76
- __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:c});return(0,r.createElement)(s.Z,{alt:e.alt,"aria-label":d,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:p===t,key:t,link:e.link,linkTo:l,origUrl:e.url,showMovers:i.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:s,roundedCorners:d}=this.props,m=(0,u.v)(s)?c.Z:l.Z,h=this.props.images.map(this.renderImage,this),f=s!==p.xJ?Math.min(d,p.Z5):0;return(0,r.createElement)("div",{className:i()(n,{[`has-rounded-corners-${f}`]:f>0})},(0,r.createElement)(m,{align:e,columns:a,images:o,layoutStyle:s,renderedImages:h}),t)}}},56556:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(27538),a=n.n(r),o=n(69307),i=n(71410),s=n(86159),l=n(8955),c=n(9972);class u extends o.Component{constructor(){super(...arguments),a()(this,"gallery",(0,o.createRef)()),a()(this,"pendingRaf",null)}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:a}=this.props,u=(0,c.h9)(n),p="columns"===r?(0,c.sv)(u,t):(0,c.T9)(u,{isWide:["full","wide"].includes(e)});let d=0;return(0,o.createElement)(s.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,o.createElement)(l.Z,{key:t},e.map(((e,t)=>{const n=a.slice(d,d+e);return d+=e,(0,o.createElement)(i.Z,{key:t},n)}))))))}}},9972:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=P([2,1,2],5),l=T([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),g=P([3,1],3),b=T([M(1.6),(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(2))]),v=P([1,2],3),k=P([1,1,1,1,1],1),y=P([1,1,1,1],1),E=P([1,1,1],3),w=T([(0,r.overEvery)(I(.9),M(2)),(0,r.overEvery)(I(.9),M(2)),M(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&s(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(e)?[1,2,1]:m(a)&&h(e)?[1,3]:f(a)&&g(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:x(e,a)?[1,1,1,1]:S(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),y=(0,r.sum)(o),E=a.slice(y);return n(i,E)};return n([],e)}function S(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}function x(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function P(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function T(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function M(e){return t=>t<e}},8955:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},14916:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(8955),i=n(71410),s=n(86159),l=n(96470);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(l.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(o.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},96659:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(15515),o=n(98085),i=n(96470);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=s(t),linkTo:d,roundedCorners:m}=t;return(0,r.createElement)(a.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,o.t)(i.P0,u),linkTo:d,roundedCorners:m})}},92805:function(e,t,n){"use strict";n.d(t,{v:function(){return l},z:function(){return c}});var r=n(40278),a=n(82827),o=n(11313),i=n(92819),s=n(96470);function l(e){return["circle","square"].includes(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:a,width:c}=e,{layoutStyle:m}=t,h=p(n)||!0===u()?d:r.Z;let f;if(l(m)&&c&&a){const e=Math.min(s.GP,c,a);f=h(n,{resize:`${e},${e}`})}else f=h(n);const g=300,b=600;let v;if(l(m)){const e=Math.min(b,c,a),t=Math.min(s.GP,c,a);v=(0,i.range)(e,t,g).map((e=>{const t=h(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(b,c),t=Math.min(s.GP,c);v=(0,i.range)(e,t,g).map((e=>{const t=
1
  /*! For license information please see editor-beta.js.LICENSE.txt */
2
+ !function(){var e,t,n,r,a,o,i={27538:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},29183:function(e){function t(){return e.exports=t=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},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},8172:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(31354),a=n(64803);function o(e){var t=(0,r.Z)(e);return function(e){return(0,a.Z)(t,e)}}},64803:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function a(e,t){var n,a,o,i,s,l,c=[];for(n=0;n<e.length;n++){if(s=e[n],i=r[s]){for(a=i.length,o=Array(a);a--;)o[a]=c.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(s)?t[s]:+s;c.push(l)}return c[0]}},7478:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8172);function a(e){var t=(0,r.Z)(e);return function(e){return+t({n:e})}}},31354:function(e,t,n){"use strict";var r,a,o,i;function s(e){for(var t,n,s,l,c=[],u=[];t=e.match(i);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);l=u.pop();){if(o[n]){if(o[n][0]===l){n=o[n][1]||n;break}}else if(a.indexOf(l)>=0||r[l]<r[n]){u.push(l);break}c.push(l)}o[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(u.reverse())}n.d(t,{Z:function(){return s}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],o={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function a(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(r,(function(){var e,r,a,o,i;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(a=arguments[7])&&(a=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(i=t[0][r]):(void 0===e&&(e=n),n++,i=t[e-1]),"f"===o?i=parseFloat(i)||0:"d"===o&&(i=parseInt(i)||0),void 0!==a&&("f"===o?i=i.toFixed(a):"s"===o&&(i=i.substr(0,a))),null!=i?i:"")}))}},1214:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},25389:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.Z=o},55807:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.Z=o},21621:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.Z=o},16380:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.Z=o},6801:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.Z=o},93456:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=o},36696:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=o},81326:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)a(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var n=t.split(r),a=n.length,o=0;o<a;++o)e[n[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=new e;t(o,r);var i=[];for(var s in o)o[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},89105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},92213:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,o,i=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1==(1&o)?o=o>>>1^n:o>>>=1;i=i>>>8^o}return-1^i}function a(e,n){var r,o,i;if(void 0!==a.crc&&n&&e||(a.crc=-1,e)){for(r=a.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return a.crc=r,-1^r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},97115:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var a=o(n[0]);a!==n[0]&&(t[n[0]]=a)}n=r.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),s=0;s<i.length;s++){var l=i[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},89453:function(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2571:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var a,o,i,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(o){r.once&&e.removeEventListener(t,a),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,a,o,i;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(a=o[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},95946:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],s=e[i];(a?-1!==t.indexOf(i):t(i,s,e))&&(n[i]=s)}return n}},95949:function(e,t,n){"use strict";var r=n(53566),a=n(48282);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var a=1;a<n;a++)r[a]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[a++]=0;r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=e>>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,o=8;o<this.padLength;o++)r[a++]=0;return r}},69016:function(e,t,n){"use strict";var r=n(53566),a=n(95949),o=n(47574),i=r.rotl32,s=r.sum32,l=r.sum32_5,c=o.ft_1,u=a.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),f=l(i(a,5),c(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=f}this.h[0]=s(this.h[0],a),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(e,t,n){"use strict";var r=n(53566).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},53566:function(e,t,n){"use strict";var r=n(48282),a=n(59503);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),s=0,l=t;s<i.length;s++,l+=4){var c;c="big"===a?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],i[s]=c>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,a,o,i,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+n+a+i+(l+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,s,l,c){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+o>>>0)<o?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+a+i+l+(u+=(p=p+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,s,l,c){return t+r+o+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},88617:function(e,t,n){"use strict";var r=n(57810),a=n(61285),o=n(95339),i=n.n(o),s=n(94481),l=n(88090),c=n(75565),u=n.n(c),p=n(69016),d=n.n(p),m=n(2571),h=n(702),f=n(92846),g=i()("i18n-calypso"),b="number_format_decimals",v="number_format_thousands_sep",k="messages",y=[function(e){return e}],E={};function w(){x.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function _(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",_(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",_(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function j(e,t){return e.dcnpgettext(k,t.context,t.original,t.plural,t.count)}function S(e,t){for(var n=y.length-1;n>=0;n--){var r=y[n](Object.assign({},t)),a=r.context?r.context+""+r.original:r.original;if(e.state.locale[a])return j(e.state.tannin,r)}return null}function x(){if(!(this instanceof x))return new x;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:u()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}x.throwErrors=!1,x.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},x.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},x.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},x.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,f.Z)(e,n,r,a)},x.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},x.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==E[n+e])return E[n+e];var r=d()().update(e).digest("hex");return E[n+e]=t?r.substr(0,t):r},s=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)y.push(s(!1));else{var c=o.substr(5).indexOf("-");if(c<0){var u=Number(o.substr(5));y.push(s(u))}else for(var p=Number(o.substr(5,c)),m=Number(o.substr(6+c)),h=p;h<=m;h++)y.push(s(h))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new l.Z((0,a.Z)({},k,this.state.locale)),this.state.numberFormatSettings.decimal_point=j(this.state.tannin,C([b])),this.state.numberFormatSettings.thousands_sep=j(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===b&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},x.prototype.getLocale=function(){return this.state.locale},x.prototype.getLocaleSlug=function(){return this.state.localeSlug},x.prototype.isRtl=function(){return"rtl"===this.state.textDirection},x.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},x.prototype.hasTranslation=function(){return!!S(this,C(arguments))},x.prototype.translate=function(){var e=C(arguments),t=S(this,e);if(t||(t=j(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=h.Z.apply(void 0,(0,r.Z)(n))}catch(e){if(!window||!window.console)return;var a=this.throwErrors?"error":"warn";"string"!=typeof e?window.console[a](e):window.console[a]("i18n sprintf error:",n)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},x.prototype.reRenderTranslations=function(){g("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},x.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},x.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=x},63807:function(e,t,n){"use strict";n.d(t,{Y4:function(){return l}});var r=n(88617),a=n(42928),o=n(80975),i=n(24531),s=new r.Z,l=s.numberFormat.bind(s),c=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,a.Z)(s),(0,o.Z)(s),(0,i.Z)(s));c.useRtl,c.withRtl},42928:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(20623),a=n(6438),o=n(68384),i=n(75808),s=n(80601),l=n(31615),c=n(61285),u=n(99196),p=n.n(u);function d(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(n){var u,d,m=n.displayName||n.name||"";return d=u=function(u){(0,s.Z)(m,u);var d=(0,l.Z)(m);function m(){var e;(0,a.Z)(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,c.Z)((0,i.Z)(e),"boundForceUpdate",e.forceUpdate.bind((0,i.Z)(e))),e}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){e.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){e.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var a=(0,r.Z)({locale:e.getLocaleSlug()},this.props,{},t);return p().createElement(n,a)}}]),m}(p().Component),(0,c.Z)(u,"displayName","Localized("+m+")"),d}}},92846:function(e,t,n){"use strict";function r(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,i=void 0===r?",":r,s=void 0===n?".":n,l="";return l=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o):""+Math.round(a)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(s)}n.d(t,{Z:function(){return r}})},24531:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(4291),a=n(99196),o=n.n(a),i=n(20036),s=n(94333);function l(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return(0,i.useSubscription)(t)}var l=(0,s.createHigherOrderComponent)((function(e){return(0,a.forwardRef)((function(t,a){var i=n();return o().createElement(e,(0,r.Z)({},t,{isRtl:i,ref:a}))}))}),"WithRTL");return{useRtl:n,withRtl:l}}},80975:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2037),a=n(99196),o=n.n(a);function i(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}return function(){var n=o().useState(t),a=(0,r.Z)(n,2),i=a[0],s=a[1];return o().useEffect((function(){var n=function(){return s(t)};return e.on("change",n),function(){return e.off("change",n)}}),[]),i}}},59503:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},30045:function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=n(49872)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===a(n))return!function(e){return"[object RegExp]"===a(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(n)?c(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},m.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,o,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},49872:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(26285).source,t.src_Cc=n(84080).source,t.src_Z=n(76202).source,t.src_P=n(87696).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},47595:function(e,t,n){"use strict";const r=n(22199),a=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),m=Symbol("updateAgeOnGet"),h=()=>1;const f=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[m]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},b=e=>{if(e[o]>e[a])for(let t=e[p].tail;e[o]>e[a]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}};class k{constructor(e,t,n,r,a){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=a||0}}const y=(e,t,n,r)=>{let a=n.value;g(e,a)&&(v(e,n),e[s]||(a=void 0)),a&&t.call(r,a.value,a.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[a]=e.max||1/0;const t=e.length||h;if(this[i]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[m]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,b(this)}get max(){return this[a]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[i]&&(this[i]=e,this[o]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[i](t,e);if(this[d].has(e)){if(s>this[a])return v(this,this[d].get(e)),!1;const i=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[o]+=s-i.length,i.length=s,this.get(e),b(this),!0}const m=new k(e,t,s,r,n);return m.length>this[a]?(this[c]&&this[c](e,t),!1):(this[o]+=m.length,this[p].unshift(m),this[d].set(e,this[p].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{const e=a-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>f(this,t,!1)))}}},75565:function(e,t,n){var r=n(2571),a=n(59503);function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=o,a(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},o.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},o.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},o.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},29337:function(e,t,n){"use strict";e.exports=n(46202)},99257:function(e,t,n){"use strict";e.exports=n(60231)},34790:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},95918:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=a},11825:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function a(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(99257);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(87696);t.lib={},t.lib.mdurl=n(36664),t.lib.ucmicro=n(39126),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},67649:function(e,t,n){"use strict";t.parseLinkLabel=n(34122),t.parseLinkDestination=n(39438),t.parseLinkTitle=n(43587)},39438:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return s;if(60===a)return s;if(62===a)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===a&&t+1<n?t+=2:t++}return s}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},34122:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s}},43587:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},46202:function(e,t,n){"use strict";var r=n(11825),a=n(67649),o=n(5210),i=n(22237),s=n(77711),l=n(85631),c=n(30045),u=n(36664),p=n(15661),d={default:n(62679),zero:n(20255),commonmark:n(2367)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new c,this.validateLink=f,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=d[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},77711:function(e,t,n){"use strict";var r=n(91479),a=[["table",n(69200),["paragraph","reference"]],["code",n(72348)],["fence",n(98779),["paragraph","reference","blockquote","list"]],["blockquote",n(84679),["paragraph","reference","blockquote","list"]],["hr",n(11227),["paragraph","reference","blockquote","list"]],["list",n(84871),["paragraph","reference","blockquote"]],["reference",n(10175)],["html_block",n(37186),["paragraph","reference","blockquote"]],["heading",n(7768),["paragraph","reference","blockquote"]],["lheading",n(27375)],["paragraph",n(29967)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,s=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(52602),e.exports=o},22237:function(e,t,n){"use strict";var r=n(91479),a=[["normalize",n(8668)],["block",n(67082)],["inline",n(10631)],["linkify",n(29658)],["replacements",n(34803)],["smartquotes",n(74209)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},o.prototype.State=n(73172),e.exports=o},85631:function(e,t,n){"use strict";var r=n(91479),a=[["text",n(13252)],["newline",n(30938)],["escape",n(4833)],["backticks",n(89362)],["strikethrough",n(24860).w],["emphasis",n(62693).w],["link",n(62947)],["image",n(4373)],["autolink",n(11360)],["html_inline",n(52987)],["entity",n(27843)]],o=[["balance_pairs",n(26961)],["strikethrough",n(24860).g],["emphasis",n(62693).g],["text_collapse",n(93831)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](s)},i.prototype.State=n(39247),e.exports=i},2367:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},62679:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},20255:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},5210:function(e,t,n){"use strict";var r=n(11825).assign,a=n(11825).unescapeAll,o=n(11825).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",f="";return m&&(h=(c=m.split(/(\s+)/g))[0],f=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||o(d.content)).indexOf("<pre")?s+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(o=!1)),a+=o?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,s=e.length;i<s;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,o=e.length;a<o;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,a,o,i="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[o]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},91479:function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},84679:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,j=e.lineMax,S=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(S++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(S)?(S++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(S)?(y=!0,(e.bsCount[t]+m)%4==3?(S++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=S;S<x&&(i=e.src.charCodeAt(S),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,S++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=S>=x,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=S-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((S=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(S++)||C){if(u)break;for(E=!1,s=0,c=w.length;s<c;s++)if(w[s](e,d,n,!0)){E=!0;break}if(E){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(S)?(S++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(S)?(y=!0,(e.bsCount[d]+m)%4==3?(S++,l++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=S;S<x&&(i=e.src.charCodeAt(S),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,S++;u=S>=x,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=S-e.bMarks[d]}for(g=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=j,e.parentType=b,p[1]=e.line,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},72348:function(e){"use strict";e.exports=function(e,t,n){var r,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},98779:function(e){"use strict";e.exports=function(e,t,n,r){var a,o,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(o=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,a))-l<o||(d=e.skipSpaces(d))<m)){p=!0;break}return o=e.sCount[t],e.line=s+(p?1:0),(c=e.push("fence","code",0)).info=i,c.content=e.getLines(t+1,s,o,!0),c.markup=u,c.map=[t,e.line],!0}},7768:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,o=e.src.charCodeAt(++c);35===o&&c<u&&i<=6;)i++,o=e.src.charCodeAt(++c);return!(i>6||c<u&&!r(o))&&(a||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},11227:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(i=1;c<u;){if((s=e.src.charCodeAt(c++))!==o&&!r(s))return!1;s===o&&i++}return!(i<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o))),!0)}},37186:function(e,t,n){"use strict";var r=n(34790),a=n(95918).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a<o.length&&!o[a][0].test(l);a++);if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(c=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(c,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},27375:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},84871:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,j,S,x,P,T,N,A,I,B,M=!1,R=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(M=!0),(P=o(e,t))>=0){if(d=!0,N=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(N,P-1)),M&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;d=!1}if(M&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),r)return!0;for(g=e.tokens.length,d?(B=e.push("ordered_list_open","ol",1),1!==v&&(B.attrs=[["start",v]])):B=e.push("bullet_list_open","ul",1),B.map=f=[t,0],B.markup=String.fromCharCode(b),y=t,T=!1,I=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=P,k=e.eMarks[y],p=E=e.sCount[y]+P-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(i=e.src.charCodeAt(x)))E+=4-(E+e.bsCount[y])%4;else{if(32!==i)break;E++}x++}if((u=(s=x)>=k?1:E-p)>4&&(u=1),c=p+u,(B=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),B.map=m=[t,0],d&&(B.info=e.src.slice(N,P-1)),S=e.tight,j=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=E,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(R=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=j,e.sCount[t]=C,e.tight=S,(B=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(A=!1,l=0,h=I.length;l<h;l++)if(I[l](e,y,n,!0)){A=!0;break}if(A)break;if(d){if((P=o(e,y))<0)break;N=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(B=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},29967:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,o=c.length;a<o;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},10175:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t,n,o){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],j=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";j<c&&!e.isEmpty(j);j++)if(!(e.sCount[j]-e.blkIndent>3||e.sCount[j]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,j,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,j,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=v.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===v.charCodeAt(_))&&w++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;if(!(g=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,l=w+=g.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;for(g=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&g.ok?(E=g.str,_=g.pos,w+=g.lines):(E="",_=s,w=l);_<C&&(i=v.charCodeAt(_),a(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&E)for(E="",_=s,w=l;_<C&&(i=v.charCodeAt(_),a(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:E,href:u}),e.parentType=f,e.line=t+w+1),!0))}},52602:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isSpace;function o(e,t,n,r){var o,i,s,l,c,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,s=l=u=p=0,c=(i=this.src).length;l<c;l++){if(o=i.charCodeAt(l),!d){if(a(o)){u++,9===o?p+=4-p%4:p++;continue}d=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<c&&i<n;){if(s=this.src.charCodeAt(l),a(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=r,e.exports=o},69200:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;c<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(m=(l=a(e,t+1)).split("|"),g=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?g.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=v=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(E=!1,u=0,p=w.length;u<p;u++)if(w[u](e,d,n,!0)){E=!0;break}if(E)break;if(!(l=a(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},67082:function(e){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},10631:function(e){"use strict";e.exports=function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},29658:function(e,t,n){"use strict";var r=n(11825).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(n=0,o=E.length;n<o;n++)if("inline"===E[n].type&&e.md.linkify.pretest(E[n].content))for(f=0,t=(i=E[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&f>0&&f--,a(l.content)&&f++),!(f>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;u<k.length;u++)g=k[u].url,b=e.md.normalizeLink(g),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(d=k[u].index)>m&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,c.push(s)),E[n].children=i=r(i,t,c)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},8668:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},34803:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function i(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}function s(e){var n,r,a=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||a||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},74209:function(e,t,n){"use strict";var r=n(11825).isWhiteSpace,a=n(11825).isPunctChar,o=n(11825).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,i,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,j,S,x;for(j=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=j.length-1;_>=0&&!(j[_].level<=m);_--);if(j.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(c));){if(E=w=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=c.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=c.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(b=o(f)||a(String.fromCharCode(f)),v=o(g)||a(String.fromCharCode(g)),k=r(f),(y=r(g))?E=!1:v&&(k||b||(E=!1)),k?w=!1:b&&(y||v||(w=!1)),34===g&&'"'===u[0]&&f>=48&&f<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=j.length-1;_>=0&&(h=j[_],!(j[_].level<m));_--)if(h.single===C&&j[_].level===m){h=j[_],C?(S=t.md.options.quotes[2],x=t.md.options.quotes[3]):(S=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,S),p+=x.length-1,h.token===n&&(p+=S.length-1),d=(c=i.content).length,j.length=_;continue e}E?j.push({token:n,pos:u.index,single:C,level:m}):w&&C&&(i.content=l(i.content,u.index,"’"))}else C&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},73172:function(e,t,n){"use strict";var r=n(47950);function a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=r,e.exports=a},11360:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var a,o,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return a=e.src.slice(l+1,u),n.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},89362:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-i)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=i}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},26961:function(e){"use strict";function t(e,t){var n,r,a,o,i,s,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(a=t[n],h.push(0),t[d].marker===a.marker&&m===a.token-1||(d=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),i=u[a.marker][(a.open?3:0)+a.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((o=t[r]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+c,h[r]=c,a.open=!1,o.end=n,o.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},62693:function(e){"use strict";function t(e,t){var n,r,a,o,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},27843:function(e,t,n){"use strict";var r=n(99257),a=n(11825).has,o=n(11825).isValidEntityCode,i=n(11825).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(n)?i(n):i(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&a(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},4833:function(e,t,n){"use strict";for(var r=n(11825).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},52987:function(e,t,n){"use strict";var r=n(95918).n;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},4373:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d,m,h,f,g,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(g=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),g=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[r(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},62947:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<f&&40===e.src.charCodeAt(c)){for(b=!1,c++;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(c>=f)return!1;if(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",g=c;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<f&&g!==c&&u.ok)for(m=u.str,c=u.pos;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);}(c>=f||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c<f&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?i=e.src.slice(g,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=f,!0}},30938:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t){var n,a,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,a=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(o=n-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<a&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},39247:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isWhiteSpace,o=n(11825).isPunctChar,i=n(11825).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var a=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,u,p,d,m,h=e,f=!0,g=!0,b=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<b?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(l=f,c=g):(l=f&&(!g||p),c=g&&(!f||m)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},24860:function(e){"use strict";function t(e,t){var n,r,a,o,i,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,a,o,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),n=0;n<a;n+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},13252:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},93831:function(e){"use strict";e.exports=function(e){var t,n,r=0,a=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}},47950:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},62098:function(e){"use strict";var t={};function n(e,r){var a;return"string"!=typeof r&&(r=n.defaultChars),a=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),a.push(r);for(n=0;n<e.length;n++)a[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return a}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,o,i,s,l,c="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?c+=a[r]:192==(224&r)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=r<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&r)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(c+=(l=r<<12&61440|o<<6&4032|63&i)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&s))?((l=r<<18&1835008|o<<12&258048|i<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},9401:function(e){"use strict";var t={};function n(e,r,a){var o,i,s,l,c,u="";for("string"!=typeof r&&(a=r,r=n.defaultChars),void 0===a&&(a=!0),c=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?a.push(r):a.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=e[n];return a}(r),o=0,i=e.length;o<i;o++)if(s=e.charCodeAt(o),a&&37===s&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},56558:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},36664:function(e,t,n){"use strict";e.exports.encode=n(9401),e.exports.decode=n(62098),e.exports.format=n(56558),e.exports.parse=n(5)},5:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=a.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(f);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,f=f.substr(b.length)),(t||b||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||b&&p[b]||(f=f.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(r=0;r<l.length;r++)-1!==(m=f.indexOf(l[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(v=f.slice(0,k),f=f.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var E=f.slice(0,y);f=f.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var _=this.hostname.split(/\./);for(r=0,o=_.length;r<o;r++){var C=_[r];if(C&&!C.match(c)){for(var j="",S=0,x=C.length;S<x;S++)C.charCodeAt(S)>127?j+="x":j+=C[S];if(!j.match(c)){var P=_.slice(0,r),T=_.slice(r+1),N=C.match(u);N&&(P.push(N[1]),T.unshift(N[2])),T.length&&(f=T.join(".")+f),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var A=f.indexOf("#");-1!==A&&(this.hash=f.substr(A),f=f.slice(0,A));var I=f.indexOf("?");return-1!==I&&(this.search=f.substr(I),f=f.slice(0,I)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},13699:function(){},87734:function(){},53745:function(){},48282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},32002:function(e){var t=1e3,n=60*t,r=60*n,a=24*r,o=7*a,i=365.25*a;function s(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=r)return s(e,o,r,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var p=0;p<s.length;p++)r.call(i,s[p])&&(l[s[p]]=i[s[p]])}}return l}},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(92213),a=n.n(r),o=n(68211),i=n.n(o),s=n(95339),l=n.n(s)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u);function d(e,t){var n;try{n=new URL(e,p)}catch(e){return null}var r,o,s,d,m,h="https:"===n.protocol,f=new URL("https://i0.wp.com");if(m=n.host,/^i[0-2]\.wp\.com$/.test(m))f.pathname=n.pathname,f.hostname=n.hostname;else{if(n.search)return null;var g=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(g=n.pathname.replace("://","//")),n.hostname===u&&(g=n.pathname),f.pathname=g,f.hostname=(r=g,o=a()(r),s=i()(o),d="i"+Math.floor(3*s()),l('determined server "%s" to use with "%s"',d,r),d+".wp.com"),h&&f.searchParams.set("ssl",1)}if(t)for(var b in t)"host"!==b&&"hostname"!==b?"secure"!==b||t[b]?f.searchParams.set(c[b]||b,t[b]):f.protocol="http:":f.hostname=t[b];return l("generated Photon URL: %s",f.href),f.href}},9587:function(e,t,n){"use strict";var r=n(45843);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},11268:function(e,t,n){e.exports=n(9587)()},45843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},10753:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,a){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u,p,d,m,h=e[c].replace(i,"%20"),f=h.indexOf(r);f>=0?(u=h.substr(0,f),p=h.substr(f+1)):(u=h,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),t(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},68527:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,a){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+r;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[a]))})).join(n):a?encodeURIComponent(t(a))+r+encodeURIComponent(t(e)):""}},76250:function(e,t,n){"use strict";t.decode=t.parse=n(10753),t.encode=t.stringify=n(68527)},97765:function(e,t,n){"use strict";var r=n(11268),a=n.n(r),o=n(99196),i=n.n(o),s=n(63130),l=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isSupported:s.Gb&&s.WD},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.state.isSupported&&(this.handleVisibilityChange=this.handleVisibilityChange.bind(this),document.addEventListener(s.WD.event,this.handleVisibilityChange))}},{key:"componentWillUnmount",value:function(){this.state.isSupported&&document.removeEventListener(s.WD.event,this.handleVisibilityChange)}},{key:"handleVisibilityChange",value:function(){var e;"function"==typeof this.props.onChange&&(e=this.props).onChange.apply(e,c((0,s.XO)()));"function"==typeof this.props.children&&this.forceUpdate()}},{key:"render",value:function(){return this.props.children?"function"==typeof this.props.children?this.state.isSupported?(e=this.props).children.apply(e,c((0,s.XO)())):this.props.children():i().Children.only(this.props.children):null;var e}}]),t}(i().Component);u.displayName="PageVisibility",u.propTypes={onChange:a().func,children:a().oneOfType([a().node,a().func])},t.Z=u},75031:function(e,t,n){"use strict";var r=n(97765);t.Z=r.Z},63130:function(e,t,n){"use strict";n.d(t,{Gb:function(){return o},WD:function(){return i},XO:function(){return s}});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=r&&Boolean(document.addEventListener),i=function(){if(!o)return null;var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var s=r.value;if(s.hidden in document)return s}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return null}(),s=function(){if(!i)return[!0,"visible"];var e=i.hidden,t=i.state;return[!document[e],document[t]]}},2601:function(e){"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}e.exports=function(e){var n,r={};return t(r,e),(n=function(e){return function(t){return function(n){var a,o,i=r[n.type],s=t(n);if(i)for(a=0;a<i.length;a++)(o=i[a](n,e))&&e.dispatch(o);return s}}}).effects=r,n}},19551:function(e,t,n){"use strict";var r,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function s(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function l(e,t){var n,l;function c(){n=a?new WeakMap:i()}function u(){var n,r,a,o,i,c=arguments.length;for(o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];for(i=t.apply(null,o),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!s(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(s(r.args,o,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,o)},o[0]=null,r.args=o,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=o),l=a?function(e){var t,a,o,s,l,c=n,u=!0;for(t=0;t<e.length;t++){if(a=e[t],!(l=a)||"object"!=typeof l){u=!1;break}c.has(a)?c=c.get(a):(o=new WeakMap,c.set(a,o),c=o)}return c.has(r)||((s=i()).isUniqueByDependants=u,c.set(r,s)),c.get(r)}:function(){return n},u.getDependants=t,u.clear=c,c(),u}n.d(t,{Z:function(){return l}}),r={},a="undefined"!=typeof WeakMap},54166:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function s(){o(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},p=b(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=d(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,s=d(r.width),l=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=m(r,"left","right")+o),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+o)-t,h=Math.round(l+i)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(l-=h)}return b(a.left,a.top,s,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):p}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,a,o,i,s,l,u=(r=(n=t).x,a=n.y,o=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:a,width:o,height:i,top:a,right:r+o,bottom:i+a,left:r}),l);c(this,{target:e,contentRect:u})},y=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new y(t,n,this);E.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));var _=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.Z=_},68211:function(e){"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,l=Math.random;function c(e){var n,r=e.length,a=this,o=0,i=a.i=a.j=0,l=a.S=[];for(r||(e=[r++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[i=s&i+e[o%r]+(n=l[o])],l[i]=n;(a.g=function(e){for(var n,r=0,o=a.i,i=a.j,l=a.S;e--;)n=l[o=s&o+1],r=r*t+l[s&(l[o]=l[i=s&i+n])+(l[i]=n)];return a.i=o,a.j=i,r})(t)}function u(e,t){var n,r=[],a=(typeof e)[0];if(t&&"o"==a)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==a?e:e+"\0"}function p(e,t){for(var n,r=e+"",a=0;a<r.length;)t[s&a]=s&(n^=19*t[s&a])+r.charCodeAt(a++);return m(t)}function d(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),m(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,m(n)]}}function m(e){return String.fromCharCode.apply(0,e)}e.exports=function(r,s){if(s&&!0===s.global)return s.global=!1,Math.random=e.exports(r,s),s.global=!0,Math.random;var l=s&&s.entropy||!1,h=[],f=(p(u(l?[r,m(n)]:0 in arguments?r:d(),3),h),new c(h));return p(m(f.S),n),function(){for(var e=f.g(6),n=a,r=0;e<o;)e=(e+r)*t,n*=t,r=f.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),n)},45702:function(e,t,n){const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&i||s||c}}e.exports=a;const o=n(75265),{re:i,t:s}=n(75698),l=n(48937),c=n(72840),u=n(88208),p=n(55062)},55062:function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=a.get(t);if(n)return n;const r=this.options.loose,o=r?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),s("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],m)).split(/\s+/).join(" ");const l=r?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],f=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>S(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new i(e,this.options))),g=(f.length,new Map);for(const e of f){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const v=[...g.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const a=new(n(47595))({max:1e3}),o=n(75265),i=n(45702),s=n(72840),l=n(88208),{re:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=n(75698),h=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=k(e,t),s("tildes",e),e=_(e,t),s("xrange",e),e=j(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,k=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,a,o)=>{let i;return s("tilde",e,t,n,r,a,o),v(n)?i="":v(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:v(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(s("replaceTilde pr",o),i=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,s("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,o,i)=>{let l;return s("caret",e,t,n,a,o,i),v(n)?l="":v(a)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(s("replaceCaret pr",i),l="0"===n?"0"===a?`>=${n}.${a}.${o}-${i} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${i} <${+n+1}.0.0-0`):(s("no pr"),l="0"===n?"0"===a?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),s("caret return",l),l}))},_=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,a,o,i,l)=>{s("xRange",e,n,r,a,o,i,l);const c=v(a),u=c||v(o),p=u||v(i),d=p;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),i=0,">"===r?(r=">=",u?(a=+a+1,o=0,i=0):(o=+o+1,i=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+a}.${o}.${i}${l}`):u?n=`>=${a}.0.0${l} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${o}.0${l} <${a}.${+o+1}.0-0`),s("xRange return",n),n}))},j=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),S=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),x=e=>(t,n,r,a,o,i,s,l,c,u,p,d,m)=>`${n=v(r)?"":v(a)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},88208:function(e,t,n){const r=n(72840),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(29609),{re:i,t:s}=n(75698),l=n(75265),{compareIdentifiers:c}=n(15322);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},52045:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},48937:function(e,t,n){const r=n(42969),a=n(74619),o=n(74765),i=n(71767),s=n(63590),l=n(94638);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return o(e,n,c);case">=":return i(e,n,c);case"<":return s(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},12977:function(e,t,n){const r=n(88208),a=n(38675),{re:o,t:i}=n(75698);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else n=e.match(o[i.COERCE]);return null===n?null:a(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},58230:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>{const a=new r(e,n),o=new r(t,n);return a.compare(o)||a.compareBuild(o)}},25112:function(e,t,n){const r=n(50192);e.exports=(e,t)=>r(e,t,!0)},50192:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},13751:function(e,t,n){const r=n(38675),a=n(42969);e.exports=(e,t)=>{if(a(e,t))return null;{const n=r(e),a=r(t),o=n.prerelease.length||a.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==a[e])return i+e;return s}}},42969:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0===r(e,t,n)},74765:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>0},71767:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>=0},20177:function(e,t,n){const r=n(88208);e.exports=(e,t,n,a)=>{"string"==typeof n&&(a=n,n=void 0);try{return new r(e,n).inc(t,a).version}catch(e){return null}}},63590:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<0},94638:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<=0},51847:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).major},87989:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).minor},74619:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0!==r(e,t,n)},38675:function(e,t,n){const{MAX_LENGTH:r}=n(29609),{re:a,t:o}=n(75698),i=n(88208),s=n(75265);e.exports=(e,t)=>{if(t=s(t),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},8906:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).patch},85676:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},82576:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(t,e,n)},25709:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},53907:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},21978:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},55641:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},53377:function(e,t,n){const r=n(75698);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(29609).SEMVER_SPEC_VERSION,SemVer:n(88208),compareIdentifiers:n(15322).compareIdentifiers,rcompareIdentifiers:n(15322).rcompareIdentifiers,parse:n(38675),valid:n(55641),clean:n(52045),inc:n(20177),diff:n(13751),major:n(51847),minor:n(87989),patch:n(8906),prerelease:n(85676),compare:n(50192),rcompare:n(82576),compareLoose:n(25112),compareBuild:n(58230),sort:n(21978),rsort:n(25709),gt:n(74765),lt:n(63590),eq:n(42969),neq:n(74619),gte:n(71767),lte:n(94638),cmp:n(48937),coerce:n(12977),Comparator:n(45702),Range:n(55062),satisfies:n(53907),toComparators:n(76055),maxSatisfying:n(33422),minSatisfying:n(17212),minVersion:n(9077),validRange:n(53140),outside:n(44494),gtr:n(2824),ltr:n(34370),intersects:n(30723),simplifyRange:n(23589),subset:n(34992)}},29609:function(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},72840:function(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},15322:function(e){const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},75265:function(e){const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},75698:function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(29609),a=n(72840),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let l=0;const c=(e,t,n)=>{const r=l++;a(r,t),s[e]=r,i[r]=t,o[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},2824:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,">",n)},30723:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},34370:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,"<",n)},33422:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},17212:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},9077:function(e,t,n){const r=n(88208),a=n(55062),o=n(74765);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!o(n,i)||(n=i)}return n&&e.test(n)?n:null}},44494:function(e,t,n){const r=n(88208),a=n(45702),{ANY:o}=a,i=n(55062),s=n(53907),l=n(74765),c=n(63590),u=n(94638),p=n(71767);e.exports=(e,t,n,d)=>{let m,h,f,g,b;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,g=">",b=">=";break;case"<":m=c,h=p,f=l,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,s=null;if(r.forEach((e=>{e.semver===o&&(e=new a(">=0.0.0")),i=i||e,s=s||e,m(e.semver,i.semver,d)?i=e:f(e.semver,s.semver,d)&&(s=e)})),i.operator===g||i.operator===b)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===b&&f(e,s.semver))return!1}return!0}},23589:function(e,t,n){const r=n(53907),a=n(50192);e.exports=(e,t,n)=>{const o=[];let i=null,s=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l){r(e,t,n)?(s=e,i||(i=e)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},34992:function(e,t,n){const r=n(55062),a=n(45702),{ANY:o}=a,i=n(53907),s=n(50192),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new a(">=0.0.0-0")]:[new a(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new a(">=0.0.0")]}const r=new Set;let l,p,d,m,h,f,g;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?p=u(p,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&p){if(d=s(l.semver,p.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==p.operator))return null}for(const e of r){if(l&&!i(e,String(l),n))return null;if(p&&!i(e,String(p),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let b=!(!p||n.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(m=c(l,e,n),m===e&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,String(e),n))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(h=u(p,e,n),h===e&&h!==p)return!1}else if("<="===p.operator&&!i(p.semver,String(e),n))return!1;if(!e.operator&&(p||l)&&0!==d)return!1}return!(l&&f&&!p&&0!==d)&&(!(p&&g&&!l&&0!==d)&&(!v&&!b))},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},76055:function(e,t,n){const r=n(55062);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},53140:function(e,t,n){const r=n(55062);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},88090:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7478),a={contextDelimiter:"",onMissingKey:null};function o(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},a)this.options[n]=void 0!==t&&n in t?t[n]:a[n]}o.prototype.getPluralForm=function(e,t){var n,a,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(a=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(a)),i=this.pluralForms[e]=o),i(t)},o.prototype.dcnpgettext=function(e,t,n,r,a){var o,i,s;return o=void 0===a?0:this.getPluralForm(e,a),i=n,t&&(i=t+this.options.contextDelimiter+n),(s=this.data[e][i])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)}},80816:function(e,t,n){"use strict";var r=n(95339),a=n.n(r),o=n(92819);const i=a()("dops:analytics");let s,l;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(e,t,n){c.setUser(e,t),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){s=e},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Built stat "%s" in group "%s"',t,e);return n}(e,t);this.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){c.tracks.recordPageView(e),c.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,o,i){c.ga.recordPurchase(e,t,n,r,a,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(i("- Super Props: %o",s),t=(0,o.assign)(t,s)),i('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):i('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};c.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){c.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){i("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};c.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),c.ga.initialized=!0)},recordPageView:function(e,t){c.ga.initialize(),i("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){c.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),i(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:a,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){l&&window._tkq.push(["identifyUser",l.ID,l.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=c},4096:function(e,t,n){"use strict";n.d(t,{Pb:function(){return r.Z},lQ:function(){return a.Z},Wp:function(){return o.Wp},Ug:function(){return o.Ug},M6:function(){return o.M6},OZ:function(){return i.Z},o_:function(){return s.Z}});var r=n(34239),a=n(99574),o=n(14588),i=n(22181),s=n(2528)},34239:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(){var e,t;return"object"==typeof window&&null!==(e=null===(t=window)||void 0===t?void 0:t.Jetpack_Editor_Initial_State)&&void 0!==e?e:null}},22181:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(34239);function a(e){var t,n,a,o,i,s,l,c,u;const p=(0,r.Z)(),d=null!==(t=null==p||null===(n=p.available_blocks)||void 0===n||null===(a=n[e])||void 0===a?void 0:a.available)&&void 0!==t&&t,m=null!==(o=null==p||null===(i=p.available_blocks)||void 0===i||null===(s=i[e])||void 0===s?void 0:s.unavailable_reason)&&void 0!==o?o:"unknown",h=null!==(l=null==p||null===(c=p.available_blocks)||void 0===c||null===(u=c[e])||void 0===u?void 0:u.details)&&void 0!==l?l:[];return{available:d,...!d&&{details:h,unavailableReason:m}}}},99574:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},2528:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(98817),a=n(22181);function o(e,t){const{available:n,unavailableReason:o}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},14588:function(e,t,n){"use strict";n.d(t,{Wp:function(){return o},Ug:function(){return i},M6:function(){return s}});var r=n(34239);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function i(){return"atomic"===a()}function s(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_private_site)&&void 0!==e&&e}},9481:function(e,t){"use strict";const n={i18n_default_locale_slug:"en",mc_analytics_enabled:!0,google_analytics_enabled:!1,google_analytics_key:null};t.Z=function(e){if(e in n)return n[e];throw new Error("config key `"+e+"` does not exist")}},11973:function(e,t,n){"use strict";var r=n(9481),a=n(80816);a.Z.setMcAnalyticsEnabled((0,r.Z)("mc_analytics_enabled")),a.Z.setGoogleAnalyticsEnabled((0,r.Z)("google_analytics_enabled"),(0,r.Z)("google_analytics_key")),t.Z=a.Z},78953:function(e,t,n){"use strict";var r=n(68039);t.Z={backgroundColor:{type:"string",validator:r.Z},textColor:{type:"string",validator:r.Z},buttonAndLinkColor:{type:"string",validator:r.Z},style:{type:"string",default:"small",validValues:["small","large"]},asin:{type:"string"},showImage:{default:!0,type:"boolean"},showTitle:{default:!0,type:"boolean"},showSeller:{default:!1,type:"boolean"},showPrice:{default:!0,type:"boolean"},showPurchaseButton:{default:!0,type:"boolean"}}},44046:function(e,t){"use strict";t.Z={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]}},23609:function(e,t,n){"use strict";var r=n(69307),a=n(55066),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(4981),u=n(33352),p=n(44046);const __=i.__;t.Z=(0,l.withNotices)((function(e){let{attributes:{backgroundColor:t,textColor:n,buttonAndLinkColor:a,asin:i,showImage:d,showTitle:m,showSeller:h,showPrice:f,showPurchaseButton:g},className:b,name:v,noticeUI:k,setAttributes:y}=e;const E=(0,c.getBlockDefaultClassName)(v),[w,_]=(0,r.useState)([]),C=/^(\d+)$|\(ASIN:(.+)\)$/,j=(0,r.createElement)(l.Placeholder,{label:__("Amazon","jetpack"),instructions:__("Search by entering an Amazon product name or ID below.","jetpack"),icon:u.Z,notices:k},(0,r.createElement)("form",null,(0,r.createElement)(l.FormTokenField,{value:i,suggestions:w,onInputChange:()=>{_(p.Z.products.map((e=>`${e.title} (ASIN:${e.asin})`)))},maxSuggestions:10,label:__("Products","jetpack"),onChange:e=>{const t=e.map((e=>{const t=C.exec(e),n=t[1]||t[2];return p.Z.products.filter((e=>e.asin===n))}));y({asin:t[0][0].asin})}}),(0,r.createElement)(l.Button,{isSecondary:!0,isLarge:!0,type:"submit"},__("Preview","jetpack")))),S=(0,r.createElement)(s.InspectorControls,null,i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PanelBody,{title:__("Promotion Settings","jetpack")},(0,r.createElement)(l.ToggleControl,{label:__("Show Image","jetpack"),checked:d,onChange:()=>y({showImage:!d})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Title","jetpack"),checked:m,onChange:()=>y({showTitle:!m})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Author/Seller","jetpack"),checked:h,onChange:()=>y({showSeller:!h})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Price","jetpack"),checked:f,onChange:()=>y({showPrice:!f})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Purchase Button","jetpack"),checked:g,onChange:()=>y({showPurchaseButton:!g})})),(0,r.createElement)(s.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:t,onChange:e=>y({backgroundColor:e}),label:__("Background Color","jetpack")},{value:n,onChange:e=>y({textColor:e}),label:__("Text Color","jetpack")},{value:a,onChange:e=>y({buttonAndLinkColor:e}),label:__("Button & Link Color","jetpack")}]},(0,r.createElement)(s.ContrastChecker,{isLargeText:!1,textColor:n,backgroundColor:t}))));return(0,r.createElement)("div",{className:b},S,i?(()=>{const{title:e,detailPageUrl:s,listPrice:c,imageUrlMedium:b,imageWidthMedium:v,imageHeightMedium:k}=p.Z.products.filter((e=>e.asin===i))[0],y="TODO",w=b&&(0,r.createElement)("a",{target:"_blank",href:s,rel:"noopener noreferrer"},(0,r.createElement)("img",{alt:e,src:b,width:v,heigth:k})),_=o().mostReadable(a,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString();return i?(0,r.createElement)("div",{style:{backgroundColor:t,color:n,width:v}},d&&w,m&&(0,r.createElement)("div",{className:`${E}-title`},(0,r.createElement)(l.ExternalLink,{href:s,style:{color:a}},e)),h&&(0,r.createElement)("div",{className:`${E}-seller`},y),f&&(0,r.createElement)("div",{className:`${E}-list-price`},c),g&&(0,r.createElement)(l.Button,{href:s,icon:u.Z,isPrimary:!0,className:`${E}-button`,style:{color:_,backgroundColor:a,borderColor:a}},__("Shop Now","jetpack"))):null})():j)}))},33352:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"m13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277002-.202-.481003.154-.251003.416 2.925003 3.326 6.786003 5.326 11.076003 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",fillRule:"evenodd"}))},6007:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(65736),a=n(78953),o=n(23609),i=n(33352),s=n(57535);const __=r.__,l="amazon",c=__("Amazon","jetpack"),u={attributes:a.Z,title:c,description:__("Promote Amazon products and earn a commission from sales.","jetpack"),icon:{src:i.Z,foreground:(0,s.m)()},category:"earn",keywords:[__("amazon","jetpack"),__("affiliate","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:o.Z,save:()=>null,example:{attributes:{}}}},22874:function(e,t,n){"use strict";n.d(t,{J:function(){return p},F:function(){return d}});var r=n(4981),a=n(9818),o=n(65736),i=n(57535),s=n(41362);const _x=o._x,__=o.__;function l(e){let{spotifyShowUrl:t,spotifyImageUrl:n}=e;return[["core/image",{url:n,linkDestination:"none",href:t,align:"center",width:165,height:40,className:"is-spotify-podcast-badge"}]]}function c(e){let{episodeTrack:t,feedUrl:n}=e;const{guid:r}=t;return[["jetpack/podcast-player",{customPrimaryColor:(0,i.m)(),hexPrimaryColor:(0,i.m)(),url:n,selectedEpisodes:r?[{guid:r}]:[],showCoverArt:!1,showEpisodeTitle:!1,showEpisodeDescription:!1}]]}function u(e){let{spotifyShowUrl:t,spotifyImageUrl:n,episodeTrack:o={},feedUrl:i}=e;const s=[...c({episodeTrack:o,feedUrl:i})];return t&&n&&s.push(...l({spotifyShowUrl:t,spotifyImageUrl:n})),s.push(...function(e){let{episodeTrack:t}=e;const n=[["core/heading",{level:3,content:_x("Summary","noun: summary of a podcast episode","jetpack"),placeholder:__("Podcast episode title","jetpack")}]],a=(0,r.pasteHandler)({HTML:t.description_html,mode:"BLOCKS"});return a.length?n.push(...a):n.push(["core/paragraph",{placeholder:__("Podcast episode summary","jetpack")}]),n}({episodeTrack:o})),s.push(...function(){const e="jetpack/conversation";return(0,a.select)("core/blocks").getBlockType(e)?[[e,{participants:[{slug:"participant-0",label:__("Speaker 1","jetpack")},{slug:"participant-1",label:__("Speaker 2","jetpack")},{slug:"participant-2",label:__("Speaker 3","jetpack")}]},[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-0"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-1"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-2"}]]]]:[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}]]}()),s}function p(e){return(0,s.Z)(u(e))}function d(e){if(e.spotifyImageUrl&&e.spotifyShowUrl)return(0,s.Z)([...l(e)])}},63533:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819);const __=l.__,p="09:00",d="17:00";class m extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,{opening:r,closing:a}=e;return(0,o.createElement)(o.Fragment,{key:t},(0,o.createElement)("div",{className:"business-hours__row"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.TextControl,{type:"time",label:__("Opening","jetpack"),value:r,className:"business-hours__open",placeholder:p,onChange:e=>{this.setHour(e,"opening",t)}}),(0,o.createElement)(c.TextControl,{type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:d,onChange:e=>{this.setHour(e,"closing",t)}})),(0,o.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,o.createElement)(c.Button,{isSmall:!0,isLink:!0,icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,o.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")}," "),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.Button,{isLink:!0,label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,o.createElement)("div",{className:"business-hours__remove"}," ")))})),a()(this,"setHour",((e,t,n)=>{const{day:r,attributes:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})})),a()(this,"toggleClosed",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:p,closing:d}]:[];return{...n,hours:t}}return n}))})})),a()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),a()(this,"removeInterval",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})}))}isClosed(){const{day:e}=this.props;return(0,u.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,o.createElement)(c.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,o.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,o.createElement)("div",{className:s()(e.name,"business-hours__day")},this.renderDayToggle()),(0,o.createElement)("div",{className:s()(e.name,"closed","business-hours__hours")}," "),(0,o.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=m},20920:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(69771),l=n(92819);const _x=i._x;class c extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,r=n.hours;return(0,o.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,o.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,s.date)(t,a))}render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,o.createElement)("div",{className:"jetpack-business-hours__item"},(0,o.createElement)("dt",{className:e.name},t.days[e.name]),(0,o.createElement)("dd",null,(0,l.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,o.createElement)("br",null)))}}t.Z=c},85932:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(27538),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(89105),p=n.n(u),d=n(65736),m=n(69771),h=n(55609),f=n(63533),g=n(20920),b=n(8042);const __=d.__,v={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class k extends s.Component{constructor(){super(...arguments),i()(this,"state",{localization:v,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:v},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:v,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:o,hasFetched:i}=this.state,{startOfWeek:l}=o,c=r.concat(r.slice(0,l)).slice(l);if(!i)return(0,s.createElement)(h.Placeholder,{icon:b.qv,label:__("Loading business hours","jetpack")});if(!n){const e=(0,m.__experimentalGetSettings)(),{formats:{time:n}}=e;return(0,s.createElement)("dl",{className:p()(t,"jetpack-business-hours")},c.map(((e,t)=>(0,s.createElement)(g.Z,{key:t,day:e,localization:o,timeFormat:n}))))}return(0,s.createElement)("div",{className:p()(t,"is-edit")},c.map(((e,t)=>(0,s.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}t.Z=k},8042:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(85932),s=n(41632),l=n(57535);const __=a.__,_x=a._x,c=[{name:"Sun",hours:[]},{name:"Mon",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Tue",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Wed",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Thu",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Fri",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Sat",hours:[]}],u="business-hours",p=(0,s.Z)((0,r.createElement)(o.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),d={title:__("Business Hours","jetpack"),description:__("Display opening hours for your business.","jetpack"),icon:{src:p,foreground:(0,l.m)()},category:"grow",supports:{html:!0,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},keywords:[_x("opening hours","block search term","jetpack"),_x("closing time","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("working day","block search term","jetpack")],attributes:{days:{type:"array",default:c}},edit:e=>(0,r.createElement)(i.Z,e),save:()=>null,example:{attributes:{days:c}}}},83487:function(e,t,n){"use strict";var r=n(92819),a=n(55609);const o=(0,a.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:a}=t,o=(0,r.get)(n,"color"),i=!(0,r.get)(a,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:a||!i?void 0:getComputedStyle(i).color}}));t.Z=o},70443:function(e,t,n){"use strict";var r=n(68039);t.Z={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},24429:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(77012);const __=o.__;function s(e){let{borderRadius:t="",setAttributes:n}=e;const o=(0,r.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.RangeControl,{allowReset:!0,initialPosition:i.pg,label:__("Border radius","jetpack"),max:i.Gp,min:i.G0,onChange:o,value:t}))}},63020:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(65736);const __=o.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:o,fallbackTextColor:i,gradientValue:s,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(a.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:o,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},80790:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},h:function(){return d}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=[{value:"px",label:"px",default:150},{value:"%",label:"%",default:100},{value:"em",label:"em",default:10}],c=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function p(e){return(0,r.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,r.createElement)(d,e))}function d(e){let{align:t,width:n,onChange:a}=e;const[s,p]=(0,r.useState)(null);(0,r.useEffect)((()=>{void 0===n&&p("px")}),[n]);const d="left"===t||"right"===t;return(0,r.createElement)(i.BaseControl,{label:__("Button width","jetpack")},(0,r.createElement)("div",{className:o()("jetpack-button__width-settings",{"is-aligned":d})},!d&&(0,r.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},u.map((e=>(0,r.createElement)(i.Button,{key:e,isSmall:!0,isPrimary:e===n,onClick:()=>function(e){const t=n===e?void 0:e;p("%"),a(t)}(e)},e)))),(0,r.createElement)(i.__experimentalUnitControl,{className:"jetpack-button__custom-width",isResetValueOnUnitChange:!0,max:"%"===s||null!=n&&n.includes("%")?100:void 0,min:0,onChange:e=>a(e),onUnitChange:e=>p(e),size:"small",units:d?c:l,value:n,unit:s})))}},77012:function(e,t,n){"use strict";n.d(t,{DA:function(){return a},pg:function(){return o},Gp:function(){return i},G0:function(){return s}});var r=n(52175);const a=!!r.__experimentalUseGradient,o=5,i=50,s=0},78593:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(24429),o=n(63020),i=n(80790);function s(e){let{attributes:t,backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,setAttributes:c,setBackgroundColor:u,setTextColor:p,textColor:d,gradientValue:m,setGradient:h,isGradientAvailable:f}=e;const{align:g,borderRadius:b,width:v}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Z,{backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,gradientValue:m,setBackgroundColor:u,setGradient:h,setTextColor:p,textColor:d,isGradientAvailable:f}),(0,r.createElement)(a.Z,{borderRadius:b,setAttributes:c}),(0,r.createElement)(i.Z,{align:g,width:v,onChange:e=>c({width:e})}))}},16867:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(52175),c=n(94333),u=n(65736),p=n(83487),d=n(78593),m=n(77012),h=n(31123);const __=u.__;t.Z=(0,c.compose)((0,l.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:i,setAttributes:c,textColor:u}=e,{align:p,borderRadius:f,element:g,placeholder:b,text:v,width:k}=t,y=(e=>{const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current})(p);(0,h.Z)({attributes:t,clientId:i,setAttributes:c}),(0,o.useEffect)((()=>{y!==p&&("left"===p||"right"===p)&&null!=k&&k.includes("%")&&c({width:void 0})}),[p,y,c,k]);const{gradientClass:E,gradientValue:w,setGradient:_}=m.DA?(0,l.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},C=s()("wp-block-button",r),j=s()("wp-block-button__link",{"has-background":n.color||w,[n.class]:!w&&n.class,"has-text-color":u.color,[u.class]:u.class,[E]:E,"no-border-radius":0===f,"has-custom-width":!!k}),S={...!n.color&&w?{background:w}:{backgroundColor:n.color},color:u.color,borderRadius:f?f+"px":void 0,width:k};return(0,o.createElement)("div",{className:C},(0,o.createElement)(l.RichText,{allowedFormats:"input"===g?[]:void 0,className:j,disableLineBreaks:"input"===g,onChange:e=>{const t="input"===g?e.replace(/<br>/gim," "):e;c({text:t})},placeholder:b||__("Add text…","jetpack"),style:S,value:v,withoutInteractiveFormatting:!0}),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(d.Z,a()({gradientValue:w,setGradient:_,isGradientAvailable:m.DA},e))))}))},51245:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},32278:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(65736),a=n(70443),o=n(16867),i=n(51245),s=n(41328),l=n(20510);const __=r.__,c="button",u={title:__("Button","jetpack"),icon:i.Z,category:(0,l.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:a.Z,edit:o.Z,save:s.Z}},41328:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(77012);function l(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:b,url:v,width:k}=t;if(!f)return null;const y=(0,i.getColorClassName)("background-color",l),E=s.DA?(0,i.__experimentalGetGradientClass)(h):void 0,w=(0,i.getColorClassName)("color",b),_=o()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),C=o()("wp-block-button__link",{"has-text-color":b||m,[w]:w,"has-background":l||h||p||d,[y]:y,[E]:E,"no-border-radius":0===c,"has-custom-width":!!k}),j={background:d||void 0,backgroundColor:y||d||h?void 0:p,color:w?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,r.createElement)("div",{className:_},(0,r.createElement)(i.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:v,id:a,rel:"noopener noreferrer",role:"button",style:j,tagName:"a",target:"_blank",value:g}))}},31123:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(9818),o=n(69307);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:l}=(0,a.useSelect)((e=>{const{getBlockAttributes:a,getBlockRootClientId:o}=e("core/block-editor"),i=a(o(n))||{},l=(0,r.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,r.pickBy)(l,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,r.isEmpty)(l)||i(l)}),[l,i])}},35932:function(e,t,n){"use strict";var r=n(68039);t.Z={backgroundColor:{type:"string",default:"ffffff",validator:r.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:r.Z},textColor:{type:"string",default:"4D5055",validator:r.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},16485:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(72566);const __=i.__,_x=i._x,l=e=>{let{onEditClick:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},c=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:i,parseEmbedCode:s,setAttributes:l,setEmbedCode:c}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:s,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>c(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(o.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(o.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>l({hideEventTypeDetails:!t})})),n&&(0,r.createElement)(o.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(o.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},__("Follow these instructions to change the colors in this block.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:u}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(l,{onEditClick:u})),d&&(0,r.createElement)(s.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c,e)))}},77017:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(68039);const __=o.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:o,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},96537:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=(n(86841),n(92819)),s=n(5157),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(9818),m=n(59040),h=n(35932),f=n(14087),g=n(79042),b=n(79884),v=n(87072),k=n(16485);const __=u.__,_x=u._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:u,noticeOperations:y,noticeUI:E,setAttributes:w}=e,_=(0,p.getBlockDefaultClassName)(u),C=(0,f.S)(h.Z,t);(0,i.isEqual)(C,t)||w(C);const{backgroundColor:j,hideEventTypeDetails:S,primaryColor:x,textColor:P,style:T,url:N}=C,[A,I]=(0,o.useState)(N),[B,M]=(0,o.useState)(!1),[R,L]=(0,o.useState)(!1),[Z,D]=(0,o.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,o.useEffect)((()=>{N&&b.lR!==N&&"link"!==T&&(0,v.Z)(N,L).catch((()=>{w({url:void 0}),F()}))}),[]);const O=e=>{if(!e)return void F();e.preventDefault();const t=(0,g.CC)(A);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,d.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,d.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),D(t.buttonAttributes)}(0,v.Z)(t.url,L).then((()=>{const e=(0,f.S)(h.Z,t);w(e),M(!1),y.removeAllNotices()})).catch((()=>{w({url:void 0}),F()}))}else F()},z=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(c.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:m.Z,notices:E},(0,o.createElement)("form",{onSubmit:O},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:A||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(c.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=s.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:S?1:0,background_color:j,primary_color:x,text_color:P});return`${N}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),V=(0,o.createElement)(l.InnerBlocks,{template:[[b.Ss.name,{...b.Ss.attributes,...Z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(R)return z;let G=n;return N&&!B&&(G+=` calendly-style-${T}`),(0,o.createElement)("div",{className:G},(0,o.createElement)(k.ZP,a()({},e,{defaultClassName:_,embedCode:A,isEditingUrl:B,parseEmbedCode:O,setEmbedCode:I,setIsEditingUrl:M})),N&&!B?"inline"===T?$:V:U)}))},59040:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},79884:function(e,t,n){"use strict";n.d(t,{lR:function(){return d},Ss:function(){return m},u2:function(){return h},Xd:function(){return f}});var r=n(65736),a=n(4981),o=n(35932),i=n(77017),s=n(96537),l=n(59040),c=n(56610),u=n(79042),p=n(57535);const __=r.__,_x=r._x,d="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:d}},h="calendly",f={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:l.Z,foreground:(0,p.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:s.Z,save:c.Z,attributes:o.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:d},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&u.mL.test(e.textContent),transform:e=>{const t=(0,u.CC)(e.textContent);return(0,a.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]}},56610:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null))}},79042:function(e,t,n){"use strict";n.d(t,{mL:function(){return r},CC:function(){return a}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),a=r.get("background_color"),o=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},89534:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouHeading:{type:"string",default:__("Message Sent","jetpack")},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}}},60689:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__('The CRM Jetpack Form extension failed to activate. The error message was "<error />".',"jetpack"),{error:(0,r.createElement)("span",null,t)}))}},81316:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(60689);const __=s.__,c=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:s,crmData:c,setCRMData:u}=e;const p=((e,t,n,r)=>()=>{t(void 0),e(!0),o()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((e=>{if("success"!==e.code)throw new Error(e.code);const t=Object.assign({},n);t.jp_form_ext_enabled=!0,r(t)})).catch((e=>{t(e.message)})).finally((()=>{e(!1)}))})(n,s,c,u);return t?(0,r.createElement)(i.Spinner,null):a?(0,r.createElement)(l.Z,{error:a}):(0,r.createElement)(i.Button,{isSecondary:!0,onClick:p},__("Enable Jetpack Forms Extension","jetpack"))},u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("A site administrator must enable the CRM Jetpack Forms extension.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"));t.Z=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s}=e;return i.can_activate_extension?(0,r.createElement)("div",null,(0,r.createElement)(p,null),(0,r.createElement)("br",null),(0,r.createElement)(c,{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s})):(0,r.createElement)(u,null)}},36080:function(e,t,n){"use strict";var r=n(69307),a=n(53377),o=n.n(a),i=n(55609),s=n(65736),l=n(81316);const __=s.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Jetpack CRM is installed but has an invalid version.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Zero BS CRM plugin is now Jetpack CRM. Update to the latest version to integrate your contact form with your CRM.","jetpack")),d=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},(0,r.createInterpolateElement)(__("You can save contacts from Jetpack contact forms in Jetpack CRM. Learn more at <a>jetpackcrm.com</a>","jetpack"),{a:(0,r.createElement)(i.ExternalLink,{href:"https://jetpackcrm.com"})})),m=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You already have the Jetpack CRM plugin installed, but it's not activated. Activate the Jetpack CRM plugin to save contacts from this contact form in your Jetpack CRM.","jetpack")),h=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:s}=e;const[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(!1);return t.jp_form_ext_enabled?o().satisfies(o().coerce(t.crm_version),"3.0.19 - 4.0.0")?(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Contacts from this form will be stored in Jetpack CRM.","jetpack")):(0,r.createElement)(i.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:__("Jetpack CRM","jetpack"),checked:a,onChange:e=>s({jetpackCRM:e}),help:__("Store contact form submissions in your CRM.","jetpack")}):(0,r.createElement)(l.Z,{isActivatingExt:c,setIsActivatingExt:u,extActivationError:p,setExtActivationError:d,crmData:t,setCRMData:n})};t.Z=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}=e;const s=o().coerce(t.crm_version);if(t.crm_installed&&!s)return(0,r.createElement)(u,null);if(t.crm_installed&&o().lt(s,"3.0.19"))return(0,r.createElement)(p,null);let l=c.NOT_INSTALLED;return t.crm_active?l=c.ACTIVE:t.crm_installed&&(l=c.INSTALLED),(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===l&&(0,r.createElement)(h,{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}),c.INSTALLED===l&&(0,r.createElement)(m,null),c.NOT_INSTALLED===l&&(0,r.createElement)(d,null))}},6361:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(36080);const __=s.__,c=e=>{let{isFetchingCRMData:t,hasCRMDataError:n,crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c}=e;return t?(0,r.createElement)(i.Spinner,null):n?null:(0,r.createElement)(l.Z,{crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c})};t.Z=e=>{let{jetpackCRM:t,setAttributes:n}=e;const[a,s]=(0,r.useState)(!0),[l,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)();return(0,r.useEffect)((()=>{o()({path:"/jetpack/v4/jetpack_crm"}).then((e=>{if(e.error)throw e.message;u(!1),d(e)})).catch((()=>u(!0))).finally((()=>s(!1)))}),[]),(0,r.createElement)(i.PanelBody,{title:__("CRM Integration","jetpack"),initialOpen:!1},(0,r.createElement)(i.BaseControl,null,(0,r.createElement)(c,{isFetchingCRMData:a,hasCRMDataError:l,crmData:p,setCRMData:d,jetpackCRM:t,setAttributes:n})))}},69802:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(80500),c=n(8523);const __=a.__;t.Z=(0,s.withInstanceId)((function(e){const{id:t,instanceId:n,required:a,label:s,setAttributes:u,width:p,defaultValue:d}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-checkbox-${n}`,className:"jetpack-field jetpack-field-checkbox",label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:d}),(0,r.createElement)(l.Z,{required:a,label:s,setAttributes:u}),(0,r.createElement)(c.Z,{id:t,required:a,width:p,setAttributes:u}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Checkbox Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Checked by default","jetpack"),checked:d,onChange:e=>u({defaultValue:e?"true":""})}))))})}))},57324:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(80500),c=n(84803),u=n(10745);const __=a.__;t.Z=(0,s.withInstanceId)((e=>{var t;let{id:n,instanceId:s,width:p,consentType:d,implicitConsentMessage:m,explicitConsentMessage:h,setAttributes:f}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-consent-${s}`,className:"jetpack-field jetpack-field-consent",label:(0,r.createElement)(r.Fragment,null,"explicit"===d&&(0,r.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),(0,r.createElement)(l.Z,{required:!1,label:null!==(t={implicit:m,explicit:h}[d])&&void 0!==t?t:"",setAttributes:f,labelFieldName:`${d}ConsentMessage`,placeholder:(0,a.sprintf)(
3
  /* translators: placeholder is a type of consent: implicit or explicit */
4
+ __("Add %s consent message…","jetpack"),d)}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(c.Z,{setAttributes:f,width:p}))),(0,r.createElement)(i.InspectorAdvancedControls,null,(0,r.createElement)(u.Z,{setAttributes:f,id:n})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Consent Settings","jetpack")},(0,r.createElement)(o.BaseControl,null,(0,r.createElement)(o.SelectControl,{label:__("Permission to email","jetpack"),value:d,options:[{label:__("Mention that you can email","jetpack"),value:"implicit"},{label:__("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:e=>f({consentType:e})})))))})}))},8523:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(41632),l=n(84803),c=n(10745);const __=a.__;t.Z=e=>{let{setAttributes:t,width:n,id:a,required:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{title:__("Required","jetpack"),icon:(0,s.Z)((0,r.createElement)(i.Path,{d:"M8.23118 8L16 16M8 16L15.7688 8 M6.5054 11.893L17.6567 11.9415M12.0585 17.6563L12 6.5",stroke:"currentColor"})),onClick:()=>{t({required:!u})},className:u?"is-pressed":void 0}))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Field is required","jetpack"),className:"jetpack-field-label__required",checked:u,onChange:e=>t({required:e}),help:__("Does this field have to be completed for the form to be submitted?","jetpack")}),(0,r.createElement)(l.Z,{setAttributes:t,width:n}))),(0,r.createElement)(o.InspectorAdvancedControls,null,(0,r.createElement)(c.Z,{setAttributes:t,id:a})))}},10745:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,id:n}=e;return(0,r.createElement)(o.TextControl,{label:__("Unique CSS ID","jetpack"),value:n,onChange:e=>t({id:e}),help:__("A unique ID that can be used in CSS or as an anchor.","jetpack")})}},80500:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175);const __=a.__;t.Z=e=>{let{setAttributes:t,label:n,labelFieldName:a,placeholder:i,resetFocus:s,required:l}=e;return(0,r.createElement)("div",{className:"jetpack-field-label"},(0,r.createElement)(o.RichText,{tagName:"label",value:n,className:"jetpack-field-label__input",onChange:e=>{s&&s(),t(a?{[a]:e}:{label:e})},placeholder:null!=i?i:__("Add label…","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),l&&(0,r.createElement)("span",{className:"required"},__("(required)","jetpack")))}},56764:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(80500),l=n(29110),c=n(8523);const __=a.__;t.Z=(0,i.withInstanceId)((function(e){const{id:t,type:n,instanceId:a,required:i,label:u,setAttributes:p,isSelected:d,width:m,options:h}=e,[f,g]=(0,r.useState)(null),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=h.slice(0);null===t?(n.splice(e,1),e>0&&g(e-1)):(n.splice(e,1,t),g(e)),p({options:n})},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=h.slice(0);let n=0;"object"==typeof e?(t.push(""),n=t.length-1):(t.splice(e+1,0,""),n=e+1),g(n),p({options:t})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{id:`jetpack-field-multiple-${a}`,className:"jetpack-field jetpack-field-multiple",label:(0,r.createElement)(s.Z,{required:i,label:u,setAttributes:p,isSelected:d,resetFocus:()=>g(null)})},(0,r.createElement)("ol",{className:"jetpack-field-multiple__list",id:`jetpack-field-multiple-${a}`},h.map(((e,t)=>(0,r.createElement)(l.Z,{type:n,key:t,option:e,index:t,onChangeOption:b,onAddOption:v,isInFocus:t===f&&d,isSelected:d})))),d&&(0,r.createElement)(o.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:__("Insert option","jetpack"),onClick:v},__("Add option","jetpack"))),(0,r.createElement)(c.Z,{id:t,required:i,setAttributes:p,width:m}))}))},7640:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(80500),s=n(8523);const __=a.__;function l(e){const{id:t,required:n,label:a,setAttributes:l,placeholder:c,width:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"jetpack-field"},(0,r.createElement)(i.Z,{required:n,label:a,setAttributes:l}),(0,r.createElement)(o.Disabled,null,(0,r.createElement)(o.TextareaControl,{placeholder:c,value:c,onChange:e=>l({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,r.createElement)(s.Z,{id:t,required:n,setAttributes:l,width:u}))}},84803:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,width:n}=e;return(0,r.createElement)(o.BaseControl,{label:__("Field Width","jetpack"),help:__("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},(0,r.createElement)(o.ButtonGroup,{"aria-label":__("Field Width","jetpack")},[25,50,75,100].map((e=>(0,r.createElement)(o.Button,{key:e,isSmall:!0,isPrimary:e===n,onClick:()=>t({width:e})},e,"%")))))}},36755:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(29183),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(55609),c=n(92694),u=n(80500),p=n(8523);const __=i.__;function d(e){const{id:t,type:n,required:r,label:a,setAttributes:i,placeholder:s,width:c}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"jetpack-field"},(0,o.createElement)(u.Z,{required:r,label:a,setAttributes:i}),(0,o.createElement)(l.Disabled,null,(0,o.createElement)(l.TextControl,{type:n,placeholder:s,value:s,onChange:e=>i({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,o.createElement)(p.Z,{id:t,required:r,width:c,setAttributes:i}))}const m=(0,s.createHigherOrderComponent)((e=>t=>{if(t.name.indexOf("jetpack/field")>-1){const n=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return(0,o.createElement)(e,a()({},t,{className:n}))}return(0,o.createElement)(e,t)}),"withCustomClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/contact-form",m)},32605:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(9818),s=n(4981);const __=o.__,l=()=>{const{insertConsentBlock:e}=(()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),{insertBlock:t}=(0,i.useDispatch)("core/block-editor");return{insertConsentBlock:(0,r.useCallback)((async()=>{var n;let r=(null!==(n=e.innerBlocks)&&void 0!==n?n:[]).findIndex((e=>{let{name:t}=e;return"jetpack/button"===t}));var a;-1===r&&(r=(null!==(a=e.innerBlocks)&&void 0!==a?a:[]).length);const o=await(0,s.createBlock)("jetpack/field-consent");await t(o,r,e.clientId,!1)}),[t,e.clientId,e.innerBlocks])}})();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("You’re already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),(0,r.createElement)(a.Button,{isSecondary:!0,onClick:e,style:{marginBottom:"1em"}},__("Add email permission request","jetpack")),(0,r.createElement)("br",null))};t.Z=()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);return(0,r.useMemo)((()=>(e=>{const t=e.some((e=>{let{name:t}=e;return"jetpack/field-email"===t})),n=e.some((e=>{let{name:t}=e;return"jetpack/field-consent"===t}));return!!t&&!n})(e.innerBlocks)),[e.innerBlocks])?(0,r.createElement)(l,null):null}},95363:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=(n(65736),n(92819)),i=n(99230),s=n(56994),l=n(58505);const c="creative-mail-by-constant-contact/creative-mail-plugin.php",u=e=>{let{pluginState:t,setPluginState:n}=e;const[a,o]=(0,r.useState)(),[i,c]=(0,r.useState)(!1),u=((e,t,n)=>(0,r.useCallback)(((r,a)=>{e(void 0),t(!0),r(a).then((()=>{n(l.Q.ACTIVE)})).catch((t=>{e(t)})).finally((()=>t(!1)))}),[t,e,n]))(o,c,n);return a?(0,r.createElement)(s.Z,{error:a}):(0,r.createElement)(l.Z,{pluginState:t,onCreativeMailPluginClick:u,isInstalling:i})},p=e=>{let{isFetchingPlugins:t,hasError:n,pluginState:o,setPluginState:i}=e;return t?(0,r.createElement)(a.Spinner,null):n?null:(0,r.createElement)(u,{pluginState:o,setPluginState:i})};t.Z=()=>{const[e,t]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[s,u]=(0,r.useState)(l.Q.NOT_INSTALLED);return(0,r.useEffect)((()=>{(0,i.uM)().then((e=>{a(!1),(0,o.get)(e,c)&&((0,o.get)(e,[c,"active"])?u(l.Q.ACTIVE):u(l.Q.INSTALLED))})).catch((()=>a(!0))).finally((()=>t(!1)))}),[u,t,a]),(0,r.createElement)(p,{isFetchingPlugins:e,hasError:n,pluginState:s,setPluginState:u})}},56994:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__("The plugin failed to install. <b /> Please check the <a>plugin information</a> for detailed requirements.","jetpack"),{a:(0,r.createElement)(a.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:(0,r.createElement)("span",null,t)}))}},58505:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(69307),a=n(4096),o=n(55609),i=n(65736),s=n(99230),l=n(92819);const __=i.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(o.Button,{isSecondary:!0,icon:(0,r.createElement)(o.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},p=e=>{let{installAndActivateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",null,(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,null),!n&&(0,r.createElement)(o.Button,{isSecondary:!0,onClick:t},__("Install Creative Mail plugin","jetpack"))))},d=e=>{let{activateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,{isActivating:!0}),!n&&(0,r.createElement)(o.Button,{isSecondary:!0,onClick:t},__("Activate Creative Mail Plugin","jetpack")))},m=()=>(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("You’re all setup for email marketing with Creative Mail.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:`${(0,l.get)((0,a.Pb)(),"adminUrl",!1)}admin.php?page=creativemail`},__("Open Creative Mail settings","jetpack"))));t.Z=e=>{let{pluginState:t,onCreativeMailPluginClick:n,isInstalling:a}=e;return(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===t&&(0,r.createElement)(m,null),c.INSTALLED===t&&(0,r.createElement)(d,{activateCreativeMailPlugin:()=>n(s.bu,"creative-mail-by-constant-contact/creative-mail-plugin"),isInstalling:a}),c.NOT_INSTALLED===t&&(0,r.createElement)(p,{installAndActivateCreativeMailPlugin:()=>n(s.yX,"creative-mail-by-constant-contact"),isInstalling:a}))}},31186:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(32605),s=n(95363);const __=o.__;t.Z=()=>(0,r.createElement)(a.PanelBody,{title:__("Newsletter Integration","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,null,(0,r.createElement)(i.Z,null),(0,r.createElement)(s.Z,null)))},29110:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;class i extends r.Component{constructor(){super(...arguments),this.onChangeOption=this.onChangeOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onDeleteOption=this.onDeleteOption.bind(this),this.textInput=(0,r.createRef)()}componentDidMount(){this.props.isInFocus&&this.textInput.current.focus()}componentDidUpdate(){this.props.isInFocus&&this.textInput.current.focus()}onChangeOption(e){this.props.onChangeOption(this.props.index,e.target.value)}onKeyPress(e){return"Enter"===e.key?(this.props.onAddOption(this.props.index),void e.preventDefault()):"Backspace"===e.key&&""===e.target.value?(this.props.onChangeOption(this.props.index),void e.preventDefault()):void 0}onDeleteOption(){this.props.onChangeOption(this.props.index)}render(){const{isSelected:e,option:t,type:n}=this.props;return(0,r.createElement)("li",{className:"jetpack-option"},n&&"select"!==n&&(0,r.createElement)("input",{className:"jetpack-option__type",type:n,disabled:!0}),(0,r.createElement)("input",{type:"text",className:"jetpack-option__input",value:t,placeholder:__("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),e&&(0,r.createElement)(o.Button,{className:"jetpack-option__remove",icon:"trash",label:__("Remove option","jetpack"),onClick:this.onDeleteOption}))}}t.Z=i},89998:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(4981),l=n(89534);const __=o.__,c=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],u={attributes:{...l.Z},supports:{html:!1},save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)},p={attributes:{submit_button_text:{type:"string",default:__("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:__("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"},...l.Z},migrate:(e,t)=>{const n=(0,a.omit)(e,c),r={text:e.submitButtonText||e.submit_button_text||__("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[n,t.concat((0,s.createBlock)("jetpack/button",{element:"button",...r}))]},isEligible:e=>!(!e.has_form_settings_set&&!e.hasFormSettingsSet),save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)};t.Z=[u,p]},31970:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(89105),i=n.n(o),s=n(89453),l=n(65736),c=n(94333),u=n(4981),p=n(9818),d=n(39630),m=n(52175),h=n(55609),f=n(4096),g=n(22985),b=n(12289),v=n(6361),k=n(31186);const __=l.__,y=["jetpack/markdown","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/file","core/html","core/separator","core/spacer","core/subhead","core/table","core/verse","core/video"];t.Z=(0,c.compose)([(0,p.withSelect)(((e,t)=>{const{getBlockType:n,getBlockVariations:r,getDefaultBlockVariation:o}=e("core/blocks"),{getBlocks:i}=e("core/block-editor"),{getEditedPostAttribute:s}=e("core/editor"),{getSite:l,getUser:c}=e("core"),u=i(t.clientId),p=s("author"),d=p&&c(p)&&c(p).email,m=s("title");return{blockType:n&&n(t.name),defaultVariation:o&&o(t.name,"block"),variations:r&&r(t.name,"block"),innerBlocks:u,hasInnerBlocks:u.length>0,siteTitle:(0,a.get)(l&&l(),["title"]),postTitle:m,postAuthorEmail:d}})),(0,p.withDispatch)((e=>{const{replaceInnerBlocks:t,selectBlock:n}=e("core/block-editor");return{replaceInnerBlocks:t,selectBlock:n}})),c.withInstanceId])((function(e){let{attributes:t,setAttributes:n,siteTitle:o,postTitle:c,postAuthorEmail:p,hasInnerBlocks:E,replaceInnerBlocks:w,selectBlock:_,clientId:C,instanceId:j,className:S,blockType:x,variations:P,defaultVariation:T}=e;const{to:N,subject:A,customThankyou:I,customThankyouHeading:B,customThankyouMessage:M,customThankyouRedirect:R,jetpackCRM:L}=t,[Z,D]=(0,r.useState)(!1),F=i()(S,"jetpack-contact-form"),O=e=>(0,a.map)(e,(e=>{let[t,n,r=[]]=e;return(0,u.createBlock)(t,n,O(r))})),z=e=>{e.attributes&&n(e.attributes),e.innerBlocks&&w(C,O(e.innerBlocks)),_(C)};(0,r.useEffect)((()=>{E||u.registerBlockVariation||z(b.Z[0])})),(0,r.useEffect)((()=>{if(void 0===N&&p&&n({to:p}),void 0===A&&void 0!==o&&void 0!==c){n({subject:"["+o+"] "+c})}}),[N,p,A,o,c,n]);const U=e=>0!==(e=e.trim()).length&&(!s.validate(e)&&{email:e}),$=e=>{if(0===e.target.value.length)return D(!1),void n({to:p});const t=e.target.value.split(",").map(U).filter(Boolean);t&&t.length&&D(t)},V=e=>{D(!1),n({to:e.trim()})},G=()=>{const e=void 0!==N?N:"",t=void 0!==A?A:"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(h.TextControl,{"aria-describedby":`contact-form-${j}-email-${Z&&Z.length>0?"error":"help"}`,label:__("Email address to send to","jetpack"),placeholder:__("name@example.com","jetpack"),onKeyDown:e=>{"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:$,onChange:V,help:__("You can enter multiple email addresses separated by commas.","jetpack")}),(0,r.createElement)(g.Z,{isError:!0,id:`contact-form-${j}-email-error`},(()=>{if(Z){if(1===Z.length)return Z[0]&&Z[0].email?(0,l.sprintf)(
5
  /* translators: placeholder is an email address. */
6
  __("%s is not a valid email address.","jetpack"),Z[0].email):Z[0];if(2===Z.length)return(0,l.sprintf)(
7
  /* translators: placeholders are email addresses. */
8
  __("%1$s and %2$s are not a valid email address.","jetpack"),Z[0].email,Z[1].email);const e=Z.map((e=>e.email));return(0,l.sprintf)(
9
  /* translators: placeholder is a list of email addresses. */
10
+ __("%s are not a valid email address.","jetpack"),e.join(", "))}return null})()),(0,r.createElement)(h.TextControl,{label:__("Email subject line","jetpack"),value:t,placeholder:__("Enter a subject","jetpack"),onChange:e=>n({subject:e}),help:__("Choose a subject line that you recognize as an email from your website.","jetpack")}),(0,r.createElement)(h.SelectControl,{label:__("On Submission","jetpack"),value:I,options:[{label:__("Show a summary of submitted fields","jetpack"),value:""},{label:__("Show a custom text message","jetpack"),value:"message"},{label:__("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:e=>n({customThankyou:e})}),"redirect"!==I&&(0,r.createElement)(h.TextControl,{label:__("Message Heading","jetpack"),value:B,placeholder:__("Message Sent","jetpack"),onChange:e=>n({customThankyouHeading:e})}),"message"===I&&(0,r.createElement)(h.TextareaControl,{label:__("Message Text","jetpack"),value:M,placeholder:__("Thank you for your submission!","jetpack"),onChange:e=>n({customThankyouMessage:e})}),"redirect"===I&&(0,r.createElement)(h.BaseControl,{label:__("Redirect Address","jetpack"),id:`contact-form-${j}-thankyou-url`},(0,r.createElement)(m.URLInput,{id:`contact-form-${j}-thankyou-url`,value:R,className:"jetpack-contact-form__thankyou-redirect-url",onChange:e=>n({customThankyouRedirect:e})})))};return!E&&u.registerBlockVariation?(0,r.createElement)("div",{className:F},(0,r.createElement)(m.__experimentalBlockVariationPicker,{icon:(0,a.get)(x,["icon","src"]),label:(0,a.get)(x,["title"]),instructions:__("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:P,allowSkip:!0,onSelect:function(){z(arguments.length>0&&void 0!==arguments[0]?arguments[0]:T)}})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m.BlockControls,null,(0,r.createElement)(h.ToolbarGroup,null,(0,r.createElement)(h.ToolbarItem,null,(()=>(0,r.createElement)(h.Dropdown,{position:"bottom right",className:"jetpack-contact-form-settings-selector",contentClassName:"jetpack-contact-form__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(h.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("Edit Form Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==d.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,r.createElement)(h.Icon,{icon:"edit"})}))(t,n)},renderContent:()=>G()}))))),(0,r.createElement)(m.InspectorControls,null,(0,r.createElement)(h.PanelBody,{title:__("Form Settings","jetpack")},G()),!(0,f.Wp)()&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(v.Z,{jetpackCRM:L,setAttributes:n}),(0,r.createElement)(k.Z,null))),(0,r.createElement)("div",{className:F},(0,r.createElement)(m.InnerBlocks,{allowedBlocks:y,templateInsertUpdatesSelection:!1})))}))},75494:function(e,t,n){"use strict";n.d(t,{u2:function(){return y},Xd:function(){return w},Nk:function(){return x}});var r=n(69307),a=n(65736),o=n(4981),i=n(55609),s=n(52175),l=n(31970),c=n(89534),u=n(12289),p=n(89998),d=n(54789),m=n(36755),h=n(7640),f=n(69802),g=n(56764),b=n(41632),v=n(57535),k=n(57324);const __=a.__,_x=a._x,y="contact-form",E=(0,b.Z)((0,r.createElement)(i.Path,{d:"M13 7.5h5v2h-5zm0 7h5v2h-5zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM11 6H6v5h5V6zm-1 4H7V7h3v3zm1 3H6v5h5v-5zm-1 4H7v-3h3v3z"})),w={title:__("Form","jetpack"),description:__("A simple way to get feedback from folks visiting your site.","jetpack"),icon:{src:E,foreground:(0,v.m)()},keywords:[_x("email","block search term","jetpack"),_x("feedback","block search term","jetpack"),_x("contact form","block search term","jetpack")],supports:{color:{link:!0,gradients:!0},html:!1,spacing:{padding:!0,margin:!0}},attributes:c.Z,edit:l.Z,save:()=>{const e=s.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)(s.InnerBlocks.Content,null))},variations:u.Z,category:"grow",transforms:d.Z,deprecated:p.Z},_={category:"grow",parent:["jetpack/contact-form"],supports:{reusable:!1,html:!1},attributes:{label:{type:"string",default:null},required:{type:"boolean",default:!1},options:{type:"array",default:[]},defaultValue:{type:"string",default:""},placeholder:{type:"string",default:""},id:{type:"string",default:""},width:{type:"number",default:100}},transforms:{to:[{type:"block",blocks:["jetpack/field-text"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-text",e)},{type:"block",blocks:["jetpack/field-name"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-name",e)},{type:"block",blocks:["jetpack/field-email"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-email",e)},{type:"block",blocks:["jetpack/field-url"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-url",e)},{type:"block",blocks:["jetpack/field-date"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-date",e)},{type:"block",blocks:["jetpack/field-telephone"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-telephone",e)},{type:"block",blocks:["jetpack/field-textarea"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-textarea",e)},{type:"block",blocks:["jetpack/field-checkbox-multiple"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-checkbox-multiple",e)},{type:"block",blocks:["jetpack/field-radio"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-radio",e)},{type:"block",blocks:["jetpack/field-select"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-select",e)},{type:"block",blocks:["jetpack/field-consent"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-consent",e)}]},save:()=>null,example:{}},C=e=>{let{attributes:t,name:n}=e;return null===t.label?(0,o.getBlockType)(n).title:t.label},j=e=>t=>(0,r.createElement)(m.Z,{type:e,label:C(t),required:t.attributes.required,setAttributes:t.setAttributes,isSelected:t.isSelected,defaultValue:t.attributes.defaultValue,placeholder:t.attributes.placeholder,id:t.attributes.id,width:t.attributes.width}),S=e=>t=>(0,r.createElement)(g.Z,{label:C(t),required:t.attributes.required,options:t.attributes.options,setAttributes:t.setAttributes,type:e,isSelected:t.isSelected,id:t.attributes.id,width:t.attributes.width}),x=[{name:"field-text",settings:{..._,title:__("Text","jetpack"),description:__("When you need just a small amount of text, add a text input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:j("text")}},{name:"field-name",settings:{..._,title:__("Name","jetpack"),description:__("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})),edit:j("text")}},{name:"field-email",settings:{..._,title:__("Email","jetpack"),keywords:[__("e-mail","jetpack"),__("mail","jetpack"),"email"],description:__("Want to reply to folks? Add an email address input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),edit:j("email")}},{name:"field-url",settings:{..._,title:__("Website","jetpack"),keywords:["url",__("internet page","jetpack"),"link"],description:__("Add an address input for a website.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"})),edit:j("url")}},{name:"field-date",settings:{..._,title:__("Date Picker","jetpack"),keywords:[__("Calendar","jetpack"),_x("day month year","block search term","jetpack")],description:__("The best way to set a date. Add a date picker.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V9h14v10zm0-12H5V5h14v2zM7 11h5v5H7z"})),edit:j("text")}},{name:"field-telephone",settings:{..._,title:__("Phone Number","jetpack"),keywords:[__("Phone","jetpack"),__("Cellular phone","jetpack"),__("Mobile","jetpack")],description:__("Add a phone number input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),edit:j("tel")}},{name:"field-textarea",settings:{..._,title:__("Message","jetpack"),keywords:[__("Textarea","jetpack"),"textarea",__("Multiline text","jetpack")],description:__("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:e=>(0,r.createElement)(h.Z,{label:C(e),required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,placeholder:e.attributes.placeholder,id:e.attributes.id,width:e.attributes.width})}},{name:"field-checkbox",settings:{..._,title:__("Checkbox","jetpack"),keywords:[__("Confirm","jetpack"),__("Accept","jetpack")],description:__("Add a single checkbox.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM17.99 9l-1.41-1.42-6.59 6.59-2.58-2.57-1.42 1.41 4 3.99z"})),edit:e=>(0,r.createElement)(f.Z,{label:e.attributes.label,required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,id:e.attributes.id,width:e.attributes.width}),attributes:{..._.attributes,label:{type:"string",default:""}}}},{name:"field-consent",settings:{..._,title:__("Consent","jetpack"),keywords:[__("Consent","jetpack")],description:__("Ask for consent","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"m81 370h142v40h-142zm0-39h142v-40h-142zm0-79h245v-40h-245zm378 260h-40c0-40.253906-32.746094-73-73-73s-73 32.746094-73 73h-40c0-42.085938 23.128906-78.867188 57.34375-98.3125-11.40625-13.023438-18.34375-30.054688-18.34375-48.6875 0-40.804688 33.195312-74 74-74s74 33.195312 74 74c0 18.632812-6.9375 35.664062-18.34375 48.6875 34.214844 19.445312 57.34375 56.226562 57.34375 98.3125zm-113-113c18.746094 0 34-15.253906 34-34s-15.253906-34-34-34-34 15.253906-34 34 15.253906 34 34 34zm-286 73h138.316406c-3.460937 12.757812-5.316406 26.164062-5.316406 40h-133c-33.085938 0-60-26.914062-60-60v-392c0-33.085938 26.914062-60 60-60h203.757812l142.132813 142.855469v125.210937c-12.042969-7.476562-25.453125-12.765625-39.890625-15.324218v-81.632813h-71.109375c-33.085937 0-60-26.914063-60-60v-71.109375h-174.890625c-11.027344 0-20 8.972656-20 20v392c0 11.027344 8.972656 20 20 20zm234.890625-340.890625h42.972656l-62.972656-63.234375v43.234375c0 11.03125 8.96875 20 20 20zm0 0"}),24,25,"-26 0 512 512"),attributes:{..._.attributes,label:{type:"string",default:__("Consent","jetpack")},consentType:{type:"string",default:"implicit"},implicitConsentMessage:{type:"string",default:__("By submitting your information, you're giving us permission to email you. You may unsubscribe at any time.","jetpack")},explicitConsentMessage:{type:"string",default:__("Can we send you an email from time to time?","jetpack")}},edit:e=>{let{attributes:t,isSelected:n,setAttributes:a}=e;const{id:o,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c}=t;return(0,r.createElement)(k.Z,{id:o,isSelected:n,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c,setAttributes:a})}}},{name:"field-checkbox-multiple",settings:{..._,title:__("Checkbox Group","jetpack"),keywords:[__("Choose Multiple","jetpack"),__("Option","jetpack")],description:__("People love options. Add several checkbox items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"})),edit:S("checkbox"),attributes:{..._.attributes,label:{type:"string",default:"Choose several"}}}},{name:"field-radio",settings:{..._,title:__("Radio","jetpack"),keywords:[__("Choose","jetpack"),__("Select","jetpack"),__("Option","jetpack")],description:__("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,r.createElement)(i.Circle,{cx:"12",cy:"12",r:"5"}))),edit:S("radio"),attributes:{..._.attributes,label:{type:"string",default:"Choose one"}}}},{name:"field-select",settings:{..._,title:__("Select","jetpack"),keywords:[__("Choose","jetpack"),__("Dropdown","jetpack"),__("Option","jetpack")],description:__("Compact, but powerful. Add a select box with several items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:S("select"),attributes:{..._.attributes,label:{type:"string",default:"Select one"}}}}]},54789:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=(e,t,n)=>{const r=n.match(new RegExp(`\\[${e}[^\\]]* ${t}="([^"]*)"`,"im"));if(r&&r.length)return r[1];const a=n.match(new RegExp(`\\[${e}[^\\]]* ${t}='([^']*)'`,"im"));if(a&&a.length)return a[1];const o=n.match(new RegExp(`\\[${e}[^\\]]* ${t}=([^\\s]*)\\s`,"im"));return!(!o||!o.length)&&o[1]},s={root:{},innerBlocks:[]};t.Z={from:[{type:"raw",priority:1,isMatch:e=>!("P"!==e.nodeName||!(/\[contact-form(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[contact-field(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[\/contact-form]/g.test(e.textContent))),transform:e=>{const t=e.textContent.replace("<br>","");if(t.includes("[contact-form")&&(s.root={},s.innerBlocks=[],s.root=(e=>{const t={to:i("contact-form","to",e),subject:i("contact-form","subject",e),submitButtonText:i("contact-form","submit_button_text",e)};return{blockName:"jetpack/contact-form",attrs:(0,r.pickBy)(t,r.identity)}})(t)),t.includes("[contact-field")){const e=t.match(/(\[contact-field[\s\S]*?\/?])/g);e&&e.length>0&&e.forEach((e=>{s.innerBlocks.push((e=>{const t={label:i("contact-field","label",e),placeholder:i("contact-field","placeholder",e),required:i("contact-field","required",e),options:i("contact-field","options",e)},n=(e=>{const t={text:"jetpack/field-text",url:"jetpack/field-text",textarea:"jetpack/field-textarea",radio:"jetpack/field-radio",checkbox:"jetpack/field-checkbox","checkbox-multiple":"jetpack/field-checkbox-multiple",select:"jetpack/field-select",email:"jetpack/field-email",name:"jetpack/field-name",default:"jetpack/field-text"};return t[e]?t[e]:t.default})(i("contact-field","type",e));return t.options&&(t.options=t.options.split(",")),(0,a.createBlock)(n,(0,r.pickBy)(t,r.identity))})(e))}))}if(t.includes("[/contact-form]")){s.innerBlocks.push((0,a.createBlock)("jetpack/button",{element:"button",text:s.root.attrs.submitButtonText||__("Contact Us","jetpack")}));return(0,a.createBlock)(s.root.blockName,s.root.attrs,s.innerBlocks)}return!1}}]}},12289:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(4096),i=n(65736),s=n(55609),l=n(41632),c=n(57535);const __=i.__,u=(0,a.compact)([{name:"contact-form",title:__("Contact Form","jetpack"),description:__("Add a contact form to your page.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M21.99 8c0-.72-.37-1.35-.94-1.7l-8.04-4.71c-.62-.37-1.4-.37-2.02 0L2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zm-11.05 4.34l-7.2-4.5 7.25-4.25c.62-.37 1.4-.37 2.02 0l7.25 4.25-7.2 4.5c-.65.4-1.47.4-2.12 0z"}),48,48,"-4 -4 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-textarea",{}],["jetpack/button",{text:__("Contact Us","jetpack"),element:"button"}]]},!(0,o.Wp)()&&{name:"newsletter-form",title:__("Newsletter Sign-up","jetpack"),description:__("A simple way to collect information from folks visiting your site.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M37.9999 7.59998C49.3999 7.59998 68.3999 26.6 68.3999 26.6V68.4H7.59985V26.6C7.59985 26.6 26.5999 7.59998 37.9999 7.59998ZM64.5999 63.536L50.4259 52.44L64.5999 41.8L62.9659 40.394L54.3779 45.334L55.2899 28.956L21.9639 26.98L20.2159 44.232L12.6539 40.622L11.3999 41.8L25.5739 52.44L12.5019 63.27L14.0219 64.904L37.9999 49.4L62.8139 65.17L64.5999 63.536Z"}),48,48,"-6 -6 92 92"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-consent",{}],["jetpack/button",{text:__("Subscribe","jetpack"),element:"button"}]]},{name:"rsvp-form",title:__("RSVP Form","jetpack"),description:__("Add an RSVP form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M10 9V7.41c0-.89-1.08-1.34-1.71-.71L3.7 11.29c-.39.39-.39 1.02 0 1.41l4.59 4.59c.63.63 1.71.19 1.71-.7V14.9c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Attending?","jetpack"),required:!0,options:[__("Yes","jetpack"),__("No","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:__("A new RSVP from your website","jetpack")}},{name:"registration-form",title:__("Registration Form","jetpack"),description:__("Add a Registration form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.34 15.02c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95zm2.12-10.61L17 7.95l-4.95 4.95-3.54-3.54 4.95-4.95zm6.95 11l-2.12-2.12c-.18-.18-.44-.29-.7-.29h-.27l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2h-.42c-.27 0-.52.11-.71.29l-2.12 2.12c-.37.38-.58.89-.58 1.42V20c0 1.1.9 2 2 2h14c1.1 0 2-.89 2-2v-3.17c0-.53-.21-1.04-.59-1.42z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{label:__("Phone Number","jetpack")}],["jetpack/field-select",{label:__("How did you hear about us?","jetpack"),options:[__("Search Engine","jetpack"),__("Social Media","jetpack"),__("TV","jetpack"),__("Radio","jetpack"),__("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send","jetpack"),element:"button"}]],attributes:{subject:__("A new registration from your website","jetpack")}},{name:"appointment-form",title:__("Appointment Form","jetpack"),description:__("Add an Appointment booking form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V8c0-.55-.45-1-1-1s-1 .45-1 1v2H2c-.55 0-1 .45-1 1s.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1v-2h2c.55 0 1-.45 1-1s-.45-1-1-1H6zm9 4c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{required:!0}],["jetpack/field-date",{label:__("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:__("Time","jetpack"),required:!0,options:[__("Morning","jetpack"),__("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:__("Notes","jetpack")}],["jetpack/button",{text:__("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:__("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:__("Feedback Form","jetpack"),description:__("Add a Feedback form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.03 0 3.8-1.11 4.75-2.75.19-.33-.05-.75-.44-.75H7.69c-.38 0-.63.42-.44.75.95 1.64 2.72 2.75 4.75 2.75z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Please rate our website","jetpack"),required:!0,options:[__("1 - Very Bad","jetpack"),__("2 - Poor","jetpack"),__("3 - Average","jetpack"),__("4 - Good","jetpack"),__("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:__("How could we improve?","jetpack")}],["jetpack/button",{text:__("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:__("New feedback received from your website","jetpack")}}]);t.Z=u},4352:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(29756);const __=i.__;class u extends r.Component{constructor(){super(...arguments),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:a,region:i,postal:u,country:p,linkToGoogleMaps:d},isSelected:m,setAttributes:h}=this.props,f=[e,t,n,a,i,u,p].some((e=>""!==e)),g=o()({"jetpack-address-block":!0,"is-selected":m}),b=(0,r.createElement)(l.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:d,onChange:e=>h({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:g},!m&&f&&(0,c.Z)(this.props),(m||!f)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>h({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>h({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>h({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:a,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>h({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:i,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>h({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:u,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>h({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>h({country:e}),onKeyDown:this.preventEnterKey}),b))}}t.Z=u},47559:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(4352),s=n(29756),l=n(41632);const __=a.__,_x=a._x,c="address",u={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,l.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,r.createElement)(o.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:i.Z,save:s.Z}},29756:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:a,city:o,region:i,postal:s,country:l}}=e;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},t),n&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},n),a&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},a),o&&!(i||s)&&(0,r.createElement)("div",{className:"jetpack-address__city"},o),o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__city"},o),", ",(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),!o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),l&&(0,r.createElement)("div",{className:"jetpack-address__country"},l))},i=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}}=e;let l=o?`+${o},`:"";l=i?`${l}+${i}`:l;return`https://www.google.com/maps/search/${t?`${t},`:""}${n?`${n},`:""}${r?`${r},`:""}${a?`+${a},`:""}${l}${s?`+${s}`:""}`.replace(" ","+")};t.Z=e=>(e=>{let{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}=e;return[t,n,r,a,o,i,s].some((e=>""!==e))})(e.attributes)&&(0,r.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,r.createElement)("a",{href:i(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,r.createElement)(o,e)),!e.attributes.linkToGoogleMaps&&(0,r.createElement)(o,e))},18680:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(89105),i=n.n(o);const s=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],l=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]];t.Z=e=>{const{isSelected:t}=e;return(0,r.createElement)("div",{className:i()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:l}))}},63015:function(e,t,n){"use strict";var r=n(59861),a=n(55637),o=n(65736);const __=o.__;t.Z=e=>{const{setAttributes:t}=e;return(0,a.Z)("email",e,__("Email","jetpack"),r.Z,(e=>t({email:e})))}},52413:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(63015),s=n(41632),l=n(59861);const __=a.__,_x=a._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:i.Z,save:l.Z,parent:["jetpack/contact-info"]}},59861:function(e,t,n){"use strict";var r=n(69307),a=n(89453);t.Z=e=>{let{attributes:{email:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},t.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&a.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(r.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(r.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(r.Fragment,{key:t},e)})))}},20195:function(e,t,n){"use strict";n.d(t,{u2:function(){return h},Xd:function(){return g},Nk:function(){return b}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(4981),l=n(18680),c=n(41632),u=n(47559),p=n(52413),d=n(51592),m=n(57535);const __=a.__,_x=a._x,h="contact-info",f=(0,c.Z)((0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z"})),g={title:__("Contact Info","jetpack"),description:__("Lets you add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[_x("email","block search term","jetpack"),_x("phone","block search term","jetpack"),_x("address","block search term","jetpack")],icon:{src:f,foreground:(0,m.m)()},category:"grow",supports:{align:["wide","full"],html:!1,color:{link:!0,gradients:!0},spacing:{padding:!0},typography:{fontSize:!0,lineHeight:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"widget_contact_info"===t},transform:e=>{let{instance:t}=e,n=[(0,s.createBlock)("core/heading",{content:t.raw.title}),(0,s.createBlock)("jetpack/email",{email:t.raw.email}),(0,s.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,s.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(n=[...n,(0,s.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(n=[...n,(0,s.createBlock)("jetpack/map",{address:t.raw.address})]),(0,s.createBlock)("jetpack/contact-info",{},n)}}]},attributes:{},edit:l.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"jetpack/email",attributes:{email:"hello@yourjetpack.blog"}},{name:"jetpack/phone",attributes:{phone:"123-456-7890"}},{name:"jetpack/address",attributes:{address:"987 Photon Drive",city:"Speedyville",region:"CA",postal:"12345",country:"USA"}}]}},b=[{name:u.u,settings:u.X},{name:p.u,settings:p.X},{name:d.u,settings:d.X}]},51633:function(e,t,n){"use strict";var r=n(65736),a=n(18690),o=n(55637);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("phone",e,__("Phone number","jetpack"),a.Z,(e=>t({phone:e})))}},51592:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(51633),s=n(41632),l=n(18690);const __=a.__,_x=a._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:i.Z,save:l.Z}},18690:function(e,t,n){"use strict";var r=n(69307);t.Z=e=>{let{attributes:{phone:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let a=n?e.substring(n-1):e,o=n?e.substring(0,n):"",i=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(o=o.slice(0,-1),"+"===a[0]&&(i="+"+i)):a=a.substring(1),[o.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},a)]}(t))}},2534:function(e,t){"use strict";t.Z={participants:{type:"array"},showTimestamps:{type:"boolean",default:!1},skipUpload:{type:"boolean",default:!1}}},74113:function(e,t,n){"use strict";var r=n(69307);t.Z=(0,r.createContext)()},78e3:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(69307),a=n(55609),o=n(65736),i=n(90566);const __=o.__,_x=o._x;function s(e){let{className:t,participants:n,onDelete:o}=e;return(0,r.createElement)("div",{className:`${t}__participant-control`},n.map((e=>{let{label:n,slug:s}=e;return(0,r.createElement)("div",{key:`${s}-key`,className:`${t}__participant`},(0,r.createElement)("div",{className:`${t}__participant-label`},(0,i.iT)(n)),(0,r.createElement)(a.Button,{className:`${t}__remove-participant`,label:__("Remove participant","jetpack"),onClick:()=>o(s),isTertiary:!0,isSmall:!0},_x("Remove","verb: remove item from a list","jetpack")))})))}function l(e){let{participants:t,className:n,onChange:a,onDelete:o}=e;return(0,r.createElement)(s,{className:n,participants:t,onChange:a,onDelete:o})}},63414:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(9818),l=n(78e3),c=n(74113),u=n(51591),p=n(41362),d=n(90566);const __=a.__,m=[["jetpack/dialogue"]];t.Z=(0,i.withNotices)((function(e){let{className:t,attributes:n,setAttributes:a,noticeUI:h,clientId:f,noticeOperations:g}=e;const{participants:b=[],showTimestamps:v,skipUpload:k}=n,[y,E]=(0,r.useState)(""),{insertBlocks:w}=(0,s.useDispatch)("core/block-editor"),_=(0,r.useCallback)((e=>{a({participants:b.map((t=>t.slug!==e.slug?t:{...t,...e}))})}),[a,b]),C=(0,r.useCallback)((function(e){let{label:t,slug:n}=e;if(!t)return;const r=t.trim();if(null==r||!r.length)return;const o=(0,d.tQ)(b,r);if(o)return o;const i={slug:n||"speaker-"+ +new Date,label:r};return a({participants:[...b,i]}),i}),[b,a]),j=(0,r.useCallback)(a,[a]),S=(0,r.useMemo)((()=>({setAttributes:j,updateParticipants:_,addNewParticipant:C,attributes:{showTimestamps:v}})),[C,j,v,_]);function x(e){g.removeAllNotices(),g.createErrorNotice(e),E(!1)}const P="wp-block-jetpack-conversation";return null!=b&&b.length||k?(0,r.createElement)(c.Z.Provider,{value:S},(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.Panel,null,(0,r.createElement)(i.PanelBody,{title:__("Speakers","jetpack"),className:`${P}__participants`},(0,r.createElement)(l.C,{className:P,participants:b,onDelete:function(e){a({participants:b.filter((t=>{let{slug:n}=t;return n!==e}))})}})))),(0,r.createElement)(o.InnerBlocks,{template:m}))):(0,r.createElement)(i.Placeholder,{label:__("Conversation","jetpack"),instructions:(0,r.createElement)(r.Fragment,null,__("Upload a transcript file or create a conversation with blank content.","jetpack"),(0,r.createElement)("div",null,(0,r.createElement)("em",null,__("Accepted file formats:","jetpack"),(0,r.createElement)("strong",null," ",d.bZ),"."))),icon:(0,r.createElement)(o.BlockIcon,{icon:u.Xu}),notices:h},(0,r.createElement)("div",{className:`${P}__placeholder`},(0,r.createElement)(i.FormFileUpload,{multiple:!1,isLarge:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:function(e){var t,n;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!r)return x(__("Transcript file not found.","jetpack"));if(null!=r&&r.size&&r.size<=0||null==r||!r.size||r.size>d.$n)return x(__("Invalid transcript file size.","jetpack"));if(null!=r&&null!==(n=r.type)&&void 0!==n&&n.length&&"text/plain"!==r.type)return x(__("Invalid transcript file type.","jetpack"));const o=(0,d.Y7)(null==r?void 0:r.name);if(!(0,d.P8)(o))return x(__("Invalid transcript file extension.","jetpack"));E(!0),(0,d.Bt)(r,(function(e,t){let{conversation:n,dialogues:r}=e;if(t)return x(t);a({participants:n.speakers,skipUpload:!(null!=n&&n.length)});const o=r.map((e=>e.slug||e.timestamp?["jetpack/dialogue",e]:["core/paragraph",e])),i=(0,p.Z)(o);w(i,0,f),E(!1)}))},accept:d.bZ,isPrimary:!0,title:`${__("Accepted file formats:","jetpack")} ${d.bZ}`,disabled:y},__("Upload transcript","jetpack")),(0,r.createElement)(i.Button,{isTertiary:!0,disabled:y,onClick:()=>a({skipUpload:!0})},__("Skip upload","jetpack"))))}))},34376:function(e,t,n){"use strict";var r=n(65736);const __=r.__,a=[{slug:"participant-0",label:"Rosalind"},{slug:"participant-1",label:"Orlando"}],o=[{name:"core/heading",attributes:{content:__("Shakespeare text","jetpack"),level:4}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("O, my dear Orlando, how it grieves me to see thee wear thy heart in a scarf!","jetpack"),timestamp:"00:10"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("It is my arm.","jetpack"),timestamp:"00:15"}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("I thought thy heart had been wounded with the claws of a lion.","jetpack"),timestamp:"00:32"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("Wounded it is, but with the eyes of a lady.","jetpack"),timestamp:"00:37"}}];t.Z={attributes:{participants:a,showTimestamps:!0,className:"is-style-row"},innerBlocks:o}},36384:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(4981),o=n(51591),i=n(41362),s=n(2534),l=n(63414),c=n(22766),u=n(34376);const __=r.__,_x=r._x,p="conversation",d={title:__("Conversation","jetpack"),description:__("Create a transcription of a speech or conversation, with any number of participants, using dialogue blocks.","jetpack"),icon:o.Xu,category:"layout",keywords:[_x("conversation","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("dialogue","block search term","jetpack"),_x("speaker","block search term","jetpack")],supports:{align:!0},attributes:s.Z,example:u.Z,styles:[{name:"row",label:__("Row","jetpack"),isDefault:!0},{name:"column",label:__("Column","jetpack")}],edit:l.Z,save:c.Z,providesContext:{"jetpack/conversation-participants":"participants","jetpack/conversation-showTimestamps":"showTimestamps"},transforms:{from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>{const t=e.map((e=>{let{content:t}=e;return["jetpack/dialogue",{content:t}]}));return(0,a.createBlock)("jetpack/conversation",{},(0,i.Z)(t))}}]}}},22766:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175);function s(e){let{attributes:t}=e;return(0,r.createElement)("div",{className:o()("wp-block-jetpack-conversation",{"show-timestamps":null==t?void 0:t.showTimestamp})},(0,r.createElement)(i.InnerBlocks.Content,null))}},90566:function(e,t,n){"use strict";n.d(t,{ly:function(){return i},tQ:function(){return s},iT:function(){return l},Y7:function(){return c},bZ:function(){return m},$n:function(){return h},P8:function(){return k},Bt:function(){return y}});var r=n(72629),a=n(81975),o=n(65736);const __=o.__;function i(e,t){const n=e.filter((e=>{let{slug:n}=e;return n===t}));return null!=n&&n.length?n[0]:null}function s(e,t){const n=e.filter((e=>{let{label:n}=e;return(null==n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())}));return null!=n&&n.length?n[0]:null}function l(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=null===(t=(0,r.getTextContent)((0,r.create)({html:e})))||void 0===t?void 0:t.trim();return n?(0,a.escapeHTML)(o):o}function c(e){return`.${e.substr(e.lastIndexOf(".")+1)}`}const u=".srt",p=".txt",d=[u,p,".vtt",".sbv"],m=d.join(", "),h=1e5,f=/(.*[^\s])\s{1,}(\d{1,2}(?::\d{1,2}?)+)\s+\n([\s\S]*?(?=\n{2}|$))/,g=/(?:(.*[^\s]):\s+)?(?:\[(\d+(?::\d+)*?(?:\.\d*)?)])?(?:[\s])*?([^\s].+?(?:\n+|$))/,b=[{name:"otter",re:new RegExp(f,"gm"),testRE:new RegExp(f,"g")},{name:"sonix",re:new RegExp(g,"gm"),testRE:new RegExp(g,"g")}],v=/(\d+)\n([\d:,]+)\s+-{2}>\s+([\d:,]+)\n([\s\S]*?(?=\n{2}|$))/gm;function k(e){return d.indexOf(e)>=0}function y(e,t){const n=c(null==e?void 0:e.name),r=new FileReader;r.addEventListener("load",(e=>{var r;const a=e.target.result?e.target.result.replace(/\r\n|\r|\n/g,"\n"):null;if(null==a||!a.length)return t({},__("Transcript content is empty","jetpack"));let o={};if(n&&n!==p&&n===u&&(o=function(e){const t={conversation:{speakers:[]},dialogues:[]};let n;for(;null!==(n=v.exec(e));)t.dialogues.push({timestamp:n[2],content:n[4]});return t}(a)),n===p&&(o=function(e){const t={dialogues:[],conversation:{speakers:[]}},n=b.filter((t=>{let{testRE:n}=t;return n.test(e)}));if(null==n||!n.length)return t;const r=n[0];let a;for(;null!=(a=r.re.exec(e));){var o,i,s;const e=a[(null==r||null===(o=r.indexes)||void 0===o?void 0:o.speaker)||1]||"";null!=e&&e.length&&t.conversation.speakers.indexOf(e)<0&&t.conversation.speakers.push(e);const n={content:a[(null==r||null===(i=r.indexes)||void 0===i?void 0:i.content)||3],timestamp:a[(null==r||null===(s=r.indexes)||void 0===s?void 0:s.timestamp)||2],showTimestamp:!0};null!=e&&e.length&&(n.label=e,n.slug=`speaker-${t.conversation.speakers.indexOf(e)}`),t.dialogues.push(n)}return t.conversation.speakers=t.conversation.speakers.map(((e,t)=>({label:e,slug:`speaker-${t}`}))),t}(a)),null===(r=o.dialogues)||void 0===r||!r.length)return t({},__("Transcript format not supported","jetpack"));t(o)})),r.readAsText(e)}},60522:function(e,t){"use strict";t.Z={label:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__participant"},slug:{type:"string"},timestamp:{type:"string",default:"00:00"},showTimestamp:{type:"boolean",default:!1},placeholder:{type:"string"},content:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__content"}}},23180:function(e,t,n){"use strict";n.d(t,{Ev:function(){return m},v$:function(){return g}});n(29183);var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736),l=n(52175),c=n(90566);const __=s.__,u="is-participant-adding",p="is-participant-selecting",d="was-participant-selected";function m(e){let{participants:t,slug:n,onSelect:a}=e;return(0,r.createElement)(i.SelectControl,{label:__("Speaker name","jetpack"),value:n,options:t.map((e=>{let{slug:t,label:n}=e;return{label:(0,c.iT)(n),value:t}})),onChange:e=>a((0,c.ly)(t,e))})}const h=(0,i.withFocusOutside)(class extends r.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return(0,r.createElement)("div",{className:this.props.className},this.props.children)}});function f(e){return{name:"jetpack/conversation-participants",triggerPrefix:"",options:e,getOptionLabel:e=>{let{label:t}=e;return(0,r.createElement)("span",null,(0,c.iT)(t))},getOptionKeywords:e=>{let{label:t}=e;return[t]},getOptionCompletion:e=>({action:"replace",value:e}),popoverProps:{position:"bottom"}}}function g(e){let{className:t,label:n,participant:a,participants:i,transcriptRef:s,onParticipantChange:m,onUpdate:g=(()=>{}),onSelect:b,onAdd:v,onClean:k}=e;const[y,E]=(0,r.useState)("is-participant-ready");function w(){if(!n)return;const e=(0,c.tQ)(i,n);return a&&a.label!==n?e&&e.slug!==a.slug?(E(d),b(e)):(E("was-participant-edited"),g({...a,label:(0,c.iT)(n,!0)})):e?(E(d),b(e)):(v((0,c.iT)(n,!0)),E("was-participant-added"))}const _=(0,r.useMemo)((()=>y?y!==u&&y!==p?[]:[f(i)]:[]),[i,y]);return(0,r.createElement)(h,{className:o()(t,{"has-bold-style":null==n?void 0:n.length,[y]:y}),onFocusOutside:w},(0,r.createElement)(l.RichText,{tagName:"div",value:n,allowedFormats:[],withoutInteractiveFormatting:!0,onChange:function(e){if(null==e||!e.length)return E(u),k();m(e);const t=(0,c.tQ)(i,e);a?a.label===e?E(p):E("is-participant-editing"):E(t?p:u)},placeholder:__("Speaker","jetpack"),keepPlaceholderOnFocus:!0,onSplit:()=>{},onReplace:e=>{setTimeout((()=>{var e;return null==s||null===(e=s.current)||void 0===e?void 0:e.focus()}),10);const t=null==e?void 0:e[0];if(t){const{label:e}=t;return m(e),E(d),b(t)}return w()},autocompleters:_}))}},94371:function(e,t,n){"use strict";n.d(t,{dG:function(){return d},S6:function(){return f}});var r=n(69307),a=n(92819),o=n(55609),i=n(65736),s=n(38205),l=n(98017);const __=i.__,_x=i._x;const c=["hour","min","sec"];function u(e,t){var n,r,a;const o=null===(n=Object.keys(e))||void 0===n?void 0:n[0];if(!o)return t.join(":");let i=String((s=e[o],l="hour"===o?23:59,Math.max(0,Math.min(s,l))));var s,l;return 1===(null===(r=i)||void 0===r?void 0:r.length)?i=`0${i}`:0===(null===(a=i)||void 0===a?void 0:a.length)&&(i="00"),t[c.indexOf(o)]=i,3===t.length&&"00"===t[0]&&t.shift(),t.join(":")}const p=(0,a.debounce)((function(e,t){t((0,l.H)(e))}),250);function d(e){let{value:t,className:n,onChange:a,shortLabel:i=!1,isDisabled:c=!1,duration:d}=e;const[m,h]=(0,r.useState)((0,l.i)(t)),f=t.split(":");return f.length<=2&&f.unshift("00"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${n}__timestamp-controls`},(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__hour`,label:i?_x("Hour","hour (short form)","jetpack"):_x("Hour","hour (long form)","jetpack",0),value:f[0],min:0,max:23,onChange:e=>!c&&a(u({hour:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__minute`,label:i?_x("Min","Short for Minute","jetpack"):__("Minute","jetpack"),value:f[1],min:0,max:59,onChange:e=>!c&&a(u({min:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__second`,label:i?_x("Sec","Short for Second","jetpack"):__("Second","jetpack"),value:f[2],min:0,max:59,onChange:e=>!c&&a(u({sec:e},f)),disabled:c})),(0,r.createElement)(o.RangeControl,{disabled:void 0===d,value:m,className:`${n}__timestamp-range-control`,min:0,max:d,onChange:e=>{h(e),p(e,a)},withInputField:!1,renderTooltipContent:e=>(0,l.H)(e)}))}function m(e){let{className:t,onPlayback:n,value:a}=e;return(0,r.createElement)(o.Button,{className:t,isTertiary:!0,onClick:()=>n((0,l.i)(a))},a)}function h(e){let{className:t,currentTime:n,isTimestampButtonVisible:a,children:i,onChange:s,onToggle:c}=e;return(0,r.createElement)(o.Button,{className:t,isSmall:!0,isTertiary:!0,onClick:()=>{c(!a),a||s((0,l.H)(n),s)}},i)}function f(e){let{className:t,isSelected:n,show:a,value:o,mediaCurrentTime:i=0,onChange:s,onToggle:l,onPlayback:c}=e;return n?a?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}),(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Remove","jetpack"))):(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Add timestamp","jetpack")):a?(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}):null}},27257:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(4981),c=n(9818),u=n(55609),p=n(23180),d=n(94371),m=n(38882),h=n(74113),f=n(15111),g=n(37837),b=n(98017),v=n(90566);const __=i.__,k="core/paragraph";function y(e){let{className:t,attributes:n,setAttributes:a,context:i,onReplace:y,mergeBlocks:E,isSelected:w}=e;const{content:_,label:C,slug:j,placeholder:S,showTimestamp:x,timestamp:P}=n,{mediaSource:T,mediaCurrentTime:N,mediaDuration:A,mediaDomReference:I,isMultipleSelection:B}=(0,c.useSelect)((e=>{const{getDefaultMediaSource:t,getMediaSourceCurrentTime:n,getMediaSourceDuration:r,getMediaSourceDomReference:a}=e(f.tT);return{mediaSource:t(),mediaCurrentTime:n(),mediaDuration:r(),mediaDomReference:a(),isMultipleSelection:e("core/block-editor").getMultiSelectedBlocks().length>0}}),[]),{playMediaSource:M,setMediaSourceCurrentTime:R}=(0,c.useDispatch)(f.tT),L=(0,r.useRef)(),Z=i["jetpack/conversation-participants"],D=null!=Z&&Z.length?Z:[],F=(0,v.ly)(D,j),O=(0,r.useContext)(h.Z);function z(e){a({timestamp:e})}return(0,r.useEffect)((()=>{B||w||F&&F.slug===j&&F.label!==C&&a({label:F.label})}),[F,C,j,B,w,a]),(0,r.createElement)("div",{className:t},(0,r.createElement)(s.BlockControls,null,T&&(0,r.createElement)(g.m,{onTimestampClick:e=>{a({showTimestamp:!0}),z((0,b.H)(e))}})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u.Panel,null,(0,r.createElement)(u.PanelBody,{title:__("Speaker","jetpack")},(0,r.createElement)(p.Ev,{className:m.P,participants:D,slug:j||"",onSelect:a})),!(null==T||!T.title)&&(0,r.createElement)(u.PanelBody,{title:__("Podcast episode","jetpack")},(0,r.createElement)("p",null,T.title)),T&&x&&(0,r.createElement)(u.PanelBody,{title:__("Timestamp","jetpack")},(0,r.createElement)(d.dG,{className:m.P,value:P,onChange:z,mediaSource:T,duration:A})))),(0,r.createElement)("div",{className:o()(`${m.P}__meta`,{"has-not-media-source":!T})},(0,r.createElement)(p.v$,{className:`${m.P}__participant`,label:C,participant:F,participants:D,transcriptRef:L,onParticipantChange:e=>{a({label:e})},onSelect:e=>{B||a(e)},onClean:()=>{a({slug:null,label:""})},onAdd:e=>{const t=O.addNewParticipant({label:e,slug:j});a(t)},onUpdate:e=>{O.updateParticipants(e)}}),T&&(0,r.createElement)(d.S6,{className:m.P,show:x,isSelected:w,value:P,mediaCurrentTime:N,onChange:z,onToggle:e=>a({showTimestamp:e}),onPlayback:function(e){I&&(I.currentTime=e),R(e),M()}})),(0,r.createElement)(s.RichText,{ref:L,identifier:"content",tagName:"p",className:`${m.P}__content`,value:_,onChange:e=>a({content:e}),onMerge:E,onSplit:e=>{if(null==_||!_.length)return(0,l.createBlock)(k);const t=null!=e&&e.length?n:{};return(0,l.createBlock)("jetpack/dialogue",{...t,content:e})},onReplace:function(e){for(var t,n,r,a,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return O?(null===(t=e[0])||void 0===t?void 0:t.name)!==k||(null===(n=e[1])||void 0===n?void 0:n.name)!==k||null!==(r=e[0])&&void 0!==r&&r.attributes.content||null!==(a=e[1])&&void 0!==a&&a.attributes.content?void y(e,...i):((0,c.dispatch)("core/block-editor").selectBlock(e[0].clientId),y([e[0]],...i)):y(e,...i)},onRemove:y?()=>y([]):void 0,placeholder:S||__("Write dialogue…","jetpack"),keepPlaceholderOnFocus:!0}))}},98956:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(4981),o=n(60522),i=n(27257),s=n(57937),l=n(51591),c=n(90059),u=n(36384);const __=r.__,_x=r._x,p=c.p,d="dialogue",m={title:__("Dialogue","jetpack"),description:__("Create a dialogue paragraph, setting the participant with an optional timestamp.","jetpack"),parent:[`jetpack/${u.u2}`],icon:l.VV,category:"layout",edit:i.Z,save:s.Z,attributes:o.Z,usesContext:["jetpack/conversation-participants","jetpack/conversation-showTimestamps"],keywords:[_x("dialogue","block search term","jetpack"),_x("participant","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("speaker","block search term","jetpack")],transforms:{to:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t,label:n}=e;return(0,a.createBlock)("core/paragraph",{content:(null!=n&&n.length?`<strong>${n}</strong>: `:"")+t})}))}],from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t}=e;return(0,a.createBlock)("jetpack/dialogue",{participant:p[0],content:t})}))}]}}},57937:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(52175),o=n(38882),i=n(98017);function s(e){let{attributes:t}=e;const{content:n,label:s,showTimestamp:l,timestamp:c}=t;return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:`${o.P}__meta`},(0,r.createElement)(a.RichText.Content,{className:`${o.P}__participant has-bold-style`,tagName:"div",value:s}),l&&(0,r.createElement)("div",{className:`${o.P}__timestamp-label`},(0,r.createElement)("a",{className:`${o.P}__timestamp_link`,href:`#${(0,i.i)(c)}`},c))),(0,r.createElement)(a.RichText.Content,{className:`${o.P}__content`,tagName:"p",value:n}))}},38882:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});const r="wp-block-jetpack-dialogue"},48387:function(e,t,n){"use strict";var r=n(69307),a=n(78850),o=n(75139),i=n(89105),s=n.n(i),l=n(52175),c=n(17882);t.Z=e=>{let{className:t=null,currency:n=null,defaultValue:i=null,disabled:u=!1,label:p="",onChange:d=null,value:m=""}=e;const[h,f]=(0,r.useState)((0,a.ZP)(m,n,{symbol:""})),[g,b]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),y=(0,r.useRef)(null),E=(0,r.useCallback)((e=>{if(f(e),!d)return;const t=(0,c.Vm)(e,n);t&&t>=(0,c.hj)(n)?(d(t),k(!1)):e&&k(!0)}),[n,d]),w=()=>{y.current&&(y.current.focus(),b(!0))};return(0,r.useEffect)((()=>{y.current&&y.current.addEventListener("blur",(()=>b(!1)))}),[y]),(0,r.useEffect)((()=>{g||h||E((0,a.ZP)(i,n,{symbol:""}))}),[n,i,h,g,E]),(0,r.useEffect)((()=>{g||v||f((0,a.ZP)(m,n,{symbol:""}))}),[n,g,v,E,m]),(0,r.createElement)("div",{className:s()("donations__amount",t,{"has-focus":g,"has-error":v}),role:"button",tabIndex:0,onClick:w,onKeyDown:w},o.M[n].symbol,u?(0,r.createElement)("div",{className:"donations__amount-value"},(0,a.ZP)(m||i,n,{symbol:""})):(0,r.createElement)(l.RichText,{allowedFormats:[],"aria-label":p,keepPlaceholderOnFocus:!0,multiline:!1,onChange:e=>E(e),placeholder:(0,a.ZP)(i,n,{symbol:""}),ref:y,value:h,withoutInteractiveFormatting:!0}))}},46928:function(e,t,n){"use strict";var r=n(69307),a=n(75139),o=n(4096),i=n(52175),s=n(55609),l=n(65736),c=n(39630),u=n(17882);const __=l.__;t.Z=e=>{const{attributes:t,setAttributes:n}=e,{currency:l,monthlyDonation:p,annualDonation:d,showCustomAmount:m}=t,h=(e,r)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];n({[a]:{...o,show:r}})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(s.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(s.Button,{className:"jetpack-donations__currency-toggle",icon:(0,r.createElement)(r.Fragment,null,l+" - "+a.M[l].symbol,(0,r.createElement)(s.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:t,onKeyDown:e=>{n||e.keyCode!==c.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(s.MenuGroup,null,Object.keys(u.ck).map((e=>(0,r.createElement)(s.MenuItem,{isSelected:e===l,onClick:()=>{n({currency:e}),t()},key:`jetpack-donations-currency-${e}`},e+" - "+a.M[e].symbol))))}}))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{checked:p.show,onChange:e=>h("1 month",e),label:__("Show monthly donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:d.show,onChange:e=>h("1 year",e),label:__("Show annual donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:m,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,r.createElement)(s.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,o.lQ)()}`},__("View donation earnings","jetpack")))))}},92202:function(e,t,n){"use strict";var r=n(69307),a=n(78850),o=n(75139),i=n(52175),s=n(65736),l=n(17882);const __=s.__;t.Z={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:e=>{let{attributes:t}=e;const{currency:n,oneTimeDonation:s,monthlyDonation:c,annualDonation:u,showCustomAmount:p,chooseAmountText:d,customAmountText:m}=t;if(!s||!s.show||-1===s.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...c.show&&{"1 month":{title:__("Monthly","jetpack")}},...u.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(h).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(h).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${t} `,"data-interval":t},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:s.heading}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:c.heading}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:u.heading}),(0,r.createElement)(i.RichText.Content,{tagName:"p",value:d}),(0,r.createElement)("div",{className:"donations__amounts donations__one-time-item"},s.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),c.show&&(0,r.createElement)("div",{className:"donations__amounts donations__monthly-item"},c.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),u.show&&(0,r.createElement)("div",{className:"donations__amounts donations__annual-item"},u.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichText.Content,{tagName:"p",value:m}),(0,r.createElement)("div",{className:"donations__amount donations__custom-amount"},o.M[n].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":(0,a.ZP)(100*(0,l.hj)(n),n,{symbol:""})}))),(0,r.createElement)("div",{className:"donations__separator"},"——"),(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:s.extraText}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:c.extraText}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__annual-item",value:u.extraText}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:s.buttonText})),c.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:c.buttonText})),u.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:u.buttonText}))))))}}},53104:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(9818),s=n(65736),l=n(53823),c=n(82116),u=n(83040),p=n(10756);const __=s.__;t.Z=e=>{const{attributes:t,className:n,setAttributes:r}=e,{currency:s}=t,[d,m]=(0,o.useState)(""),[h,f]=(0,o.useState)(!1),[g,b]=(0,o.useState)(!1),[v,k]=(0,o.useState)([]),y=(0,i.useSelect)((e=>e("core/editor").getCurrentPost()),[]);(0,o.useEffect)((()=>{r({fallbackLinkUrl:y.link})}),[y.link,r]);const E=e=>{m(e)},w=e=>e.reduce(((e,t)=>{let{id:n,currency:r,type:a,interval:o}=t;return r===s&&"donation"===a&&(e[o]=n),e}),{}),_=e=>{if(!e&&"object"!=typeof e||e.errors)return void m(__("Could not load data from WordPress.com.","jetpack"));f(e.should_upgrade_to_access_memberships),b(e.connect_url);const t=w(e.products);(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(t)?k(t):e.should_upgrade_to_access_memberships||e.connect_url?k({"one-time":-1,"1 month":-1,"1 year":-1}):(0,u.Z)(s).then((e=>k(w(e))),E)};return(0,o.useEffect)((()=>{(0,p.Z)("donation").then(_,E)}),[s]),d?(0,o.createElement)(c.Z,{className:n,error:d}):(0,o.createElement)(l.Z,a()({},e,{products:v,shouldUpgrade:h,stripeConnectUrl:g}))}},83040:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z=async e=>{try{return await a()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e}})}catch(e){return Promise.reject(e.message)}}},10756:function(e,t,n){"use strict";var r=n(82827),a=n(86989),o=n.n(a),i=n(96483);t.Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{query:t}=(0,r.Qc)(window.location.href,!0),n=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.origin?"gutenberg-wpcom":"gutenberg",...e&&{type:e}});try{return await o()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},63445:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return c}});var r=n(65736),a=n(53104),o=n(56734),i=n(92202),s=n(51591);const __=r.__,l="donations",c={title:__("Donations","jetpack"),description:__("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:s.K9,category:"earn",keywords:[__("Donations","jetpack")],supports:{html:!1},edit:a.Z,save:o.Z,example:{},deprecated:[i.Z]}},82116:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=e=>{let{className:t,error:n}=e;return(0,r.createElement)(o.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:n,className:t})}},56734:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t}=e;const{fallbackLinkUrl:n,oneTimeDonation:o,monthlyDonation:i,annualDonation:s}=t;return o&&o.show&&o.planId&&-1!==o.planId?(0,r.createElement)("div",null,(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:o.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:o.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:i.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:i.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.buttonText})),s.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:s.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:s.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText}))):null}},75242:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(9818),i=n(65736),s=n(48387),l=n(17882);const __=i.__;t.Z=e=>{let{activeTab:t,attributes:n,setAttributes:c}=e;const{currency:u,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h,chooseAmountText:f,customAmountText:g}=n,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>n[b[t]][e],k=(e,r)=>{const a=b[t],o=n[a];c({[a]:{...o,[e]:r}})},[y,E]=(0,r.useState)(u),w=(0,l.hj)(u),_=(0,r.useMemo)((()=>[10*w,30*w,200*w]),[w]);(0,r.useEffect)((()=>{y!==u&&(E(u),c({oneTimeDonation:{...p,amounts:_},monthlyDonation:{...d,amounts:_},annualDonation:{...m,amounts:_}}))}),[u,y,_,p,d,m,c]);const C=v("amounts"),j=(0,o.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(a.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading"),onChange:e=>k("heading",e)}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>c({chooseAmountText:e})}),(0,r.createElement)("div",{className:"donations__amounts"},C.map(((e,t)=>(0,r.createElement)(s.Z,{currency:u,defaultValue:_[t],label:(0,i.sprintf)(// translators: %d: Tier level e.g: "1", "2", "3"
11
  __("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const n=[...C];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>c({customAmountText:e})}),(0,r.createElement)(s.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,l.hj)(u),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText"),onChange:e=>k("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(a.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText"),onChange:e=>{return t=e,void c({oneTimeDonation:{...p,buttonText:t},monthlyDonation:{...d,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:j})))}},53823:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(65736),l=n(46928),c=n(75242),u=n(43393);const __=s.__;t.Z=e=>{const{attributes:t,className:n,products:a,setAttributes:s,shouldUpgrade:p,stripeConnectUrl:d}=e,{oneTimeDonation:m,monthlyDonation:h,annualDonation:f}=t,[g,b]=(0,r.useState)("one-time"),v=(0,i.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),k=(0,r.useCallback)((e=>g===e),[g]),y={"one-time":{title:__("One-Time","jetpack")},...h.show&&{"1 month":{title:__("Monthly","jetpack")}},...f.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.useEffect)((()=>{m.planId===a["one-time"]&&h.planId===a["1 month"]&&f.planId===a["1 year"]||s({...a["one-time"]&&{oneTimeDonation:{...m,planId:a["one-time"]}},...a["1 month"]&&{monthlyDonation:{...h,planId:a["1 month"]}},...a["1 year"]&&{annualDonation:{...f,planId:a["1 year"]}}})}),[m,h,f,s,a]),(0,r.useEffect)((()=>{!h.show&&k("1 month")&&b("one-time"),!f.show&&k("1 year")&&b("one-time")}),[h,f,b,k]),(0,r.createElement)("div",{className:n},!p&&d&&(0,r.createElement)(u.Z,{blockName:"donations",postId:v,stripeConnectUrl:d}),(0,r.createElement)("div",{className:"donations__container"},Object.keys(y).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(y).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:o()("donations__nav-item",{"is-active":k(t)}),onClick:()=>b(t),onKeyDown:()=>b(t),key:`jetpack-donations-nav-item-${t} `},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(c.Z,{activeTab:g,attributes:t,setAttributes:s}))),(0,r.createElement)(l.Z,e))}},28559:function(e,t){"use strict";t.Z={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}}},77019:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},48631:function(e,t,n){"use strict";var r=n(61652);t.Z=[r.Z]},61652:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(92819),l=n(4981),c=n(65736);const _x=c._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];t.Z={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const a={...(0,s.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},o=(0,s.pick)(e,u);return[a,[(0,l.createBlock)("jetpack/button",{element:"a",text:o.text||_x("Register","verb: e.g. register for an event.","jetpack"),...o,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function(e){let{attributes:t}=e;const{eventId:n,useModal:a,url:s,style:l}=t;if(n)return a||"modal"===l?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:s,eventId:l,text:c,textColor:u,url:p}=e,d=(0,i.getColorClassName)("color",u),m=(0,i.getColorClassName)("background-color",t),h=o()("wp-block-button__link",{"has-text-color":u||s,[d]:d,"has-background":t||a,[m]:m,"no-border-radius":0===n}),f={backgroundColor:m?void 0:a,color:d?void 0:s,borderRadius:n?n+"px":void 0};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{className:h,href:p,id:`eventbrite-widget-${l}`,rel:"noopener noreferrer",role:"button",style:f,tagName:"a",target:"_blank",value:c}))}(t):s&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:s},s)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,s.isEmpty)(t)||(0,s.some)((0,s.pick)(e,u),Boolean))}},62337:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(4096),u=n(45166),p=n(28559),d=n(62194),m=n(14087),h=n(8964),f=n(72566),g=n(87072),b=n(77019);const __=i.__,_x=i._x;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1}),a()(this,"setUrl",(e=>{const{attributes:t,noticeOperations:n,setAttributes:r}=this.props,{style:a}=t;if(!e||u.Q7===e||"modal"===a)return;const o=(0,d.Ve)(e);if(o){const t={eventId:o,url:e};(0,g.Z)(t.url,this.setIsResolvingUrl).then((e=>{const a=(0,m.S)(p.Z,{...t,url:e});r(a),this.setState({editedUrl:e}),n.removeAllNotices()})).catch((()=>{r({eventId:void 0,url:void 0}),this.setErrorNotice()}))}else this.setErrorNotice()})),a()(this,"setIsResolvingUrl",(e=>this.setState({isResolvingUrl:e}))),a()(this,"setEditingUrl",(e=>this.setState({editingUrl:e}))),a()(this,"setErrorNotice",(()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:n}=this.state;e.removeAllNotices(),e.createErrorNotice((0,o.createElement)(o.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,o.createElement)(s.Button,{isLink:!0,onClick:()=>(0,d.N3)(n,t)},_x("Convert block to link","button label","jetpack"))))})),a()(this,"submitForm",(e=>{e&&e.preventDefault(),this.setUrl((0,d.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})})),a()(this,"cannotEmbed",(()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!u.Wh.test(e)}))}componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}renderLoading(){return(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(s.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:n,setAttributes:r}=this.props,a=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,o.createElement)("div",{className:"block-editor-block-preview__container"},(0,o.createElement)("img",{src:h,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,o.createElement)(f.Z,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:n,styleOptions:a,onSelectStyle:r,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:n}=this.state,r=(0,c.Wp)()||(0,c.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:u.qv,notices:t},(0,o.createElement)("form",{onSubmit:this.submitForm},(0,o.createElement)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:e=>this.setState({editedUrl:e.target.value})}),(0,o.createElement)(s.Button,{isSecondary:!0,type:"submit"},_x("Embed","submit button label","jetpack"))),(0,o.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.createElement)(s.ExternalLink,{href:r},__("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const n=`eventbrite-widget-${t}`,r=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${t},\n\t\t\t\t\tiframeContainerId: '${n}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${n}"></div>\n\t\t`;return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.SandBox,{html:r}),(0,o.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:n}=e,{editingUrl:r,isResolvingUrl:a}=this.state;return a?this.renderLoading():r||!t||this.cannotEmbed()?this.renderEditEmbed():(0,o.createElement)(o.Fragment,null,this.renderInspectorControls(),(0,o.createElement)(l.BlockControls,null,(0,o.createElement)(b.J,{setEditingUrl:this.setEditingUrl})),"modal"===n?(0,o.createElement)(l.InnerBlocks,{template:[[u.Ss.name,u.Ss.attributes]],templateLock:"all"}):this.renderInlinePreview())}}t.Z=(0,s.withNotices)(v)},45166:function(e,t,n){"use strict";n.d(t,{Ss:function(){return d},Wh:function(){return m},Q7:function(){return f},u2:function(){return g},qv:function(){return v},Xd:function(){return k}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(28559),l=n(48631),c=n(62337),u=n(74318),p=n(57535);const __=a.__,_x=a._x,d={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},m=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,h=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,f="https://www.eventbrite.com/e/test-event-tickets-123456789",g="eventbrite",b=__("Eventbrite Checkout","jetpack"),v=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,{id:"eventbrite-icon"},(0,r.createElement)(o.Path,{d:"M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z"}))),k={title:b,description:__("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:v,foreground:(0,p.m)()},category:"embed",keywords:[_x("events","block search term","jetpack"),_x("tickets","block search term","jetpack")],supports:{html:!1,align:!0},attributes:s.Z,edit:c.Z,save:u.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(m.test(e.textContent)||h.test(e.textContent)),transform:e=>(0,i.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},example:{attributes:{url:f,eventId:123456789,style:"modal"},innerBlocks:[d]},deprecated:l.Z}},74318:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:t}=e;const{eventId:n,style:o,url:i}=t;if(n)return"modal"===o?(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null)):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)}},62194:function(e,t,n){"use strict";n.d(t,{N3:function(){return o},Ve:function(){return i},qq:function(){return s}});var r=n(69307),a=n(4981);function o(e,t){const n=(0,r.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,r.renderToString)(n)}))}function i(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e&&"string"==typeof e?e.trim():null}},47271:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(4981),u=n(9818);const __=s.__;function p(e){let{onReplace:t}=e;const[n,a]=(0,i.useState)(!1),s=(0,u.useSelect)((e=>e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")));return{isGatheringStorm:n,unleashStorm:(e,n)=>{if((0,r.isEmpty)(e))return;const i=e.match(/^https?:\/\/(?:www\.)?twitter\.com\/([^/]+)\/status\/\d+/);if((0,r.isEmpty)(i))return;const p=i[1];n.removeAllNotices(),a(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((e=>{if(a(!1),!(0,r.isArray)(e))return void n.createErrorNotice(__("An error occurred. Please try again later.","jetpack"));if((0,r.isEmpty)(e))return void n.createErrorNotice(__("We were unable to get any content from this tweet.","jetpack"));t(e.map((e=>{switch(e.type){case"paragraph":return(0,c.createBlock)("core/paragraph",{content:e.content});case"gallery":return(0,c.createBlock)("core/gallery",{images:e.images});case"image":return(0,c.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return(0,c.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return(0,c.createBlock)("core/embed",{url:e.url})}})));(0,r.some)(s,(e=>"twitter"===e.service_name&&`@${p}`===e.display_name))||(0,u.dispatch)("core/notices").createWarningNotice(__("We were unable to verify that this Twitter thread was published on a Twitter account belonging to you. Please ensure you have permission to reproduce it before publishing.","jetpack")),(0,u.dispatch)("core/notices").createSuccessNotice(__("Twitter thread successfully imported","jetpack"),{type:"snackbar"})})).catch((e=>{a(!1),n.createErrorNotice(e.message)}))}}}},72966:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=(0,r.forwardRef)((function(e,t){let{onSubmit:n,onChange:a,value:i=""}=e;return(0,r.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:n},(0,r.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:i,onChange:a,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,r.createElement)(o.Button,{id:"wp-block-jetpack-gif_search-button",isSecondary:!0,type:"submit"},__("Search","jetpack")))}))},32882:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});const r="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},68055:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(52175);function i(){return(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{className:"components-panel__body-gif-branding"},(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,r.createElement)(a.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,r.createElement)(a.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"}))))}},61796:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(31072),u=n(80917),p=n(72966),d=n(68055),m=n(21835);const __=i.__;t.Z=function(e){let{attributes:t,setAttributes:n,className:a,isSelected:i}=e;const{align:h,caption:f,giphyUrl:g,searchText:b,paddingTop:v}=t,k=o()(a,`align${h}`),[y,E]=(0,r.useState)(!1),w=(0,r.createRef)(),{isFetching:_,giphyData:C,fetchGiphyData:j}=(0,m.Z)(),S=()=>{w.current.focus(),E(!1)};(0,r.useEffect)((()=>{C&&C[0]&&n((0,u.ix)(C[0]))}),[C,n]);const x=e=>{e.preventDefault(),t.searchText&&!_&&j((0,u.Gr)(t.searchText))},P=e=>n({searchText:e.target.value});return(0,r.createElement)("div",{className:k},(0,r.createElement)(d.Z,null),g?(0,r.createElement)("figure",null,i&&(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w}),i&&C&&C.length>1&&(0,r.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},C.map((e=>{const t={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,r.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:t=>{t.preventDefault(),(e=>{n((0,u.ix)(e))})(e)},style:t})}))),(0,r.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:v}},(0,r.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:S,onKeyDown:S,role:"button",tabIndex:"0"}),(0,r.createElement)("iframe",{src:g,title:b})),(!l.RichText.isEmpty(f)||i)&&!!g&&(0,r.createElement)(l.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:y,unstableOnFocus:()=>E(!1),onChange:e=>n({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:f})):(0,r.createElement)(s.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:c.qv,label:c.TN,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w})))}},21835:function(e,t,n){"use strict";var r=n(69307);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t,n]=(0,r.useState)(!1),[a,o]=(0,r.useState)(e),[i,s]=(0,r.useState)("");return(0,r.useEffect)((()=>{if(!i)return;(async()=>{n(!0);const e=await fetch(i).then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json(),n=void 0!==t.data.images?[t.data]:t.data;n[0].images&&o(n)}n(!1)})()}),[i]),{isFetching:t,giphyData:a,fetchGiphyData:s}}},31072:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},TN:function(){return c},qv:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(55609),i=n(61796),s=n(57535);const __=a.__,_x=a._x,l="gif",c=__("GIF","jetpack"),u=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"})),p={title:c,icon:{src:u,foreground:(0,s.m)()},category:"embed",keywords:[_x("animated","block search term","jetpack"),_x("giphy","block search term","jetpack"),_x("image","block search term","jetpack")],description:__("Search for and insert an animated image.","jetpack"),attributes:{align:{type:"string",default:"center"},caption:{type:"string"},giphyUrl:{type:"string"},searchText:{type:"string"},paddingTop:{type:"string",default:"56.2%"}},supports:{html:!1,align:!0},edit:i.Z,save:()=>null,example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}}},80917:function(e,t,n){"use strict";n.d(t,{Gr:function(){return s},ix:function(){return u}});var r=n(32882);const a=e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(r.U)}&limit=10`,o=e=>`https://api.giphy.com/v1/gifs/${encodeURIComponent(e)}?api_key=${encodeURIComponent(r.U)}`,i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n=e.split(t);return n[n.length-1]},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;e=e.trim();const n=/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/,r=e.match(n);return r&&r[3]&&(t=i(r[3],"-")),t?o(t):a(e)},l=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,c=e=>null==e?void 0:e.embed_url,u=e=>({giphyUrl:c(e),paddingTop:l(e)})},76280:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__,_x=o._x;t.Z=e=>{const{className:t,embedValue:n,onChange:o,onSubmit:i}=e;return(0,r.createElement)(a.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:i,className:t},(0,r.createElement)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:o}),(0,r.createElement)(a.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack"))))}},53997:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(52175),l=n(90162),c=n(4981),u=n(4096),p=n(76280),d=n(54286),m=n(3030);const __=a.__,_x=a._x;t.Z=(0,i.compose)(o.withNotices,(0,l.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:n},className:a,isMobile:i,isSelected:l,name:h,noticeOperations:f,noticeUI:g,setAttributes:b}=e,[v,k]=(0,r.useState)(t||""),[y,E]=(0,r.useState)(!1),[w,_]=(0,r.useState)(!1);(0,r.useEffect)((()=>{!l&&w&&_(!1)}),[l,w]);const C=()=>{_(!0)},j=e=>{e&&e.preventDefault();const t=(0,m.L7)(v.trim());if(!m.Wh.test(t.url))return f.removeAllNotices(),void f.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));b(t),E(!1),f.removeAllNotices()},S=(0,c.getBlockDefaultClassName)(h),x=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${i?"300":n}"></iframe>`,P=(0,r.createElement)(o.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),T=(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(p.Z,{className:`${S}-embed-form-sidebar`,embedValue:v,onChange:e=>k(e.target.value),onSubmit:j}));if(y||!t){const e=(0,u.Wp)()||(0,u.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,r.createElement)("div",{className:a},T,(0,r.createElement)(o.Placeholder,{className:a,label:__("Google Calendar","jetpack"),icon:d.Z,instructions:(0,r.createElement)("ol",{className:`${S}-placeholder-instructions`},(0,r.createElement)("li",null,P),(0,r.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),notices:g},(N=`${S}-embed-form-editor`,(0,r.createElement)("form",{onSubmit:j,className:N},(0,r.createElement)("textarea",{type:"text",value:v,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>k(e.target.value)}),(0,r.createElement)(o.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)("div",{className:`${S}-placeholder-links`},(0,r.createElement)(o.ExternalLink,{href:e},__("Learn more","jetpack")))))}var N;return(0,r.createElement)("div",{className:a},T,(0,r.createElement)("div",null,(0,r.createElement)(o.SandBox,{html:x,onFocus:C}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:C})))}))},54286:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z"}))},13984:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(4981),i=n(53997),s=n(3030),l=n(54286),c=n(57535);const __=a.__,_x=a._x,u="google-calendar",p={title:__("Google Calendar","jetpack"),description:__("Embed a Google Calendar","jetpack"),keywords:[_x("events","block search term","jetpack"),_x("dates","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack")],icon:{src:l.Z,foreground:(0,c.m)()},category:"embed",supports:{align:!0,alignWide:!0,html:!1},attributes:{url:{type:"string"},height:{type:"integer",default:600}},edit:i.Z,save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)},transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:e=>{let{named:{domain:t,dir:n,query:r}}=e;return`https://${t}.google.com/${n}?${r}`}}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&s.Wh.test(e.textContent),transform:e=>(0,o.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&s.E6.test(e.innerHTML),transform:e=>{const{url:t,height:n}=(0,s.jj)(e.innerHTML.trim());return(0,o.createBlock)("jetpack/google-calendar",{url:t,height:n})}}]},example:{attributes:{url:"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}},3030:function(e,t,n){"use strict";n.d(t,{Wh:function(){return a},E6:function(){return o},jj:function(){return c},L7:function(){return u}});const r="s*https?://calendar.google.com/calendar",a=new RegExp(`^${r}`,"i"),o=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${r}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${r}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),s=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=o.exec(e);if(!t)return;const n={};return t.forEach(((e,t)=>{if(0===t)return;if(a.test(e))return void(n.url=e);let r;for(;null!==(r=s.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}function u(e){return o.test(e)?c(e):i.test(e)?{url:l(e)}:{url:e}}},74956:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{attributes:t,setAttributes:n}=e;const{orientation:o}=t;return(0,r.createElement)(a.PanelBody,{title:__("Orientation","jetpack")},(0,r.createElement)(a.RadioControl,{selected:o||"horizontal",options:[{label:__("Side by side","jetpack"),value:"horizontal"},{label:__("Above and below","jetpack"),value:"vertical"}],onChange:e=>n({orientation:e})}))}},38544:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(94333),s=n(65736),l=n(5968),c=n(74956),u=n(91667),p=n(12379);n(728);const __=s.__;t.Z=e=>{let{attributes:t,className:n,clientId:s,isSelected:d,setAttributes:m}=e;const{align:h,imageBefore:f,imageAfter:g,caption:b,orientation:v}=t;let k=null,y=null;const E=(0,r.useRef)();i.useResizeObserver&&([k,y]=(0,i.useResizeObserver)(),(0,p.Z)((e=>{e>0&&"undefined"!=typeof juxtapose&&juxtapose.sliders&&juxtapose.sliders.forEach((t=>{t.wrapper.parentElement.id===s&&t.optimizeWrapper(e)}))}),200,y.width));const w=f&&f.url&&g&&g.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return(0,r.useLayoutEffect)((()=>{f.url&&g.url&&"undefined"!=typeof juxtapose&&juxtapose.makeSlider(null==E?void 0:E.current)}),[h,f,g,v]),(0,r.createElement)("figure",{className:n,id:s},k,(0,r.createElement)(a.InspectorControls,{key:"controls"},(0,r.createElement)(c.Z,{attributes:t,setAttributes:m})),(0,r.createElement)("div",{ref:E,className:w,"data-mode":v||"horizontal"},(0,r.createElement)(o.Placeholder,{label:null},(0,r.createElement)("div",{className:"image-compare__image-before"},(0,r.createElement)(u.Z,{image:{id:f.id,url:f.url,alt:f.alt},placeHolderLabel:__("Image before","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageBefore:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})),(0,r.createElement)("div",{className:"image-compare__image-after"},(0,r.createElement)(u.Z,{image:{id:g.id,url:g.url,alt:g.alt},placeHolderLabel:__("Image after","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageAfter:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})))),(!a.RichText.isEmpty(b)||d&&f.url&&g.url)&&(0,r.createElement)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption","jetpack"),value:b,onChange:e=>m({caption:e}),inlineToolbar:!0}))}},94703:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M21 4h-6v1.5h6c.3 0 .5.2.5.5v.4l-3.6 3.5L15 8.1v1.8l2.6 1.7c.1.1.3.1.4.1.2 0 .4-.1.5-.2l3-2.9V18c0 .3-.2.5-.5.5h-6V20h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM1 6v12c0 1.1.9 2 2 2h10.5V4H3c-1.1 0-2 .9-2 2zm11 12.5H3c-.3 0-.5-.2-.5-.5v-1.4L5 14.7l1.5-1.1.1-.1 3 1.9c.1.1.3.1.4.1.2 0 .4-.1.5-.2L12 14v4.5zm0-6.6l-2.1 2L7 12c-.1-.1-.3-.1-.4-.1h-.1c-.1 0-.3.1-.4.1l-1.1.9-2.5 1.8V6c0-.3.2-.5.5-.5h9v6.4z"}))},91667:function(e,t,n){"use strict";var r=n(69307),a=n(94333),o=n(52175),i=n(55609);t.Z=(0,a.compose)([i.withNotices])((e=>{const{image:t,noticeOperations:n,noticeUI:a,onChange:i,placeHolderLabel:s}=e,l=(0,r.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),c=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.MediaPlaceholder,{labels:{title:s},accept:"image/*",allowedTypes:["image"],onSelect:i,onError:e=>n.createErrorNotice(e),notices:a}));return t&&t.url?l:c}))},1624:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(65736),a=n(38544),o=n(94703),i=n(31105),s=n(90767),l=n(58632),c=n(20510),u=n(57535);const __=r.__,_x=r._x,p="image-compare",d={title:__("Image Compare","jetpack"),description:__("Compare two images with a slider. Works best with images of the same size.","jetpack"),icon:{src:o.Z,foreground:(0,u.m)()},category:(0,c.Z)("media","layout"),keywords:[_x("juxtapose","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("side by side","block search term","jetpack"),_x("slider","block search term","jetpack")],supports:{align:["wide","full"]},attributes:{imageBefore:{type:"object",default:{}},imageAfter:{type:"object",default:{}},caption:{type:"string"},orientation:{type:"string",default:"horizontal"}},example:{attributes:{imageBefore:{id:1,url:l,alt:__("Before","jetpack")},imageAfter:{id:2,url:s,alt:__("After","jetpack")},caption:__("Example image","jetpack")}},edit:a.Z,save:i.Z}},31105:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t,className:n}=e;const{imageBefore:o,imageAfter:i,caption:s,orientation:l}=t;return(0,r.createElement)("figure",{className:n},(0,r.createElement)("div",{className:"juxtapose","data-mode":l||"horizontal"},(0,r.createElement)("img",{id:o.id,src:o.url,alt:o.alt,width:o.width,height:o.height,className:"image-compare__image-before"}),(0,r.createElement)("img",{id:i.id,src:i.url,alt:i.alt,width:i.width,height:i.height,className:"image-compare__image-after"})),!a.RichText.isEmpty(s)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:s}))}},12379:function(e,t,n){"use strict";var r=n(69307);t.Z=(e,t,n)=>{(0,r.useEffect)((()=>{const r=setTimeout((()=>e(n)),t);return()=>clearTimeout(r)}),[n])}},728:function(e,t,n){"use strict";var r=n(47701);n.n(r)()((function(){const e={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2};function t(e,t){const n=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){n.loaded=!0,t._onLoaded()},this.image.src=e.src,this.image.alt=e.alt||"",this.label=e.label||!1}function n(e,t){e&&e.classList.add(t)}function r(e,t){e&&e.classList.remove(t)}function a(e){return{width:parseInt(window.getComputedStyle(e).width,10),height:parseInt(window.getComputedStyle(e).height,10)}}function o(e,t){let n;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{const r=e.getBoundingClientRect(),a={top:r.top+document.body.scrollTop+document.documentElement.scrollTop,left:r.left+document.body.scrollLeft+document.documentElement.scrollLeft},o=e.offsetWidth;n=(function(e){let t;return t=e.pageX?e.pageX:e.touches?e.touches[0].pageX:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t}(t)-a.left)/o*100}return n}function i(e,t,n){let r;if("string"==typeof t||"number"==typeof t)r=parseInt(t,10);else{const a=e.getBoundingClientRect(),o={top:a.top+n.body.scrollTop+n.documentElement.scrollTop,left:a.left+n.body.scrollLeft+n.documentElement.scrollLeft},i=e.offsetHeight;r=(function(e){let t;return t=e.pageY?e.pageY:e.touches?e.touches[0].pageY:e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}(t)-o.top)/i*100}return r}const s={animate:!0,showLabels:!0,makeResponsive:!0};function l(e,n,r){let a;for(a in this.element=e,this.options={animate:!0,showLabels:!0,makeResponsive:!0,startingPosition:"50%",mode:"horizontal",callback:null},this.options)a in r&&(this.options[a]=a in s?"string"!=typeof(o=r[a])?Boolean(o):!("false"===o||""===o):r[a]);var o;2===n.length&&(this.imgBefore=new t(n[0],this),this.imgAfter=new t(n[1],this))}l.prototype={updateSlider:function(e,t){let a;a="vertical"===this.options.mode?i(this.slider,e,this.sliderParentDocument):o(this.slider,e),a=a.toFixed(2)+"%";const s=parseFloat(a),l=100-s+"%";s>0&&s<100&&(r(this.handle,"transition"),r(this.rightImage,"transition"),r(this.leftImage,"transition"),this.options.animate&&t&&(n(this.handle,"transition"),n(this.leftImage,"transition"),n(this.rightImage,"transition")),"vertical"===this.options.mode?(this.handle.style.top=a,this.leftImage.style.height=a,this.rightImage.style.height=l):(this.handle.style.left=a,this.leftImage.style.width=a,this.rightImage.style.width=l),this.sliderPosition=a)},getPosition:function(){return this.sliderPosition},displayLabel:function(e,t){const n=document.createElement("div");n.className="jx-label",n.setAttribute("tabindex",0),function(e,t){document.body.textContent?e.textContent=t:e.innerText=t}(n,t),e.appendChild(n)},setStartingPosition:function(e){this.options.startingPosition=e},calculateDims:function(e,t){const n=(r=this.imgBefore.image,{width:r.naturalWidth,height:r.naturalHeight,aspect:function(){return this.width/this.height}}).aspect();var r;return e?t=e/n:t&&(e=t*n),{width:e,height:t,ratio:n}},responsivizeIframe:function(e){return e.height<window.innerHeight?e.ratio>=1&&(this.wrapper.style.paddingTop=parseInt((window.innerHeight-e.height)/2)+"px"):e.height>window.innerHeight&&(e=this.calculateDims(0,window.innerHeight),this.wrapper.style.paddingLeft=parseInt((window.innerWidth-e.width)/2)+"px"),e},setWrapperDimensions:function(){const e=a(this.wrapper.parentNode).width,t=a(this.wrapper.parentNode).height;let n=this.calculateDims(e,t);window.location===window.parent.location||this.options.makeResponsive||(n=this.responsivizeIframe(n)),this.wrapper.style.height=parseInt(n.height)+"px",this.wrapper.style.width=parseInt(n.width)+"px"},optimizeWrapper:function(t){let n=e.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=t&&this.imgAfter.image.naturalWidth>=t?(this.wrapper.style.width=t+"px",n=e.OPTIMIZATION_WAS_CONSTRAINED):this.imgAfter.image.naturalWidth<t?this.wrapper.style.width=this.imgAfter.image.naturalWidth+"px":this.wrapper.style.width=this.imgBefore.image.naturalWidth+"px",this.setWrapperDimensions(),n},_onLoaded:function(){if(this.imgBefore&&!0===this.imgBefore.loaded&&this.imgAfter&&!0===this.imgAfter.loaded){var e;if(this.wrapper=this.element,!this.wrapper||this.wrapper.querySelector(".jx-slider"))return;n(this.wrapper,"juxtapose"),this.wrapper.style.width=this.imgBefore.image.naturalWidth,this.setWrapperDimensions(),this.slider=document.createElement("div"),this.slider.className="jx-slider",this.wrapper.appendChild(this.slider),this.sliderParentDocument=this.wrapper.ownerDocument,"horizontal"!==this.options.mode&&n(this.slider,this.options.mode),this.handle=document.createElement("div"),this.handle.className="jx-handle",this.rightImage=document.createElement("div"),this.rightImage.className="jx-image jx-right",this.rightImage.appendChild(this.imgAfter.image),this.leftImage=document.createElement("div"),this.leftImage.className="jx-image jx-left",this.leftImage.appendChild(this.imgBefore.image),this.slider.appendChild(this.handle),this.slider.appendChild(this.leftImage),this.slider.appendChild(this.rightImage),this.leftArrow=document.createElement("div"),this.rightArrow=document.createElement("div"),this.control=document.createElement("div"),this.controller=document.createElement("div"),this.leftArrow.className="jx-arrow jx-left",this.rightArrow.className="jx-arrow jx-right",this.control.className="jx-control",this.controller.className="jx-controller",this.controller.setAttribute("tabindex",0),this.controller.setAttribute("role","slider"),this.controller.setAttribute("aria-valuenow",50),this.controller.setAttribute("aria-valuemin",0),this.controller.setAttribute("aria-valuemax",100),this.controller.setAttribute("aria-label",(null===(e=window.imageCompareHandle)||void 0===e?void 0:e.msg)||"Slide to compare images"),this.handle.appendChild(this.leftArrow),this.handle.appendChild(this.control),this.handle.appendChild(this.rightArrow),this.control.appendChild(this.controller),this._init()}},_init:function(){this.updateSlider(this.options.startingPosition,!1),!0===this.options.showLabels&&(this.imgBefore.label&&this.displayLabel(this.leftImage,this.imgBefore.label),this.imgAfter.label&&this.displayLabel(this.rightImage,this.imgAfter.label));const t=this;window.addEventListener("resize",(function(){t.setWrapperDimensions()})),this.slider.addEventListener("mousedown",(function(e){e.preventDefault(),t.updateSlider(e,!0);let n=!0;this.addEventListener("mousemove",(function(e){e.preventDefault(),n&&t.updateSlider(e,!1)})),this.addEventListener("mouseup",(function(e){e.preventDefault(),e.stopPropagation(),n=!1}))})),this.slider.addEventListener("touchstart",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!0),this.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!1)}))})),this.handle.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;let r=parseFloat(this.style.left);if(37===n){r-=1;const e=parseFloat(this.style.left)-1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}if(39===n){r+=1;const e=parseFloat(this.style.left)+1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}})),this.leftImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("90%",!0),t.controller.setAttribute("aria-valuenow",91))})),this.rightImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("10%",!0),t.controller.setAttribute("aria-valuenow",10))})),e.sliders.push(this),this.options.callback&&"function"==typeof this.options.callback&&this.options.callback(this)}},e.makeSlider=function(t,r){void 0===r&&(r=e.sliders.length);const a=t,o=a.querySelectorAll("img");if(o.length<2)return;const i={};a.getAttribute("data-animate")&&(i.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(i.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(i.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(i.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(i.mode=a.getAttribute("data-makeresponsive"));return n(t,"juxtapose-"+r),a.innerHTML?a.innerHTML="":a.innerText="",new e.JXSlider(t,[{src:o[0].src,label:o[0].getAttribute("data-label"),alt:o[0].alt},{src:o[1].src,label:o[1].getAttribute("data-label"),alt:o[1].alt}],i)},e.scanPage=function(){const t=document.querySelectorAll(".juxtapose");for(let n=0;n<t.length;n++)e.makeSlider(t[n],n)},e.JXSlider=l,window.juxtapose=e,e.scanPage()}))},18776:function(e,t){"use strict";t.Z={accessToken:{type:"string"},instagramUser:{type:"string"},columns:{type:"number",default:3,min:1,max:6},count:{type:"number",default:9,min:1,max:30},spacing:{type:"number",default:10,min:0,max:50},isStackedOnMobile:{type:"boolean",default:!0}}},14937:function(e,t,n){"use strict";n.d(t,{u:function(){return r},D:function(){return a}});const r=30,a="jetpack-new-instagram-connection"},3802:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(14937);const __=o.__,_n=o._n;function s(e){let{accountImageTotal:t,attributes:n,currentUserConnected:s,disconnectFromService:l,shouldRenderSidebarNotice:c,setAttributes:u}=e;const{accessToken:p,columns:d,count:m,instagramUser:h,isStackedOnMobile:f,spacing:g}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Account Settings","jetpack")},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("span",null,__("Account","jetpack")),(0,r.createElement)(a.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),s&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.Button,{isDestructive:!0,isLink:!0,onClick:()=>l(p)},__("Disconnect your account","jetpack")))),(0,r.createElement)(a.PanelBody,{title:__("Display Settings","jetpack")},c?(()=>{const e=t?(0,o.sprintf)(
12
  /* translators: placeholder is a number. */
13
+ _n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(a.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,r.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:d,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:f,onChange:()=>u({isStackedOnMobile:!f})})))}},66137:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(52175),l=n(55609),c=n(65736),u=n(18776),p=n(14937),d=n(14087),m=n(10273),h=n(2992),f=n(44420),g=n(76853),b=n(63729),v=n(3802);const __=c.__;t.Z=(0,l.withNotices)((e=>{const{attributes:t,className:n,isSelected:a,noticeOperations:c,noticeUI:k,setAttributes:y}=e,{accessToken:E,align:w,columns:_,count:C,isStackedOnMobile:j,spacing:S}=t;(0,r.useEffect)((()=>{const e=(0,d.S)(u.Z,t);(0,i.isEqual)(e,t)||y(e)}),[t,y]);const[x,P]=(0,r.useState)(E),{isRequestingWpcomConnectUrl:T,wpcomConnectUrl:N}=(0,h.Z)(),{images:A,isLoadingGallery:I,setImages:B}=(0,f.Z)({accessToken:E,noticeOperations:c,setAttributes:y,setSelectedAccount:P}),{connectToService:M,disconnectFromService:R,isConnecting:L,isRequestingUserConnections:Z,userConnections:D}=(0,m.Z)({accessToken:E,noticeOperations:c,selectedAccount:x,setAttributes:y,setImages:B,setSelectedAccount:P}),F=(0,b.Z)(),O=C>A.length?A.length:C,z=!I&&(!E||(0,i.isEmpty)(A)),U=!z,$=E&&I&&(0,i.isEmpty)(A),V=!z&&!$,G=o()(n,{[`align${w}`]:w}),H=o()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${_}`,{"is-stacked-on-mobile":j}),q={gridGap:S,"--latest-instagram-posts-spacing":S?`${S}px`:void 0},W={padding:S},K=()=>{x&&p.D!==x?y({accessToken:x,instagramUser:(0,i.find)(D,{token:x}).username}):M()};return(0,r.createElement)("div",{className:G},z&&(0,r.createElement)(l.Placeholder,{icon:"instagram",instructions:F?Z||D.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:k},F?(()=>{const e=D.length>0,t=[...(0,i.map)(D,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:p.D}],n=L||Z||e&&!x;return(0,r.createElement)("div",null,e&&(0,r.createElement)(l.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>P(e),options:t,selected:x}),p.D===x&&(0,r.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,r.createElement)(l.Button,{disabled:n,isPrimary:!0,onClick:K},L&&__("Connecting…","jetpack"),Z&&__("Loading your connections…","jetpack"),!L&&!Z&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(l.Button,{disabled:T||!N,href:N,isSecondary:!0},__("Connect to WordPress.com","jetpack"))),$&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(l.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),V&&(0,r.createElement)("div",{className:H,style:q},(0,i.times)(a?C:O,(e=>(0,r.createElement)("span",{className:o()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:W},(e=>{if(A[e]){const n=A[e];return(0,r.createElement)(g.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:S})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),U&&(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(v.Z,{accountImageTotal:A.length,attributes:t,currentUserConnected:F,disconnectFromService:R,shouldRenderSidebarNotice:U&&!$&&A.length<C,setAttributes:y})))}))},76853:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{src:t,alt:n,spacing:a}=e;const[i,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)("auto"),u=(0,r.useRef)(),p=()=>{s(!0),c("auto")};(0,r.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=p}u.current&&c(u.current.parentNode.getBoundingClientRect().width)}),[t]);const d=-1*a,m=o()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),h=i?{margin:d}:{margin:d,height:l},f=o()({"is-loaded":i});return(0,r.createElement)("span",{style:h,className:m},(0,r.createElement)("img",{alt:n,className:f,ref:u,src:t}))}},77007:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(4981),i=n(18776),s=n(66137),l=n(57535);const __=a.__,_x=a._x,c="instagram-gallery",u={title:__("Latest Instagram Posts","jetpack"),description:__("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:"instagram",foreground:(0,l.m)()},category:"embed",keywords:[_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack")],supports:{align:!0,html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"wpcom_instagram_widget"===t},transform:e=>{let{instance:t}=e;return(0,o.createBlock)("jetpack/instagram-gallery",{columns:t.raw.columns,count:t.raw.count,accessToken:t.raw.token_id})}}]},attributes:i.Z,edit:s.Z,save:e=>{let{attributes:{instagramUser:t}}=e;return t&&(0,r.createElement)("div",null,(0,r.createElement)("a",{href:`https://www.instagram.com/${t}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${t}/`))}}},10273:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(59177),a=n(92819),o=n(86989),i=n.n(o),s=n(69307),l=n(65736),c=n(14937),u=n(63729);const __=l.__;function p(e){let{accessToken:t,noticeOperations:n,selectedAccount:o,setAttributes:l,setImages:p,setSelectedAccount:d}=e;const[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)([]),k=(0,u.Z)();(0,s.useEffect)((()=>{!t&&k&&(g(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{g(!1),v(e)})).catch((()=>{g(!1),v([])})))}),[t,k]),(0,s.useEffect)((()=>{c.D===o||(0,a.find)(b,{token:o})||d(void 0)}),[o,d,b]);return{connectToService:()=>{n.removeAllNotices(),h(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new r.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();l({accessToken:e}),d(e)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&h(!1)}))})).catch((()=>{n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),h(!1)}))},disconnectFromService:()=>{n.removeAllNotices(),l({accessToken:void 0,instagramUser:void 0}),p([])},isConnecting:m,isRequestingUserConnections:f,userConnections:b}}},2992:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(86989),a=n.n(r),o=n(9818),i=n(69307),s=n(96483),l=n(63729);function c(){const{isAutoDraft:e}=(0,o.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,o.useDispatch)("core/editor"),[n,r]=(0,i.useState)(),[c,u]=(0,i.useState)(!1),p=(0,l.Z)();return(0,i.useEffect)((()=>{p||n||c||(e?t():(u(!0),a()({path:(0,s.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{r(e),u(!1)}))))}),[p,e,c,t,n]),{isRequestingWpcomConnectUrl:c,wpcomConnectUrl:n}}},44420:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(14937);const __=s.__;function u(e){let{accessToken:t,noticeOperations:n,setAttributes:a,setSelectedAccount:s}=e;const[u,p]=(0,i.useState)([]),[d,m]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{t&&(n.removeAllNotices(),m(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:c.u})}).then((e=>{let{external_name:t,images:o}=e;if(m(!1),!o||!(0,r.isArray)(o))return n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p([]),a({accessToken:void 0,instagramUser:void 0}),void s(void 0);(0,r.isEmpty)(o)&&n.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),a({instagramUser:t}),p(o)})).catch((()=>{m(!1),p([]),a({accessToken:void 0,instagramUser:void 0}),s(void 0)})))}),[t,a,s]),{images:u,isLoadingGallery:d,setImages:p}}},66916:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(48355);const a="likes",o={render:r.Z}},48355:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(12238),l=n(9818),c=n(23539);const __=a.__,u=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{areLikesEnabled:t("jetpack_likes_enabled")}})),p=(0,l.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{editPost:t}}));t.Z=(0,i.compose)([u,p])((e=>{let{areLikesEnabled:t,editPost:n}=e;return(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},(0,r.createElement)(c.Z,null,(0,r.createElement)(o.CheckboxControl,{label:__("Show likes.","jetpack"),checked:t,onChange:e=>{n({jetpack_likes_enabled:e})}})))}))},25887:function(e,t,n){"use strict";n.d(t,{N3:function(){return r},sf:function(){return a},Cw:function(){return o}});const r="processing",a="success",o="error"},50013:function(e,t,n){"use strict";n.d(t,{Q:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(18417),s=n(25887);const __=a.__;function l(e){let{auditionNotification:t,clearAudition:n,setAttributes:a,emailPlaceholder:l,processingLabel:c,successLabel:u,errorLabel:p,interests:d,signupFieldTag:m,signupFieldValue:h,connectURL:f}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Email Placeholder","jetpack"),value:l,onChange:e=>{a({emailPlaceholder:e}),n()}})),(0,r.createElement)(o.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Processing text","jetpack"),value:c,onChange:e=>{a({processingLabel:e}),t(s.N3)}}),(0,r.createElement)(o.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{a({successLabel:e}),t(s.sf)}}),(0,r.createElement)(o.TextControl,{label:__("Error text","jetpack"),value:p,onChange:e=>{a({errorLabel:e}),t(s.Cw)}})),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(i.Z,{interests:d,onChange:(e,t)=>{const n=[...new Set([...d,e])].filter((n=>!(n===e&&!t)&&n));a({interests:n})}}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>a({signupFieldTag:e})}),(0,r.createElement)(o.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>a({signupFieldValue:e})}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,r.createElement)(o.ExternalLink,{href:f},__("Manage Connection","jetpack"))))}},58791:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=(0,r.omit)(e,i),n={text:(o=e).submitButtonText||__("Join my email list","jetpack"),textColor:o.textButtonColor,customTextColor:o.customTextButtonColor,backgroundColor:o.backgroundButtonColor,customBackgroundColor:o.customBackgroundButtonColor};var o;return[t,[(0,a.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,i),Boolean),save:()=>null}},87539:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(89105),c=n.n(l),u=n(65736),p=n(96483),d=n(55609),m=n(52175),h=n(19916),f=n(50013),g=n(63729),b=n(25887);const __=u.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"componentDidMount",(()=>{this.apiCall()})),a()(this,"onError",(e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)})),a()(this,"apiCall",(()=>{const e=(0,g.Z)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};s()(t).then((t=>{const n=t.connect_url,r="connected"===t.code?1:2;this.setState({currentUserConnected:e,connected:r,connectURL:n})}),(t=>{this.setState({currentUserConnected:e,connected:2,connectURL:null}),this.onError(t.message)}))}else s()({path:(0,p.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((t=>{const n=t;this.setState({currentUserConnected:e,connected:2,connectURL:n})}))})),a()(this,"auditionNotification",(e=>{this.setState({audition:e}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.clearAudition,3e3)})),a()(this,"clearAudition",(()=>{this.setState({audition:null})})),a()(this,"labelForAuditionType",(e=>{const{attributes:t}=this.props,{processingLabel:n,successLabel:r,errorLabel:a}=t;return e===b.N3?n:e===b.sf?r:e===b.Cw?a:null})),a()(this,"roleForAuditionType",(e=>e===b.Cw?"alert":"status")),a()(this,"render",(()=>{const{attributes:e,className:t,notices:n,noticeUI:r,setAttributes:a}=this.props,{audition:i,connected:s,connectURL:l,currentUserConnected:u}=this.state,{emailPlaceholder:p,consentText:g,interests:b,processingLabel:v,successLabel:k,errorLabel:y,preview:E,signupFieldTag:w,signupFieldValue:_}=e,C="wp-block-jetpack-mailchimp",j=(0,o.createElement)(d.Placeholder,{icon:h.qv,notices:n},(0,o.createElement)(d.Spinner,null)),S=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack")},(0,o.createElement)(d.Button,{isSecondary:!0,isLarge:!0,href:l,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,o.createElement)("div",{className:`${C}-recheck`},(0,o.createElement)(d.Button,{isLink:!0,onClick:this.apiCall},__("Re-check Connection","jetpack")))),x=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,o.createElement)(d.Button,{isSecondary:!0,isLarge:!0,href:l},__("Connect to WordPress.com","jetpack"))),P=(0,o.createElement)(m.InspectorControls,null,(0,o.createElement)(f.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:p,processingLabel:v,successLabel:k,errorLabel:y,interests:b,setAttributes:this.props.setAttributes,signupFieldTag:w,signupFieldValue:_,connectURL:l})),T=c()(t,{[`${C}_notication-audition`]:i}),N=(0,o.createElement)("div",{className:T},(0,o.createElement)(d.TextControl,{"aria-label":p,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:()=>!1,placeholder:p,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,o.createElement)(m.InnerBlocks,{template:[[h.Ss.name,h.Ss.attributes]],templateLock:"all"}),(0,o.createElement)(m.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:g,onChange:e=>a({consentText:e}),inlineToolbar:!0}),i&&(0,o.createElement)("div",{className:`${C}_notification ${C}_${i}`,role:this.roleForAuditionType(i)},this.labelForAuditionType(i))),A=N;return(0,o.createElement)(o.Fragment,null,r,E&&A,!E&&0===s&&j,!E&&2===s&&u&&S,!E&&2===s&&!u&&x,!E&&1===s&&P,!E&&1===s&&N)})),this.state={audition:null,connected:0,connectURL:null,currentUserConnected:null},this.timeout=null}}t.Z=(0,d.withNotices)(v)},19916:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Ss:function(){return d},Xd:function(){return m}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(58791),l=n(87539),c=n(57535);const __=a.__,_x=a._x,u="mailchimp",p=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(i.G,{transform:"translate(-45.478101,-100.73059)"},(0,r.createElement)(i.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},(0,r.createElement)(i.Path,{d:"m 176.433,197.529 c 0.657,-0.078 1.286,-0.082 1.865,0 0.335,-0.768 0.392,-2.091 0.091,-3.532 -0.447,-2.142 -1.053,-3.438 -2.305,-3.236 -1.252,0.202 -1.298,1.754 -0.85,3.895 0.252,1.205 0.7,2.235 1.199,2.873"}),(0,r.createElement)(i.Path,{d:"m 165.688,199.224 c 0.895,0.393 1.446,0.654 1.661,0.426 0.139,-0.142 0.097,-0.413 -0.117,-0.762 -0.442,-0.721 -1.351,-1.453 -2.316,-1.864 -1.972,-0.849 -4.325,-0.567 -6.14,0.737 -0.599,0.439 -1.167,1.047 -1.086,1.416 0.026,0.119 0.116,0.209 0.326,0.239 0.494,0.056 2.22,-0.816 4.209,-0.938 1.403,-0.086 2.566,0.353 3.462,0.746"}),(0,r.createElement)(i.Path,{d:"m 163.887,200.252 c -1.167,0.184 -1.81,0.569 -2.223,0.926 -0.352,0.308 -0.57,0.649 -0.568,0.888 0.001,0.114 0.05,0.18 0.089,0.213 0.053,0.047 0.116,0.073 0.192,0.073 0.263,0 0.854,-0.237 0.854,-0.237 1.623,-0.581 2.694,-0.51 3.755,-0.39 0.586,0.066 0.864,0.102 0.992,-0.099 0.038,-0.058 0.084,-0.183 -0.033,-0.373 -0.273,-0.443 -1.451,-1.192 -3.057,-1.001"}),(0,r.createElement)(i.Path,{d:"m 172.805,204.025 c 0.792,0.389 1.664,0.236 1.948,-0.341 0.284,-0.577 -0.128,-1.361 -0.92,-1.75 -0.792,-0.389 -1.664,-0.236 -1.948,0.341 -0.284,0.578 0.128,1.361 0.92,1.75"}),(0,r.createElement)(i.Path,{d:"m 177.896,199.576 c -0.643,-0.011 -1.177,0.695 -1.192,1.578 -0.015,0.883 0.495,1.606 1.138,1.617 0.643,0.011 1.177,-0.695 1.192,-1.578 0.015,-0.882 -0.495,-1.606 -1.138,-1.617"}),(0,r.createElement)(i.Path,{d:"m 134.683,215.485 c -0.16,-0.201 -0.423,-0.14 -0.678,-0.08 -0.178,0.042 -0.379,0.088 -0.6,0.085 -0.473,-0.009 -0.874,-0.211 -1.099,-0.557 -0.293,-0.45 -0.276,-1.121 0.047,-1.889 l 0.151,-0.344 c 0.516,-1.158 1.379,-3.095 0.41,-4.941 -0.73,-1.39 -1.92,-2.255 -3.351,-2.437 -1.374,-0.174 -2.788,0.335 -3.69,1.33 -1.423,1.57 -1.646,3.707 -1.371,4.462 0.101,0.276 0.259,0.353 0.373,0.369 0.242,0.032 0.6,-0.144 0.824,-0.747 l 0.064,-0.196 c 0.1,-0.319 0.286,-0.913 0.591,-1.389 0.368,-0.574 0.94,-0.969 1.612,-1.114 0.684,-0.147 1.384,-0.016 1.97,0.368 0.997,0.652 1.381,1.874 0.955,3.039 -0.22,0.603 -0.578,1.756 -0.499,2.703 0.16,1.917 1.339,2.687 2.398,2.769 1.03,0.039 1.75,-0.54 1.932,-0.962 0.107,-0.25 0.017,-0.402 -0.042,-0.467"}),(0,r.createElement)(i.Path,{d:"m 144.475,180.275 c 3.36,-3.882 7.495,-7.257 11.2,-9.152 0.128,-0.066 0.264,0.073 0.195,0.199 -0.294,0.533 -0.861,1.674 -1.04,2.539 -0.028,0.135 0.119,0.236 0.233,0.159 2.305,-1.571 6.314,-3.255 9.831,-3.471 0.151,-0.009 0.224,0.184 0.104,0.277 -0.535,0.41 -1.12,0.978 -1.547,1.552 -0.073,0.098 -0.004,0.238 0.118,0.239 2.469,0.018 5.95,0.882 8.219,2.155 0.153,0.086 0.044,0.383 -0.128,0.344 -3.433,-0.787 -9.052,-1.384 -14.89,0.04 -5.211,1.271 -9.189,3.234 -12.09,5.344 -0.147,0.107 -0.323,-0.087 -0.204,-0.224 z m 16.732,37.612 0.001,0.002 0.002,0.004 z m 13.854,1.635 c 0.1,-0.042 0.168,-0.155 0.157,-0.268 -0.014,-0.139 -0.138,-0.24 -0.277,-0.226 0,0 -7.169,1.061 -13.942,-1.418 0.738,-2.398 2.699,-1.532 5.664,-1.293 5.344,0.319 10.134,-0.462 13.674,-1.478 3.067,-0.88 7.096,-2.616 10.225,-5.086 1.055,2.318 1.428,4.87 1.428,4.87 0,0 0.817,-0.146 1.5,0.274 0.645,0.397 1.118,1.222 0.795,3.356 -0.658,3.986 -2.352,7.222 -5.2,10.199 -1.734,1.866 -3.838,3.488 -6.246,4.668 -1.279,0.672 -2.64,1.253 -4.079,1.722 -10.736,3.507 -21.726,-0.348 -25.268,-8.626 -0.283,-0.622 -0.522,-1.274 -0.71,-1.955 -1.509,-5.455 -0.228,-12 3.778,-16.12 v -0.002 c 0.247,-0.262 0.499,-0.571 0.499,-0.96 0,-0.325 -0.207,-0.668 -0.386,-0.912 -1.402,-2.033 -6.257,-5.497 -5.282,-12.201 0.7,-4.816 4.912,-8.208 8.839,-8.007 l 0.995,0.057 c 1.702,0.101 3.186,0.319 4.587,0.378 2.345,0.102 4.453,-0.239 6.951,-2.32 0.842,-0.702 1.518,-1.311 2.661,-1.504 0.12,-0.021 0.419,-0.128 1.016,-0.1 0.61,0.033 1.19,0.2 1.711,0.547 2.002,1.332 2.286,4.559 2.39,6.919 0.059,1.347 0.222,4.607 0.278,5.543 0.127,2.14 0.69,2.441 1.828,2.816 0.64,0.211 1.234,0.368 2.11,0.614 2.65,0.744 4.221,1.499 5.212,2.469 0.591,0.606 0.866,1.25 0.951,1.864 0.312,2.28 -1.77,5.096 -7.283,7.655 -6.026,2.797 -13.337,3.505 -18.388,2.942 l -1.77,-0.2 c -4.04,-0.544 -6.345,4.677 -3.92,8.255 1.563,2.306 5.82,3.806 10.079,3.807 9.765,0.001 17.271,-4.169 20.063,-7.77 l 0.223,-0.318 c 0.138,-0.207 0.024,-0.321 -0.147,-0.204 -2.281,1.561 -12.413,7.758 -23.251,5.893 0,0 -1.317,-0.217 -2.519,-0.684 -0.955,-0.372 -2.955,-1.292 -3.198,-3.343 8.746,2.705 14.253,0.148 14.253,0.148 z m -48.039,-20.785 c -3.042,0.591 -5.723,2.315 -7.362,4.697 -0.98,-0.817 -2.805,-2.399 -3.128,-3.016 -2.617,-4.97 2.856,-14.632 6.68,-20.089 9.45,-13.485 24.25,-23.692 31.101,-21.84 1.114,0.315 4.803,4.592 4.803,4.592 0,0 -6.849,3.8 -13.2,9.097 -8.558,6.589 -15.022,16.166 -18.895,26.559 z m 5.111,22.805 c -0.46,0.079 -0.93,0.11 -1.404,0.098 -4.577,-0.123 -9.52,-4.243 -10.011,-9.129 -0.543,-5.401 2.217,-9.557 7.103,-10.543 0.584,-0.118 1.29,-0.186 2.051,-0.146 2.738,0.15 6.772,2.252 7.693,8.216 0.816,5.282 -0.48,10.659 -5.432,11.503 z m 61.996,-9.564 c -0.039,-0.139 -0.295,-1.072 -0.646,-2.197 -0.351,-1.126 -0.714,-1.917 -0.714,-1.917 1.408,-2.107 1.433,-3.992 1.245,-5.059 -0.2,-1.323 -0.751,-2.45 -1.861,-3.616 -1.11,-1.165 -3.381,-2.359 -6.572,-3.255 l -1.674,-0.465 c -0.008,-0.069 -0.088,-3.947 -0.16,-5.612 -0.053,-1.204 -0.156,-3.083 -0.739,-4.933 -0.695,-2.505 -1.905,-4.697 -3.416,-6.099 4.17,-4.322 6.773,-9.084 6.766,-13.168 -0.012,-7.855 -9.659,-10.232 -21.548,-5.309 l -2.519,1.069 c -0.011,-0.011 -4.554,-4.468 -4.622,-4.528 -13.555,-11.823 -55.935,35.284 -42.386,46.725 l 2.961,2.509 c -0.768,1.99 -1.07,4.27 -0.823,6.721 0.316,3.149 1.94,6.167 4.573,8.499 2.499,2.214 5.785,3.616 8.973,3.613 5.273,12.151 17.321,19.605 31.447,20.025 15.153,0.45 27.873,-6.66 33.203,-19.432 0.349,-0.896 1.828,-4.935 1.828,-8.501 0,-3.583 -2.026,-5.068 -3.316,-5.068"})))),d={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},m={title:__("Mailchimp","jetpack"),icon:{src:p,foreground:(0,c.m)()},description:__("A form enabling readers to join a Mailchimp audience.","jetpack"),category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack")],supports:{align:["wide","full"],color:{gradients:!0},spacing:{padding:!0,margin:!0}},attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},edit:l.Z,save:()=>(0,r.createElement)(o.InnerBlocks.Content,null),example:{attributes:{preview:!0},innerBlocks:[d]},deprecated:[s.Z]}},18417:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(55609);class c extends o.Component{constructor(){super(...arguments),a()(this,"state",{interest_categories:[]}),a()(this,"retrieveGroups",(()=>{s()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})}))})),a()(this,"render",(()=>{const{interest_categories:e}=this.state,{interests:t,onChange:n}=this.props;return(0,o.createElement)(o.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,o.createElement)(l.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>n(e.id,t),key:e.id}))))))}))}componentDidMount(){this.retrieveGroups()}}t.Z=c,c.defaultProps={interests:[],onChange:()=>null}},97024:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(1595);const __=a.__;class s extends r.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:a}=this.props;return(0,r.createElement)(o.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,r.createElement)(o.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,r.createElement)(o.Button,{className:"component__add-point__close",onClick:e},(0,r.createElement)(o.Dashicon,{icon:"no"})),(0,r.createElement)(i.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:a,onError:n})))}}s.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{}},t.Z=s},79267:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(55609),c=n(81041),u=n(77714),p=n(73242),d=n(87929),m=n(45388);const __=i.__;class h extends o.Component{constructor(){super(...arguments),a()(this,"onMarkerClick",(e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()})),a()(this,"onMapClick",(()=>{this.setState({activeMarker:null})})),a()(this,"clearCurrentMarker",(()=>{this.setState({activeMarker:null})})),a()(this,"updateActiveMarker",(e=>{const{points:t}=this.props,{activeMarker:n}=this.state,{index:r}=n.props,a=t.slice(0);(0,s.assign)(a[r],e),this.props.onSetPoints(a)})),a()(this,"deleteActiveMarker",(()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:n}=t.props,r=e.slice(0);r.splice(n,1),this.props.onSetPoints(r),this.setState({activeMarker:null})})),a()(this,"sizeMap",(()=>{const{mapHeight:e}=this.props,{map:t}=this.state,n=this.mapRef.current;if(e)n.style.height=e+"px";else{const e=n.offsetWidth,t=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,r=Math.min(e*(3/4),t);n.style.height=r+"px"}t.resize(),this.setBoundsByMarkers()})),a()(this,"updateZoom",(()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e),t.updateZoom(e)})),a()(this,"setBoundsByMarkers",(()=>{const{admin:e,onSetMapCenter:t,onSetZoom:n,points:r,zoom:a}=this.props,{map:o,activeMarker:i,mapboxgl:s,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!o)return;if(r.length&&e?o.dragPan.disable():o.dragPan.enable(),!r.length)return;if(i)return;const u=new s.LngLatBounds;if(r.forEach((e=>{u.extend([e.coordinates.longitude,e.coordinates.latitude])})),t(u.getCenter()),r.length>1){o.fitBounds(u,{padding:{top:80,bottom:80,left:40,right:40}}),this.setState({boundsSetProgrammatically:!0});try{o.removeControl(l)}catch(e){}}else{if(o.setCenter(u.getCenter()),c){const e=12;o.setZoom(e),n(e)}else o.setZoom(parseInt(a,10));o.addControl(l),this.setState({boundsSetProgrammatically:!1})}})),a()(this,"scriptsLoaded",(()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)})),a()(this,"googlePoint2Mapbox",(e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0})),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,o.createRef)(),this.debouncedSizeMap=(0,s.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:n,markerColor:r}=this.props,{map:a,activeMarker:i,mapboxgl:p}=this.state,{onMarkerClick:d,deleteActiveMarker:m,updateActiveMarker:h}=this,f=(0,s.get)(i,"props.point")||{},{title:g,caption:b}=f,v=o.Children.map(n,(e=>{if("AddPoint"===(0,s.get)(e,"props.tagName"))return e})),k=a&&p&&e.map(((e,t)=>(0,o.createElement)(c.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:a,mapboxgl:p,markerColor:r,onClick:d}))),y=p&&(0,o.createElement)(u.Z,{activeMarker:i,map:a,mapboxgl:p,unsetActiveMarker:()=>this.setState({activeMarker:null})},i&&t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.TextControl,{label:__("Marker Title","jetpack"),value:g,onChange:e=>h({title:e})}),(0,o.createElement)(l.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:e=>h({caption:e})}),(0,o.createElement)(l.Button,{onClick:m,className:"wp-block-jetpack-map__delete-btn"},(0,o.createElement)(l.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),i&&!t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h3",null,g),(0,o.createElement)("p",null,b)));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},k),y,v)}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:n,children:r,points:a,mapStyle:o,mapDetails:i,scrollToZoom:s,showFullscreenButton:l}=this.props,{map:c,fullscreenControl:u}=this.state;n&&n.length>0&&n!==e.apiKey&&this.loadMapLibraries(),r!==e.children&&!1!==r&&this.clearCurrentMarker(),a!==e.points&&this.setBoundsByMarkers(),a.length!==e.points.length&&this.clearCurrentMarker(),o===e.mapStyle&&i===e.mapDetails||c.setStyle(this.getMapStyle()),s!==e.scrollToZoom&&(s?c.scrollZoom.enable():c.scrollZoom.disable()),l!==e.showFullscreenButton&&(l?(c.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):c.removeControl(u))}getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,p.h)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,d.bL)(this.mapRef.current),n={"mapbox-gl-js":()=>{(0,d.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,d.Pp)(m,n,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:n,onMapLoaded:r,onError:a,scrollToZoom:o,showFullscreenButton:i,admin:s}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:this.googlePoint2Mapbox(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void a("mapbox_error",e.message)}o||l.scrollZoom.disable();const c=new t.FullscreenControl;l.on("error",(e=>{a("mapbox_error",e.error.message)}));const u=new t.NavigationControl({showCompass:!1,showZoom:!0});l.on("zoomend",(()=>{this.props.onSetZoom(l.getZoom())})),l.on("moveend",(()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(l.getCenter())})),l.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:l,zoomControl:u,fullscreenControl:c},(()=>{this.debouncedSizeMap(),l.addControl(u),i&&(l.addControl(c),s&&c._fullscreenButton&&(c._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),l.resize(),r(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)}))}}h.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{}},t.Z=h},20522:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(41626),l=n(17885);const __=a.__;t.Z=e=>{let{attributes:t,setAttributes:n,state:a,setState:c,context:u,mapRef:p,instanceId:d,minHeight:m,removeAPIKey:h,updateAPIKey:f,setPointVisibility:g}=e;const b=e=>{n({align:e}),setTimeout(p.current.sizeMap,0)};return"toolbar"===u?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockAlignmentToolbar,{value:t.align,onChange:b,controls:["center","wide","full"]}),(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{icon:l.X.markerIcon,label:__("Add a marker","jetpack"),onClick:g}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>n({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,r.createElement)(o.PanelBody,{title:__("Map Settings","jetpack")},(0,r.createElement)(o.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${d}`},(0,r.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${d}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{n({mapHeight:e.target.value}),e.target!==document.activeElement&&setTimeout(p.current.sizeMap,0)},onBlur:e=>{const{mapHeight:r}=t;let a=parseInt(e.target.value,10);isNaN(a)?a=null:null==r?a=p.current.mapRef.current.offsetHeight:a<m&&(a=m),n({mapHeight:a}),setTimeout(p.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,r.createElement)(o.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:t.zoom,onChange:e=>{n({zoom:e}),setTimeout(p.current.updateZoom,0)},min:0,max:22}),(0,r.createElement)(o.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>n({mapDetails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>n({scrollToZoom:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:t.showFullscreenButton,onChange:e=>n({showFullscreenButton:e})})),t.points.length?(0,r.createElement)(o.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,r.createElement)(s.Z,{points:t.points,onChange:e=>{n({points:e})}})):null,(0,r.createElement)(o.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,r.createElement)(o.TextControl,{help:"wpcom"===a.apiKeySource&&(0,r.createElement)(r.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,r.createElement)(o.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:a.apiKeyControl,onChange:e=>c({apiKeyControl:e})}),(0,r.createElement)(o.ButtonGroup,null,(0,r.createElement)(o.Button,{type:"button",onClick:f,disabled:!a.apiKeyControl||a.apiKeyControl===a.apiKey},__("Update Token","jetpack")),(0,r.createElement)(o.Button,{type:"button",onClick:h,disabled:"wpcom"===a.apiKeySource,isSecondary:!0},__("Remove Token","jetpack")))))}},86124:function(e,t,n){"use strict";var r=n(98372);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,showFullscreenButton:!0,className:t}},save:r.Z}},98372:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u}=e,p=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),d=t?`align${t}`:null;return(0,r.createElement)("div",{className:d,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null},o.length>0&&(0,r.createElement)("ul",null,p))}}t.Z=a},91576:function(e,t,n){"use strict";var r=n(51694);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,className:t}},save:r.Z}},51694:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:p}=e,d=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),m=t?`align${t}`:null;return(0,r.createElement)("div",{className:m,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,"data-show-fullscreen-button":p||null},o.length>0&&(0,r.createElement)("ul",null,d))}}t.Z=a},70312:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(65736),c=n(55609),u=n(52175),p=n(97024),d=n(79267),m=n(20522),h=n(17885),f=n(96406),g=n(94333),b=n(9818),v=n(98085),k=n(14499);const __=l.__,y={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class E extends o.Component{constructor(){super(...arguments),a()(this,"geoCodeAddress",((e,t)=>{t&&(0,k.P)(e,t).then((e=>{var t;if(null!==(t=e.features)&&void 0!==t&&t.length){const t=e.features[0],n=[{title:t.text,placeTitle:t.text,caption:t.place_name,id:t.id,coordinates:{latitude:t.center[1],longitude:t.center[0]}}];this.props.setAttributes({points:n})}else this.onError(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))})).catch((e=>this.onError(null,e.message)))})),a()(this,"componentDidUpdate",(e=>{var t,n;const r=null===(t=this.props.attributes)||void 0===t?void 0:t.address,a=null===(n=e.attributes)||void 0===n?void 0:n.address;r&&a!==r&&this.geoCodeAddress(r,this.state.apiKey)})),a()(this,"addPoint",(e=>{const{attributes:t,setAttributes:n}=this.props,{points:r}=t,a=r.slice(0);let o=!1;r.map((t=>{t.id===e.id&&(o=!0)})),o||(a.push(e),n({points:a}),this.setState({addPointVisibility:!1}))})),a()(this,"setPointVisibility",(()=>{this.setState({addPointVisibility:!0})})),a()(this,"updateAPIKeyControl",(e=>{this.setState({apiKeyControl:e.target.value})})),a()(this,"updateAPIKey",(()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")})),a()(this,"removeAPIKey",(()=>{this.apiCall(null,"DELETE")})),a()(this,"onError",((e,t)=>{const{noticeOperations:n}=this.props;n.removeAllNotices(),n.createErrorNotice(t)})),a()(this,"onMapResize",((e,t,n,r)=>{const{onResizeStop:a,setAttributes:o}=this.props;a();o({mapHeight:parseInt(this.mapRef.current.mapRef.current.offsetHeight+r.height,10)}),setTimeout(this.mapRef.current.sizeMap,0)})),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,o.createRef)()}apiCall(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return new Promise(((n,r)=>{const{noticeOperations:a}=this.props,o="/wpcom/v2/service-api-keys/mapbox",i=e?{path:o,method:t,data:{service_api_key:e}}:{path:o,method:t};this.setState({apiRequestOutstanding:!0},(()=>{s()(i).then((e=>{let{service_api_key:t,service_api_key_source:r}=e;a.removeAllNotices();const o=t?2:1,i="wpcom"===r?"":t;this.setState({apiState:o,apiKey:t,apiKeyControl:i,apiKeySource:r,apiRequestOutstanding:!1}),n()}),(e=>{let{message:t}=e;this.onError(null,t),this.setState({apiState:1,apiRequestOutstanding:!1}),r()}))}))}))}componentDidMount(){this.apiCall().then((()=>{var e,t;null!==(e=this.props.attributes)&&void 0!==e&&e.address&&this.geoCodeAddress(null===(t=this.props.attributes)||void 0===t?void 0:t.address,this.state.apiKey)}))}render(){const{className:e,setAttributes:t,attributes:n,noticeUI:r,notices:a,isSelected:i,instanceId:s,onResizeStart:l}=this.props,{mapDetails:g,points:b,zoom:k,mapCenter:E,markerColor:w,preview:_,mapHeight:C,showFullscreenButton:j}=n,{addPointVisibility:S,apiKey:x,apiKeyControl:P,apiState:T,apiRequestOutstanding:N}=this.state,A=(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.BlockControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef})),(0,o.createElement)(u.InspectorControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:s,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey}))),I=(0,o.createElement)(c.Placeholder,{icon:h.X.icon},(0,o.createElement)(c.Spinner,null)),B=(0,o.createElement)(o.Fragment,null,__("To use the map block, you need an Access Token.","jetpack"),(0,o.createElement)("br",null),(0,o.createElement)(c.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,o.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),M=(0,o.createElement)(c.Placeholder,{icon:h.X.icon,label:__("Map","jetpack"),notices:a,instructions:B},(0,o.createElement)(o.Fragment,null,(0,o.createElement)("form",null,(0,o.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:N,placeholder:__("Paste Token Here","jetpack"),value:P,onChange:this.updateAPIKeyControl}),(0,o.createElement)(c.Button,{isSecondary:!0,disabled:N||!P||P.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),R=i&&b.length<=1,L=(0,v.t)(h.X.styles,n.className),Z=(0,o.createElement)(o.Fragment,null,A,(0,o.createElement)("div",{className:e},(0,o.createElement)(c.ResizableBox,{size:{height:C||"auto",width:"100%"},grid:[10,10],showHandle:i,minHeight:400,enable:y,onResizeStart:l,onResizeStop:this.onMapResize},(0,o.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,o.createElement)(d.Z,{ref:this.mapRef,scrollToZoom:R,showFullscreenButton:j,mapStyle:L||"default",mapDetails:g,mapHeight:C,points:b,zoom:k,mapCenter:E,markerColor:w,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:x,onSetPoints:e=>t({points:e}),onSetMapCenter:e=>t({mapCenter:e}),onMapLoaded:()=>this.setState({addPointVisibility:!b.length}),onMarkerClick:()=>this.setState({addPointVisibility:!1}),onError:this.onError},i&&S&&(0,o.createElement)(p.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:x,onError:this.onError,tagName:"AddPoint"})))))),D=h.X.styles.find((e=>e.name===L)),F=(0,o.createElement)("div",null,(0,o.createElement)("img",{alt:__("Map Preview","jetpack"),src:D?D.preview:f}));return(0,o.createElement)(o.Fragment,null,r,_&&F,!_&&0===T&&I,!_&&1===T&&M,!_&&2===T&&Z)}}t.Z=(0,g.compose)([c.withNotices,(0,b.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(E)},14499:function(e,t,n){"use strict";function r(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then((e=>e.json()))}n.d(t,{P:function(){return r}})},92828:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(17885),a=n(70312),o=n(18156),i=n(86124),s=n(91576),l=n(57535);const{name:c}=r.X,u={title:r.X.title,icon:{src:r.X.icon,foreground:(0,l.m)()},category:r.X.category,keywords:r.X.keywords,description:r.X.description,attributes:r.X.attributes,supports:r.X.supports,styles:r.X.styles,getEditWrapperProps(e){const{align:t}=e;if(-1!==r.X.validAlignments.indexOf(t))return{"data-align":t}},edit:a.Z,save:o.Z,example:r.X.example,deprecated:[s.Z,i.Z]}},77714:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307);class i extends o.Component{constructor(){super(...arguments),a()(this,"closeClick",(()=>{this.props.unsetActiveMarker()}))}componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}}),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,o.createPortal)(this.props.children,this.el):null}openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}i.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null},t.Z=i},1595:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(95319);const c=(0,i.__)("Add a marker…","jetpack");class u extends o.Component{constructor(){super(...arguments),a()(this,"getOptionCompletion",(e=>{const{value:t}=e,n={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(n),t.text})),a()(this,"search",(e=>{const{apiKey:t,onError:n}=this.props,r="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise((function(e,t){const a=new XMLHttpRequest;a.open("GET",r),a.onload=function(){if(200===a.status){const t=JSON.parse(a.responseText);e(t.features)}else{const e=JSON.parse(a.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},a.send()}))})),a()(this,"onReset",(()=>{this.textRef.current.value=null})),this.textRef=(0,o.createRef)(),this.containerRef=(0,o.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,o.createElement)("span",null,e.place_name),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout((()=>{this.containerRef.current.querySelector("input").focus()}),50)}render(){const{label:e}=this.props;return(0,o.createElement)("div",{ref:this.containerRef},(0,o.createElement)(s.BaseControl,{label:e,className:"components-location-search"},(0,o.createElement)(l.Z,{completer:this.autocompleter,onReset:this.onReset},(e=>{let{isExpanded:t,listBoxId:n,activeId:r,onChange:a,onKeyDown:i}=e;return(0,o.createElement)(s.TextControl,{placeholder:c,ref:this.textRef,onChange:a,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":r,onKeyDown:i})}))))}}u.defaultProps={onError:()=>{}},t.Z=u},41626:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(55609);class s extends o.Component{constructor(){super(...arguments),a()(this,"onDeletePoint",(e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,a=n.slice(0);a.splice(t,1),r(a)})),this.state={selectedCell:null}}setMarkerField(e,t,n){const{points:r,onChange:a}=this.props,o=r.slice(0);o[n][e]=t,a(o)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,o.createElement)(i.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,o.createElement)(i.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,o.createElement)(i.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,o.createElement)(i.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,o.createElement)(i.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,o.createElement)("div",{className:"component__locations"},(0,o.createElement)(i.Panel,{className:"component__locations__panel"},t))}}s.defaultProps={points:Object.freeze([]),onChange:()=>{}},t.Z=s},95319:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819),p=n(39630),d=n(94333);const __=l.__,_n=l._n;function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=[];for(let r=0;r<e.length;r++){const a=e[r];let{keywords:o=[]}=a;if("string"==typeof a.label&&(o=[...o,a.label]),n.push(a),n.length===t)break}return n}class h extends o.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),a()(this,"select",(e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()})),a()(this,"reset",(()=>{this.setState(this.constructor.getInitialState())})),a()(this,"onChange",(e=>{const{completer:t}=this.props,{options:n}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const r=t?m(n):[];t&&this.setState({selectedIndex:0,filteredOptions:r,query:e})})),a()(this,"onKeyDown",(e=>{const{isOpen:t,selectedIndex:n,filteredOptions:r}=this.state;if(!t)return;let a;switch(e.keyCode){case p.UP:a=(0===n?r.length:n)-1,this.setState({selectedIndex:a});break;case p.DOWN:a=(n+1)%r.length,this.setState({selectedIndex:a});break;case p.ENTER:this.select(r[n]);break;case p.LEFT:case p.RIGHT:case p.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()})),this.debouncedLoadOptions=(0,u.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:n}=e,r=this.activePromise=Promise.resolve("function"==typeof n?n(t):n).then((t=>{if(r!==this.activePromise)return;const n=t.map(((t,n)=>({key:`${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}))),a=m(n),o=a.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:a,selectedIndex:o,isOpen:a.length>0}),this.announce(a)}))}announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,l.sprintf)(
14
  /* translators: placeholder is a number. */
15
+ _n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:n,instanceId:r,completer:a}=this.props,{selectedIndex:i,filteredOptions:l}=this.state,{key:p=""}=l[i]||{},{className:d}=a,m=l.length>0,h=m?`components-autocomplete-listbox-${r}`:null,f=m?`components-autocomplete-item-${r}-${p}`:null;return(0,o.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:f,onChange:e,onKeyDown:t}),m&&(0,o.createElement)(c.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,o.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,u.map)(l,((e,t)=>(0,o.createElement)(c.Button,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:s()("components-autocomplete__result",d,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,d.compose)([c.withSpokenMessages,d.withInstanceId,c.withFocusOutside])(h)},81041:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(87929);class s extends o.Component{constructor(){super(...arguments),a()(this,"handleClick",(()=>{const{onClick:e}=this.props;e(this)})),a()(this,"getPoint",(()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]}))}componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&this.marker.remove()}componentDidUpdate(){this.renderMarker()}renderMarker(){const{map:e,point:t,mapboxgl:n,markerColor:r,mapRef:a}=this.props,{handleClick:o}=this,s=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:l}=(0,i.bL)(a.current),c=this.marker?this.marker.getElement():l.createElement("div");this.marker?this.marker.setLngLat(s):(c.className="wp-block-jetpack-map-marker",this.marker=new n.Marker(c).setLngLat(s).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",o)),c.innerHTML='<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd"><path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="'+r+'" mask="url(#c)"/></g></svg>'}render(){return null}}s.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}},t.Z=s},73242:function(e,t,n){"use strict";function r(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}n.d(t,{h:function(){return r}})},18156:function(e,t,n){"use strict";var r=n(69307),a=n(17885),o=n(98085);class i extends r.Component{render(){const{attributes:e}=this.props,{align:t,className:n,mapDetails:i,points:s,zoom:l,mapCenter:c,markerColor:u,scrollToZoom:p,mapHeight:d,showFullscreenButton:m}=e,h=(0,o.t)(a.X.styles,n),f=s.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),g=t?`align${t}`:null;return(0,r.createElement)("div",{className:g,"data-map-style":h,"data-map-details":i,"data-points":JSON.stringify(s),"data-zoom":l,"data-map-center":JSON.stringify(c),"data-marker-color":u,"data-scroll-to-zoom":p||null,"data-map-height":d||null,"data-show-fullscreen-button":m||null},s.length>0&&(0,r.createElement)("ul",null,f))}}t.Z=i},17885:function(e,t,n){"use strict";n.d(t,{X:function(){return c}});var r=n(69307),a=n(65736),o=n(56932),i=n(45107),s=n(65765),l=n(34140);const __=a.__,_x=a._x,c={name:"map",prefix:"jetpack",title:__("Map","jetpack"),icon:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)("path",{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"})),category:"embed",keywords:[_x("maps","block search term","jetpack"),_x("location","block search term","jetpack"),_x("navigation","block search term","jetpack")],description:__("Add an interactive map showing one or more locations.","jetpack"),attributes:{align:{type:"string"},points:{type:"array",default:[]},address:{type:"string",default:""},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},supports:{defaultStylePicker:!1,html:!1},styles:[{name:"default",label:__("Basic","jetpack"),preview:o,isDefault:!0},{name:"black_and_white",label:__("Black and white","jetpack"),preview:i},{name:"satellite",label:__("Satellite","jetpack"),preview:s},{name:"terrain",label:__("Terrain","jetpack"),preview:l}],validAlignments:["center","wide","full"],markerIcon:(0,r.createElement)("svg",{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,r.createElement)("g",{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,r.createElement)("polygon",{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,r.createElement)("path",{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})))),example:{attributes:{preview:!0}}}},81092:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(52175),u=n(94333),p=n(9818),d=n(4822);const __=l.__,m="editor",h="preview";class f extends o.Component{constructor(){super(...arguments),a()(this,"input",null),a()(this,"state",{activePanel:m}),a()(this,"bindInput",(e=>{this.input=e})),a()(this,"updateSource",(e=>this.props.setAttributes({source:e}))),a()(this,"handleKeyDown",(e=>{const{attributes:t,removeBlock:n}=this.props,{source:r}=t;8===e.keyCode&&""===r&&(n(),e.preventDefault())})),a()(this,"toggleMode",(e=>()=>this.setState({activePanel:e})))}componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===h&&this.toggleMode(m)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===m&&this.input&&this.input.focus()}isEmpty(){const e=this.props.attributes.source;return!e||""===e.trim()}renderToolbarButton(e,t){const{activePanel:n}=this.state,{className:r}=this.props,a=s()(r,"components-button components-tab-button",{"is-pressed":n===e});return(0,o.createElement)("button",{className:a,onClick:this.toggleMode(e)},(0,o.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{source:r}=e,{activePanel:a}=this.state;return!n&&this.isEmpty()?(0,o.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,o.createElement)("div",{className:t},(0,o.createElement)(c.BlockControls,null,(0,o.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(m,__("Markdown","jetpack")),this.renderToolbarButton(h,__("Preview","jetpack")))),a!==h&&n?(0,o.createElement)(c.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:r}):(0,o.createElement)(d.Z,{className:`${t}__preview`,source:r}))}}t.Z=(0,u.compose)([(0,p.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,p.withDispatch)(((e,t)=>{let{currentBlockId:n}=t;return{removeBlock:()=>e("core/block-editor").removeBlocks(n)}}))])(f)},7882:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4096),s=n(81092),l=n(27279),c=n(57535),u=n(20510);const __=a.__,_x=a._x,p="markdown",d=__("Try Markdown","jetpack"),m=__("Markdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters.","jetpack"),h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},(0,r.createElement)(o.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),(0,r.createElement)(o.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),f=(0,i.Wp)()||(0,i.Ug)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",g={title:__("Markdown","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Use regular characters and punctuation to style text, links, and lists.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:f},__("Support reference","jetpack"))),icon:{src:h,foreground:(0,c.m)()},category:(0,u.Z)("text","formatting"),keywords:[_x("formatting","block search term","jetpack"),_x("syntax","block search term","jetpack"),_x("markup","block search term","jetpack")],attributes:{source:{type:"string"}},supports:{align:["wide","full"],html:!1,spacing:{padding:!0}},edit:s.Z,save:l.Z,example:{attributes:{source:`## ## ${d}\n\n${m}`}}}},4822:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(29337),i=n.n(o),s=n(52175);const __=a.__,l=new(i()),c=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=null===s.__experimentalGetSpacingClassesAndStyles||void 0===s.__experimentalGetSpacingClassesAndStyles?void 0:(0,s.__experimentalGetSpacingClassesAndStyles)(e);return null!=t&&t.style?t.style:{}};t.Z=e=>{let{className:t,source:n="",attributes:a}=e;return(0,r.createElement)(r.RawHTML,{className:t,onClick:c,style:u(a)},n.length?l.render(n):"")}},27279:function(e,t,n){"use strict";var r=n(69307),a=n(4822);t.Z=e=>{let{attributes:t,className:n}=e;return(0,r.createElement)(a.Z,{className:n,source:t.source,attributes:t})}},11868:function(e,t,n){"use strict";n.d(t,{V1:function(){return i},vW:function(){return s},jn:function(){return l},Eo:function(){return c},fL:function(){return u},ez:function(){return m}});var r=n(65736),a=n(9818),o=n(92819);const __=r.__,i=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],s=i.map((e=>e.value));const l={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},c=e=>(0,o.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&l]),u=e=>c(e).map((e=>e.name)),{siteLocale:p}=(0,a.select)("core/block-editor").getSettings(),d=!(0,o.isEmpty)(p)&&s.includes(p)?p:"en-US",m={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:u()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:d,type:"string",validValues:s},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}}},65618:function(e,t,n){"use strict";var r=n(69307),a=n(11868);t.Z={attributes:a.ez,supports:{align:!0,html:!1},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)(r.Fragment,null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},77583:function(e,t,n){"use strict";var r=n(69307),a=n(11868);t.Z={attributes:a.ez,migrate:e=>{const{style:t,className:n}=e,r="standard"===t?"":`is-style-${t}`;return{...e,className:n?`${n} ${r}`:r}},isEligible:e=>{let{style:t,className:n}=e;return!(!t||"standard"===t)&&(!n||-1===n.indexOf("is-style-"))},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},97372:function(e,t,n){"use strict";var r=n(69307),a=(n(86841),n(89105)),o=n.n(a),i=n(92819),s=n(4096),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(12087),m=n(70718),h=n(18746),f=n(11868),g=n(14087),b=n(98085),v=n(88707);const __=u.__;t.Z=(0,c.withNotices)((function(e){let{attributes:t,className:n,clientId:a,isSelected:k,name:y,noticeOperations:E,noticeUI:w,setAttributes:_}=e;const C=(0,p.getBlockDefaultClassName)(y),j=(0,g.S)(f.ez,t);(0,i.isEqual)(j,t)||_(j);const{align:S,rid:x,iframe:P,domain:T,lang:N,newtab:A,negativeMargin:I}=t,B=(0,i.isEmpty)(x),M=(0,b.t)((0,f.Eo)(),t.className),R=(0,b.t)((0,f.Eo)(x),t.className),L=(0,h.Z)(R),Z=(0,i.isEqual)(x,["1"]);(0,r.useEffect)((()=>{if(E.removeAllNotices(),!B&&!Z&&"wide"===R&&"wide"!==S&&"full"!==S){const e=(0,r.createElement)(r.Fragment,null,__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack"));E.createNotice({status:"warning",content:e})}}),[Z,S,B,x,R]),(0,r.useEffect)((()=>{"button"===M&&Array.isArray(x)&&x.length>1&&_({className:"",style:""})}),[x,M,_]),(0,r.useEffect)((()=>{k&&(Array.isArray(x)&&x.length>1?(0,p.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,p.registerBlockStyle)("jetpack/opentable",f.jn))}),[k,x]),(0,r.useEffect)((()=>{"wide"===L&&"wide"===S&&_({align:""}),"wide"===R&&L&&R!==L&&_({align:"wide"}),_({style:R})}),[R]);const D=(0,f.fL)(x),F=e=>x.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],O=e=>{Array.isArray(e)?_({rid:e,style:e.length>1&&"button"===R?"standard":R}):(e=>{const t=(0,v.CC)(e);t||(E.removeAllNotices(),E.createErrorNotice((0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,__("We ran into an issue","jetpack")),(0,r.createElement)("br",null),__("Please ensure this embed matches the one from your OpenTable account","jetpack"))));const n=(0,g.S)(f.ez,t);_(n),E.removeAllNotices()})(e)},z=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorAdvancedControls,null,(0,r.createElement)(c.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>_({iframe:!P}),className:"is-opentable"}),"button"===R&&(0,r.createElement)(c.ToggleControl,{label:__("Remove button margin","jetpack"),checked:I,onChange:()=>_({negativeMargin:!I})})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(m.Z,{rids:x,onChange:O}),(0,r.createElement)(c.SelectControl,{label:__("Language","jetpack"),value:N,onChange:e=>_({lang:e}),options:f.V1}),(0,r.createElement)(c.ToggleControl,{label:__("Open in a new window","jetpack"),checked:A,onChange:()=>_({newtab:!A})})))),U=(0,s.Wp)()||(0,s.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",$=(0,r.createElement)(c.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:d.Z,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:w},(0,r.createElement)(m.Z,{rids:x,onSubmit:O}),(0,r.createElement)("div",{className:`${C}-placeholder-links`},(0,r.createElement)(c.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},__("Sign up for OpenTable","jetpack")),(0,r.createElement)(c.ExternalLink,{href:U},__("Learn more","jetpack")))),V=o()(n,{[`is-style-${R}`]:!B&&D.includes(R)&&-1===n.indexOf("is-style"),"is-placeholder":B,"is-multi":"multi"===F(R)[0],[`align${S}`]:S,"has-no-margin":I});return(0,r.createElement)(r.Fragment,null,w,(0,r.createElement)("div",{className:V},!B&&z,B?$:(e=>{const[t,n]=F(e||R);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${C}-overlay`}),(0,r.createElement)("iframe",{title:(0,u.sprintf)(
16
  /* translators: Placeholder is a unique ID. */
17
  __("Open Table Preview %s","jetpack"),a),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,i.join)(x,"%2C")}&type=${t}&theme=${n}&overlay=false&domain=${T}&lang=${N&&f.vW.includes(N)?N:"en-US"}&newtab=${A}&disablega=true`}))})()))}))},12087:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},(0,r.createElement)(a.Path,{d:"m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z"}))},5458:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},Xd:function(){return h}});var r=n(69307),a=n(65736),o=n(4981),i=n(11868),s=n(65618),l=n(77583),c=n(97372),u=n(12087),p=n(88707),d=n(57535);n(6757);const __=a.__,_x=a._x,m="opentable",h={title:__("OpenTable","jetpack"),description:__("Allow visitors to book a reservation with OpenTable","jetpack"),icon:{src:u.Z,foreground:(0,d.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1},edit:c.Z,save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:i.ez,styles:(0,i.Eo)(),example:{attributes:{rid:["1"],style:"standard",iframe:!0,domain:"com",lang:"en-US",newtab:!1,negativeMargin:!1}},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(p.pU.test(e.textContent)||p.tC.test(e.textContent)),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,o.createBlock)("jetpack/opentable",t)}}]},deprecated:[s.Z,l.Z]}},70718:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(29183),a=n.n(r),o=n(69307),i=n(92819),s=n(55609),l=n(65736),c=n(74701);const __=l.__,_n=l._n;function u(e){const[t,n]=(0,o.useState)(""),r=(0,c.Z)(t,20),[l,u]=(0,o.useState)(e.rids||[]),p=/^(\d+)$|\(\#(\d+)\)$/,d=r.filter((e=>l.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),m=(0,o.createElement)(s.FormTokenField,a()({value:l,suggestions:d,saveTransform:e=>c.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:20,label:_n("Restaurant","Restaurants",l.length,"jetpack")},e,{onChange:t=>{const n=t.map((e=>{const t=p.exec(e);return t[1]||t[2]}));u(n),e.onChange&&e.onChange(n)}}));return(0,o.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,o.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,i.isEmpty)(l)?t:l)}},m,(0,o.createElement)(s.Button,{isSecondary:!0,type:"submit"},__("Embed","jetpack"))):m)}},18746:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},74701:function(e,t,n){"use strict";n.d(t,{$:function(){return o},Z:function(){return i}});var r=n(92819),a=n(69307);const o=/^\s*(http[s]?:\/\/|\<script)/;function i(e,t){const[n,i]=(0,a.useState)([]),s=(0,a.useCallback)((0,r.throttle)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(e)).then((e=>e.json())).then((e=>i((0,r.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,a.useEffect)((()=>{(0,r.isEmpty)(e)||o.test(e)||s(e)}),[e]),n}},88707:function(e,t,n){"use strict";n.d(t,{tC:function(){return a},pU:function(){return o},CC:function(){return i}});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,o=/rid=([0-9]+)&/,i=e=>{if(e)return(e=>{if(!e)return;let t="";if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let a=n.getAll("rid");if(a&&0!==a.length||(a=n.getAll("restref")),!a||0===a.length)return;const o={};a&&(o.rid=a);const i=n.get("domain");i&&(o.domain=i);const s=n.get("iframe");s&&(o.iframe=s);const l=n.get("lang");l&&(o.lang=l);const c=n.get("newtab");return c&&(o.newtab=c),r&&(o.style=r),o})((e=>{const t=e.match(r);return t&&t[1]?t[1]:a.test(e)||o.test(e)?e:void 0})(e))}},79509:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(18161);const __=a.__,_x=a._x;function s(e){let{className:t,onSubmit:n,noticeUI:a,url:s,setUrl:l}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.Placeholder,{label:__("Pinterest","jetpack"),icon:i.qv,notices:a},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),n()}},(0,r.createElement)("input",{type:"url",value:s,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>l(e.target.value)}),(0,r.createElement)(o.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))))}},49362:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981);const __=a.__,_x=a._x;function s(e){let{fallbackUrl:t,onClick:n}=e;return(0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(o.Button,{isLink:!0,onClick:()=>{const e=(0,r.createElement)("a",{href:t},t);n((0,i.createBlock)("core/paragraph",{content:(0,r.renderToString)(e)}))}},_x("Convert block to link","button label","jetpack")))}},61989:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}},4052:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setEditingState:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},41659:function(e,t,n){"use strict";var r=n(69307),a=n(94991);t.Z={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:n}=e;const{url:o}=t;return(0,a.t)(o)?(0,r.createElement)("div",{className:n},(0,r.createElement)("a",{"data-pin-do":(0,a.t)(o),href:o})):null}}},81253:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(52175),i=n(94991),s=n(4052),l=n(61989),c=n(79509),u=n(49362),p=n(79474);t.Z=(0,a.withNotices)((function(e){let{attributes:t,isSelected:n,className:d,noticeOperations:m,noticeUI:h,setAttributes:f,onReplace:g}=e;const{url:b}=t,{isFetching:v,pinterestUrl:k,testUrl:y,hasTestUrlError:E}=(0,p.Z)(),[w,_]=(0,r.useState)(!1),[C,j]=(0,r.useState)(""),[S,x]=(0,r.useState)(!1),P=(0,r.useCallback)((()=>(0,r.createElement)(u.Z,{fallbackUrl:C,onClick:g})),[E]),T=()=>{v||(y(C),x(!1))},N=()=>{_(!0)};if((0,r.useEffect)((()=>{b&&y(b)}),[]),(0,r.useEffect)((()=>{!n&&w&&_(!1)}),[n,w]),(0,r.useEffect)((()=>{f({url:k}),m.removeAllNotices(),k&&j(k),E&&m.createErrorNotice(P())}),[k,E,f,P]),v)return(0,r.createElement)(l.Z,null);const A=(0,i.t)(b);if(S||!b||b&&!A)return(0,r.createElement)(c.Z,{className:d,onSubmit:T,noticeUI:h,url:C,setUrl:j});const I=`<a data-pin-do='${A}' href='${b}'></a>`;return(0,r.createElement)("div",{className:d},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.C,{setEditingState:x})),(0,r.createElement)("div",null,(0,r.createElement)(a.SandBox,{html:I,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:N}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:N})))}))},79474:function(e,t,n){"use strict";var r=n(69307),a=n(87072),o=n(18161);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,r.useState)(!1),[i,s]=(0,r.useState)(e),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i&&i!==o.a0&&(n(!0),(0,a.Z)(i).then((e=>{n(!1),s(e),c(!1)})).catch((()=>{n(!1),s(i||void 0),c(!0)})))}),[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:l,testUrl:s}}},18161:function(e,t,n){"use strict";n.d(t,{Wh:function(){return p},a0:function(){return d},u2:function(){return m},qv:function(){return f},Xd:function(){return g}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(81253),l=n(26981),c=n(57535),u=n(41659);const __=a.__,_x=a._x,p=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,d="https://pinterest.com/anapinskywalker/",m="pinterest",h=__("Pinterest","jetpack"),f=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,null,(0,r.createElement)(o.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z"}))),g={title:h,description:__("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:f,foreground:(0,c.m)()},category:"embed",keywords:[_x("social","block search term","jetpack"),_x("pinboard","block search term","jetpack"),_x("pins","block search term","jetpack")],supports:{align:!1,html:!1},attributes:{url:{type:"string"}},edit:s.Z,save:l.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&p.test(e.textContent),transform:e=>(0,i.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},example:{attributes:{url:d}},deprecated:[u.Z]}},26981:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;return(0,r.createElement)("a",{href:n},n)}},94991:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var r=n(96483),a=n(18161);function o(e){if(!a.Wh.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},45452:function(e,t,n){"use strict";n.d(t,{G:function(){return s},q:function(){return l}});var r=n(12761),a=n(86989),o=n.n(a),i=n(96483);const s=async()=>await o()({path:"/wpcom/v2/podcast-player/track-quantity"}),l=async e=>{let t,n,a,{url:s,guids:l=[],fetchEpisodeOptions:c=!1}=e;try{t=await o()({path:(0,i.addQueryArgs)("/wpcom/v2/podcast-player",{url:s,guids:l,"episode-options":c})})}catch(e){n=e}if(t)return{type:r.u,data:t};try{a=await o()({path:(0,i.addQueryArgs)("/oembed/1.0/proxy",{url:s})})}catch(e){}const u='<a href="'+s+'">'+s+"</a>";if(a&&a.html!==u)return{type:r.b};throw n}},23600:function(e,t,n){"use strict";var r=n(96483),a=n(68039);t.Z={url:{type:"string",validator:r.isUrl},selectedEpisodes:{type:"array",default:[]},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeTitle:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}}},98006:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(76814);const s=(0,r.memo)((e=>{let{playerId:t,title:n,cover:a,link:o,track:i,children:s,showEpisodeTitle:c,showCoverArt:u,showEpisodeDescription:p,colors:d}=e;return u||c||p?(0,r.createElement)("div",{className:"jetpack-podcast-player__header"},(0,r.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},u&&a&&(0,r.createElement)("div",{className:"jetpack-podcast-player__cover"},(0,r.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:a,alt:""})),c&&!!(n||i&&i.title)&&(0,r.createElement)(l,{playerId:t,title:n,link:o,track:i,colors:d})),!!(p&&i&&i.description)&&(0,r.createElement)("p",{id:`${t}__track-description`,className:"jetpack-podcast-player__track-description"},i.description),s):s})),l=(0,r.memo)((e=>{let{playerId:t,title:n,link:a,track:s,colors:l={primary:{name:null,custom:null,classes:""}}}=e;return(0,r.createElement)("h2",{id:`${t}__title`,className:"jetpack-podcast-player__title"},!(!s||!s.title)&&(0,r.createElement)("span",{className:o()("jetpack-podcast-player__current-track-title",l.primary.classes),style:{color:l.primary.custom}},s.title,(0,r.createElement)("a",{className:"jetpack-podcast-player__track-title-link",href:s.link||s.src,target:"_blank",rel:"noopener noreferrer nofollow"},i.Z)),!!(s&&s.title&&n)&&(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&(0,r.createElement)(c,{title:n,link:a,colors:l}))})),c=(0,r.memo)((e=>{let{title:t,link:n}=e;return(0,r.createElement)("span",{className:"jetpack-podcast-player__podcast-title"},n?(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:n,target:"_blank",rel:"noopener noreferrer nofollow"},t):{title:t})}));t.Z=s},66530:function(e,t,n){"use strict";var r=n(69307),a=n(15111),o=n(15020);const i=(0,r.memo)((e=>{let{playerId:t,tracks:n,selectTrack:i,currentTrack:s,playerState:l,colors:c}=e;return(0,r.createElement)("ol",{className:"jetpack-podcast-player__tracks","aria-labelledby":`jetpack-podcast-player__tracklist-title--${t}`,"aria-describedby":`jetpack-podcast-player__tracklist-description--${t}`},n.map(((e,t)=>{const n=s===t;return(0,r.createElement)(o.Z,{key:e.id,index:t,track:e,selectTrack:i,isActive:n,isPlaying:n&&l===a.Wp,isError:n&&l===a.Vy,colors:c})})))}));t.Z=i},58627:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(25158),u=n(94333),p=n(9818),d=n(15111),m=n(92924),h=n(66530),f=n(98006),g=n(74693),b=n(56551);const __=l.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{currentTrack:0,hasUserInteraction:!1}),a()(this,"recordUserInteraction",(()=>{this.state.hasUserInteraction||this.setState({hasUserInteraction:!0})})),a()(this,"selectTrack",(e=>{const{currentTrack:t}=this.state;if(t===e)return this.recordUserInteraction(),void this.props.toggleMediaSource(this.props.playerId);-1!==t&&this.props.pauseMediaSource(this.props.playerId),this.loadAndPlay(e)})),a()(this,"loadTrack",(e=>{const t=this.getTrack(e);if(!t)return!1;this.state.currentTrack!==e&&this.setState({currentTrack:e});const{title:n,link:r,description:a}=t;return this.props.updateMediaSourceData(this.props.playerId,{title:n,link:r}),(0,c.speak)(
18
  /* translators: %s is the track title. It describes the current state of the track as "Loading: [track title]". */
19
+ `${(0,l.sprintf)(__("Loading: %s","jetpack"),n)} ${a}`,"assertive"),!0})),a()(this,"loadAndPlay",(e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)})),a()(this,"getTrack",(e=>this.props.tracks[e])),a()(this,"handleError",(e=>{if(!this.state.hasUserInteraction){const t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{throw new Error(t)}))}this.props.errorMediaSource(this.props.playerId),(0,c.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")})),a()(this,"handlePlay",(()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})})),a()(this,"handlePause",(()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==d.Vy&&this.props.pauseMediaSource(this.props.playerId)})),a()(this,"handleTimeChange",(e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)})),a()(this,"handleJump",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)})),a()(this,"handleSkip",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)})),a()(this,"updateMediaData",(e=>{var t,n;this.props.updateMediaSourceData(this.props.playerId,{duration:null===(t=e.target)||void 0===t?void 0:t.duration,domId:null===(n=e.target)||void 0===n?void 0:n.id})}))}registerPlayer(){const e=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:d._5}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){const t=e=>null!=e&&e.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=new Set(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}static getDerivedStateFromProps(e,t){return e.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:r,tracks:a,attributes:i,currentTime:c,playerState:u}=this.props,{itemsToShow:p,primaryColor:d,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:E,backgroundColor:w,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x}=i,{currentTrack:P}=this.state,T=a.slice(0,p),N=this.getTrack(P),A=(0,g.Aq)({primaryColor:d,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:w,customBackgroundColor:_}),I={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":E,"--jetpack-podcast-player-background":C},B=s()("jetpack-podcast-player",u,A.secondary.classes,A.background.classes);return(0,o.createElement)("section",{className:B,style:I,"aria-labelledby":t||N&&N.title?`${e}__title`:void 0,"aria-describedby":N&&N.description?`${e}__track-description`:void 0,"data-jetpack-iframe-ignore":!0},(0,o.createElement)(f.Z,{playerId:e,title:t,link:n,cover:r,track:this.getTrack(P),showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x,colors:A},(0,o.createElement)(m.Z,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(P).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:u,currentTime:c,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),T.length>1&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,l.sprintf)(// translators: %s is the track title.
20
  __("Playlist: %s","jetpack"),t)),(0,o.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,o.createElement)(h.Z,{playerId:e,playerState:u,currentTrack:P,tracks:T,selectTrack:this.selectTrack,colors:A})))}}v.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]},t.Z=(0,u.compose)([b.Z,(0,p.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(d.tT);return{currentTime:r(n),playerState:a(n)}})),(0,p.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(d.tT);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(v)},86852:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=(0,r.memo)((e=>{let{link:t,title:n,colors:o}=e;return(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),t&&(0,r.createElement)("span",{className:o.secondary.classes,style:{color:o.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,a.sprintf)(
21
  /* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */
22
  __("%s:","jetpack"),n)} `),__("Open in a new tab","jetpack"))))}));t.Z=o},71938:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(72086);const __=a.__,i=(0,r.memo)((e=>{let t,n,{isPlaying:a,isError:i,className:s}=e;i?(n="error",
29
  /* translators: This needs to be a single word with no spaces. It describes
30
  the current item in the group. A screen reader will announce it as "[title],
31
  current track". */
32
+ b=n?__("track","jetpack"):void 0;return(0,r.createElement)("li",{className:f,style:Object.keys(g).length?g:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:t.link||t.src,role:"button","aria-current":b,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),u(p))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),u(p))}},(0,r.createElement)(s.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:i}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},t.title),t.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:t.duration},t.duration)),n&&i&&(0,r.createElement)(l.Z,{link:t.link,title:t.title,colors:d}))}));t.Z=u},56551:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(27538),a=n.n(r),o=n(69307),i=n(65736);const __=i.__;function s(e){class t extends o.Component{constructor(){super(...arguments),a()(this,"state",{didError:!1,isIE11AudioIssue:!1}),a()(this,"componentDidCatch",((e,t)=>{this.props.onError(e,t)}))}render(){const{didError:t,isIE11AudioIssue:n}=this.state;return t?(0,o.createElement)("section",{className:"jetpack-podcast-player"},(0,o.createElement)("p",{className:"jetpack-podcast-player__error"},n?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,o.createElement)(e,this.props)}}return a()(t,"getDerivedStateFromError",(e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}))),t.defaultProps={onError:()=>{}},t}},12761:function(e,t,n){"use strict";n.d(t,{u:function(){return r},b:function(){return a}});const r="podcast-feed",a="embed-block"},90307:function(e,t,n){"use strict";var r=n(96483),a=n(68039);const o={url:{type:"string",validator:r.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}};t.Z={attributes:o,supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},87315:function(e,t,n){"use strict";var r=n(69307),a=n(95339),o=n.n(a),i=n(92819),s=n(4096),l=n(55609),c=n(94333),u=n(65736),p=n(52175),d=n(9818),m=n(4981),h=n(96483),f=n(14087),g=n(41820),b=n(23600),v=n(58627),k=n(74693),y=n(45452),E=n(91763),w=n(71420),_=n(12761),C=n(87929);const __=u.__,j=o()("jetpack:podcast-player:edit"),S=(0,s.Wp)()||(0,s.Ug)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/";t.Z=(0,c.compose)([(0,d.withDispatch)(((e,t)=>{let{clientId:n,attributes:r}=t;return{replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(n,(0,m.createBlock)("core/embed",{url:r.url}))}}})),(0,p.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),l.withNotices,c.withInstanceId,w.K])((e=>{var t,n;let{instanceId:a,className:o,attributes:s,setAttributes:c,noticeOperations:{createErrorNotice:u,removeAllNotices:d},noticeUI:m,primaryColor:w,setPrimaryColor:x,secondaryColor:P,setSecondaryColor:T,fallbackTextColor:N,backgroundColor:A,setBackgroundColor:I,fallbackBackgroundColor:B,isSelected:M,replaceWithEmbedBlock:R}=e;const L=(0,f.S)(b.Z,s),{url:Z,selectedEpisodes:D,itemsToShow:F,showCoverArt:O,showEpisodeTitle:z,showEpisodeDescription:U,exampleFeedData:$}=L,V=`jetpack-podcast-player-block-${a}`,[G,H]=(0,r.useState)(!1),[q,W]=(0,r.useState)(10),K=(0,r.useRef)(),[{selectedGuid:X,checkUrl:J,...Y},Q]=(0,r.useReducer)(E.J,{editedUrl:Z||"",isEditing:!Z&&!$,isLoading:!1,feedData:$||{},isInteractive:!1,selectedGuid:null==D||null===(t=D[0])||void 0===t?void 0:t.guid,checkUrl:Z||""}),ee=(0,r.useMemo)((()=>(0,i.debounce)((e=>{var t;Q({type:E.N.START_FETCH}),null===(t=K.current)||void 0===t||t.cancel(),K.current=(0,k.W4)((0,y.q)({...e,fetchEpisodeOptions:!0})),K.current.promise.then((t=>{if(d(),null!=t&&t.isCanceled)j("Block was unmounted during fetch",t);else switch(null==t?void 0:t.type){case _.u:return c({url:e.url,selectedEpisodes:e.guids.map((e=>({guid:e})))}),Q({type:E.N.FEED_RECEIVED,payload:t.data});case _.b:return R()}}),(e=>{null!=e&&e.isCanceled?j("Block was unmounted during fetch",e):(j("feed error",e),d(),u(e.message||__("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),Q({type:E.N.START_EDITING}))}))}),300)),[R,c,u,d]);(0,r.useEffect)((()=>()=>{var e,t;null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e)}),[]);const te=(0,r.useCallback)((e=>{null===e||G||((0,C.DT)(["link#mediaelement-css","link#wp-mediaelement-css"],e),H(!0))}),[G]);(0,r.useEffect)((()=>{if(""!==J)return ee({url:J,guids:X?[X]:[]}),()=>{var e,t;return null==K||null===(e=K.current)||void 0===e||null===(t=e.cancel)||void 0===t?void 0:t.call(e)}}),[ee,J,X]),(0,r.useEffect)((()=>{(0,y.G)().then((e=>{W(e)}))}),[]),(0,r.useEffect)((()=>{X&&1!==F&&c({itemsToShow:1})}),[X,F,c]),(0,r.useEffect)((()=>{!M&&Y.isInteractive&&Q({type:E.N.PREVENT_INTERACTIONS})}),[M,Y.isInteractive]);const ne=e=>{if(e.preventDefault(),""===Y.editedUrl)return;const t=(0,h.prependHTTP)(Y.editedUrl);if((0,h.isURL)(t)){var n;if(t===J)Q({type:E.N.CLEAR_FEED}),ee({url:J,guids:null!==(n=D[0])&&void 0!==n&&n.guid?[D[0].guid]:[]});else Q({type:E.N.CHECK_URL,payload:t});Q({type:E.N.FINISH_EDITING,payload:t})}else u(__("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))};if(Y.isEditing)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},(0,r.createElement)("form",{onSubmit:ne},m,(0,r.createElement)(l.TextControl,{type:"text",inputMode:"url",placeholder:__("Enter URL here…","jetpack"),value:Y.editedUrl,className:"components-placeholder__input",onChange:e=>Q({type:E.N.EDIT_URL,payload:e})}),(0,r.createElement)(l.Button,{isPrimary:!0,type:"submit"},__("Embed","jetpack"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(l.ExternalLink,{href:S},__("Learn more about embeds","jetpack"))));if(null===(n=Y.feedData.tracks)||void 0===n||!n.length)return(0,r.createElement)(l.Placeholder,{icon:g.E,label:__("Podcast Player","jetpack"),instructions:__("Loading podcast feed…","jetpack")},(0,r.createElement)(l.Spinner,null));const re=(e,t)=>n=>{c({[e]:n}),t(n)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.BlockControls,null,(0,r.createElement)(l.ToolbarGroup,null,(0,r.createElement)(l.ToolbarButton,{"aria-label":__("Edit Podcast Feed URL","jetpack"),onClick:()=>Q({type:E.N.START_EDITING})},__("Replace","jetpack")))),(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(l.PanelBody,{title:__("Podcast settings","jetpack")},(l.ComboboxControl||0===D.length)&&(0,r.createElement)(l.RangeControl,{label:__("Number of items","jetpack"),value:F,onChange:e=>c({itemsToShow:X?1:e}),min:1,max:q,required:!0,disabled:!!X}),l.ComboboxControl&&(0,r.createElement)(l.ComboboxControl,{className:"jetpack-podcast-player__episode-selector",value:X,onChange:e=>Q({type:E.N.SELECT_EPISODE,payload:e}),options:Y.feedData.options||[],label:__("Episode","jetpack"),onFilterValueChange:i.noop}),(0,r.createElement)(l.ToggleControl,{label:__("Show Cover Art","jetpack"),checked:O,onChange:e=>c({showCoverArt:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Title","jetpack"),checked:z,onChange:e=>c({showEpisodeTitle:e})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Episode Description","jetpack"),checked:U,onChange:e=>c({showEpisodeDescription:e})})),(0,r.createElement)(p.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:w.color,onChange:re("hexPrimaryColor",x),label:__("Primary Color","jetpack")},{value:P.color,onChange:re("hexSecondaryColor",T),label:__("Secondary Color","jetpack")},{value:A.color,onChange:re("hexBackgroundColor",I),label:__("Background Color","jetpack")}]},(0,r.createElement)(p.ContrastChecker,{isLargeText:!1,textColor:P.color,backgroundColor:A.color,fallbackBackgroundColor:B,fallbackTextColor:N}))),(0,r.createElement)("div",{id:V,className:o,ref:te},(0,r.createElement)(v.Z,{playerId:V,attributes:L,tracks:Y.feedData.tracks,cover:Y.feedData.cover,title:Y.feedData.title,link:Y.feedData.link}),!Y.isInteractive&&!Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:()=>Q({type:E.N.MAKE_INTERACTIVE})}),Y.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__loading-overlay"},(0,r.createElement)(l.Spinner,null))))}))},41820:function(e,t,n){"use strict";n.d(t,{E:function(){return r.Z}});var r=n(95506)},76814:function(e,t,n){"use strict";var r=n(69307),a=n(55609);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.Z=o},95506:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,null,(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"})),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,null),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,{transform:"matrix(1 0 0 1 144 120)"},(0,r.createElement)(a.Path,{d:"M-122-114h-5v8.18c-0.31-0.11-0.65-0.18-1-0.18c-1.66,0-3,1.34-3,3s1.34,3,3,3s3-1.34,3-3v-9h3V-114 L-122-114z M-129-114h-12v2h12V-114L-129-114z M-129-110h-12v2h12V-110L-129-110z M-133-106h-8v2h8V-106L-133-106z M-129-103 c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1s-0.45,1-1,1C-128.55-102-129-102.45-129-103z"})))))},72086:function(e,t,n){"use strict";n.r(t),n.d(t,{playing:function(){return i},error:function(){return s}});var r=n(69307),a=n(55609);const o={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},i=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"})),s=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},58495:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(65736),a=n(23600),o=n(90307),i=n(87315),s=n(99944),l=n(41820),c=n(57535);const __=r.__,_x=r._x,u="podcast-player",p={title:__("Podcast Player","jetpack"),description:__("Select and play episodes from a single podcast.","jetpack"),icon:{src:l.E,foreground:(0,c.m)()},category:"embed",keywords:[_x("audio","block search term","jetpack"),_x("embed","block search term","jetpack")],supports:{align:["wide","full"],spacing:{padding:!0,margin:!0},anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},edit:i.Z,save:s.Z,attributes:a.Z,example:{attributes:{customPrimaryColor:(0,c.m)(),hexPrimaryColor:(0,c.m)(),exampleFeedData:{title:__("Jetpack Example Podcast","jetpack"),link:"https://jetpack.com",cover:"https://jetpackme.files.wordpress.com/2020/05/jetpack-example-podcast-cover.png?w=160",tracks:[{id:"3",title:__("3. Our third episode","jetpack"),duration:"14:58"},{id:"2",title:__("2. Interview with a special guest","jetpack"),duration:"19:17"},{id:"1",title:__("1. Welcome to Example Podcast","jetpack"),duration:"11:25"}]}}},deprecated:[o.Z]}},99944:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{url:n}=t;if(n&&""!==n)return(0,r.createElement)("a",{className:"jetpack-podcast-player__direct-link",href:n},n)}},91763:function(e,t,n){"use strict";n.d(t,{N:function(){return r},J:function(){return a}});const r={EDIT_URL:"EDIT_URL",FINISH_EDITING:"FINISH_EDITING",START_EDITING:"START_EDITING",SELECT_EPISODE:"SELECT_EPISODE",FEED_RECEIVED:"FEED_RECEIVED",CLEAR_FEED:"CLEAR_FEED",MAKE_INTERACTIVE:"MAKE_INTERACTIVE",PREVENT_INTERACTIONS:"PREVENT_INTERACTIONS",START_FETCH:"START_FETCH",CHECK_URL:"CHECK_URL"},a=(e,t)=>{switch(t.type){case r.EDIT_URL:return{...e,editedUrl:t.payload};case r.START_EDITING:return{...e,isEditing:!0,isLoading:!1};case r.FINISH_EDITING:return{...e,editedUrl:t.payload,isEditing:!1};case r.FEED_RECEIVED:return{...e,isLoading:!1,feedData:t.payload};case r.CLEAR_FEED:return{...e,feedData:{}};case r.MAKE_INTERACTIVE:return{...e,isInteractive:!0};case r.PREVENT_INTERACTIONS:return{...e,isInteractive:!1};case r.START_FETCH:return{...e,isLoading:!0};case r.SELECT_EPISODE:return{...e,selectedGuid:t.payload};case r.CHECK_URL:return{...e,selectedGuid:null,feedData:{},checkUrl:t.payload};default:return{...e}}}},74693:function(e,t,n){"use strict";n.d(t,{Gd:function(){return i},W4:function(){return s},Aq:function(){return l}});var r=n(89105),a=n.n(r),o=n(92819);function i(e,t){if(e&&t)return`has-${t}-${e}`}function s(e){let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}}const l=(0,o.memoize)((e=>{let{primaryColor:t,customPrimaryColor:n,secondaryColor:r,customSecondaryColor:o,backgroundColor:s,customBackgroundColor:l}=e;const c=i("color",t),u=i("color",r),p=i("background-color",s);return{primary:{name:t,custom:n,classes:a()({"has-primary":c||n,[c]:c})},secondary:{name:r,custom:o,classes:a()({"has-secondary":u||o,[u]:u})},background:{name:s,custom:l,classes:a()({"has-background":p||l,[p]:p})}}}),(e=>Object.values(e).join()))},59189:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"premium-content-wrapper"},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]],__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},2963:function(e,t,n){"use strict";var r=n(69307);const a={selectedTab:{id:"",className:"",label:(0,r.createElement)(r.Fragment,null)},stripeNudge:null},o=(0,r.createContext)(a);t.Z=o},76136:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(29183),a=n.n(r),o=n(69307),i=n(52175),s=n(55609),l=n(6801),c=n(36696),u=n(1214),p=n(65736),d=n(29917),m=n(20361);const __=p.__;function h(e){const{selectedPlanId:t,onSelected:n,plans:r,getPlanDescription:p}=e,h=r.find((e=>e.id===t));let f=null;h&&(f=" "+p(h));let g=l.Z;return t&&!h&&(f=__("Subscription not found","jetpack"),g=c.Z),(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(s.ToolbarGroup,null,(0,o.createElement)(s.ToolbarItem,null,(()=>(0,o.createElement)(s.DropdownMenu,{icon:(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.Z,{icon:g})," ",f&&(0,o.createElement)(o.Fragment,null,f)),label:__("Select a plan","jetpack"),className:"premium-content-toolbar-button"},(t=>{let{onClose:r}=t;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(d.Z,a()({},e,{onSelected:n,onClose:r,selectedPlan:h})),(0,o.createElement)(m.Z,a()({},e,{onClose:r})))}))))))}},47322:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z"}),(0,r.createElement)(a.Circle,{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(a.Path,{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}))},61114:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(55609),o=n(52175),i=n(65736),s=n(17882);const __=i.__;function l(e){const[t,n]=(0,r.useState)(0),{attributes:i,setAttributes:l,className:c,savePlan:u,siteSlug:p}=e;return(0,r.createElement)(o.InspectorControls,null,p&&(0,r.createElement)(a.ExternalLink,{href:`https://wordpress.com/earn/payments/${p}`,className:"wp-block-premium-content-container---link-to-earn"},__("Manage your subscriptions.","jetpack")),(0,r.createElement)(a.PanelBody,{title:__("Add a new subscription","jetpack"),initialOpen:!0,className:`${c}---settings-add_plan`},1===t&&(0,r.createElement)(a.Placeholder,{icon:"lock",label:__("Premium Content","jetpack"),instructions:__("Saving plan…","jetpack")},(0,r.createElement)(a.Spinner,null)),0===t&&(0,r.createElement)("div",null,(0,r.createElement)(a.PanelRow,{className:"plan-name"},(0,r.createElement)(a.TextControl,{id:"new-plan-name",label:__("Name","jetpack"),value:i.newPlanName,onChange:e=>l({newPlanName:e})})),(0,r.createElement)(a.PanelRow,{className:"plan-price"},(0,r.createElement)(a.SelectControl,{label:__("Currency","jetpack"),onChange:e=>l({newPlanCurrency:e}),value:i.newPlanCurrency,options:s.Xy}),(0,r.createElement)(a.TextControl,{label:__("Price","jetpack"),value:i.newPlanPrice,onChange:e=>l({newPlanPrice:parseFloat(e)}),type:"number"})),(0,r.createElement)(a.PanelRow,{className:"plan-interval"},(0,r.createElement)(a.SelectControl,{label:__("Interval","jetpack"),onChange:e=>l({newPlanInterval:e}),value:i.newPlanInterval,options:[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"}]})),(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.Button,{isSecondary:!0,isLarge:!0,onClick:t=>{t.preventDefault(),n(1),u(e.attributes,(e=>{n(0),e&&(l({newPlanPrice:5}),l({newPlanName:""}))}))}},__("Add subscription","jetpack"))))))}},27939:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(1214),i=n(36696),s=n(65736);const __=s.__;t.Z=()=>(0,r.createElement)(a.Warning,{className:"premium-content-block-nudge"},(0,r.createElement)("span",{className:"premium-content-block-nudge__info"},(0,r.createElement)(o.Z,{icon:i.Z}),(0,r.createElement)("span",{className:"premium-content-block-nudge__text-container"},(0,r.createElement)("span",{className:"premium-content-block-nudge__title"},__("Invalid subscription configured for this block.","jetpack")),(0,r.createElement)("span",{className:"premium-content-block-nudge__message"},__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")))))},20361:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(9818),o=n(55609),i=n(65736);const __=i.__;function s(e){return(0,r.createElement)(o.MenuGroup,null,(0,r.createElement)(o.MenuItem,{onClick:t=>{t.preventDefault(),(0,a.select)("core/edit-post").isEditorSidebarOpened()||(0,a.dispatch)("core/edit-post").openGeneralSidebar("edit-post/block");const n=document.getElementById("new-plan-name");null!==n&&n.focus(),e.onClose()}},__("Add a new subscription","jetpack")))}},61556:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(55609);function o(e){const{className:t,plan:n,selectedPlan:o,onSelected:i,onClose:s,getPlanDescription:l}=e,c=o&&n.id===o.id,u=(c?["is-selected"]:[]).concat([t]).join(" "),p=c?"yes":void 0;let d=null;return n&&(d=" "+l(n)),(0,r.createElement)(a.MenuItem,{onClick:e=>{e.preventDefault(),i(n),s()},className:u,key:n.id,value:n.id,selected:c,icon:p},n.title," : ",d)}},29917:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(29183),a=n.n(r),o=n(69307),i=n(55609),s=n(61556);function l(e){const{plans:t,selectedPlan:n,onSelected:r}=e;return(0,o.createElement)(i.MenuGroup,null,t.map((t=>(0,o.createElement)(s.Z,a()({},e,{key:t.id,selectedPlan:n,onSelected:r,plan:t})))))}},34411:function(e,t,n){"use strict";n.d(t,{W:function(){return a},H:function(){return o}});var r=n(9818);const a=e=>0===e.name.indexOf("premium-content/")||e.innerBlocks.some(a),o=e=>{const{getBlocksByClientId:t,getBlockParents:n}=(0,r.select)("core/block-editor");return!!t(n(e.clientId)).find((e=>0===e.name.indexOf("premium-content/")))}},29378:function(e,t,n){"use strict";var r=n(69307),a=n(72067),o=n(9818),i=n(65736),s=n(24653),l=n(98034);const __=i.__;function c(){const e=(0,o.select)("core/editor").getSelectedBlock();(0,o.dispatch)("core/block-editor").replaceBlock(e.clientId,(0,s.e)(e.innerBlocks))}t.Z=()=>(0,r.createElement)(a.PluginBlockSettingsMenuItem,{allowedBlocks:[l.u],label:__("Remove block and keep content","jetpack"),onClick:c})},24653:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(4981);const a=e=>{const t=e.find((e=>"premium-content/subscriber-view"===e.name));return 1===t.innerBlocks.length&&"core/group"===t.innerBlocks[0].name?t.innerBlocks[0]:(0,r.createBlock)("core/group",{},t.innerBlocks)}},97894:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(94333),i=n(9818),s=n(65736),l=n(92694);const __=s.__,c=["core/button","jetpack/recurring-payments","premium-content/login-button"];t.Z=(0,o.compose)([(0,i.withSelect)(((e,t)=>({subscribeButton:e("core/block-editor").getBlock(t.clientId).innerBlocks.find((e=>"jetpack/recurring-payments"===e.name))}))),(0,i.withDispatch)(((e,t)=>({setSubscribeButtonPlan(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})}})))])((function(e){let{context:t,subscribeButton:n,setSubscribeButtonPlan:o}=e;const i=t?t["premium-content/planId"]:null,s=!!t&&t["premium-content/isPreview"],u=[["core/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}],["premium-content/login-button"]],p=[["jetpack/recurring-payments",{planId:i},[["jetpack/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}]]],["premium-content/login-button"]];(0,r.useEffect)((()=>{i&&n&&n.attributes.planId!==i&&o(i)}),[i,n,o]),(0,r.useEffect)((()=>{n&&(0,l.addFilter)("jetpack.RecurringPayments.showControls","jetpack/premium-content-hide-recurring-payments-controls",((e,t)=>t!==n.clientId&&e))}),[n]);const d=(0,a.useBlockProps)({className:"wp-block-buttons"});return(0,r.createElement)("div",d,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:c,template:s?u:p,templateInsertUpdatesSelection:!1,__experimentalLayout:{type:"default",alignments:[]},__experimentalMoverDirection:"horizontal"}))}))},46157:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(25389),i=n(52175),s=n(97894),l=n(71586);const __=a.__,c="premium-content/buttons",u={apiVersion:2,title:__("Premium Content buttons","jetpack"),description:__("Prompt Premium Content visitors to take action with a group of button-style links.","jetpack"),category:"grow",icon:o.Z,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},keywords:[__("link","jetpack")],edit:s.Z,save:l.Z,usesContext:["premium-content/planId","premium-content/isPreview"],deprecated:[{attributes:{},supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-buttons"},(0,r.createElement)(i.InnerBlocks.Content,null))}]}},71586:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){const e=a.useBlockProps.save({className:"wp-block-buttons"});return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},83169:function(e,t,n){"use strict";var r=n(77940);t.Z={isEligible:(e,t)=>{var n;if("premium-content/logged-out-view"===(null==t||null===(n=t[0])||void 0===n?void 0:n.name))return!0},migrate:(e,t)=>[e,[t[1],t[0]]],save:r.Z}},86633:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(55609),s=n(52175),l=n(65736),c=n(94333),u=n(9818),p=n(96483),d=n(78850),m=n(86989),h=n.n(m),f=n(59189),g=n(76136),b=n(61114),v=n(2963),k=n(51591),y=n(17882),E=n(2368),w=n(37930),_=n(27939);const __=l.__,C=[{id:"premium",label:(0,o.createElement)("span",null,__("Subscriber View","jetpack")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:(0,o.createElement)("span",null,__("Non-subscriber View","jetpack")),className:"wp-premium-content-logged-out-view"}],j=[];function S(e){const[t,n]=(0,o.useState)(C[1]),[r,c]=(0,o.useState)(!1),[m,S]=(0,o.useState)(j),[P,T]=(0,o.useState)(null),[N,A]=(0,o.useState)(0),[I,B]=(0,o.useState)(!1),[M,R]=(0,o.useState)(""),{isPreview:L}=e.attributes,{clientId:Z}=e;function D(t,n){if(!t.newPlanName||0===t.newPlanName.length)return x(e,__("Plan requires a name","jetpack")),void n(!1);const r=parseFloat(t.newPlanPrice),a=(0,y.hj)(t.newPlanCurrency),o=(0,l.sprintf)(// translators: %s: Price
33
+ __("Minimum allowed price is %s.","jetpack"),(0,d.ZP)(a,t.newPlanCurrency));if(r<a)return x(e,o),void n(!1);if(!(0,y.vs)(t.newPlanCurrency,r))return x(e,__("Plan requires a valid price","jetpack")),void n(!1);const i={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:t.newPlanCurrency,price:t.newPlanPrice,title:t.newPlanName,interval:t.newPlanInterval}};h()(i).then((t=>{const r={id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency};S(m.concat([r])),F(r),function(e,t){e.createSuccessNotice(t,{type:"snackbar"})}(e,__("Successfully created plan","jetpack")),n&&n(!0)}),(()=>{x(e,__("There was an error when adding the plan.","jetpack")),n&&n(!1)}))}function F(t){e.setAttributes({selectedPlanId:t.id})}const O=(0,o.useRef)(null);!function(e,t){function n(n){e.current&&n.target&&n.target instanceof Node&&!e.current.contains(n.target)?t(!1):t(!0)}(0,o.useEffect)((()=>(document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)})))}(O,c);const{isSelected:z,className:U}=e,$=(0,u.useSelect)((e=>e("core/block-editor").getSelectedBlock()));(0,o.useEffect)((()=>{if(z)return;if(!$)return;const e=(0,u.select)("core/block-editor");e.getBlockParents($.clientId).includes(Z)&&("premium-content/logged-out-view"===$.name||e.getBlockParentsByBlockName($.clientId,"premium-content/logged-out-view").length?n(C[1]):n(C[0]))}),[Z,z,$]),(0,o.useEffect)((()=>{if(L)return;const t=(0,p.getQueryArg)(window.location.href,"origin"),n={path:(0,p.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t?"gutenberg-wpcom":"gutenberg"}),method:"GET"};h()(n).then((t=>{if(t||"object"==typeof t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return A(2),void x(e,Object.values(t.errors)[0][0]);T((0,E.Z)(e.postId,t.connect_url)),B(t.should_upgrade_to_access_memberships),R(t.site_slug),t.products&&0===t.products.length&&!t.should_upgrade_to_access_memberships&&t.connected_account_id?D({newPlanCurrency:"USD",newPlanPrice:5,newPlanName:__("Monthly Subscription","jetpack"),newPlanInterval:"1 month"},(()=>{A(t.connected_account_id?1:2)})):(t.products&&t.products.length>0&&(S(t.products),e.attributes.selectedPlanId||F(t.products[0])),A(t.connected_account_id?1:2))}}),(t=>{T(null),A(2),x(e,t.message)})),setTimeout((()=>e.selectBlock()),1e3)}),[]);const{autosaveAndRedirect:V}=(0,w.Z)(P);return 0!==N||L?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.BlockControls,null,!I&&1!==N&&P&&(0,o.createElement)(i.ToolbarGroup,null,(0,o.createElement)(i.ToolbarButton,{icon:k.Pw,onClick:V,className:"connect-stripe components-tab-button"},__("Connect Stripe","jetpack"))),(0,o.createElement)(i.ToolbarGroup,null,(0,o.createElement)(i.ToolbarButton,{onClick:()=>{n(C[0])},className:"components-tab-button",isPressed:"wp-premium-content-logged-out-view"!==t.className},(0,o.createElement)("span",null,__("Subscriber View","jetpack"))),(0,o.createElement)(i.ToolbarButton,{onClick:()=>{n(C[1])},className:"components-tab-button",isPressed:"wp-premium-content-logged-out-view"===t.className},(0,o.createElement)("span",null,__("Guest View","jetpack"))))),(0,o.createElement)("div",{className:U,ref:O},(z||r)&&1===N&&(0,o.createElement)(g.Z,a()({},e,{plans:m,selectedPlanId:e.attributes.selectedPlanId,onSelected:F,getPlanDescription:function(e){const t=(0,d.ZP)(parseFloat(e.price),e.currency);return"1 month"===e.interval?(0,l.sprintf)(// translators: %s: amount
34
  __("%s / month","jetpack"),t):"1 year"===e.interval?(0,l.sprintf)(// translators: %s: amount
35
  __("%s / year","jetpack"),t):"one-time"===e.interval?t:(0,l.sprintf)(// translators: %s: amount, plan interval
36
+ __("%1$s / %2$s","jetpack"),t,e.interval)}})),(z||r)&&1===N&&(0,o.createElement)(b.Z,a()({},e,{savePlan:D,siteSlug:M})),!!e.attributes.selectedPlanId&&!m.find((t=>t.id===e.attributes.selectedPlanId))&&(0,o.createElement)(_.Z,null),(0,o.createElement)(v.Z.Provider,{value:{selectedTab:t}},(0,o.createElement)(f.Z,null)))):(0,o.createElement)("div",{className:U,ref:O},(0,o.createElement)(i.Placeholder,{icon:"lock",label:__("Premium Content","jetpack"),instructions:__("Loading data…","jetpack")},(0,o.createElement)(i.Spinner,null)))}function x(e,t){e.createErrorNotice(t,{type:"snackbar"})}t.Z=(0,c.compose)([(0,u.withSelect)((e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}})),(0,u.withDispatch)(((e,t)=>{const n=e("core/block-editor"),r=e("core/notices");return{selectBlock(){n.selectBlock(t.clientId)},createErrorNotice:r.createErrorNotice,createSuccessNotice:r.createSuccessNotice}}))])((function(e){return(0,o.createElement)(i.Disabled.Consumer,null,(t=>{var n;return(0,o.createElement)(S,a()({},e,{attributes:{...e.attributes,isPreview:t||(null===(n=e.attributes)||void 0===n?void 0:n.isPreview)}}))}))}))},98034:function(e,t,n){"use strict";n.d(t,{u:function(){return m},X:function(){return h}});var r=n(65736),a=n(4981),o=n(86633),i=n(77940),s=n(83169),l=n(47322),c=n(34411),u=n(24653);const __=r.__,_x=r._x,p=["core/nextpage","core/spacer","core/separator","core/more","core/loginout","core/post-navigation-link"],d=e=>{if(e.some(c.W))return!1;if((0,c.H)(e[0]))return!1;return!e.every((e=>p.includes(e.name)))},m="premium-content/container",h={title:__("Premium Content","jetpack"),description:__("Restrict access to your content for paying subscribers.","jetpack"),icon:l.Z,category:"grow",keywords:[_x("paywall","keyword","jetpack"),_x("paid","keyword","jetpack"),_x("subscribe","keyword","jetpack"),_x("membership","keyword","jetpack")],attributes:{newPlanName:{type:"string",default:__("Monthly Subscription","jetpack")},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0},isPreview:{type:"boolean",default:!1},isPremiumContentChild:{type:"bool",default:!0}},edit:o.Z,save:i.Z,providesContext:{"premium-content/planId":"selectedPlanId","premium-content/isPreview":"isPreview",isPremiumContentChild:"isPremiumContentChild"},supports:{html:!1},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>!e.some((e=>e.isPremiumContentChild))&&(void 0===t||d(t)),__experimentalConvert(e){if(!d(e))return;const t=e.map((e=>(0,a.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,a.createBlock)("premium-content/container",{},[(0,a.createBlock)("premium-content/subscriber-view",{},t),(0,a.createBlock)("premium-content/logged-out-view")])}}],to:[{type:"block",blocks:["core/group"],transform:(e,t)=>(0,u.e)(t)}]},deprecated:[s.Z]}},93068:function(e,t,n){"use strict";var r=n(25905),a=n(9109);t.Z=[r.Z,a.Z]},25905:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(52175);t.Z={attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:e=>{let{buttonClasses:t}=e;return!!t},migrate:(e,t)=>{if(Array.isArray(t))for(let n=0;n<t.length;n++)if(t[n].name&&"premium-content/buttons"===t[n].name)return[e,[...t]];const n=(0,a.createBlock)("premium-content/buttons",{},[(0,a.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),(0,a.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[...t,n]]},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},(0,r.createElement)(o.InnerBlocks.Content,null))}},9109:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"})}},43279:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(52175),o=n(65736),i=n(2963);const __=o.__;function s(){return(0,r.createElement)(i.Z.Consumer,null,(e=>{let{selectedTab:t,stripeNudge:n}=e;return(0,r.createElement)("div",{hidden:"premium"===t.id,className:t.className},n,(0,r.createElement)(a.InnerBlocks,{templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscribe to get access","jetpack"),level:3}],["core/paragraph",{content:__("Read more of this content when you subscribe today.","jetpack")}],["premium-content/buttons"]]}))}))}},76883:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(43279),a=n(54222),o=n(93068),i=n(47322),s=n(94333),l=n(9818),c=n(65736),u=n(72629);const __=c.__,p="premium-content/logged-out-view",d={title:__("Guest View","jetpack"),description:__("The container for all content shown to site visitors who are not subscribers.","jetpack"),icon:i.Z,category:"grow",parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:r.Z,save:a.Z,deprecated:o.Z},m=(0,l.subscribe)((()=>{const e=(0,l.select)("core/rich-text").getFormatType("core/link");if(!e)return;m(),(0,u.unregisterFormatType)("core/link");const t=(0,s.compose)((0,l.withSelect)((e=>({selectedBlock:e("core/block-editor").getSelectedBlock()}))),(0,s.ifCondition)((e=>e.selectedBlock&&e.selectedBlock.name!==p)))(e.edit);(0,u.registerFormatType)("core/link",{...e,edit:t})}))},54222:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},43110:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}}},19398:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(9818),s=n(52175);const __=o.__,l="web"===r.Platform.OS;const c=e=>{if(!(0,a.isObject)(e))return e;const t=(0,a.pickBy)((0,a.mapValues)(e,c),a.identity);return(0,a.isEqual)(t,{})?void 0:t};function u(e){let{settings:t,clientId:n,enableContrastChecking:a=!0}=e;const{getComputedStyle:o,Node:i}=window,[c,u]=(0,r.useState)(),[p,d]=(0,r.useState)(),m=l?__("Color settings","jetpack"):__("Color Settings","jetpack",0);return(0,r.useEffect)((()=>{if(l&&!a)return;const e=function(e){return document.getElementById("block-"+e)}(n);if(!e)return;d(o(e).color);let t=e,r=o(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===i.ELEMENT_NODE;)t=t.parentNode,r=o(t).backgroundColor;u(r)})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(s.__experimentalPanelColorGradientSettings,{title:m,initialOpen:!1,settings:t},l&&a&&(0,r.createElement)(s.ContrastChecker,{backgroundColor:c,textColor:p})))}t.Z=function(e){var t,n,a;const{attributes:o}=e,{colors:l,gradients:p}=(0,i.useSelect)((e=>e("core/block-editor").getSettings()),[]),d=(0,r.useRef)(o);(0,r.useEffect)((()=>{d.current=o}),[o]);const{style:m,textColor:h,backgroundColor:f,gradient:g}=o;let b;var v;b=g?(0,s.getGradientValueBySlug)(p,g):null==m||null===(v=m.color)||void 0===v?void 0:v.gradient;const k=t=>n=>{var r,a;const o=(0,s.getColorObjectByColorValue)(l,n),i=t+"Color",u={...d.current.style,color:{...null===(r=d.current)||void 0===r||null===(a=r.style)||void 0===a?void 0:a.color,[t]:null!=o&&o.slug?void 0:n}},p=null!=o&&o.slug?o.slug:void 0,m={style:c(u),[i]:p};e.setAttributes(m),d.current={...d.current,...m}};return(0,r.createElement)(u,{enableContrastChecking:!(g||null!=m&&null!==(t=m.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[{label:__("Text Color","jetpack"),onColorChange:k("text"),colorValue:(0,s.getColorObjectByAttributeValues)(l,h,null==m||null===(n=m.color)||void 0===n?void 0:n.text).color},{label:__("Background Color","jetpack"),onColorChange:k("background"),colorValue:(0,s.getColorObjectByAttributeValues)(l,f,null==m||null===(a=m.color)||void 0===a?void 0:a.background).color,gradientValue:b,onGradientChange:t=>{const n=(0,s.getGradientSlugByValue)(p,t);let r;if(n){var a,o,i;const e={...null===(a=d.current)||void 0===a?void 0:a.style,color:{...null===(o=d.current)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.color,gradient:void 0}};r={style:c(e),gradient:n}}else{var l,u,m;const e={...null===(l=d.current)||void 0===l?void 0:l.style,color:{...null===(u=d.current)||void 0===u||null===(m=u.style)||void 0===m?void 0:m.color,gradient:t}};r={style:c(e),gradient:void 0}}e.setAttributes(r),d.current={...d.current,...r}}}]})}},97209:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(89105),a=n.n(r),o=n(52175);function i(e){var t,n,r,i,s,l,c,u,p,d;const{backgroundColor:m,textColor:h,gradient:f,style:g}=e,b=(0,o.getColorClassName)("background-color",m),v=(0,o.__experimentalGetGradientClass)(f),k=(0,o.getColorClassName)("color",h),y=a()(k,v,{[b]:!(null!=g&&null!==(t=g.color)&&void 0!==t&&t.gradient||!b),"has-text-color":h||(null==g||null===(n=g.color)||void 0===n?void 0:n.text),"has-background":m||(null==g||null===(r=g.color)||void 0===r?void 0:r.background)||f||(null==g||null===(i=g.color)||void 0===i?void 0:i.gradient)});return{className:y||void 0,style:null!=g&&null!==(s=g.color)&&void 0!==s&&s.background||null!=g&&null!==(l=g.color)&&void 0!==l&&l.text||null!=g&&null!==(c=g.color)&&void 0!==c&&c.gradient?{background:null!=g&&null!==(u=g.color)&&void 0!==u&&u.gradient?g.color.gradient:void 0,backgroundColor:null!=g&&null!==(p=g.color)&&void 0!==p&&p.background?g.color.background:void 0,color:null!=g&&null!==(d=g.color)&&void 0!==d&&d.text?g.color.text:void 0}:{}}}},48186:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(65736),l=n(97209);const __=s.__;t.Z={attributes:{text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},save:e=>{let{attributes:t}=e;const{borderRadius:n,text:a}=t,s=(0,l.Z)(t),c=o()("wp-block-button__link",s.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...s.style};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:c,style:u,value:a}))}}},87909:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(19398),u=n(97209);const __=i.__;function p(e){let{borderRadius:t="",setAttributes:n}=e;const a=(0,r.useCallback)((e=>{n({borderRadius:e})}),[n]);return(0,r.createElement)(s.PanelBody,{title:__("Border settings","jetpack")},(0,r.createElement)(s.RangeControl,{value:t,label:__("Border radius","jetpack"),min:0,max:50,initialPosition:5,allowReset:!0,onChange:a}))}t.Z=function(e){const{attributes:t,setAttributes:n,className:a}=e,{borderRadius:i,text:s}=t,d=(0,u.Z)(t),m=(0,l.useBlockProps)({className:"wp-block-button"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",m,(0,r.createElement)(l.RichText,{placeholder:__("Add text…","jetpack"),value:s,onChange:e=>n({text:e}),withoutInteractiveFormatting:!0,className:o()(a,"wp-block-button__link",d.className,{"no-border-radius":0===i}),style:{borderRadius:i?i+"px":void 0,...d.style}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.Z,e),(0,r.createElement)(p,{borderRadius:i,setAttributes:n})))}},37436:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(25389),a=n(65736),o=n(87909),i=n(54662),s=n(43110),l=n(48186);const __=a.__,c="premium-content/login-button",u={title:__("Premium Content login button","jetpack"),description:__("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","jetpack"),category:"grow",attributes:s.Z,icon:r.Z,keywords:[__("link","jetpack")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],edit:o.Z,save:i.Z,deprecated:[l.Z]}},54662:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(97209);function l(e){let{attributes:t}=e;const{borderRadius:n,text:a,align:l}=t,c=(0,s.Z)(t),u=o()("wp-block-button","wp-block-premium-content-login-button",{alignleft:"left"===l},{aligncenter:"center"===l},{alignright:"right"===l}),p=o()("wp-block-button__link",c.className,{"no-border-radius":0===n}),d={borderRadius:n?n+"px":void 0,...c.style},m=i.useBlockProps.save({className:u});return(0,r.createElement)("div",m,(0,r.createElement)(i.RichText.Content,{tagName:"a",className:p,style:d,value:a}))}},77940:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-container"},(0,r.createElement)(a.InnerBlocks.Content,null))}},37915:function(e,t,n){"use strict";var r=n(54682);t.Z=[r.Z]},54682:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view"})}},6627:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(65736),i=n(9818),s=n(94333),l=n(2963);const __=o.__;t.Z=(0,s.compose)([(0,i.withSelect)(((e,t)=>({hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length})))])((function(e){let{hasInnerBlocks:t}=e;return(0,r.createElement)(l.Z.Consumer,null,(e=>{let{selectedTab:n,stripeNudge:o}=e;return(0,r.createElement)("div",{hidden:"wall"===n.id,className:n.className},o,(0,r.createElement)(a.InnerBlocks,{renderAppender:!t&&a.InnerBlocks.ButtonBlockAppender,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscriber Content","jetpack"),level:3}],["core/paragraph",{content:__("Add content here that will only be visible to your subscribers.","jetpack")}]]}))}))}))},24720:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(6627),a=n(2718),o=n(37915),i=n(47322),s=n(65736);const __=s.__,l="premium-content/subscriber-view",c={title:__("Subscriber View","jetpack"),description:__("The container for all content shown to subscribers.","jetpack"),icon:i.Z,category:"grow",attributes:{},edit:r.Z,save:a.Z,parent:["premium-content/container"],supports:{inserter:!1,html:!1},deprecated:o.Z}},2718:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},96440:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(55609),l=n(39630);const __=o.__,c=e=>{let{id:t,setRating:n,children:a}=e;return(0,r.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(o=t,e=>{let{keyCode:t}=e;return t===l.ENTER?n(o):null}),onClick:(e=>()=>n(e))(t)},a);var o};t.Z=e=>function(t){let{className:n,setAttributes:o,attributes:{align:l,color:u,rating:p,maxRating:d}}=t;const m=e=>{e===p?Math.ceil(p)===p&&(e-=.5):.5===p&&1===e&&(e=0),o({rating:e})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(i.AlignmentToolbar,{value:l,onChange:e=>o({align:e})})),(0,r.createElement)("div",{className:n,style:{textAlign:l}},(0,a.range)(1,d+1).map((t=>(0,r.createElement)(c,{key:t,id:t,setRating:m},(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t-.5?null:"is-rating-unfilled",color:u})),(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t?null:"is-rating-unfilled",color:u})))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.RangeControl,{label:__("Highest rating","jetpack"),value:d,onChange:e=>o({maxRating:e}),min:2,max:10}),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:u,onChange:e=>o({color:e}),label:__("Color","jetpack")}]}))))}},9615:function(e,t,n){"use strict";n.d(t,{d:function(){return o},r:function(){return i}});var r=n(69307),a=n(55609);const o=()=>(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})),i=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),n=(e=>e&&e.className?e.className:"")(e);return(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,r.createElement)(a.Path,{className:n,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"}))}},84807:function(e,t,n){"use strict";n.d(t,{u:function(){return l},X:function(){return c}});var r=n(65736),a=n(96440),o=n(2027),i=n(9615),s=n(57535);const __=r.__,_x=r._x,l="rating-star",c={title:__("Star Rating","jetpack"),description:__("Rate movies, books, songs, recipes — anything you can put a number on.","jetpack"),icon:{src:i.d,foreground:(0,s.m)()},keywords:[_x("star","block search term","jetpack"),_x("rating","block search term","jetpack"),_x("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:_x("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:_x("Outlined","block style","jetpack")}],attributes:{rating:{type:"number",default:1},maxRating:{type:"number",default:5},color:{type:"string"},align:{type:"string",default:"left"}},edit:(0,a.Z)(i.r),save:(0,o.Z)("★")}},2027:function(e,t,n){"use strict";var r=n(69307),a=n(92819);t.Z=e=>function(t){let{className:n,attributes:{align:o,rating:i,color:s}}=t;return(0,r.createElement)("figure",{className:n,style:{textAlign:o}},(0,a.range)(1,i+1).map((t=>(0,r.createElement)("span",{key:t,style:{color:s}},e))))}},79642:function(e,t,n){"use strict";n.d(t,{G:function(){return u},J:function(){return p}});var r=n(69307),a=n(65736),o=n(55609),i=n(4096),s=n(51591),l=n(48721),c=n(37930);const __=a.__;function u(e){let{attributes:{planId:t},products:n,setMembershipAmount:a}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Payment plan","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Payment plan","jetpack"),value:t,onChange:e=>a(e),options:n.map((e=>({label:(0,l.C)(e),value:e.id,key:e.id})))})),(0,r.createElement)(o.PanelBody,{title:__("Management","jetpack")},(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,i.lQ)()}`},__("See your earnings, subscriber list, and payment plans.","jetpack"))))}function p(e){let{connected:t,connectURL:n,hasUpgradeNudge:a,shouldUpgrade:i}=e;const{autosaveAndRedirect:l}=(0,c.Z)(n);return(0,r.createElement)(r.Fragment,null,!a&&!i&&!t&&(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{icon:s.Pw,onClick:l,className:"connect-stripe components-tab-button"},__("Connect Stripe","jetpack"))))}},2235:function(e,t,n){"use strict";var r=n(92819),a=n(4981);const o=["submitButtonText","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{planId:{type:"integer"},submitButtonText:{type:"string"},submitButtonClasses:{type:"string"},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},align:{type:"string"}},migrate:e=>{const t=(0,r.omit)(e,o),n={text:(i=e).submitButtonText,textColor:i.textButtonColor,customTextColor:i.customTextButtonColor,backgroundColor:i.backgroundButtonColor,customBackgroundColor:i.customBackgroundButtonColor};var i;return[t,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"recurring-payments-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,o),Boolean),save:()=>null}},39035:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(86989),c=n.n(l),u=n(65736),p=n(78850),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(92694),b=n(4096),v=n(17882),k=n(2368),y=n(82163),E=n(79642),w=n(48721);const __=u.__;class _ extends o.Component{constructor(){super(...arguments),a()(this,"componentDidMount",(()=>{this.apiCall()})),a()(this,"onError",(e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)})),a()(this,"apiCall",(()=>{const e={path:"/wpcom/v2/memberships/status",method:"GET"};c()(e).then((e=>{if(e.errors&&Object.values(e.errors)&&Object.values(e.errors)[0][0])return this.setState({connected:null,connectURL:2}),void this.onError(Object.values(e.errors)[0][0]);const{connect_url:t,products:n,should_upgrade_to_access_memberships:r,upgrade_url:a}=e,o=e.connected_account_id?1:2;this.setState({connected:o,connectURL:t,shouldUpgrade:r,upgradeURL:a,products:(0,y.ME)(n)})}),(e=>{this.setState({connected:2,connectURL:null}),this.onError(e.message)}))})),a()(this,"handleCurrencyChange",(e=>{let t=this.state.editedProductPrice;(0,v.vs)(e,t)||(t=(0,w.w)((0,v.hj)(e),e)),this.setState({editedProductCurrency:e,editedProductPrice:t,editedProductPriceValid:!0})})),a()(this,"handleRenewIntervalChange",(e=>this.setState({editedProductRenewInterval:e}))),a()(this,"handlePriceChange",(e=>{const t=parseFloat(e),n=(0,v.vs)(this.state.editedProductCurrency,t);this.setState({editedProductPrice:t,editedProductPriceValid:n})})),a()(this,"handleTitleChange",(e=>this.setState({editedProductTitle:e,editedProductTitleValid:e.length>0}))),a()(this,"saveProduct",(()=>{if(!this.state.editedProductTitle||0===this.state.editedProductTitle.length)return void this.setState({editedProductTitleValid:!1});if(!this.state.editedProductPrice||!(0,v.vs)(this.state.editedProductCurrency,this.state.editedProductPrice))return void this.setState({editedProductPriceValid:!1});this.setState({addingMembershipAmount:2});const e={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:this.state.editedProductCurrency,price:this.state.editedProductPrice,title:this.state.editedProductTitle,interval:this.state.editedProductRenewInterval}};c()(e).then((e=>{this.setState({addingMembershipAmount:0,products:this.state.products.concat([{id:e.id,title:e.title,interval:e.interval,price:e.price,currency:e.currency}])}),this.setMembershipAmount(e.id)}),(e=>{this.setState({addingMembershipAmount:1}),this.onError(e.message)}))})),a()(this,"renderAddMembershipAmount",(e=>{if(0===this.state.addingMembershipAmount&&!e)return(0,o.createElement)(h.Button,{isPrimary:!0,isLarge:!0,onClick:()=>this.setState({addingMembershipAmount:1})},__("Add a payment plan","jetpack"));if(2===this.state.addingMembershipAmount)return;const t=(0,p.ZP)((0,v.hj)(this.state.editedProductCurrency),this.state.editedProductCurrency),n=(0,u.sprintf)(
37
  /* translators: placeholder is a price. */
38
  __("Minimum allowed price is %s.","jetpack"),t);return(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"membership-button__price-container"},(0,o.createElement)(h.SelectControl,{className:"membership-button__field membership-button__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:v.Xy,value:this.state.editedProductCurrency}),(0,o.createElement)("div",{className:"membership-membership-button__field membership-button__field-price"},(0,o.createElement)(h.TextControl,{label:__("Price","jetpack"),className:s()({"membership-button__field-error":!this.state.editedProductPriceValid}),onChange:this.handlePriceChange,placeholder:t,required:!0,min:"0",step:"1",type:"number",value:this.state.editedProductPrice||""}),(0,o.createElement)("p",null,n))),(0,o.createElement)(h.TextControl,{className:s()({"membership-button__field":!0,"membership-button__field-error":!this.state.editedProductTitleValid}),label:__("Describe your subscription in a few words","jetpack"),onChange:this.handleTitleChange,placeholder:__("Subscription description","jetpack"),value:this.state.editedProductTitle}),(0,o.createElement)(h.SelectControl,{label:__("Renew interval","jetpack"),onChange:this.handleRenewIntervalChange,options:[{label:__("Monthly","jetpack"),value:"1 month"},{label:__("Yearly","jetpack"),value:"1 year"},{label:__("One-Time Payment","jetpack"),value:"one-time"}],value:this.state.editedProductRenewInterval}),(0,o.createElement)("div",null,(0,o.createElement)(h.Button,{isPrimary:!0,isLarge:!0,className:"membership-button__field-button membership-button__add-amount",onClick:this.saveProduct},__("Add this payment plan","jetpack")),(0,o.createElement)(h.Button,{isLarge:!0,className:"membership-button__field-button",onClick:()=>this.setState({addingMembershipAmount:0})},__("Cancel","jetpack"))))})),a()(this,"getFormattedPriceByProductId",(e=>{const t=this.state.products.filter((t=>parseInt(t.id)===parseInt(e))).pop();return(0,p.ZP)(parseFloat(t.price),t.currency)})),a()(this,"setMembershipAmount",(e=>{const{innerButtons:t,updateBlockAttributes:n,setAttributes:r}=this.props,a=this.props.attributes.planId,o=(0,u.sprintf)(
39
  /* translators: placeholder is an amount of money. */
45
  /* translators: placeholder is a price. */
46
  __("%s / year","jetpack"),t):"one-time"===e.interval?t:(0,r.sprintf)(
47
  /* translators: %1$s is a price, %2$s is a period (1 year for example) */
48
+ __("%1$s / %2$s","jetpack"),t,e.interval)}},14823:function(e,t,n){"use strict";n.d(t,{Hj:function(){return i},AP:function(){return s}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{attributes:t,setAttributes:n}=e;const{displayContext:a,displayDate:i,displayThumbnails:s,postsToShow:l}=t;return(0,r.createElement)(o.PanelBody,{title:__("Related Posts Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display thumbnails","jetpack"),checked:s,onChange:e=>n({displayThumbnails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display date","jetpack"),checked:i,onChange:e=>n({displayDate:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:a,onChange:e=>n({displayContext:e})}),(0,r.createElement)(o.RangeControl,{label:__("Number of posts","jetpack"),value:l,onChange:e=>n({postsToShow:Math.min(e,6)}),min:1,max:6}))}function s(e){let{attributes:t,setAttributes:n}=e;const{postLayout:a}=t,i=[{icon:"grid-view",title:__("Grid View","jetpack"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===a},{icon:"list-view",title:__("List View","jetpack"),onClick:()=>n({postLayout:"list"}),isActive:"list"===a}];return(0,r.createElement)(o.ToolbarGroup,{controls:i})}},31759:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(92819),l=n(9818),c=n(94333),u=n(14823);const __=a.__;function p(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link"},e.isInSiteEditor?__("Preview unavailable in site editor.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")),e.displayThumbnails&&(0,r.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack")},(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200"},(0,r.createElement)("title",null,__("Grey square","jetpack")),(0,r.createElement)(i.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("title",null,__("Icon for image","jetpack")),(0,r.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}))),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},__("August 3, 2018","jetpack")),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},__("In “Uncategorized”","jetpack")))}function d(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank"},e.post.title),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,r.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},(0,r.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},e.post.context))}function m(e){const t="jp-related-posts-i2__row";let n=0;const a=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:n=2;break;default:n=3}return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(0,n).length},e.posts.slice(0,n)),a&&(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(n).length},e.posts.slice(n)))}class h extends r.Component{render(){const{attributes:e,className:t,posts:n,setAttributes:a,instanceId:i,isInSiteEditor:s}=this.props,{displayContext:l,displayDate:c,displayThumbnails:h,postLayout:f,postsToShow:g}=e,b="jp-relatedposts-i2",v=[];for(let e=0;e<g;e++)n[e]?v.push((0,r.createElement)(d,{id:`related-posts-${i}-post-${e}`,key:b+"-"+e,post:n[e],displayThumbnails:h,displayDate:c,displayContext:l})):v.push((0,r.createElement)(p,{id:`related-posts-${i}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:h,displayDate:c,displayContext:l,isInSiteEditor:s}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(u.Hj,{attributes:e,setAttributes:a})),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u.AP,{attributes:e,setAttributes:a})),(0,r.createElement)("div",{className:t,id:`related-posts-${i}`},(0,r.createElement)("div",{className:b,"data-layout":f},(0,r.createElement)(m,{posts:v}))))}}t.ZP=(0,c.compose)(c.withInstanceId,(0,l.withSelect)((e=>{const{getCurrentPost:t}=e("core/editor"),n=t();return{posts:(0,s.get)(n,"jetpack-related-posts",[]),isInSiteEditor:(0,s.isEmpty)(n)}})))(h)},32051:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(31759),s=n(57535);const __=a.__,_x=a._x,l="related-posts",c=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},(0,r.createElement)(o.Path,{d:"M4,4 L4,19 M4,4 L19,4 M4,9 L19,9 M4,14 L19,14 M4,19 L19,19 M9,4 L9,19 M19,4 L19,19"}))),u={title:__("Related Posts","jetpack"),icon:{src:c,foreground:(0,s.m)()},category:"embed",keywords:[_x("similar content","block search term","jetpack"),_x("linked","block search term","jetpack"),_x("connected","block search term","jetpack")],attributes:{postLayout:{type:"string",default:"grid"},displayDate:{type:"boolean",default:!0},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},postsToShow:{type:"number",default:3}},supports:{html:!1,multiple:!1,reusable:!1,color:{gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},edit:i.ZP,save:()=>null,example:{attributes:{postLayout:"grid",displayDate:!0,displayThumbnails:!0,displayContext:!1,postsToShow:2}}}},35978:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(9818),u=n(89105),p=n.n(u),d=n(46314),m=n(57368);const __=i.__,_n=i._n,h=[{value:d.FV,label:__("Show after threshold","jetpack")},{value:d.Am,label:__("Show before threshold","jetpack")}];class f extends o.Component{constructor(){super(...arguments),a()(this,"state",{isThresholdValid:!0}),a()(this,"setCriteria",(e=>this.props.setAttributes({criteria:e}))),a()(this,"setThreshold",(e=>{if(/^\d+$/.test(e)&&+e>0)return this.props.setAttributes({threshold:+e}),void this.setState({isThresholdValid:!0});this.setState({isThresholdValid:!1})}))}getNoticeLabel(){return this.props.attributes.criteria===d.FV?1===this.props.attributes.threshold?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,i.sprintf)(
49
  /* translators: placeholder is a number. */
50
  _n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold):1===this.props.attributes.threshold?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,i.sprintf)(
51
  /* translators: placeholder is a number. */
52
+ _n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold)}render(){return(0,o.createElement)("div",{className:p()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,o.createElement)(s.Placeholder,{icon:m.qv,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,o.createElement)(s.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,o.createElement)(s.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:h,onChange:this.setCriteria})),(0,o.createElement)(s.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,o.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,o.createElement)(l.InnerBlocks,null)))}}t.Z=(0,c.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(f)},42860:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.InnerBlocks.Content,null)))}},46314:function(e,t,n){"use strict";n.d(t,{FV:function(){return r},Am:function(){return a},Kv:function(){return o}});const r="after-visits",a="before-visits",o=3},57368:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},qv:function(){return h},Xd:function(){return f}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(41632),l=n(35978),c=n(42860),u=n(46314),p=n(57535);const __=a.__,_x=a._x,d={attributes:{criteria:{type:"string",default:u.FV},threshold:{type:"number",default:u.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(i.InnerBlocks.Content,null))}},m="repeat-visitor",h=(0,s.Z)((0,r.createElement)(o.Path,{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),f={attributes:{criteria:{type:"string",default:u.FV},threshold:{type:"number",default:u.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:h,foreground:(0,p.m)()},keywords:[_x("return","block search term","jetpack"),_x("visitors","block search term","jetpack"),_x("visibility","block search term","jetpack")],supports:{align:["wide","full"],html:!1},title:__("Repeat Visitor","jetpack"),edit:l.Z,save:c.Z,example:{attributes:{criteria:u.FV,threshold:u.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]},deprecated:[d]}},92826:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={revueUsername:{type:"string"},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0}}},26246:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(4981),i=n(65736);const _x=i._x,__=i.__,s=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius","gradient","customGradient"];t.Z={attributes:{revueUsername:{type:"string"},text:{type:"string",default:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},migrate:e=>{const t=(0,a.omit)(e,s),n=(0,a.pick)(e,s);return[t,[(0,o.createBlock)("jetpack/button",{element:"button",text:n.text||"Subscribe",...n})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,s),Boolean),save:e=>{let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)("a",{href:n},n))}}},55380:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(92819),o=n(4096),i=n(52175),s=n(55609),l=n(65736),c=n(8223),u=n(92826),p=n(80500),d=n(93641),m=n(14087);const __=l.__;function h(e){let{attributes:t,className:n,setAttributes:l}=e;(0,r.useEffect)((()=>{const e=(0,m.S)(u.Z,t);(0,a.isEqual)(e,t)||l(e)}),[t,l]);const{revueUsername:h,emailLabel:f,emailPlaceholder:g,firstNameLabel:b,firstNamePlaceholder:v,firstNameShow:k,lastNameLabel:y,lastNamePlaceholder:E,lastNameShow:w}=t,[_,C]=(0,r.useState)("");(0,r.useEffect)((()=>{!_&&h&&C(h)}),[]);const j=(0,o.Wp)()||(0,o.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/revue-block/":"https://jetpack.com/support/jetpack-blocks/revue-block/";return(0,r.createElement)("div",{className:n},!h&&(0,r.createElement)(s.Placeholder,{icon:d.Z,instructions:__("Enter your Revue username.","jetpack"),label:__("Revue","jetpack")},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),l({revueUsername:_.trim()})}},(0,r.createElement)("input",{className:"components-placeholder__input",onChange:e=>C(e.target.value.trim()),placeholder:__("Enter your Revue username here…","jetpack"),type:"text",value:_}),(0,r.createElement)("div",null,(0,r.createElement)(s.Button,{disabled:!_,isDefault:!0,isLarge:!0,isSecondary:!0,type:"submit"},__("Add Form","jetpack")))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(s.ExternalLink,{href:j},__("Need help finding your Revue username?","jetpack")))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{label:__("Show first name field.","jetpack"),checked:k,onChange:()=>l({firstNameShow:!k})}),(0,r.createElement)(s.ToggleControl,{label:__("Show last name field.","jetpack"),checked:w,onChange:()=>l({lastNameShow:!w})}),(0,r.createElement)(s.TextControl,{label:__("Revue Username","jetpack"),onChange:e=>{C(e.trim()),l({revueUsername:e.trim()})},value:h}))),(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:f,labelFieldName:"emailLabel",required:!0,setAttributes:l}),onChange:e=>l({emailPlaceholder:e}),placeholder:g,value:g}),k&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:b,labelFieldName:"firstNameLabel",setAttributes:l}),onChange:e=>l({firstNamePlaceholder:e}),placeholder:v,value:v}),w&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:y,labelFieldName:"lastNameLabel",setAttributes:l}),onChange:e=>l({lastNamePlaceholder:e}),placeholder:E,value:E}),(0,r.createElement)(i.InnerBlocks,{template:[[c.Ss.name,c.Ss.attributes]],templateLock:"all"})))}},93641:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,{fillRule:"nonzero"},(0,r.createElement)(a.Path,{d:"M16.8452322,23.2301186 C13.9471277,22.2565366 12.0226052,20.2188069 10.6188359,16.5961763 C10.2565728,15.6225943 9.87166831,14.4905223 9.80374399,14.1056178 C9.66789534,13.4037331 9.6452539,13.3810917 8.96601067,13.6075061 C7.8792215,13.9697691 7.76601429,14.1282592 7.35846835,15.758443 C6.724508,18.2490015 6.45281071,18.7244718 5.56979451,18.8829619 C5.09432424,18.9735276 4.5735711,18.9282447 4.27923236,18.7697547 C3.84904498,18.5433402 3.8037621,18.3848502 3.93961075,17.501834 C4.00753507,16.9584394 4.41508101,15.3056142 4.82262695,13.8339205 C5.8414918,10.2792143 6.11318909,8.98865211 6.29432062,7.1094125 C6.43016927,5.63771883 6.47545215,5.50187018 7.08677106,5.20753145 C7.92450438,4.79998551 8.80752058,5.09432424 9.19242508,5.88677468 C9.44148093,6.38488639 9.39619805,6.90563953 8.96601067,8.98865211 C8.67167193,10.3924215 8.51318185,11.5244935 8.62638905,11.5244935 C9.12450076,11.5244935 11.2754377,10.2565728 12.0452467,9.50940525 C13.8339205,7.83393861 14.2641079,5.77356748 13.2905259,3.82640354 C12.5886412,2.4226342 11.6150593,1.94716393 9.78110255,2.08301258 C6.97356385,2.28678555 4.43772245,4.25659092 3.01131166,7.35846835 C2.21886123,9.05657643 2.19621978,9.07921787 1.49433511,8.94336923 C-1.74339096,8.28676744 0.63396035,3.39621616 5.29809721,1.19999638 C8.39997464,-0.294338734 11.5018521,-0.362263057 14.0829764,0.950940525 C17.0716466,2.51319996 18.0225871,5.93205756 16.2791961,8.96601067 C15.5999529,10.1433656 14.2641079,11.3886449 12.9509043,12.0678881 C12.5433584,12.2716611 12.2037367,12.5207169 12.2037367,12.6339241 C12.2037367,12.9509043 13.2678845,15.9395745 13.6301475,16.6641006 C14.3093908,17.9773042 16.2339133,19.8112609 17.4565511,20.377297 C18.8829619,21.0112573 21.4640861,21.0791816 23.0263456,20.5131456 L23.9772861,20.1508826 L23.9772861,20.7169186 C23.9772861,21.5320105 23.3433258,22.3471023 22.3018195,22.8904969 C21.147106,23.4791744 18.1584357,23.6603059 16.8452322,23.2301186 Z"})))},8223:function(e,t,n){"use strict";n.d(t,{Ss:function(){return u},u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(92826),o=n(26246),i=n(55380),s=n(93641),l=n(57535),c=n(12628);const __=r.__,_x=r._x,u={name:"jetpack/button",attributes:{element:"button",text:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")}},p="revue",d={title:__("Revue","jetpack"),description:__("Add a subscription form for your Revue newsletter.","jetpack"),icon:{src:s.Z,foreground:(0,l.m)()},category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("mailing list","block search term","jetpack")],supports:{html:!1},attributes:a.Z,edit:i.Z,save:c.Z,example:{attributes:{revueUsername:"example"},innerBlocks:[u]},deprecated:[o.Z]}},12628:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null),(0,r.createElement)("a",{className:"wp-block-jetpack-revue__fallback",href:n},n))}},37161:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},93636:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(37161),l=n(1720),c=n(41632),u=n(57535);const __=a.__,_x=a._x,p="send-a-message",d={title:__("Send A Message","jetpack"),description:__("Let your visitors send you messages with the tap of a button.","jetpack"),icon:{src:(0,c.Z)((0,r.createElement)(i.Path,{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"})),foreground:(0,u.m)()},category:"grow",keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1},attributes:{},edit:s.Z,save:e=>(0,r.createElement)("div",{className:e.className},(0,r.createElement)(o.InnerBlocks.Content,null)),variations:l.Z,example:{}}},64566:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});const r=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲 +237",value:"237CM"},{code:"CV",label:"🇨🇻 +238",value:"238CV"},{code:"ST",label:"🇸🇹 +239",value:"239ST"},{code:"GQ",label:"🇬🇶 +240",value:"240GQ"},{code:"GA",label:"🇬🇦 +241",value:"241GA"},{code:"CG",label:"🇨🇬 +242",value:"242CG"},{code:"CD",label:"🇨🇩 +243",value:"243CD"},{code:"AO",label:"🇦🇴 +244",value:"244AO"},{code:"GW",label:"🇬🇼 +245",value:"245GW"},{code:"IO",label:"🇮🇴 +246",value:"246IO"},{code:"SC",label:"🇸🇨 +248",value:"248SC"},{code:"SD",label:"🇸🇩 +249",value:"249SD"},{code:"RW",label:"🇷🇼 +250",value:"250RW"},{code:"ET",label:"🇪🇹 +251",value:"251ET"},{code:"SO",label:"🇸🇴 +252",value:"252SO"},{code:"DJ",label:"🇩🇯 +253",value:"253DJ"},{code:"KE",label:"🇰🇪 +254",value:"254KE"},{code:"TZ",label:"🇹🇿 +255",value:"255TZ"},{code:"UG",label:"🇺🇬 +256",value:"256UG"},{code:"BI",label:"🇧🇮 +257",value:"257BI"},{code:"MZ",label:"🇲🇿 +258",value:"258MZ"},{code:"ZM",label:"🇿🇲 +260",value:"260ZM"},{code:"MG",label:"🇲🇬 +261",value:"261MG"},{code:"YT",label:"🇾🇹 +262",value:"262YT"},{code:"RE",label:"🇷🇪 +262",value:"262RE"},{code:"ZW",label:"🇿🇼 +263",value:"263ZW"},{code:"NA",label:"🇳🇦 +264",value:"264NA"},{code:"MW",label:"🇲🇼 +265",value:"265MW"},{code:"LS",label:"🇱🇸 +266",value:"266LS"},{code:"BW",label:"🇧🇼 +267",value:"267BW"},{code:"SZ",label:"🇸🇿 +268",value:"268SZ"},{code:"KM",label:"🇰🇲 +269",value:"269KM"},{code:"ZA",label:"🇿🇦 +27",value:"27ZA"},{code:"SH",label:"🇸🇭 +290",value:"290SH"},{code:"ER",label:"🇪🇷 +291",value:"291ER"},{code:"AW",label:"🇦🇼 +297",value:"297AW"},{code:"FO",label:"🇫🇴 +298",value:"298FO"},{code:"GL",label:"🇬🇱 +299",value:"299GL"},{code:"GR",label:"🇬🇷 +30",value:"30GR"},{code:"NL",label:"🇳🇱 +31",value:"31NL"},{code:"BE",label:"🇧🇪 +32",value:"32BE"},{code:"FR",label:"🇫🇷 +33",value:"33FR"},{code:"ES",label:"🇪🇸 +34",value:"34ES"},{code:"KY",label:"🇰🇾 +345",value:"345KY"},{code:"GI",label:"🇬🇮 +350",value:"350GI"},{code:"PT",label:"🇵🇹 +351",value:"351PT"},{code:"LU",label:"🇱🇺 +352",value:"352LU"},{code:"IE",label:"🇮🇪 +353",value:"353IE"},{code:"IS",label:"🇮🇸 +354",value:"354IS"},{code:"AL",label:"🇦🇱 +355",value:"355AL"},{code:"MT",label:"🇲🇹 +356",value:"356MT"},{code:"CY",label:"🇨🇾 +357",value:"357CY"},{code:"FI",label:"🇫🇮 +358",value:"358FI"},{code:"BG",label:"🇧🇬 +359",value:"359BG"},{code:"HU",label:"🇭🇺 +36",value:"36HU"},{code:"LT",label:"🇱🇹 +370",value:"370LT"},{code:"LV",label:"🇱🇻 +371",value:"371LV"},{code:"EE",label:"🇪🇪 +372",value:"372EE"},{code:"MD",label:"🇲🇩 +373",value:"373MD"},{code:"AM",label:"🇦🇲 +374",value:"374AM"},{code:"BY",label:"🇧🇾 +375",value:"375BY"},{code:"AD",label:"🇦🇩 +376",value:"376AD"},{code:"MC",label:"🇲🇨 +377",value:"377MC"},{code:"SM",label:"🇸🇲 +378",value:"378SM"},{code:"VA",label:"🇻🇦 +379",value:"379VA"},{code:"UA",label:"🇺🇦 +380",value:"380UA"},{code:"RS",label:"🇷🇸 +381",value:"381RS"},{code:"ME",label:"🇲🇪 +382",value:"382ME"},{code:"XK",label:"🇽🇰 +383",value:"383XK"},{code:"HR",label:"🇭🇷 +385",value:"385HR"},{code:"SI",label:"🇸🇮 +386",value:"386SI"},{code:"BA",label:"🇧🇦 +387",value:"387BA"},{code:"MK",label:"🇲🇰 +389",value:"389MK"},{code:"IT",label:"🇮🇹 +39",value:"39IT"},{code:"RO",label:"🇷🇴 +40",value:"40RO"},{code:"CH",label:"🇨🇭 +41",value:"41CH"},{code:"CZ",label:"🇨🇿 +420",value:"420CZ"},{code:"SK",label:"🇸🇰 +421",value:"421SK"},{code:"LI",label:"🇱🇮 +423",value:"423LI"},{code:"AT",label:"🇦🇹 +43",value:"43AT"},{code:"IM",label:"🇮🇲 +44",value:"44IM"},{code:"GG",label:"🇬🇬 +44",value:"44GG"},{code:"JE",label:"🇯🇪 +44",value:"44JE"},{code:"GB",label:"🇬🇧 +44",value:"44GB"},{code:"DK",label:"🇩🇰 +45",value:"45DK"},{code:"SE",label:"🇸🇪 +46",value:"46SE"},{code:"NO",label:"🇳🇴 +47",value:"47NO"},{code:"SJ",label:"🇸🇯 +47",value:"47SJ"},{code:"PL",label:"🇵🇱 +48",value:"48PL"},{code:"DE",label:"🇩🇪 +49",value:"49DE"},{code:"FK",label:"🇫🇰 +500",value:"500FK"},{code:"GS",label:"🇬🇸 +500",value:"500GS"},{code:"BZ",label:"🇧🇿 +501",value:"501BZ"},{code:"GT",label:"🇬🇹 +502",value:"502GT"},{code:"SV",label:"🇸🇻 +503",value:"503SV"},{code:"HN",label:"🇭🇳 +504",value:"504HN"},{code:"NI",label:"🇳🇮 +505",value:"505NI"},{code:"CR",label:"🇨🇷 +506",value:"506CR"},{code:"PA",label:"🇵🇦 +507",value:"507PA"},{code:"PM",label:"🇵🇲 +508",value:"508PM"},{code:"HT",label:"🇭🇹 +509",value:"509HT"},{code:"PE",label:"🇵🇪 +51",value:"51PE"},{code:"MX",label:"🇲🇽 +52",value:"52MX"},{code:"CU",label:"🇨🇺 +53",value:"53CU"},{code:"AR",label:"🇦🇷 +54",value:"54AR"},{code:"BR",label:"🇧🇷 +55",value:"55BR"},{code:"CL",label:"🇨🇱 +56",value:"56CL"},{code:"CO",label:"🇨🇴 +57",value:"57CO"},{code:"VE",label:"🇻🇪 +58",value:"58VE"},{code:"BL",label:"🇧🇱 +590",value:"590BL"},{code:"MF",label:"🇲🇫 +590",value:"590MF"},{code:"GP",label:"🇬🇵 +590",value:"590GP"},{code:"BO",label:"🇧🇴 +591",value:"591BO"},{code:"GY",label:"🇬🇾 +592",value:"592GY"},{code:"EC",label:"🇪🇨 +593",value:"593EC"},{code:"GF",label:"🇬🇫 +594",value:"594GF"},{code:"PY",label:"🇵🇾 +595",value:"595PY"},{code:"MQ",label:"🇲🇶 +596",value:"596MQ"},{code:"SR",label:"🇸🇷 +597",value:"597SR"},{code:"UY",label:"🇺🇾 +598",value:"598UY"},{code:"MY",label:"🇲🇾 +60",value:"60MY"},{code:"CC",label:"🇨🇨 +61",value:"61CC"},{code:"AU",label:"🇦🇺 +61",value:"61AU"},{code:"CX",label:"🇨🇽 +61",value:"61CX"},{code:"ID",label:"🇮🇩 +62",value:"62ID"},{code:"PH",label:"🇵🇭 +63",value:"63PH"},{code:"NZ",label:"🇳🇿 +64",value:"64NZ"},{code:"SG",label:"🇸🇬 +65",value:"65SG"},{code:"TH",label:"🇹🇭 +66",value:"66TH"},{code:"TL",label:"🇹🇱 +670",value:"670TL"},{code:"NF",label:"🇳🇫 +672",value:"672NF"},{code:"BN",label:"🇧🇳 +673",value:"673BN"},{code:"NR",label:"🇳🇷 +674",value:"674NR"},{code:"PG",label:"🇵🇬 +675",value:"675PG"},{code:"TO",label:"🇹🇴 +676",value:"676TO"},{code:"SB",label:"🇸🇧 +677",value:"677SB"},{code:"VU",label:"🇻🇺 +678",value:"678VU"},{code:"FJ",label:"🇫🇯 +679",value:"679FJ"},{code:"PW",label:"🇵🇼 +680",value:"680PW"},{code:"WF",label:"🇼🇫 +681",value:"681WF"},{code:"CK",label:"🇨🇰 +682",value:"682CK"},{code:"NU",label:"🇳🇺 +683",value:"683NU"},{code:"WS",label:"🇼🇸 +685",value:"685WS"},{code:"KI",label:"🇰🇮 +686",value:"686KI"},{code:"NC",label:"🇳🇨 +687",value:"687NC"},{code:"TV",label:"🇹🇻 +688",value:"688TV"},{code:"PF",label:"🇵🇫 +689",value:"689PF"},{code:"TK",label:"🇹🇰 +690",value:"690TK"},{code:"FM",label:"🇫🇲 +691",value:"691FM"},{code:"MH",label:"🇲🇭 +692",value:"692MH"},{code:"RU",label:"🇷🇺 +7",value:"7RU"},{code:"KZ",label:"🇰🇿 +77",value:"77KZ"},{code:"JP",label:"🇯🇵 +81",value:"81JP"},{code:"KR",label:"🇰🇷 +82",value:"82KR"},{code:"VN",label:"🇻🇳 +84",value:"84VN"},{code:"KP",label:"🇰🇵 +850",value:"850KP"},{code:"HK",label:"🇭🇰 +852",value:"852HK"},{code:"MO",label:"🇲🇴 +853",value:"853MO"},{code:"KH",label:"🇰🇭 +855",value:"855KH"},{code:"LA",label:"🇱🇦 +856",value:"856LA"},{code:"CN",label:"🇨🇳 +86",value:"86CN"},{code:"PN",label:"🇵🇳 +872",value:"872PN"},{code:"BD",label:"🇧🇩 +880",value:"880BD"},{code:"TW",label:"🇹🇼 +886",value:"886TW"},{code:"TR",label:"🇹🇷 +90",value:"90TR"},{code:"IN",label:"🇮🇳 +91",value:"91IN"},{code:"PK",label:"🇵🇰 +92",value:"92PK"},{code:"AF",label:"🇦🇫 +93",value:"93AF"},{code:"LK",label:"🇱🇰 +94",value:"94LK"},{code:"MM",label:"🇲🇲 +95",value:"95MM"},{code:"MV",label:"🇲🇻 +960",value:"960MV"},{code:"LB",label:"🇱🇧 +961",value:"961LB"},{code:"JO",label:"🇯🇴 +962",value:"962JO"},{code:"SY",label:"🇸🇾 +963",value:"963SY"},{code:"IQ",label:"🇮🇶 +964",value:"964IQ"},{code:"KW",label:"🇰🇼 +965",value:"965KW"},{code:"SA",label:"🇸🇦 +966",value:"966SA"},{code:"YE",label:"🇾🇪 +967",value:"967YE"},{code:"OM",label:"🇴🇲 +968",value:"968OM"},{code:"PS",label:"🇵🇸 +970",value:"970PS"},{code:"AE",label:"🇦🇪 +971",value:"971AE"},{code:"IL",label:"🇮🇱 +972",value:"972IL"},{code:"BH",label:"🇧🇭 +973",value:"973BH"},{code:"QA",label:"🇶🇦 +974",value:"974QA"},{code:"BT",label:"🇧🇹 +975",value:"975BT"},{code:"MN",label:"🇲🇳 +976",value:"976MN"},{code:"NP",label:"🇳🇵 +977",value:"977NP"},{code:"IR",label:"🇮🇷 +98",value:"98IR"},{code:"TJ",label:"🇹🇯 +992",value:"992TJ"},{code:"TM",label:"🇹🇲 +993",value:"993TM"},{code:"AZ",label:"🇦🇿 +994",value:"994AZ"},{code:"GE",label:"🇬🇪 +995",value:"995GE"},{code:"KG",label:"🇰🇬 +996",value:"996KG"},{code:"UZ",label:"🇺🇿 +998",value:"998UZ"}]},1720:function(e,t,n){"use strict";var r=n(65736),a=n(22823),o=n(32220);const __=r.__,i=[{isDefault:!0,name:"whatsapp-button",title:__("WhatsApp Button","jetpack"),description:__("Let your visitors send you messages on WhatsApp with the tap of a button.","jetpack"),icon:(0,o.p)("send-a-message",a.Z),innerBlocks:[["jetpack/whatsapp-button",{}]]}];t.Z=i},87165:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={countryCode:{type:"string"},phoneNumber:{type:"string"},firstMessage:{type:"string",default:__("Hi, I got your WhatsApp information from your website.","jetpack")},buttonText:{type:"array",source:"children",selector:"a.whatsapp-block__button",default:__("Chat on WhatsApp","jetpack")},backgroundColor:{type:"string",default:"#25D366"},colorClass:{type:"string",default:"dark"},openInNewTab:{type:"boolean",default:!1}}},93374:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(39630),l=n(64566),c=n(41632),u=n(22985);const __=a.__,_x=a._x,p="#25D366",d="#465B64";function m(e){let{attributes:t,setAttributes:n,context:a}=e;const{countryCode:m,phoneNumber:h,firstMessage:f,openInNewTab:g,backgroundColor:b}=t,[v,k]=(0,r.useState)(!0),y=()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{label:__("Phone Number","jetpack"),help:__("Enter the phone number you use for WhatsApp and would like to be contacted on.","jetpack"),className:"jetpack-whatsapp-button__phonenumber"},(0,r.createElement)(o.SelectControl,{label:__("Country code","jetpack"),value:m,onChange:e=>n({countryCode:e}),options:l.n,hideLabelFromVision:!0}),(0,r.createElement)(o.TextControl,{placeholder:__("Your phone number…","jetpack"),onChange:e=>{n({phoneNumber:e}),0===e.length&&k(!0),e.length>2&&k((e=>{const t=RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,"g");return!(void 0===e||e.length<1)&&t.test(m.replace(/\D/g,"")+e)})(e))},value:h}),!v&&(0,r.createElement)(u.Z,{isError:!0,className:"jetpack-whatsapp-error"},__("Please enter a valid phone number.","jetpack"))),"inspector"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.TextareaControl,{label:__("Default First Message","jetpack"),help:__("The default first message that will be sent by visitors when using this button.","jetpack"),value:f,onChange:e=>n({firstMessage:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Open in new tab","jetpack"),checked:g,onChange:e=>n({openInNewTab:e}),help:__("When the button is tapped, should a new tab be opened if the visitor does not have WhatsApp installed?","jetpack")})));return"toolbar"===a?(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.Dropdown,{position:"bottom right",className:"jetpack-whatsapp-button-settings-selector",contentClassName:"jetpack-whatsapp-button__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(o.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==s.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,c.Z)((0,r.createElement)(o.Path,{d:"M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"}))}))(t,n)},renderContent:y})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("WhatsApp Button Settings","jetpack"),initialOpen:!0},y()),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:b,onChange:e=>(e=>{if(n({backgroundColor:e}),void 0===e||e===p||e===d)return n({colorClass:"dark"});n({colorClass:"light"})})(e),label:__("Background Color","jetpack"),disableCustomColors:!0,colors:[{name:_x("WhatsApp Green","background color name","jetpack"),slug:"whatsapp-green",color:p},{name:_x("WhatsApp Dark","background color name","jetpack"),slug:"whatsapp-dark",color:d},{name:_x("WhatsApp Light","background color name","jetpack"),slug:"whatsapp-light",color:"#F4F4F4"},{name:_x("White","background color name","jetpack"),slug:"whatsapp-white",color:"#FFFFFF"}]}]}))}},11026:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(59770),l=n(87165);t.Z={attributes:l.Z,supports:{html:!1,reusable:!1},save:function(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,colorClass:u,buttonText:p,backgroundColor:d,openInNewTab:m}=t,h=m?"_blank":"_self",f=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",g=o()(n,u?"is-color-"+u:void 0,p.length?void 0:"has-no-text");return(0,r.createElement)("div",{className:g},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+f;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:d},target:h,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:p})))}}},60249:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(52175),l=n(64566),c=n(93374);function u(e){let{attributes:t,setAttributes:n,className:a,clientId:u}=e;const{countryCode:p,buttonText:d,colorClass:m,backgroundColor:h}=t,{selectBlock:f}=(0,i.useDispatch)("core/block-editor"),g=(0,r.useCallback)((async()=>{n({countryCode:"1"});const e=await fetch("https://public-api.wordpress.com/geo/").then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json();l.n.forEach((e=>{e.code===t.country_short&&n({countryCode:e.value})}))}}),[n]);(0,r.useEffect)((()=>{void 0===p&&(g(),f(u))}),[u,p,g,f]);return(0,r.createElement)("div",{className:o()(a,m?"is-color-"+m:void 0)},(0,r.createElement)(s.BlockControls,null,(0,r.createElement)(c.Z,{context:"toolbar",setAttributes:n,attributes:t})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(c.Z,{context:"inspector",setAttributes:n,attributes:t})),(0,r.createElement)(s.RichText,{placeholder:d.default,value:d,onChange:e=>n({buttonText:e}),withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:h,color:"dark"===m?"#fff":"#465B64"}}))}},22823:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(57535);t.Z=(0,r.createElement)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,r.createElement)(a.Path,{fill:(0,o.m)(),d:"M24,11.6909333 C24,18.1477333 18.7256,23.3818667 12.2181333,23.3818667 C10.1522667,23.3818667 8.21146667,22.8538667 6.52293333,21.9272 L0,24 L2.12666667,17.7274667 C1.05386667,15.9658667 0.436,13.8997333 0.436,11.6909333 C0.436,5.23413333 5.71093333,0 12.2181333,0 C18.7261333,0 24,5.23413333 24,11.6909333 Z M12.2181333,1.86186667 C6.75573333,1.86186667 2.31253333,6.2712 2.31253333,11.6909333 C2.31253333,13.8416 3.0136,15.8333333 4.19946667,17.4536 L2.96186667,21.104 L6.76853333,19.8941333 C8.33253333,20.9210667 10.2061333,21.52 12.2184,21.52 C17.68,21.52 22.124,17.1112 22.124,11.6914667 C22.124,6.27173333 17.6802667,1.86186667 12.2181333,1.86186667 Z M18.1677333,14.3834667 C18.0949333,14.2642667 17.9026667,14.1922667 17.6141333,14.0490667 C17.3250667,13.9058667 15.9048,13.2122667 15.6408,13.1170667 C15.376,13.0216 15.1829333,12.9736 14.9906667,13.2602667 C14.7984,13.5472 14.2448,14.1922667 14.076,14.3834667 C13.9074667,14.5752 13.7392,14.5992 13.4501333,14.4557333 C13.1616,14.3125333 12.2312,14.0096 11.128,13.0336 C10.2696,12.2741333 9.68986667,11.3365333 9.52133333,11.0493333 C9.35306667,10.7626667 9.50373333,10.6077333 9.648,10.4650667 C9.77813333,10.3365333 9.93706667,10.1304 10.0813333,9.9632 C10.2261333,9.79573333 10.2741333,9.67653333 10.3698667,9.48506667 C10.4666667,9.29386667 10.4184,9.12666667 10.3458667,8.98293333 C10.2738667,8.83973333 9.69573333,7.4296 9.4552,6.85573333 C9.21466667,6.2824 8.9744,6.37786667 8.8056,6.37786667 C8.63733333,6.37786667 8.44453333,6.35386667 8.252,6.35386667 C8.05946667,6.35386667 7.7464,6.4256 7.4816,6.71226667 C7.21706667,6.9992 6.4712,7.69253333 6.4712,9.1024 C6.4712,10.5125333 7.5056,11.8749333 7.6504,12.0658667 C7.79466667,12.2568 9.64773333,15.2445333 12.5837333,16.392 C15.52,17.5389333 15.52,17.1562667 16.0496,17.1082667 C16.5786667,17.0605333 17.7578667,16.4152 17.9994667,15.7464 C18.2394667,15.0765333 18.2394667,14.5029333 18.1677333,14.3834667 Z"}))},59770:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},pf:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(57535),o=n(87165),i=n(60249),s=n(4114),l=n(11026),c=n(22823);const __=r.__,_x=r._x,u="whatsapp-button",p=__("WhatsApp Button","jetpack"),d="https://api.whatsapp.com/send?phone=",m=(__("Chat on WhatsApp","jetpack"),__("Hi, I got your WhatsApp information from your website.","jetpack"),{title:p,description:__("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:{src:c.Z,foreground:(0,a.m)()},category:"grow",parent:["jetpack/send-a-message"],keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1,reusable:!1,align:["left","center","right"]},attributes:o.Z,edit:i.Z,save:s.Z,example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}},deprecated:[l.Z]})},4114:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(59770);function l(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,buttonText:u,backgroundColor:p,colorClass:d,openInNewTab:m}=t,h=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",f=o()(n,d?"is-color-"+d:void 0,u.length?void 0:"has-no-text"),g=m?"_blank":"_self";return(0,r.createElement)("div",{className:f},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+h;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:p,color:"dark"===d?"#fff":"#465B64"},target:g,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:u})))}},96594:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(72067),s=n(32673),l=n(20489);const __=a.__,c="seo",u={render:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,null,(0,r.createElement)(o.PanelBody,{title:__("SEO Description","jetpack")},(0,r.createElement)(l.Z,null))),(0,r.createElement)(i.PluginPrePublishPanel,{initialOpen:!0,id:"seo-title",title:(0,r.createElement)("span",{id:"seo-defaults",key:"seo-title-span"},__("SEO Description","jetpack"))},(0,r.createElement)(l.Z,null)))}},20489:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(92819),c=n(9818);const __=i.__,_n=i._n;class u extends o.Component{constructor(){super(...arguments),a()(this,"onMessageChange",(e=>{this.props.updateSeoDescription(e.target.value)}))}render(){const{seoDescription:e}=this.props;return(0,o.createElement)("div",{className:"jetpack-seo-message-box"},(0,o.createElement)("textarea",{value:e,onChange:this.onMessageChange,placeholder:__("Write a description…","jetpack"),rows:4}),(0,o.createElement)("div",{className:"jetpack-seo-character-count"},(0,i.sprintf)(
53
  /* translators: Placeholder is a number of characters in a sentence. */
54
  _n("%d character","%d characters",e.length,"jetpack"),e.length)))}}t.Z=(0,s.compose)([(0,c.withSelect)((e=>({seoDescription:(0,l.get)(e("core/editor").getEditedPostAttribute("meta"),["advanced_seo_description"],"")}))),(0,c.withDispatch)((e=>({updateSeoDescription(t){e("core/editor").editPost({meta:{advanced_seo_description:t}})}})))])(u)},71730:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(92819),i=n(55609),s=n(9818),l=n(70609),c=n(32673);const __=a.__,u="shortlinks",p={render:()=>(0,r.createElement)(m,null)};class d extends r.Component{render(){const{shortlink:e}=this.props;return e?(0,r.createElement)(c.Z,null,(0,r.createElement)(i.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel"},(0,r.createElement)(l.Z,{link:e}))):null}}const m=(0,s.withSelect)((e=>{const t=e("core/editor").getCurrentPost();return{shortlink:(0,o.get)(t,"jetpack_shortlink","")}}))(d)},47175:function(e,t,n){"use strict";n.d(t,{LC:function(){return r},a7:function(){return a},Rh:function(){return o}});const r="jp_pay_product",a="USD",o=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},81255:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{setAttributes:t,postLinkText:n}=e;return(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(a.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>t({postLinkText:e}),value:n})))}},56511:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:e=>{let{attributes:t}=e;const{productId:n}=t;return n?(0,r.createElement)(r.RawHTML,null,`[simple-payment id="${n}"]`):null}}},75050:function(e,t,n){"use strict";var r=n(27538),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(89453),c=n(92819),u=n(75139),p=n(65736),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(22985),b=n(87079),v=n(8565),k=n(37299),y=n(47175);const __=p.__,_n=p._n;class E extends o.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return y.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,u.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,k.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(
55
  /* translators: Placeholder is a number of decimals in a number. */
67
  /* translators: %d: Slide number. */
68
  __("Slide %d, currently selected","jetpack"),a+1):(0,i.sprintf)(
69
  /* translators: %d: Slide number. */
70
+ __("Go to slide %d","jetpack"),a+1)),(0,r.createElement)(s.Button,{role:p?"presentation":"tab",key:a,className:o()("wp-story-pagination-bullet",{"wp-story-pagination-ellipsis":t}),"aria-label":d,"aria-disabled":p||l,onClick:p||l?void 0:u,disabled:p},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar"},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar-progress",style:{width:`${c}%`}})))}},9610:function(e,t,n){"use strict";n.d(t,{b:function(){return l},r:function(){return c}});var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i);const l=e=>{let{className:t,size:n,label:r,isPressed:i,...l}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":r,"aria-pressed":i,className:s()("jetpack-mdc-icon-button","circle-icon","outlined","bordered",t),style:{width:`${n}px`,height:`${n}px`}},l))},c=e=>{let{className:t,size:n=24,label:r,isPressed:i,...l}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":r,"aria-pressed":i,className:s()("jetpack-mdc-icon-button",t),style:{width:`${n}px`,height:`${n}px`}},l))}},1019:function(e,t,n){"use strict";var r=n(69307);t.Z=()=>(0,r.createElement)("div",{className:"wp-story-loading-spinner"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__outer"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__inner"})))},50281:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(9610),i=n(29089);const _x=a._x;function s(e){let{playing:t,muted:n,onPlayPressed:a,onMutePressed:s,showMute:l}=e;return(0,r.createElement)("div",{className:"wp-story-controls"},(0,r.createElement)(o.r,{isPressed:t,label:t?_x("pause","Button tooltip text","jetpack"):_x("play","Button tooltip text","jetpack",0),onClick:a},t?(0,r.createElement)(i.fp,null):(0,r.createElement)(i.o1,null)),l&&(0,r.createElement)(o.r,{isPressed:n,label:n?_x("unmute","Button tooltip text","jetpack"):_x("mute","Button tooltip text","jetpack",0),onClick:s},n?(0,r.createElement)(i.xb,null):(0,r.createElement)(i.MC,null)))}},40220:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(65736),o=n(9610),i=n(29089);const __=a.__;function s(e){let{fullscreen:t,onExitFullscreen:n,siteIconUrl:a,storyTitle:s}=e;return t?(0,r.createElement)("div",{className:"wp-story-meta"},(0,r.createElement)("div",{className:"wp-story-icon"},(0,r.createElement)("img",{alt:__("Site icon","jetpack"),src:a,width:"40",height:"40"})),(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"wp-story-title"},s)),(0,r.createElement)(o.r,{className:"wp-story-exit-fullscreen",label:__("Exit Fullscreen","jetpack"),onClick:n},(0,r.createElement)(i.Tw,null))):null}},29089:function(e,t,n){"use strict";n.d(t,{o1:function(){return s},fp:function(){return l},Tw:function(){return c},MC:function(){return u},xb:function(){return p},JM:function(){return d},Vq:function(){return m}});var r=n(69307),a=n(55609),o=n(41632);const i=e=>{let{children:t,size:n}=e;return(0,o.Z)(t,n,n)},s=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M8 5v14l11-7z"}))},l=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}))},c=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))},u=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"}))},p=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"}))},d=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}))},m=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}))}},27870:function(e,t,n){"use strict";n.d(t,{gT:function(){return r.Z},ZX:function(){return a.Z},h4:function(){return o.Z},aV:function(){return i.Z},Aq:function(){return s.Z},WB:function(){return l.Z},pU:function(){return c.pU}});var r=n(85974),a=n(50281),o=n(40220),i=n(46531),s=n(18754),l=n(1019),c=n(64816);n(9610)},64816:function(e,t,n){"use strict";n.d(t,{pU:function(){return u}});var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i);const l=e=>{let{title:t,alt:n,className:r,id:a,mediaRef:i,mime:l,sizes:c,srcset:u,url:p}=e;return(0,o.createElement)("img",{ref:i,"data-id":a,"data-mime":l,title:t,alt:n,src:p,className:s()("wp-story-image",`wp-image-${a}`,r),srcSet:u,sizes:c})},c=e=>{let{title:t,className:n,id:r,mediaRef:a,mime:i,url:l,poster:c}=e;return(0,o.createElement)("video",{className:s()("wp-story-video","intrinsic-ignore",`wp-video-${r}`,n),ref:a,"data-id":r,title:t,type:i,src:l,poster:c,tabIndex:-1,preload:"auto",playsInline:!0})},u=e=>{let{targetAspectRatio:t,cropUpTo:n,type:r,width:i,height:s,...u}=e,p=null;if(i&&s){const e=i/s;if(e>=t){e>t/(1-n)||(p="wp-story-crop-wide")}else{e<t*(1-n)||(p="wp-story-crop-narrow")}}const d="video"===r||(u.mime||"").startsWith("video/");return(0,o.createElement)("figure",null,d?(0,o.createElement)(c,a()({},u,{className:p})):(0,o.createElement)(l,a()({},u,{className:p})))}},46531:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(48735),o=n.n(a),i=n(65736),s=n(9610),l=n(29089);const __=i.__;function c(e){let{ended:t,hasPrevious:n,onNextSlide:a,onPreviousSlide:c,icon:u,slideCount:p,showSlideCount:d}=e;const m=(0,r.useCallback)((e=>{t||(e.stopPropagation(),c())}),[c,t]),h=(0,r.useCallback)((e=>{t||(e.stopPropagation(),a())}),[a,t]);return(0,r.createElement)("div",{className:"wp-story-overlay"},d&&(0,r.createElement)("div",{className:"wp-story-embed-icon"},u,(0,r.createElement)("span",null,p)),!d&&(0,r.createElement)("div",{className:"wp-story-embed-icon-expand"},(0,r.createElement)(o(),{role:"img"})),n&&(0,r.createElement)("div",{className:"wp-story-prev-slide",onClick:m},(0,r.createElement)(s.b,{size:44,label:__("Previous Slide","jetpack"),className:"outlined-w"},(0,i.isRTL)()?(0,r.createElement)(l.Vq,{size:24}):(0,r.createElement)(l.JM,{size:24}))),(0,r.createElement)("div",{className:"wp-story-next-slide",onClick:h},(0,r.createElement)(s.b,{size:44,label:__("Next Slide","jetpack"),className:"outlined-w"},(0,i.isRTL)()?(0,r.createElement)(l.JM,{size:24}):(0,r.createElement)(l.Vq,{size:24}))))}},58871:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(89105),o=n.n(a),i=n(31158),s=n(29891),l=n(72096);const c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent);function u(e){let{className:t,fullscreenClassName:n,bodyFullscreenClassName:a,fullscreen:u,shadowDOM:p,onKeyDown:d,onExitFullscreen:m,playerQuerySelector:h,children:f}=e;const g=(0,r.useRef)(),b=(0,r.useRef)(),[v,k]=(0,r.useState)(null),y=c&&s.am(),E=u&&!y,w=u&&y;return(0,r.useLayoutEffect)((()=>{if(y)u?g.current&&s.uP(g.current,m):s.bG()&&s.JF();else if(u){if(k([document.documentElement.scrollLeft,document.documentElement.scrollTop]),document.body.classList.add(a),document.getElementsByTagName("html")[0].classList.add(a),b.current){const e=b.current.querySelector(h);e&&e.focus()}}else if(document.body.classList.remove(a),document.getElementsByTagName("html")[0].classList.remove(a),v){window.scrollTo(...v);const e=g.current.querySelector(h);e&&e.focus()}}),[u]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Z,p,(0,r.createElement)("div",{ref:g,className:o()(t,{[n]:w}),onKeyDown:d},!E&&f)),(0,r.createElement)(l.Z,{className:o()(t,{[n]:E}),isOpened:E,onRequestClose:m,shadowDOM:p,onKeyDown:E&&d,focusOnMount:!1,modalRef:b},E&&f))}},4045:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(9818),o=n(39630),i=(n(66930),n(54616)),s=n(58871);function l(e){let{id:t,slides:n,metadata:l,disabled:c,...u}=e;const p=(0,r.useMemo)((()=>t||Math.random().toString(36)),[t]),{init:d,setEnded:m,setPlaying:h,setFullscreen:f,showSlide:g}=(0,a.useDispatch)("jetpack/story/player"),{playing:b,currentSlideIndex:v,fullscreen:k,isReady:y,playerSettings:E}=(0,a.useSelect)((e=>{const{getCurrentSlideIndex:t,getSettings:n,isFullscreen:r,isPlayerReady:a,isPlaying:o}=e("jetpack/story/player");return a(p)?{playing:o(p),currentSlideIndex:t(p),isReady:!0,fullscreen:r(p),playerSettings:n(p)}:{isReady:!1}}),[p]);(0,r.useEffect)((()=>{y||d(p,{slideCount:n.length,...u})}),[y,p]);const w=(0,r.useCallback)((e=>{switch(e.keyCode){case o.ENTER:if(k)break;case o.SPACE:h(p,!b);break;case o.LEFT:v>0&&g(p,v-1);break;case o.RIGHT:v<n.length-1?g(p,v+1):m(p)}}),[p,v,k,b]),_=(0,r.useCallback)((()=>{f(p,!1)}),[p]);return y?(0,r.createElement)(s.Z,{shadowDOM:E.shadowDOM,className:"wp-story-app",fullscreenClassName:"wp-story-fullscreen",bodyFullscreenClassName:"wp-story-in-fullscreen",playerQuerySelector:".wp-story-container",fullscreen:k,onExitFullscreen:_,onKeyDown:w},(0,r.createElement)(i.Z,{id:p,slides:n,metadata:l,disabled:c})):null}},29891:function(e,t,n){"use strict";n.d(t,{am:function(){return r},bG:function(){return a},uP:function(){return o},JF:function(){return i}});const r=()=>document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled,a=()=>document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullScreenElement,o=(e,t)=>{if((e.requestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen).call(e),t){const e=()=>{document.fullscreenElement||(document.removeEventListener("fullscreenchange",e),t())};document.addEventListener("fullscreenchange",e)}},i=()=>(document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document)},31158:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307);const a=window&&window.Element&&window.Element.prototype.hasOwnProperty("attachShadow");function o(e){let{enabled:t,delegatesFocus:n=!1,mode:o="open",globalStyleElements:s=[],adoptedStyleSheets:l=null,mountOnElement:c=null,children:u}=e;const[p,d]=(0,r.useState)(null),m=c||p,[h,f]=(0,r.useState)(null),g="string"==typeof s?[...document.querySelectorAll(s)]:s,b=a&&t&&g.length>0,v=(0,r.useCallback)((e=>{null!==e&&d(e.parentNode)}),[]);if((0,r.useEffect)((()=>{if(!m)return;if(m.shadowRoot)return void f(m.shadowRoot);const e=m.attachShadow({delegatesFocus:n,mode:o});l&&(e.adoptedStyleSheets=l),f(e)}),[m]),b&&!h)return c?null:(0,r.createElement)("span",{ref:v});const k=(0,r.createElement)(r.Fragment,null,b&&(0,r.createElement)(i,{globalStyleElements:g}),u);return b?(0,r.createPortal)(k,h):k}function i(e){let{globalStyleElements:t}=e;return(0,r.createElement)(r.Fragment,null,t.map(((e,t)=>{let{id:n,tagName:a,attributes:o,innerHTML:i}=e;return"LINK"===a?(0,r.createElement)("link",{key:n||t,id:n,rel:o.rel.value,href:o.href.value}):"STYLE"===a?(0,r.createElement)("style",{key:n||t,id:n},i):void 0})))}},94292:function(e,t,n){"use strict";var r=n(69307);t.Z=e=>{const t=(0,r.useRef)(),n=(0,r.useRef)(),a=(0,r.useRef)(e),o=(0,r.useCallback)((e=>{e.touches&&1===e.touches.length&&e.preventDefault()}),[]);return(0,r.useEffect)((()=>{a.current=e}),[e]),{onTouchStart:(0,r.useCallback)((e=>{e.target&&(e.target.addEventListener("touchend",o,{passive:!1}),n.current=e.target),t.current=setTimeout((()=>{a.current&&a.current(!0),t.current=null}),200)}),[]),onTouchEnd:(0,r.useCallback)((e=>{t.current?clearTimeout(t.current):(a.current&&a.current(!1),e.stopPropagation()),n.current&&n.current.removeEventListener("touchend",o)}),[])}}},21531:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){const t=(0,r.useRef)(null),n=(0,r.useRef)(!1),a=(0,r.useRef)(e),o=(0,r.useRef)(e);return o.current=e,(0,r.useLayoutEffect)((()=>{e.forEach(((e,r)=>{const o=a.current[r];"function"==typeof e&&e!==o&&!1===n.current&&(o(null),e(t.current))})),a.current=e}),e),(0,r.useLayoutEffect)((()=>{n.current=!1})),(0,r.useCallback)((e=>{t.current=e,n.current=!0;(e?o.current:a.current).forEach((t=>{"function"==typeof t?t(e):t&&t.hasOwnProperty("current")&&(t.current=e)}))}),[])}},97524:function(e,t,n){"use strict";async function r(e){const t=e.tagName.toLowerCase();if("img"===t){if(e.complete)return;await new Promise((t=>{e.addEventListener("load",t,{once:!0})}))}else if("video"===t||"audio"===t){if(e.HAVE_ENOUGH_DATA===e.readyState)return;await new Promise((t=>{e.addEventListener("canplaythrough",t,{once:!0}),e.addEventListener("load",t,{once:!0}),e.HAVE_NOTHING===e.readyState&&e.networkState!==e.NETWORK_LOADING&&e.load()}))}}n.d(t,{Z:function(){return r}})},82295:function(e,t,n){"use strict";n.d(t,{BM:function(){return s},i1:function(){return l}});var r=n(92819);const a=new Set(["alert","status","log","marquee","timer"]);let o=[],i=!1;function s(e){if(i)return;const t=document.body.children;(0,r.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||a.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),o.push(t))})),i=!0}function l(){i&&((0,r.forEach)(o,(e=>{e.removeAttribute("aria-hidden")})),o=[],i=!1)}},97790:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(39630),o=n(94333),i=n(21531);function s(e){let{overlayClassName:t,children:n,className:s,focusOnMount:l,shouldCloseOnEsc:c=!0,onRequestClose:u,onKeyDown:p,modalRef:d}=e;const m=(0,o.useFocusOnMount)(l),h=(0,o.useConstrainedTabbing)(),f=(0,o.useFocusReturn)();return(0,r.createElement)("div",{className:t,onKeyDown:function(e){c&&e.keyCode===a.ESCAPE&&(e.stopPropagation(),u&&u(e)),e.target&&"button"===e.target.tagName.toLowerCase()&&e.keyCode===a.SPACE||p&&p(e)}},(0,r.createElement)("div",{className:s,ref:(0,i.Z)([h,f,m,d])},n))}},72096:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(94333),s=n(31158),l=n(97790),c=n(82295);let u,p=0;const d=()=>{};class m extends o.Component{constructor(e){super(e),this.prepareDOM()}componentDidMount(){p++,1===p&&this.openFirstModal()}componentWillUnmount(){p--,0===p&&this.closeLastModal(),this.cleanDOM()}prepareDOM(){u||(u=document.createElement("div"),document.body.appendChild(u)),this.node=document.createElement("div"),u.appendChild(this.node),this.node.ontouchstart=d,this.node.ontouchend=d}cleanDOM(){u.removeChild(this.node)}openFirstModal(){c.BM(u)}closeLastModal(){c.i1()}render(){const{children:e,isOpened:t,shadowDOM:n,...r}=this.props;return(0,o.createElement)(s.Z,a()({},n,{mountOnElement:this.node}),t&&(0,o.createElement)(l.Z,r,e))}}m.defaultProps={shouldCloseOnEsc:!0,isOpened:!1,focusOnMount:!0},t.Z=(0,i.withInstanceId)(m)},54616:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(29183),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(92819),c=n(11313),u=n(94333),p=n(65736),d=n(9818),m=n(12378),h=n(96178),f=n(16019),g=n(27870),b=n(94292);const __=p.__;function v(e){let{id:t,slides:n,metadata:r,disabled:i}=e;const{setFullscreen:p,setEnded:v,setPlaying:k,setMuted:y,showSlide:E}=(0,d.useDispatch)("jetpack/story/player"),{playing:w,muted:_,currentSlideIndex:C,currentSlideEnded:j,ended:S,fullscreen:x,settings:P}=(0,d.useSelect)((e=>{const{getCurrentSlideIndex:n,getSettings:r,hasCurrentSlideEnded:a,hasEnded:o,isFullscreen:i,isMuted:s,isPlaying:l}=e("jetpack/story/player");return{playing:l(t),muted:s(t),currentSlideIndex:n(t),currentSlideEnded:a(t),ended:o(t),fullscreen:i(t),settings:r(t)}}),[t]),T=(0,o.useRef)(),[N,A]=(0,o.useState)(null),[I,{width:B,height:M}]=(0,u.useResizeObserver)(),[R,L]=(0,o.useState)(P.defaultAspectRatio),Z=(0,l.some)(n,(e=>(0,c.isBlobURL)(e.url))),D=e=>{E(t,e)},F=(0,o.useCallback)((()=>{i||x||P.playInFullscreen&&!w&&k(t,!0)}),[w,i,x]),{onTouchStart:O,onTouchEnd:z}=(0,b.Z)((e=>{k(t,!e)}),[]),U=(0,o.useCallback)((()=>{C>0&&D(C-1)}),[C]),$=(0,o.useCallback)((()=>{C<n.length-1?D(C+1):v(t)}),[C,n]),V=(0,o.useCallback)((()=>{p(t,!1)}),[]);let G,H;return(0,o.useEffect)((()=>{i&&w&&k(t,!1)}),[i,w]),(0,o.useEffect)((()=>{w&&j&&$()}),[w,j]),(0,o.useLayoutEffect)((()=>{if(!T.current)return;let e=Math.round(P.defaultAspectRatio*T.current.offsetHeight);x&&(e=Math.abs(1-e/B)<P.cropUpTo?B:e),A(e)}),[B,M,x]),(0,o.useLayoutEffect)((()=>{N&&T.current&&T.current.offsetHeight>0&&L(N/T.current.offsetHeight)}),[N]),G=x?[__("You are currently playing a story.","jetpack"),w?__("Press space to pause.","jetpack"):__("Press space to play.","jetpack",0),__("Press escape to exit.","jetpack")].join(" "):__("Play story","jetpack"),H=i?"presentation":x?"dialog":"button",(0,o.createElement)("div",{className:"wp-story-display-contents"},I,(0,o.createElement)("div",{role:H,"aria-label":G,tabIndex:x?-1:0,className:s()("wp-story-container",{"wp-story-with-controls":!i&&!x&&!P.playInFullscreen,"wp-story-fullscreen":x,"wp-story-ended":S,"wp-story-disabled":i,"wp-story-clickable":!i&&!x}),style:{maxWidth:`${N}px`},onClick:F,onTouchStart:O,onTouchEnd:z},(0,o.createElement)(g.h4,a()({},r,{fullscreen:x,onExitFullscreen:V})),(0,o.createElement)("div",{ref:T,className:"wp-story-wrapper"},n.map(((e,n)=>(0,o.createElement)(m.Z,{playerId:t,key:n,media:e,index:n,playing:!i&&w,uploading:Z,settings:P,targetAspectRatio:R})))),(0,o.createElement)(g.aV,{icon:h.Z,slideCount:n.length,showSlideCount:P.showSlideCount,ended:S,hasPrevious:C>0,onPreviousSlide:U,onNextSlide:$}),P.showProgressBar&&(0,o.createElement)(f.ZP,{playerId:t,slides:n,disabled:!x,onSlideSeek:D,maxBullets:x?P.maxBulletsFullscreen:P.maxBullets}),(0,o.createElement)(g.ZX,{playing:w,muted:_,onPlayPressed:()=>k(t,!w),onMutePressed:()=>y(t,!_),showMute:(e=>{const t=e<n.length?n[e]:null;return!!t&&("video"===t.type||(t.mime||"").startsWith("video/"))})(C)})),x&&(0,o.createElement)(g.Aq,{currentMedia:P.blurredBackground&&n.length>C&&n[C]}))}},16019:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(27870),i=n(9818);const s=e=>{let{key:t,playerId:n,index:a,disabled:s,isSelected:l,onClick:c}=e;const u=(0,i.useSelect)((e=>e("jetpack/story/player").getCurrentSlideProgressPercentage(n)),[]);return(0,r.createElement)(o.gT,{key:t,index:a,progress:u,disabled:s,isSelected:l,onClick:c})};t.ZP=e=>{let{playerId:t,slides:n,disabled:l,onSlideSeek:c,maxBullets:u}=e;const{currentSlideIndex:p}=(0,i.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t)})),[]),d=Math.min(n.length,u),m=Math.floor(d/2);let h,f=0,g=n.length-1;return n.length<=u||p<m?(h=p,g=d-1):p>=n.length-m?(h=p-n.length+d,f=n.length-d):(h=m,f=p-m,g=p+m),(0,r.createElement)("div",{className:"wp-story-pagination wp-story-pagination-bullets",role:"tablist"},f>0&&(0,r.createElement)(o.gT,{key:"bullet-0",index:f-1,progress:100,isEllipsis:!0}),(0,a.range)(1,d+1).map(((e,n)=>{const a=n+f;let i=null;if(a<p)i=100;else{if(!(a>p))return(0,r.createElement)(s,{playerId:t,key:`bullet-${n}`,index:a,disabled:l,isSelected:h===n,onClick:()=>c(a)});i=0}return(0,r.createElement)(o.gT,{key:`bullet-${n}`,index:a,progress:i,disabled:l,isSelected:h===n,onClick:()=>c(a)})})),g<n.length-1&&(0,r.createElement)(o.gT,{key:`bullet-${d+1}`,index:g+1,progress:0,isEllipsis:!0}))}},12378:function(e,t,n){"use strict";var r=n(29183),a=n.n(r),o=n(69307),i=n(97524),s=n(89105),l=n.n(s),c=n(9818),u=n(27870);t.Z=e=>{let{playerId:t,media:n,index:r,playing:s,uploading:p,settings:d,targetAspectRatio:m}=e;const{currentSlideIndex:h,buffering:f}=(0,c.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t),buffering:e("jetpack/story/player").isBuffering(t)})),[]),{slideReady:g}=(0,c.useDispatch)("jetpack/story/player"),b=r===h,v=(0,o.useRef)(null),[k,y]=(0,o.useState)(!1),[E,w]=(0,o.useState)(!0);return(0,o.useEffect)((()=>{if(b&&!E){const e=v.current&&v.current.src&&"video"===v.current.tagName.toLowerCase()?v.current:null;g(t,v.current,e?e.duration:d.imageTime)}}),[b,E]),(0,o.useEffect)((()=>{r<=h+(s?1:0)&&y(!0)}),[s,h]),(0,o.useLayoutEffect)((()=>{v.current&&(0,i.Z)(v.current).then((()=>{w(!1)}))}),[k,p]),(0,o.createElement)(o.Fragment,null,b&&(E||p||f)&&(0,o.createElement)("div",{className:l()("wp-story-slide","is-loading",{transparent:s&&f,"semi-transparent":p||!s&&f})},(0,o.createElement)(u.WB,null)),(0,o.createElement)("div",{role:"figure",className:"wp-story-slide",style:{display:b&&!E?"block":"none"},tabIndex:b?0:-1},k&&(0,o.createElement)(u.pU,a()({},n,{targetAspectRatio:m,cropUpTo:d.cropUpTo,index:r,mediaRef:v}))))}},46192:function(e,t,n){"use strict";function r(e,t){return{type:"SET_MUTED",value:t,playerId:e}}function a(e,t){return{type:"SET_PLAYING",value:t,playerId:e}}function o(e,t){return{type:"SHOW_SLIDE",index:t,playerId:e}}function i(e,t,n){return{type:"SLIDE_READY",mediaElement:t,duration:n,playerId:e}}function s(e,t){return{type:"SET_CURRENT_SLIDE_PROGRESS",value:t,playerId:e}}function l(e){return{type:"RESET_CURRENT_SLIDE_PROGRESS",playerId:e}}function c(e){return{type:"SET_CURRENT_SLIDE_ENDED",playerId:e}}function u(e,t){return{type:"SET_FULLSCREEN",playerId:e,fullscreen:t}}function p(e){return{type:"ENDED",playerId:e}}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"INIT",playerId:e,settings:t}}function m(e,t){return{type:"SET_BUFFERING",value:t,playerId:e}}n.r(t),n.d(t,{setMuted:function(){return r},setPlaying:function(){return a},showSlide:function(){return o},slideReady:function(){return i},setCurrentSlideProgress:function(){return s},resetCurrentSlideProgress:function(){return l},setCurrentSlideEnded:function(){return c},setFullscreen:function(){return u},setEnded:function(){return p},init:function(){return d},setBuffering:function(){return m}})},58571:function(e,t,n){"use strict";n.d(t,{XO:function(){return r},Qz:function(){return a},H2:function(){return o}});const r={currentTime:0,duration:null,timeout:null,lastUpdate:null},a={progress:r,index:0,mediaElement:null,duration:null,ended:!1,ready:!1},o={slideCount:0,currentSlide:a,previousSlide:null,muted:!1,playing:!1,ended:!1,buffering:!1,fullscreen:!1,settings:{imageTime:5,startMuted:!1,playInFullscreen:!0,playOnNextSlide:!0,playOnLoad:!1,exitFullscreenOnEnd:!0,loadInFullscreen:!1,blurredBackground:!0,showSlideCount:!1,showProgressBar:!0,shadowDOM:{enabled:!0,mode:"open",globalStyleElements:'#jetpack-block-story-css, link[href*="jetpack/_inc/blocks/story/view.css"]'},defaultAspectRatio:.5625,cropUpTo:.2,volume:.8,maxBullets:7,maxBulletsFullscreen:14}}},83566:function(e,t,n){"use strict";var r=n(46192),a=n(96494);const o=e=>e&&e.src&&"video"===e.tagName.toLowerCase();function i(e,t){const{getState:n}=t,r=e.playerId,i=(0,a.isMuted)(n(),r),s=(0,a.isPlaying)(n(),r),l=(0,a.getCurrentMediaElement)(n(),r),c=(0,a.getPreviousSlideMediaElement)(n(),r),u=(0,a.getSettings)(n(),r);o(c)&&(c.currentTime=0,c.onwaiting=null,c.onplaying=null,c.pause()),o(l)&&(i!==l.muted&&(l.muted=i,i||(l.volume=u.volume)),s?l.play():l.pause())}function s(e,t){const{getState:n,dispatch:i}=t,l=e.playerId,c=(0,a.isCurrentSlideReady)(n(),l),u=(0,a.isPlaying)(n(),l),p=(0,a.getCurrentSlideProgress)(n(),l);if(clearTimeout(p.timeout),!u||!c)return void(p.lastUpdate&&i((0,r.setCurrentSlideProgress)(l,{...p,lastUpdate:null})));const d=(0,a.getCurrentMediaElement)(n(),l),m=(0,a.getCurrentMediaDuration)(n(),l),h=p.lastUpdate?Date.now()-p.lastUpdate:100,f=o(d)?d.currentTime:p.currentTime+h/1e3;if(f>=m){i((0,r.setCurrentSlideEnded)(l));const e=(0,a.getSlideCount)(n(),l);(0,a.getCurrentSlideIndex)(n(),l)===e-1&&i((0,r.setEnded)(l))}else i((0,r.setCurrentSlideProgress)(l,{timeout:setTimeout((()=>s(e,t)),100),lastUpdate:Date.now(),duration:m,currentTime:f}))}t.Z={SET_PLAYING:[s,i],SLIDE_READY:[function(e,t){const{getState:n,dispatch:i}=t,s=e.playerId,l=(0,a.getCurrentMediaElement)(n(),s);if(!o(l))return;const c=(0,a.getCurrentSlideProgress)(n(),s);0===l.currentTime&&c.currentTime>0&&(l.currentTime=c.currentTime),l.onwaiting=()=>i((0,r.setBuffering)(s,!0)),l.onplaying=()=>i((0,r.setBuffering)(s,!1))},s,i],SET_MUTED:i,SHOW_SLIDE:i}},66930:function(e,t,n){"use strict";var r=n(9818),a=n(46192),o=n(96494),i=n(36978),s=n(2814);const l=(0,r.registerStore)("jetpack/story/player",{actions:a,reducer:s.Z,selectors:o});(0,i.Z)(l)},36978:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2601),a=n.n(r),o=n(92819),i=n(83566);function s(e){const t=[a()(i.Z)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return r=t.map((e=>e(s))),n=(0,o.flowRight)(...r)(e.dispatch),e.dispatch=n,e}},2814:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(58571);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.H2,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_SLIDE":{const n=e.currentSlide===t.index+1;return{...e,currentSlide:{...a.Qz,index:t.index},previousSlide:e.currentSlide,playing:n?e.settings.playOnNextSlide:e.playing}}case"SLIDE_READY":return{...e,buffering:!1,currentSlide:{...e.currentSlide,mediaElement:t.mediaElement,duration:t.duration,ready:!0},previousSlide:null};case"SET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:t.value}};case"SET_CURRENT_SLIDE_ENDED":return{...e,currentSlide:{...e.currentSlide,ended:!0}};case"RESET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:{...a.XO}}};case"SET_MUTED":return{...e,muted:t.value};case"SET_PLAYING":{const n=t.value&&e.ended;return{...e,playing:t.value,buffering:!!t.value&&e.buffering,fullscreen:!e.playing&&t.value?e.settings.playInFullscreen:e.fullscreen,ended:!n&&e.ended,currentSlide:n?{...a.Qz,index:0}:e.currentSlide,previousSlide:n?null:e.previousSlide}}case"SET_BUFFERING":return{...e,buffering:t.value};case"SET_FULLSCREEN":return{...e,fullscreen:t.fullscreen,playing:!(e.fullscreen&&!t.fullscreen&&e.settings.playInFullscreen)&&e.playing};case"INIT":{const n=(0,r.merge)({},e.settings,t.settings);return{...e,settings:n,playing:n.playOnLoad,fullscreen:n.loadInFullscreen}}case"ENDED":return{...e,currentSlide:{...a.Qz,index:e.settings.slideCount-1,progress:{...a.XO,currentTime:100,duration:100}},ended:!0,playing:!1,fullscreen:!e.settings.exitFullscreenOnEnd}}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.playerId?{...e,[t.playerId]:o(e[t.playerId],t)}:e}},96494:function(e,t,n){"use strict";function r(e,t){return!!e[t]}function a(e,t){return e[t].currentSlide.index}function o(e,t){return e[t].currentSlide.progress}function i(e,t){const n=e[t].currentSlide.progress.currentTime,r=e[t].currentSlide.progress.duration,a=Math.round(100*n/r);return a>=100?100:a}function s(e,t){return e[t].playing}function l(e,t){return e[t].muted}function c(e,t){return e[t].buffering}function u(e,t){return e[t].currentSlide.mediaElement}function p(e,t){return e[t].currentSlide.duration}function d(e,t){return e[t].currentSlide.ended}function m(e,t){return e[t].currentSlide.ready}function h(e,t){var n;return null===(n=e[t].previousSlide)||void 0===n?void 0:n.mediaElement}function f(e,t){return e[t].fullscreen}function g(e,t){return e[t].ended}function b(e,t){return e[t].settings}function v(e,t){return e[t].settings.slideCount}n.r(t),n.d(t,{isPlayerReady:function(){return r},getCurrentSlideIndex:function(){return a},getCurrentSlideProgress:function(){return o},getCurrentSlideProgressPercentage:function(){return i},isPlaying:function(){return s},isMuted:function(){return l},isBuffering:function(){return c},getCurrentMediaElement:function(){return u},getCurrentMediaDuration:function(){return p},hasCurrentSlideEnded:function(){return d},isCurrentSlideReady:function(){return m},getPreviousSlideMediaElement:function(){return h},isFullscreen:function(){return f},hasEnded:function(){return g},getSettings:function(){return b},getSlideCount:function(){return v}})},1436:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:o()("wp-story",t)})}},79885:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},87138:function(e,t,n){"use strict";n.d(t,{G0:function(){return r},Gp:function(){return a},S9:function(){return o},VF:function(){return i},K3:function(){return s},XJ:function(){return l},xV:function(){return c},bK:function(){return u},HE:function(){return p},Tr:function(){return d},pC:function(){return m},FP:function(){return h},tm:function(){return f}});const r=0,a=50,o=0,i=0,s=15,l=1,c=5,u=50,p=15,d=0,m=50,h=10,f="16px"},45643:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(4096),l=n(80790),c=n(87138);const __=a.__;function u(e){let{buttonBackgroundColor:t,borderColor:n,buttonGradient:a,borderRadius:u,borderWeight:p,buttonOnNewLine:d,emailFieldBackgroundColor:m,fallbackButtonBackgroundColor:h,fallbackTextColor:f,fontSize:g,isGradientAvailable:b,padding:v,setAttributes:k,setButtonBackgroundColor:y,setTextColor:E,showSubscribersTotal:w,spacing:_,subscriberCount:C,textColor:j,buttonWidth:S,successMessage:x}=e;return(0,r.createElement)(r.Fragment,null,b&&(0,r.createElement)(i.__experimentalPanelColorGradientSettings,{title:__("Color Settings","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:t.color,onColorChange:y,gradientValue:a.gradientValue,onGradientChange:a.setGradient,label:__("Button Background Color","jetpack")},{colorValue:j.color,onColorChange:E,label:__("Button Text Color","jetpack")},{colorValue:n.color,onColorChange:e=>{k({borderColor:e,customBorderColor:e})},label:__("Border Color","jetpack")}],initialOpen:!0},(0,r.createElement)(i.ContrastChecker,{fontSize:g.size,textColor:j.color,backgroundColor:m.color,fallbackButtonBackgroundColor:h,fallbackTextColor:f})),!b&&(0,r.createElement)(i.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:t.color,onChange:y,label:__("Button Background Color","jetpack")},{value:j.color,onChange:E,label:__("Button Text Color","jetpack")},{value:n.color,onColorChange:e=>{k({borderColor:e,customBorderColor:e})},label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(i.ContrastChecker,{fontSize:g.size,textColor:j.color,backgroundColor:m.color,fallbackButtonBackgroundColor:h,fallbackTextColor:f})),(0,r.createElement)(o.PanelBody,{title:__("Text Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(i.FontSizePicker,{withSlider:!0,value:g.size,onChange:e=>{const t=e||c.tm;k({fontSize:t,customFontSize:t})}})),(0,r.createElement)(o.PanelBody,{title:__("Border Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(o.RangeControl,{value:u,label:__("Border Radius","jetpack"),min:c.G0,max:c.Gp,initialPosition:c.S9,allowReset:!0,onChange:e=>k({borderRadius:e})}),(0,r.createElement)(o.RangeControl,{value:p,label:__("Border Weight","jetpack"),min:c.VF,max:c.K3,initialPosition:c.XJ,allowReset:!0,onChange:e=>k({borderWeight:e})})),(0,r.createElement)(o.PanelBody,{title:__("Spacing Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(o.RangeControl,{value:v,label:__("Space Inside","jetpack"),min:c.xV,max:c.bK,initialPosition:c.HE,allowReset:!0,onChange:e=>k({padding:e})}),(0,r.createElement)(o.RangeControl,{value:_,label:__("Space Between","jetpack"),min:c.Tr,max:c.pC,initialPosition:c.FP,allowReset:!0,onChange:e=>k({spacing:e})}),(0,r.createElement)(l.h,{width:S,onChange:e=>k({buttonWidth:e})})),(0,r.createElement)(o.PanelBody,{title:__("Display Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(o.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:w,onChange:()=>{k({showSubscribersTotal:!w})},help:()=>{if(!C||C<1)return __("This will remain hidden on your website until you have at least one subscriber.","jetpack")}}),(0,r.createElement)(o.ToggleControl,{label:__("Place button on new line","jetpack"),checked:d,onChange:()=>{k({buttonOnNewLine:!d})}})),!(0,s.Wp)()&&(0,r.createElement)(o.PanelBody,{title:__("Success Message Text","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__successpanel"},(0,r.createElement)(o.TextareaControl,{value:x,label:__("Success Message Text","jetpack"),hideLabelFromVision:!0,help:__("Save your custom message to display when a user subscribes your website.","jetpack"),onChange:e=>k({successMessage:e})})))}},58363:function(e,t,n){"use strict";var r=n(26233),a=n(80960),o=n(28897),i=n(73300),s=n(56286),l=n(16949);t.Z=[l.Z,s.Z,i.Z,o.Z,a.Z,r.Z]},26233:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(92819);const __=a.__;t.Z={attributes:{subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:e=>({submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal}),isEligible:e=>!(!e.hasOwnProperty("subscribeButton")||!(0,o.isEmpty)(e.subscribeButton)),save:function(e){let{attributes:t}=e;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_subscribers_total="${t.showSubscribersTotal}" show_only_email_and_button="true"]`)}}},80960:function(e,t,n){"use strict";var r=n(65736),a=n(51268);const __=r.__;t.Z={attributes:{subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},migrate:e=>({subscribePlaceholder:e.subscribePlaceholder,showSubscribersTotal:e.showSubscribersTotal,buttonOnNewLine:!0,submitButtonText:e.submitButtonText,buttonBackgroundColor:e.backgroundButtonColor?e.backgroundButtonColor:"primary",customButtonBackgroundColor:e.customBackgroundButtonColor,textColor:e.textButtonColor?e.textButtonColor:"background",customTextColor:e.customTextButtonColor}),save:a.Z}},51268:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{attributes:t}=e;const{showSubscribersTotal:n,submitButtonClasses:a,customBackgroundButtonColor:o,customTextButtonColor:i,submitButtonText:s}=t;return(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form show_only_email_and_button="true" custom_background_button_color="${o}" custom_text_button_color="${i}" submit_button_text="${s}" submit_button_classes="${a}" show_subscribers_total="${n}" ]`)}},80929:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Enter your email address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Sign Up","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"number"},customFontSize:{type:"number"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},69283:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(80929);function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{subscribePlaceholder:o,showSubscribersTotal:l,buttonOnNewLine:c,submitButtonText:u,emailFieldBackgroundColor:p,customEmailFieldBackgroundColor:d,emailFieldGradient:m,customEmailFieldGradient:h,buttonBackgroundColor:f,customButtonBackgroundColor:g,buttonGradient:b,customButtonGradient:v,textColor:k,customTextColor:y,fontSize:E,customFontSize:w,borderRadius:_,borderWeight:C,borderColor:j,customBorderColor:S,padding:x,spacing:P}=t,T=!!a.__experimentalGetGradientClass,N=(0,a.getColorClassName)("color",k),A=(0,a.getFontSizeClass)(E),I=(0,a.getColorClassName)("border-color",j),B=(0,a.getColorClassName)("background-color",f),M=T?(0,a.__experimentalGetGradientClass)(b):void 0,R=(0,a.getColorClassName)("background-color",p),L=T?(0,a.__experimentalGetGradientClass)(m):void 0,Z=i()(0===_?"no-border-radius":void 0,A,I),D=i()(Z,k?"has-text-color":void 0,N,f||b?"has-background":void 0,B,M),F=i()(Z,R,L),O=!R&&h?h:d,z=!B&&v?v:g,U=()=>i()(e,"wp-block-jetpack-subscriptions__supports-newline",c?"wp-block-jetpack-subscriptions__use-newline":void 0,l?"wp-block-jetpack-subscriptions__show-subs":void 0);let $=o,V=u;return"check-text-defaults"===n&&($=o===s.Z.subscribePlaceholder.default?"Enter your email address":o,V=u===s.Z.submitButtonText.default?"Sign Up":u),(0,r.createElement)("div",{className:U()},(0,r.createElement)(r.RawHTML,null,`\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="${$}"\n\t\t\t\tshow_subscribers_total="${l}"\n\t\t\t\tbutton_on_newline="${c}"\n\t\t\t\tsubmit_button_text="${V}"\n\t\t\t\tcustom_background_emailfield_color="${O}"\n\t\t\t\tcustom_background_button_color="${z}"\n\t\t\t\tcustom_text_button_color="${y}"\n\t\t\t\tcustom_font_size="${w||16}"\n\t\t\t\tcustom_border_radius="${_||0}"\n\t\t\t\tcustom_border_weight="${C||1}"\n\t\t\t\tcustom_border_color="${S}"\n\t\t\t\tcustom_padding="${x||15}"\n\t\t\t\tcustom_spacing="${P||10}"\n\t\t\t\tsubmit_button_classes="${D}"\n\t\t\t\temail_field_classes="${F}"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]`))}},28897:function(e,t,n){"use strict";var r=n(80929),a=n(69283);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n)}}},73300:function(e,t,n){"use strict";var r=n(80929),a=n(69283);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n,"check-text-defaults")}}},56286:function(e,t,n){"use strict";var r=n(80929),a=n(14556);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:a.ZP}},14556:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(80929);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:j,borderColor:S,customBorderColor:x,padding:P,spacing:T}=n,N=!!a.__experimentalGetGradientClass,A=(0,a.getColorClassName)("color",y),I=(0,a.getFontSizeClass)(w),B=(0,a.getColorClassName)("border-color",S),M=(0,a.getColorClassName)("background-color",g),R=N?(0,a.__experimentalGetGradientClass)(v):void 0,L=(0,a.getColorClassName)("background-color",d),Z=N?(0,a.__experimentalGetGradientClass)(h):void 0,D=i()(0===C?"no-border-radius":void 0,I,B),F=i()(D,y?"has-text-color":void 0,A,g||v?"has-background":void 0,M,R),O=i()(D,L,Z),z=!L&&f?f:m,U=!M&&k?k:b,$={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:z,custom_background_button_color:U,custom_text_button_color:E,custom_font_size:_||16,custom_border_radius:C||0,custom_border_weight:j||1,custom_border_color:x,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:F,email_field_classes:O,show_only_email_and_button:!0},V=(0,s.reduce)($,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${V}]`))}},61798:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},16949:function(e,t,n){"use strict";var r=n(61798),a=n(75799);t.Z={attributes:r.Z,save:a.Z}},75799:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(61798);function c(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:c,buttonOnNewLine:u,submitButtonText:p,emailFieldBackgroundColor:d,customEmailFieldBackgroundColor:m,emailFieldGradient:h,customEmailFieldGradient:f,buttonBackgroundColor:g,customButtonBackgroundColor:b,buttonGradient:v,customButtonGradient:k,textColor:y,customTextColor:E,fontSize:w,customFontSize:_,borderRadius:C,borderWeight:j,borderColor:S,customBorderColor:x,padding:P,spacing:T,buttonWidth:N}=n,A=!!a.__experimentalGetGradientClass,I=(0,a.getColorClassName)("color",y),B=(0,a.getFontSizeClass)(w),M=(0,a.getColorClassName)("border-color",S),R=(0,a.getColorClassName)("background-color",g),L=A?(0,a.__experimentalGetGradientClass)(v):void 0,Z=(0,a.getColorClassName)("background-color",d),D=A?(0,a.__experimentalGetGradientClass)(h):void 0,F=i()(0===C?"no-border-radius":void 0,B,M),O=i()(F,y?"has-text-color":void 0,I,g||v?"has-background":void 0,R,L),z=i()(F,Z,D),U=!Z&&f?f:m,$=!R&&k?k:b,V=N||void 0,G={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:c,button_on_newline:u,submit_button_text:p!==l.Z.submitButtonText.default?p:void 0,custom_background_emailfield_color:U,custom_background_button_color:$,custom_text_button_color:E,custom_font_size:_||"16px",custom_border_radius:C||0,custom_border_weight:j||1,custom_border_color:x,custom_button_width:V,custom_padding:P||15,custom_spacing:T||10,submit_button_classes:O,email_field_classes:z,show_only_email_and_button:!0},H=(0,s.reduce)(G,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",u?"wp-block-jetpack-subscriptions__use-newline":void 0,c?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${H}]`))}},73228:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(86989),l=n.n(s),c=n(65736),u=n(55609),p=n(52175),d=n(94333),m=n(79885),h=n(14087),f=n(87138),g=n(45643);const __=c.__,_n=c._n,{getComputedStyle:b}=window,v=!!p.__experimentalUseGradient,k=(0,u.withFallbackStyles)(((e,t)=>{const{buttonBackgroundColor:n,textColor:r}=t,a=n&&n.color,o=r&&r.color,i=e.querySelector(".wp-block-jetpack-subscriptions__button");return{fallbackButtonBackgroundColor:a||!e?void 0:i&&b(i).backgroundColor,fallbackTextColor:o||!e?void 0:i&&b(i).color}}));t.Z=(0,d.compose)([(0,p.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),(0,p.withFontSizes)("fontSize"),k])((function(e){const{className:t,attributes:n,setAttributes:a,emailFieldBackgroundColor:s,buttonBackgroundColor:d,setButtonBackgroundColor:b,fallbackButtonBackgroundColor:k,textColor:y,fallbackTextColor:E,setTextColor:w,borderColor:_,fontSize:C}=e,j=(0,h.S)(m.Z,n);(0,i.isEqual)(j,n)||a(j);const{borderRadius:S,borderWeight:x,buttonWidth:P,padding:T,spacing:N,submitButtonText:A,subscribePlaceholder:I,showSubscribersTotal:B,buttonOnNewLine:M,successMessage:R}=j,[L,Z]=(0,r.useState)(""),[D,F]=(0,r.useState)(""),O=v?(0,p.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},z=v?(0,p.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},U={"no-border-radius":0===S,[C.class]:C.class,"has-text-color":y.color,[y.class]:y.class},$={...U,"has-background":s.color||O.gradientValue,[s.class]:!O.gradientValue&&s.class,[O.gradientClass]:O.gradientClass},V={...U,"has-background":d.color||z.gradientValue,[d.class]:!z.gradientValue&&d.class,[z.gradientClass]:z.gradientClass},G=e=>e||f.FP,H={color:y.color,borderColor:_.color,borderRadius:S?S+"px":f.S9+"px",borderWidth:x?x+"px":f.XJ+"px",fontSize:C.size?C.size:f.tm,padding:(e=>{const t=e||f.HE;return t+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(T)},q={...H,...!s.color&&O.gradientValue?{background:O.gradientValue}:{backgroundColor:s.color}},W={...H,...!d.color&&z.gradientValue?{background:z.gradientValue}:{backgroundColor:d.color},...M?{marginTop:G(N)+"px"}:{marginLeft:G(N)+"px"},width:P};return(0,r.useEffect)((()=>{l()({path:"/wpcom/v2/subscribers/count"}).then((e=>{e.hasOwnProperty("count")?(Z((0,c.sprintf)(
71
  /* translators: Placeholder is a number of subscribers. */
72
+ _n("Join %s other subscriber","Join %s other subscribers",e.count,"jetpack"),e.count)),F(e.count)):(Z(__("Subscriber count unavailable","jetpack")),F(0))}))}),[]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(g.Z,{buttonBackgroundColor:d,borderColor:_,buttonGradient:z,borderRadius:S,borderWeight:x,buttonOnNewLine:M,emailFieldBackgroundColor:s,fallbackButtonBackgroundColor:k,fallbackTextColor:E,fontSize:C,isGradientAvailable:v,padding:T,setAttributes:a,setButtonBackgroundColor:b,setTextColor:w,showSubscribersTotal:B,spacing:N,subscriberCount:D,textColor:y,buttonWidth:P,successMessage:R})),(0,r.createElement)("div",{className:o()(t,"wp-block-jetpack-subscriptions__supports-newline",M?"wp-block-jetpack-subscriptions__use-newline":void 0,B?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,r.createElement)(u.TextControl,{placeholder:I,disabled:!0,className:o()($,"wp-block-jetpack-subscriptions__textfield"),style:q}),(0,r.createElement)(p.RichText,{className:o()(V,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:W,value:A,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),B&&(0,r.createElement)("p",{className:"wp-block-jetpack-subscriptions__subscount"},L)))}))},57211:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return h}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(79885),l=n(58363),c=n(73228),u=n(5321),p=n(57535);const __=a.__,_x=a._x,d="subscriptions",m=(0,r.createElement)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Rect,{x:"4.75",y:"6.75",width:"14.5",height:"10.5",rx:"1.25",stroke:(0,p.m)(),strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(o.Path,{d:"M19 7L13.3609 12.2363C12.5935 12.9489 11.4065 12.9489 10.6391 12.2363L5 7",stroke:(0,p.m)(),strokeWidth:"1.5",strokeLinejoin:"bevel",fill:"none"})),h={title:__("Subscription Form","jetpack"),description:(0,r.createElement)("p",null,__("A form enabling readers to get notifications when new posts are published from this site.","jetpack")),icon:{src:m,foreground:(0,p.m)()},category:"grow",keywords:[_x("subscribe","block search term","jetpack"),_x("join","block search term","jetpack"),_x("follow","block search term","jetpack")],attributes:s.Z,edit:c.Z,save:u.Z,transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"blog_subscription"===t},transform:e=>{let{instance:t}=e;return(0,i.createBlock)("jetpack/subscriptions",{showSubscribersTotal:t.raw.show_subscribers_total,submitButtonText:t.raw.subscribe_button,subscribePlaceholder:t.raw.subscribe_placeholder,successMessage:t.raw.success_message})}}]},example:{attributes:{}},deprecated:l.Z}},5321:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(52175),o=n(89105),i=n.n(o),s=n(92819),l=n(79885),c=n(87138);function u(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:o,showSubscribersTotal:u,buttonOnNewLine:p,submitButtonText:d,emailFieldBackgroundColor:m,customEmailFieldBackgroundColor:h,emailFieldGradient:f,customEmailFieldGradient:g,buttonBackgroundColor:b,customButtonBackgroundColor:v,buttonGradient:k,customButtonGradient:y,textColor:E,customTextColor:w,fontSize:_,customFontSize:C,borderRadius:j,borderWeight:S,borderColor:x,customBorderColor:P,padding:T,spacing:N,buttonWidth:A,successMessage:I}=n,B=!!a.__experimentalGetGradientClass,M=(0,a.getColorClassName)("color",E),R=(0,a.getFontSizeClass)(_),L=(0,a.getColorClassName)("border-color",x),Z=(0,a.getColorClassName)("background-color",b),D=B?(0,a.__experimentalGetGradientClass)(k):void 0,F=(0,a.getColorClassName)("background-color",m),O=B?(0,a.__experimentalGetGradientClass)(f):void 0,z=i()(0===j?"no-border-radius":void 0,R,L),U=i()(z,E?"has-text-color":void 0,M,b||k?"has-background":void 0,Z,D),$=i()(z,F,O),V=!F&&g?g:h,G=!Z&&y?y:v,H=A||void 0,q={subscribe_placeholder:o!==l.Z.subscribePlaceholder.default?o:void 0,show_subscribers_total:u,button_on_newline:p,submit_button_text:d!==l.Z.submitButtonText.default?d:void 0,custom_background_emailfield_color:V,custom_background_button_color:G,custom_text_button_color:w,custom_font_size:C||c.tm,custom_border_radius:j||c.S9,custom_border_weight:S||c.XJ,custom_border_color:P,custom_button_width:H,custom_padding:T||c.HE,custom_spacing:N||c.FP,submit_button_classes:U,email_field_classes:$,show_only_email_and_button:!0,success_message:I},W=(0,s.reduce)(q,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",p?"wp-block-jetpack-subscriptions__use-newline":void 0,u?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(r.RawHTML,null,`[jetpack_subscription_form${W}]`))}},28526:function(e,t,n){"use strict";n.d(t,{RA:function(){return r},q3:function(){return a},hI:function(){return o},Z5:function(){return i},GP:function(){return s},xJ:function(){return l},sw:function(){return c},EU:function(){return u},yw:function(){return p},P0:function(){return d}});const r=["image"],a=4,o=20,i=20,s=2e3,l="circle",c="columns",u="rectangular",p="square",d=[{isDefault:!0,name:u},{name:l},{name:p},{name:c}]},70132:function(e,t,n){"use strict";var r=n(25689),a=n(47330),o=n(35660);t.Z=[o,a,r]},66105:function(e,t,n){"use strict";n.d(t,{q3:function(){return r},hI:function(){return a},GP:function(){return o},EU:function(){return i},P0:function(){return s}});const r=4,a=20,o=2e3,i="rectangular",s=[{isDefault:!0,name:i},{name:"circle"},{name:"square"},{name:"columns"}]},2589:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(11313);function o(e){const{"aria-label":t,alt:n,height:o,id:i,link:s,linkTo:l,origUrl:c,url:u,width:p}=e;if((0,a.isBlobURL)(c))return null;let d;switch(l){case"media":d=u;break;case"attachment":d=s}const m=(0,r.createElement)("img",{alt:n,"aria-label":t,"data-height":o,"data-id":i,"data-link":s,"data-url":c,"data-width":p,src:u});return(0,r.createElement)("figure",{className:"tiled-gallery__item"},d?(0,r.createElement)("a",{href:d},m):m)}},25689:function(e,t,n){"use strict";n.r(t),n.d(t,{save:function(){return r.Z},attributes:function(){return a},support:function(){return o}});var r=n(19092);const a={align:{default:"center",type:"string"},className:{default:`is-style-${n(66105).EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},caption:{selector:"figcaption",source:"html",type:"string"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"}},o={align:["center","wide","full"],customClassName:!1,html:!1}},43064:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},7696:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},17357:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(69307),a=n(40278),o=n(65736),i=n(82827),s=n(11313),l=n(2589),c=n(1077),u=n(47536),p=n(66105);const __=o.__;class d extends r.Component{photonize(e){let{height:t,width:n,url:r}=e;if(!r)return;if((0,s.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;const o=r.split("?",1)[0],l=function(e){const{host:t}=(0,i.Qc)(e);return/\.files\.wordpress\.com$/.test(t)}(r)?h:a.Z,{layoutStyle:c}=this.props;if(m(c)&&n&&t){const e=Math.min(p.GP,n,t);return l(o,{resize:`${e},${e}`})}return l(o)}renderImage(e,t){const{images:n,linkTo:a,selectedImage:i}=this.props,s=(0,o.sprintf)(
73
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */
74
+ __("image %1$d of %2$d in gallery","jetpack"),t+1,n.length);return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":s,height:e.height,id:e.id,origUrl:e.url,isSelected:i===t,key:t,link:e.link,linkTo:a,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:i}=this.props,s=m(i)?u.Z:c.Z,l=this.props.images.map(this.renderImage,this);return(0,r.createElement)("div",{className:n},(0,r.createElement)(s,{align:e,columns:a,images:o,layoutStyle:i,renderedImages:l}),t)}}function m(e){return["circle","square"].includes(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},{auth:r,hash:a,port:o,query:s,search:l,...c}=(0,i.Qc)(e);return c.query=Object.keys(t).reduce(((e,r)=>Object.assign(e,{[n.hasOwnProperty(r)?n[r]:r]:t[r]})),{}),(0,i.WU)(c)}},1077:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(27538),a=n.n(r),o=n(69307),i=n(54166),s=n(43064),l=n(7696),c=n(8292),u=n(37335),p=n(54794);class d extends o.Component{constructor(){super(...arguments),a()(this,"gallery",(0,o.createRef)()),a()(this,"pendingRaf",null),a()(this,"ro",null),a()(this,"handleGalleryResize",(e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t;(0,u.W)(n).forEach((t=>(0,u.i)(t,e)))}}))}))}componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new i.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:a}=this.props,i=(0,p.h9)(n),u="columns"===r?(0,p.sv)(i,t):(0,p.T9)(i,{isWide:["full","wide"].includes(e)});let d=0;return(0,o.createElement)(l.Z,{galleryRef:this.gallery},u.map(((e,t)=>(0,o.createElement)(c.Z,{key:t},e.map(((e,t)=>{const n=a.slice(d,d+e);return d+=e,(0,o.createElement)(s.Z,{key:t},n)}))))))}}},54794:function(e,t,n){"use strict";n.d(t,{h9:function(){return a},sv:function(){return i},T9:function(){return j}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=P([2,1,2],5),l=T([N,N,A,N,N]),c=T([N,N,N,A,N,N,N]),u=P([3,1,3],5),p=T([A,N,N,A]),d=P([1,2,1],5),m=T([A,N,N,N]),h=P([1,3],3),f=T([N,N,N,A]),g=P([3,1],3),b=T([B(1.6),(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2))]),v=P([1,2],3),k=P([1,1,1,1,1],1),y=P([1,1,1,1],1),E=P([1,1,1],3),w=T([(0,r.overEvery)(I(.9),B(2)),(0,r.overEvery)(I(.9),B(2)),B(1.6)]),_=P([2,1],3),C=T([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&s(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(e)?[1,2,1]:m(a)&&h(e)?[1,3]:f(a)&&g(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:x(e,a)?[1,1,1,1]:S(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),y=(0,r.sum)(o),E=a.slice(y);return n(i,E)};return n([],e)}function S(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}function x(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function P(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function T(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function N(e){return e>=1&&e<2}function A(e){return e<1}function I(e){return t=>t>=e}function B(e){return t=>t<e}},37335:function(e,t,n){"use strict";n.d(t,{i:function(){return o},W:function(){return i}});var r=n(66105);function a(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function o(e,t){!function(e,t,n){let[o,i]=t;const p=1/o*(n-r.q3*(e.childElementCount-1)-i);!function(e,t){let{rawHeight:n,rowWidth:o}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*c(e)[0])),d=a(p,o);i.forEach(((e,t)=>{const o=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:o}=t;const i=a(l(e).map((e=>o/u(e))),n);Array.from(e.children).forEach(((e,t)=>{const n=i[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:o})}))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){return s(e).map(c).reduce(((e,t)=>{let[n,r]=e,[a,o]=t;return[n+a,r+o]}),[0,0])}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},8292:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},47536:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(92819),o=n(8292),i=n(43064),s=n(7696),l=n(66105);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(l.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(o.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},19092:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(17357),o=n(98085),i=n(66105);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{images:n}=t;if(!n.length)return null;const{align:l,className:c,columns:u=s(t),linkTo:p}=t;return(0,r.createElement)(a.Z,{align:l,className:c,columns:u,images:n,layoutStyle:(0,o.t)(i.P0,c),linkTo:p})}},96470:function(e,t,n){"use strict";n.d(t,{hI:function(){return r},Z5:function(){return a},GP:function(){return o},xJ:function(){return i},EU:function(){return s},P0:function(){return l}});const r=20,a=20,o=2e3,i="circle",s="rectangular",l=[{isDefault:!0,name:s},{name:i},{name:"square"},{name:"columns"}]},72285:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(11313);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,i.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p});return(0,r.createElement)("figure",{className:o()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},47330:function(e,t,n){"use strict";n.r(t),n.d(t,{save:function(){return a.Z},attributes:function(){return o},supports:function(){return i}});var r=n(96470),a=n(96659);const o={align:{default:"center",type:"string"},className:{default:`is-style-${r.EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1}},71410:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},86159:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},15515:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(69307),a=n(65736),o=n(89105),i=n.n(o),s=n(72285),l=n(56556),c=n(14916),u=n(92805),p=n(96470);const __=a.__;class d extends r.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,linkTo:l,layoutStyle:c,selectedImage:p}=this.props,d=(0,a.sprintf)(
75
  /* translators: %1$d is the order number of the image, %2$d is the total number of images. */