PK qhY๎ถJ฿F ฿F ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/newexitinggames.kerihosting.com/wp-content/plugins/jetpack/_inc/blocks/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/newexitinggames.kerihosting.com/wp-content/plugins/jetpack/_inc/blocks/editor.js |
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(t){for(var n,r,o=t[0],c=t[1],i=0,l=[];i<o.length;i++)r=o[i],Object.prototype.hasOwnProperty.call(a,r)&&a[r]&&l.push(a[r][0]),a[r]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(s&&s(t);l.length;)l.shift()()}var n={},r={6:0},a={6:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[];r[e]?t.push(r[e]):0!==r[e]&&{29:1,30:1}[e]&&t.push(r[e]=new Promise((function(t,n){for(var a="rtl"===document.dir?({29:"vendors~map/mapbox-gl",30:"vendors~swiper"}[e]||e)+"."+{29:"2c2e1671860a4cf5d781",30:"86b80b8b1cc951f50101"}[e]+".rtl.css":({29:"vendors~map/mapbox-gl",30:"vendors~swiper"}[e]||e)+"."+{29:"2c2e1671860a4cf5d781",30:"86b80b8b1cc951f50101"}[e]+".css",c=o.p+a,i=document.getElementsByTagName("link"),l=0;l<i.length;l++){var s=(p=i[l]).getAttribute("data-href")||p.getAttribute("href");if("stylesheet"===p.rel&&(s===a||s===c))return t()}var u=document.getElementsByTagName("style");for(l=0;l<u.length;l++){var p;if((s=(p=u[l]).getAttribute("data-href"))===a||s===c)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.setAttribute("data-webpack",!0),d.onload=t,d.onerror=function(t){var a=t&&t.target&&t.target.src||c,o=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=a,delete r[e],d.parentNode.removeChild(d),n(o)},d.href=c,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){r[e]=0})));var n=a[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,r){n=a[e]=[t,r]}));t.push(n[2]=c);var i,l=document.createElement("script");l.charset="utf-8",l.timeout=120,o.nc&&l.setAttribute("nonce",o.nc),l.src=function(e){return o.p+""+({29:"vendors~map/mapbox-gl",30:"vendors~swiper"}[e]||e)+"."+{29:"2c2e1671860a4cf5d781",30:"86b80b8b1cc951f50101"}[e]+".js"}(e);var s=new Error;i=function(t){l.onerror=l.onload=null,clearTimeout(u);var n=a[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",s.name="ChunkLoadError",s.type=r,s.request=o,n[1](s)}a[e]=void 0}};var u=setTimeout((function(){i({type:"timeout",target:l})}),12e4);l.onerror=l.onload=i,document.head.appendChild(l)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackJsonp=window.webpackJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var s=i;return o(o.s=391)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){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}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(3);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){var r; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var c=a.apply(null,r);c&&e.push(c)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(87),a=n(88),o=n(74),c=n(89);e.exports=function(e,t){return r(e)||a(e,t)||o(e,t)||c()}},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(125),a=n(6);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(126);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(92),a=n(24),o=r.a["Jetpack Green 40"];function c(){return Object(a.a)()||Object(a.b)()?"#1e1e1e":o}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return f}));var r=n(7),a=n.n(r),o=n(1),c=n(30),i=n(11),l=n(141),s=n(48),u=n(93),p={paid:Object(o._x)("paid","Short label appearing near a block requiring a paid plan","jetpack"),beta:Object(o.__)("beta","jetpack")},d=l.beta||[];function m(e,t){return"missing_plan"===e&&t.required_plan}function b(e){var t=[];return d.includes(e)&&t.push(p.beta),t}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length?"".concat(e," (").concat(t.join(", "),")"):e}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=Object(s.a)(e),l=o.available,p=o.details,d=o.unavailableReason,f=m(d,p),g=r?"jetpack/":"";if(!l&&!f)return!1;var j=Object(i.registerBlockType)(g+e,a()({},t,{title:h(t.title,b(e))}));return f&&Object(c.addFilter)("editor.BlockListBlock","".concat(g+e,"-with-has-warning-is-interactive-class-names"),Object(u.a)(g+e)),n.forEach((function(e){return Object(i.registerBlockType)(g+e.name,e.settings)})),j}},function(e,t,n){var r=n(122),a=n(123),o=n(74),c=n(124);e.exports=function(e){return r(e)||a(e)||o(e)||c()}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";function r(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function a(){return"simple"===r()}function o(){return"atomic"===r()}n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}))},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){"use strict";var r=n(0),a=n(2);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:24,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0 0 24 24";return Object(r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:o},Object(r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),e)}},function(e,t){function n(e,t,n,r,a,o,c){try{var i=e[o](c),l=i.value}catch(s){return void n(s)}i.done?t(l):Promise.resolve(l).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,o){var c=e.apply(t,r);function i(e){n(c,a,o,i,l,"next",e)}function l(e){n(c,a,o,i,l,"throw",e)}i(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return c})),n.d(t,"j",(function(){return i})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return d}));var r=["image"],a=4,o=20,c=20,i=2e3,l="circle",s="columns",u="rectangular",p="square",d=[{isDefault:!0,name:u},{name:l},{name:p},{name:s}]},function(e,t){!function(){e.exports=this.wp.hooks}()},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 c(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var i=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(i.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),s=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(131);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&","<":"<",">":">",'"':"""};function b(e){return m[e]}var h=/[.?*+^$[\]\\(){}|-]/g;var f=n(102);t.lib={},t.lib.mdurl=n(132),t.lib.ucmicro=n(245),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(i,"$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)&&s.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?c(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=c,t.escapeHtml=function(e){return p.test(e)?e.replace(d,b):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 f.test(e)},t.escapeRE=function(e){return e.replace(h,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"แนพ"==="แบ".toLowerCase()&&(e=e.replace(/แบ/g,"ร")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return m})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return y})),n.d(t,"e",(function(){return _})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return w})),n.d(t,"m",(function(){return E})),n.d(t,"b",(function(){return C})),n.d(t,"a",(function(){return x})),n.d(t,"k",(function(){return S})),n.d(t,"l",(function(){return A}));var r=n(23),a=n.n(r),o=n(0),c=n(2),i=n(8),l=n.n(i),s=n(92),u=(n(200),n(17)),p=s.a["Jetpack Green 40"],d=function(e){return Object(o.createElement)(c.SVG,a()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),Object(o.createElement)(c.Path,{d:"M6.3 7l-4.4 4.5c0 .1-.1.2-.1.3-.1.1 0 .2.2.2h7c1.1 0 2-.9 2-2V7H6.3zM22 12h-7c-1.1 0-2 .9-2 2v3h4.7l4.4-4.5c0-.1.1-.2.1-.3.1-.1 0-.2-.2-.2zM12.5 1.9c-.1 0-.2-.1-.3-.1-.1-.1-.2 0-.2.2v7c0 1.1.9 2 2 2h3V6.3l-4.5-4.4zM10 13H7v4.7l4.5 4.4c.1 0 .2.1.3.1.2 0 .3-.1.3-.3v-7c-.1-1-1-1.9-2.1-1.9z"}))},m=function(e){return Object(o.createElement)(c.SVG,a()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),Object(o.createElement)(c.Path,{d:"M14 7H9v10h3.9v-3.8H14c1.7 0 3.1-1.4 3.1-3.1C17.2 8.4 15.8 7 14 7z"}),Object(o.createElement)(c.Path,{d:"M20.5 2h-17C2.7 2 2 2.7 2 3.5v17c0 .8.7 1.5 1.5 1.5h17c.8 0 1.5-.7 1.5-1.5v-17c0-.8-.7-1.5-1.5-1.5zm-5.6 13.2V19H7V5h7c2.8 0 5.1 2.3 5.1 5.1.1 2.5-1.8 4.7-4.2 5.1z"}))},b=function(){return Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",viewBox:"135.688 36.52 511.623 510.753"},Object(o.createElement)(c.Path,{fill:"#DD4B39",stroke:"#DD4B39",d:"M391.6 36.6c1.4.8 2.6 2 3.7 3.2 41.3 41.5 82.7 83 123.899 124.6-26 25.6-51.6 51.6-77.399 77.3-9.7 9.8-19.601 19.4-29.2 29.4-7.2-17.4-14.1-34.9-21-52.4 0-18.2.1-36.4 0-54.7-.1-42.4-.2-84.9 0-127.4z"}),Object(o.createElement)(c.Path,{fill:"#EF851C",stroke:"#EF851C",d:"M263.5 164h128.1c.1 18.3 0 36.5 0 54.7-7.1 17.2-14 34.5-20.8 51.9-2.2-1.2-3.8-3-5.5-4.8L263.9 164.4l-.4-.4z"}),Object(o.createElement)(c.Path,{fill:"#7E3794",stroke:"#7E3794",d:"M519.199 164.4l.4-.3c-.1 42.6-.1 85.3 0 127.9h-55.1c-17.2-7.2-34.601-13.8-51.9-20.9 9.6-10 19.5-19.6 29.2-29.4 25.801-25.7 51.4-51.7 77.4-77.3z"}),Object(o.createElement)(c.Path,{fill:"#FFBB1B",stroke:"#FFBB1B",d:"M242.6 185.5c7.2-6.9 13.9-14.3 21.3-21.1l101.4 101.4c1.7 1.8 3.3 3.6 5.5 4.8-2.3 1.7-5.2 2.3-7.8 3.5-14.801 6-29.801 11.6-44.5 18-18.301-.2-36.601-.1-54.9-.1-42.6-.1-85.2.2-127.8-.1 35.5-35.6 71.2-71 106.8-106.4z"}),Object(o.createElement)(c.Path,{fill:"#1A8763",stroke:"#1A8763",d:"M263.6 292c18.3 0 36.6-.1 54.9.1 17.3 7.1 34.6 13.8 51.899 20.8C342 341.7 313.3 370.1 284.8 398.8c-7.2 6.8-13.7 14.3-21.3 20.7 0-42.5-.1-85 .1-127.5z"}),Object(o.createElement)(c.Path,{fill:"#427FED",stroke:"#427FED",d:"M464.5 292h55.1c42.5.1 85.1-.1 127.6.1-27.3 27.7-55 55.1-82.399 82.6-15.2 15.1-30.2 30.399-45.4 45.3-34-34.4-68.5-68.4-102.6-102.8-1.4-1.5-2.9-2.8-4.601-3.8 2.9-1.801 6.101-2.7 9.2-4 14.4-5.8 28.799-11.4 43.1-17.4z"}),Object(o.createElement)(c.Path,{fill:"#65B045",stroke:"#65B045",d:"M370.4 312.9c7.3 17.399 13.9 35 21.2 52.399-.1 18.2 0 36.5-.1 54.7v88c-.2 13.1.3 26.2-.2 39.2-2.101-1-3.4-2.9-5.101-4.5C345.3 501.6 304.5 460.5 263.5 419.5c7.6-6.4 14.1-13.9 21.3-20.7 28.5-28.7 57.2-57.1 85.6-85.9z"}),Object(o.createElement)(c.Path,{fill:"#43459D",stroke:"#43459D",d:"M412.199 313.4c1.7 1 3.2 2.3 4.601 3.8 34.1 34.4 68.6 68.4 102.6 102.8-42.7-.1-85.3.1-127.899 0 .1-18.2 0-36.5.1-54.7 6.699-17.3 13.899-34.5 20.598-51.9z"}))},h=function(e){var t=e.size,n=void 0===t?24:t,r=e.className;return Object(o.createElement)(c.SVG,{className:l()("jetpack-logo",r),width:n,height:n,viewBox:"0 0 32 32"},Object(o.createElement)(c.Path,{className:"jetpack-logo__icon-circle",fill:p,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),Object(o.createElement)(c.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:"15,19 7,19 15,3 "}),Object(o.createElement)(c.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:"17,29 17,13 25,13 "}))},f=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M20.007 3H3.993C3.445 3 3 3.445 3 3.993v16.013c0 .55.445.994.993.994h8.62v-6.97H10.27V11.31h2.346V9.31c0-2.325 1.42-3.59 3.494-3.59.993 0 1.847.073 2.096.106v2.43h-1.438c-1.128 0-1.346.537-1.346 1.324v1.734h2.69l-.35 2.717h-2.34V21h4.587c.548 0 .993-.445.993-.993V3.993c0-.548-.445-.993-.993-.993z"}))),g=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"}))),j=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M19.7 3H4.3C3.582 3 3 3.582 3 4.3v15.4c0 .718.582 1.3 1.3 1.3h15.4c.718 0 1.3-.582 1.3-1.3V4.3c0-.718-.582-1.3-1.3-1.3zM8.34 18.338H5.666v-8.59H8.34v8.59zM7.003 8.574c-.857 0-1.55-.694-1.55-1.548 0-.855.692-1.548 1.55-1.548.854 0 1.547.694 1.547 1.548 0 .855-.692 1.548-1.546 1.548zm11.335 9.764h-2.67V14.16c0-.995-.017-2.277-1.387-2.277-1.39 0-1.6 1.086-1.6 2.206v4.248h-2.668v-8.59h2.56v1.174h.036c.357-.675 1.228-1.387 2.527-1.387 2.703 0 3.203 1.78 3.203 4.092v4.71z"}))),v=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}))),k=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05h-9.36z"}))),y={foreground:Object(u.a)(),src:Object(o.createElement)(c.SVG,{viewBox:"0 0 100 100"},Object(o.createElement)(c.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"}))},_={foreground:Object(u.a)(),src:Object(o.createElement)(c.SVG,{viewBox:"0 0 24 24"},Object(o.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})))},O={foreground:Object(u.a)(),src:Object(o.createElement)(c.SVG,{viewBox:"0 0 24 24"},Object(o.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M15.9216 2H2.98533C2.43803 2 1.99023 2.45 1.99023 3V17L5.97062 13H15.9216C16.4689 13 16.9167 12.55 16.9167 12V3C16.9167 2.45 16.4689 2 15.9216 2ZM14.9265 4V11H5.14469L3.98043 12.17V4H14.9265ZM18.9069 6H20.8971C21.4444 6 21.8922 6.45 21.8922 7V22L17.9118 18H6.96572C6.41842 18 5.97062 17.55 5.97062 17V15H18.9069V6Z"})))},w={foreground:Object(u.a)(),src:Object(o.createElement)(c.SVG,{viewBox:"0 0 24 24"},Object(o.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(o.createElement)(c.G,null,Object(o.createElement)(c.Path,{d:"M3.98042 2H19.9019C20.9965 2 21.8921 2.9 21.8921 4V16C21.8921 17.1 20.9965 18 19.9019 18H5.97061L1.99023 22V4C1.99023 2.9 2.88582 2 3.98042 2ZM5.97061 16H19.9019V4H3.98042V18L5.97061 16Z"})))},E=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Path,{d:"M2.5 7.5V4.5H15.5V7.5H10.5V19.5H7.5V7.5H2.5ZM12.5 9.5H21.5V12.5H18.5V19.5H15.5V12.5H12.5V9.5Z"})),C=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Path,{d:"M12.7049 2V6C8.30658 6 4.74414 9.58 4.74414 14C4.74414 18.42 8.30658 22 12.7049 22C17.1032 22 20.6656 18.42 20.6656 14H18.6755C18.6755 17.31 15.9987 20 12.7049 20C9.41113 20 6.73433 17.31 6.73433 14C6.73433 10.69 9.41113 8 12.7049 8V12L17.6804 7L12.7049 2ZM11.6501 12.73L11.4013 14.9L12.068 15.06C12.0753 15.0526 12.0827 15.0447 12.0901 15.0366C12.1131 15.0116 12.1375 14.9851 12.1675 14.97C12.1874 14.96 12.2073 14.9475 12.2272 14.935C12.2471 14.9225 12.2671 14.91 12.287 14.9C12.3268 14.88 12.3865 14.86 12.4362 14.85C12.486 14.84 12.5556 14.83 12.6352 14.83C12.7447 14.83 12.8542 14.85 12.9338 14.88C13.0134 14.91 13.083 14.96 13.1427 15.03C13.2024 15.1 13.2422 15.17 13.2721 15.27C13.302 15.37 13.3119 15.47 13.3119 15.58V15.58C13.3119 15.69 13.3119 15.79 13.2821 15.89C13.2522 15.99 13.2124 16.07 13.1726 16.14C13.1328 16.21 13.0631 16.27 12.9935 16.31C12.9238 16.35 12.8343 16.37 12.7248 16.37C12.5556 16.37 12.4163 16.31 12.3069 16.22C12.1974 16.13 12.1377 15.99 12.1178 15.81H11.2819C11.2819 16.01 11.3317 16.19 11.4113 16.34C11.4909 16.49 11.5904 16.63 11.7297 16.73C11.869 16.83 12.0183 16.92 12.1874 16.97C12.3566 17.02 12.5357 17.05 12.7148 17.05C12.9636 17.05 13.1726 17 13.3517 16.93C13.5308 16.86 13.6801 16.75 13.7995 16.62C13.9189 16.49 14.0085 16.34 14.0682 16.17C14.1279 16 14.1577 15.82 14.1577 15.63C14.1577 15.41 14.1179 15.21 14.0682 15.03C14.0184 14.85 13.9289 14.7 13.8194 14.58C13.7099 14.46 13.5706 14.37 13.4114 14.3C13.2522 14.23 13.0731 14.2 12.8641 14.2C12.7945 14.2 12.7248 14.21 12.6651 14.22C12.6352 14.225 12.6054 14.2325 12.5755 14.24C12.5457 14.2475 12.5158 14.255 12.486 14.26C12.4263 14.27 12.3765 14.29 12.3367 14.31C12.3201 14.3183 12.3035 14.325 12.2876 14.3313C12.2654 14.3401 12.2446 14.3483 12.2272 14.36L12.3367 13.44H14.0284V12.73H11.6501Z"})),x=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Path,{d:"M11.9412 2V6C16.3395 6 19.902 9.58 19.902 14C19.902 18.42 16.3395 22 11.9412 22C7.54291 22 3.98047 18.42 3.98047 14H5.97066C5.97066 17.31 8.64746 20 11.9412 20C15.235 20 17.9118 17.31 17.9118 14C17.9118 10.69 15.235 8 11.9412 8V12L6.96575 7L11.9412 2ZM10.8864 12.73L10.6376 14.9L11.3044 15.06C11.3117 15.0526 11.319 15.0447 11.3264 15.0366C11.3494 15.0116 11.3738 14.9851 11.4039 14.97C11.4238 14.96 11.4437 14.9475 11.4636 14.935C11.4835 14.9225 11.5034 14.91 11.5233 14.9C11.5631 14.88 11.6228 14.86 11.6725 14.85C11.7223 14.84 11.792 14.83 11.8716 14.83C11.981 14.83 12.0905 14.85 12.1701 14.88C12.2497 14.91 12.3194 14.96 12.3791 15.03C12.4388 15.1 12.4786 15.17 12.5084 15.27C12.5383 15.37 12.5482 15.47 12.5482 15.58V15.58C12.5482 15.69 12.5482 15.79 12.5184 15.89C12.4885 15.99 12.4487 16.07 12.4089 16.14C12.3691 16.21 12.2995 16.27 12.2298 16.31C12.1601 16.35 12.0706 16.37 11.9611 16.37C11.792 16.37 11.6526 16.31 11.5432 16.22C11.4337 16.13 11.374 15.99 11.3541 15.81H10.5182C10.5182 16.01 10.568 16.19 10.6476 16.34C10.7272 16.49 10.8267 16.63 10.966 16.73C11.1053 16.83 11.2546 16.92 11.4238 16.97C11.5929 17.02 11.7721 17.05 11.9512 17.05C12.1999 17.05 12.4089 17 12.588 16.93C12.7672 16.86 12.9164 16.75 13.0358 16.62C13.1552 16.49 13.2448 16.34 13.3045 16.17C13.3642 16 13.3941 15.82 13.3941 15.63C13.3941 15.41 13.3543 15.21 13.3045 15.03C13.2547 14.85 13.1652 14.7 13.0557 14.58C12.9463 14.46 12.807 14.37 12.6477 14.3C12.4885 14.23 12.3094 14.2 12.1004 14.2C12.0308 14.2 11.9611 14.21 11.9014 14.22C11.8716 14.225 11.8417 14.2325 11.8119 14.24C11.782 14.2475 11.7522 14.255 11.7223 14.26C11.6626 14.27 11.6128 14.29 11.573 14.31C11.5564 14.3183 11.5398 14.325 11.5239 14.3313C11.5017 14.3401 11.481 14.3483 11.4636 14.36L11.573 13.44H13.2647V12.73H10.8864Z"})),S=function(e){var t=e.serviceName,n=e.className,r={className:l()("jetpack-gutenberg-social-icon","is-".concat(t),n),size:24};switch(t){case"facebook":return Object(o.createElement)(c.Icon,a()({icon:f},r));case"twitter":return Object(o.createElement)(c.Icon,a()({icon:g},r));case"linkedin":return Object(o.createElement)(c.Icon,a()({icon:j},r));case"tumblr":return Object(o.createElement)(c.Icon,a()({icon:v},r));case"google":return Object(o.createElement)(c.Icon,a()({icon:k},r))}return null},A=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(o.createElement)(c.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c}));var r="jetpack/media-source",a="is-playing",o="is-error",c="is-paused"},function(e,t){!function(){e.exports=this.wp.blob}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=/^#?[A-Fa-f0-9]{6}$/;function a(e){return r.test(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ee}));var r=n(97),a=n.n(r),o=n(109),c=n.n(o),i=n(110),l=n.n(i),s=n(77),u=n.n(s),p=n(111),d=n.n(p),m=n(45),b=n.n(m),h=n(112),f=n.n(h),g=n(69);function j(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,c=void 0===r?",":r,i=void 0===n?".":n,l="";return(l=(o? /* * Exposes number format capability * * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors). * @license See CREDITS.md * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js */ function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o):""+Math.round(a)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,c)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(i)}var v=c()("i18n-calypso"),k=[function(e){return e}],y={};function _(){x.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function O(e){return Array.prototype.slice.call(e)}function w(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&_("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",O(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&_("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",O(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 E(e,t){var n="gettext";t.context&&(n="p"+n),"string"==typeof t.original&&"string"==typeof t.plural&&(n="n"+n);var r=function(e,t){switch(e){case"gettext":return[t.original];case"ngettext":return[t.original,t.plural,t.count];case"npgettext":return[t.context,t.original,t.plural,t.count];case"pgettext":return[t.context,t.original]}return[]}(n,t);return e[n].apply(e,r)}function C(e,t){for(var n=k.length-1;n>=0;n--){var r=k[n](Object.assign({},t));if(e.state.locale[r.original])return E(e.state.jed,r)}return null}function x(){if(!(this instanceof x))return new x;this.defaultLocaleSlug="en",this.state={numberFormatSettings:{},jed:void 0,locale:void 0,localeSlug:void 0,translations:d()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new g.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}x.throwErrors=!1,x.prototype.moment=b.a,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 j(e,n,r,a)},x.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},x.prototype.setLocale=function(e){if(e&&e[""]&&e[""]["key-hash"]){var t=e[""]["key-hash"],n=function(e,t){var n=!1===t?"":String(t);if(void 0!==y[n+e])return y[n+e];var r=f()().update(e).digest("hex");return y[n+e]=t?r.substr(0,t):r},r=function(e){return function(t){return t.context?(t.original=n(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=n(t.original,e),t}};if("sha1"===t.substr(0,4))if(4===t.length)k.push(r(!1));else{var a=t.substr(5).indexOf("-");if(a<0){var o=Number(t.substr(5));k.push(r(o))}else for(var c=Number(t.substr(5,a)),i=Number(t.substr(6+a)),l=c;l<=i;l++)k.push(r(l))}}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}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.jed=new u.a({locale_data:{messages:this.state.locale}}),b.a.locale(this.state.localeSlug),this.state.numberFormatSettings.decimal_point=E(this.state.jed,w(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=E(this.state.jed,w(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberFormatSettings.decimal_point&&(this.state.numberFormatSettings.decimal_point="."),"number_format_thousands_sep"===this.state.numberFormatSettings.thousands_sep&&(this.state.numberFormatSettings.thousands_sep=","),this.state.translations.clear(),this.stateObserver.emit("change")},x.prototype.getLocale=function(){return this.state.locale},x.prototype.getLocaleSlug=function(){return this.state.localeSlug},x.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.jed.options.locale_data.messages[t]=e[t]);this.state.translations.clear(),this.stateObserver.emit("change")},x.prototype.hasTranslation=function(){return!!C(this,w(arguments))},x.prototype.translate=function(){var e,t=w(arguments),n=!t.components;if(n){try{e=JSON.stringify(t)}catch(i){n=!1}if(e){var r=this.state.translations.get(e);if(r)return r}}var a=C(this,t);if(a||(a=E(this.state.jed,t)),t.args){var o=Array.isArray(t.args)?t.args.slice(0):[t.args];o.unshift(a);try{a=u.a.sprintf.apply(u.a,o)}catch(s){if(!window||!window.console)return;var c=this.throwErrors?"error":"warn";"string"!=typeof s?window.console[c](s):window.console[c]("i18n sprintf error:",o)}}return t.components&&(a=l()({mixedString:a,components:t.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(e){a=e(a,t)})),n&&this.state.translations.set(e,a),a},x.prototype.reRenderTranslations=function(){v("Re-rendering all translations due to external request"),this.state.translations.clear(),this.stateObserver.emit("change")},x.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},x.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)};var S,A,T=x,N=n(7),P=n.n(N),M=n(12),B=n.n(M),I=n(16),F=n.n(I),R=n(13),L=n.n(R),D=n(14),z=n.n(D),U=n(6),V=n.n(U),q=n(15),H=n.n(q),G=n(3),W=n.n(G),$=n(19),K=n.n($),Z=n(9),J=n.n(Z),Y=new T,Q=(Y.moment,Y.numberFormat.bind(Y)),X=(Y.translate.bind(Y),Y.configure.bind(Y),Y.setLocale.bind(Y),Y.getLocale.bind(Y),Y.getLocaleSlug.bind(Y),Y.addTranslations.bind(Y),Y.reRenderTranslations.bind(Y),Y.registerComponentUpdateHook.bind(Y),Y.registerTranslateHook.bind(Y),Y.state,Y.stateObserver,Y.on.bind(Y),Y.off.bind(Y),Y.emit.bind(Y),A={moment:(S=Y).moment,numberFormat:S.numberFormat.bind(S),translate:S.translate.bind(S)},function(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}}(Y),n(54));function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object(X.b)(t);if(!r||isNaN(e))return null;var o=a()({},r,n),c=o.decimal,i=o.grouping,l=o.precision,s=o.symbol,u=e<0?"-":"",p=Q(Math.abs(e),{decimals:l,thousandsSep:i,decPoint:c});return"".concat(u).concat(s).concat(p)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(0),a=n(1),o=n(113),c=n.n(o),i=n(114),l=n.n(i),s=n(115),u=n.n(s),p=n(116),d=n.n(p),m={name:"map",prefix:"jetpack",title:Object(a.__)("Map","jetpack"),icon:Object(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"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(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:[Object(a._x)("maps","block search term","jetpack"),Object(a._x)("location","block search term","jetpack"),Object(a._x)("navigation","block search term","jetpack")],description:Object(a.__)("Add an interactive map showing one or more locations.","jetpack"),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}},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:Object(a.__)("Basic","jetpack"),preview:c.a,isDefault:!0},{name:"black_and_white",label:Object(a.__)("Black and white","jetpack"),preview:l.a},{name:"satellite",label:Object(a.__)("Satellite","jetpack"),preview:u.a},{name:"terrain",label:Object(a.__)("Terrain","jetpack"),preview:d.a}],validAlignments:["center","wide","full"],markerIcon:Object(r.createElement)("svg",{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},Object(r.createElement)("g",{id:"outline-add_location-24px",transform:"translate(-5 -2)"},Object(r.createElement)("polygon",{id:"Shape",points:"0 0 24 0 24 24 0 24"}),Object(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}}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return m})),n.d(t,"f",(function(){return h})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return g}));var r=n(4),a=n(28),o=n(1),c=n(51),i=n(24),l=n(50),s=n(48),u=n(20);function p(e){var t=e.planSlug,n=e.plan,o=e.postId,c=e.postType,s=Object(r.startsWith)(t,"jetpack_")?t:Object(r.get)(n,["path_slug"]),u=["page","post"].includes(c)?"":"edit",p=Object(i.b)()?Object(a.addQueryArgs)("/"+Object(r.compact)([u,c,Object(l.a)(),o]).join("/"),{plan_upgraded:1}):Object(a.addQueryArgs)(window.location.protocol+"//".concat(Object(l.a)().replace("::","/"),"/wp-admin/post.php"),{action:"edit",post:o,plan_upgraded:1});return s&&Object(a.addQueryArgs)("https://wordpress.com/checkout/".concat(Object(l.a)(),"/").concat(s),{redirect_to:p})}function d(e){if(!e)return!1;var t=/^jetpack\//.test(e)?e.substr(8,e.length):e,n=Object(s.a)(t),r=n.available,a=n.unavailableReason;return!r&&"missing_plan"===a}function m(e){if(!e)return!1;var t=/^jetpack\//.test(e)?e.substr(8,e.length):e,n=Object(s.a)(t),r=n.details,a=n.unavailableReason;return Object(u.b)(a,r)}var b=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:Object(o.__)("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:Object(o.__)("Upgrade your plan to upload audio","jetpack")}];function h(){return Object(r.get)(Object(c.a)(),"jetpack.enable_upgrade_nudge",!1)}var f=function(e){return Object(r.map)(b,"name").includes(e)},g=function(e){return Object(r.head)(Object(r.filter)(b,(function(t){return t.name===e})))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return l})),n.d(t,"e",(function(){return s}));var r=n(54),a=n(4),o={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},c=Object.keys(o).map((function(e){var t=Object(r.b)(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(a.trimEnd)(t,"."))}}));function i(e){return o[e]}function l(e,t){return!isNaN(t)&&t>=i(e)}function s(e,t){return e?"number"==typeof e?e:(e=parseFloat(e.replace(new RegExp("\\"+r.a[t].grouping,"g"),"").replace(new RegExp("\\"+r.a[t].decimal,"g"),".")),isNaN(e)?null:e):null}},function(e,t,n){"use strict";var r=n(201),a=n(203);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){a.isString(e)&&(e=v(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var c=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),p=["%","/","?",";","#"].concat(u),d=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=n(204);function v(e,t,n){if(e&&a.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!a.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),i=-1!==o&&o<e.indexOf("#")?"?":"#",s=e.split(i);s[0]=s[0].replace(/\\/g,"/");var v=e=s.join(i);if(v=v.trim(),!n&&1===e.split("#").length){var k=l.exec(v);if(k)return this.path=v,this.href=v,this.pathname=k[1],k[2]?(this.search=k[2],this.query=t?j.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=c.exec(v);if(y){var _=(y=y[0]).toLowerCase();this.protocol=_,v=v.substr(y.length)}if(n||y||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var O="//"===v.substr(0,2);!O||y&&f[y]||(v=v.substr(2),this.slashes=!0)}if(!f[y]&&(O||y&&!g[y])){for(var w,E,C=-1,x=0;x<d.length;x++){-1!==(S=v.indexOf(d[x]))&&(-1===C||S<C)&&(C=S)}-1!==(E=-1===C?v.lastIndexOf("@"):v.lastIndexOf("@",C))&&(w=v.slice(0,E),v=v.slice(E+1),this.auth=decodeURIComponent(w)),C=-1;for(x=0;x<p.length;x++){var S;-1!==(S=v.indexOf(p[x]))&&(-1===C||S<C)&&(C=S)}-1===C&&(C=v.length),this.host=v.slice(0,C),v=v.slice(C),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var T=this.hostname.split(/\./),N=(x=0,T.length);x<N;x++){var P=T[x];if(P&&!P.match(m)){for(var M="",B=0,I=P.length;B<I;B++)P.charCodeAt(B)>127?M+="x":M+=P[B];if(!M.match(m)){var F=T.slice(0,x),R=T.slice(x+1),L=P.match(b);L&&(F.push(L[1]),R.unshift(L[2])),R.length&&(v="/"+R.join(".")+v),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var D=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+D,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!h[_])for(x=0,N=u.length;x<N;x++){var U=u[x];if(-1!==v.indexOf(U)){var V=encodeURIComponent(U);V===U&&(V=escape(U)),v=v.split(U).join(V)}}var q=v.indexOf("#");-1!==q&&(this.hash=v.substr(q),v=v.slice(0,q));var H=v.indexOf("?");if(-1!==H?(this.search=v.substr(H),this.query=v.substr(H+1),t&&(this.query=j.parse(this.query)),v=v.slice(0,H)):t&&(this.search="",this.query={}),v&&(this.pathname=v),g[_]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var G=this.search||"";this.path=D+G}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,c="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(c=j.stringify(this.query));var i=this.search||c&&"?"+c||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(i=i.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(a.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),c=0;c<r.length;c++){var i=r[c];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),s=0;s<l.length;s++){var u=l[s];"protocol"!==u&&(n[u]=e[u])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!g[e.protocol]){for(var p=Object.keys(e),d=0;d<p.length;d++){var m=p[d];n[m]=e[m]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||f[e.protocol])n.pathname=e.pathname;else{for(var b=(e.pathname||"").split("/");b.length&&!(e.host=b.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==b[0]&&b.unshift(""),b.length<2&&b.unshift(""),n.pathname=b.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||"",j=n.search||"";n.path=h+j}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),k=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=k||v||n.host&&e.pathname,_=y,O=n.pathname&&n.pathname.split("/")||[],w=(b=e.pathname&&e.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(w&&(n.hostname="",n.port=null,n.host&&(""===O[0]?O[0]=n.host:O.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===b[0]?b[0]=e.host:b.unshift(e.host)),e.host=null),y=y&&(""===b[0]||""===O[0])),k)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,O=b;else if(b.length)O||(O=[]),O.pop(),O=O.concat(b),n.search=e.search,n.query=e.query;else if(!a.isNullOrUndefined(e.search)){if(w)n.hostname=n.host=O.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!O.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=O.slice(-1)[0],C=(n.host||e.host||O.length>1)&&("."===E||".."===E)||""===E,x=0,S=O.length;S>=0;S--)"."===(E=O[S])?O.splice(S,1):".."===E?(O.splice(S,1),x++):x&&(O.splice(S,1),x--);if(!y&&!_)for(;x--;x)O.unshift("..");!y||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),C&&"/"!==O.join("/").substr(-1)&&O.push("");var A,T=""===O[0]||O[0]&&"/"===O[0].charAt(0);w&&(n.hostname=n.host=T?"":O.length?O.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(y=y||n.host&&O.length)&&!T&&O.unshift(""),O.length?n.pathname=O.join("/"):(n.pathname=null,n.path=null),a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){e.exports=n(344)()},function(e,t,n){var r=n(172);e.exports=function(e,t){if(null==e)return{};var n,a,o=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a<c.length;a++)n=c[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(80),a=n.n(r),o=n(4);function c(e,t){var n=function(e,t){var n=!0,r=!1,c=void 0;try{for(var i,l=new a.a(t).values()[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var s=i.value;if(-1!==s.indexOf("is-style-")){var u=s.substring(9),p=Object(o.find)(e,{name:u});if(p)return p}}}catch(d){r=!0,c=d}finally{try{n||null==l.return||l.return()}finally{if(r)throw c}}return Object(o.find)(e,"isDefault")}(e,t);return n?n.name:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),a=function(e,t){return Object(r.reduce)(t,(function(t,n,r){if(void 0===e[r])return t;var a=e[r],o=a.type,c=a.validator,i=a.validValues,l=a.default;return t[r]="boolean"===o?"false"!==n&&!!n:c?c(n)?n:l:i?i.includes(n)?n:l:n,t}),{})}},function(e,t){!function(){e.exports=this.moment}()},function(e,t,n){"use strict";var r=n(3),a=n.n(r),o=n(0),c=n(1),i=n(5);t.a=function(e){var t=e.setAttributes,n=e.label,r=e.labelFieldName,l=e.placeholder,s=e.resetFocus,u=e.required;return Object(o.createElement)("div",{className:"jetpack-field-label"},Object(o.createElement)(i.RichText,{tagName:"label",value:n,className:"jetpack-field-label__input",onChange:function(e){s&&s(),t(r?a()({},r,e):{label:e})},placeholder:null!=l?l:Object(c.__)("Add labelโฆ","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),u&&Object(o.createElement)("span",{className:"required"},Object(c.__)("(required)","jetpack")))}},function(e,t,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7),a=n.n(r),o=n(4),c=n(51);function i(e){var t=Object(c.a)(),n=Object(o.get)(t,["available_blocks",e,"available"],!1),r=Object(o.get)(t,["available_blocks",e,"unavailable_reason"],"unknown"),i=Object(o.get)(t,["available_blocks",e,"details"],[]);return a()({available:n},!n&&{details:i,unavailableReason:r})}},function(e,t,n){"use strict";var r=n(23),a=n.n(r),o=n(42),c=n.n(o),i=n(0),l=n(8),s=n.n(l),u=n(143),p=n.n(u);n(218);t.a=function(e){var t=e.children,n=void 0===t?null:t,r=e.isError,o=void 0!==r&&r,l=c()(e,["children","isError"]),u=s()("help-message",{"help-message-is-error":o});return n&&Object(i.createElement)("div",a()({className:u},l),o&&Object(i.createElement)(p.a,{size:"24","aria-hidden":"true",role:"img",focusable:"false"}),Object(i.createElement)("span",null,n))}},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,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4);function a(){return Object(r.get)("object"==typeof window?window:null,["Jetpack_Editor_Initial_State"],null)}},function(e,t){!function(){e.exports=this.wp.editor}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r={AED:{symbol:"ุฏ.ุฅ.โ",grouping:",",decimal:".",precision:2},AFN:{symbol:"ุ",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"ึ",grouping:",",decimal:".",precision:2},ANG:{symbol:"ฦ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ฦ",grouping:",",decimal:".",precision:2},AZN:{symbol:"โผ",grouping:" ",decimal:",",precision:2},BAM:{symbol:"ะะ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"เงณ",grouping:",",decimal:".",precision:0},BGN:{symbol:"ะปะฒ.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"ุฏ.ุจ.โ",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"ษ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"ั.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"ยฅ",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"โก",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kฤ",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"ุฏ.ุฌ.โ",grouping:",",decimal:".",precision:2},EGP:{symbol:"ุฌ.ู .โ",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"โฌ",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"ยฃ",grouping:",",decimal:".",precision:2},GBP:{symbol:"ยฃ",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"โต",grouping:",",decimal:".",precision:2},GIP:{symbol:"ยฃ",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"โช",grouping:",",decimal:".",precision:2},INR:{symbol:"โน",grouping:",",decimal:".",precision:2},IQD:{symbol:"ุฏ.ุน.โ",grouping:",",decimal:".",precision:2},IRR:{symbol:"๏ทผ",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"ุฏ.ุง.โ",grouping:",",decimal:".",precision:3},JPY:{symbol:"ยฅ",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"ัะพะผ",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"แ",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"โฉ",grouping:",",decimal:".",precision:0},KRW:{symbol:"โฉ",grouping:",",decimal:".",precision:0},KWD:{symbol:"ุฏ.ู.โ",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"โธ",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"โญ",grouping:",",decimal:".",precision:0},LBP:{symbol:"ู.ู.โ",grouping:",",decimal:".",precision:2},LKR:{symbol:"โจ",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"ุฏ.ู.โ",grouping:",",decimal:".",precision:3},MAD:{symbol:"ุฏ.ู .โ",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ะดะตะฝ.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"โฎ",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"โค",grouping:",",decimal:".",precision:2},MUR:{symbol:"โจ",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"โฆ",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"โจ",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"๏ทผ",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"โฑ",grouping:",",decimal:".",precision:2},PKR:{symbol:"โจ",grouping:",",decimal:".",precision:2},PLN:{symbol:"zล",grouping:" ",decimal:",",precision:2},PYG:{symbol:"โฒ",grouping:".",decimal:",",precision:2},QAR:{symbol:"๏ทผ",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"ะะธะฝ.",grouping:".",decimal:",",precision:2},RUB:{symbol:"โฝ",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"๏ทผ",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"โจ",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"ยฃโ",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"ยฃ",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"โก",grouping:",",decimal:".",precision:2},SYP:{symbol:"ยฃ",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"เธฟ",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"ุฏ.ุช.โ",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"โด",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"ััะผ",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"โซ",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"๏ทผ",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"โฉ",grouping:",",decimal:".",precision:2}};function a(e){return r[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(11);function a(){for(var e=Object(r.getCategories)(),t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];for(var o=function(){var t=i[c];if(e.some((function(e){return e.slug===t})))return{v:t}},c=0,i=n;c<i.length;c++){var l=o();if("object"==typeof l)return l.v}throw new Error("Could not find a category from the provided list: ".concat(n.join(",")))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"e",(function(){return i}));var r="after-visits",a="before-visits",o=3,c="jp-visit-counter",i=15552e3},function(e,t,n){"use strict";var r=n(82),a=n.n(r),o=n(4),c={i18n_default_locale_slug:"en",mc_analytics_enabled:!0,google_analytics_enabled:!1,google_analytics_key:null};var i,l,s=function(e){if(e in c)return c[e];throw new Error("config key `"+e+"` does not exist")},u=a()("dops:analytics");window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;var p={initialize:function(e,t,n){p.setUser(e,t),p.setSuperProps(n),p.identifyUser()},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){i=e},mc:{bumpStat:function(e,t){var n=function(e,t){var n="";if("object"==typeof e){for(var r in e)n+="&x_"+encodeURIComponent(r)+"="+encodeURIComponent(e[r]);u("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),u('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);s("mc_analytics_enabled")&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){var n=function(e,t){var n="";if("object"==typeof e){for(var r in e)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(e[r]);u("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),u('Built stat "%s" in group "%s"',t,e);return n}(e,t);s("mc_analytics_enabled")&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){p.tracks.recordPageView(e),p.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,o,c){p.ga.recordPurchase(e,t,n,r,a,o,c)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(i&&(u("- Super Props: %o",i),t=Object(o.assign)(t,i)),u('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):u('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){var t="object"==typeof e?e:{target:e};p.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){p.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){u("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){var e={};p.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",s("google_analytics_key"),"auto",e),p.ga.initialized=!0)},recordPageView:function(e,t){p.ga.initialize(),u("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),s("google_analytics_enabled")&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){p.ga.initialize();var a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),u(a),s("google_analytics_enabled")&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,c){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:c}),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.a=p},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,n){"use strict";var r=/^[-!#$%&'*+\/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(!r.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(66),a=n(48);function o(e,t){var n=Object(a.a)(e),o=n.available;n.unavailableReason;return!!o&&Object(r.registerPlugin)("jetpack-".concat(e),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return i}));var r=n(118),a=n(4),o="wp-block-jetpack-slideshow_autoplay-paused";function c(e){i(e),l(e),document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load")),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",(function(){e.el&&(e.el.classList.contains(o)?(e.el.classList.remove(o),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(o),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))}))}function i(e){if(e&&e.el){var t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(t){var n=t.clientWidth/t.clientHeight,r=Math.max(Math.min(n,16/9),1),a="undefined"!=typeof window?.8*window.innerHeight:600,o=Math.min(e.width/r,a),c="".concat(Math.floor(o),"px"),i="".concat(Math.floor(o/2),"px");e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=i,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=i}}}function l(e){Object(a.forEach)(e.slides,(function(t,n){t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")})),function(e){var t=e.slides[e.activeIndex];if(t){var n=t.getElementsByTagName("FIGCAPTION")[0],a=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:Object(r.escapeHTML)(a.alt))}}(e)}function s(e){Object(a.forEach)(e.pagination.bullets,(function(t){t.addEventListener("click",(function(){var t=e.slides[e.realIndex];setTimeout((function(){t.focus()}),500)}))}))}},function(e,t,n){"use strict";var r=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}()}(),a="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),c="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],l="undefined"!=typeof MutationObserver,s=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 o(){n&&(n=!1,e()),r&&l()}function i(){c(o)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(i,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(){a&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(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(){a&&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}(),u=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},p=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},d=j(0,0,0,0);function m(e){return parseFloat(e)||0}function b(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+m(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return d;var r=p(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]=m(o)}return t}(r),o=a.left+a.right,c=a.top+a.bottom,i=m(r.width),l=m(r.height);if("border-box"===r.boxSizing&&(Math.round(i+o)!==t&&(i-=b(r,"left","right")+o),Math.round(l+c)!==n&&(l-=b(r,"top","bottom")+c)),!function(e){return e===p(e).document.documentElement}(e)){var s=Math.round(i+o)-t,u=Math.round(l+c)-n;1!==Math.abs(s)&&(i-=s),1!==Math.abs(u)&&(l-=u)}return j(a.left,a.top,i,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof p(e).SVGGraphicsElement}:function(e){return e instanceof p(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return a?f(e)?function(e){var t=e.getBBox();return j(0,0,t.width,t.height)}(e):h(e):d}function j(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_=j(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,c,i,l,s=(r=(n=t).x,a=n.y,o=n.width,c=n.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(i.prototype),u(l,{x:r,y:a,width:o,height:c,top:a,right:r+o,bottom:c+a,left:r}),l);u(this,{target:e,contentRect:s})},y=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}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 p(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 p(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}(),_="undefined"!=typeof WeakMap?new WeakMap:new r,O=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=s.getInstance(),r=new y(t,n,this);_.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=_.get(this))[e].apply(t,arguments)}}));var w=void 0!==o.ResizeObserver?o.ResizeObserver:O;t.a=w},function(e,t,n){"use strict";var r=n(0),a=n(2);t.a=function(e){var t=e.label,n=e.onClick;return Object(r.createElement)(a.IconButton,{className:"components-toolbar__control",label:t,icon:"edit",onClick:n})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(4),a=n(22),o=n.n(a);function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.noop;return t(!0),new Promise((function(n,r){o()({path:"/wpcom/v2/resolve-redirect/?url=".concat(encodeURIComponent(e))}).then((function(a){t(!1);var o=a.status?parseInt(a.status,10):null;o&&o>=400?r():n(a.url||e)}),(function(){t(!1),r()}))}))}},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),a=n(2),o=n(75),c=n(66),i=(n(339),n(32)),l=Object(a.createSlotFill)("JetpackPluginSidebar"),s=l.Fill,u=l.Slot;Object(c.registerPlugin)("jetpack-sidebar",{render:function(){return Object(r.createElement)(u,null,(function(e){return e.length?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.PluginSidebarMoreMenuItem,{target:"jetpack",icon:Object(r.createElement)(i.h,null)},"Jetpack"),Object(r.createElement)(o.PluginSidebar,{name:"jetpack",title:"Jetpack",icon:Object(r.createElement)(i.h,null)},e)):null}))}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(3),a=n.n(r),o=n(8),c=n.n(o),i=n(4);function l(e,t){if(e&&t)return"has-".concat(t,"-").concat(e)}function s(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}}var u=Object(i.memoize)((function(e){var t=e.primaryColor,n=e.customPrimaryColor,r=e.secondaryColor,o=e.customSecondaryColor,i=e.backgroundColor,s=e.customBackgroundColor,u=l("color",t),p=l("color",r),d=l("background-color",i);return{primary:{name:t,custom:n,classes:c()(a()({"has-primary":u||n},u,u))},secondary:{name:r,custom:o,classes:c()(a()({"has-secondary":p||o},p,p))},background:{name:i,custom:s,classes:c()(a()({"has-background":d||s},d,d))}}}),(function(e){return Object.values(e).join()}))},function(e,t,n){"use strict";var r,a="object"==typeof Reflect?Reflect:null,o=a&&"function"==typeof a.apply?a.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var c=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var l=10;function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var a,o,c,i;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(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),c=o[t]),void 0===c)c=o[t]=n,++e._eventsCount;else if("function"==typeof c?c=o[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(a=s(e))>0&&c.length>a&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=c.length,i=l,console&&console.warn&&console.warn(i)}return e}function p(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=p.bind(r);return a.listener=n,r.wrapFn=a,a}function m(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 b(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}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||c(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||c(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},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,a=this._events;if(void 0!==a)r=r&&void 0===a.error;else if(!r)return!1;if(r){var c;if(t.length>0&&(c=t[0]),c instanceof Error)throw c;var i=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw i.context=c,i}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var s=l.length,u=h(l,s);for(n=0;n<s;++n)o(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,d(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,a,o,c;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(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){c=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,c||t)}return this},i.prototype.off=i.prototype.removeListener,i.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},i.prototype.listeners=function(e){return m(this,e,!0)},i.prototype.rawListeners=function(e){return m(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},i.prototype.listenerCount=b,i.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(4),a=n(51);function o(){return Object(r.get)(Object(a.a)(),["jetpack","is_current_user_connected"],!1)}},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t,n){"use strict";var r=n(226);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=a.default.parse(e,!0,!0),r="https:"===n.protocol;delete n.protocol,delete n.auth,delete n.port;var s={slashes:!0,protocol:"https:",query:{}};if(h=n.host,/^i[0-2]\.wp\.com$/.test(h))s.pathname=n.pathname,s.hostname=n.hostname;else{if(n.search)return null;var u=a.default.format(n);s.pathname=0===u.indexOf("//")?u.substring(1):u,s.hostname=(p=s.pathname,d=(0,o.default)(p),m=(0,c.default)(d),b="i"+Math.floor(3*m()),i('determined server "%s" to use with "%s"',b,p),b+".wp.com"),r&&(s.query.ssl=1)}var p,d,m,b;var h;if(t)for(var f in t)"host"!==f&&"hostname"!==f?"secure"!==f||t[f]?s.query[l[f]||f]=t[f]:s.protocol="http:":s.hostname=t[f];var g=a.default.format(s);return i("generated Photon URL: %s",g),g};var a=r(n(40)),o=r(n(227)),c=r(n(228)),i=(0,r(n(229)).default)("photon"),l={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(73);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return b}));var r=n(3),a=n.n(r),o=n(42),c=n.n(o),i=n(72),l=n.n(i),s=n(40),u=n(34),p=n(4),d=n(29);function m(e){return["circle","square"].includes(e)}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if(Object(u.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};var n,r=e.url.split("?",1)[0],a=e.height,o=e.width,c=t.layoutStyle,i=f(r)||!0===h()?g:l.a;if(m(c)&&o&&a){var s=Math.min(d.j,o,a);n=i(r,{resize:"".concat(s,",").concat(s)})}else n=i(r);var b,j=300,v=600;if(m(c)){var k=Math.min(v,o,a),y=Math.min(d.j,o,a);b=Object(p.range)(k,y,j).map((function(e){var t=i(r,{resize:"".concat(e,",").concat(e),strip:"info"});return t?"".concat(t," ").concat(e,"w"):null})).filter(Boolean).join(",")}else{var _=Math.min(v,o),O=Math.min(d.j,o);b=Object(p.range)(_,O,j).map((function(e){var t=i(r,{strip:"info",width:e});return t?"".concat(t," ").concat(e,"w"):null})).filter(Boolean).join(",")}return Object.assign({src:n},b&&{srcSet:b})}function h(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function f(e){var t=Object(s.parse)(e).host;return/\.files\.wordpress\.com$/.test(t)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object(s.parse)(e),o=(r.auth,r.hash,r.port,r.query,r.search,c()(r,["auth","hash","port","query","search"]));return o.query=Object.keys(t).reduce((function(e,r){return Object.assign(e,a()({},n.hasOwnProperty(r)?n[r]:r,t[r]))}),{}),Object(s.format)(o)}},function(e,t,n){ /** * @preserve jed.js https://github.com/SlexAxton/Jed */ !function(n,r){var a=Array.prototype,o=Object.prototype,c=a.slice,i=o.hasOwnProperty,l=a.forEach,s={},u={forEach:function(e,t,n){var r,a,o;if(null!==e)if(l&&e.forEach===l)e.forEach(t,n);else if(e.length===+e.length){for(r=0,a=e.length;r<a;r++)if(r in e&&t.call(n,e[r],r,e)===s)return}else for(o in e)if(i.call(e,o)&&t.call(n,e[o],o,e)===s)return},extend:function(e){return this.forEach(c.call(arguments,1),(function(t){for(var n in t)e[n]=t[n]})),e}},p=function(e){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=u.extend({},this.defaults,e),this.textdomain(this.options.domain),e.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+e.domain+"`")};function d(e){return p.PF.compile(e||"nplurals=2; plural=(n != 1);")}function m(e,t){this._key=e,this._i18n=t}p.context_delimiter=String.fromCharCode(4),u.extend(m.prototype,{onDomain:function(e){return this._domain=e,this},withContext:function(e){return this._context=e,this},ifPlural:function(e,t){return this._val=e,this._pkey=t,this},fetch:function(e){return"[object Array]"!={}.toString.call(e)&&(e=[].slice.call(arguments,0)),(e&&e.length?p.sprintf:function(e){return e})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),e)}}),u.extend(p.prototype,{translate:function(e){return new m(e,this)},textdomain:function(e){if(!e)return this._textdomain;this._textdomain=e},gettext:function(e){return this.dcnpgettext.call(this,void 0,void 0,e)},dgettext:function(e,t){return this.dcnpgettext.call(this,e,void 0,t)},dcgettext:function(e,t){return this.dcnpgettext.call(this,e,void 0,t)},ngettext:function(e,t,n){return this.dcnpgettext.call(this,void 0,void 0,e,t,n)},dngettext:function(e,t,n,r){return this.dcnpgettext.call(this,e,void 0,t,n,r)},dcngettext:function(e,t,n,r){return this.dcnpgettext.call(this,e,void 0,t,n,r)},pgettext:function(e,t){return this.dcnpgettext.call(this,void 0,e,t)},dpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},dcpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},npgettext:function(e,t,n,r){return this.dcnpgettext.call(this,void 0,e,t,n,r)},dnpgettext:function(e,t,n,r,a){return this.dcnpgettext.call(this,e,t,n,r,a)},dcnpgettext:function(e,t,n,r,a){var o;if(r=r||n,e=e||this._textdomain,!this.options)return(o=new p).dcnpgettext.call(o,void 0,void 0,n,r,a);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[e])throw new Error("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])throw new Error("No locale meta information provided.");if(!n)throw new Error("No translation key found.");var c,i,l,s=t?t+p.context_delimiter+n:n,u=this.options.locale_data,m=u[e],b=(u.messages||this.defaults.locale_data.messages)[""],h=m[""].plural_forms||m[""]["Plural-Forms"]||m[""]["plural-forms"]||b.plural_forms||b["Plural-Forms"]||b["plural-forms"];if(void 0===a)l=0;else{if("number"!=typeof a&&(a=parseInt(a,10),isNaN(a)))throw new Error("The number that was passed in is not a number.");l=d(h)(a)}if(!m)throw new Error("No domain named `"+e+"` could be found.");return!(c=m[s])||l>c.length?(this.options.missing_key_callback&&this.options.missing_key_callback(s,e),i=[n,r],!0===this.options.debug&&console.log(i[d(h)(a)]),i[d()(a)]):(i=c[l])||(i=[n,r])[d()(a)]}});var b,h,f=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function t(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,r){var a,o,c,i,l,s,u,p=1,d=n.length,m="",b=[];for(o=0;o<d;o++)if("string"===(m=e(n[o])))b.push(n[o]);else if("array"===m){if((i=n[o])[2])for(a=r[p],c=0;c<i[2].length;c++){if(!a.hasOwnProperty(i[2][c]))throw f('[sprintf] property "%s" does not exist',i[2][c]);a=a[i[2][c]]}else a=i[1]?r[i[1]]:r[p++];if(/[^s]/.test(i[8])&&"number"!=e(a))throw f("[sprintf] expecting number but found %s",e(a));switch(null==a&&(a=""),i[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=i[7]?a.toExponential(i[7]):a.toExponential();break;case"f":a=i[7]?parseFloat(a).toFixed(i[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&i[7]?a.substring(0,i[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(i[8])&&i[3]&&a>=0?"+"+a:a,s=i[4]?"0"==i[4]?"0":i[4].charAt(1):" ",u=i[6]-String(a).length,l=i[6]?t(s,u):"",b.push(i[5]?a+l:l+a)}return b.join("")},n.cache={},n.parse=function(e){for(var t=e,n=[],r=[],a=0;t;){if(null!==(n=/^[^\x25]+/.exec(t)))r.push(n[0]);else if(null!==(n=/^\x25{2}/.exec(t)))r.push("%");else{if(null===(n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw"[sprintf] huh?";if(n[2]){a|=1;var o=[],c=n[2],i=[];if(null===(i=/^([a-z_][a-z_\d]*)/i.exec(c)))throw"[sprintf] huh?";for(o.push(i[1]);""!==(c=c.substring(i[0].length));)if(null!==(i=/^\.([a-z_][a-z_\d]*)/i.exec(c)))o.push(i[1]);else{if(null===(i=/^\[(\d+)\]/.exec(c)))throw"[sprintf] huh?";o.push(i[1])}n[2]=o}else a|=2;if(3===a)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},n}(),g=function(e,t){return t.unshift(e),f.apply(null,t)};p.parse_plural=function(e,t){return e=e.replace(/n/g,t),p.parse_expression(e)},p.sprintf=function(e,t){return"[object Array]"=={}.toString.call(t)?g(e,[].slice.call(t)):f.apply(this,[].slice.call(arguments))},p.prototype.sprintf=function(){return p.sprintf.apply(this,arguments)},(p.PF={}).parse=function(e){var t=p.PF.extractPluralExpr(e);return p.PF.parser.parse.call(p.PF.parser,t)},p.PF.compile=function(e){var t=p.PF.parse(e);return function(e){return!0===(n=p.PF.interpreter(t)(e))?1:n||0;var n}},p.PF.interpreter=function(e){return function(t){switch(e.type){case"GROUP":return p.PF.interpreter(e.expr)(t);case"TERNARY":return p.PF.interpreter(e.expr)(t)?p.PF.interpreter(e.truthy)(t):p.PF.interpreter(e.falsey)(t);case"OR":return p.PF.interpreter(e.left)(t)||p.PF.interpreter(e.right)(t);case"AND":return p.PF.interpreter(e.left)(t)&&p.PF.interpreter(e.right)(t);case"LT":return p.PF.interpreter(e.left)(t)<p.PF.interpreter(e.right)(t);case"GT":return p.PF.interpreter(e.left)(t)>p.PF.interpreter(e.right)(t);case"LTE":return p.PF.interpreter(e.left)(t)<=p.PF.interpreter(e.right)(t);case"GTE":return p.PF.interpreter(e.left)(t)>=p.PF.interpreter(e.right)(t);case"EQ":return p.PF.interpreter(e.left)(t)==p.PF.interpreter(e.right)(t);case"NEQ":return p.PF.interpreter(e.left)(t)!=p.PF.interpreter(e.right)(t);case"MOD":return p.PF.interpreter(e.left)(t)%p.PF.interpreter(e.right)(t);case"VAR":return t;case"NUM":return e.val;default:throw new Error("Invalid Token found.")}}},p.PF.extractPluralExpr=function(e){e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(e)||(e=e.concat(";"));var t,n=/nplurals\=(\d+);/,r=e.match(n);if(!(r.length>1))throw new Error("nplurals not found in plural_forms string: "+e);if(r[1],!((t=(e=e.replace(n,"")).match(/plural\=(.*);/))&&t.length>1))throw new Error("`plural` expression not found: "+e);return t[1]},p.PF.parser=(b={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(e,t,n,r,a,o,c){var i=o.length-1;switch(a){case 1:return{type:"GROUP",expr:o[i-1]};case 2:this.$={type:"TERNARY",expr:o[i-4],truthy:o[i-2],falsey:o[i]};break;case 3:this.$={type:"OR",left:o[i-2],right:o[i]};break;case 4:this.$={type:"AND",left:o[i-2],right:o[i]};break;case 5:this.$={type:"LT",left:o[i-2],right:o[i]};break;case 6:this.$={type:"LTE",left:o[i-2],right:o[i]};break;case 7:this.$={type:"GT",left:o[i-2],right:o[i]};break;case 8:this.$={type:"GTE",left:o[i-2],right:o[i]};break;case 9:this.$={type:"NEQ",left:o[i-2],right:o[i]};break;case 10:this.$={type:"EQ",left:o[i-2],right:o[i]};break;case 11:this.$={type:"MOD",left:o[i-2],right:o[i]};break;case 12:this.$={type:"GROUP",expr:o[i-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:Number(e)}}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,n=[0],r=[null],a=[],o=this.table,c="",i=0,l=0,s=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var u=this.lexer.yylloc;function p(){var e;return"number"!=typeof(e=t.lexer.lex()||1)&&(e=t.symbols_[e]||e),e}a.push(u),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,m,b,h,f,g,j,v,k,y,_={};;){if(b=n[n.length-1],this.defaultActions[b]?h=this.defaultActions[b]:(null==d&&(d=p()),h=o[b]&&o[b][d]),void 0===h||!h.length||!h[0]){if(!s){for(g in k=[],o[b])this.terminals_[g]&&g>2&&k.push("'"+this.terminals_[g]+"'");var O="";O=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+this.terminals_[d]+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(O,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:u,expected:k})}if(3==s){if(1==d)throw new Error(O||"Parsing halted.");l=this.lexer.yyleng,c=this.lexer.yytext,i=this.lexer.yylineno,u=this.lexer.yylloc,d=p()}for(;!(2..toString()in o[b]);){if(0==b)throw new Error(O||"Parsing halted.");y=1,n.length=n.length-2*y,r.length=r.length-y,a.length=a.length-y,b=n[n.length-1]}m=d,d=2,h=o[b=n[n.length-1]]&&o[b][2],s=3}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+d);switch(h[0]){case 1:n.push(d),r.push(this.lexer.yytext),a.push(this.lexer.yylloc),n.push(h[1]),d=null,m?(d=m,m=null):(l=this.lexer.yyleng,c=this.lexer.yytext,i=this.lexer.yylineno,u=this.lexer.yylloc,s>0&&s--);break;case 2:if(j=this.productions_[h[1]][1],_.$=r[r.length-j],_._$={first_line:a[a.length-(j||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(j||1)].first_column,last_column:a[a.length-1].last_column},void 0!==(f=this.performAction.call(_,c,l,i,this.yy,h[1],r,a)))return f;j&&(n=n.slice(0,-1*j*2),r=r.slice(0,-1*j),a=a.slice(0,-1*j)),n.push(this.productions_[h[1]][0]),r.push(_.$),a.push(_._$),v=o[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},h=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if(e=this._input.match(this.rules[n[r]]))return(t=e[0].match(/\n.*/g))&&(this.yylineno+=t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:t?t[t.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],this.performAction.call(this,this.yy,this,n[r],this.conditionStack[this.conditionStack.length-1])||void 0;if(""===this._input)return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:return 20;case 2:return 19;case 3:return 8;case 4:return 9;case 5:return 6;case 6:return 7;case 7:return 11;case 8:return 13;case 9:return 10;case 10:return 12;case 11:return 14;case 12:return 15;case 13:return 16;case 14:return 17;case 15:return 18;case 16:return 5;case 17:return"INVALID"}},rules:[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};return e}(),b.lexer=h,b),e.exports&&(t=e.exports=p),t.Jed=p}()},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){var n;t=e.exports=W,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],o=t.src=[],c=0,i=c++;o[i]="0|[1-9]\\d*";var l=c++;o[l]="[0-9]+";var s=c++;o[s]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=c++;o[u]="("+o[i]+")\\.("+o[i]+")\\.("+o[i]+")";var p=c++;o[p]="("+o[l]+")\\.("+o[l]+")\\.("+o[l]+")";var d=c++;o[d]="(?:"+o[i]+"|"+o[s]+")";var m=c++;o[m]="(?:"+o[l]+"|"+o[s]+")";var b=c++;o[b]="(?:-("+o[d]+"(?:\\."+o[d]+")*))";var h=c++;o[h]="(?:-?("+o[m]+"(?:\\."+o[m]+")*))";var f=c++;o[f]="[0-9A-Za-z-]+";var g=c++;o[g]="(?:\\+("+o[f]+"(?:\\."+o[f]+")*))";var j=c++,v="v?"+o[u]+o[b]+"?"+o[g]+"?";o[j]="^"+v+"$";var k="[v=\\s]*"+o[p]+o[h]+"?"+o[g]+"?",y=c++;o[y]="^"+k+"$";var _=c++;o[_]="((?:<|>)?=?)";var O=c++;o[O]=o[l]+"|x|X|\\*";var w=c++;o[w]=o[i]+"|x|X|\\*";var E=c++;o[E]="[v=\\s]*("+o[w]+")(?:\\.("+o[w]+")(?:\\.("+o[w]+")(?:"+o[b]+")?"+o[g]+"?)?)?";var C=c++;o[C]="[v=\\s]*("+o[O]+")(?:\\.("+o[O]+")(?:\\.("+o[O]+")(?:"+o[h]+")?"+o[g]+"?)?)?";var x=c++;o[x]="^"+o[_]+"\\s*"+o[E]+"$";var S=c++;o[S]="^"+o[_]+"\\s*"+o[C]+"$";var A=c++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var T=c++;o[T]="(?:~>?)";var N=c++;o[N]="(\\s*)"+o[T]+"\\s+",a[N]=new RegExp(o[N],"g");var P=c++;o[P]="^"+o[T]+o[E]+"$";var M=c++;o[M]="^"+o[T]+o[C]+"$";var B=c++;o[B]="(?:\\^)";var I=c++;o[I]="(\\s*)"+o[B]+"\\s+",a[I]=new RegExp(o[I],"g");var F=c++;o[F]="^"+o[B]+o[E]+"$";var R=c++;o[R]="^"+o[B]+o[C]+"$";var L=c++;o[L]="^"+o[_]+"\\s*("+k+")$|^$";var D=c++;o[D]="^"+o[_]+"\\s*("+v+")$|^$";var z=c++;o[z]="(\\s*)"+o[_]+"\\s*("+k+"|"+o[E]+")",a[z]=new RegExp(o[z],"g");var U=c++;o[U]="^\\s*("+o[E]+")\\s+-\\s+("+o[E]+")\\s*$";var V=c++;o[V]="^\\s*("+o[C]+")\\s+-\\s+("+o[C]+")\\s*$";var q=c++;o[q]="(<|>)?=?\\s*\\*";for(var H=0;H<35;H++)n(H,o[H]),a[H]||(a[H]=new RegExp(o[H]));function G(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof W)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?a[y]:a[j]).test(e))return null;try{return new W(e,t)}catch(n){return null}}function W(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof W){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof W))return new W(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?a[y]:a[j]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}t.parse=G,t.valid=function(e,t){var n=G(e,t);return n?n.version:null},t.clean=function(e,t){var n=G(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=W,W.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},W.prototype.toString=function(){return this.version},W.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof W||(e=new W(e,this.options)),this.compareMain(e)||this.comparePre(e)},W.prototype.compareMain=function(e){return e instanceof W||(e=new W(e,this.options)),K(this.major,e.major)||K(this.minor,e.minor)||K(this.patch,e.patch)},W.prototype.comparePre=function(e){if(e instanceof W||(e=new W(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;var t=0;do{var r=this.prerelease[t],a=e.prerelease[t];if(n("prerelease compare",t,r,a),void 0===r&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===r)return-1;if(r!==a)return K(r,a)}while(++t)},W.prototype.inc=function(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{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&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},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new W(e,n).inc(t,r).version}catch(a){return null}},t.diff=function(e,t){if(Q(e,t))return null;var n=G(e),r=G(t),a="";if(n.prerelease.length||r.prerelease.length){a="pre";var o="prerelease"}for(var c in n)if(("major"===c||"minor"===c||"patch"===c)&&n[c]!==r[c])return a+c;return o},t.compareIdentifiers=K;var $=/^[0-9]+$/;function K(e,t){var n=$.test(e),r=$.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function Z(e,t,n){return new W(e,n).compare(new W(t,n))}function J(e,t,n){return Z(e,t,n)>0}function Y(e,t,n){return Z(e,t,n)<0}function Q(e,t,n){return 0===Z(e,t,n)}function X(e,t,n){return 0!==Z(e,t,n)}function ee(e,t,n){return Z(e,t,n)>=0}function te(e,t,n){return Z(e,t,n)<=0}function ne(e,t,n,r){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 Q(e,n,r);case"!=":return X(e,n,r);case">":return J(e,n,r);case">=":return ee(e,n,r);case"<":return Y(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ae?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return K(t,e)},t.major=function(e,t){return new W(e,t).major},t.minor=function(e,t){return new W(e,t).minor},t.patch=function(e,t){return new W(e,t).patch},t.compare=Z,t.compareLoose=function(e,t){return Z(e,t,!0)},t.rcompare=function(e,t,n){return Z(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compare(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.rcompare(e,r,n)}))},t.gt=J,t.lt=Y,t.eq=Q,t.neq=X,t.gte=ee,t.lte=te,t.cmp=ne,t.Comparator=re;var ae={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof re)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ce(e){return!e||"x"===e.toLowerCase()||"*"===e}function ie(e,t,n,r,a,o,c,i,l,s,u,p,d){return((t=ce(n)?"":ce(r)?">="+n+".0.0":ce(a)?">="+n+"."+r+".0":">="+t)+" "+(i=ce(l)?"":ce(s)?"<"+(+l+1)+".0.0":ce(u)?"<"+l+"."+(+s+1)+".0":p?"<="+l+"."+s+"."+u+"-"+p:"<="+i)).trim()}function le(e,t,r){for(var a=0;a<e.length;a++)if(!e[a].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(a=0;a<e.length;a++)if(n(e[a].semver),e[a].semver!==ae&&e[a].semver.prerelease.length>0){var o=e[a].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function se(e,t,n){try{t=new oe(t,n)}catch(r){return!1}return t.test(e)}function ue(e,t,n,r){var a,o,c,i,l;switch(e=new W(e,r),t=new oe(t,r),n){case">":a=J,o=te,c=Y,i=">",l=">=";break;case"<":a=Y,o=ee,c=J,i="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(se(e,t,r))return!1;for(var s=0;s<t.set.length;++s){var u=t.set[s],p=null,d=null;if(u.forEach((function(e){e.semver===ae&&(e=new re(">=0.0.0")),p=p||e,d=d||e,a(e.semver,p.semver,r)?p=e:c(e.semver,d.semver,r)&&(d=e)})),p.operator===i||p.operator===l)return!1;if((!d.operator||d.operator===i)&&o(e,d.semver))return!1;if(d.operator===l&&c(e,d.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?a[L]:a[D],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new W(n[2],this.options.loose):this.semver=ae},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ae||("string"==typeof e&&(e=new W(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new oe(e.value,t),se(this.value,n,t);if(""===e.operator)return n=new oe(this.value,t),se(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),a=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,c=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),i=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||a||o&&c||i||l},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?a[V]:a[U];e=e.replace(r,ie),n("hyphen replace",e),e=e.replace(a[z],"$1$2$3"),n("comparator trim",e,a[z]),e=(e=(e=e.replace(a[N],"$1~")).replace(a[I],"$1^")).split(/\s+/).join(" ");var o=t?a[L]:a[D],c=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?a[R]:a[F];return e.replace(r,(function(t,r,a,o,c){var i;return n("caret",e,t,r,a,o,c),ce(r)?i="":ce(a)?i=">="+r+".0.0 <"+(+r+1)+".0.0":ce(o)?i="0"===r?">="+r+"."+a+".0 <"+r+"."+(+a+1)+".0":">="+r+"."+a+".0 <"+(+r+1)+".0.0":c?(n("replaceCaret pr",c),i="0"===r?"0"===a?">="+r+"."+a+"."+o+"-"+c+" <"+r+"."+a+"."+(+o+1):">="+r+"."+a+"."+o+"-"+c+" <"+r+"."+(+a+1)+".0":">="+r+"."+a+"."+o+"-"+c+" <"+(+r+1)+".0.0"):(n("no pr"),i="0"===r?"0"===a?">="+r+"."+a+"."+o+" <"+r+"."+a+"."+(+o+1):">="+r+"."+a+"."+o+" <"+r+"."+(+a+1)+".0":">="+r+"."+a+"."+o+" <"+(+r+1)+".0.0"),n("caret return",i),i}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?a[M]:a[P];return e.replace(r,(function(t,r,a,o,c){var i;return n("tilde",e,t,r,a,o,c),ce(r)?i="":ce(a)?i=">="+r+".0.0 <"+(+r+1)+".0.0":ce(o)?i=">="+r+"."+a+".0 <"+r+"."+(+a+1)+".0":c?(n("replaceTilde pr",c),i=">="+r+"."+a+"."+o+"-"+c+" <"+r+"."+(+a+1)+".0"):i=">="+r+"."+a+"."+o+" <"+r+"."+(+a+1)+".0",n("tilde return",i),i}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?a[S]:a[x];return e.replace(r,(function(t,r,a,o,c,i){n("xRange",e,t,r,a,o,c,i);var l=ce(a),s=l||ce(o),u=s||ce(c);return"="===r&&u&&(r=""),l?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(s&&(o=0),c=0,">"===r?(r=">=",s?(a=+a+1,o=0,c=0):(o=+o+1,c=0)):"<="===r&&(r="<",s?a=+a+1:o=+o+1),t=r+a+"."+o+"."+c):s?t=">="+a+".0.0 <"+(+a+1)+".0.0":u&&(t=">="+a+"."+o+".0 <"+a+"."+(+o+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(a[q],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(c=c.filter((function(e){return!!e.match(o)}))),c=c.map((function(e){return new re(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},t.satisfies=se,t.maxSatisfying=function(e,t,n){var r=null,a=null;try{var o=new oe(t,n)}catch(c){return null}return e.forEach((function(e){o.test(e)&&(r&&-1!==a.compare(e)||(a=new W(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,a=null;try{var o=new oe(t,n)}catch(c){return null}return e.forEach((function(e){o.test(e)&&(r&&1!==a.compare(e)||(a=new W(r=e,n)))})),r},t.minVersion=function(e,t){e=new oe(e,t);var n=new W("0.0.0");if(e.test(n))return n;if(n=new W("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r){e.set[r].forEach((function(e){var t=new W(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!J(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(n){return null}},t.ltr=function(e,t,n){return ue(e,t,"<",n)},t.gtr=function(e,t,n){return ue(e,t,">",n)},t.outside=ue,t.prerelease=function(e,t){var n=G(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new oe(e,n),t=new oe(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(a[A]);if(null==t)return null;return G(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},function(e,t){!function(){e.exports=this.wp.tokenList}()},function(e,t,n){"use strict";var r=n(0),a=n(2),o=n(26),c=Object(o.a)(Object(r.createElement)(a.G,null,Object(r.createElement)(a.Path,{d:"M17 5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2h9z"}),Object(r.createElement)(a.Path,{d:"M13 4H5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2z"}),Object(r.createElement)(a.Path,{d:"M7 16h8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"})));t.a=c},function(e,t,n){var r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))})),t.splice(a,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(169)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(347);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(348),a=n(349),o=n(350);e.exports=function(e){var t=a();return function(){var n,a=r(e);if(t){var c=r(this).constructor;n=Reflect.construct(a,arguments,c)}else n=a.apply(this,arguments);return o(this,n)}}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{r||null==i.return||i.return()}finally{if(a)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){var n=1e3,r=6e4,a=60*r,o=24*a;function c(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,t){t=t||{};var i=typeof e;if("string"===i&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*a;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===i&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=a)return c(e,t,a,"hour");if(t>=r)return c(e,t,r,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=a)return Math.round(e/a)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(108),a=n(107);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(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 c=e.charCodeAt(a);c<128?n[r++]=c:c<2048?(n[r++]=c>>6|192,n[r++]=63&c|128):o(e,a)?(c=65536+((1023&c)<<10)+(1023&e.charCodeAt(++a)),n[r++]=c>>18|240,n[r++]=c>>12&63|128,n[r++]=c>>6&63|128,n[r++]=63&c|128):(n[r++]=c>>12|224,n[r++]=c>>6&63|128,n[r++]=63&c|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+=i(e[n].toString(16));return t},t.htonl=c,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=c(a)),n+=l(a.toString(16))}return n},t.zero2=i,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var c=new Array(o/4),i=0,l=t;i<c.length;i++,l+=4){var s;s="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],c[i]=s>>>0}return c},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,c=(o<r?1:0)+n+a;e[t]=c>>>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,c,i){var l=0,s=t;return l+=(s=s+r>>>0)<t?1:0,l+=(s=s+o>>>0)<o?1:0,e+n+a+c+(l+=(s=s+i>>>0)<i?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,c,i){return t+r+o+i>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,c,i,l,s){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+i>>>0)<i?1:0,e+n+a+c+l+(u+=(p=p+s>>>0)<s?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,c,i,l,s){return t+r+o+i+s>>>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}},function(e){e.exports=JSON.parse('{"a":{"White":"#fff","Black":"#000","Gray":"#646970","Gray 0":"#f6f7f7","Gray 5":"#dcdcde","Gray 10":"#c3c4c7","Gray 20":"#a7aaad","Gray 30":"#8c8f94","Gray 40":"#787c82","Gray 50":"#646970","Gray 60":"#50575e","Gray 70":"#3c434a","Gray 80":"#2c3338","Gray 90":"#1d2327","Gray 100":"#101517","Blue":"#2271b1","Blue 0":"#e9eff5","Blue 5":"#c5d9ed","Blue 10":"#9ec2e6","Blue 20":"#72aee6","Blue 30":"#5198d9","Blue 40":"#3582c4","Blue 50":"#2271b1","Blue 60":"#135e96","Blue 70":"#0a4b78","Blue 80":"#043959","Blue 90":"#01263a","Blue 100":"#00131c","Purple":"#984a9c","Purple 0":"#f2e9ed","Purple 5":"#ebcee0","Purple 10":"#e3afd5","Purple 20":"#d48fc8","Purple 30":"#c475bd","Purple 40":"#b35eb1","Purple 50":"#984a9c","Purple 60":"#7c3982","Purple 70":"#662c6e","Purple 80":"#4d2054","Purple 90":"#35163b","Purple 100":"#1e0c21","Pink":"#c9356e","Pink 0":"#f5e9ed","Pink 5":"#f2ceda","Pink 10":"#f7a8c3","Pink 20":"#f283aa","Pink 30":"#eb6594","Pink 40":"#e34c84","Pink 50":"#c9356e","Pink 60":"#ab235a","Pink 70":"#8c1749","Pink 80":"#700f3b","Pink 90":"#4f092a","Pink 100":"#260415","Red":"#d63638","Red 0":"#f7ebec","Red 5":"#facfd2","Red 10":"#ffabaf","Red 20":"#ff8085","Red 30":"#f86368","Red 40":"#e65054","Red 50":"#d63638","Red 60":"#b32d2e","Red 70":"#8a2424","Red 80":"#691c1c","Red 90":"#451313","Red 100":"#240a0a","Orange":"#b26200","Orange 0":"#f5ece6","Orange 5":"#f7dcc6","Orange 10":"#ffbf86","Orange 20":"#faa754","Orange 30":"#e68b28","Orange 40":"#d67709","Orange 50":"#b26200","Orange 60":"#8a4d00","Orange 70":"#704000","Orange 80":"#543100","Orange 90":"#361f00","Orange 100":"#1f1200","Yellow":"#9d6e00","Yellow 0":"#f5f1e1","Yellow 5":"#f5e6b3","Yellow 10":"#f2d76b","Yellow 20":"#f0c930","Yellow 30":"#deb100","Yellow 40":"#c08c00","Yellow 50":"#9d6e00","Yellow 60":"#7d5600","Yellow 70":"#674600","Yellow 80":"#4f3500","Yellow 90":"#320","Yellow 100":"#1c1300","Green":"#008a20","Green 0":"#e6f2e8","Green 5":"#b8e6bf","Green 10":"#68de86","Green 20":"#1ed15a","Green 30":"#00ba37","Green 40":"#00a32a","Green 50":"#008a20","Green 60":"#007017","Green 70":"#005c12","Green 80":"#00450c","Green 90":"#003008","Green 100":"#001c05","Celadon":"#007e65","Celadon 0":"#e4f2ed","Celadon 5":"#a7e8d4","Celadon 10":"#63d6b6","Celadon 20":"#2ebd99","Celadon 30":"#09a884","Celadon 40":"#009172","Celadon 50":"#007e65","Celadon 60":"#006753","Celadon 70":"#005042","Celadon 80":"#003b30","Celadon 90":"#002721","Celadon 100":"#001c17","WordPress Blue":"#006088","WordPress Blue 0":"#e6f1f5","WordPress Blue 5":"#bedae6","WordPress Blue 10":"#98c6d9","WordPress Blue 20":"#6ab3d0","WordPress Blue 30":"#3895ba","WordPress Blue 40":"#187aa2","WordPress Blue 50":"#006088","WordPress Blue 60":"#004e6e","WordPress Blue 70":"#003c56","WordPress Blue 80":"#002c40","WordPress Blue 90":"#001d2d","WordPress Blue 100":"#00101c","Simplenote Blue":"#3361cc","Simplenote Blue 0":"#e9ecf5","Simplenote Blue 5":"#ced9f2","Simplenote Blue 10":"#abc1f5","Simplenote Blue 20":"#84a4f0","Simplenote Blue 30":"#618df2","Simplenote Blue 40":"#4678eb","Simplenote Blue 50":"#3361cc","Simplenote Blue 60":"#1d4fc4","Simplenote Blue 70":"#113ead","Simplenote Blue 80":"#0d2f85","Simplenote Blue 90":"#09205c","Simplenote Blue 100":"#05102e","WooCommerce Purple":"#7f54b3","WooCommerce Purple 0":"#f7edf7","WooCommerce Purple 5":"#e5cfe8","WooCommerce Purple 10":"#d6b4e0","WooCommerce Purple 20":"#c792e0","WooCommerce Purple 30":"#af7dd1","WooCommerce Purple 40":"#9a69c7","WooCommerce Purple 50":"#7f54b3","WooCommerce Purple 60":"#674399","WooCommerce Purple 70":"#533582","WooCommerce Purple 80":"#3c2861","WooCommerce Purple 90":"#271b3d","WooCommerce Purple 100":"#140e1f","Jetpack Green":"#2fb41f","Jetpack Green 0":"#f0f2eb","Jetpack Green 5":"#d0e6b8","Jetpack Green 10":"#9dd977","Jetpack Green 20":"#64ca43","Jetpack Green 30":"#2fb41f","Jetpack Green 40":"#069e08","Jetpack Green 50":"#008710","Jetpack Green 60":"#007117","Jetpack Green 70":"#005b18","Jetpack Green 80":"#004515","Jetpack Green 90":"#003010","Jetpack Green 100":"#001c09"}}')},function(e,t,n){"use strict";var r=n(23),a=n.n(r),o=n(0),c=n(18);n(208);t.a=function(e){return Object(c.createHigherOrderComponent)((function(t){return function(n){return Object(o.createElement)(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))}}),"withHasWarningIsInteractiveClassNames")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(7),a=n.n(r),o=n(0),c=n(8),i=n.n(c),l=n(4),s=n(11),u=n(5),p=n(2),d=n(10),m=n(25),b=n(1),h=(n(216),function(e){var t,n=e.attributes,r=e.styleOption,c=e.viewportWidth,i=e.blockName,l=Object(s.getBlockType)(i);return Object(o.createElement)(u.BlockPreview,{viewportWidth:c,blocks:(t=l.example?Object(s.getBlockFromExample)(i,{attributes:a()({},l.example.attributes,{style:r.value}),innerBlocks:l.example.innerBlocks}):Object(s.createBlock)(i,n),a()({},t,{attributes:a()({},t.attributes,{__isBlockPreview:!0})}))})}),f=o.memo?Object(o.memo)(h,(function(e,t){return Object(l.isEqual)(e,t)})):h;function g(e){var t,n=e.attributes,r=e.clientId,c=e.styleOptions,l=e.onSelectStyle,s=e.activeStyle,h=e.viewportWidth,g=e.title;return d.useSelect&&(t=Object(d.useSelect)((function(e){return(0,e("core/block-editor").getBlock)(r)}))),Object(o.createElement)(o.Fragment,null,Object(o.createElement)(u.BlockControls,null,Object(o.createElement)(p.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:Object(b.__)("Style","jetpack"),controls:c.map((function(e){return{title:e.label,isActive:e.value===s,onClick:function(){return l({style:e.value})}}})),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),Object(o.createElement)(u.InspectorControls,null,Object(o.createElement)(p.PanelBody,{title:g||Object(b.__)("Styles","jetpack")},Object(o.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},c.map((function(e){var r=a()({},n,{style:e.value});return Object(o.createElement)("div",{key:e.value,className:i()("block-editor-block-styles__item",{"is-active":e.value===s}),onClick:function(){l({style:e.value})},onKeyDown:function(t){m.ENTER!==t.keyCode&&m.SPACE!==t.keyCode||(t.preventDefault(),l({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},Object(o.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:d.useSelect&&t&&Object(o.createElement)(f,{blockName:t.name,styleOption:e,attributes:r,viewportWidth:h})),Object(o.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},function(e,t,n){"use strict";var r,a=n(4),o=n(69);function c(){var e=this;this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=function(t){t.source===e.windowInstance&&e.emit("message",t.data)}}r=c.prototype,Object(a.assign)(r,o.EventEmitter.prototype),r.emitChange=function(){this.emit("change")},r.off=r.removeListener,c.prototype.open=function(e,t,n){return t=t||Date.now(),this.windowInstance=window.open(e,t,n),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},c.prototype.getScreenCenterSpecs=function(e,t){var n=void 0!==window.screenTop?window.screenTop:window.screenY,r=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(n+window.innerHeight/2-t/2),"left="+(r+window.innerWidth/2-e/2)].join()},c.prototype.isOpen=function(e){var t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(n){}return!t},c.prototype.checkStatus=function(){for(var e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit("close",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener("message",this.onMessage))},c.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};t.a=c},function(e,t,n){"use strict";var r=n(23),a=n.n(r),o=n(0),c=n(2),i=c.NumberControl||c.__experimentalNumberControl||function(e){return Object(o.createElement)(c.TextControl,a()({type:"number",inputMode:"numeric"},e))};t.a=i},function(e,t,n){var r=n(3);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){r(e,t,n[t])}))}return e}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return l}));var r=n(9),a=n.n(r),o=n(29);function c(e,t){var n=(t-e.reduce((function(e,t){return e+t}),0))/e.length;return e.map((function(e){return e+n}))}function i(e,t){return function(e,t,n){var r=a()(t,2),i=r[0],l=r[1],m=1/i*(n-o.b*(e.childElementCount-1)-l);return function(e,t){var n=t.rawHeight,r=t.rowWidth,a=s(e),i=a.map((function(e){return(n-o.b*(e.childElementCount-1))*p(e)[0]})),l=c(i,r);return a.forEach((function(e,t){var r=i[t],a=l[t];!function(e,t){var n=t.colHeight,r=t.width,a=t.rawWidth,o=c(u(e).map((function(e){return a/d(e)})),n);Array.from(e.children).forEach((function(e,t){var n=o[t];e.setAttribute("style","height:".concat(n,"px;width:").concat(r,"px;"))}))}(e,{colHeight:n-o.b*(e.childElementCount-1),width:a,rawWidth:r})})),l.map((function(e){return e/r*100}))}(e,{rawHeight:m,rowWidth:n-o.b*(e.childElementCount-1)})}(e,function(e){return s(e).map(p).reduce((function(e,t){var n=a()(e,2),r=n[0],o=n[1],c=a()(t,2);return[r+c[0],o+c[1]]}),[0,0])}(e),t)}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function u(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function p(e){var t=u(e),n=t.length,r=1/t.map(d).reduce((function(e,t){return e+1/t}),0);return[r,r*n||1]}function d(e){var t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var r=n(7),a=n.n(r),o=n(0),c=n(2),i=function(e){var t=e.cx,n=void 0===t?23:t,r=e.cy,a=void 0===r?3:r,i=e.r,l=void 0===i?4:i,s=e.fill,u=void 0===s?"#e34c84":s,p=e.stroke,d=void 0===p?"#ffffff":p,m=e.strokeWidth,b=void 0===m?"2":m;return Object(o.createElement)(c.Circle,{className:"jetpack-paid-block-symbol",cx:n,cy:a,r:l,fill:u,stroke:d,strokeWidth:b})},l=n(38),s=function(e){var t,n,r;return(null===(t=e)||void 0===t?void 0:t.src)?e=a()({},e,{src:Object(o.cloneElement)(e.src,{children:[e.src.props.children,Object(o.createElement)(i,{key:"paid-symbol"})]})}):(null===(n=e)||void 0===n||null===(r=n.props)||void 0===r?void 0:r.children)&&(e=Object(o.cloneElement)(e,{children:[e.props.children,Object(o.createElement)(i,{key:"paid-symbol"})]})),e};t.a=s;function u(e,t){return Object(l.e)(e)?s(t):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(27),a=n.n(r),o=n(9),c=n.n(o),i=n(4),l=n(10),s=n(0),u=n(30),p={setPlans:function(e){return{type:"SET_PLANS",plans:e}},fetchFromAPI:function(e){return{type:"FETCH_FROM_API",url:e}}};Object(l.registerStore)("wordpress-com/plans",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PLANS":return t.plans}return e},actions:p,selectors:{getPlan:function(e,t){return e.find((function(e){return e.product_slug===t}))}},controls:{FETCH_FROM_API:function(e){var t=e.url;return fetch(t).then((function(e){return e.json()}))}},resolvers:{getPlan:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://public-api.wordpress.com/rest/v1.5/plans",e.next=3,p.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");case 3:return t=e.sent,e.abrupt("return",p.setPlans(t));case 5:case"end":return e.stop()}}),e)}))}});var d=n(38),m="a8c.wpcom-block-editor.openCheckoutModal";function b(e,t){t&&t(e),window.top.location.href=e}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.noop,n=Object(s.useState)(!1),r=c()(n,2),o=r[0],p=r[1],h=Object(l.useSelect)((function(t){var n=t("core/editor"),r=t("wordpress-com/plans"),a=n.getCurrentPost(),o=a.id,c=a.type,i=r&&r.getPlan(e);return{checkoutUrl:Object(d.b)({plan:i,planSlug:e,postId:o,postType:c}),isAutosaveablePost:n.isEditedPostAutosaveable(),isDirtyPost:n.isEditedPostDirty(),planData:i}}),[]),f=h.checkoutUrl,g=h.isAutosaveablePost,j=h.isDirtyPost,v=h.planData,k=Object(l.dispatch)("core/editor").savePost,y=function(){var e=a()(regeneratorRuntime.mark((function e(n){var r,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(u.hasAction)(m)){e.next=5;break}return n.preventDefault(),k(n),Object(u.doAction)(m,{products:[v]}),e.abrupt("return");case 5:if(null===(r=window)||void 0===r||null===(a=r.top)||void 0===a||null===(c=a.location)||void 0===c?void 0:c.href){e.next=7;break}return e.abrupt("return");case 7:if(n.preventDefault(),!o){e.next=10;break}return e.abrupt("return");case 10:if(p(!0),j&&g){e.next=13;break}return e.abrupt("return",b(f,t));case 13:k(n).then((function(){return b(f,t)}));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return[f,y,o]}},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},r.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))}))}))},r.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},r.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},r.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},r.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},r.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},r.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},r.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},r.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=r},function(e,t,n){"use strict";function r(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}r.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},r.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},r.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},r.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},r.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=r},function(e,t,n){var r; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n=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){for(var r in t)n.call(t,r)&&(e[r]=!!t[r])}(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 c=[];for(var i in o)o[i]&&c.push(i);return c.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t){"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}}},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))})),t.splice(a,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(174)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=i(n(19)),o=i(n(175)),c=i(n(178));function i(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function s(e,t){var n,c,i,u,p,d,m,b,h=[],f={};for(d=0;d<e.length;d++)if("string"!==(p=e[d]).type){if(!t.hasOwnProperty(p.value)||void 0===t[p.value])throw new Error("Invalid interpolation, missing component node: `"+p.value+"`");if("object"!==r(t[p.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+p.value+"`","\n> "+l);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){n=t[p.value],i=d;break}h.push(t[p.value])}else h.push(p.value);return n&&(u=function(e,t){var n,r,a=t[e],o=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===a.value){if("componentOpen"===n.type){o++;continue}if("componentClose"===n.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+a.value+"`")}(i,e),m=s(e.slice(i+1,u),t),c=a.default.cloneElement(n,{},m),h.push(c),u<e.length-1&&(b=s(e.slice(u+1),t),h=h.concat(b))),1===h.length?h[0]:(h.forEach((function(e,t){e&&(f["interpolation-child-"+t]=e)})),(0,o.default)(f))}t.default=function(e){var t=e.mixedString,n=e.components,a=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,c.default)(t);try{return s(o,n)}catch(i){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+i.message+"`");return t}}},function(e,t,n){var r=n(69),a=n(107);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})}}},function(e,t,n){"use strict";var r=n(91),a=n(179),o=n(180),c=r.rotl32,i=r.sum32,l=r.sum32_5,s=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]=c(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 b=~~(r/20),h=l(c(a,5),s(b,o,u,d),m,n[r],p[b]);m=d,d=u,u=c(o,30),o=a,a=h}this.h[0]=i(this.h[0],a),this.h[1]=i(this.h[1],o),this.h[2]=i(this.h[2],u),this.h[3]=i(this.h[3],d),this.h[4]=i(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){e.exports=n.p+"images/map-theme_default-2ceb449b599dbcbe2a90fead5a5f3824.jpg"},function(e,t,n){e.exports=n.p+"images/map-theme_black_and_white-1ead5946ca104d83676d6e3410e1d733.jpg"},function(e,t,n){e.exports=n.p+"images/map-theme_satellite-c74dc129bda9502fb0fb362bb627577e.jpg"},function(e,t,n){e.exports=n.p+"images/map-theme_terrain-2b6e6c1c8d09cbdc58a4c0653be1a6e3.jpg"},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(9),a=n.n(r),o=n(27),c=n.n(o),i=n(4);n(187);function l(){return s.apply(this,arguments)}function s(){return(s=c()(regeneratorRuntime.mark((function e(){var t,r,o,c,l,s,u,p=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:".swiper-container",r=p.length>1&&void 0!==p[1]?p[1]:{},o=p.length>2&&void 0!==p[2]?p[2]:{},c={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,touchStartPreventDefault:!1,on:Object(i.mapValues)(o,(function(e){return function(){e(this)}}))},e.next=6,Promise.all([n.e(30).then(n.t.bind(null,370,7)),n.e(30).then(n.t.bind(null,371,7))]);case 6:return l=e.sent,s=a()(l,1),u=s[0].default,e.abrupt("return",new u(t,Object(i.merge)({},c,r)));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t){!function(){e.exports=this.wp.escapeHtml}()},function(e,t,n){"use strict";var r=n(9),a=n.n(r),o=n(12),c=n.n(o),i=n(16),l=n.n(i),s=n(13),u=n.n(s),p=n(14),d=n.n(p),m=n(6),b=n.n(m),h=n(15),f=n.n(h),g=n(3),j=n.n(g),v=n(0),k=n(1),y=n(4),_=n(2),O=(n(182),function(e){function t(){var e,n;c()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=u()(this,(e=d()(t)).call.apply(e,[this].concat(a))),j()(b()(n),"handleClick",(function(){(0,n.props.onClick)(b()(n))})),j()(b()(n),"getPoint",(function(){var e=n.props.point;return[e.coordinates.longitude,e.coordinates.latitude]})),n}return f()(t,e),l()(t,[{key:"componentDidMount",value:function(){this.renderMarker()}},{key:"componentWillUnmount",value:function(){this.marker&&this.marker.remove()}},{key:"componentDidUpdate",value:function(){this.renderMarker()}},{key:"renderMarker",value:function(){var e=this.props,t=e.map,n=e.point,r=e.mapboxgl,a=e.markerColor,o=this.handleClick,c=[n.coordinates.longitude,n.coordinates.latitude],i=this.marker?this.marker.getElement():document.createElement("div");this.marker?this.marker.setLngLat(c):(i.className="wp-block-jetpack-map-marker",this.marker=new r.Marker(i).setLngLat(c).setOffset([0,-19]).addTo(t),this.marker.getElement().addEventListener("click",o)),i.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="'+a+'" mask="url(#c)"/></g></svg>'}},{key:"render",value:function(){return null}}]),t}(v.Component));O.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:function(){}};var w=O,E=function(e){function t(){var e,n;c()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=u()(this,(e=d()(t)).call.apply(e,[this].concat(a))),j()(b()(n),"closeClick",(function(){n.props.unsetActiveMarker()})),n}return f()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this.props.mapboxgl;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)}},{key:"componentDidUpdate",value:function(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}},{key:"render",value:function(){return this.el?Object(v.createPortal)(this.props.children,this.el):null}},{key:"openWindow",value:function(){var e=this.props,t=e.map,n=e.activeMarker;this.infowindow.setLngLat(n.getPoint()).addTo(t)}},{key:"closeWindow",value:function(){this.infowindow.remove()}}]),t}(v.Component);E.defaultProps={unsetActiveMarker:function(){},activeMarker:null,map:null,mapboxgl:null};var C=E;var x=function(e){function t(){var e;return c()(this,t),e=u()(this,d()(t).apply(this,arguments)),j()(b()(e),"onMarkerClick",(function(t){var n=e.props.onMarkerClick;e.setState({activeMarker:t}),n()})),j()(b()(e),"onMapClick",(function(){e.setState({activeMarker:null})})),j()(b()(e),"clearCurrentMarker",(function(){e.setState({activeMarker:null})})),j()(b()(e),"updateActiveMarker",(function(t){var n=e.props.points,r=e.state.activeMarker.props.index,a=n.slice(0);Object(y.assign)(a[r],t),e.props.onSetPoints(a)})),j()(b()(e),"deleteActiveMarker",(function(){var t=e.props.points,n=e.state.activeMarker.props.index,r=t.slice(0);r.splice(n,1),e.props.onSetPoints(r),e.setState({activeMarker:null})})),j()(b()(e),"sizeMap",(function(){var t=e.props.mapHeight,n=e.state.map,r=e.mapRef.current;if(t)r.style.height=t+"px";else{var a=r.offsetWidth,o=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,c=Math.min(a*(3/4),o);r.style.height=c+"px"}n.resize(),e.setBoundsByMarkers()})),j()(b()(e),"updateZoom",(function(){var t=e.props.zoom,n=e.state.map;n.setZoom(t),n.updateZoom(t)})),j()(b()(e),"setBoundsByMarkers",(function(){var t=e.props,n=t.admin,r=t.onSetMapCenter,a=t.onSetZoom,o=t.points,c=t.zoom,i=e.state,l=i.map,s=i.activeMarker,u=i.mapboxgl,p=i.zoomControl,d=i.boundsSetProgrammatically;if(l&&(o.length&&n?l.dragPan.disable():l.dragPan.enable(),o.length&&!s)){var m=new u.LngLatBounds;if(o.forEach((function(e){m.extend([e.coordinates.longitude,e.coordinates.latitude])})),r(m.getCenter()),o.length>1){l.fitBounds(m,{padding:{top:80,bottom:80,left:40,right:40}}),e.setState({boundsSetProgrammatically:!0});try{l.removeControl(p)}catch(b){}}else{if(l.setCenter(m.getCenter()),d){l.setZoom(12),a(12)}else l.setZoom(parseInt(c,10));l.addControl(p),e.setState({boundsSetProgrammatically:!1})}}})),j()(b()(e),"scriptsLoaded",(function(){var t=e.props,n=t.mapCenter,r=t.points;e.setState({loaded:!0}),r.length,e.initMap(n)})),j()(b()(e),"googlePoint2Mapbox",(function(e){return e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0}})),e.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},e.mapRef=Object(v.createRef)(),e.debouncedSizeMap=Object(y.debounce)(e.sizeMap,250),e}return f()(t,e),l()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.points,r=t.admin,a=t.children,o=t.markerColor,c=this.state,i=c.map,l=c.activeMarker,s=c.mapboxgl,u=this.onMarkerClick,p=this.deleteActiveMarker,d=this.updateActiveMarker,m=Object(y.get)(l,"props.point")||{},b=m.title,h=m.caption,f=v.Children.map(a,(function(e){if("AddPoint"===Object(y.get)(e,"props.tagName"))return e})),g=i&&s&&n.map((function(e,t){return Object(v.createElement)(w,{key:t,point:e,index:t,map:i,mapboxgl:s,markerColor:o,onClick:u})})),j=s&&Object(v.createElement)(C,{activeMarker:l,map:i,mapboxgl:s,unsetActiveMarker:function(){return e.setState({activeMarker:null})}},l&&r&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)(_.TextControl,{label:Object(k.__)("Marker Title","jetpack"),value:b,onChange:function(e){return d({title:e})}}),Object(v.createElement)(_.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:Object(k.__)("Marker Caption","jetpack"),value:h,rows:"2",tag:"textarea",onChange:function(e){return d({caption:e})}}),Object(v.createElement)(_.Button,{onClick:p,className:"wp-block-jetpack-map__delete-btn"},Object(v.createElement)(_.Dashicon,{icon:"trash",size:"15"})," ",Object(k.__)("Delete Marker","jetpack"))),l&&!r&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)("h3",null,b),Object(v.createElement)("p",null,h)));return Object(v.createElement)(v.Fragment,null,Object(v.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},g),j,f)}},{key:"componentDidMount",value:function(){this.props.apiKey&&this.loadMapLibraries()}},{key:"componentWillUnmount",value:function(){this.debouncedSizeMap.cancel()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.admin,r=t.apiKey,a=t.children,o=t.points,c=t.mapStyle,i=t.mapDetails,l=t.scrollToZoom,s=t.showFullscreenButton,u=this.state,p=u.map,d=u.fullscreenControl;r&&r.length>0&&r!==e.apiKey&&this.loadMapLibraries(),a!==e.children&&!1!==a&&this.clearCurrentMarker(),o!==e.points&&this.setBoundsByMarkers(),o.length!==e.points.length&&this.clearCurrentMarker(),c===e.mapStyle&&i===e.mapDetails||p.setStyle(this.getMapStyle()),l!==e.scrollToZoom&&(l?p.scrollZoom.enable():p.scrollZoom.disable()),s!==e.showFullscreenButton&&(s?(p.addControl(d),n&&d._fullscreenButton&&(d._fullscreenButton.disabled=!0)):p.removeControl(d))}},{key:"getMapStyle",value:function(){var e=this.props;return function(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"]}(e.mapStyle,e.mapDetails)}},{key:"getMapType",value:function(){switch(this.props.mapStyle){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";case"black_and_white":default:return"ROADMAP"}}},{key:"loadMapLibraries",value:function(){var e=this,t=this.props.apiKey;Promise.all([n.e(29).then(n.t.bind(null,463,7)),n.e(29).then(n.t.bind(null,464,7))]).then((function(n){var r=a()(n,1)[0].default;r.accessToken=t,e.setState({mapboxgl:r},e.scriptsLoaded)}))}},{key:"initMap",value:function(e){var t=this,n=this.state.mapboxgl,r=this.props,a=r.zoom,o=r.onMapLoaded,c=r.onError,i=r.scrollToZoom,l=r.showFullscreenButton,s=r.admin,u=null;try{u=new n.Map({container:this.mapRef.current,style:this.getMapStyle(),center:this.googlePoint2Mapbox(e),zoom:parseInt(a,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(m){return void c("mapbox_error",m.message)}i||u.scrollZoom.disable();var p=new n.FullscreenControl;u.on("error",(function(e){c("mapbox_error",e.error.message)}));var d=new n.NavigationControl({showCompass:!1,showZoom:!0});u.on("zoomend",(function(){t.props.onSetZoom(u.getZoom())})),u.on("moveend",(function(){var e=t.props,n=e.onSetMapCenter;e.points.length<1&&n(u.getCenter())})),u.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:u,zoomControl:d,fullscreenControl:p},(function(){t.debouncedSizeMap(),u.addControl(d),l&&(u.addControl(p),s&&p._fullscreenButton&&(p._fullscreenButton.disabled=!0)),t.mapRef.current.addEventListener("alignmentChanged",t.debouncedSizeMap),u.resize(),o(),t.setState({loaded:!0}),window.addEventListener("resize",t.debouncedSizeMap)}))}}]),t}(v.Component);x.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:function(){},onSetMapCenter:function(){},onMapLoaded:function(){},onMarkerClick:function(){},onError:function(){},markerColor:"red",apiKey:null,mapCenter:{}};t.a=x},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),a=n(1),o=n(2),c=n(66),i=n(67),l=Object(o.createSlotFill)("JetpackLikesAndSharingPanel"),s=l.Fill,u=l.Slot;Object(c.registerPlugin)("jetpack-likes-and-sharing-panel",{render:function(){return Object(r.createElement)(u,null,(function(e){return e.length?Object(r.createElement)(i.a,null,Object(r.createElement)(o.PanelBody,{title:Object(a.__)("Likes and Sharing","jetpack")},e)):null}))}})},,function(e,t,n){var r=n(73);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(21),a=n.n(r),o=n(0),c=n(11),i=n(1),l=n(32),s=n(24);Object(s.b)()||Object(s.a)()||Object(c.registerBlockCollection)("jetpack",{title:"Jetpack",icon:Object(o.createElement)(l.h,null)}),Object(c.setCategories)([].concat(a()(Object(c.getCategories)().filter((function(e){return"earn"!==e.slug}))),[{slug:"earn",title:Object(i.__)("Earn","jetpack"),icon:Object(o.createElement)(l.h,null)}])),Object(c.setCategories)([].concat(a()(Object(c.getCategories)().filter((function(e){return"grow"!==e.slug}))),[{slug:"grow",title:Object(i.__)("Grow","jetpack"),icon:Object(o.createElement)(l.h,null)}]))},function(e,t){!function(){e.exports=this.wp.notices}()},function(e,t){!function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return!1}}(),n=function(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t&&(n[Symbol.iterator]=function(){return n}),n},r=function(e){return encodeURIComponent(e).replace(/%20/g,"+")},a=function(e){return decodeURIComponent(String(e).replace(/\+/g," "))};(function(){try{var t=e.URLSearchParams;return"a=1"===new t("?a=1").toString()&&"function"==typeof t.prototype.set&&"function"==typeof t.prototype.entries}catch(n){return!1}})()||function(){var a=function(e){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var t=typeof e;if("undefined"===t);else if("string"===t)""!==e&&this._fromString(e);else if(e instanceof a){var n=this;e.forEach((function(e,t){n.append(t,e)}))}else{if(null===e||"object"!==t)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(e))for(var r=0;r<e.length;r++){var o=e[r];if("[object Array]"!==Object.prototype.toString.call(o)&&2===o.length)throw new TypeError("Expected [string, any] as entry at index "+r+" of URLSearchParams's input");this.append(o[0],o[1])}else for(var c in e)e.hasOwnProperty(c)&&this.append(c,e[c])}},o=a.prototype;o.append=function(e,t){e in this._entries?this._entries[e].push(String(t)):this._entries[e]=[String(t)]},o.delete=function(e){delete this._entries[e]},o.get=function(e){return e in this._entries?this._entries[e][0]:null},o.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},o.has=function(e){return e in this._entries},o.set=function(e,t){this._entries[e]=[String(t)]},o.forEach=function(e,t){var n;for(var r in this._entries)if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var a=0;a<n.length;a++)e.call(t,n[a],r,this)}},o.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),n(e)},o.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),n(e)},o.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),n(e)},t&&(o[Symbol.iterator]=o.entries),o.toString=function(){var e=[];return this.forEach((function(t,n){e.push(r(n)+"="+r(t))})),e.join("&")},e.URLSearchParams=a}();var o=e.URLSearchParams.prototype;"function"!=typeof o.sort&&(o.sort=function(){var e=this,t=[];this.forEach((function(n,r){t.push([r,n]),e._entries||e.delete(r)})),t.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),e._entries&&(e._entries={});for(var n=0;n<t.length;n++)this.append(t[n][0],t[n][1])}),"function"!=typeof o._fromString&&Object.defineProperty(o,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(e){if(this._entries)this._entries={};else{var t=[];this.forEach((function(e,n){t.push(n)}));for(var n=0;n<t.length;n++)this.delete(t[n])}var r,o=(e=e.replace(/^\?/,"")).split("&");for(n=0;n<o.length;n++)r=o[n].split("="),this.append(a(r[0]),r.length>1?a(r[1]):"")}})}("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(e){if(function(){try{var t=new e.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&t.searchParams}catch(n){return!1}}()||function(){var t=e.URL,n=function(t,n){"string"!=typeof t&&(t=String(t)),n&&"string"!=typeof n&&(n=String(n));var r,a=document;if(n&&(void 0===e.location||n!==e.location.href)){n=n.toLowerCase(),(r=(a=document.implementation.createHTMLDocument("")).createElement("base")).href=n,a.head.appendChild(r);try{if(0!==r.href.indexOf(n))throw new Error(r.href)}catch(d){throw new Error("URL unable to set base "+n+" due to "+d)}}var o=a.createElement("a");o.href=t,r&&(a.body.appendChild(o),o.href=o.href);var c=a.createElement("input");if(c.type="url",c.value=t,":"===o.protocol||!/:/.test(o.href)||!c.checkValidity()&&!n)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:o});var i=new e.URLSearchParams(this.search),l=!0,s=!0,u=this;["append","delete","set"].forEach((function(e){var t=i[e];i[e]=function(){t.apply(i,arguments),l&&(s=!1,u.search=i.toString(),s=!0)}})),Object.defineProperty(this,"searchParams",{value:i,enumerable:!0});var p=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==p&&(p=this.search,s&&(l=!1,this.searchParams._fromString(this.search),l=!0))}})},r=n.prototype;["hash","host","hostname","port","protocol"].forEach((function(e){!function(e){Object.defineProperty(r,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:!0})}(e)})),Object.defineProperty(r,"search",{get:function(){return this._anchorElement.search},set:function(e){this._anchorElement.search=e,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:!0},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],t=this._anchorElement.port!=e&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(e){},enumerable:!0},username:{get:function(){return""},set:function(e){},enumerable:!0}}),n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)},e.URL=n}(),void 0!==e.location&&!("origin"in e.location)){var t=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:t,enumerable:!0})}catch(n){setInterval((function(){e.location.origin=t()}),100)}}}("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},function(e,t,n){},function(e,t,n){"use strict";e.exports=n(240)},function(e,t,n){"use strict";e.exports.encode=n(241),e.exports.decode=n(242),e.exports.format=n(243),e.exports.parse=n(244)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",a="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+a+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),c=new RegExp("^(?:"+r+"|"+a+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=c},function(e,t,n){"use strict";function r(e,t){var n,r,a,o,c,i=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(c=e.tokens[a.token]).type="s_open",c.tag="s",c.nesting=1,c.markup="~~",c.content="",(c=e.tokens[o.token]).type="s_close",c.tag="s",c.nesting=-1,c.markup="~~",c.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&i.push(o.token-1));for(;i.length;){for(r=(n=i.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(c=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=c)}}e.exports.tokenize=function(e,t){var n,r,a,o,c=e.pos,i=e.src.charCodeAt(c);if(t)return!1;if(126!==i)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(i),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:i,length:0,jump:n/2,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.postProcess=function(e){var t,n=e.tokens_meta,a=e.tokens_meta.length;for(r(e,e.delimiters),t=0;t<a;t++)n[t]&&n[t].delimiters&&r(e,n[t].delimiters)}},function(e,t,n){"use strict";function r(e,t){var n,r,a,o,c,i;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],i=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1&&t[n-1].marker===r.marker,c=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=i?"strong_open":"em_open",o.tag=i?"strong":"em",o.nesting=1,o.markup=i?c+c:c,o.content="",(o=e.tokens[a.token]).type=i?"strong_close":"em_close",o.tag=i?"strong":"em",o.nesting=-1,o.markup=i?c+c:c,o.content="",i&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=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,jump:n,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.postProcess=function(e){var t,n=e.tokens_meta,a=e.tokens_meta.length;for(r(e,e.delimiters),t=0;t<a;t++)n[t]&&n[t].delimiters&&r(e,n[t].delimiters)}},function(e,t,n){},function(e,t,n){},function(e){e.exports=JSON.parse('{"production":["business-hours","button","calendly","contact-form","contact-info","donations","eventbrite","gathering-tweetstorms","gif","google-calendar","image-compare","instagram-gallery","likes","mailchimp","map","markdown","opentable","pinterest","podcast-player","publicize","rating-star","recurring-payments","related-posts","repeat-visitor","revue","send-a-message","send-a-message/whatsapp-button","sharing","shortlinks","simple-payments","slideshow","social-previews","story","subscriptions","tiled-gallery","videopress","wordads"],"beta":["amazon"],"experimental":["anchor-fm","seo","premium-content","conversation","dialogue"],"no-post-editor":["business-hours","button","calendly","contact-form","contact-info","donations","eventbrite","gif","google-calendar","instagram-gallery","mailchimp","map","markdown","opentable","pinterest","rating-star","recurring-payments","related-posts","repeat-visitor","revue","simple-payments","slideshow","subscriptions","tiled-gallery","videopress","wordads"]}')},function(e,t,n){"use strict";var r=n(214),a=n(215);function o(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=a({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),a=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(a),o,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))):r},t.stringify=function(e,t){var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[o(t,e),"[",r,"]"].join(""):[o(t,e),"[",o(r,e),"]=",o(n,e)].join("")};case"bracket":return function(t,n){return null===n?o(t,e):[o(t,e),"[]=",o(n,e)].join("")};default:return function(t,n){return null===n?o(t,e):[o(t,e),"=",o(n,e)].join("")}}}(t=a({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var a=e[r];if(void 0===a)return"";if(null===a)return o(r,t);if(Array.isArray(a)){var c=[];return a.slice().forEach((function(e){void 0!==e&&c.push(n(r,e,c.length))})),c.join("&")}return o(r,t)+"="+o(a,t)})).filter((function(e){return e.length>0})).join("&"):""}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,a=void 0===n?24:n,o=e.onClick,i=(e.icon,e.className),l=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-notice-outline",i,(t=a,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",r({className:s,height:a,width:a,onClick:o},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var a,o=n(19),c=(a=o)&&a.__esModule?a:{default:a};e.exports=t.default},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,a=void 0===n?24:n,o=e.onClick,i=(e.icon,e.className),l=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-star",i,(t=a,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",r({className:s,height:a,width:a,onClick:o},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})))};var a,o=n(19),c=(a=o)&&a.__esModule?a:{default:a};e.exports=t.default},function(e,t,n){e.exports=n.p+"images/eventbrite-in-page-example-e7ade5e253cebf23789d136227b66aa4.png"},function(e,t){!function(){e.exports=this.wp.viewport}()},function(e,t,n){e.exports=n.p+"images/map-preview-1744c8f7587de6d8857dbbe7d7cf5cb8.jpg"},function(e,t,n){"use strict";e.exports=n(239)},function(e,t,n){e.exports=n.p+"images/paypal-button-1e53882e702881f8dfd958c141e65383.png"},function(e,t,n){e.exports=n.p+"images/paypal-button-2x-fe4d34770a47484f401cecbb892f8456.png"},function(e,t,n){e.exports=n.p+"images/simple-payments_example-1-f3666e40d28c564ecf04f814e9a9f236.jpg"},function(e,t,n){e.exports=n.p+"images/slideshow_example-1-4d22ce5ab8c84b87d307458fa7975fea.jpg"},function(e,t,n){e.exports=n.p+"images/slideshow_example-2-2c82eb59aaea53932f5e718e17284db7.jpg"},function(e,t,n){e.exports=n.p+"images/slideshow_example-3-75cfaba94fc18a9c4b2bc164bd070c08.jpg"},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,a=e.onClick,o=(e.icon,e.className),i=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-fullscreen",o,!1,!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",r({className:l,height:n,width:n,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})))};var a,o=n(19),c=(a=o)&&a.__esModule?a:{default:a};e.exports=t.default},function(e,t,n){e.exports=n.p+"images/tiled-gallery_example-1-e124e79c7cd0291640efe8f28aa9a6cd.jpg"},function(e,t,n){e.exports=n.p+"images/tiled-gallery_example-2-ee687d7366c359324b23a9681fb2cf92.jpg"},function(e,t,n){e.exports=n.p+"images/tiled-gallery_example-3-4d22ce5ab8c84b87d307458fa7975fea.jpg"},function(e,t,n){e.exports=n.p+"images/tiled-gallery_example-4-2c82eb59aaea53932f5e718e17284db7.jpg"},function(e,t,n){e.exports=n.p+"images/tiled-gallery_example-5-3fafa6df43363f274a371ed90dbce254.jpg"},function(e,t,n){e.exports=n.p+"images/tiled-gallery_example-6-797246061ba8a7039b660584e9dc8946.jpg"},function(e,t,n){e.exports=n.p+"images/example_300x250-212e56e8c2ac91bdcbbd742cd7591e17.png"},function(e,t,n){e.exports=n.p+"images/example_728x90-a5e5ae2b8f307e343aea049530c1742d.png"},function(e,t,n){e.exports=n.p+"images/example_320x50-a1b9b09ff673b75f41d0b32162387f89.png"},function(e,t,n){e.exports=n.p+"images/example_160x600-a12cea65e6d4ce4b6f41d8c4f3184ded.png"},function(e,t,n){"use strict";n.d(t,"a",(function(){return te}));var r=n(23),a=n.n(r),o=n(42),c=n.n(o),i=n(4),l=n(0),s=(n(304),n(21)),u=n.n(s),p=n(9),d=n.n(p),m=n(8),b=n.n(m),h=n(34),f=n(18),g=n(1),j=n(7),v=n.n(j),k=n(27),y=n.n(k);function _(){return(_=y()(regeneratorRuntime.mark((function e(t){var n,r,a,o,c,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],"img"!==(r=t.tagName.toLowerCase())){e.next=9;break}if(!t.complete){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,new Promise((function(e){t.addEventListener("load",e,{once:!0})}));case 7:e.next=21;break;case 9:if("video"!==r&&"audio"!==r){e.next=21;break}if(a=t.src,!(n&&a&&a.startsWith(window.location.origin))){e.next=17;break}return t.src="",o=new Request(a),c=new Headers,t.type&&c.append("Content-Type",t.type),e.abrupt("return",fetch(o,{method:"GET",headers:c,mode:"no-cors",cache:"default"}).then((function(e){return e.blob()})).then((function(e){t.src=URL.createObjectURL(e)})));case 17:if(t.HAVE_ENOUGH_DATA!==t.readyState){e.next=19;break}return e.abrupt("return");case 19:return e.next=21,new Promise((function(e){t.addEventListener("canplaythrough",e,{once:!0}),t.load()}));case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O=n(2);function w(e){var t=e.isEllipsis,n=e.disabled,r=e.index,a=e.isSelected,o=e.progress,c=e.onClick,i=n||t,s=null;return t||(s=a?Object(g.sprintf)(Object(g.__)("Slide %d, currently selected.","jetpack"),r+1):Object(g.sprintf)(Object(g.__)("Slide %d","jetpack"),r+1)),Object(l.createElement)(O.Button,{role:i?"presentation":"tab",key:r,className:b()("wp-story-pagination-bullet",{"wp-story-pagination-ellipsis":t}),"aria-label":s,"aria-disabled":i||a,onClick:i||a?void 0:c,disabled:i},Object(l.createElement)("div",{className:"wp-story-pagination-bullet-bar"},Object(l.createElement)("div",{className:"wp-story-pagination-bullet-bar-progress",style:{width:"".concat(o,"%")}})))}n(305);var E=function(e){var t=e.className,n=e.size,r=e.isPressed,o=c()(e,["className","size","isPressed"]);return Object(l.createElement)("button",a()({type:"button","aria-pressed":r,className:b()("jetpack-mdc-icon-button","circle-icon","outlined","bordered",t),style:{width:"".concat(n,"px"),height:"".concat(n,"px")}},o))},C=function(e){var t=e.className,n=e.size,r=void 0===n?24:n,o=e.isPressed,i=c()(e,["className","size","isPressed"]);return Object(l.createElement)("button",a()({type:"button","aria-pressed":o,className:b()("jetpack-mdc-icon-button",t),style:{width:"".concat(r,"px"),height:"".concat(r,"px")}},i))},x=n(26),S=function(e){var t=e.children,n=e.size;return Object(x.a)(t,n,n)},A=function(e){var t=e.size;return Object(l.createElement)(S,{size:t},Object(l.createElement)(O.Path,{d:"M8 5v14l11-7z"}))},T=function(e){var t=e.size;return Object(l.createElement)(S,{size:t},Object(l.createElement)(O.Path,{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}))},N=function(e){var t=e.size;return Object(l.createElement)(S,{size:t},Object(l.createElement)(O.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"}))},P=function(e){var t=e.size;return Object(l.createElement)(S,{size:t},Object(l.createElement)(O.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"}))},M=function(e){var t=e.size;return Object(l.createElement)(S,{size:t},Object(l.createElement)(O.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"}))},B=function(e){var t=e.size;return Object(l.createElement)(S,{size:t},Object(l.createElement)(O.Path,{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}))},I=function(e){var t=e.size;return Object(l.createElement)(S,{size:t},Object(l.createElement)(O.Path,{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}))};function F(e){var t=e.playing,n=e.muted,r=e.setPlaying,a=e.setMuted,o=e.showMute;return Object(l.createElement)("div",{className:"wp-story-controls"},Object(l.createElement)(C,{isPressed:t,label:Object(g.__)("Play","jetpack"),onClick:function(){return r(!t)}},t?Object(l.createElement)(T,null):Object(l.createElement)(A,null)),o&&Object(l.createElement)(C,{isPressed:n,label:Object(g.__)("Mute","jetpack"),onClick:function(){return a(!n)}},n?Object(l.createElement)(M,null):Object(l.createElement)(P,null)))}function R(e){var t=e.fullscreen,n=e.onExitFullscreen,r=e.siteIconUrl,a=e.storyTitle;return t?Object(l.createElement)("div",{className:"wp-story-meta"},Object(l.createElement)("div",{className:"wp-story-icon"},Object(l.createElement)("img",{alt:"Site icon",src:r})),Object(l.createElement)("div",null,Object(l.createElement)("div",{className:"wp-story-title"},a)),Object(l.createElement)(C,{className:"wp-story-exit-fullscreen",label:Object(g.__)("Exit Fullscreen","jetpack"),onClick:n},Object(l.createElement)(N,null))):null}var L=n(155),D=n.n(L);function z(e){var t=e.ended,n=e.hasPrevious,r=e.hasNext,a=e.onNextSlide,o=e.onPreviousSlide,c=e.icon,i=e.slideCount,s=e.showSlideCount,u=Object(l.useCallback)((function(e){t||(e.stopPropagation(),o())}),[o,t]),p=Object(l.useCallback)((function(e){t||(e.stopPropagation(),a())}),[a,t]);return Object(l.createElement)("div",{className:"wp-story-overlay"},s&&Object(l.createElement)("div",{className:"wp-story-embed-icon"},c,Object(l.createElement)("span",null,i)),!s&&Object(l.createElement)("div",{className:"wp-story-embed-icon-expand"},Object(l.createElement)(D.a,{role:"img"})),n&&Object(l.createElement)("div",{className:"wp-story-prev-slide",onClick:u},Object(l.createElement)(E,{size:44,label:Object(g.__)("Previous Slide","jetpack"),className:"outlined-w"},Object(l.createElement)(B,{size:24}))),r&&Object(l.createElement)("div",{className:"wp-story-next-slide",onClick:p},Object(l.createElement)(E,{size:44,label:Object(g.__)("Next Slide","jetpack"),className:"outlined-w"},Object(l.createElement)(I,{size:24}))))}function U(e){var t=e.currentMedia,n=t&&"image"===t.type?t.url:null;return Object(l.createElement)("div",{className:"wp-story-background"},Object(l.createElement)("div",{className:"wp-story-background-image",style:{backgroundImage:n?'url("'.concat(n,'")'):"none"}}),Object(l.createElement)("div",{className:"wp-story-background-blur"}),Object(l.createElement)(O.SVG,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"0",height:"0"},Object(l.createElement)("filter",{id:"gaussian-blur-18"},Object(l.createElement)("feGaussianBlur",{stdDeviation:"18"}))))}var V=function(){return Object(l.createElement)("div",{className:"wp-story-loading-spinner"},Object(l.createElement)("div",{className:"wp-story-loading-spinner__outer"},Object(l.createElement)("div",{className:"wp-story-loading-spinner__inner"})))},q=function(e){var t=e.title,n=e.alt,r=e.className,a=e.id,o=e.mediaRef,c=e.mime,i=e.sizes,s=e.srcset,u=e.url;return Object(l.createElement)("img",{ref:o,"data-id":a,"data-mime":c,title:t,alt:n,src:u,className:b()("wp-story-image","wp-image-".concat(a),r),srcSet:s,sizes:i})},H=function(e){var t=e.title,n=e.className,r=e.id,a=e.mediaRef,o=e.mime,c=e.url;return Object(l.createElement)("video",{className:b()("wp-story-video","intrinsic-ignore","wp-video-".concat(r),n),ref:a,"data-id":r,title:t,type:o,src:c,playsInline:!0})},G=function(e){var t=e.targetAspectRatio,n=e.cropUpTo,r=e.type,o=e.width,i=e.height,s=c()(e,["targetAspectRatio","cropUpTo","type","width","height"]),u=null;if(o&&i){var p=o/i;if(p>=t)p>t/(1-n)||(u="wp-story-crop-wide");else p<t*(1-n)||(u="wp-story-crop-narrow")}var d="video"===r||(s.mime||"").startsWith("video/");return Object(l.createElement)("figure",null,d?Object(l.createElement)(H,a()({},s,{className:u})):Object(l.createElement)(q,a()({},s,{className:u})))},W=function(e){var t=e.media,n=e.index,r=e.currentSlideIndex,o=e.playing,c=e.uploading,i=e.ended,s=e.muted,u=e.setMuted,p=e.onEnd,m=e.onProgress,h=e.settings,f=e.targetAspectRatio,g=n===r,j=g&&o,k=Object(l.useRef)(null),O=Object(l.useState)(!1),w=d()(O,2),E=w[0],C=w[1],x=Object(l.useState)(!0),S=d()(x,2),A=S[0],T=S[1],N=function(){return k.current&&k.current.src&&"video"===k.current.tagName.toLowerCase()},P=Object(l.useState)({currentTime:0,duration:null,timeout:null}),M=d()(P,2),B=M[0],I=M[1],F=function(){var e=y()(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.play();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),u(!0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}();return Object(l.useLayoutEffect)((function(){N()&&(k.current.muted=s,s||(k.current.volume=h.volume))}),[s]),Object(l.useEffect)((function(){N()&&(j?F(k.current):k.current.pause())}),[j,A,s]),Object(l.useLayoutEffect)((function(){N()&&i&&g&&(k.current.currentTime=k.current.duration)}),[i,g]),Object(l.useEffect)((function(){g||(I({currentTime:0,duration:null,timeout:null,lastUpdate:null}),N()&&(k.current.pause(),k.current.currentTime=0))}),[g]),Object(l.useEffect)((function(){j&&i&&(I({currentTime:0,duration:null,timeout:null,lastUpdate:null}),N()&&(k.current.currentTime=0))}),[j,i]),Object(l.useLayoutEffect)((function(){if(clearTimeout(B.timeout),!A){if(o&&g){var e=N()?k.current:null,t=e?e.duration:h.imageTime;if(B.currentTime>=t)return;B.timeout=setTimeout((function(){var n=B.lastUpdate?Date.now()-B.lastUpdate:h.renderInterval,r=e?e.currentTime:B.currentTime+n;I(v()({},B,{lastUpdate:Date.now(),duration:t,currentTime:r}))}),h.renderInterval)}g&&!o&&B.lastUpdate&&I(v()({},B,{lastUpdate:null}))}}),[A,o,g,B]),Object(l.useEffect)((function(){if(j&&!i&&null!==B.duration){var e=Math.round(1e3*B.currentTime/B.duration)/10;e>=100?(m(100),p()):m(e)}}),[j,g,B]),Object(l.useEffect)((function(){n<=r+(o?1:0)&&C(!0)}),[o,r]),Object(l.useLayoutEffect)((function(){k.current&&function(e){return _.apply(this,arguments)}(k.current,!0).then((function(){T(!1)}))}),[E,c]),Object(l.createElement)(l.Fragment,null,g&&(A||c)&&Object(l.createElement)("div",{className:b()("wp-story-slide","is-loading",{transparent:c})},Object(l.createElement)(V,null)),Object(l.createElement)("div",{className:"wp-story-slide",style:{display:g&&!A?"block":"none"}},E&&Object(l.createElement)(G,a()({},t,{targetAspectRatio:f,cropUpTo:h.cropUpTo,index:n,mediaRef:k}))))},$=n(81),K=function(e){var t,n=e.slides,r=e.disabled,a=e.currentSlideIndex,o=e.currentSlideProgress,c=e.onSlideSeek,s=e.maxBullets,u=Math.min(n.length,s),p=Math.floor(u/2),d=0,m=n.length-1;return n.length<=s||a<p?(t=a,m=u-1):a>n.length-p?(t=a-n.length+u,d=n.length-u):(t=p,d=a-p,m=a+p),Object(l.createElement)("div",{className:"wp-story-pagination wp-story-pagination-bullets",role:"tablist"},d>0&&Object(l.createElement)(w,{key:"bullet-0",index:d-1,progress:100,isEllipsis:!0}),Object(i.range)(1,u+1).map((function(e,n){var i,s=n+d;return i=s<a?100:s>a?0:o,Object(l.createElement)(w,{key:"bullet-".concat(n),index:s,progress:i,disabled:r,isSelected:t===n,onClick:function(){return c(s)}})})),m<n.length-1&&Object(l.createElement)(w,{key:"bullet-".concat(u+1),index:m+1,progress:0,isEllipsis:!0}))},Z=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent),J=function(e){var t=e.slides,n=e.disabled,r=(e.ref,c()(e,["slides","disabled","ref"])),o=Object(l.useState)(0),s=d()(o,2),p=s[0],m=s[1],j=Object(l.useState)(!1),v=d()(j,2),k=v[0],y=v[1],_=Object(l.useState)(!1),O=d()(_,2),w=O[0],E=O[1],C=Object(l.useState)(r.startMuted),x=d()(C,2),S=x[0],A=x[1],T=Object(l.useState)(0),N=d()(T,2),P=N[0],M=N[1],B=Object(l.useRef)(),I=Object(l.useRef)(),L=Object(l.useState)(null),D=d()(L,2),V=D[0],q=D[1],H=Object(f.useResizeObserver)(),G=d()(H,2),J=G[0],Y=G[1],Q=Y.width,X=Y.height,ee=Object(l.useState)(r.defaultAspectRatio),te=d()(ee,2),ne=te[0],re=te[1],ae=Object(l.useState)(!1),oe=d()(ae,2),ce=oe[0],ie=oe[1],le=Object(l.useState)(null),se=d()(le,2),ue=se[0],pe=se[1],de=Object(i.some)(t,(function(e){return Object(h.isBlobURL)(e.url)})),me=function(e){var n=e<t.length?t[e]:null;return!!n&&("video"===n.type||(n.mime||"").startsWith("video/"))},be=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.playOnNextSlide;M(0),m(e),t&&y(t)},he=Object(l.useCallback)((function(){n||(ce||k||!r.playInFullscreen||ie(!0),w&&!k&&be(0),k||ce||y(!0))}),[k,w,ce,n]),fe=Object(l.useCallback)((function(){p>0&&be(p-1)}),[p]),ge=Object(l.useCallback)((function(){p<t.length-1?be(p+1):(y(!1),E(!0),M(100),r.exitFullscreenOnEnd&&ie(!1))}),[p,t]),je=Object(l.useCallback)((function(){ie(!1),r.playInFullscreen&&y(!1)}),[ce]);return Object(l.useEffect)((function(){n&&k&&y(!1)}),[n,k]),Object(l.useLayoutEffect)((function(){k&&E(!1)}),[k]),Object(l.useEffect)((function(){r.loadInFullscreen&&ie(!0),r.playOnLoad&&y(!0)}),[]),Object(l.useLayoutEffect)((function(){if(B.current){var e=Math.round(r.defaultAspectRatio*B.current.offsetHeight);ce&&(e=Math.abs(1-e/Q)<r.cropUpTo?Q:e),q(e)}}),[Q,X,ce]),Object(l.useLayoutEffect)((function(){V&&B.current&&B.current.offsetHeight>0&&re(V/B.current.offsetHeight)}),[V]),Object(l.useLayoutEffect)((function(){if(ce)Z&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&!r.loadInFullscreen?((t=I.current).requestFullscreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen).call(t):(pe([document.documentElement.scrollLeft,document.documentElement.scrollTop]),document.body.classList.add("wp-story-in-fullscreen"),document.getElementsByTagName("html")[0].classList.add("wp-story-in-fullscreen"));else if(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullScreenElement)(document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document);else{var e;if(document.body.classList.remove("wp-story-in-fullscreen"),ue)(e=window).scrollTo.apply(e,u()(ue));document.getElementsByTagName("html")[0].classList.remove("wp-story-in-fullscreen")}var t}),[ce]),Object(l.createElement)("div",{ref:I,className:b()(["wp-story-app",{"wp-story-fullscreen":ce}])},J,Object(l.createElement)("div",{role:n?"presentation":"button","aria-label":Object(g.__)("Play story","jetpack"),tabIndex:ce?-1:0,className:b()("wp-story-container",{"wp-story-with-controls":!n&&!ce&&!r.playInFullscreen,"wp-story-fullscreen":ce,"wp-story-ended":w,"wp-story-disabled":n,"wp-story-clickable":!n&&!ce}),style:{maxWidth:"".concat(V,"px")},onClick:he},Object(l.createElement)(R,a()({},r.metadata,{fullscreen:ce,onExitFullscreen:je})),Object(l.createElement)("div",{ref:B,className:"wp-story-wrapper"},t.map((function(e,t){return Object(l.createElement)(W,{key:t,media:e,index:t,currentSlideIndex:p,playing:k,uploading:de,muted:S,setMuted:A,ended:w,onProgress:M,onEnd:ge,settings:r,targetAspectRatio:ne,isVideo:me(p)})}))),Object(l.createElement)(z,{icon:$.a,slideCount:t.length,showSlideCount:r.showSlideCount,ended:w,hasPrevious:p>0,hasNext:p<t.length-1,onPreviousSlide:fe,onNextSlide:ge}),r.showProgressBar&&Object(l.createElement)(K,{slides:t,disabled:!ce,currentSlideIndex:p,currentSlideProgress:P,onSlideSeek:be,maxBullets:ce?r.maxBulletsFullscreen:r.maxBullets}),Object(l.createElement)(F,{playing:k,muted:S,setPlaying:y,setMuted:A,showMute:me(p)})),ce&&Object(l.createElement)(U,{currentMedia:r.blurredBackground&&t.length>p&&t[p]}))},Y=window&&window.Element&&window.Element.prototype.hasOwnProperty("attachShadow");function Q(e){var t=e.enabled,n=e.delegatesFocus,r=void 0!==n&&n,a=e.mode,o=void 0===a?"open":a,c=e.globalStyleElements,i=void 0===c?[]:c,s=e.adoptedStyleSheets,p=void 0===s?null:s,m=e.children,b=Object(l.useState)(null),h=d()(b,2),f=h[0],g=h[1],j=Object(l.useCallback)((function(e){null!==e&&g(e)}),[]),v=Object(l.useState)(!1),k=d()(v,2),y=k[0],_=k[1],O="string"==typeof i?u()(document.querySelectorAll(i)):i,w=Y&&t&&O.length>0;if(Object(l.useEffect)((function(){if(f)if(f.parentNode.shadowRoot)_(f.parentNode.shadowRoot);else{var e=f.parentNode.attachShadow({delegatesFocus:r,mode:o});p&&(e.adoptedStyleSheets=p),_(e)}}),[f]),w&&!y)return Object(l.createElement)("span",{ref:j});var E=Object(l.createElement)(l.Fragment,null,w&&Object(l.createElement)(X,{globalStyleElements:O}),m);return w?Object(l.createPortal)(E,y):E}function X(e){var t=e.globalStyleElements;return Object(l.createElement)(l.Fragment,null,t.map((function(e,t){var n=e.id,r=e.tagName,a=e.attributes,o=e.innerHTML;return"LINK"===r?Object(l.createElement)("link",{key:n||t,id:n,rel:a.rel.value,href:a.href.value}):"STYLE"===r?Object(l.createElement)("style",{key:n||t,id:n},o):void 0})))}var ee={imageTime:5e3,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:.5,renderInterval:50,maxBullets:7,maxBulletsFullscreen:14};function te(e){var t=e.slides,n=e.metadata,r=e.disabled,o=c()(e,["slides","metadata","disabled"]),s=Object(i.merge)({},ee,o);return Object(l.createElement)(Q,s.shadowDOM,Object(l.createElement)(J,a()({slides:t,metadata:n,disabled:r},s)))}},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"playing",(function(){return B})),n.d(r,"error",(function(){return I}));var a=n(12),o=n.n(a),c=n(16),i=n.n(c),l=n(13),s=n.n(l),u=n(14),p=n.n(u),d=n(6),m=n.n(d),b=n(15),h=n.n(b),f=n(3),g=n.n(f),j=n(0),v=n(8),k=n.n(v),y=n(1),_=n(78),O=n(18),w=n(10),E=n(33),C=n(9),x=n.n(C),S=n(4),A=(n(293),"undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{});function T(e,t,n){var r=document.createElement("div");r.className=e;var a=document.createElement("button");return a.innerText=t,a.addEventListener("click",n),a.setAttribute("aria-label",t),a.setAttribute("title",t),r.appendChild(a),r}var N=function(e){var t=e.trackSource,n=e.onPlay,r=e.onPause,a=e.onError,o=e.onTimeChange,c=e.onSkipForward,i=e.onJumpBack,l=e.currentTime,s=e.playStatus,u=void 0===s?E.b:s,p=e.onMetadataLoaded,d=Object(j.useRef)(),m=function(){d.current.play().catch((function(){}))},b=function(){d.current.pause(),Object(_.speak)(Object(y.__)("Paused","jetpack"),"assertive")};return Object(j.useEffect)((function(){var e=d.current,t=new MediaElementPlayer(e,A);if(i||c){var o="".concat(t.options.classPrefix,"button ").concat(t.options.classPrefix,"jump-button");if(i){var l="".concat(o," ").concat(t.options.classPrefix,"jump-backward-button");t.addControlElement(T(l,Object(y.__)("Jump Back","jetpack"),i),"jumpBackwardButton")}if(c){var s="".concat(o," ").concat(t.options.classPrefix,"skip-forward-button");t.addControlElement(T(s,Object(y.__)("Skip Forward","jetpack"),c),"skipForwardButton")}}return n&&e.addEventListener("play",n),r&&e.addEventListener("pause",r),a&&e.addEventListener("error",a),p&&e.addEventListener("loadedmetadata",p),function(){t.remove(),n&&e.removeEventListener("play",n),r&&e.removeEventListener("pause",r),a&&e.removeEventListener("error",a),p&&e.removeEventListener("loadedmetadata",p)}}),[d,n,r,a,i,c,p]),Object(j.useEffect)((function(){var e,t=!1===(null===(e=d.current)||void 0===e?void 0:e.paused)?[E.c,b]:[E.b,m],n=x()(t,2),r=n[0],a=n[1],o=Object(S.debounce)(a,100);return E.a!==u&&r!==u&&o(),function(){o.cancel()}}),[d,u,t]),Object(j.useEffect)((function(){if(o){var e=d.current,t=Object(S.throttle)((function(e){return o(e)}),1e3,{leading:!0,trailing:!1}),n=function(e){return t(e.target.currentTime)};return o&&(null==e||e.addEventListener("timeupdate",n)),function(){t.cancel(),null==e||e.removeEventListener("timeupdate",n)}}}),[d,o]),Object(j.useEffect)((function(){var e=d.current;l&&e&&Math.abs(Math.floor(l-e.currentTime))>1&&(e.currentTime=l)}),[d,l]),Object(j.createElement)("div",{className:"jetpack-audio-player"},Object(j.createElement)("audio",{src:t,ref:d}))},P=n(2),M={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},B=Object(j.createElement)(P.SVG,M,Object(j.createElement)(P.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(j.createElement)(P.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"})),I=Object(j.createElement)(P.SVG,M,Object(j.createElement)(P.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(j.createElement)(P.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"})),F=Object(j.memo)((function(e){var t,n,a=e.isPlaying,o=e.isError,c=e.className;o?(n="error",t=Object(y.__)("Error:","jetpack")):a&&(n="playing",t=Object(y.__)("Playing:","jetpack"));var i=r[n];return i?Object(j.createElement)("span",{className:"".concat(c," ").concat(c,"--").concat(n)},Object(j.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},"".concat(t," ")),i):Object(j.createElement)("span",{className:c})})),R=Object(j.memo)((function(e){var t=e.link,n=e.title,r=e.colors;return Object(j.createElement)("div",{className:"jetpack-podcast-player__track-error"},Object(y.__)("Episode unavailable. ","jetpack"),t&&Object(j.createElement)("span",{className:r.secondary.classes,style:{color:r.secondary.custom}},Object(j.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},Object(j.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},"".concat(Object(y.sprintf)(Object(y.__)("%s:","jetpack"),n)," ")),Object(y.__)("Open in a new tab","jetpack"))))})),L=n(68),D=Object(j.memo)((function(e){var t,n=e.track,r=e.isActive,a=e.isPlaying,o=e.isError,c=e.selectTrack,i=e.index,l=e.colors,s=void 0===l?{primary:{},secondary:{}}:l,u=Object(L.a)("color",s.primary.name),p=Object(L.a)("color",s.secondary.name),d=k()("jetpack-podcast-player__track",(t={"is-active":r,"has-primary":r&&(s.primary.name||s.primary.custom)},g()(t,u,r&&!!u),g()(t,"has-secondary",!r&&(s.secondary.name||s.secondary.custom)),g()(t,p,!r&&!!p),t)),m={};r&&s.primary.custom&&!u?m.color=s.primary.custom:r||!s.secondary.custom||p||(m.color=s.secondary.custom);var b=r?Object(y.__)("track","jetpack"):void 0;return Object(j.createElement)("li",{className:d,style:Object.keys(m).length?m:null},Object(j.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:n.link||n.src,role:"button","aria-current":b,onClick:function(e){e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),c(i))},onKeyDown:function(e){" "===event.key&&(e.preventDefault(),c(i))}},Object(j.createElement)(F,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:o}),Object(j.createElement)("span",{className:"jetpack-podcast-player__track-title"},n.title),n.duration&&Object(j.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:n.duration},n.duration)),r&&o&&Object(j.createElement)(R,{link:n.link,title:n.title,colors:s}))})),z=Object(j.memo)((function(e){var t=e.playerId,n=e.tracks,r=e.selectTrack,a=e.currentTrack,o=e.playerState,c=e.colors;return Object(j.createElement)("ol",{className:"jetpack-podcast-player__tracks","aria-labelledby":"jetpack-podcast-player__tracklist-title--".concat(t),"aria-describedby":"jetpack-podcast-player__tracklist-description--".concat(t)},n.map((function(e,t){var n=a===t;return Object(j.createElement)(D,{key:e.id,index:t,track:e,selectTrack:r,isActive:n,isPlaying:n&&o===E.c,isError:n&&o===E.a,colors:c})})))})),U=Object(j.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(j.createElement)(P.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"})),V=Object(j.memo)((function(e){var t=e.playerId,n=e.title,r=e.cover,a=e.link,o=e.track,c=e.children,i=e.showEpisodeTitle,l=e.showCoverArt,s=e.showEpisodeDescription,u=e.colors;return l||i||s?Object(j.createElement)("div",{className:"jetpack-podcast-player__header"},Object(j.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},l&&r&&Object(j.createElement)("div",{className:"jetpack-podcast-player__cover"},Object(j.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:r,alt:""})),i&&!!(n||o&&o.title)&&Object(j.createElement)(q,{playerId:t,title:n,link:a,track:o,colors:u})),!!(s&&o&&o.description)&&Object(j.createElement)("p",{id:"".concat(t,"__track-description"),className:"jetpack-podcast-player__track-description"},o.description),c):c})),q=Object(j.memo)((function(e){var t=e.playerId,n=e.title,r=e.link,a=e.track,o=e.colors,c=void 0===o?{primary:{name:null,custom:null,classes:""}}:o;return Object(j.createElement)("h2",{id:"".concat(t,"__title"),className:"jetpack-podcast-player__title"},!(!a||!a.title)&&Object(j.createElement)("span",{className:k()("jetpack-podcast-player__current-track-title",c.primary.classes),style:{color:c.primary.custom}},a.title,Object(j.createElement)("a",{className:"jetpack-podcast-player__track-title-link",href:a.link||a.src,target:"_blank",rel:"noopener noreferrer nofollow"},U)),!!(a&&a.title&&n)&&Object(j.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&Object(j.createElement)(H,{title:n,link:r,colors:c}))})),H=Object(j.memo)((function(e){var t=e.title,n=e.link;return Object(j.createElement)("span",{className:"jetpack-podcast-player__podcast-title"},n?Object(j.createElement)("a",{className:"jetpack-podcast-player__link",href:n,target:"_blank",rel:"noopener noreferrer nofollow"},t):{title:t})})),G=V;var W=function(e){function t(){var e,n;o()(this,t);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return n=s()(this,(e=p()(t)).call.apply(e,[this].concat(a))),g()(m()(n),"state",{currentTrack:0,hasUserInteraction:!1}),g()(m()(n),"recordUserInteraction",(function(){n.state.hasUserInteraction||n.setState({hasUserInteraction:!0})})),g()(m()(n),"selectTrack",(function(e){var t=n.state.currentTrack;if(t===e)return n.recordUserInteraction(),void n.props.toggleMediaSource(n.props.playerId);-1!==t&&n.props.pauseMediaSource(n.props.playerId),n.loadAndPlay(e)})),g()(m()(n),"loadAndPlay",(function(e){n.recordUserInteraction();var t=n.getTrack(e);if(t){n.setState({currentTrack:e});var r=n.getTrack(e),a=r.title,o=r.link;n.props.updateMediaSourceData(n.props.playerId,{title:a,link:o}),n.props.playMediaSource(n.props.playerId),Object(_.speak)("".concat(Object(y.sprintf)(Object(y.__)("Loading: %s","jetpack"),t.title)," ").concat(t.description),"assertive")}})),g()(m()(n),"getTrack",(function(e){return n.props.tracks[e]})),g()(m()(n),"handleError",(function(e){if(!n.state.hasUserInteraction){var t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;n.setState((function(){throw new Error(t)}))}n.props.errorMediaSource(n.props.playerId),Object(_.speak)("".concat(Object(y.__)("Error: Episode unavailable - Open in a new tab","jetpack")),"assertive")})),g()(m()(n),"handlePlay",(function(){n.props.playMediaSource(n.props.playerId),n.setState({hasUserInteraction:!0})})),g()(m()(n),"handlePause",(function(){n.props.pauseMediaSource(n.props.playerId),n.props.playerState!==E.a&&n.props.pauseMediaSource(n.props.playerId)})),g()(m()(n),"handleTimeChange",(function(e){n.props.setMediaSourceCurrentTime(n.props.playerId,e)})),g()(m()(n),"handleJump",(function(){n.props.setMediaSourceCurrentTime(n.props.playerId,n.props.currentTime-5)})),g()(m()(n),"handleSkip",(function(){n.props.setMediaSourceCurrentTime(n.props.playerId,n.props.currentTime+30)})),g()(m()(n),"updateMediaData",(function(e){var t,r;n.props.updateMediaSourceData(n.props.playerId,{duration:null===(t=e.target)||void 0===t?void 0:t.duration,domId:null===(r=e.target)||void 0===r?void 0:r.id})})),n}return h()(t,e),i()(t,[{key:"componentDidMount",value:function(){var e=this.props.playerId;if(e){var t=this.getTrack(this.state.currentTrack)||{};this.props.registerMediaSource(e,{title:t.title,link:t.link,state:E.b}),this.props.setDefaultMediaSource(e)}}},{key:"componentWillUnmount",value:function(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}},{key:"render",value:function(){var e=this.props,t=e.playerId,n=e.title,r=e.link,a=e.cover,o=e.tracks,c=e.attributes,i=e.currentTime,l=e.playerState,s=c.itemsToShow,u=c.primaryColor,p=c.customPrimaryColor,d=c.hexPrimaryColor,m=c.secondaryColor,b=c.customSecondaryColor,h=c.hexSecondaryColor,f=c.backgroundColor,g=c.customBackgroundColor,v=c.hexBackgroundColor,_=c.showCoverArt,O=c.showEpisodeTitle,w=c.showEpisodeDescription,E=this.state.currentTrack,C=o.slice(0,s),x=this.getTrack(E),S=Object(L.b)({primaryColor:u,customPrimaryColor:p,secondaryColor:m,customSecondaryColor:b,backgroundColor:f,customBackgroundColor:g}),A={color:b,backgroundColor:g,"--jetpack-podcast-player-primary":d,"--jetpack-podcast-player-secondary":h,"--jetpack-podcast-player-background":v},T=k()("jetpack-podcast-player",l,S.secondary.classes,S.background.classes);return Object(j.createElement)("section",{className:T,style:A,"aria-labelledby":n||x&&x.title?"".concat(t,"__title"):void 0,"aria-describedby":x&&x.description?"".concat(t,"__track-description"):void 0,"data-jetpack-iframe-ignore":!0},Object(j.createElement)(G,{playerId:t,title:n,link:r,cover:a,track:this.getTrack(E),showCoverArt:_,showEpisodeTitle:O,showEpisodeDescription:w,colors:S},Object(j.createElement)(N,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(E).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:l,currentTime:i,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),C.length>1&&Object(j.createElement)(j.Fragment,null,Object(j.createElement)("h4",{id:"jetpack-podcast-player__tracklist-title--".concat(t),className:"jetpack-podcast-player--visually-hidden"},Object(y.sprintf)(Object(y.__)("Playlist: %s","jetpack"),n)),Object(j.createElement)("p",{id:"jetpack-podcast-player__tracklist-description--".concat(t),className:"jetpack-podcast-player--visually-hidden"},Object(y.__)("Select an episode to play it in the audio player.","jetpack")),Object(j.createElement)(z,{playerId:t,playerState:l,currentTrack:E,tracks:C,selectTrack:this.selectTrack,colors:S})))}}]),t}(j.Component);W.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]};t.a=Object(O.compose)([function(e){var t=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return t=s()(this,(e=p()(n)).call.apply(e,[this].concat(a))),g()(m()(t),"state",{didError:!1,isIE11AudioIssue:!1}),g()(m()(t),"componentDidCatch",(function(e,n){t.props.onError(e,n)})),t}return h()(n,t),i()(n,[{key:"render",value:function(){var t=this.state,n=t.didError,r=t.isIE11AudioIssue;return n?Object(j.createElement)("section",{className:"jetpack-podcast-player"},Object(j.createElement)("p",{className:"jetpack-podcast-player__error"},r?Object(y.__)('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"):Object(y.__)("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack"))):Object(j.createElement)(e,this.props)}}]),n}(j.Component);return g()(t,"getDerivedStateFromError",(function(e){return{didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}})),t.defaultProps={onError:function(){}},t},Object(w.withSelect)((function(e,t){var n=t.playerId,r=e(E.d),a=r.getMediaSourceCurrentTime,o=r.getMediaPlayerState;return{currentTime:a(n),playerState:o(n)}})),Object(w.withDispatch)((function(e){var t=e(E.d);return{registerMediaSource:t.registerMediaSource,updateMediaSourceData:t.updateMediaSourceData,unregisterMediaSource:t.unregisterMediaSource,setDefaultMediaSource:t.setDefaultMediaSource,playMediaSource:t.playMediaSource,pauseMediaSource:t.pauseMediaSource,toggleMediaSource:t.toggleMediaSource,errorMediaSource:t.errorMediaSource,setMediaSourceCurrentTime:t.setMediaSourceCurrentTime}}))])(W)},function(e,t,n){var r=n(354);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){var r=n(21);e.exports=function(e){function t(e){var n,r=null;function o(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];if(o.enabled){var c=o,i=Number(new Date),l=i-(n||i);c.diff=l,c.prev=n,c.curr=i,n=i,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");var s=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return"%";s++;var a=t.formatters[n];if("function"==typeof a){var o=r[s];e=a.call(c,o),r.splice(s,1),s--}return e})),t.formatArgs.call(c,r);var u=c.log||t.log;u.apply(c,r)}}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=a,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:function(){return null===r?t.enabled(e):r},set:function(e){r=e}}),"function"==typeof t.init&&t.init(o),o}function a(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(r(t.names.map(o)),r(t.skips.map(o).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(n=0;n<a;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(90),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}},function(e,t,n){},function(e,t,n){"use strict";e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function c(){if(c.enabled){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=c,i=Number(new Date),l=i-(n||i);o.diff=l,o.prev=n,o.curr=i,n=i,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;s++;var a=r.formatters[n];if("function"==typeof a){var c=t[s];e=a.call(o,c),t.splice(s,1),s--}return e})),r.formatArgs.call(o,t);var u=o.log||r.log;u.apply(o,t)}}return c.namespace=e,c.enabled=r.enabled(e),c.useColors=r.useColors(),c.color=t(e),c.destroy=a,c.extend=o,"function"==typeof r.init&&r.init(c),r.instances.push(c),c}function a(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){r.enable("")},r.enable=function(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),a=n.length;for(t=0;t<a;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}},r.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=n(90),Object.keys(e).forEach((function(t){r[t]=e[t]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}},function(e,t,n){"use strict";var r=n(19),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(106),c=n(176),i=n(177),l="function"==typeof Symbol&&Symbol.iterator;function s(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var o,i=typeof e;if("undefined"!==i&&"boolean"!==i||(e=null),null===e||"string"===i||"number"===i||"object"===i&&e.$$typeof===a)return n(r,e,""===t?"."+s(e,0):t),1;var p=0,d=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m<e.length;m++)p+=u(o=e[m],d+s(o,m),n,r);else{var b=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(b){0;for(var h,f=b.call(e),g=0;!(h=f.next()).done;)p+=u(o=h.value,d+s(o,g++),n,r)}else if("object"===i){0;var j=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===j?"object with keys {"+Object.keys(e).join(", ")+"}":j,"")}}return p}var p=/\/+/g;function d(e){return(""+e).replace(p,"$&/")}var m,b,h=f,f=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},g=function(e){c(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function j(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function v(e,t,n){var a,c,i=e.result,l=e.keyPrefix,s=e.func,u=e.context,p=s.call(u,t,e.count++);Array.isArray(p)?k(p,i,n,o.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(a=p,c=l+(!p.key||t&&t.key===p.key?"":d(p.key)+"/")+n,p=r.cloneElement(a,{key:c},void 0!==a.props?a.props.children:void 0)),i.push(p))}function k(e,t,n,r,a){var o="";null!=n&&(o=d(n)+"/");var c=j.getPooled(t,o,r,a);!function(e,t,n){null==e||u(e,"",t,n)}(e,v,c),j.release(c)}j.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},m=function(e,t,n,r){if(this.instancePool.length){var a=this.instancePool.pop();return this.call(a,e,t,n,r),a}return new this(e,t,n,r)},(b=j).instancePool=[],b.getPooled=m||h,b.poolSize||(b.poolSize=10),b.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return i(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return i(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)k(e[n],t,n,o.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a,o,c,i){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,a,o,c,i],u=0;(l=new Error(t.replace(/%s/g,(function(){return s[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";var r=n(106);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";var r=n(91),a=n(108);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}},function(e,t,n){"use strict";var r=n(91).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function c(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?c(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=c,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}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(10),a=n(3),o=n.n(a),c=n(7),i=n.n(c),l=n(33),s={sources:{},default:null},u={getDefaultMediaSource:function(e){var t=null,n=Object.keys(e.sources);if(e.default?t=e.default:(null==n?void 0:n.length)&&(t=e.sources[n[0]].id),t)return e.sources[t]},getMediaPlayerState:function(e,t){var n,r=t?null===(n=e.sources)||void 0===n?void 0:n[t]:u.getDefaultMediaSource(e);return null==r?void 0:r.state},getMediaSourceCurrentTime:function(e,t){var n,r=t?null===(n=e.sources)||void 0===n?void 0:n[t]:u.getDefaultMediaSource(e);return null==r?void 0:r.currentTime},getMediaSourceDuration:function(e,t){var n,r;if(!t){var a=u.getDefaultMediaSource(e);return null==a?void 0:a.duration}return null===(n=e.sources)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.duration},getMediaSourceDomReference:function(e,t){var n,r=t?null===(n=e.sources)||void 0===n?void 0:n[t]:u.getDefaultMediaSource(e);if(r){var a=null==r?void 0:r.domId;if(a)return document.getElementById(a)}}},p={reducer:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,n=arguments.length>1?arguments[1]:void 0,r=n.id||t.default||(null===(e=Object.keys(t.sources))||void 0===e?void 0:e[0]);switch(n.type){case"REGISTER_MEDIA_SOURCE":return i()({},t,{sources:i()({},t.sources,o()({},n.id,i()({id:n.id},n.mediaSourceState)))});case"UPDATE_MEDIA_SOURCE_DATA":return i()({},t,{sources:i()({},t.sources,o()({},n.id,i()({},t.sources[n.id],{},n.data)))});case"UNREGISTER_MEDIA_SOURCE":var a,c=Object.assign({},t);if(c.sources[n.id]&&delete c.sources[n.id],n.id===t.default)c.default=null===(a=Object.keys(t.sources))||void 0===a?void 0:a[0];return c;case"SET_DEFAULT_MEDIA_SOURCE":return i()({},t,{default:n.id});case"SET_MEDIA_PLAYER_STATE":return i()({},t,{sources:i()({},t.sources,o()({},r,i()({},t.sources[r],{state:n.state})))});case"TOGGLE_MEDIA_PLAYER_STATE":return i()({},t,{sources:i()({},t.sources,o()({},r,i()({},t.sources[r],{state:t.sources[r].state===l.c?l.b:l.c})))});case"SET_MEDIA_PLAYER_CURRENT_TIME":return i()({},t,{sources:i()({},t.sources,o()({},r,i()({},t.sources[r],{currentTime:n.currentTime})))})}return t},actions:{registerMediaSource:function(e,t){return{type:"REGISTER_MEDIA_SOURCE",id:e,mediaSourceState:t}},updateMediaSourceData:function(e,t){return{type:"UPDATE_MEDIA_SOURCE_DATA",id:e,data:t}},unregisterMediaSource:function(e){return{type:"UNREGISTER_MEDIA_SOURCE",id:e}},setDefaultMediaSource:function(e){return{type:"SET_DEFAULT_MEDIA_SOURCE",id:e}},playMediaSource:function(e){return{type:"SET_MEDIA_PLAYER_STATE",id:e,state:l.c}},toggleMediaSource:function(e){return{type:"TOGGLE_MEDIA_PLAYER_STATE",id:e}},pauseMediaSource:function(e){return{type:"SET_MEDIA_PLAYER_STATE",id:e,state:l.b}},errorMediaSource:function(e){return{type:"SET_MEDIA_PLAYER_STATE",id:e,state:l.a}},setMediaSourceCurrentTime:function(e,t){return{type:"SET_MEDIA_PLAYER_CURRENT_TIME",id:e,currentTime:t}}},selectors:u};if(void 0!==r.createReduxStore){var d=Object(r.createReduxStore)(l.d,p);Object(r.register)(d)}else Object(r.registerStore)(l.d,p)},,function(e,t,n){},function(e,t){!function(){e.exports=this.wp.annotations}()},function(e,t,n){},function(e,t,n){e.exports=n.p+"images/img-example-after-2cb9a8483c19dddf7fc5655e346718db.png"},function(e,t,n){e.exports=n.p+"images/img-example-before-b9e7b3c4f30c1a6a8fbf99b820b9d8b8.png"},function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(n,e),(t=function(e){return function(t){return function(r){var a,o,c=n[r.type],i=t(r);if(c)for(a=0;a<c.length;a++)(o=c[a](r,e))&&e.dispatch(o);return i}}}).effects=n,t}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){e.exports=n.p+"images/upgrade-illustration-7779cb4960d6719c723e09cb51a732f7.svg"},function(e,t,n){e.exports=n.p+"images/story_example-1-bc142dfce3ff04bbf445a692f1c8b0ca.png"},function(e,t,n){},function(e,t,n){(function(e){var r;/*! https://mths.be/punycode v1.3.2 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof window&&window;o.global!==o&&o.window!==o&&o.self;var c,i=2147483647,l=/^xn--/,s=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,m=String.fromCharCode;function b(e){throw RangeError(p[e])}function h(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function f(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+h((e=e.replace(u,".")).split("."),t).join(".")}function g(e){for(var t,n,r=[],a=0,o=e.length;a<o;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<o?56320==(64512&(n=e.charCodeAt(a++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),a--):r.push(t);return r}function j(e){return h(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function v(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var r=0;for(e=n?d(e/700):e>>1,e+=d(e/t);e>455;r+=36)e=d(e/35);return d(r+36*e/(e+38))}function y(e){var t,n,r,a,o,c,l,s,u,p,m,h=[],f=e.length,g=0,v=128,y=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&b("not-basic"),h.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<f;){for(o=g,c=1,l=36;a>=f&&b("invalid-input"),((s=(m=e.charCodeAt(a++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:36)>=36||s>d((i-g)/c))&&b("overflow"),g+=s*c,!(s<(u=l<=y?1:l>=y+26?26:l-y));l+=36)c>d(i/(p=36-u))&&b("overflow"),c*=p;y=k(g-o,t=h.length+1,0==o),d(g/t)>i-v&&b("overflow"),v+=d(g/t),g%=t,h.splice(g++,0,v)}return j(h)}function _(e){var t,n,r,a,o,c,l,s,u,p,h,f,j,y,_,O=[];for(f=(e=g(e)).length,t=128,n=0,o=72,c=0;c<f;++c)(h=e[c])<128&&O.push(m(h));for(r=a=O.length,a&&O.push("-");r<f;){for(l=i,c=0;c<f;++c)(h=e[c])>=t&&h<l&&(l=h);for(l-t>d((i-n)/(j=r+1))&&b("overflow"),n+=(l-t)*j,t=l,c=0;c<f;++c)if((h=e[c])<t&&++n>i&&b("overflow"),h==t){for(s=n,u=36;!(s<(p=u<=o?1:u>=o+26?26:u-o));u+=36)_=s-p,y=36-p,O.push(m(v(p+_%y,0))),s=d(_/y);O.push(m(v(s,0))),o=k(n,j,r==a),n=0,++r}++n,++t}return O.join("")}c={version:"1.3.2",ucs2:{decode:g,encode:j},decode:y,encode:_,toASCII:function(e){return f(e,(function(e){return s.test(e)?"xn--"+_(e):e}))},toUnicode:function(e){return f(e,(function(e){return l.test(e)?y(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return c}.call(t,n,t,e))||(e.exports=r)}()}).call(this,n(202)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(205),t.encode=t.stringify=n(206)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var c=/\+/g;e=e.split(t);var i=1e3;a&&"number"==typeof a.maxKeys&&(i=a.maxKeys);var l=e.length;i>0&&l>i&&(l=i);for(var s=0;s<l;++s){var u,p,d,m,b=e[s].replace(c,"%20"),h=b.indexOf(n);h>=0?(u=b.substr(0,h),p=b.substr(h+1)):(u=b,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),r(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},function(e,t,n){"use strict";var r=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,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(r(a))+n;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(r(e))})).join(t):o+encodeURIComponent(r(e[a]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function c(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(a){return!1}}()?Object.assign:function(e,t){for(var n,i,l=c(e),s=1;s<arguments.length;s++){for(var u in n=Object(arguments[s]))a.call(n,u)&&(l[u]=n[u]);if(r){i=r(n);for(var p=0;p<i.length;p++)o.call(n,i[p])&&(l[i[p]]=n[i[p]])}}return l}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){!function(){"use strict";var t=[];function n(e){var t,n,r,a,o=-1;for(t=0,r=e.length;t<r;t+=1){for(a=255&(o^e[t]),n=0;n<8;n+=1)1==(1&a)?a=a>>>1^3988292384:a>>>=1;o=o>>>8^a}return-1^o}function r(e,n){var a,o,c;if(void 0!==r.crc&&n&&e||(r.crc=-1,e)){for(a=r.crc,o=0,c=e.length;o<c;o+=1)a=a>>>8^t[255&(a^e[o])];return r.crc=a,-1^a}}!function(){var e,n,r;for(n=0;n<256;n+=1){for(e=n,r=0;r<8;r+=1)1&e?e=3988292384^e>>>1:e>>>=1;t[n]=e>>>0}}(),e.exports=function(e,t){var a;e="string"==typeof e?(a=e,Array.prototype.map.call(a,(function(e){return e.charCodeAt(0)}))):e;return((t?n(e):r(e))>>>0).toString(16)},e.exports.direct=n,e.exports.table=r}()},function(e,t,n){"use strict";var r=[],a=window,o=Math.pow(256,6),c=Math.pow(2,52),i=2*c,l=Math.random;function s(e){var t,n=e.length,r=this,a=0,o=r.i=r.j=0,c=r.S=[];for(n||(e=[n++]);a<256;)c[a]=a++;for(a=0;a<256;a++)c[a]=c[o=255&o+e[a%n]+(t=c[a])],c[o]=t;(r.g=function(e){for(var t,n=0,a=r.i,o=r.j,c=r.S;e--;)t=c[a=255&a+1],n=256*n+c[255&(c[a]=c[o=255&o+t])+(c[o]=t)];return r.i=a,r.j=o,n})(256)}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(o){}return r.length?r:"s"==a?e:e+"\0"}function p(e,t){for(var n,r=e+"",a=0;a<r.length;)t[255&a]=255&(n^=19*t[255&a])+r.charCodeAt(a++);return m(t)}function d(e){try{return a.crypto.getRandomValues(e=new Uint8Array(256)),m(e)}catch(t){return[+new Date,a,a.navigator&&a.navigator.plugins,a.screen,m(r)]}}function m(e){return String.fromCharCode.apply(0,e)}e.exports=function(t,n){if(n&&!0===n.global)return n.global=!1,Math.random=e.exports(t,n),n.global=!0,Math.random;var a=n&&n.entropy||!1,l=[],b=(p(u(a?[t,m(r)]:0 in arguments?t:d(),3),l),new s(l));return p(m(b.S),r),function(){for(var e=b.g(6),t=o,n=0;e<c;)e=256*(e+n),t*=256,n=b.g(1);for(;e>=i;)e/=2,t/=2,n>>>=1;return(e+n)/t}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),r)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))})),t.splice(a,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(230)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(e,t,n){"use strict";e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var n;function c(){if(c.enabled){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=c,i=Number(new Date),l=i-(n||i);o.diff=l,o.prev=n,o.curr=i,n=i,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;s++;var a=r.formatters[n];if("function"==typeof a){var c=t[s];e=a.call(o,c),t.splice(s,1),s--}return e})),r.formatArgs.call(o,t);var u=o.log||r.log;u.apply(o,t)}}return c.namespace=e,c.enabled=r.enabled(e),c.useColors=r.useColors(),c.color=t(e),c.destroy=a,c.extend=o,"function"==typeof r.init&&r.init(c),r.instances.push(c),c}function a(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function o(e,t){return r(this.namespace+(void 0===t?":":t)+e)}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){r.enable("")},r.enable=function(e){var t;r.save(e),r.names=[],r.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),a=n.length;for(t=0;t<a;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}},r.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=n(90),Object.keys(e).forEach((function(t){r[t]=e[t]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}},function(e,t,n){"use strict";n.r(t);var r=n(55),a=n.n(r);n(232);a()((function(){var e={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2};function t(e,t){var 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){var n,r;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{var a=e.getBoundingClientRect(),o={top:a.top+document.body.scrollTop+document.documentElement.scrollTop,left:a.left+document.body.scrollLeft+document.documentElement.scrollLeft},c=e.offsetWidth;n=(((r=t).pageX?r.pageX:r.touches?r.touches[0].pageX:r.clientX+document.body.scrollLeft+document.documentElement.scrollLeft)-o.left)/c*100}return n}function c(e,t){var n,r;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{var a=e.getBoundingClientRect(),o={top:a.top+document.body.scrollTop+document.documentElement.scrollTop,left:a.left+document.body.scrollLeft+document.documentElement.scrollLeft},c=e.offsetHeight;n=(((r=t).pageY?r.pageY:r.touches?r.touches[0].pageY:r.clientY+document.body.scrollTop+document.documentElement.scrollTop)-o.top)/c*100}return n}var i={animate:!0,showLabels:!0,makeResponsive:!0};function l(e,n,r){var a,o;for(a in this.selector=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 i?"string"!=typeof(o=r[a])?Boolean(o):!("false"===o||""===o):r[a]);2===n.length&&(this.imgBefore=new t(n[0],this),this.imgAfter=new t(n[1],this))}l.prototype={updateSlider:function(e,t){var a;a=(a="vertical"===this.options.mode?c(this.slider,e):o(this.slider,e)).toFixed(2)+"%";var i=parseFloat(a),l=100-i+"%";i>0&&i<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){var 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){var n,r=(n=this.imgBefore.image,{width:n.naturalWidth,height:n.naturalHeight,aspect:function(){return this.width/this.height}}).aspect();return e?t=e/r:t&&(e=t*r),{width:e,height:t,ratio:r}},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(){var e=a(this.wrapper).width,t=a(this.wrapper).height,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){var 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=document.querySelector(this.selector),!this.wrapper)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),"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));var t=this;window.addEventListener("resize",(function(){t.setWrapperDimensions()})),this.slider.addEventListener("mousedown",(function(e){e.preventDefault(),t.updateSlider(e,!0);var 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){var n=e.which||e.keyCode,r=parseFloat(this.style.left);if(37===n){r-=1;var a=parseFloat(this.style.left)-1;t.updateSlider(a,!1),t.controller.setAttribute("aria-valuenow",r)}if(39===n){r+=1;var o=parseFloat(this.style.left)+1;t.updateSlider(o,!1),t.controller.setAttribute("aria-valuenow",r)}})),this.leftImage.addEventListener("keydown",(function(e){var 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){var 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);var a=t,o=a.querySelectorAll("img");if(!(o.length<2)){var c={};a.getAttribute("data-animate")&&(c.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(c.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(c.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(c.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(c.mode=a.getAttribute("data-makeresponsive"));var i="juxtapose-"+r;n(t,i);var l="."+i;a.innerHTML?a.innerHTML="":a.innerText="";new e.JXSlider(l,[{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}],c)}},e.scanPage=function(){for(var t=document.querySelectorAll(".juxtapose"),n=0;n<t.length;n++)e.makeSlider(t[n],n)},e.JXSlider=l,window.juxtapose=e,e.scanPage()}))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(31),a=n(247),o=n(251),c=n(252),i=n(260),l=n(274),s=n(287),u=n(132),p=n(289),d={default:n(290),zero:n(291),commonmark:n(292)},m=/^(vbscript|javascript|file|data):/,b=/^data:image\/(gif|png|jpeg|webp);/;function h(e){var t=e.trim().toLowerCase();return!m.test(t)||!!b.test(t)}var f=["http:","https:","mailto:"];function g(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(n){}return u.encode(u.format(t))}function j(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(n){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function v(e,t){if(!(this instanceof v))return new v(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new i,this.core=new c,this.renderer=new o,this.linkify=new s,this.validateLink=h,this.normalizeLink=g,this.normalizeLinkText=j,this.utils=r,this.helpers=r.assign({},a),this.options={},this.configure(e),t&&this.set(t)}v.prototype.set=function(e){return r.assign(this.options,e),this},v.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},v.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},v.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},v.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},v.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},v.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},v.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},v.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=v},function(e){e.exports=JSON.parse('{"Aacute":"ร","aacute":"รก","Abreve":"ฤ","abreve":"ฤ","ac":"โพ","acd":"โฟ","acE":"โพฬณ","Acirc":"ร","acirc":"รข","acute":"ยด","Acy":"ะ","acy":"ะฐ","AElig":"ร","aelig":"รฆ","af":"โก","Afr":"๐","afr":"๐","Agrave":"ร","agrave":"ร ","alefsym":"โต","aleph":"โต","Alpha":"ฮ","alpha":"ฮฑ","Amacr":"ฤ","amacr":"ฤ","amalg":"โจฟ","amp":"&","AMP":"&","andand":"โฉ","And":"โฉ","and":"โง","andd":"โฉ","andslope":"โฉ","andv":"โฉ","ang":"โ ","ange":"โฆค","angle":"โ ","angmsdaa":"โฆจ","angmsdab":"โฆฉ","angmsdac":"โฆช","angmsdad":"โฆซ","angmsdae":"โฆฌ","angmsdaf":"โฆญ","angmsdag":"โฆฎ","angmsdah":"โฆฏ","angmsd":"โก","angrt":"โ","angrtvb":"โพ","angrtvbd":"โฆ","angsph":"โข","angst":"ร ","angzarr":"โผ","Aogon":"ฤ","aogon":"ฤ ","Aopf":"๐ธ","aopf":"๐","apacir":"โฉฏ","ap":"โ","apE":"โฉฐ","ape":"โ","apid":"โ","apos":"\'","ApplyFunction":"โก","approx":"โ","approxeq":"โ","Aring":"ร ","aring":"รฅ","Ascr":"๐","ascr":"๐ถ","Assign":"โ","ast":"*","asymp":"โ","asympeq":"โ","Atilde":"ร","atilde":"รฃ","Auml":"ร","auml":"รค","awconint":"โณ","awint":"โจ","backcong":"โ","backepsilon":"ฯถ","backprime":"โต","backsim":"โฝ","backsimeq":"โ","Backslash":"โ","Barv":"โซง","barvee":"โฝ","barwed":"โ ","Barwed":"โ","barwedge":"โ ","bbrk":"โต","bbrktbrk":"โถ","bcong":"โ","Bcy":"ะ","bcy":"ะฑ","bdquo":"โ","becaus":"โต","because":"โต","Because":"โต","bemptyv":"โฆฐ","bepsi":"ฯถ","bernou":"โฌ","Bernoullis":"โฌ","Beta":"ฮ","beta":"ฮฒ","beth":"โถ","between":"โฌ","Bfr":"๐ ","bfr":"๐","bigcap":"โ","bigcirc":"โฏ","bigcup":"โ","bigodot":"โจ","bigoplus":"โจ","bigotimes":"โจ","bigsqcup":"โจ","bigstar":"โ ","bigtriangledown":"โฝ","bigtriangleup":"โณ","biguplus":"โจ","bigvee":"โ","bigwedge":"โ","bkarow":"โค","blacklozenge":"โงซ","blacksquare":"โช","blacktriangle":"โด","blacktriangledown":"โพ","blacktriangleleft":"โ","blacktriangleright":"โธ","blank":"โฃ","blk12":"โ","blk14":"โ","blk34":"โ","block":"โ","bne":"=โฅ","bnequiv":"โกโฅ","bNot":"โซญ","bnot":"โ","Bopf":"๐น","bopf":"๐","bot":"โฅ","bottom":"โฅ","bowtie":"โ","boxbox":"โง","boxdl":"โ","boxdL":"โ","boxDl":"โ","boxDL":"โ","boxdr":"โ","boxdR":"โ","boxDr":"โ","boxDR":"โ","boxh":"โ","boxH":"โ","boxhd":"โฌ","boxHd":"โค","boxhD":"โฅ","boxHD":"โฆ","boxhu":"โด","boxHu":"โง","boxhU":"โจ","boxHU":"โฉ","boxminus":"โ","boxplus":"โ","boxtimes":"โ ","boxul":"โ","boxuL":"โ","boxUl":"โ","boxUL":"โ","boxur":"โ","boxuR":"โ","boxUr":"โ","boxUR":"โ","boxv":"โ","boxV":"โ","boxvh":"โผ","boxvH":"โช","boxVh":"โซ","boxVH":"โฌ","boxvl":"โค","boxvL":"โก","boxVl":"โข","boxVL":"โฃ","boxvr":"โ","boxvR":"โ","boxVr":"โ","boxVR":"โ ","bprime":"โต","breve":"ห","Breve":"ห","brvbar":"ยฆ","bscr":"๐ท","Bscr":"โฌ","bsemi":"โ","bsim":"โฝ","bsime":"โ","bsolb":"โง ","bsol":"\\\\","bsolhsub":"โ","bull":"โข","bullet":"โข","bump":"โ","bumpE":"โชฎ","bumpe":"โ","Bumpeq":"โ","bumpeq":"โ","Cacute":"ฤ","cacute":"ฤ","capand":"โฉ","capbrcup":"โฉ","capcap":"โฉ","cap":"โฉ","Cap":"โ","capcup":"โฉ","capdot":"โฉ","CapitalDifferentialD":"โ ","caps":"โฉ๏ธ","caret":"โ","caron":"ห","Cayleys":"โญ","ccaps":"โฉ","Ccaron":"ฤ","ccaron":"ฤ","Ccedil":"ร","ccedil":"รง","Ccirc":"ฤ","ccirc":"ฤ","Cconint":"โฐ","ccups":"โฉ","ccupssm":"โฉ","Cdot":"ฤ","cdot":"ฤ","cedil":"ยธ","Cedilla":"ยธ","cemptyv":"โฆฒ","cent":"ยข","centerdot":"ยท","CenterDot":"ยท","cfr":"๐ ","Cfr":"โญ","CHcy":"ะง","chcy":"ั","check":"โ","checkmark":"โ","Chi":"ฮง","chi":"ฯ","circ":"ห","circeq":"โ","circlearrowleft":"โบ","circlearrowright":"โป","circledast":"โ","circledcirc":"โ","circleddash":"โ","CircleDot":"โ","circledR":"ยฎ","circledS":"โ","CircleMinus":"โ","CirclePlus":"โ","CircleTimes":"โ","cir":"โ","cirE":"โง","cire":"โ","cirfnint":"โจ","cirmid":"โซฏ","cirscir":"โง","ClockwiseContourIntegral":"โฒ","CloseCurlyDoubleQuote":"โ","CloseCurlyQuote":"โ","clubs":"โฃ","clubsuit":"โฃ","colon":":","Colon":"โท","Colone":"โฉด","colone":"โ","coloneq":"โ","comma":",","commat":"@","comp":"โ","compfn":"โ","complement":"โ","complexes":"โ","cong":"โ ","congdot":"โฉญ","Congruent":"โก","conint":"โฎ","Conint":"โฏ","ContourIntegral":"โฎ","copf":"๐","Copf":"โ","coprod":"โ","Coproduct":"โ","copy":"ยฉ","COPY":"ยฉ","copysr":"โ","CounterClockwiseContourIntegral":"โณ","crarr":"โต","cross":"โ","Cross":"โจฏ","Cscr":"๐","cscr":"๐ธ","csub":"โซ","csube":"โซ","csup":"โซ","csupe":"โซ","ctdot":"โฏ","cudarrl":"โคธ","cudarrr":"โคต","cuepr":"โ","cuesc":"โ","cularr":"โถ","cularrp":"โคฝ","cupbrcap":"โฉ","cupcap":"โฉ","CupCap":"โ","cup":"โช","Cup":"โ","cupcup":"โฉ","cupdot":"โ","cupor":"โฉ ","cups":"โช๏ธ","curarr":"โท","curarrm":"โคผ","curlyeqprec":"โ","curlyeqsucc":"โ","curlyvee":"โ","curlywedge":"โ","curren":"ยค","curvearrowleft":"โถ","curvearrowright":"โท","cuvee":"โ","cuwed":"โ","cwconint":"โฒ","cwint":"โฑ","cylcty":"โญ","dagger":"โ ","Dagger":"โก","daleth":"โธ","darr":"โ","Darr":"โก","dArr":"โ","dash":"โ","Dashv":"โซค","dashv":"โฃ","dbkarow":"โค","dblac":"ห","Dcaron":"ฤ","dcaron":"ฤ","Dcy":"ะ","dcy":"ะด","ddagger":"โก","ddarr":"โ","DD":"โ ","dd":"โ ","DDotrahd":"โค","ddotseq":"โฉท","deg":"ยฐ","Del":"โ","Delta":"ฮ","delta":"ฮด","demptyv":"โฆฑ","dfisht":"โฅฟ","Dfr":"๐","dfr":"๐ก","dHar":"โฅฅ","dharl":"โ","dharr":"โ","DiacriticalAcute":"ยด","DiacriticalDot":"ห","DiacriticalDoubleAcute":"ห","DiacriticalGrave":"`","DiacriticalTilde":"ห","diam":"โ","diamond":"โ","Diamond":"โ","diamondsuit":"โฆ","diams":"โฆ","die":"ยจ","DifferentialD":"โ ","digamma":"ฯ","disin":"โฒ","div":"รท","divide":"รท","divideontimes":"โ","divonx":"โ","DJcy":"ะ","djcy":"ั","dlcorn":"โ","dlcrop":"โ","dollar":"$","Dopf":"๐ป","dopf":"๐","Dot":"ยจ","dot":"ห","DotDot":"โ","doteq":"โ","doteqdot":"โ","DotEqual":"โ","dotminus":"โธ","dotplus":"โ","dotsquare":"โก","doublebarwedge":"โ","DoubleContourIntegral":"โฏ","DoubleDot":"ยจ","DoubleDownArrow":"โ","DoubleLeftArrow":"โ","DoubleLeftRightArrow":"โ","DoubleLeftTee":"โซค","DoubleLongLeftArrow":"โธ","DoubleLongLeftRightArrow":"โบ","DoubleLongRightArrow":"โน","DoubleRightArrow":"โ","DoubleRightTee":"โจ","DoubleUpArrow":"โ","DoubleUpDownArrow":"โ","DoubleVerticalBar":"โฅ","DownArrowBar":"โค","downarrow":"โ","DownArrow":"โ","Downarrow":"โ","DownArrowUpArrow":"โต","DownBreve":"ฬ","downdownarrows":"โ","downharpoonleft":"โ","downharpoonright":"โ","DownLeftRightVector":"โฅ","DownLeftTeeVector":"โฅ","DownLeftVectorBar":"โฅ","DownLeftVector":"โฝ","DownRightTeeVector":"โฅ","DownRightVectorBar":"โฅ","DownRightVector":"โ","DownTeeArrow":"โง","DownTee":"โค","drbkarow":"โค","drcorn":"โ","drcrop":"โ","Dscr":"๐","dscr":"๐น","DScy":"ะ ","dscy":"ั","dsol":"โงถ","Dstrok":"ฤ","dstrok":"ฤ","dtdot":"โฑ","dtri":"โฟ","dtrif":"โพ","duarr":"โต","duhar":"โฅฏ","dwangle":"โฆฆ","DZcy":"ะ","dzcy":"ั","dzigrarr":"โฟ","Eacute":"ร","eacute":"รฉ","easter":"โฉฎ","Ecaron":"ฤ","ecaron":"ฤ","Ecirc":"ร","ecirc":"รช","ecir":"โ","ecolon":"โ","Ecy":"ะญ","ecy":"ั","eDDot":"โฉท","Edot":"ฤ","edot":"ฤ","eDot":"โ","ee":"โ ","efDot":"โ","Efr":"๐","efr":"๐ข","eg":"โช","Egrave":"ร","egrave":"รจ","egs":"โช","egsdot":"โช","el":"โช","Element":"โ","elinters":"โง","ell":"โ","els":"โช","elsdot":"โช","Emacr":"ฤ","emacr":"ฤ","empty":"โ ","emptyset":"โ ","EmptySmallSquare":"โป","emptyv":"โ ","EmptyVerySmallSquare":"โซ","emsp13":"โ","emsp14":"โ ","emsp":"โ","ENG":"ล","eng":"ล","ensp":"โ","Eogon":"ฤ","eogon":"ฤ","Eopf":"๐ผ","eopf":"๐","epar":"โ","eparsl":"โงฃ","eplus":"โฉฑ","epsi":"ฮต","Epsilon":"ฮ","epsilon":"ฮต","epsiv":"ฯต","eqcirc":"โ","eqcolon":"โ","eqsim":"โ","eqslantgtr":"โช","eqslantless":"โช","Equal":"โฉต","equals":"=","EqualTilde":"โ","equest":"โ","Equilibrium":"โ","equiv":"โก","equivDD":"โฉธ","eqvparsl":"โงฅ","erarr":"โฅฑ","erDot":"โ","escr":"โฏ","Escr":"โฐ","esdot":"โ","Esim":"โฉณ","esim":"โ","Eta":"ฮ","eta":"ฮท","ETH":"ร","eth":"รฐ","Euml":"ร","euml":"รซ","euro":"โฌ","excl":"!","exist":"โ","Exists":"โ","expectation":"โฐ","exponentiale":"โ ","ExponentialE":"โ ","fallingdotseq":"โ","Fcy":"ะค","fcy":"ั","female":"โ","ffilig":"๏ฌ","fflig":"๏ฌ","ffllig":"๏ฌ","Ffr":"๐","ffr":"๐ฃ","filig":"๏ฌ","FilledSmallSquare":"โผ","FilledVerySmallSquare":"โช","fjlig":"fj","flat":"โญ","fllig":"๏ฌ","fltns":"โฑ","fnof":"ฦ","Fopf":"๐ฝ","fopf":"๐","forall":"โ","ForAll":"โ","fork":"โ","forkv":"โซ","Fouriertrf":"โฑ","fpartint":"โจ","frac12":"ยฝ","frac13":"โ ","frac14":"ยผ","frac15":"โ ","frac16":"โ ","frac18":"โ ","frac23":"โ ","frac25":"โ ","frac34":"ยพ","frac35":"โ ","frac38":"โ ","frac45":"โ ","frac56":"โ ","frac58":"โ ","frac78":"โ ","frasl":"โ","frown":"โข","fscr":"๐ป","Fscr":"โฑ","gacute":"วต","Gamma":"ฮ","gamma":"ฮณ","Gammad":"ฯ","gammad":"ฯ","gap":"โช","Gbreve":"ฤ","gbreve":"ฤ","Gcedil":"ฤข","Gcirc":"ฤ","gcirc":"ฤ","Gcy":"ะ","gcy":"ะณ","Gdot":"ฤ ","gdot":"ฤก","ge":"โฅ","gE":"โง","gEl":"โช","gel":"โ","geq":"โฅ","geqq":"โง","geqslant":"โฉพ","gescc":"โชฉ","ges":"โฉพ","gesdot":"โช","gesdoto":"โช","gesdotol":"โช","gesl":"โ๏ธ","gesles":"โช","Gfr":"๐","gfr":"๐ค","gg":"โซ","Gg":"โ","ggg":"โ","gimel":"โท","GJcy":"ะ","gjcy":"ั","gla":"โชฅ","gl":"โท","glE":"โช","glj":"โชค","gnap":"โช","gnapprox":"โช","gne":"โช","gnE":"โฉ","gneq":"โช","gneqq":"โฉ","gnsim":"โง","Gopf":"๐พ","gopf":"๐","grave":"`","GreaterEqual":"โฅ","GreaterEqualLess":"โ","GreaterFullEqual":"โง","GreaterGreater":"โชข","GreaterLess":"โท","GreaterSlantEqual":"โฉพ","GreaterTilde":"โณ","Gscr":"๐ข","gscr":"โ","gsim":"โณ","gsime":"โช","gsiml":"โช","gtcc":"โชง","gtcir":"โฉบ","gt":">","GT":">","Gt":"โซ","gtdot":"โ","gtlPar":"โฆ","gtquest":"โฉผ","gtrapprox":"โช","gtrarr":"โฅธ","gtrdot":"โ","gtreqless":"โ","gtreqqless":"โช","gtrless":"โท","gtrsim":"โณ","gvertneqq":"โฉ๏ธ","gvnE":"โฉ๏ธ","Hacek":"ห","hairsp":"โ","half":"ยฝ","hamilt":"โ","HARDcy":"ะช","hardcy":"ั","harrcir":"โฅ","harr":"โ","hArr":"โ","harrw":"โญ","Hat":"^","hbar":"โ","Hcirc":"ฤค","hcirc":"ฤฅ","hearts":"โฅ","heartsuit":"โฅ","hellip":"โฆ","hercon":"โน","hfr":"๐ฅ","Hfr":"โ","HilbertSpace":"โ","hksearow":"โคฅ","hkswarow":"โคฆ","hoarr":"โฟ","homtht":"โป","hookleftarrow":"โฉ","hookrightarrow":"โช","hopf":"๐","Hopf":"โ","horbar":"โ","HorizontalLine":"โ","hscr":"๐ฝ","Hscr":"โ","hslash":"โ","Hstrok":"ฤฆ","hstrok":"ฤง","HumpDownHump":"โ","HumpEqual":"โ","hybull":"โ","hyphen":"โ","Iacute":"ร","iacute":"รญ","ic":"โฃ","Icirc":"ร","icirc":"รฎ","Icy":"ะ","icy":"ะธ","Idot":"ฤฐ","IEcy":"ะ","iecy":"ะต","iexcl":"ยก","iff":"โ","ifr":"๐ฆ","Ifr":"โ","Igrave":"ร","igrave":"รฌ","ii":"โ ","iiiint":"โจ","iiint":"โญ","iinfin":"โง","iiota":"โฉ","IJlig":"ฤฒ","ijlig":"ฤณ","Imacr":"ฤช","imacr":"ฤซ","image":"โ","ImaginaryI":"โ ","imagline":"โ","imagpart":"โ","imath":"ฤฑ","Im":"โ","imof":"โท","imped":"ฦต","Implies":"โ","incare":"โ ","in":"โ","infin":"โ","infintie":"โง","inodot":"ฤฑ","intcal":"โบ","int":"โซ","Int":"โฌ","integers":"โค","Integral":"โซ","intercal":"โบ","Intersection":"โ","intlarhk":"โจ","intprod":"โจผ","InvisibleComma":"โฃ","InvisibleTimes":"โข","IOcy":"ะ","iocy":"ั","Iogon":"ฤฎ","iogon":"ฤฏ","Iopf":"๐","iopf":"๐","Iota":"ฮ","iota":"ฮน","iprod":"โจผ","iquest":"ยฟ","iscr":"๐พ","Iscr":"โ","isin":"โ","isindot":"โต","isinE":"โน","isins":"โด","isinsv":"โณ","isinv":"โ","it":"โข","Itilde":"ฤจ","itilde":"ฤฉ","Iukcy":"ะ","iukcy":"ั","Iuml":"ร","iuml":"รฏ","Jcirc":"ฤด","jcirc":"ฤต","Jcy":"ะ","jcy":"ะน","Jfr":"๐","jfr":"๐ง","jmath":"ศท","Jopf":"๐","jopf":"๐","Jscr":"๐ฅ","jscr":"๐ฟ","Jsercy":"ะ","jsercy":"ั","Jukcy":"ะ","jukcy":"ั","Kappa":"ฮ","kappa":"ฮบ","kappav":"ฯฐ","Kcedil":"ฤถ","kcedil":"ฤท","Kcy":"ะ","kcy":"ะบ","Kfr":"๐","kfr":"๐จ","kgreen":"ฤธ","KHcy":"ะฅ","khcy":"ั ","KJcy":"ะ","kjcy":"ั","Kopf":"๐","kopf":"๐","Kscr":"๐ฆ","kscr":"๐","lAarr":"โ","Lacute":"ฤน","lacute":"ฤบ","laemptyv":"โฆด","lagran":"โ","Lambda":"ฮ","lambda":"ฮป","lang":"โจ","Lang":"โช","langd":"โฆ","langle":"โจ","lap":"โช ","Laplacetrf":"โ","laquo":"ยซ","larrb":"โค","larrbfs":"โค","larr":"โ","Larr":"โ","lArr":"โ","larrfs":"โค","larrhk":"โฉ","larrlp":"โซ","larrpl":"โคน","larrsim":"โฅณ","larrtl":"โข","latail":"โค","lAtail":"โค","lat":"โชซ","late":"โชญ","lates":"โชญ๏ธ","lbarr":"โค","lBarr":"โค","lbbrk":"โฒ","lbrace":"{","lbrack":"[","lbrke":"โฆ","lbrksld":"โฆ","lbrkslu":"โฆ","Lcaron":"ฤฝ","lcaron":"ฤพ","Lcedil":"ฤป","lcedil":"ฤผ","lceil":"โ","lcub":"{","Lcy":"ะ","lcy":"ะป","ldca":"โคถ","ldquo":"โ","ldquor":"โ","ldrdhar":"โฅง","ldrushar":"โฅ","ldsh":"โฒ","le":"โค","lE":"โฆ","LeftAngleBracket":"โจ","LeftArrowBar":"โค","leftarrow":"โ","LeftArrow":"โ","Leftarrow":"โ","LeftArrowRightArrow":"โ","leftarrowtail":"โข","LeftCeiling":"โ","LeftDoubleBracket":"โฆ","LeftDownTeeVector":"โฅก","LeftDownVectorBar":"โฅ","LeftDownVector":"โ","LeftFloor":"โ","leftharpoondown":"โฝ","leftharpoonup":"โผ","leftleftarrows":"โ","leftrightarrow":"โ","LeftRightArrow":"โ","Leftrightarrow":"โ","leftrightarrows":"โ","leftrightharpoons":"โ","leftrightsquigarrow":"โญ","LeftRightVector":"โฅ","LeftTeeArrow":"โค","LeftTee":"โฃ","LeftTeeVector":"โฅ","leftthreetimes":"โ","LeftTriangleBar":"โง","LeftTriangle":"โฒ","LeftTriangleEqual":"โด","LeftUpDownVector":"โฅ","LeftUpTeeVector":"โฅ ","LeftUpVectorBar":"โฅ","LeftUpVector":"โฟ","LeftVectorBar":"โฅ","LeftVector":"โผ","lEg":"โช","leg":"โ","leq":"โค","leqq":"โฆ","leqslant":"โฉฝ","lescc":"โชจ","les":"โฉฝ","lesdot":"โฉฟ","lesdoto":"โช","lesdotor":"โช","lesg":"โ๏ธ","lesges":"โช","lessapprox":"โช ","lessdot":"โ","lesseqgtr":"โ","lesseqqgtr":"โช","LessEqualGreater":"โ","LessFullEqual":"โฆ","LessGreater":"โถ","lessgtr":"โถ","LessLess":"โชก","lesssim":"โฒ","LessSlantEqual":"โฉฝ","LessTilde":"โฒ","lfisht":"โฅผ","lfloor":"โ","Lfr":"๐","lfr":"๐ฉ","lg":"โถ","lgE":"โช","lHar":"โฅข","lhard":"โฝ","lharu":"โผ","lharul":"โฅช","lhblk":"โ","LJcy":"ะ","ljcy":"ั","llarr":"โ","ll":"โช","Ll":"โ","llcorner":"โ","Lleftarrow":"โ","llhard":"โฅซ","lltri":"โบ","Lmidot":"ฤฟ","lmidot":"ล","lmoustache":"โฐ","lmoust":"โฐ","lnap":"โช","lnapprox":"โช","lne":"โช","lnE":"โจ","lneq":"โช","lneqq":"โจ","lnsim":"โฆ","loang":"โฌ","loarr":"โฝ","lobrk":"โฆ","longleftarrow":"โต","LongLeftArrow":"โต","Longleftarrow":"โธ","longleftrightarrow":"โท","LongLeftRightArrow":"โท","Longleftrightarrow":"โบ","longmapsto":"โผ","longrightarrow":"โถ","LongRightArrow":"โถ","Longrightarrow":"โน","looparrowleft":"โซ","looparrowright":"โฌ","lopar":"โฆ ","Lopf":"๐","lopf":"๐","loplus":"โจญ","lotimes":"โจด","lowast":"โ","lowbar":"_","LowerLeftArrow":"โ","LowerRightArrow":"โ","loz":"โ","lozenge":"โ","lozf":"โงซ","lpar":"(","lparlt":"โฆ","lrarr":"โ","lrcorner":"โ","lrhar":"โ","lrhard":"โฅญ","lrm":"โ","lrtri":"โฟ","lsaquo":"โน","lscr":"๐","Lscr":"โ","lsh":"โฐ","Lsh":"โฐ","lsim":"โฒ","lsime":"โช","lsimg":"โช","lsqb":"[","lsquo":"โ","lsquor":"โ","Lstrok":"ล","lstrok":"ล","ltcc":"โชฆ","ltcir":"โฉน","lt":"<","LT":"<","Lt":"โช","ltdot":"โ","lthree":"โ","ltimes":"โ","ltlarr":"โฅถ","ltquest":"โฉป","ltri":"โ","ltrie":"โด","ltrif":"โ","ltrPar":"โฆ","lurdshar":"โฅ","luruhar":"โฅฆ","lvertneqq":"โจ๏ธ","lvnE":"โจ๏ธ","macr":"ยฏ","male":"โ","malt":"โ ","maltese":"โ ","Map":"โค ","map":"โฆ","mapsto":"โฆ","mapstodown":"โง","mapstoleft":"โค","mapstoup":"โฅ","marker":"โฎ","mcomma":"โจฉ","Mcy":"ะ","mcy":"ะผ","mdash":"โ","mDDot":"โบ","measuredangle":"โก","MediumSpace":"โ","Mellintrf":"โณ","Mfr":"๐","mfr":"๐ช","mho":"โง","micro":"ยต","midast":"*","midcir":"โซฐ","mid":"โฃ","middot":"ยท","minusb":"โ","minus":"โ","minusd":"โธ","minusdu":"โจช","MinusPlus":"โ","mlcp":"โซ","mldr":"โฆ","mnplus":"โ","models":"โง","Mopf":"๐","mopf":"๐","mp":"โ","mscr":"๐","Mscr":"โณ","mstpos":"โพ","Mu":"ฮ","mu":"ฮผ","multimap":"โธ","mumap":"โธ","nabla":"โ","Nacute":"ล","nacute":"ล","nang":"โ โ","nap":"โ","napE":"โฉฐฬธ","napid":"โฬธ","napos":"ล","napprox":"โ","natural":"โฎ","naturals":"โ","natur":"โฎ","nbsp":"ย ","nbump":"โฬธ","nbumpe":"โฬธ","ncap":"โฉ","Ncaron":"ล","ncaron":"ล","Ncedil":"ล ","ncedil":"ล","ncong":"โ","ncongdot":"โฉญฬธ","ncup":"โฉ","Ncy":"ะ","ncy":"ะฝ","ndash":"โ","nearhk":"โคค","nearr":"โ","neArr":"โ","nearrow":"โ","ne":"โ ","nedot":"โฬธ","NegativeMediumSpace":"โ","NegativeThickSpace":"โ","NegativeThinSpace":"โ","NegativeVeryThinSpace":"โ","nequiv":"โข","nesear":"โคจ","nesim":"โฬธ","NestedGreaterGreater":"โซ","NestedLessLess":"โช","NewLine":"\\n","nexist":"โ","nexists":"โ","Nfr":"๐","nfr":"๐ซ","ngE":"โงฬธ","nge":"โฑ","ngeq":"โฑ","ngeqq":"โงฬธ","ngeqslant":"โฉพฬธ","nges":"โฉพฬธ","nGg":"โฬธ","ngsim":"โต","nGt":"โซโ","ngt":"โฏ","ngtr":"โฏ","nGtv":"โซฬธ","nharr":"โฎ","nhArr":"โ","nhpar":"โซฒ","ni":"โ","nis":"โผ","nisd":"โบ","niv":"โ","NJcy":"ะ","njcy":"ั","nlarr":"โ","nlArr":"โ","nldr":"โฅ","nlE":"โฆฬธ","nle":"โฐ","nleftarrow":"โ","nLeftarrow":"โ","nleftrightarrow":"โฎ","nLeftrightarrow":"โ","nleq":"โฐ","nleqq":"โฆฬธ","nleqslant":"โฉฝฬธ","nles":"โฉฝฬธ","nless":"โฎ","nLl":"โฬธ","nlsim":"โด","nLt":"โชโ","nlt":"โฎ","nltri":"โช","nltrie":"โฌ","nLtv":"โชฬธ","nmid":"โค","NoBreak":"โ ","NonBreakingSpace":"ย ","nopf":"๐","Nopf":"โ","Not":"โซฌ","not":"ยฌ","NotCongruent":"โข","NotCupCap":"โญ","NotDoubleVerticalBar":"โฆ","NotElement":"โ","NotEqual":"โ ","NotEqualTilde":"โฬธ","NotExists":"โ","NotGreater":"โฏ","NotGreaterEqual":"โฑ","NotGreaterFullEqual":"โงฬธ","NotGreaterGreater":"โซฬธ","NotGreaterLess":"โน","NotGreaterSlantEqual":"โฉพฬธ","NotGreaterTilde":"โต","NotHumpDownHump":"โฬธ","NotHumpEqual":"โฬธ","notin":"โ","notindot":"โตฬธ","notinE":"โนฬธ","notinva":"โ","notinvb":"โท","notinvc":"โถ","NotLeftTriangleBar":"โงฬธ","NotLeftTriangle":"โช","NotLeftTriangleEqual":"โฌ","NotLess":"โฎ","NotLessEqual":"โฐ","NotLessGreater":"โธ","NotLessLess":"โชฬธ","NotLessSlantEqual":"โฉฝฬธ","NotLessTilde":"โด","NotNestedGreaterGreater":"โชขฬธ","NotNestedLessLess":"โชกฬธ","notni":"โ","notniva":"โ","notnivb":"โพ","notnivc":"โฝ","NotPrecedes":"โ","NotPrecedesEqual":"โชฏฬธ","NotPrecedesSlantEqual":"โ ","NotReverseElement":"โ","NotRightTriangleBar":"โงฬธ","NotRightTriangle":"โซ","NotRightTriangleEqual":"โญ","NotSquareSubset":"โฬธ","NotSquareSubsetEqual":"โข","NotSquareSuperset":"โฬธ","NotSquareSupersetEqual":"โฃ","NotSubset":"โโ","NotSubsetEqual":"โ","NotSucceeds":"โ","NotSucceedsEqual":"โชฐฬธ","NotSucceedsSlantEqual":"โก","NotSucceedsTilde":"โฟฬธ","NotSuperset":"โโ","NotSupersetEqual":"โ","NotTilde":"โ","NotTildeEqual":"โ","NotTildeFullEqual":"โ","NotTildeTilde":"โ","NotVerticalBar":"โค","nparallel":"โฆ","npar":"โฆ","nparsl":"โซฝโฅ","npart":"โฬธ","npolint":"โจ","npr":"โ","nprcue":"โ ","nprec":"โ","npreceq":"โชฏฬธ","npre":"โชฏฬธ","nrarrc":"โคณฬธ","nrarr":"โ","nrArr":"โ","nrarrw":"โฬธ","nrightarrow":"โ","nRightarrow":"โ","nrtri":"โซ","nrtrie":"โญ","nsc":"โ","nsccue":"โก","nsce":"โชฐฬธ","Nscr":"๐ฉ","nscr":"๐","nshortmid":"โค","nshortparallel":"โฆ","nsim":"โ","nsime":"โ","nsimeq":"โ","nsmid":"โค","nspar":"โฆ","nsqsube":"โข","nsqsupe":"โฃ","nsub":"โ","nsubE":"โซ ฬธ","nsube":"โ","nsubset":"โโ","nsubseteq":"โ","nsubseteqq":"โซ ฬธ","nsucc":"โ","nsucceq":"โชฐฬธ","nsup":"โ ","nsupE":"โซฬธ","nsupe":"โ","nsupset":"โโ","nsupseteq":"โ","nsupseteqq":"โซฬธ","ntgl":"โน","Ntilde":"ร","ntilde":"รฑ","ntlg":"โธ","ntriangleleft":"โช","ntrianglelefteq":"โฌ","ntriangleright":"โซ","ntrianglerighteq":"โญ","Nu":"ฮ","nu":"ฮฝ","num":"#","numero":"โ","numsp":"โ","nvap":"โโ","nvdash":"โฌ","nvDash":"โญ","nVdash":"โฎ","nVDash":"โฏ","nvge":"โฅโ","nvgt":">โ","nvHarr":"โค","nvinfin":"โง","nvlArr":"โค","nvle":"โคโ","nvlt":"<โ","nvltrie":"โดโ","nvrArr":"โค","nvrtrie":"โตโ","nvsim":"โผโ","nwarhk":"โคฃ","nwarr":"โ","nwArr":"โ","nwarrow":"โ","nwnear":"โคง","Oacute":"ร","oacute":"รณ","oast":"โ","Ocirc":"ร","ocirc":"รด","ocir":"โ","Ocy":"ะ","ocy":"ะพ","odash":"โ","Odblac":"ล","odblac":"ล","odiv":"โจธ","odot":"โ","odsold":"โฆผ","OElig":"ล","oelig":"ล","ofcir":"โฆฟ","Ofr":"๐","ofr":"๐ฌ","ogon":"ห","Ograve":"ร","ograve":"รฒ","ogt":"โง","ohbar":"โฆต","ohm":"ฮฉ","oint":"โฎ","olarr":"โบ","olcir":"โฆพ","olcross":"โฆป","oline":"โพ","olt":"โง","Omacr":"ล","omacr":"ล","Omega":"ฮฉ","omega":"ฯ","Omicron":"ฮ","omicron":"ฮฟ","omid":"โฆถ","ominus":"โ","Oopf":"๐","oopf":"๐ ","opar":"โฆท","OpenCurlyDoubleQuote":"โ","OpenCurlyQuote":"โ","operp":"โฆน","oplus":"โ","orarr":"โป","Or":"โฉ","or":"โจ","ord":"โฉ","order":"โด","orderof":"โด","ordf":"ยช","ordm":"ยบ","origof":"โถ","oror":"โฉ","orslope":"โฉ","orv":"โฉ","oS":"โ","Oscr":"๐ช","oscr":"โด","Oslash":"ร","oslash":"รธ","osol":"โ","Otilde":"ร","otilde":"รต","otimesas":"โจถ","Otimes":"โจท","otimes":"โ","Ouml":"ร","ouml":"รถ","ovbar":"โฝ","OverBar":"โพ","OverBrace":"โ","OverBracket":"โด","OverParenthesis":"โ","para":"ยถ","parallel":"โฅ","par":"โฅ","parsim":"โซณ","parsl":"โซฝ","part":"โ","PartialD":"โ","Pcy":"ะ","pcy":"ะฟ","percnt":"%","period":".","permil":"โฐ","perp":"โฅ","pertenk":"โฑ","Pfr":"๐","pfr":"๐ญ","Phi":"ฮฆ","phi":"ฯ","phiv":"ฯ","phmmat":"โณ","phone":"โ","Pi":"ฮ ","pi":"ฯ","pitchfork":"โ","piv":"ฯ","planck":"โ","planckh":"โ","plankv":"โ","plusacir":"โจฃ","plusb":"โ","pluscir":"โจข","plus":"+","plusdo":"โ","plusdu":"โจฅ","pluse":"โฉฒ","PlusMinus":"ยฑ","plusmn":"ยฑ","plussim":"โจฆ","plustwo":"โจง","pm":"ยฑ","Poincareplane":"โ","pointint":"โจ","popf":"๐ก","Popf":"โ","pound":"ยฃ","prap":"โชท","Pr":"โชป","pr":"โบ","prcue":"โผ","precapprox":"โชท","prec":"โบ","preccurlyeq":"โผ","Precedes":"โบ","PrecedesEqual":"โชฏ","PrecedesSlantEqual":"โผ","PrecedesTilde":"โพ","preceq":"โชฏ","precnapprox":"โชน","precneqq":"โชต","precnsim":"โจ","pre":"โชฏ","prE":"โชณ","precsim":"โพ","prime":"โฒ","Prime":"โณ","primes":"โ","prnap":"โชน","prnE":"โชต","prnsim":"โจ","prod":"โ","Product":"โ","profalar":"โฎ","profline":"โ","profsurf":"โ","prop":"โ","Proportional":"โ","Proportion":"โท","propto":"โ","prsim":"โพ","prurel":"โฐ","Pscr":"๐ซ","pscr":"๐ ","Psi":"ฮจ","psi":"ฯ","puncsp":"โ","Qfr":"๐","qfr":"๐ฎ","qint":"โจ","qopf":"๐ข","Qopf":"โ","qprime":"โ","Qscr":"๐ฌ","qscr":"๐","quaternions":"โ","quatint":"โจ","quest":"?","questeq":"โ","quot":"\\"","QUOT":"\\"","rAarr":"โ","race":"โฝฬฑ","Racute":"ล","racute":"ล","radic":"โ","raemptyv":"โฆณ","rang":"โฉ","Rang":"โซ","rangd":"โฆ","range":"โฆฅ","rangle":"โฉ","raquo":"ยป","rarrap":"โฅต","rarrb":"โฅ","rarrbfs":"โค ","rarrc":"โคณ","rarr":"โ","Rarr":"โ ","rArr":"โ","rarrfs":"โค","rarrhk":"โช","rarrlp":"โฌ","rarrpl":"โฅ ","rarrsim":"โฅด","Rarrtl":"โค","rarrtl":"โฃ","rarrw":"โ","ratail":"โค","rAtail":"โค","ratio":"โถ","rationals":"โ","rbarr":"โค","rBarr":"โค","RBarr":"โค","rbbrk":"โณ","rbrace":"}","rbrack":"]","rbrke":"โฆ","rbrksld":"โฆ","rbrkslu":"โฆ","Rcaron":"ล","rcaron":"ล","Rcedil":"ล","rcedil":"ล","rceil":"โ","rcub":"}","Rcy":"ะ ","rcy":"ั","rdca":"โคท","rdldhar":"โฅฉ","rdquo":"โ","rdquor":"โ","rdsh":"โณ","real":"โ","realine":"โ","realpart":"โ","reals":"โ","Re":"โ","rect":"โญ","reg":"ยฎ","REG":"ยฎ","ReverseElement":"โ","ReverseEquilibrium":"โ","ReverseUpEquilibrium":"โฅฏ","rfisht":"โฅฝ","rfloor":"โ","rfr":"๐ฏ","Rfr":"โ","rHar":"โฅค","rhard":"โ","rharu":"โ","rharul":"โฅฌ","Rho":"ฮก","rho":"ฯ","rhov":"ฯฑ","RightAngleBracket":"โฉ","RightArrowBar":"โฅ","rightarrow":"โ","RightArrow":"โ","Rightarrow":"โ","RightArrowLeftArrow":"โ","rightarrowtail":"โฃ","RightCeiling":"โ","RightDoubleBracket":"โง","RightDownTeeVector":"โฅ","RightDownVectorBar":"โฅ","RightDownVector":"โ","RightFloor":"โ","rightharpoondown":"โ","rightharpoonup":"โ","rightleftarrows":"โ","rightleftharpoons":"โ","rightrightarrows":"โ","rightsquigarrow":"โ","RightTeeArrow":"โฆ","RightTee":"โข","RightTeeVector":"โฅ","rightthreetimes":"โ","RightTriangleBar":"โง","RightTriangle":"โณ","RightTriangleEqual":"โต","RightUpDownVector":"โฅ","RightUpTeeVector":"โฅ","RightUpVectorBar":"โฅ","RightUpVector":"โพ","RightVectorBar":"โฅ","RightVector":"โ","ring":"ห","risingdotseq":"โ","rlarr":"โ","rlhar":"โ","rlm":"โ","rmoustache":"โฑ","rmoust":"โฑ","rnmid":"โซฎ","roang":"โญ","roarr":"โพ","robrk":"โง","ropar":"โฆ","ropf":"๐ฃ","Ropf":"โ","roplus":"โจฎ","rotimes":"โจต","RoundImplies":"โฅฐ","rpar":")","rpargt":"โฆ","rppolint":"โจ","rrarr":"โ","Rrightarrow":"โ","rsaquo":"โบ","rscr":"๐","Rscr":"โ","rsh":"โฑ","Rsh":"โฑ","rsqb":"]","rsquo":"โ","rsquor":"โ","rthree":"โ","rtimes":"โ","rtri":"โน","rtrie":"โต","rtrif":"โธ","rtriltri":"โง","RuleDelayed":"โงด","ruluhar":"โฅจ","rx":"โ","Sacute":"ล","sacute":"ล","sbquo":"โ","scap":"โชธ","Scaron":"ล ","scaron":"ลก","Sc":"โชผ","sc":"โป","sccue":"โฝ","sce":"โชฐ","scE":"โชด","Scedil":"ล","scedil":"ล","Scirc":"ล","scirc":"ล","scnap":"โชบ","scnE":"โชถ","scnsim":"โฉ","scpolint":"โจ","scsim":"โฟ","Scy":"ะก","scy":"ั","sdotb":"โก","sdot":"โ ","sdote":"โฉฆ","searhk":"โคฅ","searr":"โ","seArr":"โ","searrow":"โ","sect":"ยง","semi":";","seswar":"โคฉ","setminus":"โ","setmn":"โ","sext":"โถ","Sfr":"๐","sfr":"๐ฐ","sfrown":"โข","sharp":"โฏ","SHCHcy":"ะฉ","shchcy":"ั","SHcy":"ะจ","shcy":"ั","ShortDownArrow":"โ","ShortLeftArrow":"โ","shortmid":"โฃ","shortparallel":"โฅ","ShortRightArrow":"โ","ShortUpArrow":"โ","shy":"ยญ","Sigma":"ฮฃ","sigma":"ฯ","sigmaf":"ฯ","sigmav":"ฯ","sim":"โผ","simdot":"โฉช","sime":"โ","simeq":"โ","simg":"โช","simgE":"โช ","siml":"โช","simlE":"โช","simne":"โ","simplus":"โจค","simrarr":"โฅฒ","slarr":"โ","SmallCircle":"โ","smallsetminus":"โ","smashp":"โจณ","smeparsl":"โงค","smid":"โฃ","smile":"โฃ","smt":"โชช","smte":"โชฌ","smtes":"โชฌ๏ธ","SOFTcy":"ะฌ","softcy":"ั","solbar":"โฟ","solb":"โง","sol":"/","Sopf":"๐","sopf":"๐ค","spades":"โ ","spadesuit":"โ ","spar":"โฅ","sqcap":"โ","sqcaps":"โ๏ธ","sqcup":"โ","sqcups":"โ๏ธ","Sqrt":"โ","sqsub":"โ","sqsube":"โ","sqsubset":"โ","sqsubseteq":"โ","sqsup":"โ","sqsupe":"โ","sqsupset":"โ","sqsupseteq":"โ","square":"โก","Square":"โก","SquareIntersection":"โ","SquareSubset":"โ","SquareSubsetEqual":"โ","SquareSuperset":"โ","SquareSupersetEqual":"โ","SquareUnion":"โ","squarf":"โช","squ":"โก","squf":"โช","srarr":"โ","Sscr":"๐ฎ","sscr":"๐","ssetmn":"โ","ssmile":"โฃ","sstarf":"โ","Star":"โ","star":"โ","starf":"โ ","straightepsilon":"ฯต","straightphi":"ฯ","strns":"ยฏ","sub":"โ","Sub":"โ","subdot":"โชฝ","subE":"โซ ","sube":"โ","subedot":"โซ","submult":"โซ","subnE":"โซ","subne":"โ","subplus":"โชฟ","subrarr":"โฅน","subset":"โ","Subset":"โ","subseteq":"โ","subseteqq":"โซ ","SubsetEqual":"โ","subsetneq":"โ","subsetneqq":"โซ","subsim":"โซ","subsub":"โซ","subsup":"โซ","succapprox":"โชธ","succ":"โป","succcurlyeq":"โฝ","Succeeds":"โป","SucceedsEqual":"โชฐ","SucceedsSlantEqual":"โฝ","SucceedsTilde":"โฟ","succeq":"โชฐ","succnapprox":"โชบ","succneqq":"โชถ","succnsim":"โฉ","succsim":"โฟ","SuchThat":"โ","sum":"โ","Sum":"โ","sung":"โช","sup1":"ยน","sup2":"ยฒ","sup3":"ยณ","sup":"โ","Sup":"โ","supdot":"โชพ","supdsub":"โซ","supE":"โซ","supe":"โ","supedot":"โซ","Superset":"โ","SupersetEqual":"โ","suphsol":"โ","suphsub":"โซ","suplarr":"โฅป","supmult":"โซ","supnE":"โซ","supne":"โ","supplus":"โซ","supset":"โ","Supset":"โ","supseteq":"โ","supseteqq":"โซ","supsetneq":"โ","supsetneqq":"โซ","supsim":"โซ","supsub":"โซ","supsup":"โซ","swarhk":"โคฆ","swarr":"โ","swArr":"โ","swarrow":"โ","swnwar":"โคช","szlig":"ร","Tab":"\\t","target":"โ","Tau":"ฮค","tau":"ฯ","tbrk":"โด","Tcaron":"ลค","tcaron":"ลฅ","Tcedil":"ลข","tcedil":"ลฃ","Tcy":"ะข","tcy":"ั","tdot":"โ","telrec":"โ","Tfr":"๐","tfr":"๐ฑ","there4":"โด","therefore":"โด","Therefore":"โด","Theta":"ฮ","theta":"ฮธ","thetasym":"ฯ","thetav":"ฯ","thickapprox":"โ","thicksim":"โผ","ThickSpace":"โโ","ThinSpace":"โ","thinsp":"โ","thkap":"โ","thksim":"โผ","THORN":"ร","thorn":"รพ","tilde":"ห","Tilde":"โผ","TildeEqual":"โ","TildeFullEqual":"โ ","TildeTilde":"โ","timesbar":"โจฑ","timesb":"โ ","times":"ร","timesd":"โจฐ","tint":"โญ","toea":"โคจ","topbot":"โถ","topcir":"โซฑ","top":"โค","Topf":"๐","topf":"๐ฅ","topfork":"โซ","tosa":"โคฉ","tprime":"โด","trade":"โข","TRADE":"โข","triangle":"โต","triangledown":"โฟ","triangleleft":"โ","trianglelefteq":"โด","triangleq":"โ","triangleright":"โน","trianglerighteq":"โต","tridot":"โฌ","trie":"โ","triminus":"โจบ","TripleDot":"โ","triplus":"โจน","trisb":"โง","tritime":"โจป","trpezium":"โข","Tscr":"๐ฏ","tscr":"๐","TScy":"ะฆ","tscy":"ั","TSHcy":"ะ","tshcy":"ั","Tstrok":"ลฆ","tstrok":"ลง","twixt":"โฌ","twoheadleftarrow":"โ","twoheadrightarrow":"โ ","Uacute":"ร","uacute":"รบ","uarr":"โ","Uarr":"โ","uArr":"โ","Uarrocir":"โฅ","Ubrcy":"ะ","ubrcy":"ั","Ubreve":"ลฌ","ubreve":"ลญ","Ucirc":"ร","ucirc":"รป","Ucy":"ะฃ","ucy":"ั","udarr":"โ ","Udblac":"ลฐ","udblac":"ลฑ","udhar":"โฅฎ","ufisht":"โฅพ","Ufr":"๐","ufr":"๐ฒ","Ugrave":"ร","ugrave":"รน","uHar":"โฅฃ","uharl":"โฟ","uharr":"โพ","uhblk":"โ","ulcorn":"โ","ulcorner":"โ","ulcrop":"โ","ultri":"โธ","Umacr":"ลช","umacr":"ลซ","uml":"ยจ","UnderBar":"_","UnderBrace":"โ","UnderBracket":"โต","UnderParenthesis":"โ","Union":"โ","UnionPlus":"โ","Uogon":"ลฒ","uogon":"ลณ","Uopf":"๐","uopf":"๐ฆ","UpArrowBar":"โค","uparrow":"โ","UpArrow":"โ","Uparrow":"โ","UpArrowDownArrow":"โ ","updownarrow":"โ","UpDownArrow":"โ","Updownarrow":"โ","UpEquilibrium":"โฅฎ","upharpoonleft":"โฟ","upharpoonright":"โพ","uplus":"โ","UpperLeftArrow":"โ","UpperRightArrow":"โ","upsi":"ฯ ","Upsi":"ฯ","upsih":"ฯ","Upsilon":"ฮฅ","upsilon":"ฯ ","UpTeeArrow":"โฅ","UpTee":"โฅ","upuparrows":"โ","urcorn":"โ","urcorner":"โ","urcrop":"โ","Uring":"ลฎ","uring":"ลฏ","urtri":"โน","Uscr":"๐ฐ","uscr":"๐","utdot":"โฐ","Utilde":"ลจ","utilde":"ลฉ","utri":"โต","utrif":"โด","uuarr":"โ","Uuml":"ร","uuml":"รผ","uwangle":"โฆง","vangrt":"โฆ","varepsilon":"ฯต","varkappa":"ฯฐ","varnothing":"โ ","varphi":"ฯ","varpi":"ฯ","varpropto":"โ","varr":"โ","vArr":"โ","varrho":"ฯฑ","varsigma":"ฯ","varsubsetneq":"โ๏ธ","varsubsetneqq":"โซ๏ธ","varsupsetneq":"โ๏ธ","varsupsetneqq":"โซ๏ธ","vartheta":"ฯ","vartriangleleft":"โฒ","vartriangleright":"โณ","vBar":"โซจ","Vbar":"โซซ","vBarv":"โซฉ","Vcy":"ะ","vcy":"ะฒ","vdash":"โข","vDash":"โจ","Vdash":"โฉ","VDash":"โซ","Vdashl":"โซฆ","veebar":"โป","vee":"โจ","Vee":"โ","veeeq":"โ","vellip":"โฎ","verbar":"|","Verbar":"โ","vert":"|","Vert":"โ","VerticalBar":"โฃ","VerticalLine":"|","VerticalSeparator":"โ","VerticalTilde":"โ","VeryThinSpace":"โ","Vfr":"๐","vfr":"๐ณ","vltri":"โฒ","vnsub":"โโ","vnsup":"โโ","Vopf":"๐","vopf":"๐ง","vprop":"โ","vrtri":"โณ","Vscr":"๐ฑ","vscr":"๐","vsubnE":"โซ๏ธ","vsubne":"โ๏ธ","vsupnE":"โซ๏ธ","vsupne":"โ๏ธ","Vvdash":"โช","vzigzag":"โฆ","Wcirc":"ลด","wcirc":"ลต","wedbar":"โฉ","wedge":"โง","Wedge":"โ","wedgeq":"โ","weierp":"โ","Wfr":"๐","wfr":"๐ด","Wopf":"๐","wopf":"๐จ","wp":"โ","wr":"โ","wreath":"โ","Wscr":"๐ฒ","wscr":"๐","xcap":"โ","xcirc":"โฏ","xcup":"โ","xdtri":"โฝ","Xfr":"๐","xfr":"๐ต","xharr":"โท","xhArr":"โบ","Xi":"ฮ","xi":"ฮพ","xlarr":"โต","xlArr":"โธ","xmap":"โผ","xnis":"โป","xodot":"โจ","Xopf":"๐","xopf":"๐ฉ","xoplus":"โจ","xotime":"โจ","xrarr":"โถ","xrArr":"โน","Xscr":"๐ณ","xscr":"๐","xsqcup":"โจ","xuplus":"โจ","xutri":"โณ","xvee":"โ","xwedge":"โ","Yacute":"ร","yacute":"รฝ","YAcy":"ะฏ","yacy":"ั","Ycirc":"ลถ","ycirc":"ลท","Ycy":"ะซ","ycy":"ั","yen":"ยฅ","Yfr":"๐","yfr":"๐ถ","YIcy":"ะ","yicy":"ั","Yopf":"๐","yopf":"๐ช","Yscr":"๐ด","yscr":"๐","YUcy":"ะฎ","yucy":"ั","yuml":"รฟ","Yuml":"ลธ","Zacute":"ลน","zacute":"ลบ","Zcaron":"ลฝ","zcaron":"ลพ","Zcy":"ะ","zcy":"ะท","Zdot":"ลป","zdot":"ลผ","zeetrf":"โจ","ZeroWidthSpace":"โ","Zeta":"ฮ","zeta":"ฮถ","zfr":"๐ท","Zfr":"โจ","ZHcy":"ะ","zhcy":"ะถ","zigrarr":"โ","zopf":"๐ซ","Zopf":"โค","Zscr":"๐ต","zscr":"๐","zwj":"โ","zwnj":"โ"}')},function(e,t,n){"use strict";var r={};function a(e,t,n){var o,c,i,l,s,u="";for("string"!=typeof t&&(n=t,t=a.defaultChars),void 0===n&&(n=!0),s=function(e){var t,n,a=r[e];if(a)return a;for(a=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?a.push(n):a.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)a[e.charCodeAt(t)]=e[t];return a}(t),o=0,c=e.length;o<c;o++)if(i=e.charCodeAt(o),n&&37===i&&o+2<c&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(i<128)u+=s[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&o+1<c&&(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}a.defaultChars=";/?:@&=+$,-_.!~*'()#",a.componentChars="-_.!~*'()",e.exports=a},function(e,t,n){"use strict";var r={};function a(e,t){var n;return"string"!=typeof t&&(t=a.defaultChars),n=function(e){var t,n,a=r[e];if(a)return a;for(a=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),a.push(n);for(t=0;t<e.length;t++)a[n=e.charCodeAt(t)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return a}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,a,o,c,i,l,s="";for(t=0,r=e.length;t<r;t+=3)(a=parseInt(e.slice(t+1,t+3),16))<128?s+=n[a]:192==(224&a)&&t+3<r&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(s+=(l=a<<6&1984|63&o)<128?"๏ฟฝ๏ฟฝ":String.fromCharCode(l),t+=3):224==(240&a)&&t+6<r&&(o=parseInt(e.slice(t+4,t+6),16),c=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&c))?(s+=(l=a<<12&61440|o<<6&4032|63&c)<2048||l>=55296&&l<=57343?"๏ฟฝ๏ฟฝ๏ฟฝ":String.fromCharCode(l),t+=6):240==(248&a)&&t+9<r&&(o=parseInt(e.slice(t+4,t+6),16),c=parseInt(e.slice(t+7,t+9),16),i=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&c)&&128==(192&i))?((l=a<<18&1835008|o<<12&258048|c<<6&4032|63&i)<65536||l>1114111?s+="๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ":(l-=65536,s+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):s+="๏ฟฝ";return s}))}a.defaultChars=";/?:@&=+$,#",a.componentChars="",e.exports=a},function(e,t,n){"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||""}},function(e,t,n){"use strict";function r(){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 a=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(i),s=["%","/","?",";","#"].concat(l),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(e,t){var n,r,o,i,l,h=e;if(h=h.trim(),!t&&1===e.split("#").length){var f=c.exec(h);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var g=a.exec(h);if(g&&(o=(g=g[0]).toLowerCase(),this.protocol=g,h=h.substr(g.length)),(t||g||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(l="//"===h.substr(0,2))||g&&m[g]||(h=h.substr(2),this.slashes=!0)),!m[g]&&(l||g&&!b[g])){var j,v,k=-1;for(n=0;n<u.length;n++)-1!==(i=h.indexOf(u[n]))&&(-1===k||i<k)&&(k=i);for(-1!==(v=-1===k?h.lastIndexOf("@"):h.lastIndexOf("@",k))&&(j=h.slice(0,v),h=h.slice(v+1),this.auth=j),k=-1,n=0;n<s.length;n++)-1!==(i=h.indexOf(s[n]))&&(-1===k||i<k)&&(k=i);-1===k&&(k=h.length),":"===h[k-1]&&k--;var y=h.slice(0,k);h=h.slice(k),this.parseHost(y),this.hostname=this.hostname||"";var _="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!_){var O=this.hostname.split(/\./);for(n=0,r=O.length;n<r;n++){var w=O[n];if(w&&!w.match(p)){for(var E="",C=0,x=w.length;C<x;C++)w.charCodeAt(C)>127?E+="x":E+=w[C];if(!E.match(p)){var S=O.slice(0,n),A=O.slice(n+1),T=w.match(d);T&&(S.push(T[1]),A.unshift(T[2])),A.length&&(h=A.join(".")+h),this.hostname=S.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=h.indexOf("#");-1!==N&&(this.hash=h.substr(N),h=h.slice(0,N));var P=h.indexOf("?");return-1!==P&&(this.search=h.substr(P),h=h.slice(0,P)),h&&(this.pathname=h),b[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(e){var t=o.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,t){if(e&&e instanceof r)return e;var n=new r;return n.parse(e,t),n}},function(e,t,n){"use strict";t.Any=n(133),t.Cc=n(134),t.Cf=n(246),t.P=n(102),t.Z=n(135)},function(e,t){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e,t,n){"use strict";t.parseLinkLabel=n(248),t.parseLinkDestination=n(249),t.parseLinkTitle=n(250)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,a,o,c,i=-1,l=e.posMax,s=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(c=e.pos,e.md.inline.skipToken(e),91===o)if(c===e.pos-1)r++;else if(n)return e.pos=s,-1}return a&&(i=e.pos),e.pos=s,i}},function(e,t,n){"use strict";var r=n(31).unescapeAll;e.exports=function(e,t,n){var a,o,c=t,i={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return i;if(60===a)return i;if(62===a)return i.pos=t+1,i.str=r(e.slice(c+1,t)),i.ok=!0,i;92===a&&t+1<n?t+=2:t++}return i}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 i;if(41===a){if(0===o)break;o--}t++}return c===t||0!==o||(i.str=r(e.slice(c,t)),i.lines=0,i.pos=t,i.ok=!0),i}},function(e,t,n){"use strict";var r=n(31).unescapeAll;e.exports=function(e,t,n){var a,o,c=0,i=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=c,l.str=r(e.slice(i+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?c++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&c++),t++}return l}},function(e,t,n){"use strict";var r=n(31).assign,a=n(31).unescapeAll,o=n(31).escapeHtml,c={};function i(){this.rules=r({},c)}c.code_inline=function(e,t,n,r,a){var c=e[t];return"<code"+a.renderAttrs(c)+">"+o(e[t].content)+"</code>"},c.code_block=function(e,t,n,r,a){var c=e[t];return"<pre"+a.renderAttrs(c)+"><code>"+o(e[t].content)+"</code></pre>\n"},c.fence=function(e,t,n,r,c){var i,l,s,u,p,d=e[t],m=d.info?a(d.info).trim():"",b="",h="";return m&&(b=(s=m.split(/(\s+)/g))[0],h=s.slice(2).join("")),0===(i=n.highlight&&n.highlight(d.content,b,h)||o(d.content)).indexOf("<pre")?i+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+b]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+b),p={attrs:u},"<pre><code"+c.renderAttrs(p)+">"+i+"</code></pre>\n"):"<pre><code"+c.renderAttrs(d)+">"+i+"</code></pre>\n"},c.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)},c.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},c.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},c.text=function(e,t){return o(e[t].content)},c.html_block=function(e,t){return e[t].content},c.html_inline=function(e,t){return e[t].content},i.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},i.prototype.renderToken=function(e,t,n){var r,a="",o=!1,c=e[t];return c.hidden?"":(c.block&&-1!==c.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===c.nesting?"</":"<")+c.tag,a+=this.renderAttrs(c),0===c.nesting&&n.xhtmlOut&&(a+=" /"),c.block&&(o=!0,1===c.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===c.tag)&&(o=!1)),a+=o?">\n":">")},i.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,c=0,i=e.length;c<i;c++)void 0!==o[r=e[c].type]?a+=o[r](e,c,t,n,this):a+=this.renderToken(e,c,t);return a},i.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));return r},i.prototype.render=function(e,t,n){var r,a,o,c="",i=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?c+=this.renderInline(e[r].children,t,n):void 0!==i[o]?c+=i[e[r].type](e,r,t,n,this):c+=this.renderToken(e,r,t,n);return c},e.exports=i},function(e,t,n){"use strict";var r=n(103),a=[["normalize",n(253)],["block",n(254)],["inline",n(255)],["linkify",n(256)],["replacements",n(257)],["smartquotes",n(258)]];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(259),e.exports=o},function(e,t,n){"use strict";var r=/\r\n?|\n/g,a=/\0/g;e.exports=function(e){var t;t=(t=e.src.replace(r,"\n")).replace(a,"๏ฟฝ"),e.src=t}},function(e,t,n){"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)}},function(e,t,n){"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)}},function(e,t,n){"use strict";var r=n(31).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,c,i,l,s,u,p,d,m,b,h,f,g,j,v,k,y=e.tokens;if(e.md.options.linkify)for(n=0,o=y.length;n<o;n++)if("inline"===y[n].type&&e.md.linkify.pretest(y[n].content))for(h=0,t=(c=y[n].children).length-1;t>=0;t--)if("link_close"!==(l=c[t]).type){if("html_inline"===l.type&&(k=l.content,/^<a[>\s]/i.test(k)&&h>0&&h--,a(l.content)&&h++),!(h>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,v=e.md.linkify.match(p),s=[],b=l.level,m=0,u=0;u<v.length;u++)f=v[u].url,g=e.md.normalizeLink(f),e.md.validateLink(g)&&(j=v[u].text,j=v[u].schema?"mailto:"!==v[u].schema||/^mailto:/i.test(j)?e.md.normalizeLinkText(j):e.md.normalizeLinkText("mailto:"+j).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+j).replace(/^http:\/\//,""),(d=v[u].index)>m&&((i=new e.Token("text","",0)).content=p.slice(m,d),i.level=b,s.push(i)),(i=new e.Token("link_open","a",1)).attrs=[["href",g]],i.level=b++,i.markup="linkify",i.info="auto",s.push(i),(i=new e.Token("text","",0)).content=j,i.level=b,s.push(i),(i=new e.Token("link_close","a",-1)).level=--b,i.markup="linkify",i.info="auto",s.push(i),m=v[u].lastIndex);m<p.length&&((i=new e.Token("text","",0)).content=p.slice(m),i.level=b,s.push(i)),y[n].children=c=r(c,t,s)}}else for(t--;c[t].level!==l.level&&"link_open"!==c[t].type;)t--}},function(e,t,n){"use strict";var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,o=/\((c|tm|r|p)\)/gi,c={c:"ยฉ",r:"ยฎ",p:"ยง",tm:"โข"};function i(e,t){return c[t.toLowerCase()]}function l(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(o,i)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function s(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||r.test(n.content)&&(n.content=n.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"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}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&&(a.test(e.tokens[t].content)&&l(e.tokens[t].children),r.test(e.tokens[t].content)&&s(e.tokens[t].children))}},function(e,t,n){"use strict";var r=n(31).isWhiteSpace,a=n(31).isPunctChar,o=n(31).isMdAsciiPunct,c=/['"]/,i=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function s(e,t){var n,c,s,u,p,d,m,b,h,f,g,j,v,k,y,_,O,w,E,C,x;for(E=[],n=0;n<e.length;n++){for(c=e[n],m=e[n].level,O=E.length-1;O>=0&&!(E[O].level<=m);O--);if(E.length=O+1,"text"===c.type){p=0,d=(s=c.content).length;e:for(;p<d&&(i.lastIndex=p,u=i.exec(s));){if(y=_=!0,p=u.index+1,w="'"===u[0],h=32,u.index-1>=0)h=s.charCodeAt(u.index-1);else for(O=n-1;O>=0&&("softbreak"!==e[O].type&&"hardbreak"!==e[O].type);O--)if(e[O].content){h=e[O].content.charCodeAt(e[O].content.length-1);break}if(f=32,p<d)f=s.charCodeAt(p);else for(O=n+1;O<e.length&&("softbreak"!==e[O].type&&"hardbreak"!==e[O].type);O++)if(e[O].content){f=e[O].content.charCodeAt(0);break}if(g=o(h)||a(String.fromCharCode(h)),j=o(f)||a(String.fromCharCode(f)),v=r(h),(k=r(f))?y=!1:j&&(v||g||(y=!1)),v?_=!1:g&&(k||j||(_=!1)),34===f&&'"'===u[0]&&h>=48&&h<=57&&(_=y=!1),y&&_&&(y=g,_=j),y||_){if(_)for(O=E.length-1;O>=0&&(b=E[O],!(E[O].level<m));O--)if(b.single===w&&E[O].level===m){b=E[O],w?(C=t.md.options.quotes[2],x=t.md.options.quotes[3]):(C=t.md.options.quotes[0],x=t.md.options.quotes[1]),c.content=l(c.content,u.index,x),e[b.token].content=l(e[b.token].content,b.pos,C),p+=x.length-1,b.token===n&&(p+=C.length-1),d=(s=c.content).length,E.length=O;continue e}y?E.push({token:n,pos:u.index,single:w,level:m}):_&&w&&(c.content=l(c.content,u.index,"โ"))}else w&&(c.content=l(c.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&&c.test(e.tokens[t].content)&&s(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(104);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},function(e,t,n){"use strict";var r=n(103),a=[["table",n(261),["paragraph","reference"]],["code",n(262)],["fence",n(263),["paragraph","reference","blockquote","list"]],["blockquote",n(264),["paragraph","reference","blockquote","list"]],["hr",n(265),["paragraph","reference","blockquote","list"]],["list",n(266),["paragraph","reference","blockquote"]],["reference",n(267)],["heading",n(268),["paragraph","reference","blockquote"]],["lheading",n(269)],["html_block",n(270),["paragraph","reference","blockquote"]],["paragraph",n(272)]];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,c=t,i=!1,l=e.md.options.maxNesting;c<n&&(e.line=c=e.skipEmptyLines(c),!(c>=n))&&!(e.sCount[c]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,c,n,!1);r++);e.tight=!i,e.isEmpty(e.line-1)&&(i=!0),(c=e.line)<n&&e.isEmpty(c)&&(i=!0,c++,e.line=c)}},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(273),e.exports=o},function(e,t,n){"use strict";var r=n(31).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,c=0,i="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(i+=e.substring(c,r-1),c=r):(n.push(i+e.substring(c,r)),i="",c=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(i+e.substring(c)),n}e.exports=function(e,t,n,c){var i,l,s,u,p,d,m,b,h,f,g,j,v,k,y,_;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((s=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(i=e.src.charCodeAt(s++))&&45!==i&&58!==i)return!1;for(;s<e.eMarks[d];){if(124!==(i=e.src.charCodeAt(s))&&45!==i&&58!==i&&!r(i))return!1;s++}for(m=(l=a(e,t+1)).split("|"),f=[],u=0;u<m.length;u++){if(!(g=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(g))return!1;58===g.charCodeAt(g.length-1)?f.push(58===g.charCodeAt(0)?"center":"right"):58===g.charCodeAt(0)?f.push("left"):f.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===(b=m.length)||b!==f.length)return!1;if(c)return!0;for(k=e.parentType,e.parentType="table",_=e.md.block.ruler.getRules("blockquote"),(h=e.push("table_open","table",1)).map=j=[t,0],(h=e.push("thead_open","thead",1)).map=[t,t+1],(h=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)h=e.push("th_open","th",1),f[u]&&(h.attrs=[["style","text-align:"+f[u]]]),(h=e.push("inline","",0)).content=m[u].trim(),h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(y=!1,u=0,p=_.length;u<p;u++)if(_[u](e,d,n,!0)){y=!0;break}if(y)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&&((h=e.push("tbody_open","tbody",1)).map=v=[t+2,0]),(h=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<b;u++)h=e.push("td_open","td",1),f[u]&&(h.attrs=[["style","text-align:"+f[u]]]),(h=e.push("inline","",0)).content=m[u]?m[u].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return v&&(h=e.push("tbody_close","tbody",-1),v[1]=d),h=e.push("table_close","table",-1),j[1]=d,e.parentType=k,e.line=d,!0}},function(e,t,n){"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,!0),o.map=[t,e.line],!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var a,o,c,i,l,s,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),c=e.src.slice(d,m),96===a&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(i=t;!(++i>=n)&&!((d=l=e.bMarks[i]+e.tShift[i])<(m=e.eMarks[i])&&e.sCount[i]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[i]-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=i+(p?1:0),(s=e.push("fence","code",0)).info=c,s.content=e.getLines(t+1,i,o,!0),s.markup=u,s.map=[t,e.line],!0}},function(e,t,n){"use strict";var r=n(31).isSpace;e.exports=function(e,t,n,a){var o,c,i,l,s,u,p,d,m,b,h,f,g,j,v,k,y,_,O,w,E=e.lineMax,C=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(C++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(C)?(C++,l++,m++,o=!1,k=!0):9===e.src.charCodeAt(C)?(k=!0,(e.bsCount[t]+m)%4==3?(C++,l++,m++,o=!1):o=!0):k=!1,b=[e.bMarks[t]],e.bMarks[t]=C;C<x&&(c=e.src.charCodeAt(C),r(c));)9===c?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,C++;for(h=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(k?1:0),u=C>=x,j=[e.sCount[t]],e.sCount[t]=m-l,v=[e.tShift[t]],e.tShift[t]=C-e.bMarks[t],_=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(w=e.sCount[d]<e.blkIndent,!((C=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(C++)||w){if(u)break;for(y=!1,i=0,s=_.length;i<s;i++)if(_[i](e,d,n,!0)){y=!0;break}if(y){e.lineMax=d,0!==e.blkIndent&&(b.push(e.bMarks[d]),h.push(e.bsCount[d]),v.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}b.push(e.bMarks[d]),h.push(e.bsCount[d]),v.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(C)?(C++,l++,m++,o=!1,k=!0):9===e.src.charCodeAt(C)?(k=!0,(e.bsCount[d]+m)%4==3?(C++,l++,m++,o=!1):o=!0):k=!1,b.push(e.bMarks[d]),e.bMarks[d]=C;C<x&&(c=e.src.charCodeAt(C),r(c));)9===c?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,C++;u=C>=x,h.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(k?1:0),j.push(e.sCount[d]),e.sCount[d]=m-l,v.push(e.tShift[d]),e.tShift[d]=C-e.bMarks[d]}for(f=e.blkIndent,e.blkIndent=0,(O=e.push("blockquote_open","blockquote",1)).markup=">",O.map=p=[t,0],e.md.block.tokenize(e,t,d),(O=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=E,e.parentType=g,p[1]=e.line,i=0;i<v.length;i++)e.bMarks[i+t]=b[i],e.tShift[i+t]=v[i],e.sCount[i+t]=j[i],e.bsCount[i+t]=h[i];return e.blkIndent=f,!0}},function(e,t,n){"use strict";var r=n(31).isSpace;e.exports=function(e,t,n,a){var o,c,i,l,s=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(s++))&&45!==o&&95!==o)return!1;for(c=1;s<u;){if((i=e.src.charCodeAt(s++))!==o&&!r(i))return!1;i===o&&c++}return!(c<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(c+1).join(String.fromCharCode(o))),!0)}},function(e,t,n){"use strict";var r=n(31).isSpace;function a(e,t){var n,a,o,c;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(c=e.src.charCodeAt(a),!r(c))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,c=e.eMarks[t];if(o+1>=c)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=c)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<c&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var c,i,l,s,u,p,d,m,b,h,f,g,j,v,k,y,_,O,w,E,C,x,S,A,T,N,P,M,B=!1,I=!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.tShift[t]>=e.blkIndent&&(B=!0),(S=o(e,t))>=0){if(d=!0,T=e.bMarks[t]+e.tShift[t],j=Number(e.src.substr(T,S-T-1)),B&&1!==j)return!1}else{if(!((S=a(e,t))>=0))return!1;d=!1}if(B&&e.skipSpaces(S)>=e.eMarks[t])return!1;if(g=e.src.charCodeAt(S-1),r)return!0;for(f=e.tokens.length,d?(M=e.push("ordered_list_open","ol",1),1!==j&&(M.attrs=[["start",j]])):M=e.push("bullet_list_open","ul",1),M.map=h=[t,0],M.markup=String.fromCharCode(g),k=t,A=!1,P=e.md.block.ruler.getRules("list"),O=e.parentType,e.parentType="list";k<n;){for(x=S,v=e.eMarks[k],p=y=e.sCount[k]+S-(e.bMarks[t]+e.tShift[t]);x<v;){if(9===(c=e.src.charCodeAt(x)))y+=4-(y+e.bsCount[k])%4;else{if(32!==c)break;y++}x++}if((u=(i=x)>=v?1:y-p)>4&&(u=1),s=p+u,(M=e.push("list_item_open","li",1)).markup=String.fromCharCode(g),M.map=m=[t,0],C=e.tight,E=e.tShift[t],w=e.sCount[t],_=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=i-e.bMarks[t],e.sCount[t]=y,i>=v&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!A||(I=!1),A=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=_,e.tShift[t]=E,e.sCount[t]=w,e.tight=C,(M=e.push("list_item_close","li",-1)).markup=String.fromCharCode(g),k=t=e.line,m[1]=k,i=e.bMarks[t],k>=n)break;if(e.sCount[k]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(N=!1,l=0,b=P.length;l<b;l++)if(P[l](e,k,n,!0)){N=!0;break}if(N)break;if(d){if((S=o(e,k))<0)break}else if((S=a(e,k))<0)break;if(g!==e.src.charCodeAt(S-1))break}return(M=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(g),h[1]=k,e.line=k,e.parentType=O,I&&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,f),!0}},function(e,t,n){"use strict";var r=n(31).normalizeReference,a=n(31).isSpace;e.exports=function(e,t,n,o){var c,i,l,s,u,p,d,m,b,h,f,g,j,v,k,y,_=0,O=e.bMarks[t]+e.tShift[t],w=e.eMarks[t],E=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(O))return!1;for(;++O<w;)if(93===e.src.charCodeAt(O)&&92!==e.src.charCodeAt(O-1)){if(O+1===w)return!1;if(58!==e.src.charCodeAt(O+1))return!1;break}for(s=e.lineMax,k=e.md.block.ruler.getRules("reference"),h=e.parentType,e.parentType="reference";E<s&&!e.isEmpty(E);E++)if(!(e.sCount[E]-e.blkIndent>3||e.sCount[E]<0)){for(v=!1,p=0,d=k.length;p<d;p++)if(k[p](e,E,s,!0)){v=!0;break}if(v)break}for(w=(j=e.getLines(t,E,e.blkIndent,!1).trim()).length,O=1;O<w;O++){if(91===(c=j.charCodeAt(O)))return!1;if(93===c){b=O;break}(10===c||92===c&&++O<w&&10===j.charCodeAt(O))&&_++}if(b<0||58!==j.charCodeAt(b+1))return!1;for(O=b+2;O<w;O++)if(10===(c=j.charCodeAt(O)))_++;else if(!a(c))break;if(!(f=e.md.helpers.parseLinkDestination(j,O,w)).ok)return!1;if(u=e.md.normalizeLink(f.str),!e.md.validateLink(u))return!1;for(i=O=f.pos,l=_+=f.lines,g=O;O<w;O++)if(10===(c=j.charCodeAt(O)))_++;else if(!a(c))break;for(f=e.md.helpers.parseLinkTitle(j,O,w),O<w&&g!==O&&f.ok?(y=f.str,O=f.pos,_+=f.lines):(y="",O=i,_=l);O<w&&(c=j.charCodeAt(O),a(c));)O++;if(O<w&&10!==j.charCodeAt(O)&&y)for(y="",O=i,_=l;O<w&&(c=j.charCodeAt(O),a(c));)O++;return!(O<w&&10!==j.charCodeAt(O))&&(!!(m=r(j.slice(1,b)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:y,href:u}),e.parentType=h,e.line=t+_+1),!0))}},function(e,t,n){"use strict";var r=n(31).isSpace;e.exports=function(e,t,n,a){var o,c,i,l,s=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(s))||s>=u)return!1;for(c=1,o=e.src.charCodeAt(++s);35===o&&s<u&&c<=6;)c++,o=e.src.charCodeAt(++s);return!(c>6||s<u&&!r(o))&&(a||(u=e.skipSpacesBack(u,s),(i=e.skipCharsBack(u,35,s))>s&&r(e.src.charCodeAt(i-1))&&(u=i),e.line=t+1,(l=e.push("heading_open","h"+String(c),1)).markup="########".slice(0,c),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(s,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(c),-1)).markup="########".slice(0,c)),!0)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,a,o,c,i,l,s,u,p,d,m=t+1,b=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])<(s=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=s)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,c=b.length;o<c;o++)if(b[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,(i=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),i.map=[t,e.line],(i=e.push("inline","",0)).content=r,i.map=[t,e.line-1],i.children=[],(i=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},function(e,t,n){"use strict";var r=n(271),a=n(136).HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/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,c,i,l,s=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(s))return!1;for(l=e.src.slice(s,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(c=t+1,!o[a][1].test(l))for(;c<n&&!(e.sCount[c]<e.blkIndent);c++)if(s=e.bMarks[c]+e.tShift[c],u=e.eMarks[c],l=e.src.slice(s,u),o[a][1].test(l)){0!==l.length&&c++;break}return e.line=c,(i=e.push("html_block","",0)).map=[t,c],i.content=e.getLines(t,c,e.blkIndent,!0),!0}},function(e,t,n){"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"]},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,a,o,c,i,l=t+1,s=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(i=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=s.length;a<o;a++)if(s[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(c=e.push("paragraph_open","p",1)).map=[t,e.line],(c=e.push("inline","",0)).content=n,c.map=[t,e.line],c.children=[],c=e.push("paragraph_close","p",-1),e.parentType=i,!0}},function(e,t,n){"use strict";var r=n(104),a=n(31).isSpace;function o(e,t,n,r){var o,c,i,l,s,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,i=l=u=p=0,s=(c=this.src).length;l<s;l++){if(o=c.charCodeAt(l),!d){if(a(o)){u++,9===o?p+=4-p%4:p++;continue}d=!0}10!==o&&l!==s-1||(10!==o&&l++,this.bMarks.push(i),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,i=l+1)}this.bMarks.push(c.length),this.eMarks.push(c.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,c,i,l,s,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(c=0,p=l=this.bMarks[d],s=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<s&&c<n;){if(i=this.src.charCodeAt(l),a(i))9===i?c+=4-(c+this.bsCount[d])%4:c++;else{if(!(l-p<this.tShift[d]))break;c++}l++}u[o]=c>n?new Array(c-n+1).join(" ")+this.src.slice(l,s):this.src.slice(l,s)}return u.join("")},o.prototype.Token=r,e.exports=o},function(e,t,n){"use strict";var r=n(103),a=[["text",n(275)],["newline",n(276)],["escape",n(277)],["backticks",n(278)],["strikethrough",n(137).tokenize],["emphasis",n(138).tokenize],["link",n(279)],["image",n(280)],["autolink",n(281)],["html_inline",n(282)],["entity",n(283)]],o=[["balance_pairs",n(284)],["strikethrough",n(137).postProcess],["emphasis",n(138).postProcess],["text_collapse",n(285)]];function c(){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])}c.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,c=e.md.options.maxNesting,i=e.cache;if(void 0===i[r]){if(e.level<c)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,i[r]=e.pos}else e.pos=i[r]},c.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,c=e.md.options.maxNesting;e.pos<o;){if(e.level<c)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()},c.prototype.parse=function(e,t,n,r){var a,o,c,i=new this.State(e,t,n,r);for(this.tokenize(i),c=(o=this.ruler2.getRules("")).length,a=0;a<c;a++)o[a](i)},c.prototype.State=n(286),e.exports=c},function(e,t,n){"use strict";function r(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,t){for(var n=e.pos;n<e.posMax&&!r(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}},function(e,t,n){"use strict";var r=n(31).isSpace;e.exports=function(e,t){var n,a,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;for(n=e.pending.length-1,a=e.posMax,t||(n>=0&&32===e.pending.charCodeAt(n)?n>=1&&32===e.pending.charCodeAt(n-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;o<a&&r(e.src.charCodeAt(o));)o++;return e.pos=o,!0}},function(e,t,n){"use strict";for(var r=n(31).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,c=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<c){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<c&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,a,o,c,i,l,s,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(c=i=u;-1!==(c=e.src.indexOf("`",i));){for(i=c+1;i<r&&96===e.src.charCodeAt(i);)i++;if((s=i-c)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=i,!0;e.backticks[s]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},function(e,t,n){"use strict";var r=n(31).normalizeReference,a=n(31).isSpace;e.exports=function(e,t){var n,o,c,i,l,s,u,p,d="",m="",b=e.pos,h=e.posMax,f=e.pos,g=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(i=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((s=i+1)<h&&40===e.src.charCodeAt(s)){for(g=!1,s++;s<h&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);if(s>=h)return!1;if(f=s,(u=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?s=u.pos:d="",f=s;s<h&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);if(u=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<h&&f!==s&&u.ok)for(m=u.str,s=u.pos;s<h&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);}(s>=h||41!==e.src.charCodeAt(s))&&(g=!0),s++}if(g){if(void 0===e.env.references)return!1;if(s<h&&91===e.src.charCodeAt(s)?(f=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?c=e.src.slice(f,s++):s=i+1):s=i+1,c||(c=e.src.slice(l,i)),!(p=e.env.references[r(c)]))return e.pos=b,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=i,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=s,e.posMax=h,!0}},function(e,t,n){"use strict";var r=n(31).normalizeReference,a=n(31).isSpace;e.exports=function(e,t){var n,o,c,i,l,s,u,p,d,m,b,h,f,g="",j=e.pos,v=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(s=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<v&&40===e.src.charCodeAt(u)){for(u++;u<v&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=v)return!1;for(f=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(g=e.md.normalizeLink(d.str),e.md.validateLink(g)?u=d.pos:g=""),f=u;u<v&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<v&&f!==u&&d.ok)for(m=d.str,u=d.pos;u<v&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=v||41!==e.src.charCodeAt(u))return e.pos=j,!1;u++}else{if(void 0===e.env.references)return!1;if(u<v&&91===e.src.charCodeAt(u)?(f=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?i=e.src.slice(f,u++):u=l+1):u=l+1,i||(i=e.src.slice(s,l)),!(p=e.env.references[r(i)]))return e.pos=j,!1;g=p.href,m=p.title}return t||(c=e.src.slice(s,l),e.md.inline.parse(c,e.md,e.env,h=[]),(b=e.push("image","img",0)).attrs=n=[["src",g],["alt",""]],b.children=h,b.content=c,m&&n.push(["title",m])),e.pos=u,e.posMax=v,!0}},function(e,t,n){"use strict";var r=/^([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])?)*)$/,a=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,t){var n,o,c,i,l,s,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,s=e.posMax;;){if(++u>=s)return!1;if(60===(i=e.src.charCodeAt(u)))return!1;if(62===i)break}return n=e.src.slice(l+1,u),a.test(n)?(o=e.md.normalizeLink(n),!!e.md.validateLink(o)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",o]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(n),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=n.length+2,!0)):!!r.test(n)&&(o=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(o)&&(t||((c=e.push("link_open","a",1)).attrs=[["href",o]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(n),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=n.length+2,!0))}},function(e,t,n){"use strict";var r=n(136).HTML_TAG_RE;e.exports=function(e,t){var n,a,o,c=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(c)||c+2>=o)&&(!(33!==(n=e.src.charCodeAt(c+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(c).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(c,c+a[0].length)),e.pos+=a[0].length,!0))))}},function(e,t,n){"use strict";var r=n(131),a=n(31).has,o=n(31).isValidEntityCode,c=n(31).fromCodePoint,i=/^&#((?: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,s,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(s=e.src.slice(u).match(i))return t||(n="x"===s[1][0].toLowerCase()?parseInt(s[1].slice(1),16):parseInt(s[1],10),e.pending+=o(n)?c(n):c(65533)),e.pos+=s[0].length,!0}else if((s=e.src.slice(u).match(l))&&a(r,s[1]))return t||(e.pending+=r[s[1]]),e.pos+=s[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},function(e,t,n){"use strict";function r(e,t){var n,r,a,o,c,i,l,s,u={},p=t.length;for(n=0;n<p;n++)if((a=t[n]).length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1]),c=u[a.marker][a.length%3],(r=n-a.jump-1)<-1&&(r=-1),i=r;r>c;r-=o.jump+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)){s=r>0&&!t[r-1].open?t[r-1].jump+1:0,a.jump=n-r+s,a.open=!1,o.end=n,o.jump=s,o.close=!1,i=-1;break}-1!==i&&(u[a.marker][(a.length||0)%3]=i)}}e.exports=function(e){var t,n=e.tokens_meta,a=e.tokens_meta.length;for(r(0,e.delimiters),t=0;t<a;t++)n[t]&&n[t].delimiters&&r(0,n[t].delimiters)}},function(e,t,n){"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)}},function(e,t,n){"use strict";var r=n(104),a=n(31).isWhiteSpace,o=n(31).isPunctChar,c=n(31).isMdAsciiPunct;function i(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}i.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},i.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},i.prototype.scanDelims=function(e,t){var n,r,i,l,s,u,p,d,m,b=e,h=!0,f=!0,g=this.posMax,j=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;b<g&&this.src.charCodeAt(b)===j;)b++;return i=b-e,r=b<g?this.src.charCodeAt(b):32,p=c(n)||o(String.fromCharCode(n)),m=c(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?h=!1:m&&(u||p||(h=!1)),u?f=!1:p&&(d||m||(f=!1)),t?(l=h,s=f):(l=h&&(!f||p),s=f&&(!h||m)),{can_open:l,can_close:s,length:i}},i.prototype.Token=r,e.exports=i},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 c(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var i={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}}},s="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(288)(e.__opts__),r=e.__tlds__.slice();function i(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(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");var l=[];function s(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:s(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?s(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(n)?s(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(c).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||i.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},i,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=s,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,c,i,l;if(this.re.schema_test.test(e))for((i=this.re.schema_search).lastIndex=0;null!==(t=i.exec(e));)if(a=this.testSchemaAt(e,t[2],i.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,c=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&c>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=c)),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},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(133).source,t.src_Cc=n(134).source,t.src_Z=n(135).source,t.src_P=n(102).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_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}},function(e,t,n){"use strict";n.r(t),n.d(t,"ucs2decode",(function(){return b})),n.d(t,"ucs2encode",(function(){return h})),n.d(t,"decode",(function(){return j})),n.d(t,"encode",(function(){return v})),n.d(t,"toASCII",(function(){return y})),n.d(t,"toUnicode",(function(){return k}));var r=n(21),a=n.n(r),o=2147483647,c=/^xn--/,i=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,s={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=Math.floor,p=String.fromCharCode;function d(e){throw new RangeError(s[e])}function m(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var a=function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}((e=e.replace(l,".")).split("."),t).join(".");return r+a}function b(e){for(var t=[],n=0,r=e.length;n<r;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&a)<<10)+(1023&o)+65536):(t.push(a),n--)}else t.push(a)}return t}var h=function(e){return String.fromCodePoint.apply(String,a()(e))},f=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},g=function(e,t,n){var r=0;for(e=n?u(e/700):e>>1,e+=u(e/t);e>455;r+=36)e=u(e/35);return u(r+36*e/(e+38))},j=function(e){var t,n=[],r=e.length,a=0,c=128,i=72,l=e.lastIndexOf("-");l<0&&(l=0);for(var s=0;s<l;++s)e.charCodeAt(s)>=128&&d("not-basic"),n.push(e.charCodeAt(s));for(var p=l>0?l+1:0;p<r;){for(var m=a,b=1,h=36;;h+=36){p>=r&&d("invalid-input");var f=(t=e.charCodeAt(p++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(f>=36||f>u((o-a)/b))&&d("overflow"),a+=f*b;var j=h<=i?1:h>=i+26?26:h-i;if(f<j)break;var v=36-j;b>u(o/v)&&d("overflow"),b*=v}var k=n.length+1;i=g(a-m,k,0==m),u(a/k)>o-c&&d("overflow"),c+=u(a/k),a%=k,n.splice(a++,0,c)}return String.fromCodePoint.apply(String,n)},v=function(e){var t=[],n=(e=b(e)).length,r=128,a=0,c=72,i=!0,l=!1,s=void 0;try{for(var m,h=e[Symbol.iterator]();!(i=(m=h.next()).done);i=!0){var j=m.value;j<128&&t.push(p(j))}}catch(z){l=!0,s=z}finally{try{i||null==h.return||h.return()}finally{if(l)throw s}}var v=t.length,k=v;for(v&&t.push("-");k<n;){var y=o,_=!0,O=!1,w=void 0;try{for(var E,C=e[Symbol.iterator]();!(_=(E=C.next()).done);_=!0){var x=E.value;x>=r&&x<y&&(y=x)}}catch(z){O=!0,w=z}finally{try{_||null==C.return||C.return()}finally{if(O)throw w}}var S=k+1;y-r>u((o-a)/S)&&d("overflow"),a+=(y-r)*S,r=y;var A=!0,T=!1,N=void 0;try{for(var P,M=e[Symbol.iterator]();!(A=(P=M.next()).done);A=!0){var B=P.value;if(B<r&&++a>o&&d("overflow"),B==r){for(var I=a,F=36;;F+=36){var R=F<=c?1:F>=c+26?26:F-c;if(I<R)break;var L=I-R,D=36-R;t.push(p(f(R+L%D,0))),I=u(L/D)}t.push(p(f(I,0))),c=g(a,S,k==v),a=0,++k}}}catch(z){T=!0,N=z}finally{try{A||null==M.return||M.return()}finally{if(T)throw N}}++a,++r}return t.join("")},k=function(e){return m(e,(function(e){return c.test(e)?j(e.slice(4).toLowerCase()):e}))},y=function(e){return m(e,(function(e){return i.test(e)?"xn--"+v(e):e}))},_={version:"2.1.0",ucs2:{decode:b,encode:h},decode:j,encode:v,toASCII:y,toUnicode:k};t.default=_},function(e,t,n){"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:{}}}},function(e,t,n){"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"]}}}},function(e,t,n){"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"]}}}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(47),n(127);var r=n(7),a=n.n(r),o=n(27),c=n.n(o),i=n(22),l=n.n(i),s=n(10),u=n(1),p=(n(128),n(40)),d=n(50),m=n(24);function b(){var e=Object(d.a)();return void 0!==typeof window&&window.location&&e?Object(m.b)()||Object(m.a)()?"https://wordpress.com/plans/my-plan/".concat(e):"".concat(window.location.protocol,"//").concat(e.replace("::","/"),"/wp-admin/admin.php?page=jetpack#/my-plan"):null}if(c()(regeneratorRuntime.mark((function e(){var t,n,r,o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===typeof window||!window.location){e.next=16;break}if(t=Object(p.parse)(window.location.href,!0),!t.query.plan_upgraded){e.next=16;break}if(n=null,e.prev=4,!Object(m.b)()){e.next=7;break}return e.abrupt("break",16);case 7:return e.next=9,l()({path:"/jetpack/v4/site"});case 9:r=e.sent,o=JSON.parse(r.data),n=o.plan.product_name;case 12:return e.prev=12,c=b(),Object(s.dispatch)("core/notices").createNotice("success",n?Object(u.sprintf)(Object(u.__)("Congratulations! Your site is now on the %s plan.","jetpack"),n):Object(u.__)("Congratulations! Your site is now on a paid plan.","jetpack"),a()({isDismissible:!0},c&&{actions:[{url:b(),label:Object(u.__)("View my plan","jetpack")}]})),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[4,,12,16]])})))(),void 0!==typeof window&&window.location){var h=Object(p.parse)(window.location.href,!0).query;h.stripe_connect_success?Object(s.dispatch)("core/notices").createNotice("success",Object(u.__)("Congrats! Your site is now connected to Stripe. You can now start accepting funds!","jetpack")):h.stripe_connect_cancelled&&Object(s.dispatch)("core/notices").createNotice("error",Object(u.__)("You cancelled connecting your site to Stripe.","jetpack"))}var f=n(23),g=n.n(f),j=n(21),v=n.n(j),k=n(0),y=n(30),_=n(5),O=n(70),w=n(9),E=n.n(w),C=n(32),x=n(12),S=n.n(x),A=n(16),T=n.n(A),N=n(13),P=n.n(N),M=n(14),B=n.n(M),I=n(6),F=n.n(I),R=n(15),L=n.n(R),D=n(3),z=n.n(D),U=n(4),V=n(8),q=n.n(V),H=n(18),G=n(2),W=n(25),$=n(71),K=[{value:"recent",label:Object(u.__)("Photos","jetpack")},{value:"/",label:Object(u.__)("Albums","jetpack")}],Z=[{value:"",label:Object(u.__)("All categories","jetpack")},{value:"animals",label:Object(u.__)("Animals","jetpack")},{value:"arts",label:Object(u.__)("Arts","jetpack")},{value:"birthdays",label:Object(u.__)("Birthdays","jetpack")},{value:"cityscapes",label:Object(u.__)("Cityscapes","jetpack")},{value:"crafts",label:Object(u.__)("Crafts","jetpack")},{value:"fashion",label:Object(u.__)("Fashion","jetpack")},{value:"food",label:Object(u.__)("Food","jetpack")},{value:"flowers",label:Object(u.__)("Flowers","jetpack")},{value:"gardens",label:Object(u.__)("Gardens","jetpack")},{value:"holidays",label:Object(u.__)("Holidays","jetpack")},{value:"houses",label:Object(u.__)("Houses","jetpack")},{value:"landmarks",label:Object(u.__)("Landmarks","jetpack")},{value:"landscapes",label:Object(u.__)("Landscapes","jetpack")},{value:"night",label:Object(u.__)("Night","jetpack")},{value:"people",label:Object(u.__)("People","jetpack")},{value:"pets",label:Object(u.__)("Pets","jetpack")},{value:"selfies",label:Object(u.__)("Selfies","jetpack")},{value:"sport",label:Object(u.__)("Sport","jetpack")},{value:"travel",label:Object(u.__)("Travel","jetpack")},{value:"weddings",label:Object(u.__)("Weddings","jetpack")}],J=["mountain","ocean","river","clouds","pattern","abstract","sky"],Y=[{value:"ANY",label:Object(u.__)("Any time","jetpack")},{value:"LAST_7_DAYS",label:Object(u.__)("Last 7 days","jetpack")},{value:"LAST_30_DAYS",label:Object(u.__)("Last 30 days","jetpack")},{value:"LAST_6_MONTHS",label:Object(u.__)("Last 6 months","jetpack")},{value:"LAST_12_MONTHS",label:Object(u.__)("Last 12 months","jetpack")},{value:"CUSTOM",label:Object(u.__)("Specific Month/Year","jetpack")}],Q=(new Date).getFullYear(),X=[{label:Object(u.__)("Any Month","jetpack"),value:-1}].concat(v()(Object(U.map)(Object(U.range)(0,12),(function(e){return{label:Object($.dateI18n)("F",new Date(0,e)),value:e}}))));function ee(){return Object(H.createHigherOrderComponent)((function(e){var t=function(t){function n(e){var t;return S()(this,n),t=P()(this,B()(n).call(this,e)),z()(F()(t),"contentRef",(function(e){e?(t.contentElement=e,t.modalElement=e.closest(".jetpack-external-media-browser"),t.modalElement&&t.modalElement.addEventListener("keydown",t.stopArrowKeysPropagation)):t.modalElement&&(t.modalElement.removeEventListener("keydown",t.stopArrowKeysPropagation),t.modalElement=null,t.contentElement=null)})),z()(F()(t),"stopArrowKeysPropagation",(function(e){[W.UP,W.DOWN,W.LEFT,W.RIGHT].includes(e.keyCode)&&!e.target.classList.contains("jetpack-external-media-browser__media__item")&&e.stopPropagation()})),z()(F()(t),"setAuthenticated",(function(e){return t.setState({isAuthenticated:e})})),z()(F()(t),"getMedia",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.state.isLoading||(n&&t.props.noticeOperations.removeAllNotices(),t.setState({account:n?t.defaultAccount:t.state.account,isLoading:!0,media:n?[]:t.state.media,nextHandle:!n&&t.state.nextHandle},(function(){return t.getMediaRequest(e)})))})),z()(F()(t),"handleApiError",(function(e){var n;"authorization_required"!==e.code?((null===(n=e.errors)||void 0===n?void 0:n.length)&&(e={code:e.errors[0].error,message:e.errors[0].message}),t.props.noticeOperations.createErrorNotice("internal_server_error"===e.code?"Internal server error":e.message),t.setState({isLoading:!1,isCopying:!1})):t.setState({isAuthenticated:!1,isLoading:!1,isCopying:!1})})),z()(F()(t),"getMediaRequest",(function(e){var n=t.state,r=n.nextHandle,a=n.media;if(!1===r&&a.length>0)t.setState({isLoading:!1});else{var o=t.getRequestUrl(e);t.setAuthenticated(!0),l()({path:o,method:"GET",parse:void 0===window.wpcomFetch}).then((function(e){t.setState({account:e.meta.account,media:t.mergeMedia(a,e.media),nextHandle:e.meta.next_page,isLoading:!1})})).catch(t.handleApiError)}})),z()(F()(t),"copyMedia",(function(e,n,r){var a;t.setState({isCopying:e}),t.props.noticeOperations.removeAllNotices(),t.modalElement&&t.modalElement.focus(),l()({path:n,method:"POST",data:{external_ids:e.map((function(e){return e.guid})),media:e.map((function(e){return{guid:e.guid,caption:e.caption,title:e.title}})),service:r,post_id:null!==(a=t.props.postId)&&void 0!==a?a:0}}).then((function(e){e.media&&(e=e.media.map((function(e){return{alt:e.alt,caption:e.caption,id:e.ID,type:"image",url:e.URL}})));var n=t.props,r=n.value,a=n.addToGallery,o=n.multiple?e:e[0],c=e.find((function(e){return e.errors}));if(c){var i=c.errors,l=Object.keys(i)[0];t.handleApiError({code:l,message:i[l]})}else t.props.onClose(),t.props.onSelect(a?r.concat(e):o)})).catch(t.handleApiError)})),z()(F()(t),"onChangePath",(function(e,n){t.setState({path:e},n)})),t.defaultAccount={image:"",name:""},t.state={account:t.defaultAccount,media:[],nextHandle:!1,isLoading:!1,isCopying:null,isAuthenticated:!0,path:{ID:"recent"}},t}return L()(n,t),T()(n,[{key:"mergeMedia",value:function(e,t){return Object(U.uniqBy)(e.concat(t),"ID")}},{key:"getRequestUrl",value:function(e){var t=this.state.nextHandle;return t?e+"&page_handle="+encodeURIComponent(t):e}},{key:"render",value:function(){var t=this.state,n=t.account,r=t.isAuthenticated,a=t.isCopying,o=t.isLoading,c=t.media,i=t.nextHandle,l=t.path,s=this.props,p=s.allowedTypes,d=s.multiple,m=void 0!==d&&d,b=s.noticeUI,h=s.onClose,f=a?Object(u.__)("Inserting media","jetpack"):Object(u.__)("Select media","jetpack"),g=a?Object(u.__)("When the media is finished copying and inserting, you will be returned to the editor.","jetpack"):Object(u.__)("Select the media you would like to insert into the editor.","jetpack"),j="jetpack-external-media-browser__description",v=q()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":a});return Object(k.createElement)(G.Modal,{onRequestClose:h,title:f,aria:{describedby:j},className:v},Object(k.createElement)("div",{ref:this.contentRef},b,Object(k.createElement)("p",{id:j,className:"jetpack-external-media-browser--visually-hidden"},g),Object(k.createElement)(e,{account:n,getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:a,isLoading:o,media:c,pageHandle:i,allowedTypes:p,isAuthenticated:r,setAuthenticated:this.setAuthenticated,multiple:m,path:l,onChangePath:this.onChangePath})))}}]),n}(k.Component);return Object(s.withSelect)((function(e){return{postId:e("core/editor").getCurrentPostId()}}))(Object(G.withNotices)(t))}))}var te=n(95),ne=function(e,t){var n,r=new te.a;r.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+r.getScreenCenterSpecs(780,700)),r.once("close",(function(){var e={};n&&n.keyring_id&&(e.keyring_id=Number(n.keyring_id),e.id_token=n.id_token,e.user=n.user),t(e)})),r.on("message",(function(e){return n=e}))},re=n(28),ae={list:"/wpcom/v2/external-media/list/",copy:Object(m.b)()?"/rest/v1.1/external-media-upload?service=":"/wpcom/v2/external-media/copy/",connection:"/wpcom/v2/external-media/connection/"};function oe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ae[e]?Object(re.addQueryArgs)(ae[e]+t,n):null}var ce=Object(k.memo)((function(){return Object(k.createElement)(k.Fragment,null,Object(k.createElement)(C.g,null),Object(k.createElement)("p",null,Object(u.__)("To show your Google Photos library you need to connect your Google account.","jetpack")),Object(k.createElement)("p",null,Object(u.__)("You can remove the connection in either of these places:","jetpack")),Object(k.createElement)("ul",null,Object(k.createElement)("li",null,Object(k.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://myaccount.google.com/security"},Object(u.__)("Google Security page","jetpack"))),Object(k.createElement)("li",null,Object(k.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.com/marketing/connections/"},Object(u.__)("WordPress.com Connections","jetpack")))))}));var ie=Object(k.memo)((function(){return Object(k.createElement)("p",null,Object(u.__)("Awaiting authorization","jetpack"))}));var le=function(e){var t=e.setAuthenticated,n=Object(k.useState)(!1),r=E()(n,2),a=r[0],o=r[1],c=Object(k.useCallback)((function(){o(!0),l()({path:oe("connection","google_photos")}).then((function(e){if(e.error)throw e.message;ne(e.connect_URL,(function(){o(!1),t(!0)}))})).catch((function(){o(!1)}))}),[t]);return Object(k.createElement)("div",{className:"jetpack-external-media-auth"},a?Object(k.createElement)(ie,null):Object(k.createElement)(ce,null),Object(k.createElement)(G.Button,{isPrimary:!0,disabled:a,onClick:c},Object(u.__)("Authorize","jetpack")))};var se=Object(k.memo)((function(){var e="jetpack-external-media-browser__media__item jetpack-external-media-browser__media__placeholder";return Object(k.createElement)(k.Fragment,null,Object(k.createElement)("div",{className:e}),Object(k.createElement)("div",{className:e}),Object(k.createElement)("div",{className:e}))}));var ue=function(e){var t=e.item,n=e.focus,r=e.isSelected,a=e.isCopying,o=void 0!==a&&a,c=t.thumbnails,i=t.caption,l=t.name,s=t.title,p=t.type,d=t.children,m=void 0===d?0:d,b=c.medium,h=void 0===b?null:b,f=c.fmt_hd,g=void 0===f?null:f,j=s||i||l,v=q()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":r,"jetpack-external-media-browser__media__folder":"folder"===p,"is-transient":o}),y=Object(k.useRef)(null);return Object(k.useEffect)((function(){n&&y.current.focus()}),[n]),Object(k.createElement)("li",{ref:y,className:v,onClick:o?void 0:function(t){var n=e.item,r=e.index;e.onClick&&e.onClick(t,{item:n,index:r})},onKeyDown:o?void 0:function(t){var n=e.item,r=e.index;e.onKeyDown&&e.onKeyDown(t,{item:n,index:r})},role:"checkbox",tabIndex:"0","aria-checked":!!r,"aria-disabled":!!o},r&&o&&Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator"},Object(k.createElement)(G.Spinner,null),Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator__label"},Object(u.__)("Inserting Imageโฆ","jetpack"))),Object(k.createElement)("img",{src:h||g,alt:j}),"folder"===p&&Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__info"},Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__name"},l),Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__count"},m)))},pe=Object(k.memo)((function(){return Object(k.createElement)("div",{className:"jetpack-external-media-browser__empty"},Object(k.createElement)("p",null,Object(u.__)("Sorry, but nothing matched your search criteria.","jetpack")))}));var de=function(e){var t=e.media,n=e.isCopying,r=e.isLoading,a=e.pageHandle,o=e.className,c=e.multiple,i=e.setPath,l=e.nextPage,s=e.onCopy,p=Object(k.useState)([]),d=E()(p,2),m=d[0],b=d[1],h=Object(k.useState)(-1),f=E()(h,2),g=f[0],j=f[1],v=Object(k.useRef)(-1),y=Object(k.useRef)(null),_=Object(k.useCallback)((function(e){var t=[e];"folder"===e.type?i(e.ID):c?(t=m.slice(0,9).concat(e),m.find((function(t){return e.ID===t.ID}))&&(t=m.filter((function(t){return t.ID!==e.ID})))):1===m.length&&e.ID===m[0].ID&&(t=[]),b(t)}),[m,c,i]),O=Object(k.useCallback)((function(){s(m)}),[m,s]),w=t.filter((function(e){return"folder"!==e.type})).length>0,C=q()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":r}),x=q()(z()({"jetpack-external-media-browser":!0},o,!0)),S=function(){var e=1,t=y.current.children;if(t.length>0)for(var n=t[0].offsetTop;e<t.length&&t[e].offsetTop===n;)++e;v.current=e},A=Object(U.debounce)(S,400);Object(k.useEffect)((function(){return window.addEventListener("resize",A),function(){window.removeEventListener("resize",A)}}),[]),Object(k.useEffect)((function(){t.length&&-1===v.current&&S()}),[t]);var T=function(e,t){var n=t.item;_(n)},N=function(e,n){var r=n.item,a=n.index;[W.LEFT,W.RIGHT,W.UP,W.DOWN].includes(e.keyCode)?function(e,n){switch(e){case W.LEFT:n>=1&&j(n-1);break;case W.RIGHT:n<t.length&&j(n+1);break;case W.UP:n>=v.current&&j(n-v.current);break;case W.DOWN:n<t.length-v.current&&j(n+v.current)}}(e.keyCode,a):W.SPACE===e.keyCode?(_(r),e.preventDefault()):W.ENTER===e.keyCode&&_(r),[W.LEFT,W.RIGHT,W.UP,W.DOWN,W.SPACE,W.ENTER].includes(e.keyCode)&&e.stopPropagation()};return Object(k.createElement)("div",{className:x},Object(k.createElement)("ul",{ref:y,className:C},t.map((function(e,t){return Object(k.createElement)(ue,{item:e,index:t,key:e.ID,onClick:T,onKeyDown:N,focus:t===g,isSelected:m.find((function(t){return t.ID===e.ID})),isCopying:n})})),0===t.length&&!r&&Object(k.createElement)(pe,null),r&&Object(k.createElement)(se,null),a&&!r&&Object(k.createElement)(G.Button,{isSecondary:!0,className:"jetpack-external-media-browser__loadmore",disabled:r||n,onClick:function(){t.length&&j(t.length),l()}},Object(u.__)("Load More","jetpack"))),w&&Object(k.createElement)((function(){var e=0===m.length||n,t=n?Object(u.__)("Insertingโฆ","jetpack"):Object(u.__)("Select","jetpack");return Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__toolbar"},Object(k.createElement)(G.Button,{isPrimary:!0,isBusy:n,disabled:e,onClick:O},t))}),null))},me=n(96);function be(e){var t=e.value,n=e.updateFilter;return Object(k.createElement)(G.SelectControl,{label:Object(u.__)("Category","jetpack"),value:t,options:Z,onChange:n})}function he(e){var t=e.value,n=e.updateFilter,r=(null==t?void 0:t.range)||"ANY",a=Object(k.useState)(-1),o=E()(a,2),c=o[0],i=o[1],l=Object(k.useState)(Q),s=E()(l,2),p=s[0],d=s[1];return Object(k.createElement)("div",{className:"jetpack-external-media-date-filter"},Object(k.createElement)(G.SelectControl,{label:Object(u.__)("Filter by time period","jetpack"),value:r,options:Y,onChange:function(e){return n({range:e})}}),"CUSTOM"===r&&Object(k.createElement)(k.Fragment,null,Object(k.createElement)(G.SelectControl,{label:Object(u.__)("Month","jetpack"),value:c,options:X,onChange:i}),Object(k.createElement)(me.a,{className:"components-base-control",label:Object(u.__)("Year","jetpack"),value:p,min:1970,onChange:d}),Object(k.createElement)(G.Button,{isSecondary:!0,disabled:(null==t?void 0:t.month)===c&&(null==t?void 0:t.year)===p,onClick:function(){n({range:r,month:c,year:p})}},Object(u.__)("Apply","jetpack"))))}function fe(){return Object(k.createElement)("span",null,Object(u.__)("Favorites","jetpack"))}function ge(e){var t=e.value,n=e.updateFilter,r=[{label:Object(u.__)("All","jetpack"),value:""},{label:Object(u.__)("Images","jetpack"),value:"photo"},{label:Object(u.__)("Videos","jetpack"),value:"video"}];return Object(k.createElement)(G.SelectControl,{label:Object(u.__)("Type","jetpack"),value:t,options:r,onChange:n})}function je(e){var t=e.children,n=e.removeFilter,r=e.isRemovable,a=void 0!==r&&r;return Object(k.createElement)("div",{className:"jetpack-external-media-googlephotos-filter"},t,!!a&&Object(k.createElement)(G.Button,{onClick:n,isSmall:!0},Object(u.__)("Remove Filter","jetpack")))}var ve=function(e){var t=e.filters,n=e.setFilters,r=e.canChangeMedia,o=Object.keys(t).filter((function(e){return r||"mediaType"!==e})).map((function(e){return Object(k.createElement)(je,{key:e,removeFilter:function(){return n(Object(U.omit)(t,e))}},(r=e,o=t[e],c=function(r){return n(function(e,t,n){var r=a()({},e,z()({},t,n));return"mediaType"===t&&"video"===n?delete r.category:"category"===t&&"video"===r.mediaType&&delete r.mediaType,r}(t,e,r))},"category"===r?Object(k.createElement)(be,{value:o,updateFilter:c}):"date"===r?Object(k.createElement)(he,{value:o,updateFilter:c}):"favorite"===r?Object(k.createElement)(fe,{value:o}):"mediaType"===r?Object(k.createElement)(ge,{value:o,updateFilter:c}):null));var r,o,c}));return 0===o.length?null:o},ke=[{label:Object(u.__)("Category","jetpack"),value:"category"},{label:Object(u.__)("Date","jetpack"),value:"date"},{label:Object(u.__)("Favorites","jetpack"),value:"favorite"},{label:Object(u.__)("Media Type","jetpack"),value:"mediaType"}];function ye(e){return ke.filter((function(t){return void 0===e[t.value]}))}function _e(e){var t=ye(e);return t.length>0?t[0].value:""}var Oe=function(e){var t=Object(k.useState)(_e([])),n=E()(t,2),r=n[0],o=n[1],c=e.isLoading,i=e.isCopying,l=e.filters,s=e.canChangeMedia,p=function(e,t){return t?e:e.filter((function(e){return"mediaType"!==e.value}))}(ye(l),s);return 0===p.length?null:Object(k.createElement)(k.Fragment,null,Object(k.createElement)(G.SelectControl,{label:Object(u.__)("Filters","jetpack"),value:r,disabled:c||i,options:p,onChange:o}),Object(k.createElement)(G.Button,{disabled:c||i,isSecondary:!0,isSmall:!0,onClick:function(){var t,n,c=(t=l,n=r,a()({},t,z()({},n,"favorite"===n||"")));e.setFilters(c),o(_e(c))}},Object(u.__)("Add Filter","jetpack")))},we=function(e){var t=e.setAuthenticated,n=Object(k.useState)(!1),r=E()(n,2),a=r[0],o=r[1],c=Object(k.useCallback)((function(){o(!0),l()({method:"DELETE",path:oe("connection","google_photos")}).then((function(){return t(!1)})).catch((function(){return o(!1)}))}),[t]);return Object(k.createElement)(G.Button,{isSecondary:!0,className:"jetpack-external-media-browser__disconnect",onClick:c,disabled:a,isBusy:a},Object(u.__)("Disconnect from Google Photos","jetpack"))},Ee=function(e){var t=e.account,n=e.setAuthenticated,r=t||{},a=r.image,o=r.name;return Object(k.createElement)("div",{className:"jetpack-external-media-header__account"},Object(k.createElement)("div",{className:"jetpack-external-media-header__account-info"},a&&Object(k.createElement)("img",{className:"jetpack-external-media-header__account-image",src:a,alt:"",height:"18",width:"18"}),o&&Object(k.createElement)("div",{className:"jetpack-external-media-header__account-name"},o)),Object(k.createElement)(we,{setAuthenticated:n}))};var Ce=Object(k.memo)((function(e){var t=e.path,n=e.setPath;return Object(k.createElement)(k.Fragment,null,Object(k.createElement)(G.Button,{isTertiary:!0,onClick:function(){return n("/")}},Object(u.__)("Albums","jetpack")),"โ ย ",t.name)})),xe=n(45),Se=n.n(xe),Ae=Se()();var Te=function(e){var t,n=e.account,r=e.allowedTypes,a=e.copyMedia,o=e.getMedia,c=e.isCopying,i=e.isLoading,l=e.media,s=e.multiple,p=e.onChangePath,d=e.pageHandle,m=e.path,b=e.setAuthenticated,h=e.showAdditionalFilters,f=void 0!==h&&h,g=(t=r)&&1===t.length&&"image"===t[0],j=Object(k.useState)(g?{mediaType:"photo",date:{range:"ANY"}}:{date:{range:"ANY"}}),v=E()(j,2),y=v[0],_=v[1],O=Object(k.useRef)(""),w=Object(k.useRef)(""),C="recent"===m.ID?function(e){var t=e.mediaType,n=e.category,r=e.favorite,a=e.date,o=[];if(t&&o.push("mediaType="+t),n&&"video"!==t&&o.push("categoryInclude="+n),void 0!==r&&o.push("feature=favorite"),a){var c=null,i=null;switch(a.range){case"LAST_7_DAYS":c=Se()(Ae).subtract(7,"days"),i=Ae;break;case"LAST_30_DAYS":c=Se()(Ae).subtract(30,"days"),i=Ae;break;case"LAST_6_MONTHS":c=Se()(Ae).subtract(6,"months"),i=Ae;break;case"LAST_12_MONTHS":c=Se()(Ae).subtract(1,"year"),i=Ae;break;case"CUSTOM":var l=parseInt(a.month),s=parseInt(a.year);isNaN(l)||isNaN(s)||(-1===l?(c=Se()([s,0]),i=Se()(c).endOf("year")):(c=Se()([s,l]),i=Se()(c).endOf("month")))}var u=c?c.format("YYYY-MM-DD"):"0000-00-00",p=i?i.format("YYYY-MM-DD"):"0000-00-00";o.push("dateRange=".concat(u,":").concat(p))}return o.length>0?o:null}(y):null,x={number:20,path:m.ID};C&&(x.filter=C);var S=oe("list","google_photos",x),A=Object(k.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o(S,t)}),[o,S]),T=Object(k.useCallback)((function(e){var t=l.find((function(t){return t.ID===e}));w.current=m,p(t||{ID:e})}),[l,p,w,m]),N=Object(k.useCallback)((function(e){a(e,oe("copy","google_photos"),"google_photos")}),[a]);return Object(k.useEffect)((function(){O!==S&&(O.current=S,A({},m!==w.current))}),[O,S,A,m]),Object(k.createElement)("div",{className:"jetpack-external-media-wrapper__google"},Object(k.createElement)("div",{className:"jetpack-external-media-header__view"},Object(k.createElement)(G.SelectControl,{className:"jetpack-external-media-header__select",label:Object(u.__)("View","jetpack"),value:"recent"!==m.ID?"/":"recent",disabled:i||c,options:K,onChange:T}),f&&"recent"===m.ID&&Object(k.createElement)(Oe,{filters:y,isLoading:i,setFilters:_,canChangeMedia:!g}),Object(k.createElement)("div",{className:"jetpack-external-media-header__filter"},"recent"===m.ID&&Object(k.createElement)(ve,{filters:y,isLoading:i,setFilters:_,canChangeMedia:!g}),"recent"!==m.ID&&"/"!==m.ID&&Object(k.createElement)(Ce,{path:m,setPath:T})),(!i||l.length>0)&&Object(k.createElement)(Ee,{account:n,setAuthenticated:b})),Object(k.createElement)(de,{className:"jetpack-external-media-browser__google",key:S,media:l,isCopying:c,isLoading:i,nextPage:A,onCopy:N,pageHandle:d,multiple:s,setPath:T}))};var Ne=ee()((function(e){return e.isAuthenticated?Object(k.createElement)(Te,e):Object(k.createElement)(le,e)}));var Pe=ee()((function(e){var t=e.media,n=e.isCopying,r=e.isLoading,a=e.pageHandle,o=e.multiple,c=e.copyMedia,i=e.getMedia,l=Object(k.useState)(Object(U.sample)(J)),s=E()(l,2),p=s[0],d=s[1],m=Object(k.useState)(""),b=E()(m,2),h=b[0],f=b[1],g=Object(k.useCallback)((function(e){c(e,oe("copy","pexels"),"pexels")}),[c]),j=Object(k.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p&&i(oe("list","pexels",{number:20,path:"recent",search:p}),t)}),[i,p]),v=Object(k.useRef)(),y=Object(k.useCallback)((function(e){e.preventDefault(),f(p),j(e,!0),v.current=p}),[j,p]);Object(k.useEffect)(j,[]);var _=Object(k.useRef)(null);return Object(k.useEffect)((function(){if(_.current){var e=Array.from(_.current.elements).find((function(e){return"search"===e.type}));e&&(e.focus(),e.select())}}),[]),Object(k.createElement)("div",{className:"jetpack-external-media-wrapper__pexels"},Object(k.createElement)("form",{ref:_,className:"jetpack-external-media-header__pexels",onSubmit:y},Object(k.createElement)(G.TextControl,{"aria-label":Object(u.__)("Search","jetpack"),type:"search",value:p,onChange:d,disabled:!!n}),Object(k.createElement)(G.Button,{isPrimary:!0,onClick:y,type:"submit",disabled:!p.length||p===v.current||n},Object(u.__)("Search","jetpack"))),Object(k.createElement)(de,{key:h,className:"jetpack-external-media-browser__pexels",media:t,isCopying:n,isLoading:r,nextPage:j,onCopy:g,pageHandle:a,multiple:o}))})),Me=[{id:"google_photos",label:Object(u.__)("Google Photos","jetpack"),icon:Object(k.createElement)(C.f,{className:"components-menu-items__item-icon"}),keyword:"google photos"},{id:"pexels",label:Object(u.__)("Pexels Free Photos","jetpack"),icon:Object(k.createElement)(C.j,{className:"components-menu-items__item-icon"}),keyword:"pexels"}];var Be=n(59),Ie=Object(k.createElement)(Be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(k.createElement)(Be.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"}));var Fe=function(e){var t=e.originalButton,n=void 0===t?null:t,r=e.open,a=e.setSource;return Object(k.createElement)(k.Fragment,null,n&&n({open:r}),Me.map((function(e){var t=e.icon,n=e.id,r=e.label;return Object(k.createElement)(G.MenuItem,{icon:t,key:n,onClick:function(){return a(n)}},r)})))};var Re=function(e){var t=e.mediaProps,n=e.open,r=e.setSelectedSource,a=e.isFeatured,o=e.isReplace,c=t.render;if(a&&void 0===t.value)return c({open:n});if(o)return Object(k.createElement)(Fe,{originalButton:c,open:n,setSource:r});var i=Object(u.__)("Select Image","jetpack");return t.multiple&&(i=Object(u.__)("Select Images","jetpack")),t.allowedTypes.length>1&&(i=Object(u.__)("Select Media","jetpack")),Object(k.createElement)(k.Fragment,null,a&&c({open:n}),Object(k.createElement)(G.Dropdown,{position:"bottom right",contentClassName:"jetpack-external-media-button-menu__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(k.createElement)(G.Button,{isTertiary:!a,isPrimary:a,className:"jetpack-external-media-button-menu","aria-haspopup":"true","aria-expanded":t,onClick:n},i)},renderContent:function(){return Object(k.createElement)(G.NavigableMenu,{"aria-label":i},Object(k.createElement)(G.MenuGroup,null,Object(k.createElement)(G.MenuItem,{icon:Ie,onClick:n},Object(u.__)("Media Library","jetpack")),Object(k.createElement)(Fe,{open:n,setSource:r})))}}))},Le=function(e){return e.unstableFeaturedImageFlow||e.modalClass&&-1!==e.modalClass.indexOf("featured-image")},De=function(e){return void 0===e.multiple&&!Le(e)};var ze=function(e){var t,n=e.mediaProps,r=Object(k.useState)(null),a=E()(r,2),o=a[0],c=a[1],i="pexels"===(t=o)?Pe:"google_photos"===t?Ne:null;return Object(k.createElement)("div",{onClick:function(e){return e.stopPropagation()}},Object(k.createElement)(Re,g()({},e,{setSelectedSource:c,isReplace:De(n),isFeatured:Le(n)})),i&&Object(k.createElement)(i,g()({onClose:function(e){e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||c(null)}},n)))};n(207);if(Object(O.a)()&&"function"==typeof _.useBlockEditContext){Object(y.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(function(e){return function(t){var n=Object(_.useBlockEditContext)().name,r=t.render;if(function(e,t){return["core/cover","core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/tiled-gallery"].indexOf(e)>-1&&-1===t.toString().indexOf("coblocks")}(n,r)||function(e){return e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1}(t)){var a=t.allowedTypes,o=t.gallery,c=void 0!==o&&o,i=t.value,l=void 0===i?[]:i;a.indexOf("image")>-1&&!(c&&l.length>0)&&(r=function(e){return Object(k.createElement)(ze,g()({},e,{mediaProps:t}))})}return Object(k.createElement)(e,g()({},t,{render:r}))}}),100),Object(y.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:a()({},e,{keywords:[].concat(v()(e.keywords),v()(Me.map((function(e){return e.keyword}))))})}))}var Ue=n(17),Ve={name:"facebook",title:"Facebook",icon:{src:"facebook",foreground:Object(Ue.a)()},keywords:[Object(u._x)("social","block search term","jetpack")],description:Object(u.__)("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};Object(y.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations)return e;var n=e.variations.filter((function(e){return e.name!==Ve.name}));return e.variations=[].concat(v()(n),[Ve]),e}));var qe=n(51);var He={name:"instagram",title:"Instagram",icon:{src:"instagram",foreground:Object(Ue.a)()},keywords:[Object(u._x)("image","block search term","jetpack"),Object(u._x)("social","block search term","jetpack")],description:Object(u.__)("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};Object(y.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations||!Object(U.get)(Object(qe.a)(),["jetpack","is_active"],!1))return e;var n=e.variations.filter((function(e){return e.name!==He.name}));return e.variations=[].concat(v()(n),[He]),e}));var Ge=n(11),We={name:"loom",title:"Loom",icon:C.i,keywords:[Object(u.__)("video","jetpack")],description:Object(u.__)("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};Object(Ge.registerBlockVariation)("core/embed",We);var $e=n(55),Ke=n.n($e),Ze=n(38),Je=n(101),Ye=(n(209),function(e){var t=e.align,n=e.className,r=e.title,a=e.description,o=e.buttonText,c=e.visible,i=void 0===c||c,l=e.context,s=e.checkoutUrl,p=e.goToCheckoutPage,d=e.isRedirecting,m=void 0!==d&&d,b=q()(n,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===l,"block-editor-block-list__block":"editor-canvas"===l,"jetpack-upgrade-plan__hidden":!i}),h=Object(u.__)("Redirectingโฆ","jetpack");return Object(k.createElement)("div",{className:b,"data-align":t},Object(k.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},r&&Object(k.createElement)("strong",{className:q()("banner-title",z()({},"".concat(n,"__title"),n))},r),a&&Object(k.createElement)("span",{className:"".concat(n,"__description banner-description")},a),Object(k.createElement)(G.Button,{href:m?null:s,onClick:p,target:"_top",className:q()("is-primary",{"jetpack-upgrade-plan__hidden":!s}),isBusy:m},m?h:o)))}),Qe=Object(u.__)("Premium Block","jetpack"),Xe=Object(u.__)("Upgrade your plan to use this premium block","jetpack"),et=Object(u.__)("Upgrade","jetpack"),tt=function(e){var t=e.onRedirect,n=e.align,r=e.className,a=e.title,o=void 0===a?Qe:a,c=e.description,i=void 0===c?Xe:c,l=e.buttonText,s=void 0===l?et:l,u=e.visible,p=void 0===u||u,d=e.requiredPlan,m=e.context,b=Object(Je.a)(d,t),h=E()(b,3),f=h[0],g=h[1],j=h[2];return Object(k.createElement)(Ye,{align:n,buttonText:s,checkoutUrl:f,className:r,context:m,description:i,goToCheckoutPage:g,isRedirecting:j,title:o,visible:p})},nt=Object(k.createContext)(),rt=function(e){var t=e.onBannerVisibilityChange,n=e.children;return Object(k.createElement)(nt.Provider,{value:t,children:n})},at=n(58),ot=function(e){var t=e.plan,n=e.blockName,r=e.context;at.a.tracks.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:n,context:r})},ct=Object(H.createHigherOrderComponent)((function(e){return function(t){var n,r=Object(Ze.a)(null==t?void 0:t.name);if(!r)return Object(k.createElement)(e,t);var a=Object(Ze.d)(t.name),o=Object(Ze.c)(t.name),c=Object(k.useState)(!a),i=E()(c,2),l=i[0],u=i[1],p=Object(k.useState)(!1),d=E()(p,2),m=d[0],b=d[1],h=Object(s.useSelect)((function(e){return e("core/block-editor").hasSelectedInnerBlock(null==t?void 0:t.clientId)}),[]),f=((null==t?void 0:t.isSelected)||h)&&l,j={plan:r,blockName:t.name,context:"editor-canvas"};Object(k.useEffect)((function(){f&&b(!0)}),[f,b]),Object(k.useEffect)((function(){var e,t,n,r;!m&&f&&(t=(e=j).plan,n=e.blockName,r=e.context,at.a.tracks.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:n,context:r}))}),[m,j,f]),Object(k.useEffect)((function(){return u(!a)}),[t.attributes,u,a]);var v=q()(null==t?void 0:t.className,{"is-upgradable":f});return Object(k.createElement)(rt,{onBannerVisibilityChange:u},Object(k.createElement)(tt,{className:"is-".concat(t.name.replace(/\//,"-"),"-paid-block"),title:null,align:null==t||null===(n=t.attributes)||void 0===n?void 0:n.align,visible:f,description:null==o?void 0:o.description,requiredPlan:r,context:"editor-canvas",onRedirect:function(){return ot(j)}}),Object(k.createElement)(e,g()({},t,{className:v})))}}),"withUpgradeBanner"),it=n(100);n(210);function lt(){return Object(U.get)(Object(qe.a)(),["allowedMimeTypes"],[])}function st(e,t){if(!e||!t)return!1;if(!lt())return!1;var n,r,a=(n=t)?Object(U.pickBy)(lt(),(function(e){return Object(U.startsWith)(e,"".concat(n,"/"))})):{},o=(r=a)?Object(U.flatten)(Object(U.map)(Object(U.keys)(r),(function(e){return e.split("|")}))):[];if("string"==typeof e){var c=e.split(".").pop();return c&&o.includes(c)}return"object"==typeof e&&(e.type&&Object(U.values)(a).includes(e.type))}var ut=Object(H.createHigherOrderComponent)((function(e){return function(t){var n=Object(_.useBlockEditContext)().name,r=Object(Ze.c)(n);if(!(null==r?void 0:r.mediaPlaceholder)||!Object(Ze.e)(n))return Object(k.createElement)(e,t);var a=r.fileType,o=t.onError,c=Object(k.useContext)(nt),i=Object(k.useCallback)((function(e){return c((null==e?void 0:e.length)&&st(e[0],a))}),[a,c]),l=Object(k.useCallback)((function(e){var t,n,r=null==e||null===(t=e[0])||void 0===t||null===(n=t.props)||void 0===n?void 0:n.children;return st(r,a)?i([r]):o(e)}),[i,a,o]);return Object(k.createElement)("div",{className:"paid-block-media-placeholder"},Object(k.createElement)(e,g()({},t,{onFilesPreUpload:i,onError:l})))}}),"withMediaPlaceholderUpgradable"),pt=Object(H.createHigherOrderComponent)((function(e){return function(t){var n=Object(_.useBlockEditContext)().name,r=Object(Ze.c)(n),a=Object(k.useRef)();if(!(null==r?void 0:r.mediaReplaceFlow)||!Object(Ze.e)(n))return Object(k.createElement)(e,t);var o=r.fileType,c=Object(k.useContext)(nt);return Object(k.createElement)(e,g()({},t,{onFilesUpload:function(e){a.current=(null==e?void 0:e.length)?e[0]:null,c((null==e?void 0:e.length)&&st(e[0],o))},createNotice:function(e,n,r){if(st(a.current,o))return a.current=null,null;t.createNotice(e,n,r)}}))}}),"withMediaReplaceFlowUpgradable"),dt=[];Object(y.addFilter)("blocks.registerBlockType","jetpack/paid-block",(function(e,t){return Object(Ze.e)(t)&&(dt.includes(t)||dt.push(t),e.keywords=Object(U.uniq)([].concat(v()(e.keywords),["premium",Object(u.__)("premium","jetpack")])),Object(Ze.d)(t)||(e.icon=Object(it.a)(e.icon))),e})),Object(y.addFilter)("editor.BlockEdit","jetpack/paid-block-edit",(function(e){return function(t){var n=Object(Ze.a)(null==t?void 0:t.name);if(!n)return Object(k.createElement)(e,t);return Object(k.createElement)(k.Fragment,null,Object(k.createElement)(_.InspectorControls,null,Object(k.createElement)(tt,{description:null,requiredPlan:n,context:"sidebar",onRedirect:function(){return ot({plan:n,blockName:t.name,context:"sidebar"})}})),Object(k.createElement)(e,t))}}),30),Object(y.addFilter)("editor.BlockListBlock","jetpack/paid-block-with-warning",ct),Object(y.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",ut),Object(y.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",pt),Ke()((function(){Object(Ze.f)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}));n(211),n(189);if("object"==typeof window&&"object"==typeof window.Jetpack_Editor_Initial_State&&"object"==typeof window.Jetpack_Editor_Initial_State.tracksUserData&&void 0!==window.Jetpack_Editor_Initial_State.wpcomBlogId){var mt=window.Jetpack_Editor_Initial_State.tracksUserData,bt=mt.userid,ht=mt.username;at.a.initialize(bt,ht,{blog_id:window.Jetpack_Editor_Initial_State.wpcomBlogId})}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"save",(function(){return Rt})),n.d(r,"attributes",(function(){return Lt})),n.d(r,"support",(function(){return Dt}));var a={};n.r(a),n.d(a,"save",(function(){return Cn})),n.d(a,"attributes",(function(){return Sn})),n.d(a,"supports",(function(){return An}));var o=n(20),c=n(7),i=n.n(c),l=n(3),s=n.n(l),u=n(0),p=n(1),d=n(11),m=n(4),b=n(2),h=n(21),f=n.n(h),g=n(12),j=n.n(g),v=n(16),k=n.n(v),y=n(13),_=n.n(y),O=n(14),w=n.n(O),E=n(6),C=n.n(E),x=n(15),S=n.n(x),A=n(5),T=n(52),N=[{icon:Object(u.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(b.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(b.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:Object(p._x)("Original","image style","jetpack"),value:void 0},{icon:Object(u.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(b.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(b.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:Object(p._x)("Black and White","image style","jetpack"),value:"black-and-white"},{icon:Object(u.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(b.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(b.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),title:Object(p._x)("Sepia","image style","jetpack"),value:"sepia"},{icon:Object(u.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(b.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(b.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:"1977",value:"1977"},{icon:Object(u.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(b.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(b.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:Object(p._x)("Clarendon","image style","jetpack"),value:"clarendon"},{icon:Object(u.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(b.Path,{fill:"none",d:"M0 0h24v24H0z"}),Object(u.createElement)(b.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:Object(p._x)("Gingham","image style","jetpack"),value:"gingham"}],P=Object(p.__)("Pick an image filter","jetpack");function M(e){var t=e.value,n=e.onChange;return Object(u.createElement)(b.Dropdown,{position:"bottom right",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(u.createElement)(b.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:P,tooltip:P,icon:Object(u.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(b.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(b.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"}))}]})},renderContent:function(e){var r=e.onClose;return Object(u.createElement)(b.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},N.map((function(e){var a,o=e.icon,c=e.title,i=e.value;return Object(u.createElement)(b.MenuItem,{className:t===i?"is-active":void 0,icon:o,isSelected:t===i,key:i||"original",onClick:(a=i,function(){n(t===a?void 0:a),r()}),role:"menuitemcheckbox"},c)})))}})}var B=n(8),I=n.n(B),F=n(25),R=n(34),L=n(10),D=Object(u.createElement)(b.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(b.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),z=Object(u.createElement)(b.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(b.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),U=Object(u.createElement)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(b.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),V=Object(u.createElement)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(b.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),q=Object(u.createElement)(b.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(b.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"})),H=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=_()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(C()(n),"img",Object(u.createRef)()),s()(C()(n),"onImageClick",(function(){n.props.isSelected||n.props.onSelect()})),s()(C()(n),"onImageKeyDown",(function(e){n.img.current===document.activeElement&&n.props.isSelected&&[F.BACKSPACE,F.DELETE].includes(e.keyCode)&&n.props.onRemove()})),n}return S()(t,e),k()(t,[{key:"componentDidUpdate",value:function(){var e=this.props,t=e.alt,n=e.height,r=e.image,a=e.link,o=e.url,c=e.width;if(r){var i={};!t&&r.alt_text&&(i.alt=r.alt_text),!n&&r.media_details&&r.media_details.height&&(i.height=+r.media_details.height),!a&&r.link&&(i.link=r.link),!o&&r.source_url&&(i.url=r.source_url),!c&&r.media_details&&r.media_details.width&&(i.width=+r.media_details.width),Object.keys(i).length&&this.props.setAttributes(i)}}},{key:"render",value:function(){var e,t=this.props,n=t["aria-label"],r=t.alt,a=t.columns,o=t.height,c=t.id,i=t.imageFilter,l=t.isFirstItem,d=t.isLastItem,m=t.isSelected,h=t.link,f=t.linkTo,g=t.onMoveBackward,j=t.onMoveForward,v=t.onRemove,k=t.origUrl,y=t.showMovers,_=t.srcSet,O=t.url,w=t.width;switch(f){case"media":e=O;break;case"attachment":e=h}var E=Object(R.isBlobURL)(k),C=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("img",{alt:r,"aria-label":n,"data-height":o,"data-id":c,"data-link":h,"data-url":k,"data-width":w,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:E?void 0:O,srcSet:E?void 0:_,tabIndex:"0",style:E?{backgroundImage:"url(".concat(k,")")}:void 0}),E&&Object(u.createElement)(b.Spinner,null));return Object(u.createElement)("figure",{className:I()("tiled-gallery__item",s()({"is-selected":m,"is-transient":E},"filter__".concat(i),!!i))},y&&Object(u.createElement)("div",{className:"tiled-gallery__item__move-menu"},Object(u.createElement)(b.IconButton,{icon:1===a?V:D,onClick:l?void 0:g,className:"tiled-gallery__item__move-backward",label:Object(p.__)("Move image backward","jetpack"),"aria-disabled":l,disabled:!m}),Object(u.createElement)(b.IconButton,{icon:1===a?U:z,onClick:d?void 0:j,className:"tiled-gallery__item__move-forward",label:Object(p.__)("Move image forward","jetpack"),"aria-disabled":d,disabled:!m})),Object(u.createElement)("div",{className:"tiled-gallery__item__inline-menu"},Object(u.createElement)(b.IconButton,{icon:q,onClick:v,className:"tiled-gallery__item__remove",label:Object(p.__)("Remove image","jetpack"),disabled:!m})),e?Object(u.createElement)("a",null,C):C)}}]),t}(u.Component),G=Object(L.withSelect)((function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}}))(H);function W(e){var t,n=e.alt,r=e.imageFilter,a=e.height,o=e.id,c=e.link,i=e.linkTo,l=e.origUrl,p=e.url,d=e.width;if(Object(R.isBlobURL)(l))return null;switch(i){case"media":t=p;break;case"attachment":t=c}var m=Object(u.createElement)("img",{alt:n,"data-height":a,"data-id":o,"data-link":c,"data-url":l,"data-width":d,src:p,layout:"responsive"});return Object(u.createElement)("figure",{className:I()("tiled-gallery__item",s()({},"filter__".concat(r),!!r))},t?Object(u.createElement)("a",{href:t},m):m)}var $=n(63);function K(e){var t=e.children,n=e.width,r=n?{flexBasis:"".concat(n,"%")}:void 0;return Object(u.createElement)("div",{className:"tiled-gallery__col",style:r},t)}function Z(e){var t=e.children,n=e.galleryRef;return Object(u.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}function J(e){var t=e.children,n=e.className;return Object(u.createElement)("div",{className:I()("tiled-gallery__row",n)},t)}var Y=n(99);function Q(e){var t=e.height,n=e.width;return t&&n?n/t:1}var X=ve([2,1,2],5),ee=ke([ye,ye,_e,ye,ye]),te=ke([ye,ye,ye,_e,ye,ye,ye]),ne=ve([3,1,3],5),re=ke([_e,ye,ye,_e]),ae=ve([1,2,1],5),oe=ke([_e,ye,ye,ye]),ce=ve([1,3],3),ie=ke([ye,ye,ye,_e]),le=ve([3,1],3),se=ke([we(1.6),Object(m.overEvery)(Oe(.9),we(2)),Object(m.overEvery)(Oe(.9),we(2))]),ue=ve([1,2],3),pe=ve([1,1,1,1,1],1),de=ve([1,1,1,1],1),me=ve([1,1,1],3),be=ke([Object(m.overEvery)(Oe(.9),we(2)),Object(m.overEvery)(Oe(.9),we(2)),we(1.6)]),he=ve([2,1],3),fe=ke([function(e){return e>=2}]);function ge(e,t,n){var r=Object(m.sum)(Object(m.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&me(e)&&(r<2.5||r<5&&t.length>=3&&t[0]===t[2]||n)}function je(e,t){var n=Object(m.sum)(Object(m.take)(t,4));return de(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function ve(e,t){return function(n){return!Object(m.some)(Object(m.takeRight)(n,t),(function(t){return Object(m.isEqual)(t,e)}))}}function ke(e){return function(t){return t.length>=e.length&&Object(m.every)(Object(m.zipWith)(e,t.slice(0,e.length),(function(e,t){return e(t)})))}}function ye(e){return e>=1&&e<2}function _e(e){return e<1}function Oe(e){return function(t){return t>=e}}function we(e){return function(t){return t<e}}var Ee=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=_()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(C()(n),"gallery",Object(u.createRef)()),s()(C()(n),"pendingRaf",null),s()(C()(n),"ro",null),s()(C()(n),"handleGalleryResize",(function(e){n.pendingRaf&&(cancelAnimationFrame(n.pendingRaf),n.pendingRaf=null),n.pendingRaf=requestAnimationFrame((function(){var t=!0,r=!1,a=void 0;try{for(var o,c=function(){var e=o.value,t=e.contentRect,r=e.target,a=t.width,c=[];Object(Y.a)(r).forEach((function(e){c.push(Object(Y.b)(e,a))})),void 0!==n.props.onResize&&n.props.onResize(c)},i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)c()}catch(l){r=!0,a=l}finally{try{t||null==i.return||i.return()}finally{if(r)throw a}}}))})),n}return S()(t,e),k()(t,[{key:"componentDidMount",value:function(){this.observeResize()}},{key:"componentWillUnmount",value:function(){this.unobserveResize()}},{key:"componentDidUpdate",value:function(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}},{key:"triggerResize",value:function(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}},{key:"observeResize",value:function(){this.triggerResize(),this.ro=new $.a(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}},{key:"unobserveResize",value:function(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}},{key:"render",value:function(){var e=this.props,t=e.align,n=e.columns,r=e.images,a=e.layoutStyle,o=e.renderedImages,c=e.columnWidths,i=function(e){return Object(m.map)(e,Q)}(r),l="columns"===a?function(e,t){if(e.length<=t)return[Array(e.length).fill(1)];for(var n=Object(m.sum)(e)/t,r=[],a=e,o=0,c=function(e){var t=Object(m.takeWhile)(a,(function(t){var r=o<=(e+1)*n;return r&&(o+=t),r})).length;r.push(t),a=Object(m.drop)(a,t)},i=0;i<t-1;i++)c(i);return r.push(a.length),[r]}(i,n):function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isWide,r=function e(t,r){if(!r.length)return t;var a;a=r.length>15&&ee(r)&&X(t)?[2,1,2]:r.length>15&&te(r)&&ne(t)?[3,1,3]:5!==r.length&&re(r)&&ae(t)?[1,2,1]:oe(r)&&ce(t)?[1,3]:ie(r)&&le(t)?[3,1]:se(r)&&ue(t)?[1,2]:n&&(5===r.length||10!==r.length&&r.length>6)&&pe(t)&&Object(m.sum)(Object(m.take)(r,5))<5?[1,1,1,1,1]:je(t,r)?[1,1,1,1]:ge(t,r,n)?[1,1,1]:be(r)&&he(t)?[2,1]:fe(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),c=Object(m.sum)(a);return e(o,r.slice(c))};return r([],e)}(i,{isWide:["full","wide"].includes(t)}),s=0;return Object(u.createElement)(Z,{galleryRef:this.gallery},l.map((function(e,t){return Object(u.createElement)(J,{key:t},e.map((function(e,n){var r=o.slice(s,s+e);return s+=e,Object(u.createElement)(K,{key:n,width:c?c[t][n]:void 0},r)})))})))}}]),t}(u.Component),Ce=n(29);function xe(e){var t=e.columns,n=e.renderedImages,r=Math.min(Ce.h,t),a=n.length%r;return Object(u.createElement)(Z,null,[].concat(f()(a?[Object(m.take)(n,a)]:[]),f()(Object(m.chunk)(Object(m.drop)(n,a),r))).map((function(e,t){return Object(u.createElement)(J,{key:t,className:"columns-".concat(e.length)},e.map((function(e,t){return Object(u.createElement)(K,{key:t},e)})))})))}var Se=n(76),Ae=function(e){function t(){return j()(this,t),_()(this,w()(t).apply(this,arguments))}return S()(t,e),k()(t,[{key:"renderImage",value:function(e,t){var n=this.props,r=n.columns,a=n.imageFilter,o=n.images,c=n.isSave,i=n.linkTo,l=n.layoutStyle,s=n.onMoveBackward,d=n.onMoveForward,m=n.onRemoveImage,b=n.onSelectImage,h=n.selectedImage,f=n.setImageAttributes,g=Object(p.sprintf)(Object(p.__)("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),j=c?W:G,v=Object(Se.b)(e,{layoutStyle:l}),k=v.src,y=v.srcSet;return Object(u.createElement)(j,{alt:e.alt,"aria-label":g,columns:r,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:h===t,key:t,link:e.link,linkTo:i,onMoveBackward:c?void 0:s(t),onMoveForward:c?void 0:d(t),onRemove:c?void 0:m(t),onSelect:c?void 0:b(t),origUrl:e.url,setAttributes:c?void 0:f(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width})}},{key:"render",value:function(){var e=this.props,t=e.align,n=e.children,r=e.className,a=e.columns,o=e.images,c=e.layoutStyle,i=e.roundedCorners,l=e.onResize,p=e.isSave,d=e.columnWidths,m=Object(Se.a)(c)?xe:Ee,b=this.props.images.map(this.renderImage,this),h=c!==Ce.c?Math.min(i,Ce.i):0;return Object(u.createElement)("div",{className:I()(r,s()({},"has-rounded-corners-".concat(h),h>0))},Object(u.createElement)(m,{align:t,columns:a,columnWidths:p?d:void 0,images:o,layoutStyle:c,renderedImages:b,onResize:p?void 0:l}),n)}}]),t}(u.Component),Te=n(43),Ne=n(64),Pe=[{value:"attachment",label:Object(p.__)("Attachment Page","jetpack")},{value:"media",label:Object(p.__)("Media File","jetpack")},{value:"none",label:Object(p.__)("None","jetpack")}];function Me(e){return Math.min(3,e.images.length)}var Be=function(e){var t=Object(m.pick)(e,[["alt"],["id"],["link"]]);return t.url=Object(m.get)(e,["sizes","large","url"])||Object(m.get)(e,["media_details","sizes","large","source_url"])||e.url,t},Ie=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=_()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(C()(n),"state",{selectedImage:null,changed:void 0===n.props.attributes.columnWidths}),s()(C()(n),"addFiles",(function(e){var t=n.props.attributes.images||[],r=n.props.noticeOperations;Object(T.mediaUpload)({allowedTypes:Ce.a,filesList:e,onFileChange:function(e){var r=e.map((function(e){return Be(e)}));n.setAttributes({images:t.concat(r)})},onError:r.createErrorNotice}),n.setState({changed:!0})})),s()(C()(n),"onRemoveImage",(function(e){return function(){var t=Object(m.filter)(n.props.attributes.images,(function(t,n){return e!==n})),r=n.props.attributes.columns;n.setState({selectedImage:null,changed:!0}),n.setAttributes({images:t,columns:r?Math.min(t.length,r):r})}})),s()(C()(n),"onSelectImage",(function(e){return function(){n.state.selectedImage!==e&&n.setState({selectedImage:e})}})),s()(C()(n),"onSelectImages",(function(e){var t=n.props.attributes.columns;n.setAttributes({columns:t?Math.min(e.length,t):t,images:e.map((function(e){return Be(e)}))}),n.setState({changed:!0})})),s()(C()(n),"onMove",(function(e,t){var r=f()(n.props.attributes.images);r.splice(t,1,n.props.attributes.images[e]),r.splice(e,1,n.props.attributes.images[t]),n.setState({selectedImage:t,changed:!0}),n.setAttributes({images:r})})),s()(C()(n),"onMoveForward",(function(e){return function(){e!==n.props.attributes.images.length-1&&n.onMove(e,e+1)}})),s()(C()(n),"onMoveBackward",(function(e){return function(){0!==e&&n.onMove(e,e-1)}})),s()(C()(n),"onResize",(function(e){n.state.changed&&n.setAttributes({columnWidths:e})})),s()(C()(n),"setColumnsNumber",(function(e){return n.setAttributes({columns:e})})),s()(C()(n),"setRoundedCorners",(function(e){return n.setAttributes({roundedCorners:e})})),s()(C()(n),"setImageAttributes",(function(e){return function(t){var r=n.props.attributes.images;r[e]&&n.setAttributes({images:[].concat(f()(r.slice(0,e)),[i()({},r[e],{},t)],f()(r.slice(e+1)))})}})),s()(C()(n),"setLinkTo",(function(e){return n.setAttributes({linkTo:e})})),s()(C()(n),"uploadFromFiles",(function(e){return n.addFiles(e.target.files)})),n}return S()(t,e),k()(t,[{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=i()({},e,{ids:e.images.map((function(e){var t=e.id;return parseInt(t,10)}))})),this.props.setAttributes(e)}},{key:"render",value:function(){var e=this,t=this.state.selectedImage,n=this.props,r=n.attributes,a=n.isSelected,o=n.className,c=n.noticeOperations,i=n.noticeUI,l=n.setAttributes,s=r.align,d=r.columns,m=void 0===d?Me(r):d,h=r.imageFilter,f=r.images,g=r.linkTo,j=r.roundedCorners,v=Object(u.createElement)(b.DropZone,{onFilesDrop:this.addFiles}),k=Object(u.createElement)(A.BlockControls,null,!!f.length&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(b.Toolbar,null,Object(u.createElement)(A.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:Ce.a,multiple:!0,gallery:!0,value:f.map((function(e){return e.id})),render:function(e){var t=e.open;return Object(u.createElement)(Ne.a,{label:Object(p.__)("Edit Gallery","jetpack"),onClick:t})}})),Object(u.createElement)(M,{value:h,onChange:function(t){l({imageFilter:t}),e.setState({selectedImage:null})}})));if(0===f.length)return Object(u.createElement)(u.Fragment,null,k,Object(u.createElement)(A.MediaPlaceholder,{icon:Object(u.createElement)(A.BlockIcon,{icon:Kn}),className:o,labels:{title:Object(p.__)("Tiled Gallery","jetpack"),name:Object(p.__)("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:Ce.a,multiple:!0,notices:i,onError:c.createErrorNotice}));var y=Object(Te.a)(Ce.g,r.className);return Object(u.createElement)(u.Fragment,null,k,Object(u.createElement)(A.InspectorControls,null,Object(u.createElement)(b.PanelBody,{title:Object(p.__)("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(y)&&f.length>1&&Object(u.createElement)(b.RangeControl,{label:Object(p.__)("Columns","jetpack"),value:m,onChange:this.setColumnsNumber,min:1,max:Math.min(Ce.h,f.length)}),y!==Ce.c&&Object(u.createElement)(b.RangeControl,{label:Object(p.__)("Rounded corners","jetpack"),value:j,onChange:this.setRoundedCorners,min:0,max:Ce.i}),Object(u.createElement)(b.SelectControl,{label:Object(p.__)("Link To","jetpack"),value:g,onChange:this.setLinkTo,options:Pe}))),i,Object(u.createElement)(Ae,{align:s,className:o,columns:m,imageFilter:h,images:f,layoutStyle:y,linkTo:g,onMoveBackward:this.onMoveBackward,onMoveForward:this.onMoveForward,onRemoveImage:this.onRemoveImage,onSelectImage:this.onSelectImage,onResize:this.onResize,roundedCorners:j,selectedImage:a?t:null,setImageAttributes:this.setImageAttributes},v,a&&Object(u.createElement)("div",{className:"tiled-gallery__add-item"},Object(u.createElement)(b.FormFileUpload,{multiple:!0,isLarge:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},Object(p.__)("Upload an image","jetpack")))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isSelected||null===t.selectedImage?null:{selectedImage:null}}}]),t}(u.Component),Fe=Object(b.withNotices)(Ie);var Re=n(24),Le=n(17),De=n(56),ze=(n(306),n(42)),Ue=n.n(ze),Ve=n(72),qe=n.n(Ve),He=n(40);function Ge(e){var t,n=e["aria-label"],r=e.alt,a=e.height,o=e.id,c=e.link,i=e.linkTo,l=e.origUrl,s=e.url,p=e.width;if(Object(R.isBlobURL)(l))return null;switch(i){case"media":t=s;break;case"attachment":t=c}var d=Object(u.createElement)("img",{alt:r,"aria-label":n,"data-height":a,"data-id":o,"data-link":c,"data-url":l,"data-width":p,src:s});return Object(u.createElement)("figure",{className:"tiled-gallery__item"},t?Object(u.createElement)("a",{href:t},d):d)}function We(e){var t=e.children;return Object(u.createElement)("div",{className:"tiled-gallery__col"},t)}function $e(e){var t=e.children,n=e.galleryRef;return Object(u.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}function Ke(e){var t=e.children,n=e.className;return Object(u.createElement)("div",{className:I()("tiled-gallery__row",n)},t)}var Ze=n(9),Je=n.n(Ze),Ye=[{isDefault:!0,name:"rectangular"},{name:"circle"},{name:"square"},{name:"columns"}];function Qe(e,t){var n=(t-e.reduce((function(e,t){return e+t}),0))/e.length;return e.map((function(e){return e+n}))}function Xe(e,t){!function(e,t,n){var r=Je()(t,2),a=r[0],o=r[1],c=1/a*(n-4*(e.childElementCount-1)-o);!function(e,t){var n=t.rawHeight,r=t.rowWidth,a=tt(e),o=a.map((function(e){return(n-4*(e.childElementCount-1))*rt(e)[0]})),c=Qe(o,r);a.forEach((function(e,t){var r=o[t],a=c[t];!function(e,t){var n=t.colHeight,r=t.width,a=t.rawWidth,o=Qe(nt(e).map((function(e){return a/at(e)})),n);Array.from(e.children).forEach((function(e,t){var n=o[t];e.setAttribute("style","height:".concat(n,"px;width:").concat(r,"px;"))}))}(e,{colHeight:n-4*(e.childElementCount-1),width:a,rawWidth:r})}))}(e,{rawHeight:c,rowWidth:n-4*(e.childElementCount-1)})}(e,function(e){return tt(e).map(rt).reduce((function(e,t){var n=Je()(e,2),r=n[0],a=n[1],o=Je()(t,2);return[r+o[0],a+o[1]]}),[0,0])}(e),t)}function et(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function tt(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function nt(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function rt(e){var t=nt(e),n=t.length,r=1/t.map(at).reduce((function(e,t){return e+1/t}),0);return[r,r*n||1]}function at(e){var t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}function ot(e){var t=e.height,n=e.width;return t&&n?n/t:1}var ct=Ct([2,1,2],5),it=xt([St,St,At,St,St]),lt=xt([St,St,St,At,St,St,St]),st=Ct([3,1,3],5),ut=xt([At,St,St,At]),pt=Ct([1,2,1],5),dt=xt([At,St,St,St]),mt=Ct([1,3],3),bt=xt([St,St,St,At]),ht=Ct([3,1],3),ft=xt([Nt(1.6),Object(m.overEvery)(Tt(.9),Nt(2)),Object(m.overEvery)(Tt(.9),Nt(2))]),gt=Ct([1,2],3),jt=Ct([1,1,1,1,1],1),vt=Ct([1,1,1,1],1),kt=Ct([1,1,1],3),yt=xt([Object(m.overEvery)(Tt(.9),Nt(2)),Object(m.overEvery)(Tt(.9),Nt(2)),Nt(1.6)]),_t=Ct([2,1],3),Ot=xt([function(e){return e>=2}]);function wt(e,t,n){var r=Object(m.sum)(Object(m.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&kt(e)&&(r<2.5||r<5&&t.length>=3&&t[0]===t[2]||n)}function Et(e,t){var n=Object(m.sum)(Object(m.take)(t,4));return vt(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function Ct(e,t){return function(n){return!Object(m.some)(Object(m.takeRight)(n,t),(function(t){return Object(m.isEqual)(t,e)}))}}function xt(e){return function(t){return t.length>=e.length&&Object(m.every)(Object(m.zipWith)(e,t.slice(0,e.length),(function(e,t){return e(t)})))}}function St(e){return e>=1&&e<2}function At(e){return e<1}function Tt(e){return function(t){return t>=e}}function Nt(e){return function(t){return t<e}}var Pt=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=_()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(C()(n),"gallery",Object(u.createRef)()),s()(C()(n),"pendingRaf",null),s()(C()(n),"ro",null),s()(C()(n),"handleGalleryResize",(function(e){n.pendingRaf&&(cancelAnimationFrame(n.pendingRaf),n.pendingRaf=null),n.pendingRaf=requestAnimationFrame((function(){var t=!0,n=!1,r=void 0;try{for(var a,o=function(){var e=a.value,t=e.contentRect,n=e.target,r=t.width;et(n).forEach((function(e){return Xe(e,r)}))},c=e[Symbol.iterator]();!(t=(a=c.next()).done);t=!0)o()}catch(i){n=!0,r=i}finally{try{t||null==c.return||c.return()}finally{if(n)throw r}}}))})),n}return S()(t,e),k()(t,[{key:"componentDidMount",value:function(){this.observeResize()}},{key:"componentWillUnmount",value:function(){this.unobserveResize()}},{key:"componentDidUpdate",value:function(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}},{key:"triggerResize",value:function(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}},{key:"observeResize",value:function(){this.triggerResize(),this.ro=new $.a(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}},{key:"unobserveResize",value:function(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}},{key:"render",value:function(){var e=this.props,t=e.align,n=e.columns,r=e.images,a=e.layoutStyle,o=e.renderedImages,c=function(e){return Object(m.map)(e,ot)}(r),i="columns"===a?function(e,t){if(e.length<=t)return[Array(e.length).fill(1)];for(var n=Object(m.sum)(e)/t,r=[],a=e,o=0,c=function(e){var t=Object(m.takeWhile)(a,(function(t){var r=o<=(e+1)*n;return r&&(o+=t),r})).length;r.push(t),a=Object(m.drop)(a,t)},i=0;i<t-1;i++)c(i);return r.push(a.length),[r]}(c,n):function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isWide,r=function e(t,r){if(!r.length)return t;var a;a=r.length>15&&it(r)&&ct(t)?[2,1,2]:r.length>15&<(r)&&st(t)?[3,1,3]:5!==r.length&&ut(r)&&pt(t)?[1,2,1]:dt(r)&&mt(t)?[1,3]:bt(r)&&ht(t)?[3,1]:ft(r)&>(t)?[1,2]:n&&(5===r.length||10!==r.length&&r.length>6)&&jt(t)&&Object(m.sum)(Object(m.take)(r,5))<5?[1,1,1,1,1]:Et(t,r)?[1,1,1,1]:wt(t,r,n)?[1,1,1]:yt(r)&&_t(t)?[2,1]:Ot(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),c=Object(m.sum)(a);return e(o,r.slice(c))};return r([],e)}(c,{isWide:["full","wide"].includes(t)}),l=0;return Object(u.createElement)($e,{galleryRef:this.gallery},i.map((function(e,t){return Object(u.createElement)(Ke,{key:t},e.map((function(e,t){var n=o.slice(l,l+e);return l+=e,Object(u.createElement)(We,{key:t},n)})))})))}}]),t}(u.Component);function Mt(e){var t=e.columns,n=e.renderedImages,r=Math.min(20,t),a=n.length%r;return Object(u.createElement)($e,null,[].concat(f()(a?[Object(m.take)(n,a)]:[]),f()(Object(m.chunk)(Object(m.drop)(n,a),r))).map((function(e,t){return Object(u.createElement)(Ke,{key:t,className:"columns-".concat(e.length)},e.map((function(e,t){return Object(u.createElement)(We,{key:t},e)})))})))}var Bt=function(e){function t(){return j()(this,t),_()(this,w()(t).apply(this,arguments))}return S()(t,e),k()(t,[{key:"photonize",value:function(e){var t=e.height,n=e.width,r=e.url;if(r){if(Object(R.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;var a=r.split("?",1)[0],o=function(e){var t=Object(He.parse)(e).host;return/\.files\.wordpress\.com$/.test(t)}(r)?Ft:qe.a;if(It(this.props.layoutStyle)&&n&&t){var c=Math.min(2e3,n,t);return o(a,{resize:"".concat(c,",").concat(c)})}return o(a)}}},{key:"renderImage",value:function(e,t){var n=this.props,r=n.images,a=n.linkTo,o=n.selectedImage,c=Object(p.sprintf)(Object(p.__)("image %1$d of %2$d in gallery","jetpack"),t+1,r.length);return Object(u.createElement)(Ge,{alt:e.alt,"aria-label":c,height:e.height,id:e.id,origUrl:e.url,isSelected:o===t,key:t,link:e.link,linkTo:a,url:this.photonize(e),width:e.width})}},{key:"render",value:function(){var e=this.props,t=e.align,n=e.children,r=e.className,a=e.columns,o=e.images,c=e.layoutStyle,i=It(c)?Mt:Pt,l=this.props.images.map(this.renderImage,this);return Object(u.createElement)("div",{className:r},Object(u.createElement)(i,{align:t,columns:a,images:o,layoutStyle:c,renderedImages:l}),n)}}]),t}(u.Component);function It(e){return["circle","square"].includes(e)}function Ft(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object(He.parse)(e),a=(r.auth,r.hash,r.port,r.query,r.search,Ue()(r,["auth","hash","port","query","search"]));return a.query=Object.keys(t).reduce((function(e,r){return Object.assign(e,s()({},n.hasOwnProperty(r)?n[r]:r,t[r]))}),{}),Object(He.format)(a)}function Rt(e){var t=e.attributes,n=t.images;if(!n.length)return null;var r=t.align,a=t.className,o=t.columns,c=void 0===o?function(e){return Math.min(3,e.images.length)}(t):o,i=t.linkTo;return Object(u.createElement)(Bt,{align:r,className:a,columns:c,images:n,layoutStyle:Object(Te.a)(Ye,a),linkTo:i})}var Lt={align:{default:"center",type:"string"},className:{default:"is-style-".concat("rectangular"),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"}},Dt={align:["center","wide","full"],customClassName:!1,html:!1},zt=[{isDefault:!0,name:"rectangular"},{name:"circle"},{name:"square"},{name:"columns"}];function Ut(e){var t,n=e.alt,r=e.imageFilter,a=e.height,o=e.id,c=e.link,i=e.linkTo,l=e.origUrl,p=e.url,d=e.width;if(Object(R.isBlobURL)(l))return null;switch(i){case"media":t=p;break;case"attachment":t=c}var m=Object(u.createElement)("img",{alt:n,"data-height":a,"data-id":o,"data-link":c,"data-url":l,"data-width":d,src:p});return Object(u.createElement)("figure",{className:I()("tiled-gallery__item",s()({},"filter__".concat(r),!!r))},t?Object(u.createElement)("a",{href:t},m):m)}function Vt(e){var t=e.children;return Object(u.createElement)("div",{className:"tiled-gallery__col"},t)}function qt(e){var t=e.children,n=e.galleryRef;return Object(u.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}function Ht(e){var t=e.children,n=e.className;return Object(u.createElement)("div",{className:I()("tiled-gallery__row",n)},t)}function Gt(e){var t=e.height,n=e.width;return t&&n?n/t:1}var Wt=mn([2,1,2],5),$t=bn([hn,hn,fn,hn,hn]),Kt=bn([hn,hn,hn,fn,hn,hn,hn]),Zt=mn([3,1,3],5),Jt=bn([fn,hn,hn,fn]),Yt=mn([1,2,1],5),Qt=bn([fn,hn,hn,hn]),Xt=mn([1,3],3),en=bn([hn,hn,hn,fn]),tn=mn([3,1],3),nn=bn([jn(1.6),Object(m.overEvery)(gn(.9),jn(2)),Object(m.overEvery)(gn(.9),jn(2))]),rn=mn([1,2],3),an=mn([1,1,1,1,1],1),on=mn([1,1,1,1],1),cn=mn([1,1,1],3),ln=bn([Object(m.overEvery)(gn(.9),jn(2)),Object(m.overEvery)(gn(.9),jn(2)),jn(1.6)]),sn=mn([2,1],3),un=bn([function(e){return e>=2}]);function pn(e,t,n){var r=Object(m.sum)(Object(m.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&cn(e)&&(r<2.5||r<5&&t.length>=3&&t[0]===t[2]||n)}function dn(e,t){var n=Object(m.sum)(Object(m.take)(t,4));return on(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function mn(e,t){return function(n){return!Object(m.some)(Object(m.takeRight)(n,t),(function(t){return Object(m.isEqual)(t,e)}))}}function bn(e){return function(t){return t.length>=e.length&&Object(m.every)(Object(m.zipWith)(e,t.slice(0,e.length),(function(e,t){return e(t)})))}}function hn(e){return e>=1&&e<2}function fn(e){return e<1}function gn(e){return function(t){return t>=e}}function jn(e){return function(t){return t<e}}var vn=function(e){function t(){var e,n;j()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=_()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(C()(n),"gallery",Object(u.createRef)()),s()(C()(n),"pendingRaf",null),n}return S()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.align,n=e.columns,r=e.images,a=e.layoutStyle,o=e.renderedImages,c=function(e){return Object(m.map)(e,Gt)}(r),i="columns"===a?function(e,t){if(e.length<=t)return[Array(e.length).fill(1)];for(var n=Object(m.sum)(e)/t,r=[],a=e,o=0,c=function(e){var t=Object(m.takeWhile)(a,(function(t){var r=o<=(e+1)*n;return r&&(o+=t),r})).length;r.push(t),a=Object(m.drop)(a,t)},i=0;i<t-1;i++)c(i);return r.push(a.length),[r]}(c,n):function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isWide,r=function e(t,r){if(!r.length)return t;var a;a=r.length>15&&$t(r)&&Wt(t)?[2,1,2]:r.length>15&&Kt(r)&&Zt(t)?[3,1,3]:5!==r.length&&Jt(r)&&Yt(t)?[1,2,1]:Qt(r)&&Xt(t)?[1,3]:en(r)&&tn(t)?[3,1]:nn(r)&&rn(t)?[1,2]:n&&(5===r.length||10!==r.length&&r.length>6)&&an(t)&&Object(m.sum)(Object(m.take)(r,5))<5?[1,1,1,1,1]:dn(t,r)?[1,1,1,1]:pn(t,r,n)?[1,1,1]:ln(r)&&sn(t)?[2,1]:un(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),c=Object(m.sum)(a);return e(o,r.slice(c))};return r([],e)}(c,{isWide:["full","wide"].includes(t)}),l=0;return Object(u.createElement)(qt,{galleryRef:this.gallery},i.map((function(e,t){return Object(u.createElement)(Ht,{key:t},e.map((function(e,t){var n=o.slice(l,l+e);return l+=e,Object(u.createElement)(Vt,{key:t},n)})))})))}}]),t}(u.Component);function kn(e){var t=e.columns,n=e.renderedImages,r=Math.min(20,t),a=n.length%r;return Object(u.createElement)(qt,null,[].concat(f()(a?[Object(m.take)(n,a)]:[]),f()(Object(m.chunk)(Object(m.drop)(n,a),r))).map((function(e,t){return Object(u.createElement)(Ht,{key:t,className:"columns-".concat(e.length)},e.map((function(e,t){return Object(u.createElement)(Vt,{key:t},e)})))})))}function yn(e){return["circle","square"].includes(e)}function _n(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function On(e){var t=Object(He.parse)(e).host;return/\.files\.wordpress\.com$/.test(t)}function wn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object(He.parse)(e),a=(r.auth,r.hash,r.port,r.query,r.search,Ue()(r,["auth","hash","port","query","search"]));return a.query=Object.keys(t).reduce((function(e,r){return Object.assign(e,s()({},n.hasOwnProperty(r)?n[r]:r,t[r]))}),{}),Object(He.format)(a)}var En=function(e){function t(){return j()(this,t),_()(this,w()(t).apply(this,arguments))}return S()(t,e),k()(t,[{key:"renderImage",value:function(e,t){var n=this.props,r=n.columns,a=n.imageFilter,o=n.images,c=n.linkTo,i=n.layoutStyle,l=n.selectedImage,s=Object(p.sprintf)(Object(p.__)("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if(Object(R.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};var n,r=e.url.split("?",1)[0],a=e.height,o=e.width,c=t.layoutStyle,i=On(r)||!0===_n()?wn:qe.a;if(yn(c)&&o&&a){var l=Math.min(2e3,o,a);n=i(r,{resize:"".concat(l,",").concat(l)})}else n=i(r);var s,u=300,p=600;if(yn(c)){var d=Math.min(p,o,a),b=Math.min(2e3,o,a);s=Object(m.range)(d,b,u).map((function(e){var t=i(r,{resize:"".concat(e,",").concat(e),strip:"info"});return t?"".concat(t," ").concat(e,"w"):null})).filter(Boolean).join(",")}else{var h=Math.min(p,o),f=Math.min(2e3,o);s=Object(m.range)(h,f,u).map((function(e){var t=i(r,{strip:"info",width:e});return t?"".concat(t," ").concat(e,"w"):null})).filter(Boolean).join(",")}return Object.assign({src:n},s&&{srcSet:s})}(e,{layoutStyle:i}),b=d.src,h=d.srcSet;return Object(u.createElement)(Ut,{alt:e.alt,"aria-label":s,columns:r,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:l===t,key:t,link:e.link,linkTo:c,origUrl:e.url,showMovers:o.length>1,srcSet:h,url:b,width:e.width})}},{key:"render",value:function(){var e=this.props,t=e.align,n=e.children,r=e.className,a=e.columns,o=e.images,c=e.layoutStyle,i=e.roundedCorners,l=yn(c)?kn:vn,p=this.props.images.map(this.renderImage,this),d="circle"!==c?Math.min(i,20):0;return Object(u.createElement)("div",{className:I()(r,s()({},"has-rounded-corners-".concat(d),d>0))},Object(u.createElement)(l,{align:t,columns:a,images:o,layoutStyle:c,renderedImages:p}),n)}}]),t}(u.Component);function Cn(e){var t=e.attributes,n=t.imageFilter,r=t.images;if(!r.length)return null;var a=t.align,o=t.className,c=t.columns,i=void 0===c?function(e){return Math.min(3,e.images.length)}(t):c,l=t.linkTo,s=t.roundedCorners;return Object(u.createElement)(En,{align:a,className:o,columns:i,imageFilter:n,images:r,isSave:!0,layoutStyle:Object(Te.a)(zt,o),linkTo:l,roundedCorners:s})}var xn,Sn={align:{default:"center",type:"string"},className:{default:"is-style-".concat("rectangular"),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}},An={align:["center","wide","full"],customClassName:!1,html:!1},Tn=[r,a],Nn=n(156),Pn=n.n(Nn),Mn=n(157),Bn=n.n(Mn),In=n(158),Fn=n.n(In),Rn=n(159),Ln=n.n(Rn),Dn=n(160),zn=n.n(Dn),Un=n(161),Vn=n.n(Un),qn=(xn={},s()(xn,Ce.e,Object(p._x)("Tiled mosaic","Tiled gallery layout","jetpack")),s()(xn,Ce.c,Object(p._x)("Circles","Tiled gallery layout","jetpack")),s()(xn,Ce.d,Object(p._x)("Tiled columns","Tiled gallery layout","jetpack")),s()(xn,Ce.f,Object(p._x)("Square tiles","Tiled gallery layout","jetpack")),xn),Hn=Ce.g.map((function(e){return i()({},e,{label:qn[e.name]})}));function Gn(e){return Object(m.filter)(e,(function(e){var t=e.id,n=e.url;return t&&n}))}var Wn={align:{default:"center",type:"string"},className:{default:"is-style-".concat(Ce.e),type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},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}},$n={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:Pn.a,width:160,height:95},{alt:"",link:"",url:Bn.a,width:160,height:107},{alt:"",link:"",url:Fn.a,width:304,height:203},{alt:"",link:"",url:Ln.a,width:312,height:207},{alt:"",link:"",url:zn.a,width:152,height:101},{alt:"",link:"",url:Vn.a,width:152,height:105}],linkTo:"none"},Kn=Object(u.createElement)(b.SVG,{viewBox:"0 0 24 24",width:24,height:24},Object(u.createElement)(b.Path,{fill:"currentColor",d:"M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z"})),Zn={attributes:Wn,category:Object(De.a)("media","layout"),description:Object(p.__)("Display multiple images in an elegantly organized tiled layout.","jetpack")+(Object(Re.b)()?"":" "+Object(p.__)("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:{src:Kn,foreground:Object(Le.a)()},keywords:[Object(p._x)("columns","block search term","jetpack"),Object(p._x)("images","block search term","jetpack"),Object(p._x)("photos","block search term","jetpack"),Object(p._x)("pictures","block search term","jetpack"),Object(p._x)("square","block search term","jetpack"),Object(p._x)("circle","block search term","jetpack"),Object(p._x)("mosaic","block search term","jetpack")],styles:Hn,supports:{align:["center","wide","full"],customClassName:!1,html:!1},title:Object(p.__)("Tiled Gallery","jetpack"),transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:function(e){return Gn(e).length>0},transform:function(e){var t=Gn(e);return Object(d.createBlock)("jetpack/".concat("tiled-gallery"),{images:t.map((function(e){return{id:e.id,url:e.url,alt:e.alt}})),ids:t.map((function(e){return e.id}))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:function(e){var t=Gn(e.images);return t.length>0?Object(d.createBlock)("jetpack/".concat("tiled-gallery"),{images:t.map((function(e){return{id:e.id,url:e.url,alt:e.alt}})),ids:t.map((function(e){return e.id}))}):Object(d.createBlock)("jetpack/".concat("tiled-gallery"))}}],to:[{type:"block",blocks:["core/gallery"],transform:function(e){var t=e.images,n=e.ids,r=e.columns,a=e.linkTo;return Object(d.createBlock)("core/gallery",{images:t,ids:n,columns:r,imageCrop:!0,linkTo:a})}},{type:"block",blocks:["core/image"],transform:function(e){var t=e.align,n=e.images;return n.length>0?n.map((function(e){var n=e.id,r=e.url,a=e.alt;return Object(d.createBlock)("core/image",{align:t,id:n,url:r,alt:a})})):Object(d.createBlock)("core/image")}}]},edit:Fe,save:function(e){var t=e.attributes,n=t.imageFilter,r=t.images;if(!r.length)return null;var a=t.align,o=t.className,c=t.columns,i=void 0===c?Me(t):c,l=t.linkTo,s=t.roundedCorners,p=t.columnWidths;return Object(u.createElement)(Ae,{align:a,className:o,columns:i,imageFilter:n,images:r,isSave:!0,layoutStyle:Object(Te.a)(Ce.g,o),linkTo:l,roundedCorners:s,columnWidths:p})},deprecated:Tn,example:{attributes:$n}};Object(o.a)("tiled-gallery",Zn)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(7),o=n.n(a),c=n(0),i=n(1),l=n(11),s=n(2),u=n(5),p=(n(217),n(9)),d=n.n(p),m=n(4),b=n(8),h=n.n(b),f=n(60),g=n.n(f),j=n(18),v=n(10),k=n(25),y=n(49),_=n(24),O=n(26),w=n(17),E=Object(m.compact)([{name:"contact-form",title:Object(i.__)("Contact Form","jetpack"),description:Object(i.__)("Add a contact form to your page.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:Object(i.__)("Contact Us","jetpack"),element:"button"}]]},!Object(_.b)()&&{name:"newsletter-form",title:Object(i.__)("Newsletter Sign-up","jetpack"),description:Object(i.__)("A simple way to collect information from folks visiting your site.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:Object(i.__)("Subscribe","jetpack"),element:"button"}]]},{name:"rsvp-form",title:Object(i.__)("RSVP Form","jetpack"),description:Object(i.__)("Add an RSVP form to your page","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:Object(i.__)("Attending?","jetpack"),required:!0,options:[Object(i.__)("Yes","jetpack"),Object(i.__)("No","jetpack")]}],["jetpack/field-textarea",{label:Object(i.__)("Other Details","jetpack")}],["jetpack/button",{text:Object(i.__)("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:Object(i.__)("A new RSVP from your website","jetpack")}},{name:"registration-form",title:Object(i.__)("Registration Form","jetpack"),description:Object(i.__)("Add a Registration form to your page","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:Object(i.__)("Phone Number","jetpack")}],["jetpack/field-select",{label:Object(i.__)("How did you hear about us?","jetpack"),options:[Object(i.__)("Search Engine","jetpack"),Object(i.__)("Social Media","jetpack"),Object(i.__)("TV","jetpack"),Object(i.__)("Radio","jetpack"),Object(i.__)("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:Object(i.__)("Other Details","jetpack")}],["jetpack/button",{text:Object(i.__)("Send","jetpack"),element:"button"}]],attributes:{subject:Object(i.__)("A new registration from your website","jetpack")}},{name:"appointment-form",title:Object(i.__)("Appointment Form","jetpack"),description:Object(i.__)("Add an Appointment booking form to your page","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:Object(i.__)("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:Object(i.__)("Time","jetpack"),required:!0,options:[Object(i.__)("Morning","jetpack"),Object(i.__)("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:Object(i.__)("Notes","jetpack")}],["jetpack/button",{text:Object(i.__)("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:Object(i.__)("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:Object(i.__)("Feedback Form","jetpack"),description:Object(i.__)("Add a Feedback form to your page","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:Object(i.__)("Please rate our website","jetpack"),required:!0,options:[Object(i.__)("1 - Very Bad","jetpack"),Object(i.__)("2 - Poor","jetpack"),Object(i.__)("3 - Average","jetpack"),Object(i.__)("4 - Good","jetpack"),Object(i.__)("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:Object(i.__)("How could we improve?","jetpack")}],["jetpack/button",{text:Object(i.__)("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:Object(i.__)("New feedback received from your website","jetpack")}}]),C=n(22),x=n.n(C),S=n(79),A=n.n(S),T=function(e){var t=e.error;return Object(c.createElement)(s.Notice,{isDismissible:!1,status:"error"},Object(c.createInterpolateElement)(Object(i.__)('The CRM Jetpack Form extension failed to activate. The error message was "<error />".',"jetpack"),{error:Object(c.createElement)("span",null,t)}))},N=function(e){var t=e.isActivatingExt,n=e.setIsActivatingExt,r=e.extActivationError,a=function(e,t,n,r){return function(){t(void 0),e(!0),x()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((function(e){if("success"!==e.code)throw new Error(e.code);var t=Object.assign({},n);t.jp_form_ext_enabled=!0,r(t)})).catch((function(e){t(e.message)})).finally((function(){e(!1)}))}}(n,e.setExtActivationError,e.crmData,e.setCRMData);return t?Object(c.createElement)(s.Spinner,null):r?Object(c.createElement)(T,{error:r}):Object(c.createElement)(s.Button,{isSecondary:!0,onClick:a},Object(i.__)("Enable Jetpack Forms Extension","jetpack"))},P=function(){return Object(c.createElement)("p",{className:"jetpack-contact-form__crm_text"},Object(i.__)("A site administrator must enable the CRM Jetpack Forms extension.","jetpack"))},M=function(){return Object(c.createElement)("p",{className:"jetpack-contact-form__crm_text"},Object(i.__)("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"))},B=function(e){var t=e.isActivatingExt,n=e.setIsActivatingExt,r=e.extActivationError,a=e.setExtActivationError,o=e.crmData,i=e.setCRMData;return o.can_activate_extension?Object(c.createElement)("div",null,Object(c.createElement)(M,null),Object(c.createElement)("br",null),Object(c.createElement)(N,{isActivatingExt:t,setIsActivatingExt:n,extActivationError:r,setExtActivationError:a,crmData:o,setCRMData:i})):Object(c.createElement)(P,null)},I=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),F=function(){return Object(c.createElement)("p",{className:"jetpack-contact-form__crm_text"},Object(i.__)("The Jetpack CRM is installed but has an invalid version.","jetpack"))},R=function(){return Object(c.createElement)("p",{className:"jetpack-contact-form__crm_text"},Object(i.__)("The Zero BS CRM plugin is now Jetpack CRM. Update to the latest version to integrate your contact form with your CRM.","jetpack"))},L=function(){return Object(c.createElement)("p",{className:"jetpack-contact-form__crm_text"},Object(c.createInterpolateElement)(Object(i.__)("You can save contacts from Jetpack contact forms in Jetpack CRM. Learn more at <a>jetpackcrm.com</a>","jetpack"),{a:Object(c.createElement)(s.ExternalLink,{href:"https://jetpackcrm.com"})}))},D=function(){return Object(c.createElement)("p",{className:"jetpack-contact-form__crm_text"},Object(i.__)("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"))},z=function(e){var t=e.crmData,n=e.setCRMData,r=e.jetpackCRM,a=e.setAttributes,o=Object(c.useState)(!1),l=d()(o,2),u=l[0],p=l[1],m=Object(c.useState)(!1),b=d()(m,2),h=b[0],f=b[1];return t.jp_form_ext_enabled?A.a.satisfies(A.a.coerce(t.crm_version),"3.0.19 - 4.0.0")?Object(c.createElement)("p",{className:"jetpack-contact-form__crm_text"},Object(i.__)("Contacts from this form will be stored in Jetpack CRM.","jetpack")):Object(c.createElement)(s.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:Object(i.__)("Jetpack CRM","jetpack"),checked:r,onChange:function(e){return a({jetpackCRM:e})},help:Object(i.__)("Store contact form submissions in your CRM.","jetpack")}):Object(c.createElement)(B,{isActivatingExt:u,setIsActivatingExt:p,extActivationError:h,setExtActivationError:f,crmData:t,setCRMData:n})},U=function(e){var t=e.crmData,n=e.setCRMData,r=e.jetpackCRM,a=e.setAttributes,o=A.a.coerce(t.crm_version);if(t.crm_installed&&!o)return Object(c.createElement)(F,null);if(t.crm_installed&&A.a.lt(o,"3.0.19"))return Object(c.createElement)(R,null);var i=I.NOT_INSTALLED;return t.crm_active?i=I.ACTIVE:t.crm_installed&&(i=I.INSTALLED),Object(c.createElement)("div",{"aria-live":"polite"},I.ACTIVE===i&&Object(c.createElement)(z,{crmData:t,setCRMData:n,jetpackCRM:r,setAttributes:a}),I.INSTALLED===i&&Object(c.createElement)(D,null),I.NOT_INSTALLED===i&&Object(c.createElement)(L,null))},V=function(e){var t=e.isFetchingCRMData,n=e.hasCRMDataError,r=e.crmData,a=e.setCRMData,o=e.jetpackCRM,i=e.setAttributes;return t?Object(c.createElement)(s.Spinner,null):n?null:Object(c.createElement)(U,{crmData:r,setCRMData:a,jetpackCRM:o,setAttributes:i})},q=function(e){var t=e.jetpackCRM,n=e.setAttributes,r=Object(c.useState)(!0),a=d()(r,2),o=a[0],l=a[1],u=Object(c.useState)(!1),p=d()(u,2),m=p[0],b=p[1],h=Object(c.useState)(),f=d()(h,2),g=f[0],j=f[1];return Object(c.useEffect)((function(){x()({path:"/jetpack/v4/jetpack_crm"}).then((function(e){if(e.error)throw e.message;b(!1),j(e)})).catch((function(){return b(!0)})).finally((function(){return l(!1)}))}),[]),Object(c.createElement)(s.PanelBody,{title:Object(i.__)("CRM Integration","jetpack"),initialOpen:!1},Object(c.createElement)(s.BaseControl,null,Object(c.createElement)(V,{isFetchingCRMData:o,hasCRMDataError:m,crmData:g,setCRMData:j,jetpackCRM:t,setAttributes:n})))},H=n(27),G=n.n(H),W=function(){var e,t,n=(e=Object(v.useSelect)((function(e){return e("core/block-editor").getSelectedBlock()}),[]),t=Object(v.useDispatch)("core/block-editor").insertBlock,{insertConsentBlock:Object(c.useCallback)(G()(regeneratorRuntime.mark((function n(){var r,a,o,c;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return-1===(a=(null!==(r=e.innerBlocks)&&void 0!==r?r:[]).findIndex((function(e){return"jetpack/button"===e.name})))&&(a=(null!==(o=e.innerBlocks)&&void 0!==o?o:[]).length),n.next=4,Object(l.createBlock)("jetpack/field-consent");case 4:return c=n.sent,n.next=7,t(c,a,e.clientId,!1);case 7:case"end":return n.stop()}}),n)}))),[t,e.clientId,e.innerBlocks])}).insertConsentBlock;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,Object(i.__)("Youโre already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),Object(c.createElement)(s.Button,{isSecondary:!0,onClick:n,style:{marginBottom:"1em"}},Object(i.__)("Add email permission request","jetpack")),Object(c.createElement)("br",null))},$=function(){var e=Object(v.useSelect)((function(e){return e("core/block-editor").getSelectedBlock()}),[]);return Object(c.useMemo)((function(){return t=e.innerBlocks,n=t.some((function(e){return"jetpack/field-email"===e.name})),r=t.some((function(e){return"jetpack/field-consent"===e.name})),!!n&&!r;var t,n,r}),[e.innerBlocks])?Object(c.createElement)(W,null):null};function K(){return(K=G()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(_.b)()){e.next=2;break}return e.abrupt("return",Promise.reject());case 2:return e.prev=2,e.next=5,x()({path:"/jetpack/v4/plugins"});case 5:return t=e.sent,e.abrupt("return",t);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0.message));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function Z(e){return J.apply(this,arguments)}function J(){return(J=G()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(_.b)()){e.next=2;break}return e.abrupt("return",Promise.reject());case 2:return e.prev=2,e.next=5,x()({path:"/jetpack/v4/plugins",method:"POST",data:{slug:t,status:"active",source:"block-editor"}});case 5:return n=e.sent,e.abrupt("return",n);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0.message));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function Y(e){return Q.apply(this,arguments)}function Q(){return(Q=G()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(_.b)()){e.next=2;break}return e.abrupt("return",Promise.reject());case 2:return e.prev=2,e.next=5,x()({path:"/jetpack/v4/plugins/".concat(t),method:"POST",data:{status:"active",source:"block-editor"}});case 5:return n=e.sent,e.abrupt("return",n);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0.message));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}var X=function(e){var t=e.error;return Object(c.createElement)(s.Notice,{isDismissible:!1,status:"error"},Object(c.createInterpolateElement)(Object(i.__)("The plugin failed to install. <b /> Please check the <a>plugin information</a> for detailed requirements.","jetpack"),{a:Object(c.createElement)(s.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:Object(c.createElement)("span",null,t)}))},ee=n(51),te=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),ne=function(e){var t=e.isActivating?Object(i.__)("Activatingโฆ","jetpack"):Object(i.__)("Installingโฆ","jetpack");return Object(c.createElement)(s.Button,{isSecondary:!0,icon:Object(c.createElement)(s.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":t},t)},re=function(e){var t=e.installAndActivateCreativeMailPlugin,n=e.isInstalling;return Object(c.createElement)("p",null,Object(c.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},Object(i.__)("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),Object(c.createElement)("br",null),n&&Object(c.createElement)(ne,null),!n&&Object(c.createElement)(s.Button,{isSecondary:!0,onClick:t},Object(i.__)("Install Creative Mail plugin","jetpack"))))},ae=function(e){var t=e.activateCreativeMailPlugin,n=e.isInstalling;return Object(c.createElement)("p",null,Object(c.createElement)("em",null,Object(i.__)("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),Object(c.createElement)("br",null),n&&Object(c.createElement)(ne,{isActivating:!0}),!n&&Object(c.createElement)(s.Button,{isSecondary:!0,onClick:t},Object(i.__)("Activate Creative Mail Plugin","jetpack")))},oe=function(){return Object(c.createElement)("p",null,Object(c.createElement)("em",null,Object(i.__)("Youโre all setup for email marketing with Creative Mail.","jetpack"),Object(c.createElement)("br",null),Object(c.createElement)(s.ExternalLink,{href:(e=Object(m.get)(Object(ee.a)(),"adminUrl",!1),"".concat(e,"admin.php?page=creativemail"))},Object(i.__)("Open Creative Mail settings","jetpack"))));var e},ce=function(e){var t=e.pluginState,n=e.onCreativeMailPluginClick,r=e.isInstalling;return Object(c.createElement)("div",{"aria-live":"polite"},te.ACTIVE===t&&Object(c.createElement)(oe,null),te.INSTALLED===t&&Object(c.createElement)(ae,{activateCreativeMailPlugin:function(){return n(Y,"creative-mail-by-constant-contact/creative-mail-plugin")},isInstalling:r}),te.NOT_INSTALLED===t&&Object(c.createElement)(re,{installAndActivateCreativeMailPlugin:function(){return n(Z,"creative-mail-by-constant-contact")},isInstalling:r}))},ie="".concat("creative-mail-by-constant-contact/creative-mail-plugin",".php"),le=function(e){var t=e.pluginState,n=e.setPluginState,r=Object(c.useState)(),a=d()(r,2),o=a[0],i=a[1],l=Object(c.useState)(!1),s=d()(l,2),u=s[0],p=function(e,t,n){return Object(c.useCallback)((function(r,a){e(void 0),t(!0),r(a).then((function(){n(te.ACTIVE)})).catch((function(t){e(t)})).finally((function(){return t(!1)}))}),[t,e,n])}(i,s[1],n);return o?Object(c.createElement)(X,{error:o}):Object(c.createElement)(ce,{pluginState:t,onCreativeMailPluginClick:p,isInstalling:u})},se=function(e){var t=e.isFetchingPlugins,n=e.hasError,r=e.pluginState,a=e.setPluginState;return t?Object(c.createElement)(s.Spinner,null):n?null:Object(c.createElement)(le,{pluginState:r,setPluginState:a})},ue=function(){var e=Object(c.useState)(!0),t=d()(e,2),n=t[0],r=t[1],a=Object(c.useState)(!1),o=d()(a,2),i=o[0],l=o[1],s=Object(c.useState)(te.NOT_INSTALLED),u=d()(s,2),p=u[0],b=u[1];return Object(c.useEffect)((function(){(function(){return K.apply(this,arguments)})().then((function(e){l(!1),Object(m.get)(e,ie)&&(Object(m.get)(e,[ie,"active"])?b(te.ACTIVE):b(te.INSTALLED))})).catch((function(){return l(!0)})).finally((function(){return r(!1)}))}),[b,r,l]),Object(c.createElement)(se,{isFetchingPlugins:n,hasError:i,pluginState:p,setPluginState:b})},pe=function(){return Object(c.createElement)(s.PanelBody,{title:Object(i.__)("Newsletter Integration","jetpack"),initialOpen:!1},Object(c.createElement)(s.BaseControl,null,Object(c.createElement)($,null),Object(c.createElement)(ue,null)))},de=["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"];var me=Object(j.compose)([Object(v.withSelect)((function(e,t){var n=e("core/blocks"),r=n.getBlockType,a=n.getBlockVariations,o=n.getDefaultBlockVariation,c=e("core/block-editor").getBlocks,i=e("core/editor").getEditedPostAttribute,l=e("core"),s=l.getSite,u=l.getUser,p=c(t.clientId),d=i("author"),b=d&&u(d)&&u(d).email,h=i("title");return{blockType:r&&r(t.name),defaultVariation:o&&o(t.name,"block"),variations:a&&a(t.name,"block"),innerBlocks:p,hasInnerBlocks:p.length>0,siteTitle:Object(m.get)(s&&s(),["title"]),postTitle:h,postAuthorEmail:b}})),Object(v.withDispatch)((function(e){var t=e("core/block-editor");return{replaceInnerBlocks:t.replaceInnerBlocks,selectBlock:t.selectBlock}})),j.withInstanceId])((function(e){var t=e.attributes,n=e.setAttributes,r=e.siteTitle,a=e.postTitle,o=e.postAuthorEmail,p=e.hasInnerBlocks,b=e.replaceInnerBlocks,f=e.selectBlock,j=e.clientId,v=e.instanceId,O=e.className,w=e.blockType,C=e.variations,x=e.defaultVariation,S=t.to,A=t.subject,T=t.customThankyou,N=t.customThankyouMessage,P=t.customThankyouRedirect,M=t.jetpackCRM,B=Object(c.useState)(!1),I=d()(B,2),F=I[0],R=I[1],L=h()(O,"jetpack-contact-form"),D=function(e){e.attributes&&n(e.attributes),e.innerBlocks&&b(j,function e(t){return Object(m.map)(t,(function(t){var n=d()(t,3),r=n[0],a=n[1],o=n[2],c=void 0===o?[]:o;return Object(l.createBlock)(r,a,e(c))}))}(e.innerBlocks)),f(j)};Object(c.useEffect)((function(){p||l.registerBlockVariation||D(E[0])}));var z=function(e){return 0!==(e=e.trim()).length&&(!g.a.validate(e)&&{email:e})},U=function(e){if(0===e.target.value.length)return R(!1),void n({to:o});var t=e.target.value.split(",").map(z).filter(Boolean);t&&t.length&&R(t)},V=function(e){R(!1),n({to:e.trim()})},H=function(){var e=void 0!==S?S:"";void 0===S&&o&&n({to:e=o});var t=void 0!==A?A:"";return void 0===A&&void 0!==r&&void 0!==a&&n({subject:t="["+r+"] "+a}),Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.TextControl,{"aria-describedby":"contact-form-".concat(v,"-email-").concat(F&&F.length>0?"error":"help"),label:Object(i.__)("Email address to send to","jetpack"),placeholder:Object(i.__)("name@example.com","jetpack"),onKeyDown:function(e){"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:U,onChange:V,help:Object(i.__)("You can enter multiple email addresses separated by commas.","jetpack")}),Object(c.createElement)(y.a,{isError:!0,id:"contact-form-".concat(v,"-email-error")},function(){if(F){if(1===F.length)return F[0]&&F[0].email?Object(i.sprintf)(Object(i.__)("%s is not a valid email address.","jetpack"),F[0].email):F[0];if(2===F.length)return Object(i.sprintf)(Object(i.__)("%1$s and %2$s are not a valid email address.","jetpack"),F[0].email,F[1].email);var e=F.map((function(e){return e.email}));return Object(i.sprintf)(Object(i.__)("%s are not a valid email address.","jetpack"),e.join(", "))}return null}()),Object(c.createElement)(s.TextControl,{label:Object(i.__)("Email subject line","jetpack"),value:t,placeholder:Object(i.__)("Enter a subject","jetpack"),onChange:function(e){return n({subject:e})},help:Object(i.__)("Choose a subject line that you recognize as an email from your website.","jetpack")}),Object(c.createElement)(s.SelectControl,{label:Object(i.__)("On Submission","jetpack"),value:T,options:[{label:Object(i.__)("Show a summary of submitted fields","jetpack"),value:""},{label:Object(i.__)("Show a custom text message","jetpack"),value:"message"},{label:Object(i.__)("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:function(e){return n({customThankyou:e})}}),"message"===T&&Object(c.createElement)(s.TextareaControl,{label:Object(i.__)("Message Text","jetpack"),value:N,placeholder:Object(i.__)("Thank you for your submission!","jetpack"),onChange:function(e){return n({customThankyouMessage:e})}}),"redirect"===T&&Object(c.createElement)(s.BaseControl,{label:Object(i.__)("Redirect Address","jetpack"),id:"contact-form-".concat(v,"-thankyou-url")},Object(c.createElement)(u.URLInput,{id:"contact-form-".concat(v,"-thankyou-url"),value:P,className:"jetpack-contact-form__thankyou-redirect-url",onChange:function(e){return n({customThankyouRedirect:e})}})))};return!p&&l.registerBlockVariation?Object(c.createElement)("div",{className:L},Object(c.createElement)(u.__experimentalBlockVariationPicker,{icon:Object(m.get)(w,["icon","src"]),label:Object(m.get)(w,["title"]),instructions:Object(i.__)("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:C,allowSkip:!0,onSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;D(e)}})):Object(c.createElement)(c.Fragment,null,s.ToolbarGroup&&Object(c.createElement)(u.BlockControls,null,Object(c.createElement)(s.ToolbarGroup,null,Object(c.createElement)(s.Dropdown,{position:"bottom right",className:"jetpack-contact-form-settings-selector",contentClassName:"jetpack-contact-form__popover",renderToggle:function(e){return function(e,t){return Object(c.createElement)(s.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:Object(i.__)("Edit Form Settings","jetpack"),onClick:t,onKeyDown:function(n){e||n.keyCode!==k.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:Object(c.createElement)(s.Icon,{icon:"edit"})})}(e.isOpen,e.onToggle)},renderContent:function(){return H()}}))),Object(c.createElement)(u.InspectorControls,null,Object(c.createElement)(s.PanelBody,{title:Object(i.__)("Form Settings","jetpack")},H()),!Object(_.b)()&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(q,{jetpackCRM:M,setAttributes:n}),Object(c.createElement)(pe,null))),Object(c.createElement)("div",{className:L},Object(c.createElement)(u.InnerBlocks,{allowedBlocks:de,templateInsertUpdatesSelection:!1})))})),be={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}},he=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],fe=[{attributes:o()({submit_button_text:{type:"string",default:Object(i.__)("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:Object(i.__)("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},be),migrate:function(e,t){var n=Object(m.omit)(e,he),r={text:e.submitButtonText||e.submit_button_text||Object(i.__)("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[n,t.concat(Object(l.createBlock)("jetpack/button",o()({element:"button"},r)))]},isEligible:function(e){return!(!e.has_form_settings_set&&!e.hasFormSettingsSet)},save:u.InnerBlocks.Content}],ge=n(23),je=n.n(ge),ve=n(30),ke=n(46);function ye(e){var t=e.setAttributes,n=e.width;return Object(c.createElement)(s.BaseControl,{label:Object(i.__)("Field Width","jetpack"),help:Object(i.__)("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},Object(c.createElement)(s.ButtonGroup,{"aria-label":Object(i.__)("Field Width","jetpack")},[25,50,75,100].map((function(e){return Object(c.createElement)(s.Button,{key:e,isSmall:!0,isPrimary:e===n,onClick:function(){return t({width:e})}},e,"%")}))))}function _e(e){var t=e.setAttributes,n=e.id;return Object(c.createElement)(s.TextControl,{label:Object(i.__)("Unique CSS ID","jetpack"),value:n,onChange:function(e){return t({id:e})},help:Object(i.__)("A unique ID that can be used in CSS or as an anchor.","jetpack")})}var Oe=function(e){var t=e.setAttributes,n=e.width,r=e.id,a=e.required;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.BlockControls,null,Object(c.createElement)(s.Toolbar,null,Object(c.createElement)(s.ToolbarButton,{title:Object(i.__)("Required","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{d:"M8.23118 8L16 16M8 16L15.7688 8 M6.5054 11.893L17.6567 11.9415M12.0585 17.6563L12 6.5",stroke:"currentColor"})),onClick:function(){t({required:!a})},className:a?"is-pressed":void 0}))),Object(c.createElement)(u.InspectorControls,null,Object(c.createElement)(s.PanelBody,{title:Object(i.__)("Field Settings","jetpack")},Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Field is required","jetpack"),className:"jetpack-field-label__required",checked:a,onChange:function(e){return t({required:e})},help:Object(i.__)("Does this field have to be completed for the form to be submitted?","jetpack")}),Object(c.createElement)(ye,{setAttributes:t,width:n}))),Object(c.createElement)(u.InspectorAdvancedControls,null,Object(c.createElement)(_e,{setAttributes:t,id:r})))};function we(e){var t=e.id,n=e.type,r=e.required,a=e.label,o=e.setAttributes,l=e.placeholder,u=e.width;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"jetpack-field"},Object(c.createElement)(ke.a,{required:r,label:a,setAttributes:o}),Object(c.createElement)(s.Disabled,null,Object(c.createElement)(s.TextControl,{type:n,placeholder:l,value:l,onChange:function(e){return o({placeholder:e})},title:Object(i.__)("Set the placeholder text","jetpack")}))),Object(c.createElement)(Oe,{id:t,required:r,width:u,setAttributes:o}))}var Ee=Object(j.createHigherOrderComponent)((function(e){return function(t){if(t.name.indexOf("jetpack/field")>-1){var n=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return Object(c.createElement)(e,je()({},t,{className:n}))}return Object(c.createElement)(e,t)}}),"withCustomClassName");function Ce(e){var t=e.id,n=e.required,r=e.label,a=e.setAttributes,o=e.placeholder,l=e.width;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"jetpack-field"},Object(c.createElement)(ke.a,{required:n,label:r,setAttributes:a}),Object(c.createElement)(s.Disabled,null,Object(c.createElement)(s.TextareaControl,{placeholder:o,value:o,onChange:function(e){return a({placeholder:e})},title:Object(i.__)("Set the placeholder text","jetpack")}))),Object(c.createElement)(Oe,{id:t,required:n,setAttributes:a,width:l}))}Object(ve.addFilter)("editor.BlockListBlock","jetpack/contact-form",Ee);var xe=Object(j.withInstanceId)((function(e){var t=e.id,n=e.instanceId,r=e.required,a=e.label,o=e.setAttributes,l=e.width,p=e.defaultValue;return Object(c.createElement)(s.BaseControl,{id:"jetpack-field-checkbox-".concat(n),className:"jetpack-field jetpack-field-checkbox",label:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:p}),Object(c.createElement)(ke.a,{required:r,label:a,setAttributes:o}),Object(c.createElement)(Oe,{id:t,required:r,width:l,setAttributes:o}),Object(c.createElement)(u.InspectorControls,null,Object(c.createElement)(s.PanelBody,{title:Object(i.__)("Checkbox Settings","jetpack")},Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Checked by default","jetpack"),checked:p,onChange:function(e){return o({defaultValue:e?"true":""})}}))))})})),Se=n(12),Ae=n.n(Se),Te=n(16),Ne=n.n(Te),Pe=n(13),Me=n.n(Pe),Be=n(14),Ie=n.n(Be),Fe=n(6),Re=n.n(Fe),Le=n(15),De=n.n(Le),ze=function(e){function t(){var e,n;Ae()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(n=Me()(this,(e=Ie()(t)).call.apply(e,[this].concat(a)))).onChangeOption=n.onChangeOption.bind(Re()(n)),n.onKeyPress=n.onKeyPress.bind(Re()(n)),n.onDeleteOption=n.onDeleteOption.bind(Re()(n)),n.textInput=Object(c.createRef)(),n}return De()(t,e),Ne()(t,[{key:"componentDidMount",value:function(){this.props.isInFocus&&this.textInput.current.focus()}},{key:"componentDidUpdate",value:function(){this.props.isInFocus&&this.textInput.current.focus()}},{key:"onChangeOption",value:function(e){this.props.onChangeOption(this.props.index,e.target.value)}},{key:"onKeyPress",value:function(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}},{key:"onDeleteOption",value:function(){this.props.onChangeOption(this.props.index)}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.option,r=e.type;return Object(c.createElement)("li",{className:"jetpack-option"},r&&"select"!==r&&Object(c.createElement)("input",{className:"jetpack-option__type",type:r,disabled:!0}),Object(c.createElement)("input",{type:"text",className:"jetpack-option__input",value:n,placeholder:Object(i.__)("Write optionโฆ","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),t&&Object(c.createElement)(s.IconButton,{className:"jetpack-option__remove",icon:"trash",label:Object(i.__)("Remove option","jetpack"),onClick:this.onDeleteOption}))}}]),t}(c.Component);var Ue=Object(j.withInstanceId)((function(e){var t=e.id,n=e.type,r=e.instanceId,a=e.required,o=e.label,l=e.setAttributes,u=e.isSelected,p=e.width,m=e.options,b=Object(c.useState)(null),h=d()(b,2),f=h[0],g=h[1],j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=m.slice(0);null===t?(n.splice(e,1),e>0&&g(e-1)):(n.splice(e,1,t),g(e)),l({options:n})},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=m.slice(0),n=0;"object"==typeof e?(t.push(""),n=t.length-1):(t.splice(e+1,0,""),n=e+1),g(n),l({options:t})};return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.BaseControl,{id:"jetpack-field-multiple-".concat(r),className:"jetpack-field jetpack-field-multiple",label:Object(c.createElement)(ke.a,{required:a,label:o,setAttributes:l,isSelected:u,resetFocus:function(){return g(null)}})},Object(c.createElement)("ol",{className:"jetpack-field-multiple__list",id:"jetpack-field-multiple-".concat(r)},m.map((function(e,t){return Object(c.createElement)(ze,{type:n,key:t,option:e,index:t,onChangeOption:j,onAddOption:v,isInFocus:t===f&&u,isSelected:u})}))),u&&Object(c.createElement)(s.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:Object(i.__)("Insert option","jetpack"),onClick:v},Object(i.__)("Add option","jetpack"))),Object(c.createElement)(Oe,{id:t,required:a,setAttributes:l,width:p}))})),Ve=Object(j.withInstanceId)((function(e){var t,n=e.id,r=e.instanceId,a=e.width,o=e.consentType,l=e.implicitConsentMessage,p=e.explicitConsentMessage,d=e.setAttributes;return Object(c.createElement)(s.BaseControl,{id:"jetpack-field-consent-".concat(r),className:"jetpack-field jetpack-field-consent",label:Object(c.createElement)(c.Fragment,null,"explicit"===o&&Object(c.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),Object(c.createElement)(ke.a,{required:!1,label:null!==(t={implicit:l,explicit:p}[o])&&void 0!==t?t:"",setAttributes:d,labelFieldName:"".concat(o,"ConsentMessage"),placeholder:Object(i.sprintf)(Object(i.__)("Add %s consent messageโฆ","jetpack"),o)}),Object(c.createElement)(u.InspectorControls,null,Object(c.createElement)(s.PanelBody,{title:Object(i.__)("Field Settings","jetpack")},Object(c.createElement)(ye,{setAttributes:d,width:a}))),Object(c.createElement)(u.InspectorAdvancedControls,null,Object(c.createElement)(_e,{setAttributes:d,id:n})),Object(c.createElement)(u.InspectorControls,null,Object(c.createElement)(s.PanelBody,{title:Object(i.__)("Consent Settings","jetpack")},Object(c.createElement)(s.BaseControl,null,Object(c.createElement)(s.SelectControl,{label:Object(i.__)("Permission to email","jetpack"),value:o,options:[{label:Object(i.__)("Mention that you can email","jetpack"),value:"implicit"},{label:Object(i.__)("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:function(e){return d({consentType:e})}})))))})})),qe=Object(O.a)(Object(c.createElement)(s.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"})),He={title:Object(i.__)("Form","jetpack"),description:Object(i.__)("A simple way to get feedback from folks visiting your site.","jetpack"),icon:{src:qe,foreground:Object(w.a)()},keywords:[Object(i._x)("email","block search term","jetpack"),Object(i._x)("feedback","block search term","jetpack"),Object(i._x)("contact form","block search term","jetpack")],supports:{html:!1},attributes:be,edit:me,save:u.InnerBlocks.Content,variations:E,category:"grow",deprecated:fe},Ge={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:function(e){return!e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-text",e)}},{type:"block",blocks:["jetpack/field-name"],isMatch:function(e){return!e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-name",e)}},{type:"block",blocks:["jetpack/field-email"],isMatch:function(e){return!e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-email",e)}},{type:"block",blocks:["jetpack/field-url"],isMatch:function(e){return!e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-url",e)}},{type:"block",blocks:["jetpack/field-date"],isMatch:function(e){return!e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-date",e)}},{type:"block",blocks:["jetpack/field-telephone"],isMatch:function(e){return!e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-telephone",e)}},{type:"block",blocks:["jetpack/field-textarea"],isMatch:function(e){return!e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-textarea",e)}},{type:"block",blocks:["jetpack/field-checkbox-multiple"],isMatch:function(e){return 1<=e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-checkbox-multiple",e)}},{type:"block",blocks:["jetpack/field-radio"],isMatch:function(e){return 1<=e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-radio",e)}},{type:"block",blocks:["jetpack/field-select"],isMatch:function(e){return 1<=e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-select",e)}},{type:"block",blocks:["jetpack/field-consent"],isMatch:function(e){return 1<=e.options.length},transform:function(e){return Object(l.createBlock)("jetpack/field-consent",e)}}]},save:function(){return null},example:{}},We=function(e){var t=e.attributes,n=e.name;return null===t.label?Object(l.getBlockType)(n).title:t.label},$e=function(e){return function(t){return Object(c.createElement)(we,{type:e,label:We(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})}},Ke=function(e){return function(t){return Object(c.createElement)(Ue,{label:We(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})}},Ze=[{name:"field-text",settings:o()({},Ge,{title:Object(i.__)("Text","jetpack"),description:Object(i.__)("When you need just a small amount of text, add a text input.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:$e("text")})},{name:"field-name",settings:o()({},Ge,{title:Object(i.__)("Name","jetpack"),description:Object(i.__)("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:$e("text")})},{name:"field-email",settings:o()({},Ge,{title:Object(i.__)("Email","jetpack"),keywords:[Object(i.__)("e-mail","jetpack"),Object(i.__)("mail","jetpack"),"email"],description:Object(i.__)("Want to reply to folks? Add an email address input.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:$e("email")})},{name:"field-url",settings:o()({},Ge,{title:Object(i.__)("Website","jetpack"),keywords:["url",Object(i.__)("internet page","jetpack"),"link"],description:Object(i.__)("Add an address input for a website.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:$e("url")})},{name:"field-date",settings:o()({},Ge,{title:Object(i.__)("Date Picker","jetpack"),keywords:[Object(i.__)("Calendar","jetpack"),Object(i._x)("day month year","block search term","jetpack")],description:Object(i.__)("The best way to set a date. Add a date picker.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:$e("text")})},{name:"field-telephone",settings:o()({},Ge,{title:Object(i.__)("Phone Number","jetpack"),keywords:[Object(i.__)("Phone","jetpack"),Object(i.__)("Cellular phone","jetpack"),Object(i.__)("Mobile","jetpack")],description:Object(i.__)("Add a phone number input.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:$e("tel")})},{name:"field-textarea",settings:o()({},Ge,{title:Object(i.__)("Message","jetpack"),keywords:[Object(i.__)("Textarea","jetpack"),"textarea",Object(i.__)("Multiline text","jetpack")],description:Object(i.__)("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:function(e){return Object(c.createElement)(Ce,{label:We(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:o()({},Ge,{title:Object(i.__)("Checkbox","jetpack"),keywords:[Object(i.__)("Confirm","jetpack"),Object(i.__)("Accept","jetpack")],description:Object(i.__)("Add a single checkbox.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:function(e){return Object(c.createElement)(xe,{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:o()({},Ge.attributes,{label:{type:"string",default:""}})})},{name:"field-consent",settings:o()({},Ge,{title:Object(i.__)("Consent","jetpack"),keywords:[Object(i.__)("Consent","jetpack")],description:Object(i.__)("Ask for consent","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:o()({},Ge.attributes,{label:{type:"string",default:Object(i.__)("Consent","jetpack")},consentType:{type:"string",default:"implicit"},implicitConsentMessage:{type:"string",default:Object(i.__)("By submitting your information, you're giving us permission to email you. You may unsubscribe at any time.","jetpack")},explicitConsentMessage:{type:"string",default:Object(i.__)("Can we send you an email from time to time?","jetpack")}}),edit:function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,a=t.id,o=t.width,i=t.consentType,l=t.implicitConsentMessage,s=t.explicitConsentMessage;return Object(c.createElement)(Ve,{id:a,isSelected:n,width:o,consentType:i,implicitConsentMessage:l,explicitConsentMessage:s,setAttributes:r})}})},{name:"field-checkbox-multiple",settings:o()({},Ge,{title:Object(i.__)("Checkbox Group","jetpack"),keywords:[Object(i.__)("Choose Multiple","jetpack"),Object(i.__)("Option","jetpack")],description:Object(i.__)("People love options. Add several checkbox items.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),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:Ke("checkbox"),attributes:o()({},Ge.attributes,{label:{type:"string",default:"Choose several"}})})},{name:"field-radio",settings:o()({},Ge,{title:Object(i.__)("Radio","jetpack"),keywords:[Object(i.__)("Choose","jetpack"),Object(i.__)("Select","jetpack"),Object(i.__)("Option","jetpack")],description:Object(i.__)("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:Object(O.a)(Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Path,{fill:Object(w.a)(),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"}),Object(c.createElement)(s.Circle,{cx:"12",cy:"12",r:"5"}))),edit:Ke("radio"),attributes:o()({},Ge.attributes,{label:{type:"string",default:"Choose one"}})})},{name:"field-select",settings:o()({},Ge,{title:Object(i.__)("Select","jetpack"),keywords:[Object(i.__)("Choose","jetpack"),Object(i.__)("Dropdown","jetpack"),Object(i.__)("Option","jetpack")],description:Object(i.__)("Compact, but powerful. Add a select box with several items.","jetpack"),icon:Object(O.a)(Object(c.createElement)(s.Path,{fill:Object(w.a)(),d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:Ke("select"),attributes:o()({},Ge.attributes,{label:{type:"string",default:"Select one"}})})}];Object(r.a)("contact-form",He,Ze)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(1),o=n(23),c=n.n(o),i=n(9),l=n.n(i),s=n(0),u=n(10),p=n(7),d=n.n(p),m=n(8),b=n.n(m),h=n(3),f=n.n(h),g=n(54),j=n(5),v=n(2),k=n(25),y=n(39),_=n(50),O=function(e){var t=e.attributes,n=e.setAttributes,r=t.currency,o=t.monthlyDonation,c=t.annualDonation,i=t.showCustomAmount,l=function(e,r){var a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];n(f()({},a,d()({},o,{show:r})))};return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(j.BlockControls,null,Object(s.createElement)(v.ToolbarGroup,null,Object(s.createElement)(v.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(s.createElement)(v.Button,{className:"jetpack-donations__currency-toggle",icon:Object(s.createElement)(s.Fragment,null,g.a[r].symbol+" - "+r,Object(s.createElement)(v.Dashicon,{icon:"arrow-down"})),label:Object(a.__)("Change currency","jetpack"),onClick:t,onKeyDown:function(e){n||e.keyCode!==k.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:function(e){var t=e.onClose;return Object(s.createElement)(v.MenuGroup,null,Object.keys(y.b).map((function(e){return Object(s.createElement)(v.MenuItem,{isSelected:e===r,onClick:function(){n({currency:e}),t()},key:"jetpack-donations-currency-".concat(e)},g.a[e].symbol+" - "+e)})))}}))),Object(s.createElement)(j.InspectorControls,null,Object(s.createElement)(v.PanelBody,{title:Object(a.__)("Settings","jetpack")},Object(s.createElement)(v.ToggleControl,{checked:o.show,onChange:function(e){return l("1 month",e)},label:Object(a.__)("Show monthly donations","jetpack")}),Object(s.createElement)(v.ToggleControl,{checked:c.show,onChange:function(e){return l("1 year",e)},label:Object(a.__)("Show annual donations","jetpack")}),Object(s.createElement)(v.ToggleControl,{checked:i,onChange:function(e){return n({showCustomAmount:e})},label:Object(a.__)("Show custom amount option","jetpack")}),Object(s.createElement)(v.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(Object(_.a)())},Object(a.__)("View donation earnings","jetpack")))))},w=n(21),E=n.n(w),C=n(36),x=function(e){var t=e.className,n=void 0===t?null:t,r=e.currency,a=void 0===r?null:r,o=e.defaultValue,c=void 0===o?null:o,i=e.disabled,u=void 0!==i&&i,p=e.label,d=void 0===p?"":p,m=e.onChange,h=void 0===m?null:m,f=e.value,v=void 0===f?"":f,k=Object(s.useState)(Object(C.a)(v,a,{symbol:""})),_=l()(k,2),O=_[0],w=_[1],E=Object(s.useState)(!1),x=l()(E,2),S=x[0],A=x[1],T=Object(s.useState)(!1),N=l()(T,2),P=N[0],M=N[1],B=Object(s.useRef)(null),I=Object(s.useCallback)((function(e){if(w(e),h){var t=Object(y.e)(e,a);t&&t>=Object(y.d)(a)?(h(t),M(!1)):e&&M(!0)}}),[a,h]),F=function(){B.current&&(B.current.focus(),A(!0))};return Object(s.useEffect)((function(){B.current&&B.current.addEventListener("blur",(function(){return A(!1)}))}),[B]),Object(s.useEffect)((function(){S||O||I(Object(C.a)(c,a,{symbol:""}))}),[a,c,O,S,I]),Object(s.useEffect)((function(){S||P||w(Object(C.a)(v,a,{symbol:""}))}),[a,S,P,I,v]),Object(s.createElement)("div",{className:b()("donations__amount",n,{"has-focus":S,"has-error":P}),role:"button",tabIndex:0,onClick:F,onKeyDown:F},g.a[a].symbol,u?Object(s.createElement)("div",{className:"donations__amount-value"},Object(C.a)(v||c,a,{symbol:""})):Object(s.createElement)(j.RichText,{allowedFormats:[],"aria-label":d,keepPlaceholderOnFocus:!0,multiline:!1,onChange:function(e){return I(e)},placeholder:Object(C.a)(c,a,{symbol:""}),ref:B,value:O,withoutInteractiveFormatting:!0}))},S=function(e){var t=e.activeTab,n=e.attributes,r=e.setAttributes,o=n.currency,c=n.oneTimeDonation,i=n.monthlyDonation,p=n.annualDonation,m=n.showCustomAmount,b=n.chooseAmountText,h=n.customAmountText,g={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=function(e){return n[g[t]][e]},k=function(e,a){var o=g[t],c=n[o];r(f()({},o,d()({},c,f()({},e,a))))},_=Object(s.useState)(o),O=l()(_,2),w=O[0],C=O[1],S=Object(y.d)(o),A=[10*S,30*S,200*S];Object(s.useEffect)((function(){w!==o&&(C(o),r({oneTimeDonation:d()({},c,{amounts:A}),monthlyDonation:d()({},i,{amounts:A}),annualDonation:d()({},p,{amounts:A})}))}),[o,w,A,c,i,p,r]);var T=v("amounts"),N=Object(u.useSelect)((function(e){return e("core/rich-text").getFormatTypes()}),[]).map((function(e){return e.name})).filter((function(e){return"core/link"!==e}));return Object(s.createElement)("div",{className:"donations__tab"},Object(s.createElement)(j.RichText,{tagName:"h4",placeholder:Object(a.__)("Write a messageโฆ","jetpack"),value:v("heading"),onChange:function(e){return k("heading",e)}}),Object(s.createElement)(j.RichText,{tagName:"p",placeholder:Object(a.__)("Write a messageโฆ","jetpack"),value:b,onChange:function(e){return r({chooseAmountText:e})}}),Object(s.createElement)("div",{className:"donations__amounts"},T.map((function(e,t){return Object(s.createElement)(x,{currency:o,defaultValue:A[t],label:Object(a.sprintf)(Object(a.__)("Tier %d","jetpack"),t+1),key:"jetpack-donations-amount-".concat(t),onChange:function(e){return function(e,t){var n=E()(T);n[t]=e,k("amounts",n)}(e,t)},value:e})}))),m&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(j.RichText,{tagName:"p",placeholder:Object(a.__)("Write a messageโฆ","jetpack"),value:h,onChange:function(e){return r({customAmountText:e})}}),Object(s.createElement)(x,{currency:o,label:Object(a.__)("Custom amount","jetpack"),defaultValue:100*Object(y.d)(o),className:"donations__custom-amount",disabled:!0})),Object(s.createElement)("hr",{className:"donations__separator"}),Object(s.createElement)(j.RichText,{tagName:"p",placeholder:Object(a.__)("Write a messageโฆ","jetpack"),value:v("extraText"),onChange:function(e){return k("extraText",e)}}),Object(s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},Object(s.createElement)(j.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:Object(a.__)("Write a messageโฆ","jetpack"),value:v("buttonText"),onChange:function(e){return t=e,void r({oneTimeDonation:d()({},c,{buttonText:t}),monthlyDonation:d()({},i,{buttonText:t}),annualDonation:d()({},p,{buttonText:t})});var t},allowedFormats:N})))},A=n(144),T=n.n(A),N=n(28),P=n(58),M=n(27),B=n.n(M),I=n(18),F=(n(220),Object(I.compose)([Object(u.withDispatch)((function(e,t){var n,r=t.blockName,a=t.href,o=t.onClick;return{autosaveAndRedirect:(n=B()(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),o(r),t.next=4,e("core/editor").savePost();case 4:window.top.location.href=a;case 5:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}}))])((function(e){var t=e.autosaveAndRedirect,n=e.buttonLabel,r=e.href,a=e.icon,o=e.subtitle,c=e.title,i=e.className;return Object(s.createElement)(j.Warning,{actions:r&&[Object(s.createElement)(v.Button,{href:r,onClick:t,target:"_top",isSecondary:!0,isLarge:!0},n)],className:b()(i,"jetpack-block-nudge wp-block")},Object(s.createElement)("span",{className:"jetpack-block-nudge__info"},a,Object(s.createElement)("span",{className:"jetpack-block-nudge__text-container"},Object(s.createElement)("span",{className:"jetpack-block-nudge__title"},c),o&&Object(s.createElement)("span",{className:"jetpack-block-nudge__message"},o))))}))),R=(n(221),function(e){var t=e.blockName,n=e.url;return Object(s.createElement)(F,{className:"jetpack-stripe-nudge__banner",buttonLabel:Object(a.__)("Connect","jetpack"),icon:Object(s.createElement)(T.a,{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:n,onClick:function(){P.a.tracks.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t})},title:Object(a.__)("Connect to Stripe to use this block on your site","jetpack"),subtitle:Object(a.__)("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})}),L=function(e){var t=e.blockName,n=e.postId,r=e.stripeConnectUrl;if(!Object(N.isURL)(r))return null;var a=r;if(n)try{var o=Object(N.getQueryArg)(r,"state"),c=JSON.parse(atob(o));c.from_editor_post_id=n,a=Object(N.addQueryArgs)(r,{state:btoa(JSON.stringify(c))})}catch(i){0}return Object(s.createElement)(R,{blockName:t,url:a})},D=function(e){var t=e.attributes,n=e.className,r=e.products,o=e.setAttributes,c=e.shouldUpgrade,i=e.stripeConnectUrl,p=t.oneTimeDonation,m=t.monthlyDonation,h=t.annualDonation,f=Object(s.useState)("one-time"),g=l()(f,2),j=g[0],v=g[1],k=Object(u.useSelect)((function(e){return e("core/editor").getCurrentPostId()}),[]),y=Object(s.useCallback)((function(e){return j===e}),[j]),_=d()({"one-time":{title:Object(a.__)("One-Time","jetpack")}},m.show&&{"1 month":{title:Object(a.__)("Monthly","jetpack")}},{},h.show&&{"1 year":{title:Object(a.__)("Yearly","jetpack")}});return Object(s.useEffect)((function(){p.planId===r["one-time"]&&m.planId===r["1 month"]&&h.planId===r["1 year"]||o({oneTimeDonation:d()({},p,{planId:r["one-time"]}),monthlyDonation:d()({},m,{planId:r["1 month"]}),annualDonation:d()({},h,{planId:r["1 year"]})})}),[p,m,h,o,r]),Object(s.useEffect)((function(){!m.show&&y("1 month")&&v("one-time"),!h.show&&y("1 year")&&v("one-time")}),[m,h,v,y]),Object(s.createElement)("div",{className:n},!c&&i&&Object(s.createElement)(L,{blockName:"donations",postId:k,stripeConnectUrl:i}),Object(s.createElement)("div",{className:"donations__container"},Object.keys(_).length>1&&Object(s.createElement)("div",{className:"donations__nav"},Object.entries(_).map((function(e){var t=l()(e,2),n=t[0],r=t[1].title;return Object(s.createElement)("div",{role:"button",tabIndex:0,className:b()("donations__nav-item",{"is-active":y(n)}),onClick:function(){return v(n)},onKeyDown:function(){return v(n)},key:"jetpack-donations-nav-item-".concat(n," ")},r)}))),Object(s.createElement)("div",{className:"donations__content"},Object(s.createElement)(S,{activeTab:j,attributes:t,setAttributes:o}))),Object(s.createElement)(O,e))},z=function(e){var t=e.className,n=e.error;return Object(s.createElement)(v.Placeholder,{icon:"lock",label:Object(a.__)("Donations","jetpack"),instructions:n,className:t})},U=n(22),V=n.n(U),q=function(){var e=B()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,V()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:t}});case 3:return n=e.sent,e.abrupt("return",n);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0.message));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),H=n(40),G=function(){var e=B()(regeneratorRuntime.mark((function e(){var t,n,r,a,o,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:null,n=Object(H.parse)(window.location.href,!0),r=n.query,a=Object(N.addQueryArgs)("/wpcom/v2/memberships/status",d()({source:"https://wordpress.com"===r.origin?"gutenberg-wpcom":"gutenberg"},t&&{type:t})),e.prev=3,e.next=6,V()({path:a,method:"GET"});case 6:return o=e.sent,e.abrupt("return",o);case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",Promise.reject(e.t0.message));case 13:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(){return e.apply(this,arguments)}}(),W=function(e){var t=e.attributes,n=e.className,r=e.setAttributes,o=t.currency,i=Object(s.useState)(""),p=l()(i,2),d=p[0],m=p[1],b=Object(s.useState)(!1),h=l()(b,2),f=h[0],g=h[1],j=Object(s.useState)(!1),v=l()(j,2),k=v[0],y=v[1],_=Object(s.useState)([]),O=l()(_,2),w=O[0],E=O[1],C=Object(u.useSelect)((function(e){return e("core/editor").getCurrentPost()}),[]);Object(s.useEffect)((function(){r({fallbackLinkUrl:C.link})}),[C.link,r]);var x=function(e){m(e)},S=function(e){return e.reduce((function(e,t){var n=t.id,r=t.currency,a=t.type,c=t.interval;return r===o&&"donation"===a&&(e[c]=n),e}),{})},A=function(e){if(!e&&"object"!=typeof e||e.errors)m(Object(a.__)("Could not load data from WordPress.com.","jetpack"));else{g(e.should_upgrade_to_access_memberships),y(e.connect_url);var t,n,r=S(e.products);if(t=r,(n=Object.keys(t)).includes("one-time")&&n.includes("1 month")&&n.includes("1 year"))E(r);else e.should_upgrade_to_access_memberships||e.connect_url?E({"one-time":-1,"1 month":-1,"1 year":-1}):q(o).then((function(e){return E(S(e))}),x)}};return Object(s.useEffect)((function(){G("donation").then(A,x)}),[o]),d?Object(s.createElement)(z,{className:n,error:d}):Object(s.createElement)(D,c()({},e,{products:w,shouldUpgrade:f,stripeConnectUrl:k}))},$=function(e){var t=e.attributes,n=t.fallbackLinkUrl,r=t.oneTimeDonation,a=t.monthlyDonation,o=t.annualDonation;return r&&r.show&&r.planId&&-1!==r.planId?Object(s.createElement)("div",null,Object(s.createElement)(j.RichText.Content,{tagName:"h4",value:r.heading}),Object(s.createElement)(j.RichText.Content,{tagName:"p",value:r.extraText}),Object(s.createElement)(j.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:r.buttonText}),a.show&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)("hr",{className:"donations__separator"}),Object(s.createElement)(j.RichText.Content,{tagName:"h4",value:a.heading}),Object(s.createElement)(j.RichText.Content,{tagName:"p",value:a.extraText}),Object(s.createElement)(j.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.buttonText})),o.show&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)("hr",{className:"donations__separator"}),Object(s.createElement)(j.RichText.Content,{tagName:"h4",value:o.heading}),Object(s.createElement)(j.RichText.Content,{tagName:"p",value:o.extraText}),Object(s.createElement)(j.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}))):null},K={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:Object(a.__)("Make a one-time donation","jetpack"),extraText:Object(a.__)("Your contribution is appreciated.","jetpack"),buttonText:Object(a.__)("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:Object(a.__)("Make a monthly donation","jetpack"),extraText:Object(a.__)("Your contribution is appreciated.","jetpack"),buttonText:Object(a.__)("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:Object(a.__)("Make a yearly donation","jetpack"),extraText:Object(a.__)("Your contribution is appreciated.","jetpack"),buttonText:Object(a.__)("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:Object(a.__)("Choose an amount","jetpack")},customAmountText:{type:"string",default:Object(a.__)("Or enter a custom amount","jetpack")}},supports:{html:!1},save:function(e){var t=e.attributes,n=t.currency,r=t.oneTimeDonation,o=t.monthlyDonation,c=t.annualDonation,i=t.showCustomAmount,u=t.chooseAmountText,p=t.customAmountText;if(!r||!r.show||-1===r.planId)return null;var m=d()({"one-time":{title:Object(a.__)("One-Time","jetpack")}},o.show&&{"1 month":{title:Object(a.__)("Monthly","jetpack")}},{},c.show&&{"1 year":{title:Object(a.__)("Yearly","jetpack")}});return Object(s.createElement)("div",null,Object(s.createElement)("div",{className:"donations__container"},Object.keys(m).length>1&&Object(s.createElement)("div",{className:"donations__nav"},Object.entries(m).map((function(e){var t=l()(e,2),n=t[0],r=t[1].title;return Object(s.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:"jetpack-donations-nav-item-".concat(n," "),"data-interval":n},r)}))),Object(s.createElement)("div",{className:"donations__content"},Object(s.createElement)("div",{className:"donations__tab"},Object(s.createElement)(j.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:r.heading}),o.show&&Object(s.createElement)(j.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:o.heading}),c.show&&Object(s.createElement)(j.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:c.heading}),Object(s.createElement)(j.RichText.Content,{tagName:"p",value:u}),Object(s.createElement)("div",{className:"donations__amounts donations__one-time-item"},r.amounts.map((function(e){return Object(s.createElement)("div",{className:"donations__amount","data-amount":e},Object(C.a)(e,n))}))),o.show&&Object(s.createElement)("div",{className:"donations__amounts donations__monthly-item"},o.amounts.map((function(e){return Object(s.createElement)("div",{className:"donations__amount","data-amount":e},Object(C.a)(e,n))}))),c.show&&Object(s.createElement)("div",{className:"donations__amounts donations__annual-item"},c.amounts.map((function(e){return Object(s.createElement)("div",{className:"donations__amount","data-amount":e},Object(C.a)(e,n))}))),i&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)(j.RichText.Content,{tagName:"p",value:p}),Object(s.createElement)("div",{className:"donations__amount donations__custom-amount"},g.a[n].symbol,Object(s.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":Object(C.a)(100*Object(y.d)(n),n,{symbol:""})}))),Object(s.createElement)("div",{className:"donations__separator"},"โโ"),Object(s.createElement)(j.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:r.extraText}),o.show&&Object(s.createElement)(j.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:o.extraText}),c.show&&Object(s.createElement)(j.RichText.Content,{tagName:"p",className:"donations__annual-item",value:c.extraText}),Object(s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},Object(s.createElement)(j.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:r.buttonText})),o.show&&Object(s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},Object(s.createElement)(j.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:o.buttonText})),c.show&&Object(s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},Object(s.createElement)(j.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:c.buttonText}))))))}},Z=n(32),J=(n(222),{title:Object(a.__)("Donations","jetpack"),description:Object(a.__)("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:Z.e,category:"earn",keywords:[Object(a.__)("Donations","jetpack")],supports:{html:!1},edit:W,save:$,example:{},deprecated:[K]});Object(r.a)("donations",J)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i={subscribePlaceholder:{type:"string",default:Object(o.__)("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:Object(o.__)("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:"number"},customFontSize:{type:"number"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}},l=n(4),s={attributes:{subscribeButton:{type:"string",default:Object(o.__)("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:function(e){return{subscribeButton:"",submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal,customBackgroundButtonColor:"",customTextButtonColor:"",submitButtonClasses:""}},isEligible:function(e){return!!Object(l.isEmpty)(e.subscribeButton)},save:function(e){var t=e.attributes;return Object(a.createElement)(a.RawHTML,null,'[jetpack_subscription_form show_subscribers_total="'.concat(t.showSubscribersTotal,'" show_only_email_and_button="true"]'))}};var u={attributes:{subscribePlaceholder:{type:"string",default:Object(o.__)("Email Address","jetpack")},subscribeButton:{type:"string",default:Object(o.__)("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},submitButtonText:{type:"string",default:Object(o.__)("Subscribe","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},migrate:function(e){return{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:function(e){var t=e.attributes,n=t.showSubscribersTotal,r=t.submitButtonClasses,o=t.customBackgroundButtonColor,c=t.customTextButtonColor,i=t.submitButtonText;return Object(a.createElement)(a.RawHTML,null,'[jetpack_subscription_form show_only_email_and_button="true" custom_background_button_color="'.concat(o,'" custom_text_button_color="').concat(c,'" submit_button_text="').concat(i,'" submit_button_classes="').concat(r,'" show_subscribers_total="').concat(n,'" ]'))}},p={subscribePlaceholder:{type:"string",default:Object(o.__)("Enter your email address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:Object(o.__)("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"}},d=n(5),m=n(8),b=n.n(m);function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.subscribePlaceholder,o=t.showSubscribersTotal,c=t.buttonOnNewLine,i=t.submitButtonText,l=t.emailFieldBackgroundColor,s=t.customEmailFieldBackgroundColor,u=t.emailFieldGradient,m=t.customEmailFieldGradient,h=t.buttonBackgroundColor,f=t.customButtonBackgroundColor,g=t.buttonGradient,j=t.customButtonGradient,v=t.textColor,k=t.customTextColor,y=t.fontSize,_=t.customFontSize,O=t.borderRadius,w=t.borderWeight,E=t.borderColor,C=t.customBorderColor,x=t.padding,S=t.spacing,A=!!d.__experimentalGetGradientClass,T=Object(d.getColorClassName)("color",v),N=Object(d.getFontSizeClass)(y),P=Object(d.getColorClassName)("border-color",E),M=Object(d.getColorClassName)("background-color",h),B=A?Object(d.__experimentalGetGradientClass)(g):void 0,I=Object(d.getColorClassName)("background-color",l),F=A?Object(d.__experimentalGetGradientClass)(u):void 0,R=b()(0===O?"no-border-radius":void 0,N,P),L=b()(R,v?"has-text-color":void 0,T,h||g?"has-background":void 0,M,B),D=b()(R,I,F),z=!I&&m?m:s,U=!M&&j?j:f,V=function(){return b()(e,"wp-block-jetpack-subscriptions__supports-newline",c?"wp-block-jetpack-subscriptions__use-newline":void 0,o?"wp-block-jetpack-subscriptions__show-subs":void 0)},q=r,H=i;return"check-text-defaults"===n&&(q=r===p.subscribePlaceholder.default?"Enter your email address":r,H=i===p.submitButtonText.default?"Sign Up":i),Object(a.createElement)("div",{className:V()},Object(a.createElement)(a.RawHTML,null,'\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="'.concat(q,'"\n\t\t\t\tshow_subscribers_total="').concat(o,'"\n\t\t\t\tbutton_on_newline="').concat(c,'"\n\t\t\t\tsubmit_button_text="').concat(H,'"\n\t\t\t\tcustom_background_emailfield_color="').concat(z,'"\n\t\t\t\tcustom_background_button_color="').concat(U,'"\n\t\t\t\tcustom_text_button_color="').concat(k,'"\n\t\t\t\tcustom_font_size="').concat(_||16,'"\n\t\t\t\tcustom_border_radius="').concat(O||0,'"\n\t\t\t\tcustom_border_weight="').concat(w||1,'"\n\t\t\t\tcustom_border_color="').concat(C,'"\n\t\t\t\tcustom_padding="').concat(x||15,'"\n\t\t\t\tcustom_spacing="').concat(S||10,'"\n\t\t\t\tsubmit_button_classes="').concat(L,'"\n\t\t\t\temail_field_classes="').concat(D,'"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]')))}var f=[s,u,{attributes:p,save:function(e){return h(e.className,e.attributes)}},{attributes:p,save:function(e){return h(e.className,e.attributes,"check-text-defaults")}}],g=n(7),j=n.n(g),v=n(3),k=n.n(v),y=n(9),_=n.n(y),O=n(22),w=n.n(O),E=n(18),C=(n(188),n(44)),x=window.getComputedStyle,S=!!d.__experimentalUseGradient,A=Object(c.withFallbackStyles)((function(e,t){var n=t.buttonBackgroundColor,r=t.textColor,a=n&&n.color,o=r&&r.color,c=e.querySelector(".wp-block-jetpack-subscriptions__button");return{fallbackButtonBackgroundColor:a||!e?void 0:c&&x(c).backgroundColor,fallbackTextColor:o||!e?void 0:c&&x(c).color}}));var T=Object(E.compose)([Object(d.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),Object(d.withFontSizes)("fontSize"),A])((function(e){var t,n,r,s=e.className,u=e.attributes,p=e.setAttributes,m=e.emailFieldBackgroundColor,h=e.buttonBackgroundColor,f=e.setButtonBackgroundColor,g=e.fallbackButtonBackgroundColor,v=e.textColor,y=e.fallbackTextColor,O=e.setTextColor,E=e.borderColor,x=e.fontSize,A=Object(C.a)(i,u);Object(l.isEqual)(A,u)||p(A);var T,N,P=A.borderRadius,M=A.borderWeight,B=A.padding,I=A.spacing,F=A.submitButtonText,R=A.subscribePlaceholder,L=A.showSubscribersTotal,D=A.buttonOnNewLine,z=Object(a.useState)(""),U=_()(z,2),V=U[0],q=U[1],H=Object(a.useState)(""),G=_()(H,2),W=G[0],$=G[1],K=S?Object(d.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},Z=S?Object(d.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},J=(t={"no-border-radius":0===P},k()(t,x.class,x.class),k()(t,"has-text-color",v.color),k()(t,v.class,v.class),t),Y=j()({},J,(n={"has-background":m.color||K.gradientValue},k()(n,m.class,!K.gradientValue&&m.class),k()(n,K.gradientClass,K.gradientClass),n)),Q=j()({},J,(r={"has-background":h.color||Z.gradientValue},k()(r,h.class,!Z.gradientValue&&h.class),k()(r,Z.gradientClass,Z.gradientClass),r)),X=function(e){return e||10},ee={color:v.color,borderColor:E.color,borderRadius:P?P+"px":"0px",borderWidth:M?M+"px":"1px",fontSize:x.size?x.size+"px":"16px",padding:(T=B,N=T||15,N+"px "+Math.round(1.5*N)+"px "+N+"px "+Math.round(1.5*N)+"px")},te=j()({},ee,{},!m.color&&K.gradientValue?{background:K.gradientValue}:{backgroundColor:m.color}),ne=j()({},ee,{},!h.color&&Z.gradientValue?{background:Z.gradientValue}:{backgroundColor:h.color},{},D?{marginTop:X(I)+"px"}:{marginLeft:X(I)+"px"});return Object(a.useEffect)((function(){w()({path:"/wpcom/v2/subscribers/count"}).then((function(e){e.hasOwnProperty("count")?(q(Object(o.sprintf)(Object(o._n)("Join %s other subscriber","Join %s other subscribers",e.count,"jetpack"),e.count)),$(e.count)):(q(Object(o.__)("Subscriber count unavailable","jetpack")),$(0))}))}),[]),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(d.InspectorControls,null,S&&Object(a.createElement)(d.__experimentalPanelColorGradientSettings,{title:Object(o.__)("Color Settings","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:h.color,onColorChange:f,gradientValue:Z.gradientValue,onGradientChange:Z.setGradient,label:Object(o.__)("Button Background Color","jetpack")},{colorValue:v.color,onColorChange:O,label:Object(o.__)("Button Text Color","jetpack")},{colorValue:E.color,onColorChange:function(e){p({borderColor:e,customBorderColor:e})},label:Object(o.__)("Border Color","jetpack")}],initialOpen:!0},Object(a.createElement)(d.ContrastChecker,{fontSize:x.size,textColor:v.color,backgroundColor:m.color,fallbackButtonBackgroundColor:g,fallbackTextColor:y})),!S&&Object(a.createElement)(d.PanelColorSettings,{title:Object(o.__)("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:h.color,onChange:f,label:Object(o.__)("Button Background Color","jetpack")},{value:v.color,onChange:O,label:Object(o.__)("Button Text Color","jetpack")},{value:E.color,onColorChange:function(e){p({borderColor:e,customBorderColor:e})},label:Object(o.__)("Border Color","jetpack")}],initialOpen:!1},Object(a.createElement)(d.ContrastChecker,{fontSize:x.size,textColor:v.color,backgroundColor:m.color,fallbackButtonBackgroundColor:g,fallbackTextColor:y})),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Text Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},Object(a.createElement)(d.FontSizePicker,{withSlider:!0,value:x.size,onChange:function(e){var t=e||16;p({fontSize:t,customFontSize:t})}})),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Border Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},Object(a.createElement)(c.RangeControl,{value:P,label:Object(o.__)("Border Radius","jetpack"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){return p({borderRadius:e})}}),Object(a.createElement)(c.RangeControl,{value:M,label:Object(o.__)("Border Weight","jetpack"),min:0,max:15,initialPosition:1,allowReset:!0,onChange:function(e){return p({borderWeight:e})}})),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Spacing Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},Object(a.createElement)(c.RangeControl,{value:B,label:Object(o.__)("Space Inside","jetpack"),min:5,max:50,initialPosition:15,allowReset:!0,onChange:function(e){return p({padding:e})}}),Object(a.createElement)(c.RangeControl,{value:I,label:Object(o.__)("Space Between","jetpack"),min:0,max:50,initialPosition:10,allowReset:!0,onChange:function(e){return p({spacing:e})}})),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Display Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Show subscriber count","jetpack"),checked:L,onChange:function(){p({showSubscribersTotal:!L})},help:function(){if(!W||W<1)return Object(o.__)("This will remain hidden on your website until you have at least one subscriber.","jetpack")}}),Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Place button on new line","jetpack"),checked:D,onChange:function(){p({buttonOnNewLine:!D})}}))),Object(a.createElement)("div",{className:b()(s,"wp-block-jetpack-subscriptions__supports-newline",D?"wp-block-jetpack-subscriptions__use-newline":void 0,L?"wp-block-jetpack-subscriptions__show-subs":void 0)},Object(a.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},Object(a.createElement)(c.TextControl,{placeholder:R,disabled:!0,className:b()(Y,"wp-block-jetpack-subscriptions__textfield"),style:te}),Object(a.createElement)(d.RichText,{className:b()(Q,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:function(e){return p({submitButtonText:e})},style:ne,value:F,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),L&&Object(a.createElement)("p",{className:"wp-block-jetpack-subscriptions__subscount"},V)))}));var N=n(17),P=Object(a.createElement)(c.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(c.Rect,{x:"4.75",y:"6.75",width:"14.5",height:"10.5",rx:"1.25",stroke:Object(N.a)(),strokeWidth:"1.5",fill:"none"}),Object(a.createElement)(c.Path,{d:"M19 7L13.3609 12.2363C12.5935 12.9489 11.4065 12.9489 10.6391 12.2363L5 7",stroke:Object(N.a)(),strokeWidth:"1.5",strokeLinejoin:"bevel",fill:"none"})),M={title:Object(o.__)("Subscription Form","jetpack"),description:Object(a.createElement)("p",null,Object(o.__)("A form enabling readers to get notifications when new posts are published from this site.","jetpack")),icon:{src:P,foreground:Object(N.a)()},category:"grow",keywords:[Object(o._x)("subscribe","block search term","jetpack"),Object(o._x)("join","block search term","jetpack"),Object(o._x)("follow","block search term","jetpack")],attributes:i,edit:T,save:function(e){var t=e.className,n=e.attributes,r=n.subscribePlaceholder,o=n.showSubscribersTotal,c=n.buttonOnNewLine,s=n.submitButtonText,u=n.emailFieldBackgroundColor,p=n.customEmailFieldBackgroundColor,m=n.emailFieldGradient,h=n.customEmailFieldGradient,f=n.buttonBackgroundColor,g=n.customButtonBackgroundColor,j=n.buttonGradient,v=n.customButtonGradient,k=n.textColor,y=n.customTextColor,_=n.fontSize,O=n.customFontSize,w=n.borderRadius,E=n.borderWeight,C=n.borderColor,x=n.customBorderColor,S=n.padding,A=n.spacing,T=!!d.__experimentalGetGradientClass,N=Object(d.getColorClassName)("color",k),P=Object(d.getFontSizeClass)(_),M=Object(d.getColorClassName)("border-color",C),B=Object(d.getColorClassName)("background-color",f),I=T?Object(d.__experimentalGetGradientClass)(j):void 0,F=Object(d.getColorClassName)("background-color",u),R=T?Object(d.__experimentalGetGradientClass)(m):void 0,L=b()(0===w?"no-border-radius":void 0,P,M),D=b()(L,k?"has-text-color":void 0,N,f||j?"has-background":void 0,B,I),z=b()(L,F,R),U=!F&&h?h:p,V=!B&&v?v:g,q={subscribe_placeholder:r!==i.subscribePlaceholder.default?r:void 0,show_subscribers_total:o,button_on_newline:c,submit_button_text:s!==i.submitButtonText.default?s:void 0,custom_background_emailfield_color:U,custom_background_button_color:V,custom_text_button_color:y,custom_font_size:O||16,custom_border_radius:w||0,custom_border_weight:E||1,custom_border_color:x,custom_padding:S||15,custom_spacing:A||10,submit_button_classes:D,email_field_classes:z,show_only_email_and_button:!0},H=Object(l.reduce)(q,(function(e,t,n){return void 0===t?e:e+" ".concat(n,'="').concat(t,'"')}),"");return Object(a.createElement)("div",{className:b()(t,"wp-block-jetpack-subscriptions__supports-newline",c?"wp-block-jetpack-subscriptions__use-newline":void 0,o?"wp-block-jetpack-subscriptions__show-subs":void 0)},Object(a.createElement)(a.RawHTML,null,"[jetpack_subscription_form".concat(H,"]")))},example:{attributes:{}},deprecated:f};Object(r.a)("subscriptions",M)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(5),i=n(2),l=n(8),s=n.n(l),u=["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"],p=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]],d=function(e){var t=e.isSelected;return Object(a.createElement)("div",{className:s()({"jetpack-contact-info-block":!0,"is-selected":t})},Object(a.createElement)(c.InnerBlocks,{allowedBlocks:u,templateLock:!1,template:p}))},m=n(26),b=(n(219),n(173),n(12)),h=n.n(b),f=n(16),g=n.n(f),j=n(13),v=n.n(j),k=n(14),y=n.n(k),_=n(6),O=n.n(_),w=n(15),E=n.n(w),C=function(e){var t=e.attributes,n=t.address,r=t.addressLine2,o=t.addressLine3,c=t.city,i=t.region,l=t.postal,s=t.country;return Object(a.createElement)(a.Fragment,null,n&&Object(a.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},n),r&&Object(a.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},r),o&&Object(a.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},o),c&&!(i||l)&&Object(a.createElement)("div",{className:"jetpack-address__city"},c),c&&(i||l)&&Object(a.createElement)("div",null,[Object(a.createElement)("span",{className:"jetpack-address__city"},c),", ",Object(a.createElement)("span",{className:"jetpack-address__region"},i)," ",Object(a.createElement)("span",{className:"jetpack-address__postal"},l)]),!c&&(i||l)&&Object(a.createElement)("div",null,[Object(a.createElement)("span",{className:"jetpack-address__region"},i)," ",Object(a.createElement)("span",{className:"jetpack-address__postal"},l)]),s&&Object(a.createElement)("div",{className:"jetpack-address__country"},s))},x=function(e){var t=e.attributes,n=t.address,r=t.addressLine2,a=t.addressLine3,o=t.city,c=t.region,i=t.postal,l=t.country,s=n?"".concat(n,","):"",u=r?"".concat(r,","):"",p=a?"".concat(a,","):"",d=o?"+".concat(o,","):"",m=c?"+".concat(c,","):"";m=i?"".concat(m,"+").concat(i):m;var b=l?"+".concat(l):"";return"https://www.google.com/maps/search/".concat(s).concat(u).concat(p).concat(d).concat(m).concat(b).replace(" ","+")},S=function(e){return[(t=e.attributes).address,t.addressLine2,t.addressLine3,t.city,t.region,t.postal,t.country].some((function(e){return""!==e}))&&Object(a.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&Object(a.createElement)("a",{href:x(e),target:"_blank",rel:"noopener noreferrer",title:Object(o.__)("Open address in Google Maps","jetpack")},Object(a.createElement)(C,e)),!e.attributes.linkToGoogleMaps&&Object(a.createElement)(C,e));var t},A=function(e){function t(){var e,n;h()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(n=v()(this,(e=y()(t)).call.apply(e,[this].concat(a)))).preventEnterKey=n.preventEnterKey.bind(O()(n)),n}return E()(t,e),g()(t,[{key:"preventEnterKey",value:function(e){"Enter"!==e.key||e.preventDefault()}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=t.address,r=t.addressLine2,l=t.addressLine3,u=t.city,p=t.region,d=t.postal,m=t.country,b=t.linkToGoogleMaps,h=e.isSelected,f=e.setAttributes,g=[n,r,l,u,p,d,m].some((function(e){return""!==e})),j=s()({"jetpack-address-block":!0,"is-selected":h}),v=Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Link address to Google Maps","jetpack"),checked:b,onChange:function(e){return f({linkToGoogleMaps:e})}});return Object(a.createElement)("div",{className:j},!h&&g&&S(this.props),(h||!g)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(c.PlainText,{value:n,placeholder:Object(o.__)("Street Address","jetpack"),"aria-label":Object(o.__)("Street Address","jetpack"),onChange:function(e){return f({address:e})},onKeyDown:this.preventEnterKey}),Object(a.createElement)(c.PlainText,{value:r,placeholder:Object(o.__)("Address Line 2","jetpack"),"aria-label":Object(o.__)("Address Line 2","jetpack"),onChange:function(e){return f({addressLine2:e})},onKeyDown:this.preventEnterKey}),Object(a.createElement)(c.PlainText,{value:l,placeholder:Object(o.__)("Address Line 3","jetpack"),"aria-label":Object(o.__)("Address Line 3","jetpack"),onChange:function(e){return f({addressLine3:e})},onKeyDown:this.preventEnterKey}),Object(a.createElement)(c.PlainText,{value:u,placeholder:Object(o.__)("City","jetpack"),"aria-label":Object(o.__)("City","jetpack"),onChange:function(e){return f({city:e})},onKeyDown:this.preventEnterKey}),Object(a.createElement)(c.PlainText,{value:p,placeholder:Object(o.__)("State/Province/Region","jetpack"),"aria-label":Object(o.__)("State/Province/Region","jetpack"),onChange:function(e){return f({region:e})},onKeyDown:this.preventEnterKey}),Object(a.createElement)(c.PlainText,{value:d,placeholder:Object(o.__)("Postal/Zip Code","jetpack"),"aria-label":Object(o.__)("Postal/Zip Code","jetpack"),onChange:function(e){return f({postal:e})},onKeyDown:this.preventEnterKey}),Object(a.createElement)(c.PlainText,{value:m,placeholder:Object(o.__)("Country","jetpack"),"aria-label":Object(o.__)("Country","jetpack"),onChange:function(e){return f({country:e})},onKeyDown:this.preventEnterKey}),v))}}]),t}(a.Component),T={title:Object(o.__)("Address","jetpack"),description:Object(o.__)("Lets you add a physical address with Schema markup.","jetpack"),keywords:[Object(o._x)("location","block search term","jetpack"),Object(o._x)("direction","block search term","jetpack"),Object(o._x)("place","block search term","jetpack")],icon:Object(m.a)(Object(a.createElement)(a.Fragment,null,Object(a.createElement)(i.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"}),Object(a.createElement)(i.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:A,save:S},N=n(60),P=n.n(N),M=function(e){var t=e.attributes.email,n=e.className;return t&&Object(a.createElement)("div",{className:n},t.split(/(\s+)/).map((function(e,t){var n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&P.a.validate(n)?e===n?Object(a.createElement)("a",{href:"mailto:".concat(e),key:t},e):Object(a.createElement)(a.Fragment,{key:t},Object(a.createElement)("a",{href:"mailto:".concat(e),key:t},n),Object(a.createElement)(a.Fragment,null,e.slice(-(e.length-n.length)))):Object(a.createElement)(a.Fragment,{key:t},e)})))},B=function(e,t,n,r,o){var i=t.isSelected,l=t.attributes[e];return Object(a.createElement)("div",{className:"jetpack-".concat(e,i?"-block is-selected":"-block")},!i&&""!==l&&r(t),(i||""===l)&&Object(a.createElement)(c.PlainText,{value:l,placeholder:n,"aria-label":n,onChange:o}))},I=function(e){var t=e.setAttributes;return B("email",e,Object(o.__)("Email","jetpack"),M,(function(e){return t({email:e})}))},F={title:Object(o.__)("Email Address","jetpack"),description:Object(o.__)("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",Object(o._x)("message","block search term","jetpack")],icon:Object(m.a)(Object(a.createElement)(i.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,save:M,parent:["jetpack/contact-info"]};var R=function(e){var t=e.attributes.phone,n=e.className;return t&&Object(a.createElement)("div",{className:n},function(e){var t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;var n=e.indexOf(t[0]),r=n?e.substring(n-1):e,o=n?e.substring(0,n):"",c=r.replace(/\D/g,"");return/[0-9/+/(]/.test(r[0])?(o=o.slice(0,-1),"+"===r[0]&&(c="+"+c)):r=r.substring(1),[o.trim()?Object(a.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,Object(a.createElement)("a",{key:"phoneNumber",href:"tel:".concat(c)},r)]}(t))},L=function(e){var t=e.setAttributes;return B("phone",e,Object(o.__)("Phone number","jetpack"),R,(function(e){return t({phone:e})}))},D={title:Object(o.__)("Phone Number","jetpack"),description:Object(o.__)("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[Object(o._x)("mobile","block search term","jetpack"),Object(o._x)("telephone","block search term","jetpack"),Object(o._x)("cell","block search term","jetpack")],icon:Object(m.a)(Object(a.createElement)(i.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:L,save:R},z=n(17),U=Object(m.a)(Object(a.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"})),V={title:Object(o.__)("Contact Info","jetpack"),description:Object(o.__)("Lets you add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[Object(o._x)("email","block search term","jetpack"),Object(o._x)("phone","block search term","jetpack"),Object(o._x)("address","block search term","jetpack")],icon:{src:U,foreground:Object(z.a)()},category:"grow",supports:{align:["wide","full"],html:!1},attributes:{},edit:d,save:function(e){var t=e.className;return Object(a.createElement)("div",{className:t},Object(a.createElement)(c.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"}}]}},q=[{name:"address",settings:T},{name:"email",settings:F},{name:"phone",settings:D}];Object(r.a)("contact-info",V,q)},function(e,t,n){"use strict";n.r(t);var r=n(21),a=n.n(r),o=n(9),c=n.n(o),i=n(7),l=n.n(i),s=n(23),u=n.n(s),p=n(0),d=n(2),m=n(34),b=n(11),h=n(52),f=n(5),g=n(30),j=n(18),v=n(1),k=n(4),y=n(27),_=n.n(y),O=n(12),w=n.n(O),E=n(16),C=n.n(E),x=n(13),S=n.n(x),A=n(14),T=n.n(A),N=n(6),P=n.n(N),M=n(15),B=n.n(M),I=n(3),F=n.n(I),R=n(22),L=n.n(R),D=n(10),z=n(8),U=n.n(z),V=function(e){var t=e.text;return Object(p.createElement)("div",{className:"wp-block-embed is-loading"},Object(p.createElement)(d.Spinner,null),Object(p.createElement)("p",null,t))},q=n(28),H=function(e,t){var n=t.autoplay,r=t.controls,a=t.loop,o=t.muted,c=t.poster,i=t.preload;if(!e)return null;var s=l()({},n&&{autoPlay:!0},{},!r&&{controls:!1},{},a&&{loop:!0},{},o&&{muted:!0,persistVolume:!1},{},c&&{posterUrl:c},{},"none"!==i&&{preloadContent:i});return Object(q.addQueryArgs)("https://videopress.com/v/".concat(e),s)},G=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],W=function(e){var t=G.reduce((function(e,t){return e[t.className]=!1,e}),{"wp-has-aspect-ratio":!1});return U()(e,t)};function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return W(t);var r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;var a=r.body.querySelector("iframe");if(a&&a.height&&a.width)for(var o=(a.width/a.height).toFixed(2),c=0;c<G.length;c++){var i=G[c];if(o>=i.ratio)return U()(W(t),i.className,"wp-has-aspect-ratio")}return t}var K=["image"],Z=f.__experimentalBlock?f.__experimentalBlock.figure:"figure",J=Object(j.createHigherOrderComponent)(Object(j.compose)([Object(D.withSelect)((function(e,t){var n=t.attributes,r=n.autoplay,a=n.controls,o=n.guid,c=n.loop,i=n.muted,l=n.poster,s=n.preload,u=n.src,p=e("core"),d=p.getEmbedPreview,b=p.isRequestingEmbedPreview,h=H(o,{autoplay:r,controls:a,loop:c,muted:i,poster:l,preload:s}),f=!!h&&d(h);return{isFetchingPreview:!!h&&b(h),isUploading:Object(m.isBlobURL)(u),preview:f,url:h}})),Object(D.withDispatch)((function(e){return{invalidateCachedEmbedPreview:function(t){e("core/data").invalidateResolution("core","getEmbedPreview",[t])}}})),j.withInstanceId,function(e){return function(t){function n(){var e;return w()(this,n),e=S()(this,T()(n).apply(this,arguments)),F()(P()(e),"hideOverlay",(function(){e.setState({interactive:!0})})),F()(P()(e),"setRating",_()(regeneratorRuntime.mark((function t(){var n,r,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(k.get)(e.props,"attributes.id"),t.next=3,e.requestMedia(n);case 3:r=t.sent,(a=Object(k.get)(r,"jetpack_videopress.rating"))&&e.setState({rating:a});case 6:case"end":return t.stop()}}),t)})))),F()(P()(e),"fallbackToCore",(function(){e.props.setAttributes({guid:void 0}),e.setState({fallback:!0})})),F()(P()(e),"setGuid",_()(regeneratorRuntime.mark((function t(){var n,r,a,o,c,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props,r=n.attributes,a=n.setAttributes,o=r.id){t.next=5;break}return a({guid:void 0}),t.abrupt("return");case 5:return t.prev=5,t.next=8,e.requestMedia(o);case 8:if(null!==(c=t.sent)){t.next=11;break}return t.abrupt("return");case 11:(i=Object(k.get)(c,"jetpack_videopress.guid"))?a({guid:i}):e.fallbackToCore(),t.next=19;break;case 15:t.prev=15,t.t0=t.catch(5),e.setState({isFetchingMedia:!1}),e.fallbackToCore();case 19:case"end":return t.stop()}}),t,null,[[5,15]])})))),F()(P()(e),"requestMedia",function(){var t=_()(regeneratorRuntime.mark((function t(n){var r,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return",null);case 2:if(null===e.state.media||e.state.lastRequestedMediaId!==n){t.next=4;break}return t.abrupt("return",e.state.media);case 4:return e.setState({isFetchingMedia:!0}),t.next=7,L()({path:"/wp/v2/media/".concat(n)});case 7:if(r=t.sent,e.setState({isFetchingMedia:!1}),a=e.props.attributes.id,n===a){t.next=12;break}return t.abrupt("return",null);case 12:return e.setState({media:r,lastRequestedMediaId:n}),t.abrupt("return",r);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),F()(P()(e),"switchToEditing",(function(){e.props.setAttributes({id:void 0,guid:void 0,src:void 0})})),F()(P()(e),"onSelectPoster",(function(t){(0,e.props.setAttributes)({poster:t.url})})),F()(P()(e),"onRemovePoster",(function(){(0,e.props.setAttributes)({poster:""}),e.posterImageButton.current.focus()})),F()(P()(e),"toggleAttribute",(function(t){return function(n){e.props.setAttributes(F()({},t,n))}})),F()(P()(e),"getAutoplayHelp",(function(e){return e?Object(v.__)("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null})),F()(P()(e),"onChangeRating",(function(t){var n=e.props.attributes.id,r=e.state.rating;if(n&&-1!==Object(k.indexOf)(["G","PG-13","R-17","X-18"],t)){e.setState({isUpdatingRating:!0,rating:t});var a=function(){return e.setState({rating:r})};L()({path:"/wpcom/v2/videopress/meta",method:"POST",data:{id:n,rating:t}}).then((function(e){status in e&&200!==e.status&&a()})).catch((function(){return a()})).finally((function(){return e.setState({isUpdatingRating:!1})}))}})),e.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1},e.posterImageButton=Object(p.createRef)(),e}var r,a;return B()(n,t),C()(n,[{key:"componentDidMount",value:(a=_()(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.props.attributes.guid){e.next=4;break}return e.next=4,this.setGuid();case 4:this.setRating();case 5:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=_()(regeneratorRuntime.mark((function e(t){var n,r,a,o,c,i,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props,r=n.attributes,a=n.invalidateCachedEmbedPreview,o=n.preview,c=n.setAttributes,i=n.url,r.id===t.attributes.id){e.next=5;break}return e.next=4,this.setGuid();case 4:this.setRating();case 5:i&&i!==t.url&&a(i),o&&(l=$(o.html,U()("wp-block-embed","is-type-video","is-provider-videopress"),!0),c({videoPressClassNames:l}));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,n=this.props,r=n.attributes,a=n.instanceId,o=n.isFetchingPreview,c=n.isSelected,i=n.isUploading,l=n.preview,s=n.setAttributes,u=this.state,m=u.fallback,b=u.isFetchingMedia,h=u.isUpdatingRating,g=u.interactive,j=u.rating,k=r.align,y=r.autoplay,_=r.caption,O=r.className,w=r.controls,E=r.loop,C=r.muted,x=r.poster,S=r.preload,A=r.videoPressClassNames,T="video-block__poster-image-description-".concat(a),N=Object(p.createElement)(p.Fragment,null,Object(p.createElement)(f.BlockControls,null,Object(p.createElement)(d.Toolbar,null,Object(p.createElement)(d.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(v.__)("Edit video","jetpack"),onClick:this.switchToEditing,icon:"edit"}))),Object(p.createElement)(f.InspectorControls,null,Object(p.createElement)(d.PanelBody,{title:Object(v.__)("Video Settings","jetpack")},Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Autoplay","jetpack"),onChange:this.toggleAttribute("autoplay"),checked:y,help:this.getAutoplayHelp}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Loop","jetpack"),onChange:this.toggleAttribute("loop"),checked:E}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:C}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Playback Controls","jetpack"),onChange:this.toggleAttribute("controls"),checked:w}),Object(p.createElement)(d.SelectControl,{label:Object(v.__)("Preload","jetpack"),value:S,onChange:function(e){return s({preload:e})},options:[{value:"auto",label:Object(v._x)("Auto","VideoPress preload setting","jetpack")},{value:"metadata",label:Object(v._x)("Metadata","VideoPress preload setting","jetpack")},{value:"none",label:Object(v._x)("None","VideoPress preload setting","jetpack")}]}),Object(p.createElement)(f.MediaUploadCheck,null,Object(p.createElement)(d.BaseControl,{className:"editor-video-poster-control",label:Object(v.__)("Poster Image","jetpack")},Object(p.createElement)(f.MediaUpload,{title:Object(v.__)("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:K,render:function(e){var n=e.open;return Object(p.createElement)(d.Button,{isDefault:!0,onClick:n,ref:t.posterImageButton,"aria-describedby":T},x?Object(v.__)("Replace image","jetpack"):Object(v.__)("Select Poster Image","jetpack"))}}),Object(p.createElement)("p",{id:T,hidden:!0},x?Object(v.sprintf)(Object(v.__)("The current poster image url is %s","jetpack"),x):Object(v.__)("There is no poster image currently selected","jetpack")),!!x&&Object(p.createElement)(d.Button,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},Object(v.__)("Remove Poster Image","jetpack"))))),Object(p.createElement)(d.PanelBody,{title:Object(v.__)("Video File Settings","jetpack")},Object(p.createElement)(d.SelectControl,{label:Object(v._x)("Rating","The age rating for this video.","jetpack"),value:j,disabled:b||h,options:[{label:Object(v._x)("G",'Video rating for "General Audiences".',"jetpack"),value:"G"},{label:Object(v._x)("PG-13",'Video rating for "Parental Guidance", unsuitable for children under 13.',"jetpack"),value:"PG-13"},{label:Object(v._x)("R",'Video rating for "Restricted", not recommended for children under 17.',"jetpack"),value:"R-17"},{label:Object(v._x)("X",'Video rating for "Explicit" content.',"jetpack"),value:"X-18"}],onChange:this.onChangeRating}))));if(i)return Object(p.createElement)(p.Fragment,null,N,Object(p.createElement)(V,{text:Object(v.__)("Uploadingโฆ","jetpack")}));if(b||o)return Object(p.createElement)(p.Fragment,null,N,Object(p.createElement)(V,{text:Object(v.__)("Generating previewโฆ","jetpack")}));if(m||!l)return Object(p.createElement)(e,this.props);var P=l.html,M=l.scripts;return Object(p.createElement)(p.Fragment,null,N,Object(p.createElement)(Z,{className:U()("wp-block-video",O,A,F()({},"align".concat(k),k))},Object(p.createElement)("div",{className:"wp-block-embed__wrapper"},Object(p.createElement)(d.SandBox,{html:P,scripts:M,type:A})),!g&&Object(p.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),(!f.RichText.isEmpty(_)||c)&&Object(p.createElement)(f.RichText,{tagName:"figcaption",placeholder:Object(v.__)("Write captionโฆ","jetpack"),value:_,onChange:function(e){return s({caption:e})},inlineToolbar:!0})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),n}(p.Component)}]),"withVideoPressEdit"),Y=Object(j.createHigherOrderComponent)((function(e){return function(t){var n=t.attributes,r=(n=void 0===n?{}:n).autoplay,a=n.caption,o=n.controls,c=n.guid,i=n.loop,l=n.muted,s=n.poster,u=n.preload,d=n.videoPressClassNames,m=n.className,b=n.align;if(!c)return e(t);var h=H(c,{autoplay:r,controls:o,loop:i,muted:l,poster:s,preload:u});return Object(p.createElement)("figure",{className:U()("wp-block-video",m,d,F()({},"align".concat(b),b))},Object(p.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(h,"\n")),!f.RichText.isEmpty(a)&&Object(p.createElement)(f.RichText.Content,{tagName:"figcaption",value:a}))}}),"withVideoPressSave"),Q=n(48);var X={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"}},support:{reusable:!1},save:function(e){var t=e.attributes,n=t.caption,r=t.guid;if(!r)return null;var a="https://videopress.com/v/".concat(r);return Object(p.createElement)("figure",{className:"wp-block-embed is-type-video is-provider-videopress"},Object(p.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(a,"\n")),!f.RichText.isEmpty(n)&&Object(p.createElement)(f.RichText.Content,{tagName:"figcaption",value:n}))},isDeprecation:!0};var ee=n(105),te=n.n(ee),ne=n(80),re=n.n(ne),ae=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],oe={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:function(e){var t=e.videoPressClassNames;return e.guid&&void 0===t},migrate:function(e){var t=e.className,n=e.videoPressClassNames;return l()({},e,{},function(e,t){var n=ae.reduce((function(e,t){return e[t.className]=!1,e}),{"wp-has-aspect-ratio":!1}),r=te()(e,l()({},n,{"wp-block-embed":!1,"is-type-video":!1,"is-provider-videopress":!1})),a=new re.a(r),o=te()(e,t);return a.forEach((function(e){o=o.replace(e,"")})),{className:r,videoPressClassNames:o.trim()}}(t,n))},save:function(e){var t=e.attributes,n=(t=void 0===t?{}:t).autoplay,r=t.caption,a=t.controls,o=t.guid,c=t.loop,i=t.muted,s=t.poster,u=t.preload,d=t.videoPressClassNames;if(!o)return null;var m=function(e,t){var n=t.autoplay,r=t.controls,a=t.loop,o=t.muted,c=t.poster,i=t.preload;if(!e)return null;var s=l()({},n&&{autoPlay:!0},{},!r&&{controls:!1},{},a&&{loop:!0},{},o&&{muted:!0,persistVolume:!1},{},c&&{posterUrl:c},{},"none"!==i&&{preloadContent:i});return Object(q.addQueryArgs)("https://videopress.com/v/".concat(e),s)}(o,{autoplay:n,controls:a,loop:c,muted:i,poster:s,preload:u});return Object(p.createElement)("figure",{className:d},Object(p.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(m,"\n")),!f.RichText.isEmpty(r)&&Object(p.createElement)(f.RichText.Content,{tagName:"figcaption",value:r}))},isDeprecation:!0},ce=n(24),ie=n(93),le=(n(307),Object(j.createHigherOrderComponent)((function(e){return function(t){return"core/video"!==Object(f.useBlockEditContext)().name?Object(p.createElement)(e,t):Object(p.createElement)(e,u()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),Object(p.createElement)(d.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",isSecondary:!0},Object(v.__)("Media Library","jetpack")),Object(p.createElement)(d.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",isSecondary:!0},Object(v.__)("Upload","jetpack")))}}),"videoPressNoPlanMediaPlaceholder")),se=function(e,t,n){var r;return"core/video"!==t.name||!n.guid||(null===(r=n.className)||void 0===r?void 0:r.indexOf("wp-block-video"))>=0||n.videoPressClassNames||(e.className=e.className.replace("wp-block-video","").trim()),e};Object(g.addFilter)("blocks.registerBlockType","jetpack/videopress",(function(e,t){if("core/video"!==t||e.isDeprecation)return e;var n=e.attributes,r=e.deprecated,o=e.edit,i=e.save,s=e.supports,u=e.transforms,p=Object(Q.a)("videopress"),d=p.available,f=p.unavailableReason;return Object(ce.b)()&&["missing_plan","unknown"].includes(f)&&(Object(g.addFilter)("editor.MediaPlaceholder","jetpack/videopress",le),Object(g.addFilter)("editor.BlockListBlock","jetpack/videopress-with-has-warning-is-interactive-class-names",Object(ie.a)("core/video"))),Object(g.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",se,20),d||["missing_plan","missing_module","unknown"].includes(f)?l()({},e,{attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"}},transforms:l()({},u,{from:[{type:"files",isMatch:function(e){return Object(k.every)(e,(function(e){return 0===e.type.indexOf("video/")}))},priority:9,transform:function(e,t){var n=[];return e.forEach((function(e){var r=Object(b.createBlock)("core/video",{src:Object(m.createBlobURL)(e)});Object(h.mediaUpload)({filesList:[e],onFileChange:function(e){var n=c()(e,1)[0],a=n.id,o=n.url;t(r.clientId,{id:a,src:o})},allowedTypes:["video"]}),n.push(r)})),n}}]}),supports:l()({},s,{reusable:!1}),edit:J(o),save:Y(i),deprecated:[].concat(a()(r||[]),[{attributes:n,isEligible:function(e){return!e.guid},save:i,supports:s,isDeprecation:!0},oe,X])}):e}),5)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=["USD","EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"],l=n(24),s=n(17),u=n(7),p=n.n(u),d=n(12),m=n.n(d),b=n(16),h=n.n(b),f=n(13),g=n.n(f),j=n(14),v=n.n(j),k=n(6),y=n.n(k),_=n(15),O=n.n(_),w=n(3),E=n.n(w),C=n(8),x=n.n(C),S=n(60),A=n.n(S),T=n(4),N=n(54),P=n(18),M=n(10),B=n(5),I=n(49),F=(n(301),n(149)),R=n.n(F),L=n(150),D=n.n(L),z=function(e){var t=e.title,n=void 0===t?"":t,r=e.content,c=void 0===r?"":r,i=e.formattedPrice,l=void 0===i?"":i,s=e.multiple,u=void 0!==s&&s,p=e.featuredMediaUrl,d=void 0===p?null:p,m=e.featuredMediaTitle,b=void 0===m?null:m;return Object(a.createElement)("div",{className:"jetpack-simple-payments-wrapper"},Object(a.createElement)("div",{className:"jetpack-simple-payments-product"},d&&Object(a.createElement)("div",{className:"jetpack-simple-payments-product-image"},Object(a.createElement)("figure",{className:"jetpack-simple-payments-image"},Object(a.createElement)("img",{src:d,alt:b}))),Object(a.createElement)("div",{className:"jetpack-simple-payments-details"},n&&Object(a.createElement)("div",{className:"jetpack-simple-payments-title"},Object(a.createElement)("p",null,n)),c&&Object(a.createElement)("div",{className:"jetpack-simple-payments-description"},Object(a.createElement)("p",null,c)),l&&Object(a.createElement)("div",{className:"jetpack-simple-payments-price"},Object(a.createElement)("p",null,l)),Object(a.createElement)("div",{className:"jetpack-simple-payments-purchase-box"},u&&Object(a.createElement)("div",{className:"jetpack-simple-payments-items"},Object(a.createElement)("input",{className:"jetpack-simple-payments-items-number",readOnly:!0,type:"number",value:"1"})),Object(a.createElement)("div",{className:"jetpack-simple-payments-button"},Object(a.createElement)("img",{alt:Object(o.__)("Pay with PayPal","jetpack"),src:R.a,srcSet:"".concat(D.a," 2x")}))))))},U=n(64),V=function(e){return function(t){return e({featuredMediaId:Object(T.get)(t,"id",0),featuredMediaUrl:Object(T.get)(t,"url",null),featuredMediaTitle:Object(T.get)(t,"title",null)})}},q=function(e){var t=e.featuredMediaId,n=e.featuredMediaUrl,r=e.featuredMediaTitle,i=e.setAttributes;return t?Object(a.createElement)("div",null,Object(a.createElement)(a.Fragment,null,Object(a.createElement)(B.BlockControls,null,Object(a.createElement)(c.Toolbar,null,Object(a.createElement)(B.MediaUpload,{onSelect:V(i),allowedTypes:["image"],value:t,render:function(e){var t=e.open;return Object(a.createElement)(U.a,{label:Object(o.__)("Edit Image","jetpack"),onClick:t})}}),Object(a.createElement)(c.ToolbarButton,{icon:"trash",title:Object(o.__)("Remove Image","jetpack"),onClick:function(){return i({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}}))),Object(a.createElement)("figure",null,Object(a.createElement)("img",{src:n,alt:r})))):Object(a.createElement)(B.MediaPlaceholder,{icon:Object(a.createElement)(B.BlockIcon,{icon:"format-image"}),labels:{title:Object(o.__)("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:V(i)})},H=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},G=function(){var e,t,n,r,a,o,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",i=null===(e=window)||void 0===e||null===(t=e.window)||void 0===t?void 0:t.navigator;return(null==i||null===(n=i.languages)||void 0===n?void 0:n.length)?i.languages[0]:null!==(r=null!==(a=null!==(o=null==i?void 0:i.userLanguage)&&void 0!==o?o:null==i?void 0:i.language)&&void 0!==a?a:null==i?void 0:i.browserLanguage)&&void 0!==r?r:c},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Object(N.b)(t),a=r.precision,o=r.symbol,c=e.toFixed(a);return n?"".concat(c," ").concat(Object(T.trimEnd)(o,".")):c},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!window.Intl||"function"!=typeof Intl.NumberFormat)return W(e,t,n);var r,a=Object(M.select)("core/block-editor").getSettings(),o=a.siteLocale,c=[o,G(),"en-US"],i={};n&&(i={style:"currency",currency:t});for(var l=0,s=c;l<s.length;l++){r=s[l];try{return Intl.NumberFormat(r,i).format(e)}catch(u){continue}}return W(e,t,n)},K=function(e){function t(){var e,n;m()(this,t);for(var r=arguments.length,l=new Array(r),s=0;s<r;s++)l[s]=arguments[s];return n=g()(this,(e=v()(t)).call.apply(e,[this].concat(l))),E()(y()(n),"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),E()(y()(n),"shouldInjectPaymentAttributes",!!n.props.attributes.productId),E()(y()(n),"validateAttributes",(function(){var e=n.validatePrice(),t=n.validateTitle(),r=n.validateEmail(),a=n.validateCurrency();return e&&t&&r&&a})),E()(y()(n),"validateCurrency",(function(){var e=n.props.attributes.currency;return i.includes(e)})),E()(y()(n),"validatePrice",(function(){var e=n.props.attributes,t=e.currency,r=e.price,a=Object(N.b)(t).precision;return r&&0!==parseFloat(r)?Number.isNaN(parseFloat(r))?(n.setState({fieldPriceError:Object(o.__)("Invalid price","jetpack")}),!1):parseFloat(r)<0?(n.setState({fieldPriceError:Object(o.__)("Your price is negative โ enter a positive number so people can pay the right amount.","jetpack")}),!1):H(r)>a?0===a?(n.setState({fieldPriceError:Object(o.__)("We know every penny counts, but prices in this currency canโt contain decimal values.","jetpack")}),!1):(n.setState({fieldPriceError:Object(o.sprintf)(Object(o._n)("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",a,"jetpack"),a)}),!1):(n.state.fieldPriceError&&n.setState({fieldPriceError:null}),!0):(n.setState({fieldPriceError:Object(o.__)("If youโre selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),E()(y()(n),"validateEmail",(function(){var e=n.props.attributes.email;return e?A.a.validate(e)?(n.state.fieldEmailError&&n.setState({fieldEmailError:null}),!0):(n.setState({fieldEmailError:Object(o.sprintf)(Object(o.__)("%s is not a valid email address.","jetpack"),e)}),!1):(n.setState({fieldEmailError:Object(o.__)("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),E()(y()(n),"validateTitle",(function(){return n.props.attributes.title?(n.state.fieldTitleError&&n.setState({fieldTitleError:null}),!0):(n.setState({fieldTitleError:Object(o.__)("Please add a brief title so that people know what theyโre paying for.","jetpack")}),!1)})),E()(y()(n),"handleEmailChange",(function(e){n.props.setAttributes({email:e}),n.setState({fieldEmailError:null})})),E()(y()(n),"handleContentChange",(function(e){n.props.setAttributes({content:e})})),E()(y()(n),"handlePriceChange",(function(e){e=parseFloat(e),isNaN(e)?n.props.setAttributes({price:void 0}):n.props.setAttributes({price:e}),n.setState({fieldPriceError:null})})),E()(y()(n),"handleCurrencyChange",(function(e){n.props.setAttributes({currency:e})})),E()(y()(n),"handleMultipleChange",(function(e){n.props.setAttributes({multiple:!!e})})),E()(y()(n),"handleTitleChange",(function(e){n.props.setAttributes({title:e}),n.setState({fieldTitleError:null})})),E()(y()(n),"getCurrencyList",i.map((function(e){var t=Object(N.b)(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(T.trimEnd)(t,"."))}}))),E()(y()(n),"renderSettings",(function(){return Object(a.createElement)(B.InspectorControls,null,Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Settings","jetpack"),initialOpen:!1},Object(a.createElement)(c.BaseControl,{label:Object(o.__)("Purchase link text","jetpack"),help:Object(o.__)("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"},Object(a.createElement)(c.TextControl,{placeholder:Object(o.__)("Click here to purchase","jetpack"),onChange:function(e){return n.props.setAttributes({postLinkText:e})},value:n.props.attributes.postLinkText}))))})),n}return O()(t,e),h()(t,[{key:"componentDidMount",value:function(){this.injectPaymentAttributes();var e=this.props,t=e.attributes,n=e.hasPublishAction,r=e.postLinkUrl,a=e.setAttributes;!t.productId&&n&&this.saveProduct();var c=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(c||i)&&a(p()({},c&&{postLinkUrl:r},{},i&&{postLinkText:Object(o.__)("Click here to purchase.","jetpack")}))}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.hasPublishAction,r=t.isSelected,a=t.postLinkUrl,c=t.setAttributes;Object(T.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&n&&this.validateAttributes()?this.saveProduct():e.isSelected&&!r&&this.validateAttributes();var i=a&&a!==this.props.attributes.postLinkUrl,l=!this.props.attributes.postLinkText;(i||l)&&c(p()({},i&&{postLinkUrl:a},{},l&&{postLinkText:Object(o.__)("Click here to purchase.","jetpack")}))}},{key:"injectPaymentAttributes",value:function(){var e=this.props,t=e.simplePayment,n=e.featuredMedia;if(this.shouldInjectPaymentAttributes&&!Object(T.isEmpty)(t)){var r=this.props,a=r.attributes,o=r.setAttributes,c=a.content,i=a.currency,l=a.email,s=a.featuredMediaId,u=a.featuredMediaUrl,p=a.featuredMediaTitle,d=a.multiple,m=a.price,b=a.title;o({content:Object(T.get)(t,["content","raw"],c),currency:Object(T.get)(t,["meta","spay_currency"],i),email:Object(T.get)(t,["meta","spay_email"],l),featuredMediaId:Object(T.get)(t,["featured_media"],s),featuredMediaUrl:Object(T.get)(n,"url",u),featuredMediaTitle:Object(T.get)(n,"title",p),multiple:Boolean(Object(T.get)(t,["meta","spay_multiple"],Boolean(d))),price:Object(T.get)(t,["meta","spay_price"],m||void 0),title:Object(T.get)(t,["title","raw"],b)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}}},{key:"toApi",value:function(){var e=this.props.attributes,t=e.content,n=e.currency,r=e.email,a=e.featuredMediaId,o=e.multiple,c=e.price,i=e.productId;return{id:i,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:c},status:i?"publish":"draft",title:e.title}}},{key:"saveProduct",value:function(){var e=this;if(!this.state.isSavingProduct){var t=this.props,n=t.attributes,r=t.setAttributes,a=n.email,c=Object(M.dispatch)("core").saveEntityRecord;this.setState({isSavingProduct:!0},(function(){c("postType","jp_pay_product",e.toApi()).then((function(e){return e&&r({productId:e.id}),e})).catch((function(t){if(t&&t.data){var n=t.data.key;e.setState({fieldEmailError:"spay_email"===n?Object(o.sprintf)(Object(o.__)("%s is not a valid email address.","jetpack"),a):null,fieldPriceError:"spay_price"===n?Object(o.__)("Invalid price.","jetpack"):null})}})).finally((function(){e.setState({isSavingProduct:!1})}))}))}}},{key:"render",value:function(){var e=this.state,t=e.fieldEmailError,n=e.fieldPriceError,r=e.fieldTitleError,i=this.props,l=i.attributes,s=i.instanceId,u=i.isSelected,p=i.setAttributes,d=i.simplePayment,m=l.content,b=l.currency,h=l.email,f=l.featuredMediaId,g=l.featuredMediaUrl,j=l.featuredMediaTitle,v=l.multiple,k=l.price,y=l.productId,_=l.title,O=y&&Object(T.isEmpty)(d);if(!u&&O)return Object(a.createElement)("div",{className:"simple-payments__loading"},Object(a.createElement)(z,{"aria-busy":"true",content:"โโโโโ",formattedPrice:"โโโโโ",title:"โโโโโ"}));if(!u&&h&&k&&_&&!t&&!n&&!r)return Object(a.createElement)(z,{"aria-busy":"false",content:m,featuredMediaUrl:g,featuredMediaTitle:j,formattedPrice:$(k,b),multiple:v,title:_});var w=O?c.Disabled:"div";return Object(a.createElement)(w,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),Object(a.createElement)(q,{featuredMediaId:f,featuredMediaUrl:g,featuredMediaTitle:j,setAttributes:p}),Object(a.createElement)("div",null,Object(a.createElement)(c.TextControl,{"aria-describedby":"".concat(s,"-title-error"),className:x()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":r}),label:Object(o.__)("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:Object(o.__)("Item name","jetpack"),required:!0,type:"text",value:_}),Object(a.createElement)(I.a,{id:"".concat(s,"-title-error"),isError:!0},r),Object(a.createElement)(c.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:Object(o.__)("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:Object(o.__)("Describe your item in a few words","jetpack"),"aria-label":Object(o.__)("Describe your item in a few words","jetpack"),value:m}),Object(a.createElement)("div",{className:"simple-payments__price-container"},Object(a.createElement)(c.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:Object(o.__)("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:b}),Object(a.createElement)(c.TextControl,{"aria-describedby":"".concat(s,"-price-error"),className:x()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":n}),label:Object(o.__)("Price","jetpack"),onChange:this.handlePriceChange,placeholder:$(0,b,!1),required:!0,step:"1",type:"number",value:k||""}),Object(a.createElement)(I.a,{id:"".concat(s,"-price-error"),isError:!0},n)),Object(a.createElement)("div",{className:"simple-payments__field-multiple"},Object(a.createElement)(c.ToggleControl,{checked:Boolean(v),label:Object(o.__)("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),Object(a.createElement)(c.TextControl,{"aria-describedby":"".concat(s,"-email-").concat(t?"error":"help"),className:x()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":t}),label:Object(o.__)("Email","jetpack"),onChange:this.handleEmailChange,placeholder:Object(o.__)("Email","jetpack"),required:!0,type:"text",value:h}),Object(a.createElement)(I.a,{id:"".concat(s,"-email-error"),isError:!0},t),Object(a.createElement)(I.a,{id:"".concat(s,"-email-help")},Object(o.__)("Enter the email address associated with your PayPal account. Donโt have an account?","jetpack")+" ",Object(a.createElement)(c.ExternalLink,{href:"https://www.paypal.com/"},Object(o.__)("Create one on PayPal","jetpack")))))}}]),t}(a.Component),Z=Object(M.withSelect)((function(e,t){var n=e("core"),r=n.getEntityRecord,a=n.getMedia,o=e("core/editor"),c=o.isSavingPost,i=o.getCurrentPost,l=t.attributes,s=l.productId,u=l.featuredMediaId,p=s?Object(T.pick)(r("postType","jp_pay_product",s),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,d=i();return{hasPublishAction:!!Object(T.get)(d,["_links","wp:action-publish"]),isSaving:!!c(),simplePayment:p,featuredMedia:u?a(u):null,postLinkUrl:d.link}})),J=Object(P.compose)(Z,P.withInstanceId)(K);var Y={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:function(e){var t=e.attributes.productId;return t?Object(a.createElement)(a.RawHTML,null,'[simple-payment id="'.concat(t,'"]')):null}},Q=function(e){function t(){var e,n;m()(this,t);for(var r=arguments.length,l=new Array(r),s=0;s<r;s++)l[s]=arguments[s];return n=g()(this,(e=v()(t)).call.apply(e,[this].concat(l))),E()(y()(n),"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),E()(y()(n),"shouldInjectPaymentAttributes",!!n.props.attributes.productId),E()(y()(n),"validateAttributes",(function(){var e=n.validatePrice(),t=n.validateTitle(),r=n.validateEmail(),a=n.validateCurrency();return e&&t&&r&&a})),E()(y()(n),"validateCurrency",(function(){var e=n.props.attributes.currency;return i.includes(e)})),E()(y()(n),"validatePrice",(function(){var e=n.props.attributes,t=e.currency,r=e.price,a=Object(N.b)(t).precision;return r&&0!==parseFloat(r)?Number.isNaN(parseFloat(r))?(n.setState({fieldPriceError:Object(o.__)("Invalid price","jetpack")}),!1):parseFloat(r)<0?(n.setState({fieldPriceError:Object(o.__)("Your price is negative โ enter a positive number so people can pay the right amount.","jetpack")}),!1):H(r)>a?0===a?(n.setState({fieldPriceError:Object(o.__)("We know every penny counts, but prices in this currency canโt contain decimal values.","jetpack")}),!1):(n.setState({fieldPriceError:Object(o.sprintf)(Object(o._n)("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",a,"jetpack"),a)}),!1):(n.state.fieldPriceError&&n.setState({fieldPriceError:null}),!0):(n.setState({fieldPriceError:Object(o.__)("If youโre selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),E()(y()(n),"validateEmail",(function(){var e=n.props.attributes.email;return e?A.a.validate(e)?(n.state.fieldEmailError&&n.setState({fieldEmailError:null}),!0):(n.setState({fieldEmailError:Object(o.sprintf)(Object(o.__)("%s is not a valid email address.","jetpack"),e)}),!1):(n.setState({fieldEmailError:Object(o.__)("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),E()(y()(n),"validateTitle",(function(){return n.props.attributes.title?(n.state.fieldTitleError&&n.setState({fieldTitleError:null}),!0):(n.setState({fieldTitleError:Object(o.__)("Please add a brief title so that people know what theyโre paying for.","jetpack")}),!1)})),E()(y()(n),"handleEmailChange",(function(e){n.props.setAttributes({email:e}),n.setState({fieldEmailError:null})})),E()(y()(n),"handleContentChange",(function(e){n.props.setAttributes({content:e})})),E()(y()(n),"handlePriceChange",(function(e){e=parseFloat(e),isNaN(e)?n.props.setAttributes({price:void 0}):n.props.setAttributes({price:e}),n.setState({fieldPriceError:null})})),E()(y()(n),"handleCurrencyChange",(function(e){n.props.setAttributes({currency:e})})),E()(y()(n),"handleMultipleChange",(function(e){n.props.setAttributes({multiple:!!e})})),E()(y()(n),"handleTitleChange",(function(e){n.props.setAttributes({title:e}),n.setState({fieldTitleError:null})})),E()(y()(n),"getCurrencyList",i.map((function(e){var t=Object(N.b)(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(T.trimEnd)(t,"."))}}))),E()(y()(n),"renderSettings",(function(){return Object(a.createElement)(B.InspectorControls,null,Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Settings","jetpack"),initialOpen:!1},Object(a.createElement)(c.BaseControl,{label:Object(o.__)("Purchase link text","jetpack"),help:Object(o.__)("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"},Object(a.createElement)(c.TextControl,{placeholder:Object(o.__)("Click here to purchase","jetpack"),onChange:function(e){return n.props.setAttributes({postLinkText:e})},value:n.props.attributes.postLinkText}))))})),n}return O()(t,e),h()(t,[{key:"componentDidMount",value:function(){this.injectPaymentAttributes();var e=this.props,t=e.attributes,n=e.hasPublishAction,r=e.postLinkUrl,a=e.setAttributes;!t.productId&&n&&this.saveProduct();var c=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(c||i)&&a(p()({},c&&{postLinkUrl:r},{},i&&{postLinkText:Object(o.__)("Click here to purchase.","jetpack")}))}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.hasPublishAction,r=t.isSelected,a=t.postLinkUrl,c=t.setAttributes;Object(T.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&n&&this.validateAttributes()?this.saveProduct():e.isSelected&&!r&&this.validateAttributes();var i=a&&a!==this.props.attributes.postLinkUrl,l=!this.props.attributes.postLinkText;(i||l)&&c(p()({},i&&{postLinkUrl:a},{},l&&{postLinkText:Object(o.__)("Click here to purchase.","jetpack")}))}},{key:"injectPaymentAttributes",value:function(){var e=this.props,t=e.simplePayment,n=e.featuredMedia;if(this.shouldInjectPaymentAttributes&&!Object(T.isEmpty)(t)){var r=this.props,a=r.attributes,o=r.setAttributes,c=a.content,i=a.currency,l=a.email,s=a.featuredMediaId,u=a.featuredMediaUrl,p=a.featuredMediaTitle,d=a.multiple,m=a.price,b=a.title;o({content:Object(T.get)(t,["content","raw"],c),currency:Object(T.get)(t,["meta","spay_currency"],i),email:Object(T.get)(t,["meta","spay_email"],l),featuredMediaId:Object(T.get)(t,["featured_media"],s),featuredMediaUrl:Object(T.get)(n,"url",u),featuredMediaTitle:Object(T.get)(n,"title",p),multiple:Boolean(Object(T.get)(t,["meta","spay_multiple"],Boolean(d))),price:Object(T.get)(t,["meta","spay_price"],m||void 0),title:Object(T.get)(t,["title","raw"],b)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}}},{key:"toApi",value:function(){var e=this.props.attributes,t=e.content,n=e.currency,r=e.email,a=e.featuredMediaId,o=e.multiple,c=e.price,i=e.productId;return{id:i,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:c},status:i?"publish":"draft",title:e.title}}},{key:"saveProduct",value:function(){var e=this;if(!this.state.isSavingProduct){var t=this.props,n=t.attributes,r=t.setAttributes,a=n.email,c=Object(M.dispatch)("core").saveEntityRecord;this.setState({isSavingProduct:!0},(function(){c("postType","jp_pay_product",e.toApi()).then((function(e){return e&&r({productId:e.id}),e})).catch((function(t){if(t&&t.data){var n=t.data.key;e.setState({fieldEmailError:"spay_email"===n?Object(o.sprintf)(Object(o.__)("%s is not a valid email address.","jetpack"),a):null,fieldPriceError:"spay_price"===n?Object(o.__)("Invalid price.","jetpack"):null})}})).finally((function(){e.setState({isSavingProduct:!1})}))}))}}},{key:"render",value:function(){var e=this.state,t=e.fieldEmailError,n=e.fieldPriceError,r=e.fieldTitleError,i=this.props,l=i.attributes,s=i.instanceId,u=i.isSelected,p=i.setAttributes,d=i.simplePayment,m=l.content,b=l.currency,h=l.email,f=l.featuredMediaId,g=l.featuredMediaUrl,j=l.featuredMediaTitle,v=l.multiple,k=l.price,y=l.productId,_=l.title,O=y&&Object(T.isEmpty)(d);if(!u&&O)return Object(a.createElement)("div",{className:"simple-payments__loading"},Object(a.createElement)(z,{"aria-busy":"true",content:"โโโโโ",formattedPrice:"โโโโโ",title:"โโโโโ"}));if(!u&&h&&k&&_&&!t&&!n&&!r)return Object(a.createElement)(z,{"aria-busy":"false",content:m,featuredMediaUrl:g,featuredMediaTitle:j,formattedPrice:W(k,b),multiple:v,title:_});var w=O?c.Disabled:"div";return Object(a.createElement)(w,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),Object(a.createElement)(q,{featuredMediaId:f,featuredMediaUrl:g,featuredMediaTitle:j,setAttributes:p}),Object(a.createElement)("div",null,Object(a.createElement)(c.TextControl,{"aria-describedby":"".concat(s,"-title-error"),className:x()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":r}),label:Object(o.__)("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:Object(o.__)("Item name","jetpack"),required:!0,type:"text",value:_}),Object(a.createElement)(I.a,{id:"".concat(s,"-title-error"),isError:!0},r),Object(a.createElement)(c.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:Object(o.__)("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:Object(o.__)("Describe your item in a few words","jetpack"),value:m}),Object(a.createElement)("div",{className:"simple-payments__price-container"},Object(a.createElement)(c.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:Object(o.__)("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:b}),Object(a.createElement)(c.TextControl,{"aria-describedby":"".concat(s,"-price-error"),className:x()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":n}),label:Object(o.__)("Price","jetpack"),onChange:this.handlePriceChange,placeholder:W(0,b,!1),required:!0,step:"1",type:"number",value:k||""}),Object(a.createElement)(I.a,{id:"".concat(s,"-price-error"),isError:!0},n)),Object(a.createElement)("div",{className:"simple-payments__field-multiple"},Object(a.createElement)(c.ToggleControl,{checked:Boolean(v),label:Object(o.__)("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),Object(a.createElement)(c.TextControl,{"aria-describedby":"".concat(s,"-email-").concat(t?"error":"help"),className:x()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":t}),label:Object(o.__)("Email","jetpack"),onChange:this.handleEmailChange,placeholder:Object(o.__)("Email","jetpack"),required:!0,type:"text",value:h}),Object(a.createElement)(I.a,{id:"".concat(s,"-email-error"),isError:!0},t),Object(a.createElement)(I.a,{id:"".concat(s,"-email-help")},Object(o.__)("Enter the email address associated with your PayPal account. Donโt have an account?","jetpack")+" ",Object(a.createElement)(c.ExternalLink,{href:"https://www.paypal.com/"},Object(o.__)("Create one on PayPal","jetpack")))))}}]),t}(a.Component),X=Object(M.withSelect)((function(e,t){var n=e("core"),r=n.getEntityRecord,a=n.getMedia,o=e("core/editor"),c=o.isSavingPost,i=o.getCurrentPost,l=t.attributes,s=l.productId,u=l.featuredMediaId,p=s?Object(T.pick)(r("postType","jp_pay_product",s),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,d=i();return{hasPublishAction:!!Object(T.get)(d,["_links","wp:action-publish"]),isSaving:!!c(),simplePayment:p,featuredMedia:u?a(u):null,postLinkUrl:d.link}})),ee=Object(P.compose)(X,P.withInstanceId)(Q);var te=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),ne=Object(l.b)()||Object(l.a)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",re={title:Object(o.__)("Pay with PayPal","jetpack"),description:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null,Object(o.__)("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),Object(a.createElement)("p",null,Object(o.__)("Good for collecting donations or payments for products and services.","jetpack")),Object(a.createElement)(c.ExternalLink,{href:ne},Object(o.__)("Support reference","jetpack"))),icon:{src:te,foreground:Object(s.a)()},category:"earn",keywords:[Object(o._x)("buy","block search term","jetpack"),Object(o._x)("commerce","block search term","jetpack"),Object(o._x)("products","block search term","jetpack"),Object(o._x)("purchase","block search term","jetpack"),Object(o._x)("sell","block search term","jetpack"),Object(o._x)("shop","block search term","jetpack"),Object(o._x)("simple","block search term","jetpack"),Object(o._x)("payments","block search term","jetpack"),"PayPal"],attributes:{currency:{type:"string",default:"USD"},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:Object(o.__)("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:function(e){var t=e.named.id;if(t){var n=parseInt(t,10);return n||void 0}}}}}]},edit:ee,save:function(e){var t=e.attributes,n=t.content,r=t.currency,o=t.featuredMediaUrl,c=t.featuredMediaTitle,i=t.postLinkUrl,l=t.postLinkText,s=t.price,u=t.productId,p=t.title;return u?Object(a.createElement)("div",{className:"jetpack-simple-payments-wrapper jetpack-simple-payments-".concat(u)},Object(a.createElement)("div",{className:"jetpack-simple-payments-product"},o&&Object(a.createElement)("div",{className:"jetpack-simple-payments-product-image"},Object(a.createElement)("div",{className:"jetpack-simple-payments-image"},Object(a.createElement)("figure",null,Object(a.createElement)("img",{src:o,alt:c})))),Object(a.createElement)("div",{className:"jetpack-simple-payments-details"},Object(a.createElement)("div",{className:"jetpack-simple-payments-title"},Object(a.createElement)("p",null,p)),Object(a.createElement)("div",{className:"jetpack-simple-payments-description"},Object(a.createElement)("p",null,n)),Object(a.createElement)("div",{className:"jetpack-simple-payments-price"},Object(a.createElement)("p",null,W(s,r))),Object(a.createElement)("a",{className:"jetpack-simple-payments-purchase",href:i,target:"_blank",rel:"noopener noreferrer"},l)))):null},supports:{className:!1,customClassName:!1,html:!1,reusable:!1}},ae=n(151),oe=n.n(ae),ce=(n(302),Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}))),ie=Object(l.b)()||Object(l.a)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",le={title:Object(o.__)("Pay with PayPal","jetpack"),description:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null,Object(o.__)("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),Object(a.createElement)("p",null,Object(o.__)("Good for collecting donations or payments for products and services.","jetpack")),Object(a.createElement)(c.ExternalLink,{href:ie},Object(o.__)("Support reference","jetpack"))),icon:{src:ce,foreground:Object(s.a)()},category:"earn",keywords:[Object(o._x)("buy","block search term","jetpack"),Object(o._x)("commerce","block search term","jetpack"),Object(o._x)("products","block search term","jetpack"),Object(o._x)("purchase","block search term","jetpack"),Object(o._x)("sell","block search term","jetpack"),Object(o._x)("shop","block search term","jetpack"),Object(o._x)("simple","block search term","jetpack"),Object(o._x)("payments","block search term","jetpack"),"PayPal"],attributes:{currency:{type:"string",default:"USD"},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:Object(o.__)("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:function(e){var t=e.named.id;if(t){var n=parseInt(t,10);return n||void 0}}}}}]},edit:J,save:function(e){var t=e.attributes,n=t.content,r=t.currency,o=t.featuredMediaUrl,c=t.featuredMediaTitle,i=t.postLinkUrl,l=t.postLinkText,s=t.price,u=t.productId,p=t.title;return u?Object(a.createElement)("div",{className:"jetpack-simple-payments-wrapper jetpack-simple-payments-".concat(u)},Object(a.createElement)("div",{className:"jetpack-simple-payments-product"},o&&Object(a.createElement)("div",{className:"jetpack-simple-payments-product-image"},Object(a.createElement)("div",{className:"jetpack-simple-payments-image"},Object(a.createElement)("figure",null,Object(a.createElement)("img",{src:o,alt:c})))),Object(a.createElement)("div",{className:"jetpack-simple-payments-details"},Object(a.createElement)("div",{className:"jetpack-simple-payments-title"},Object(a.createElement)("p",null,p)),Object(a.createElement)("div",{className:"jetpack-simple-payments-description"},Object(a.createElement)("p",null,n)),Object(a.createElement)("div",{className:"jetpack-simple-payments-price"},Object(a.createElement)("p",null,$(s,r))),Object(a.createElement)("a",{className:"jetpack-simple-payments-purchase",href:i,target:"_blank",rel:"noopener noreferrer"},l)))):null},example:{attributes:{price:25,title:Object(o.__)("Jetpack t-shirt","jetpack"),content:Object(o.__)("Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","jetpack"),email:"jetpack@jetpack.com",featuredMediaUrl:oe.a}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},deprecated:[Y,re]};Object(r.a)("simple-payments",le)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(1),o=n(35),c={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:o.a},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:o.a},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"}},i=n(7),l=n.n(i),s=n(3),u=n.n(s),p=n(0),d=n(8),m=n.n(d),b=n(5),h=n(18),f=n(4),g=n(2),j=Object(g.withFallbackStyles)((function(e,t){var n=t.backgroundColor,r=t.textColor,a=Object(f.get)(n,"color"),o=!Object(f.get)(r,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:r||!o?void 0:getComputedStyle(o).color}})),v=!!b.__experimentalUseGradient;function k(e){var t=e.borderRadius,n=void 0===t?"":t,r=e.setAttributes,o=Object(p.useCallback)((function(e){return r({borderRadius:e})}),[r]);return Object(p.createElement)(g.PanelBody,{title:Object(a.__)("Border Settings","jetpack")},Object(p.createElement)(g.RangeControl,{allowReset:!0,initialPosition:5,label:Object(a.__)("Border radius","jetpack"),max:50,min:0,onChange:o,value:n}))}function y(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.gradientValue,c=e.setBackgroundColor,i=e.setGradient,l=e.setTextColor,s=e.textColor,u=Object(p.createElement)(b.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:n,fallbackTextColor:r,isLargeText:!1,textColor:s.color});return v?Object(p.createElement)(b.__experimentalPanelColorGradientSettings,{settings:[{colorValue:s.color,label:Object(a.__)("Text Color","jetpack"),onColorChange:l},{colorValue:t.color,gradientValue:o,label:Object(a.__)("Background","jetpack"),onColorChange:c,onGradientChange:i}],title:Object(a.__)("Background & Text Color","jetpack")},u):Object(p.createElement)(b.PanelColorSettings,{colorSettings:[{value:s.color,onChange:l,label:Object(a.__)("Text Color","jetpack")},{value:t.color,onChange:c,label:Object(a.__)("Background","jetpack")}],title:Object(a.__)("Background & Text Color","jetpack")},u)}var _=n(10);n(213);var O=Object(h.compose)(Object(b.withColors)({backgroundColor:"background-color"},{textColor:"color"}),j)((function(e){var t,n=e.attributes,r=e.backgroundColor,o=e.className,c=e.clientId,i=e.fallbackBackgroundColor,s=e.fallbackTextColor,d=e.setAttributes,h=e.setBackgroundColor,g=e.setTextColor,j=e.textColor,O=n.borderRadius,w=n.element,E=n.placeholder,C=n.text;!function(e){var t=e.attributes,n=e.clientId,r=e.setAttributes,a=t.passthroughAttributes,o=Object(_.useSelect)((function(e){var r=e("core/block-editor"),o=(0,r.getBlockAttributes)((0,r.getBlockHierarchyRootClientId)(n)),c=Object(f.mapValues)(a,(function(e){return o[e]}));return{attributesToSync:Object(f.pickBy)(c,(function(e,n){return e!==t[n]}))}})).attributesToSync;Object(p.useEffect)((function(){Object(f.isEmpty)(o)||r(o)}),[o,r])}({attributes:n,clientId:c,setAttributes:d});var x=v?Object(b.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},S=x.gradientClass,A=x.gradientValue,T=x.setGradient,N=m()("wp-block-button",o),P=m()("wp-block-button__link",(t={"has-background":r.color||A},u()(t,r.class,!A&&r.class),u()(t,"has-text-color",j.color),u()(t,j.class,j.class),u()(t,S,S),u()(t,"no-border-radius",0===O),t)),M=l()({},!r.color&&A?{background:A}:{backgroundColor:r.color},{color:j.color,borderRadius:O?O+"px":void 0});return Object(p.createElement)("div",{className:N},Object(p.createElement)(b.RichText,{allowedFormats:"input"===w?[]:void 0,className:P,disableLineBreaks:"input"===w,onChange:function(e){var t="input"===w?e.replace(/<br>/gim," "):e;d({text:t})},placeholder:E||Object(a.__)("Add textโฆ","jetpack"),style:M,value:C,withoutInteractiveFormatting:!0}),Object(p.createElement)(b.InspectorControls,null,Object(p.createElement)(y,{backgroundColor:r,fallbackBackgroundColor:i,fallbackTextColor:s,gradientValue:A,setBackgroundColor:h,setGradient:T,setTextColor:g,textColor:j}),Object(p.createElement)(k,{borderRadius:O,setAttributes:d})))})),w=Object(p.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(g.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"}));var E=n(56),C={title:Object(a.__)("Button","jetpack"),icon:w,category:Object(E.a)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:Object(a.__)("Fill","jetpack"),isDefault:!0},{name:"outline",label:Object(a.__)("Outline","jetpack")}],attributes:c,edit:O,save:function(e){var t,n=e.attributes,r=e.blockName,a=e.uniqueId,o=n.backgroundColor,c=n.borderRadius,i=n.className,l=n.customBackgroundColor,s=n.customGradient,d=n.customTextColor,h=n.gradient,f=n.saveInPostContent,g=n.text,j=n.textColor,k=n.url;if(!f)return null;var y=Object(b.getColorClassName)("background-color",o),_=v?Object(b.__experimentalGetGradientClass)(h):void 0,O=Object(b.getColorClassName)("color",j),w=m()("wp-block-button","jetpack-submit-button",i,u()({},"wp-block-jetpack-".concat(r),r)),E=m()("wp-block-button__link",(t={"has-text-color":j||d},u()(t,O,O),u()(t,"has-background",o||h||l||s),u()(t,y,y),u()(t,_,_),u()(t,"no-border-radius",0===c),t)),C={background:s||void 0,backgroundColor:y||s||h?void 0:l,color:O?void 0:d,borderRadius:c?c+"px":void 0};return Object(p.createElement)("div",{className:w},Object(p.createElement)(b.RichText.Content,{className:E,"data-id-attr":a||"placeholder",href:k,id:a,rel:"noopener noreferrer",role:"button",style:C,tagName:"a",target:"_blank",value:g}))}};Object(r.a)("button",C)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(11),i=n(10),l=n(4),s=[{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"}],u=s.map((function(e){return e.value})),p={name:"button",label:Object(o.__)("Button (210 x 113 pixels)","jetpack")},d=function(e){return Object(l.compact)([{name:"standard",label:Object(o.__)("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:Object(o.__)("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:Object(o.__)("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&p])},m=function(e){return d(e).map((function(e){return e.name}))},b=Object(i.select)("core/block-editor").getSettings().siteLocale,h=!Object(l.isEmpty)(b)&&u.includes(b)?b:"en-US",f={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:m()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:h,type:"string",validValues:u},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}},g={attributes:f,supports:{align:!0,html:!1},save:function(e){var t=e.attributes.rid;return Object(a.createElement)(a.Fragment,null,t.map((function(e){return Object(a.createElement)("a",{href:"https://www.opentable.com/restref/client/?rid=".concat(e)},"https://www.opentable.com/restref/client/?rid=".concat(e))})))}},j=n(7),v=n.n(j),k={attributes:f,migrate:function(e){var t=e.style,n=e.className,r="standard"===t?"":"is-style-".concat(t);return v()({},e,{className:n?"".concat(n," ").concat(r):r})},isEligible:function(e){var t=e.style,n=e.className;return!(!t||"standard"===t)&&(!n||-1===n.indexOf("is-style-"))},save:function(e){var t=e.attributes.rid;return Object(a.createElement)("div",null,t.map((function(e){return Object(a.createElement)("a",{href:"https://www.opentable.com/restref/client/?rid=".concat(e)},"https://www.opentable.com/restref/client/?rid=".concat(e))})))}},y=n(3),_=n.n(y),O=n(9),w=n.n(O),E=(n(129),n(8)),C=n.n(E),x=n(5),S=n(2),A=(n(139),Object(a.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},Object(a.createElement)(S.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"}))),T=n(24),N=n(23),P=n.n(N),M=/^\s*(http[s]?:\/\/|\<script)/;function B(e){var t=Object(a.useState)(""),n=w()(t,2),r=n[0],c=n[1],i=function(e,t){var n=Object(a.useState)([]),r=w()(n,2),o=r[0],c=r[1],i=Object(a.useCallback)(Object(l.throttle)((function(){var 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((function(e){return e.json()})).then((function(e){return c(Object(l.unionBy)(o,e.items,"rid"))}))}),500),[o]);return Object(a.useEffect)((function(){Object(l.isEmpty)(e)||M.test(e)||i(e)}),[e]),o}(r,20),s=Object(a.useState)(e.rids||[]),u=w()(s,2),p=u[0],d=u[1],m=/^(\d+)$|\(\#(\d+)\)$/,b=i.filter((function(e){return p.indexOf(e.rid.toString())<0})).map((function(e){return e.name+" (#".concat(e.rid,")")})),h=Object(a.createElement)(S.FormTokenField,P()({value:p,suggestions:b,saveTransform:function(e){return M.test(e)?"":e.trim()},onInputChange:c,maxSuggestions:20,label:Object(o._n)("Restaurant","Restaurants",p.length,"jetpack")},e,{onChange:function(t){var n=t.map((function(e){var t=m.exec(e);return t[1]||t[2]}));d(n),e.onChange&&e.onChange(n)}}));return Object(a.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?Object(a.createElement)("form",{onSubmit:function(t){t.preventDefault(),e.onSubmit(Object(l.isEmpty)(p)?r:p)}},h,Object(a.createElement)(S.Button,{isSecondary:!0,type:"submit"},Object(o.__)("Embed","jetpack"))):h)}var I=n(44),F=n(43),R=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,L=/restref=([0-9]+)&/,D=/rid=([0-9]+)&/,z=function(e){if(e)return function(e){if(e){var t="";if((t=0===e.indexOf("http")?new URL(e):new URL("http:"+e)).host&&-1!==t.host.indexOf("opentable")&&t.search){var n=new URLSearchParams(t.search),r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));var a=n.getAll("rid");if(a&&0!==a.length||(a=n.getAll("restref")),a&&0!==a.length){var o={};a&&(o.rid=a);var c=n.get("domain");c&&(o.domain=c);var i=n.get("iframe");i&&(o.iframe=i);var l=n.get("lang");l&&(o.lang=l);var s=n.get("newtab");return s&&(o.newtab=s),r&&(o.style=r),o}}}}(function(e){var t=e.match(R);return t&&t[1]?t[1]:L.test(e)||D.test(e)?e:void 0}(e))};var U=Object(S.withNotices)((function(e){var t,n=e.attributes,r=e.className,i=e.clientId,b=e.isSelected,h=e.name,g=e.noticeOperations,j=e.noticeUI,v=e.setAttributes,k=Object(c.getBlockDefaultClassName)(h),y=Object(I.a)(f,n);Object(l.isEqual)(y,n)||v(y);var O,E,N=n.align,P=n.rid,M=n.iframe,R=n.domain,L=n.lang,D=n.newtab,U=n.negativeMargin,V=Object(l.isEmpty)(P),q=Object(F.a)(d(),n.className),H=Object(F.a)(d(P),n.className),G=(O=H,E=Object(a.useRef)(),Object(a.useEffect)((function(){E.current=O}),[O]),E.current),W=Object(l.isEqual)(P,["1"]);Object(a.useEffect)((function(){if(g.removeAllNotices(),!V&&!W&&"wide"===H&&"wide"!==N&&"full"!==N){var e=Object(a.createElement)(a.Fragment,null,Object(o.__)('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"));g.createNotice({status:"warning",content:e})}}),[W,N,V,g,P,H]),Object(a.useEffect)((function(){"button"===q&&Array.isArray(P)&&P.length>1&&v({className:"",style:""})}),[P,q,v]),Object(a.useEffect)((function(){b&&(Array.isArray(P)&&P.length>1?Object(c.unregisterBlockStyle)("jetpack/opentable",["button"]):Object(c.registerBlockStyle)("jetpack/opentable",p))}),[b,P]),Object(a.useEffect)((function(){"wide"===G&&"wide"===N&&v({align:""}),"wide"===H&&G&&H!==G&&v({align:"wide"}),v({style:H})}),[H]);var $,K,Z,J,Y,Q=m(P),X=function(e){return P.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e]},ee=function(e){Array.isArray(e)?v({rid:e,style:e.length>1&&"button"===H?"standard":H}):function(e){var t=z(e);t||(g.removeAllNotices(),g.createErrorNotice(Object(a.createElement)(a.Fragment,null,Object(a.createElement)("strong",null,Object(o.__)("We ran into an issue","jetpack")),Object(a.createElement)("br",null),Object(o.__)("Please ensure this embed matches the one from your OpenTable account","jetpack"))));var n=Object(I.a)(f,t);v(n),g.removeAllNotices()}(e)},te=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(x.InspectorAdvancedControls,null,Object(a.createElement)(S.ToggleControl,{label:Object(o.__)("Load the widget in an iFrame (Recommended)","jetpack"),checked:M,onChange:function(){return v({iframe:!M})},className:"is-opentable"}),"button"===H&&Object(a.createElement)(S.ToggleControl,{label:Object(o.__)("Remove button margin","jetpack"),checked:U,onChange:function(){return v({negativeMargin:!U})}})),Object(a.createElement)(x.InspectorControls,null,Object(a.createElement)(S.PanelBody,{title:Object(o.__)("Settings","jetpack")},Object(a.createElement)(B,{rids:P,onChange:ee}),Object(a.createElement)(S.SelectControl,{label:Object(o.__)("Language","jetpack"),value:L,onChange:function(e){return v({lang:e})},options:s}),Object(a.createElement)(S.ToggleControl,{label:Object(o.__)("Open in a new window","jetpack"),checked:D,onChange:function(){return v({newtab:!D})}})))),ne=Object(T.b)()||Object(T.a)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",re=Object(a.createElement)(S.Placeholder,{label:Object(o.__)("OpenTable Reservation","jetpack"),icon:Object(a.createElement)(x.BlockIcon,{icon:A}),instructions:Object(o.__)("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:j},Object(a.createElement)(B,{rids:P,onSubmit:ee}),Object(a.createElement)("div",{className:"".concat(k,"-placeholder-links")},Object(a.createElement)(S.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},Object(o.__)("Sign up for OpenTable","jetpack")),Object(a.createElement)(S.ExternalLink,{href:ne},Object(o.__)("Learn more","jetpack")))),ae=C()(r,(t={},_()(t,"is-style-".concat(H),!V&&Q.includes(H)&&-1===r.indexOf("is-style")),_()(t,"is-placeholder",V),_()(t,"is-multi","multi"===X(H)[0]),_()(t,"align".concat(N),N),_()(t,"has-no-margin",U),t));return Object(a.createElement)(a.Fragment,null,j,Object(a.createElement)("div",{className:ae},!V&&te,V?re:(K=X($||H),Z=w()(K,2),J=Z[0],Y=Z[1],Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"".concat(k,"-overlay")}),Object(a.createElement)("iframe",{title:Object(o.sprintf)(Object(o.__)("Open Table Preview %s","jetpack"),i),scrolling:"no",src:"https://www.opentable.com/widget/reservation/canvas?rid=".concat(Object(l.join)(P,"%2C"),"&type=").concat(J,"&theme=").concat(Y,"&overlay=false&domain=").concat(R,"&lang=").concat(L&&u.includes(L)?L:"en-US","&newtab=").concat(D,"&disablega=true")})))))})),V=n(17),q=(n(127),n(184),{title:Object(o.__)("OpenTable","jetpack"),description:Object(o.__)("Allow visitors to book a reservation with OpenTable","jetpack"),icon:{src:A,foreground:Object(V.a)()},category:"earn",keywords:[Object(o._x)("booking","block search term","jetpack"),Object(o._x)("reservation","block search term","jetpack"),Object(o._x)("restaurant","block search term","jetpack")],supports:{align:!0,html:!1},edit:U,save:function(e){var t=e.attributes.rid;return Object(a.createElement)("div",null,t.map((function(e,t){return Object(a.createElement)("a",{href:"https://www.opentable.com/restref/client/?rid=".concat(e),key:"".concat(e,"-").concat(t)},"https://www.opentable.com/restref/client/?rid=".concat(e))})))},attributes:f,styles:d(),example:{attributes:{rid:["1"],style:"standard",iframe:!0,domain:"com",lang:"en-US",newtab:!1,negativeMargin:!1}},transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(D.test(e.textContent)||L.test(e.textContent))},transform:function(e){var t=z(e.textContent);return Object(c.createBlock)("jetpack/opentable",t)}}]},deprecated:[g,k]});Object(r.a)("opentable",q)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=n(11),l={url:{type:"string",validator:function(e){return!e||e.startsWith("http")}},eventId:{type:"number"},style:{type:"string",default:"inline"}},s=n(3),u=n.n(s),p=n(8),d=n.n(p),m=n(5);var b={attributes:{url:{type:"string"},eventId:{type:"number"},useModal:{type:"boolean"},text:{type:"string",default:Object(o._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:function(e){var t=e.url,n=e.eventId,r=e.useModal;return{url:t,eventId:n,text:e.text,backgroundColor:e.backgroundColor,textColor:e.textColor,customBackgroundColor:e.customBackgroundColor,customTextColor:e.customTextColor,borderRadius:e.borderRadius,style:r?"modal":"inline"}},save:function(e){var t=e.attributes,n=t.eventId,r=t.useModal,o=t.url;if(n)return r?function(e){var t,n=e.backgroundColor,r=e.borderRadius,o=e.customBackgroundColor,c=e.customTextColor,i=e.eventId,l=e.text,s=e.textColor,p=e.url,b=Object(m.getColorClassName)("color",s),h=Object(m.getColorClassName)("background-color",n),f=d()("wp-block-button__link",(t={"has-text-color":s||c},u()(t,b,b),u()(t,"has-background",n||o),u()(t,h,h),u()(t,"no-border-radius",0===r),t)),g={backgroundColor:h?void 0:o,color:b?void 0:c,borderRadius:r?r+"px":void 0};return Object(a.createElement)("div",{className:"wp-block-button"},Object(a.createElement)(m.RichText.Content,{className:f,href:p,id:"eventbrite-widget-".concat(i),rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:l}))}(t):o&&Object(a.createElement)("a",{className:"eventbrite__direct-link",href:o},o)}},h=n(7),f=n.n(h),g=n(4);var j=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"],v=[b,{attributes:{url:{type:"string",validator:function(e){return!e||e.startsWith("http")}},eventId:{type:"number"},style:{type:"string"},text:{type:"string",default:Object(o._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:function(e){var t=e.className,n=f()({},Object(g.omit)(e,j),{className:t&&t.replace("is-style-outline","")}),r=Object(g.pick)(e,j);return[n,[Object(i.createBlock)("jetpack/button",f()({element:"a",text:r.text||Object(o._x)("Register","verb: e.g. register for an event.","jetpack")},r,{uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""}))]]},isEligible:function(e,t){return"modal"===e.style&&(Object(g.isEmpty)(t)||Object(g.some)(Object(g.pick)(e,j),Boolean))},save:function(e){var t=e.attributes,n=t.eventId,r=t.style,o=t.url;if(n)return"modal"===r?function(e){var t,n=e.backgroundColor,r=e.borderRadius,o=e.customBackgroundColor,c=e.customTextColor,i=e.eventId,l=e.text,s=e.textColor,p=e.url,b=Object(m.getColorClassName)("color",s),h=Object(m.getColorClassName)("background-color",n),f=d()("wp-block-button__link",(t={"has-text-color":s||c},u()(t,b,b),u()(t,"has-background",n||o),u()(t,h,h),u()(t,"no-border-radius",0===r),t)),g={backgroundColor:h?void 0:o,color:b?void 0:c,borderRadius:r?r+"px":void 0};return Object(a.createElement)("div",{className:"wp-block-button"},Object(a.createElement)(m.RichText.Content,{className:f,href:p,id:"eventbrite-widget-".concat(i),rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:l}))}(t):o&&Object(a.createElement)("a",{className:"eventbrite__direct-link",href:o},o)}}],k=n(12),y=n.n(k),_=n(16),O=n.n(_),w=n(13),E=n.n(w),C=n(14),x=n.n(C),S=n(6),A=n.n(S),T=n(15),N=n.n(T);function P(e,t){var n=Object(a.createElement)("a",{href:e},e);t(Object(i.createBlock)("core/paragraph",{content:Object(a.renderToString)(n)}))}function M(e){if(!e)return null;var t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}var B=n(44),I=n(24),F=n(145),R=n.n(F),L=n(94),D=n(65),z=(n(223),function(e){function t(){var e,n;y()(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=E()(this,(e=x()(t)).call.apply(e,[this].concat(i))),u()(A()(n),"state",{editedUrl:n.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1}),u()(A()(n),"setUrl",(function(e){var t=n.props,r=t.attributes,a=t.noticeOperations,o=t.setAttributes,c=r.style;if(e&&W!==e&&"modal"!==c){var i={eventId:M(e),url:e};Object(D.a)(i.url,n.setIsResolvingUrl).then((function(e){var t=Object(B.a)(l,f()({},i,{url:e}));o(t),n.setState({editedUrl:e}),a.removeAllNotices()})).catch((function(){o({eventId:void 0,url:void 0}),n.setErrorNotice()}))}})),u()(A()(n),"setIsResolvingUrl",(function(e){return n.setState({isResolvingUrl:e})})),u()(A()(n),"setErrorNotice",(function(){var e=n.props,t=e.noticeOperations,r=e.onReplace,i=n.state.editedUrl;t.removeAllNotices(),t.createErrorNotice(Object(a.createElement)(a.Fragment,null,Object(o.__)("Sorry, this content could not be embedded.","jetpack")," ",Object(a.createElement)(c.Button,{isLink:!0,onClick:function(){return P(i,r)}},Object(o._x)("Convert block to link","button label","jetpack"))))})),u()(A()(n),"submitForm",(function(e){e&&e.preventDefault();var t=n.state.editedUrl;n.setUrl(t),n.setState({editingUrl:!1})})),u()(A()(n),"cannotEmbed",(function(){var e=n.props.attributes.url;return!n.state.isResolvingUrl&&e&&!H.test(e)})),n}return N()(t,e),O()(t,[{key:"componentDidMount",value:function(){var e=this.props.attributes.url;this.setUrl(e)}},{key:"renderLoading",value:function(){return Object(a.createElement)("div",{className:"wp-block-embed is-loading"},Object(a.createElement)(c.Spinner,null),Object(a.createElement)("p",null,Object(o.__)("Embeddingโฆ","jetpack")))}},{key:"renderInspectorControls",value:function(){var e=this.props.attributes.style,t=this.props,n=t.attributes,r=t.clientId,c=t.setAttributes,i=[{value:"inline",label:Object(o.__)("In-page Embed","jetpack"),preview:Object(a.createElement)("div",{className:"block-editor-block-preview__container"},Object(a.createElement)("img",{src:R.a,alt:Object(o.__)("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:Object(o.__)("Button & Modal","jetpack")}];return Object(a.createElement)(L.a,{title:Object(o._x)("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:r,styleOptions:i,onSelectStyle:c,activeStyle:e,attributes:n,viewportWidth:130})}},{key:"renderBlockControls",value:function(){var e=this;return Object(a.createElement)(m.BlockControls,null,Object(a.createElement)(c.Toolbar,null,Object(a.createElement)(c.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit URL","jetpack"),icon:"edit",onClick:function(){return e.setState({editingUrl:!0})}})))}},{key:"renderEditEmbed",value:function(){var e=this,t=this.props,n=t.className,r=t.noticeUI,i=this.state.editedUrl,l=Object(I.b)()||Object(I.a)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return Object(a.createElement)("div",{className:n},Object(a.createElement)(c.Placeholder,{label:Object(o.__)("Eventbrite Checkout","jetpack"),instructions:Object(o.__)("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:Object(a.createElement)(m.BlockIcon,{icon:K}),notices:r},Object(a.createElement)("form",{onSubmit:this.submitForm},Object(a.createElement)("input",{type:"url",value:i,className:"components-placeholder__input","aria-label":Object(o.__)("Eventbrite URL","jetpack"),placeholder:Object(o.__)("Enter an event URL to embed hereโฆ","jetpack"),onChange:function(t){return e.setState({editedUrl:t.target.value})}}),Object(a.createElement)(c.Button,{isLarge:!0,isSecondary:!0,type:"submit"},Object(o._x)("Embed","submit button label","jetpack"))),Object(a.createElement)("div",{className:"components-placeholder__learn-more"},Object(a.createElement)(c.ExternalLink,{href:l},Object(o.__)("Learn more about Eventbrite embeds","jetpack")))))}},{key:"renderInlinePreview",value:function(){var e=this.props.className,t=this.props.attributes.eventId;if(t){var n="eventbrite-widget-".concat(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: ".concat(t,",\n\t\t\t\t\tiframeContainerId: '").concat(n,"',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id=\"").concat(n,'"></div>\n\t\t');return Object(a.createElement)("div",{className:e},Object(a.createElement)(c.SandBox,{html:r}),Object(a.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}}},{key:"render",value:function(){var e=this.props.attributes,t=e.url,n=e.style,r=this.state,o=r.editingUrl;return r.isResolvingUrl?this.renderLoading():o||!t||this.cannotEmbed()?this.renderEditEmbed():Object(a.createElement)(a.Fragment,null,this.renderInspectorControls(),this.renderBlockControls(),"modal"===n?Object(a.createElement)(m.InnerBlocks,{template:[[q.name,q.attributes]],templateLock:"all"}):this.renderInlinePreview())}}]),t}(a.Component)),U=Object(c.withNotices)(z);var V=n(17),q={name:"jetpack/button",attributes:{element:"a",text:Object(o._x)("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},H=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,G=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,W="https://www.eventbrite.com/e/test-event-tickets-123456789",$=Object(o.__)("Eventbrite Checkout","jetpack"),K=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(c.G,{id:"eventbrite-icon"},Object(a.createElement)(c.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"}))),Z={title:$,description:Object(o.__)("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:K,foreground:Object(V.a)()},category:"embed",keywords:[Object(o._x)("events","block search term","jetpack"),Object(o._x)("tickets","block search term","jetpack")],supports:{html:!1,align:!0},attributes:l,edit:U,save:function(e){var t=e.attributes,n=t.eventId,r=t.style,o=t.url;if(n)return"modal"===r?Object(a.createElement)("div",null,Object(a.createElement)(m.InnerBlocks.Content,null)):o&&Object(a.createElement)("a",{className:"eventbrite__direct-link",href:o},o)},transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&(H.test(e.textContent)||G.test(e.textContent))},transform:function(e){return Object(i.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}}]},example:{attributes:{url:W,eventId:123456789,style:"modal"},innerBlocks:[q]},deprecated:v};Object(r.a)("eventbrite",Z)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(7),o=n.n(a),c=n(4),i=n(37),l=n(12),s=n.n(l),u=n(16),p=n.n(u),d=n(13),m=n.n(d),b=n(14),h=n.n(b),f=n(6),g=n.n(f),j=n(15),v=n.n(j),k=n(3),y=n.n(k),_=n(0),O=n(22),w=n.n(O),E=n(1),C=n(2),x=n(5),S=n(8),A=n.n(S),T=(n(235),n(21)),N=n.n(T),P=n(25),M=n(18);function B(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=[],r=0;r<e.length;r++){var a=e[r],o=a.keywords,c=void 0===o?[]:o;if("string"==typeof a.label&&(c=[].concat(N()(c),[a.label])),n.push(a),n.length===t)break}return n}var I=function(e){function t(){var e;return s()(this,t),e=m()(this,h()(t).apply(this,arguments)),y()(g()(e),"select",(function(t){(e.props.completer.getOptionCompletion||{})(t),e.reset()})),y()(g()(e),"reset",(function(){e.setState(e.constructor.getInitialState())})),y()(g()(e),"onChange",(function(t){var n=e.props.completer,r=e.state.options;if(t){n&&(n.isDebounced?e.debouncedLoadOptions(n,t):e.loadOptions(n,t));var a=n?B(r):[];n&&e.setState({selectedIndex:0,filteredOptions:a,query:t})}else e.reset()})),y()(g()(e),"onKeyDown",(function(t){var n=e.state,r=n.isOpen,a=n.selectedIndex,o=n.filteredOptions;if(r){var c;switch(t.keyCode){case P.UP:c=(0===a?o.length:a)-1,e.setState({selectedIndex:c});break;case P.DOWN:c=(a+1)%o.length,e.setState({selectedIndex:c});break;case P.ENTER:e.select(o[a]);break;case P.LEFT:case P.RIGHT:case P.ESCAPE:return void e.reset();default:return}t.preventDefault(),t.stopPropagation()}})),e.debouncedLoadOptions=Object(c.debounce)(e.loadOptions,250),e.state=e.constructor.getInitialState(),e}return v()(t,e),p()(t,null,[{key:"getInitialState",value:function(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}}]),p()(t,[{key:"componentWillUnmount",value:function(){this.debouncedLoadOptions.cancel()}},{key:"handleFocusOutside",value:function(){this.reset()}},{key:"loadOptions",value:function(e,t){var n=this,r=e.options,a=this.activePromise=Promise.resolve("function"==typeof r?r(t):r).then((function(t){var r;if(a===n.activePromise){var o=t.map((function(t,n){return{key:"".concat(n),value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}})),c=B(o),i=c.length===n.state.filteredOptions.length?n.state.selectedIndex:0;n.setState((r={},y()(r,"options",o),y()(r,"filteredOptions",c),y()(r,"selectedIndex",i),y()(r,"isOpen",c.length>0),r)),n.announce(c)}}))}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(E.sprintf)(Object(E._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(Object(E.__)("No results.","jetpack"),"assertive"))}},{key:"render",value:function(){var e=this,t=this.onChange,n=this.onKeyDown,r=this.props,a=r.children,o=r.instanceId,i=r.completer,l=this.state,s=l.selectedIndex,u=l.filteredOptions,p=(u[s]||{}).key,d=void 0===p?"":p,m=i.className,b=u.length>0,h=b?"components-autocomplete-listbox-".concat(o):null,f=b?"components-autocomplete-item-".concat(o,"-").concat(d):null;return Object(_.createElement)("div",{className:"components-autocomplete"},a({isExpanded:b,listBoxId:h,activeId:f,onChange:t,onKeyDown:n}),b&&Object(_.createElement)(C.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},Object(_.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},Object(c.map)(u,(function(t,n){return Object(_.createElement)(C.Button,{key:t.key,id:"components-autocomplete-item-".concat(o,"-").concat(t.key),role:"option","aria-selected":n===s,disabled:t.isDisabled,className:A()("components-autocomplete__result",m,{"is-selected":n===s}),onClick:function(){return e.select(t)}},t.label)})))))}}]),t}(_.Component),F=Object(M.compose)([C.withSpokenMessages,M.withInstanceId,C.withFocusOutside])(I),R=Object(E.__)("Add a markerโฆ","jetpack"),L=function(e){function t(){var e;return s()(this,t),e=m()(this,h()(t).apply(this,arguments)),y()(g()(e),"getOptionCompletion",(function(t){var n=t.value,r={placeTitle:n.text,title:n.text,caption:n.place_name,id:n.id,coordinates:{longitude:n.geometry.coordinates[0],latitude:n.geometry.coordinates[1]}};return e.props.onAddPoint(r),n.text})),y()(g()(e),"search",(function(t){var n=e.props,r=n.apiKey,a=n.onError,o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(t)+".json?access_token="+r;return new Promise((function(e,t){var n=new XMLHttpRequest;n.open("GET",o),n.onload=function(){if(200===n.status){var r=JSON.parse(n.responseText);e(r.features)}else{var o=JSON.parse(n.responseText);a(o.statusText,o.responseJSON.message),t(new Error("Mapbox Places Error"))}},n.send()}))})),y()(g()(e),"onReset",(function(){e.textRef.current.value=null})),e.textRef=Object(_.createRef)(),e.containerRef=Object(_.createRef)(),e.state={isEmpty:!0},e.autocompleter={name:"placeSearch",options:e.search,isDebounced:!0,getOptionLabel:function(e){return Object(_.createElement)("span",null,e.place_name)},getOptionKeywords:function(e){return[e.place_name]},getOptionCompletion:e.getOptionCompletion},e}return v()(t,e),p()(t,[{key:"componentDidMount",value:function(){var e=this;setTimeout((function(){e.containerRef.current.querySelector("input").focus()}),50)}},{key:"render",value:function(){var e=this,t=this.props.label;return Object(_.createElement)("div",{ref:this.containerRef},Object(_.createElement)(C.BaseControl,{label:t,className:"components-location-search"},Object(_.createElement)(F,{completer:this.autocompleter,onReset:this.onReset},(function(t){var n=t.isExpanded,r=t.listBoxId,a=t.activeId,o=t.onChange,c=t.onKeyDown;return Object(_.createElement)(C.TextControl,{placeholder:R,ref:e.textRef,onChange:o,"aria-expanded":n,"aria-owns":r,"aria-activedescendant":a,onKeyDown:c})}))))}}]),t}(_.Component);L.defaultProps={onError:function(){}};var D=L,z=function(e){function t(){return s()(this,t),m()(this,h()(t).apply(this,arguments))}return v()(t,e),p()(t,[{key:"render",value:function(){var e=this.props,t=e.onClose,n=e.onAddPoint,r=e.onError,a=e.apiKey;return Object(_.createElement)(C.Button,{className:"component__add-point"},Object(E.__)("Add marker","jetpack"),Object(_.createElement)(C.Popover,{className:"component__add-point__popover"},Object(_.createElement)(C.Button,{className:"component__add-point__close",onClick:t},Object(_.createElement)(C.Dashicon,{icon:"no"})),Object(_.createElement)(D,{onAddPoint:n,label:Object(E.__)("Add a location","jetpack"),apiKey:a,onError:r})))}}]),t}(_.Component);z.defaultProps={onAddPoint:function(){},onClose:function(){},onError:function(){}};var U=z,V=(n(236),function(e){function t(){var e;return s()(this,t),e=m()(this,h()(t).apply(this,arguments)),y()(g()(e),"onDeletePoint",(function(t){var n=parseInt(t.target.getAttribute("data-id")),r=e.props,a=r.points,o=r.onChange,c=a.slice(0);c.splice(n,1),o(c)})),e.state={selectedCell:null},e}return v()(t,e),p()(t,[{key:"setMarkerField",value:function(e,t,n){var r=this.props,a=r.points,o=r.onChange,c=a.slice(0);c[n][e]=t,o(c)}},{key:"render",value:function(){var e=this,t=this.props.points.map((function(t,n){return Object(_.createElement)(C.PanelBody,{title:t.placeTitle,key:t.id,initialOpen:!1},Object(_.createElement)(C.TextControl,{label:"Marker Title",value:t.title,onChange:function(t){return e.setMarkerField("title",t,n)}}),Object(_.createElement)(C.TextareaControl,{label:"Marker Caption",value:t.caption,rows:"3",onChange:function(t){return e.setMarkerField("caption",t,n)}}),Object(_.createElement)(C.Button,{"data-id":n,onClick:e.onDeletePoint,className:"component__locations__delete-btn"},Object(_.createElement)(C.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))}));return Object(_.createElement)("div",{className:"component__locations"},Object(_.createElement)(C.Panel,{className:"component__locations__panel"},t))}}]),t}(_.Component));V.defaultProps={points:Object.freeze([]),onChange:function(){}};var q=V,H=n(119),G=n(147),W=n.n(G),$=n(10),K=n(43),Z={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},J=function(e){function t(){var e;return s()(this,t),e=m()(this,h()(t).apply(this,arguments)),y()(g()(e),"addPoint",(function(t){var n=e.props,r=n.attributes,a=n.setAttributes,o=r.points,c=o.slice(0),i=!1;o.map((function(e){e.id===t.id&&(i=!0)})),i||(c.push(t),a({points:c}),e.setState({addPointVisibility:!1}))})),y()(g()(e),"updateAlignment",(function(t){e.props.setAttributes({align:t}),setTimeout(e.mapRef.current.sizeMap,0)})),y()(g()(e),"updateAPIKeyControl",(function(t){e.setState({apiKeyControl:t.target.value})})),y()(g()(e),"updateAPIKey",(function(){var t=e.props.noticeOperations,n=e.state.apiKeyControl;t.removeAllNotices(),n&&e.apiCall(n,"POST")})),y()(g()(e),"removeAPIKey",(function(){e.apiCall(null,"DELETE")})),y()(g()(e),"onError",(function(t,n){var r=e.props.noticeOperations;r.removeAllNotices(),r.createErrorNotice(n)})),y()(g()(e),"onHeightChange",(function(t){var n=e.props,r=n.attributes,a=n.setAttributes,o=r.mapHeight,c=parseInt(t.target.value,10);isNaN(c)?c=null:null==o?c=e.mapRef.current.mapRef.current.offsetHeight:c<400&&(c=400),a({mapHeight:c}),setTimeout(e.mapRef.current.sizeMap,0)})),y()(g()(e),"onMapResize",(function(t,n,r,a){var o=e.props,c=o.onResizeStop,i=o.setAttributes;c(),i({mapHeight:parseInt(e.mapRef.current.mapRef.current.offsetHeight+a.height,10)}),setTimeout(e.mapRef.current.sizeMap,0)})),e.state={addPointVisibility:!1,apiState:0},e.mapRef=Object(_.createRef)(),e}return v()(t,e),p()(t,[{key:"apiCall",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",r=this.props.noticeOperations,a="/wpcom/v2/service-api-keys/mapbox",o=t?{path:a,method:n,data:{service_api_key:t}}:{path:a,method:n};this.setState({apiRequestOutstanding:!0},(function(){w()(o).then((function(t){var n=t.service_api_key,a=t.service_api_key_source;r.removeAllNotices();var o=n?2:1,c="wpcom"===a?"":n;e.setState({apiState:o,apiKey:n,apiKeyControl:c,apiKeySource:a,apiRequestOutstanding:!1})}),(function(t){var n=t.message;e.onError(null,n),e.setState({apiState:1,apiRequestOutstanding:!1})}))}))}},{key:"componentDidMount",value:function(){this.apiCall()}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.setAttributes,a=t.attributes,o=t.noticeUI,c=t.notices,l=t.isSelected,s=t.instanceId,u=t.onResizeStart,p=a.mapDetails,d=a.points,m=a.zoom,b=a.mapCenter,h=a.markerColor,f=a.align,g=a.preview,j=a.scrollToZoom,v=a.mapHeight,k=a.showFullscreenButton,y=this.state,O=y.addPointVisibility,w=y.apiKey,S=y.apiKeyControl,A=y.apiKeySource,T=y.apiState,N=y.apiRequestOutstanding,P=Object(_.createElement)(_.Fragment,null,Object(_.createElement)(x.BlockControls,null,Object(_.createElement)(x.BlockAlignmentToolbar,{value:f,onChange:this.updateAlignment,controls:["center","wide","full"]}),Object(_.createElement)(C.Toolbar,null,Object(_.createElement)(C.IconButton,{icon:i.a.markerIcon,label:Object(E.__)("Add a marker","jetpack"),onClick:function(){return e.setState({addPointVisibility:!0})}}))),Object(_.createElement)(x.InspectorControls,null,Object(_.createElement)(x.PanelColorSettings,{title:Object(E.__)("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:h,onChange:function(e){return r({markerColor:e})},label:Object(E.__)("Marker Color","jetpack")}]}),Object(_.createElement)(C.PanelBody,{title:Object(E.__)("Map Settings","jetpack")},Object(_.createElement)(C.BaseControl,{label:Object(E.__)("Height in pixels","jetpack"),id:"block-jetpack-map-height-input-".concat(s)},Object(_.createElement)("input",{type:"number",id:"block-jetpack-map-height-input-".concat(s),className:"wp-block-jetpack-map__height_input",onChange:function(t){r({mapHeight:t.target.value}),t.target!==document.activeElement&&setTimeout(e.mapRef.current.sizeMap,0)},onBlur:this.onHeightChange,value:v||"",min:400,step:"10"})),Object(_.createElement)(C.RangeControl,{label:Object(E.__)("Zoom level","jetpack"),help:d.length>1&&Object(E.__)("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:d.length>1,value:m,onChange:function(t){r({zoom:t}),setTimeout(e.mapRef.current.updateZoom,0)},min:0,max:22}),Object(_.createElement)(C.ToggleControl,{label:Object(E.__)("Show street names","jetpack"),checked:p,onChange:function(e){return r({mapDetails:e})}}),Object(_.createElement)(C.ToggleControl,{label:Object(E.__)("Scroll to zoom","jetpack"),help:Object(E.__)("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:j,onChange:function(e){return r({scrollToZoom:e})}}),Object(_.createElement)(C.ToggleControl,{label:Object(E.__)("Show Fullscreen Button","jetpack"),help:Object(E.__)("Allow your visitors to display the map in fullscreen.","jetpack"),checked:k,onChange:function(e){return r({showFullscreenButton:e})}})),d.length?Object(_.createElement)(C.PanelBody,{title:Object(E.__)("Markers","jetpack"),initialOpen:!1},Object(_.createElement)(q,{points:d,onChange:function(e){r({points:e})}})):null,Object(_.createElement)(C.PanelBody,{title:Object(E.__)("Mapbox Access Token","jetpack"),initialOpen:!1},Object(_.createElement)(C.TextControl,{help:"wpcom"===A&&Object(_.createElement)(_.Fragment,null,Object(E.__)("You can optionally enter your own access token.","jetpack")," ",Object(_.createElement)(C.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},Object(E.__)("Find it on Mapbox","jetpack"))),label:Object(E.__)("Mapbox Access Token","jetpack"),value:S,onChange:function(t){return e.setState({apiKeyControl:t})}}),Object(_.createElement)(C.ButtonGroup,null,Object(_.createElement)(C.Button,{type:"button",onClick:this.updateAPIKey,disabled:!S||S===w,isDefault:!0},Object(E.__)("Update Token","jetpack")),Object(_.createElement)(C.Button,{type:"button",onClick:this.removeAPIKey,disabled:"wpcom"===A,isDefault:!0},Object(E.__)("Remove Token","jetpack")))))),M=Object(_.createElement)(C.Placeholder,{icon:i.a.icon},Object(_.createElement)(C.Spinner,null)),B=Object(_.createElement)(_.Fragment,null,Object(E.__)("To use the map block, you need an Access Token.","jetpack"),Object(_.createElement)("br",null),Object(_.createElement)(C.ExternalLink,{href:"https://www.mapbox.com"},Object(E.__)("Create an account or log in to Mapbox.","jetpack")),Object(_.createElement)("br",null),Object(E.__)("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),I=Object(_.createElement)(C.Placeholder,{icon:i.a.icon,label:Object(E.__)("Map","jetpack"),notices:c,instructions:B},Object(_.createElement)(_.Fragment,null,Object(_.createElement)("form",null,Object(_.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:N,placeholder:Object(E.__)("Paste Token Here","jetpack"),value:S,onChange:this.updateAPIKeyControl}),Object(_.createElement)(C.Button,{isLarge:!0,isSecondary:!0,disabled:N||!S||S.length<1,onClick:this.updateAPIKey},Object(E.__)("Set Token","jetpack"))))),F=l&&d.length<=1,R=Object(K.a)(i.a.styles,a.className),L=Object(_.createElement)(_.Fragment,null,P,Object(_.createElement)("div",{className:n},Object(_.createElement)(C.ResizableBox,{size:{height:v||"auto",width:"100%"},grid:[10,10],showHandle:l,minHeight:400,enable:Z,onResizeStart:u,onResizeStop:this.onMapResize},Object(_.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},Object(_.createElement)(H.a,{ref:this.mapRef,scrollToZoom:F,showFullscreenButton:k,mapStyle:R||"default",mapDetails:p,mapHeight:v,points:d,zoom:m,mapCenter:b,markerColor:h,onSetZoom:function(e){r({zoom:e})},admin:!0,apiKey:w,onSetPoints:function(e){return r({points:e})},onSetMapCenter:function(e){return r({mapCenter:e})},onMapLoaded:function(){return e.setState({addPointVisibility:!d.length})},onMarkerClick:function(){return e.setState({addPointVisibility:!1})},onError:this.onError},l&&O&&Object(_.createElement)(U,{onAddPoint:this.addPoint,onClose:function(){return e.setState({addPointVisibility:!1})},apiKey:w,onError:this.onError,tagName:"AddPoint"})))))),D=i.a.styles.find((function(e){return e.name===R})),z=Object(_.createElement)("div",null,Object(_.createElement)("img",{alt:Object(E.__)("Map Preview","jetpack"),src:D?D.preview:W.a}));return Object(_.createElement)(_.Fragment,null,o,g&&z,!g&&0===T&&M,!g&&1===T&&I,!g&&2===T&&L)}}]),t}(_.Component),Y=Object(M.compose)([C.withNotices,Object($.withDispatch)((function(e){var t=e("core/block-editor").toggleSelection;return{onResizeStart:function(){return t(!1)},onResizeStop:function(){return t(!0)}}}))])(J),Q=function(e){function t(){return s()(this,t),m()(this,h()(t).apply(this,arguments))}return v()(t,e),p()(t,[{key:"render",value:function(){var e=this.props.attributes,t=e.align,n=e.className,r=e.mapDetails,a=e.points,o=e.zoom,c=e.mapCenter,l=e.markerColor,s=e.scrollToZoom,u=e.mapHeight,p=e.showFullscreenButton,d=Object(K.a)(i.a.styles,n),m=a.map((function(e,t){var n=e.coordinates,r=n.longitude,a="https://www.google.com/maps/search/?api=1&query="+n.latitude+","+r;return Object(_.createElement)("li",{key:t},Object(_.createElement)("a",{href:a},e.title))})),b=t?"align".concat(t):null;return Object(_.createElement)("div",{className:b,"data-map-style":d,"data-map-details":r,"data-points":JSON.stringify(a),"data-zoom":o,"data-map-center":JSON.stringify(c),"data-marker-color":l,"data-scroll-to-zoom":s||null,"data-map-height":u||null,"data-show-fullscreen-button":p||null},a.length>0&&Object(_.createElement)("ul",null,m))}}]),t}(_.Component),X={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:function(e){var t=((e.className||"").replace(/is-style-[^ ]+/,"")+" is-style-".concat(e.mapStyle)).replace(/\s+/g," ").trim();return o()({},Object(c.omit)(e,"mapStyle"),{className:t})},save:function(e){function t(){return s()(this,t),m()(this,h()(t).apply(this,arguments))}return v()(t,e),p()(t,[{key:"render",value:function(){var e=this.props.attributes,t=e.align,n=e.mapStyle,r=e.mapDetails,a=e.points,o=e.zoom,c=e.mapCenter,i=e.markerColor,l=e.scrollToZoom,s=e.mapHeight,u=e.showFullscreenButton,p=a.map((function(e,t){var n=e.coordinates,r=n.longitude,a="https://www.google.com/maps/search/?api=1&query="+n.latitude+","+r;return Object(_.createElement)("li",{key:t},Object(_.createElement)("a",{href:a},e.title))})),d=t?"align".concat(t):null;return Object(_.createElement)("div",{className:d,"data-map-style":n,"data-map-details":r,"data-points":JSON.stringify(a),"data-zoom":o,"data-map-center":JSON.stringify(c),"data-marker-color":i,"data-scroll-to-zoom":l||null,"data-map-height":s||null,"data-show-fullscreen-button":u||null},a.length>0&&Object(_.createElement)("ul",null,p))}}]),t}(_.Component)},ee=(n(183),n(237),n(17)),te=i.a.name,ne={title:i.a.title,icon:{src:i.a.icon,foreground:Object(ee.a)()},category:i.a.category,keywords:i.a.keywords,description:i.a.description,attributes:i.a.attributes,supports:i.a.supports,styles:i.a.styles,getEditWrapperProps:function(e){var t=e.align;if(-1!==i.a.validAlignments.indexOf(t))return{"data-align":t}},edit:Y,save:Q,example:i.a.example,deprecated:[{attributes:Object(c.omit)(i.a.attributes,"showFullscreenButton"),migrate:function(e){return o()({},e,{showFullscreenButton:!0})},save:Q},X]};Object(r.a)(te,ne)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c={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}},i=n(21),l=n.n(i),s=n(3),u=n.n(s),p=n(9),d=n.n(p),m=n(8),b=n.n(m),h=n(4),f=n(5),g=n(2),j=n(44),v=n(95),k=n(22),y=n.n(k);var _=n(10),O=n(28),w=n(70);function E(e){var t=e.src,n=e.alt,r=Object(a.useState)(!1),o=d()(r,2),c=o[0],i=o[1],l=Object(a.useState)("auto"),s=d()(l,2),u=s[0],p=s[1],m=Object(a.useRef)(),h=function(){i(!0),p("auto")};Object(a.useEffect)((function(){var e=t;if(e){var n=new window.Image;n.src=e,n.onload=h}m.current&&p(m.current.parentNode.getBoundingClientRect().width)}),[t]);var f=b()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":c}),g=c?{}:{height:u},j=b()({"is-loaded":c});return Object(a.createElement)("span",{style:g,className:f},Object(a.createElement)("img",{alt:n,className:j,ref:m,src:t}))}n(233);var C=Object(g.withNotices)((function(e){var t=e.attributes,n=e.className,r=e.isSelected,i=e.noticeOperations,s=e.noticeUI,p=e.setAttributes,m=t.accessToken,k=t.align,C=t.columns,x=t.count,S=t.instagramUser,A=t.isStackedOnMobile,T=t.spacing;Object(a.useEffect)((function(){var e=Object(j.a)(c,t);Object(h.isEqual)(e,t)||p(e)}),[t,p]);var N,P,M,B=Object(a.useState)(m),I=d()(B,2),F=I[0],R=I[1],L=function(){var e=Object(_.useSelect)((function(e){return{isAutoDraft:"auto-draft"===e("core/editor").getCurrentPost().status}})).isAutoDraft,t=Object(_.useDispatch)("core/editor").savePost,n=Object(a.useState)(),r=d()(n,2),o=r[0],c=r[1],i=Object(a.useState)(!1),l=d()(i,2),s=l[0],u=l[1],p=Object(w.a)();return Object(a.useEffect)((function(){p||o||s||(e?t():(u(!0),y()({path:Object(O.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((function(e){c(e),u(!1)}))))}),[p,e,s,t,o]),{isRequestingWpcomConnectUrl:s,wpcomConnectUrl:o}}(),D=L.isRequestingWpcomConnectUrl,z=L.wpcomConnectUrl,U=function(e){var t=e.accessToken,n=e.noticeOperations,r=e.setAttributes,c=e.setSelectedAccount,i=Object(a.useState)([]),l=d()(i,2),s=l[0],u=l[1],p=Object(a.useState)(!1),m=d()(p,2),b=m[0],f=m[1];return Object(a.useEffect)((function(){t&&(n.removeAllNotices(),f(!0),y()({path:Object(O.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:30})}).then((function(e){var t=e.external_name,a=e.images;if(f(!1),!a||!Object(h.isArray)(a))return n.createErrorNotice(Object(o.__)("An error occurred. Please try again later.","jetpack")),u([]),r({accessToken:void 0,instagramUser:void 0}),void c(void 0);Object(h.isEmpty)(a)&&n.createErrorNotice(Object(o.__)("No images were found in your Instagram account.","jetpack")),r({instagramUser:t}),u(a)})).catch((function(){f(!1),u([]),r({accessToken:void 0,instagramUser:void 0}),c(void 0)})))}),[t,n,r,c]),{images:s,isLoadingGallery:b,setImages:u}}({accessToken:m,noticeOperations:i,setAttributes:p,setSelectedAccount:R}),V=U.images,q=U.isLoadingGallery,H=U.setImages,G=function(e){var t=e.accessToken,n=e.noticeOperations,r=e.selectedAccount,c=e.setAttributes,i=e.setImages,l=e.setSelectedAccount,s=Object(a.useState)(!1),u=d()(s,2),p=u[0],m=u[1],b=Object(a.useState)(!1),f=d()(b,2),g=f[0],j=f[1],k=Object(a.useState)([]),_=d()(k,2),O=_[0],w=_[1];return Object(a.useEffect)((function(){t||(j(!0),y()({path:"/wpcom/v2/instagram-gallery/connections"}).then((function(e){j(!1),w(e)})).catch((function(){j(!1),w([])})))}),[t]),Object(a.useEffect)((function(){"jetpack-new-instagram-connection"===r||Object(h.find)(O,{token:r})||l(void 0)}),[r,l,O]),{connectToService:function(){n.removeAllNotices(),m(!0),y()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((function(e){var t=new v.a;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(function(e){var t=e.keyring_id;if(m(!1),t){var n=t.toString();c({accessToken:n}),l(n)}})),t.on("close",(function(e){"connect-to-instagram-popup"===e&&m(!1)}))})).catch((function(){n.createErrorNotice(Object(o.__)("An error occurred. Please try again later.","jetpack")),m(!1)}))},disconnectFromService:function(){n.removeAllNotices(),c({accessToken:void 0,instagramUser:void 0}),i([])},isConnecting:p,isRequestingUserConnections:g,userConnections:O}}({accessToken:m,noticeOperations:i,selectedAccount:F,setAttributes:p,setImages:H,setSelectedAccount:R}),W=G.connectToService,$=G.disconnectFromService,K=G.isConnecting,Z=G.isRequestingUserConnections,J=G.userConnections,Y=Object(w.a)(),Q=x>V.length?V.length:x,X=!q&&(!m||Object(h.isEmpty)(V)),ee=!X,te=m&&q&&Object(h.isEmpty)(V),ne=!X&&!te,re=b()(n,u()({},"align".concat(k),k)),ae=b()("wp-block-jetpack-instagram-gallery__grid","wp-block-jetpack-instagram-gallery__grid-columns-".concat(C),{"is-stacked-on-mobile":A}),oe={gridGap:T},ce={padding:T},ie=function(){F&&"jetpack-new-instagram-connection"!==F?p({accessToken:F,instagramUser:Object(h.find)(J,{token:F}).username}):W()};return Object(a.createElement)("div",{className:re},X&&Object(a.createElement)(g.Placeholder,{icon:"instagram",instructions:Y?Z||J.length?void 0:Object(o.__)("Connect to Instagram to start sharing your images.","jetpack"):Object(o.__)("First, you'll need to connect to WordPress.com.","jetpack"),label:Object(o.__)("Latest Instagram Posts","jetpack"),notices:s},Y?(N=J.length>0,P=[].concat(l()(Object(h.map)(J,(function(e){return{label:"@".concat(e.username),value:e.token}}))),[{label:Object(o.__)("Add a new account","jetpack"),value:"jetpack-new-instagram-connection"}]),M=K||Z||N&&!F,Object(a.createElement)("div",null,N&&Object(a.createElement)(g.RadioControl,{label:Object(o.__)("Select your Instagram account:","jetpack"),onChange:function(e){return R(e)},options:P,selected:F}),"jetpack-new-instagram-connection"===F&&Object(a.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},Object(o.__)("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),Object(a.createElement)(g.Button,{disabled:M,isLarge:!0,isPrimary:!0,onClick:ie},K&&Object(o.__)("Connectingโฆ","jetpack"),Z&&Object(o.__)("Loading your connectionsโฆ","jetpack"),!K&&!Z&&Object(o.__)("Connect to Instagram","jetpack")))):Object(a.createElement)(g.Button,{disabled:D||!z,href:z,isLarge:!0,isPrimary:!0},Object(o.__)("Connect to WordPress.com","jetpack"))),te&&Object(a.createElement)("div",{className:"wp-block-embed is-loading"},Object(a.createElement)(g.Spinner,null),Object(a.createElement)("p",null,Object(o.__)("Embeddingโฆ","jetpack"))),ne&&Object(a.createElement)("div",{className:ae,style:oe},Object(h.times)(r?x:Q,(function(e){return Object(a.createElement)("span",{className:b()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:ce},function(e){if(V[e]){var n=V[e];return Object(a.createElement)(E,{alt:n.title||n.url,src:n.url,attributes:t})}return Object(a.createElement)("img",{alt:Object(o.__)("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})}(e))}))),ee&&Object(a.createElement)(f.InspectorControls,null,Object(a.createElement)(g.PanelBody,{title:Object(o.__)("Account Settings","jetpack")},Object(a.createElement)(g.PanelRow,null,Object(a.createElement)("span",null,Object(o.__)("Account","jetpack")),Object(a.createElement)(g.ExternalLink,{href:"https://www.instagram.com/".concat(S,"/")},"@",S)),Y&&Object(a.createElement)(g.PanelRow,null,Object(a.createElement)(g.Button,{isDestructive:!0,isLink:!0,onClick:function(){return $(m)}},Object(o.__)("Disconnect your account","jetpack")))),Object(a.createElement)(g.PanelBody,{title:Object(o.__)("Display Settings","jetpack")},function(){var e=V.length;if(ee&&!te&&e<x){var t=e?Object(o.sprintf)(Object(o._n)("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",e,"jetpack"),e):Object(o.__)("There are currently no posts in your Instagram account.","jetpack");return Object(a.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},Object(a.createElement)(g.Notice,{isDismissible:!1,status:"info"},t))}}(),Object(a.createElement)(g.RangeControl,{label:Object(o.__)("Number of Posts","jetpack"),value:x,onChange:function(e){return p({count:e})},min:1,max:30}),Object(a.createElement)(g.RangeControl,{label:Object(o.__)("Number of Columns","jetpack"),value:C,onChange:function(e){return p({columns:e})},min:1,max:6}),Object(a.createElement)(g.RangeControl,{label:Object(o.__)("Image Spacing (px)","jetpack"),value:T,onChange:function(e){return p({spacing:e})},min:0,max:50}),Object(a.createElement)(g.ToggleControl,{label:Object(o.__)("Stack on mobile","jetpack"),checked:A,onChange:function(){return p({isStackedOnMobile:!A})}}))))})),x=n(17),S={title:Object(o.__)("Latest Instagram Posts","jetpack"),description:Object(o.__)("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:"instagram",foreground:Object(x.a)()},category:"embed",keywords:[Object(o._x)("images","block search term","jetpack"),Object(o._x)("photos","block search term","jetpack"),Object(o._x)("pictures","block search term","jetpack")],supports:{align:!0,html:!1},attributes:c,edit:C,save:function(e){var t=e.attributes.instagramUser;return t&&Object(a.createElement)("div",null,Object(a.createElement)("a",{href:"https://www.instagram.com/".concat(t,"/"),rel:"noopener noreferrer",target:"_blank"},"https://www.instagram.com/".concat(t,"/")))}};Object(r.a)("instagram-gallery",S)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(1),o=n(11),c=n(35),i={backgroundColor:{type:"string",default:"ffffff",validator:c.a},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:c.a},textColor:{type:"string",default:"4D5055",validator:c.a},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:function(e){return!e||e.startsWith("https://calendly.com/")}}},l=n(7),s=n.n(l),u=n(0),p=n(4),d=["submitButtonText","submitButtonTextColor","submitButtonBackgroundColor","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"],m={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:c.a},submitButtonText:{type:"string",default:Object(a.__)("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:c.a},textColor:{type:"string",default:"4D5055",validator:c.a},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:function(e){return!e||e.startsWith("https://calendly.com/")}},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:c.a},customTextButtonColor:{type:"string",validator:c.a}},migrate:function(e){var t,n=Object(p.omit)(e,d),r={text:(t=e).submitButtonText||Object(a.__)("Schedule time with me","jetpack"),textColor:t.submitButtonTextColor||t.textButtonColor,customTextColor:t.customTextButtonColor,backgroundColor:t.submitButtonBackgroundColor||t.backgroundButtonColor,customBackgroundColor:t.customBackgroundButtonColor,url:t.url};return[n,[Object(o.createBlock)("jetpack/button",s()({element:"a",uniqueId:"calendly-widget-id"},r))]]},isEligible:function(e,t){return"link"===e.style&&(Object(p.isEmpty)(t)||Object(p.some)(Object(p.pick)(e,d),Boolean))},save:function(e){var t=e.attributes.url;return Object(u.createElement)("a",{href:t},t)}},b=n(9),h=n.n(b),f=(n(129),n(142)),g=n.n(f),j=n(5),v=n(2),k=n(10),y=(n(130),n(171),Object(u.createElement)(v.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(v.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"}))),_=n(44),O=/(^|\/\/)(calendly\.com[^"']*)/i,w=function(e){if(e){var t=function(e){var t=e.match(O);if(t)return"https://"+t[2]}(e);if(t){var n=function(e){var t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;var r=new URLSearchParams(n.search),a=r.get("background_color"),o=r.get("primary_color"),c=r.get("text_color"),i=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(i)&&(t.backgroundColor=a),o&&o.match(i)&&(t.primaryColor=o),c&&c.match(i)&&(t.textColor=c),t}(t),r=function(e){return e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0}(e);if(r&&(n.style=r),"link"===r){n.buttonAttributes={};var a=function(e){var t=e.match(/false;"\>([^<]+)\<\//);return t||(t=e.match(/text: '([^']*?)'/))?t[1]:void 0}(e);a&&(n.buttonAttributes.text=a);var o=function(e){var t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]}(e);o&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=o);var c=function(e){var t=e.match(/color: '([^']*?)'/);if(t)return t[1]}(e);c&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=c)}return n}}},E=n(94),C=n(65);var x=Object(v.withNotices)((function(e){var t=e.attributes,n=e.className,r=e.clientId,c=e.name,l=e.noticeOperations,d=e.noticeUI,m=e.setAttributes,b=Object(o.getBlockDefaultClassName)(c),f=Object(_.a)(i,t);Object(p.isEqual)(f,t)||m(f);var O=f.backgroundColor,x=f.submitButtonText,S=f.hideEventTypeDetails,N=f.primaryColor,P=f.textColor,M=f.style,B=f.url,I=Object(u.useState)(B),F=h()(I,2),R=F[0],L=F[1],D=Object(u.useState)(!1),z=h()(D,2),U=z[0],V=z[1],q=Object(u.useState)(!1),H=h()(q,2),G=H[0],W=H[1],$=Object(u.useState)({}),K=h()($,2),Z=K[0],J=K[1],Y=function(){l.removeAllNotices(),l.createErrorNotice(Object(a.__)("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};Object(u.useEffect)((function(){B&&A!==B&&"link"!==M&&Object(C.a)(B,W).catch((function(){m({url:void 0}),Y()}))}),[]);var Q,X=function(e){if(e){e.preventDefault();var t=w(R);if(t){if(t.buttonAttributes&&"link"===t.style){var n=Object(k.select)("core/editor").getBlocksByClientId(r);n.length&&n[0].innerBlocks.forEach((function(e){Object(k.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),J(t.buttonAttributes)}Object(C.a)(t.url,W).then((function(){var e=Object(_.a)(i,t);m(e),V(!1),l.removeAllNotices()})).catch((function(){m({url:void 0}),Y()}))}else Y()}else Y()},ee=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("form",{onSubmit:X},Object(u.createElement)("input",{type:"text",id:"embedCode",onChange:function(e){return L(e.target.value)},placeholder:Object(a.__)("Calendly web address or embed codeโฆ","jetpack"),value:R,className:"components-placeholder__input"}),Object(u.createElement)("div",null,Object(u.createElement)(v.Button,{isSecondary:!0,isLarge:!0,type:"submit"},Object(a._x)("Embed","button label","jetpack")))),Object(u.createElement)("div",{className:"".concat(b,"-learn-more")},Object(u.createElement)(v.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},Object(a.__)("Need help finding your embed code?","jetpack")))),te=Object(u.createElement)("div",{className:"wp-block-embed is-loading"},Object(u.createElement)(v.Spinner,null),Object(u.createElement)("p",null,Object(a.__)("Embeddingโฆ","jetpack"))),ne=Object(u.createElement)(v.Placeholder,{label:Object(a.__)("Calendly","jetpack"),instructions:Object(a.__)("Enter your Calendly web address or embed code below.","jetpack"),icon:Object(u.createElement)(j.BlockIcon,{icon:y}),notices:d},ee),re=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"".concat(b,"-overlay")}),Object(u.createElement)("iframe",{src:(Q=g.a.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:S?1:0,background_color:O,primary_color:N,text_color:P}),"".concat(B,"?").concat(Q)),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),ae=Object(u.createElement)(j.InnerBlocks,{template:[[T.name,s()({},T.attributes,{},Z,{passthroughAttributes:{url:"url"}})]],templateLock:"all"}),oe=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("a",{style:{alignSelf:"flex-start",border:"none"},className:"wp-block-button__link"},x)),ce=[{value:"inline",label:Object(a.__)("Inline","jetpack")},{value:"link",label:Object(a.__)("Link","jetpack")}],ie=Object(u.createElement)(u.Fragment,null,B&&!U&&Object(u.createElement)(j.BlockControls,null,Object(u.createElement)(v.Toolbar,null,Object(u.createElement)(v.Button,{onClick:function(){return V(!0)}},Object(a.__)("Edit","jetpack")))),B&&Object(u.createElement)(E.a,{clientId:r,styleOptions:ce,onSelectStyle:m,activeStyle:M,attributes:t,viewportWidth:500}),Object(u.createElement)(j.InspectorControls,null,Object(u.createElement)(v.PanelBody,{title:Object(a.__)("Calendar Settings","jetpack"),initialOpen:!1},Object(u.createElement)("form",{onSubmit:X,className:"".concat(b,"-embed-form-sidebar")},Object(u.createElement)("input",{type:"text",id:"embedCode",onChange:function(e){return L(e.target.value)},placeholder:Object(a.__)("Calendly web address or embed codeโฆ","jetpack"),value:R,className:"components-placeholder__input"}),Object(u.createElement)("div",null,Object(u.createElement)(v.Button,{isSecondary:!0,isLarge:!0,type:"submit"},Object(a._x)("Embed","button label","jetpack")))),Object(u.createElement)(v.ToggleControl,{label:Object(a.__)("Hide Event Type Details","jetpack"),checked:S,onChange:function(){return m({hideEventTypeDetails:!S})}})),B&&Object(u.createElement)(v.Notice,{className:"".concat(b,"-color-notice"),isDismissible:!1},Object(u.createElement)(v.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},Object(a.__)("Follow these instructions to change the colors in this block.","jetpack")))));if(G)return te;var le,se="".concat(n," calendly-style-").concat(M);return Object(u.createElement)("div",{className:se},ie,B&&!U?"inline"===M?re:le?oe:ae:ne)}));var S=n(17),A="https://calendly.com/wordpresscom/jetpack-block-example",T={name:"jetpack/button",attributes:{element:"a",text:Object(a.__)("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:A}},N={title:Object(a.__)("Calendly","jetpack"),description:Object(a.__)("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:y,foreground:Object(S.a)()},category:"grow",keywords:[Object(a._x)("calendar","block search term","jetpack"),Object(a._x)("schedule","block search term","jetpack"),Object(a._x)("appointments","block search term","jetpack"),Object(a._x)("events","block search term","jetpack"),Object(a._x)("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:x,save:function(e){return e.attributes.url,Object(u.createElement)("div",null,Object(u.createElement)(j.InnerBlocks.Content,null))},attributes:i,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:A},innerBlocks:[T]},transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&O.test(e.textContent)},transform:function(e){var t=w(e.textContent);return Object(o.createBlock)("jetpack/calendly",t)}}]},deprecated:[m]};Object(r.a)("calendly",N)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(1),o={revueUsername:{type:"string"},emailLabel:{type:"string",default:Object(a.__)("Email address","jetpack")},emailPlaceholder:{type:"string",default:Object(a.__)("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:Object(a.__)("First name","jetpack")},firstNamePlaceholder:{type:"string",default:Object(a.__)("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:Object(a.__)("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:Object(a.__)("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0}},c=n(7),i=n.n(c),l=n(0),s=n(4),u=n(11),p=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius","gradient","customGradient"],d={attributes:{revueUsername:{type:"string"},text:{type:"string",default:Object(a._x)("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")},emailLabel:{type:"string",default:Object(a.__)("Email address","jetpack")},emailPlaceholder:{type:"string",default:Object(a.__)("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:Object(a.__)("First name","jetpack")},firstNamePlaceholder:{type:"string",default:Object(a.__)("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:Object(a.__)("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:Object(a.__)("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:function(e){var t=Object(s.omit)(e,p),n=Object(s.pick)(e,p);return[t,[Object(u.createBlock)("jetpack/button",i()({element:"button",text:n.text||"Subscribe"},n))]]},isEligible:function(e,t){return Object(s.isEmpty)(t)||Object(s.some)(Object(s.pick)(e,p),Boolean)},save:function(e){var t=e.attributes.revueUsername,n="https://www.getrevue.co/profile/".concat(t);return Object(l.createElement)("div",null,Object(l.createElement)("a",{href:n},n))}},m=n(9),b=n.n(m),h=n(5),f=n(2),g=n(46),j=Object(l.createElement)(f.SVG,{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(f.G,{fillRule:"nonzero"},Object(l.createElement)(f.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"}))),v=n(44),k=n(24);n(299),n(186);var y=n(17);var _={name:"jetpack/button",attributes:{element:"button",text:Object(a._x)("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")}},O={title:Object(a.__)("Revue","jetpack"),description:Object(a.__)("Add a subscription form for your Revue newsletter.","jetpack"),icon:{src:j,foreground:Object(y.a)()},category:"grow",keywords:[Object(a._x)("email","block search term","jetpack"),Object(a._x)("subscription","block search term","jetpack"),Object(a._x)("newsletter","block search term","jetpack"),Object(a._x)("mailing list","block search term","jetpack")],supports:{html:!1},attributes:o,edit:function(e){var t=e.attributes,n=e.className,r=e.setAttributes;Object(l.useEffect)((function(){var e=Object(v.a)(o,t);Object(s.isEqual)(e,t)||r(e)}),[t,r]);var c=t.revueUsername,i=t.emailLabel,u=t.emailPlaceholder,p=t.firstNameLabel,d=t.firstNamePlaceholder,m=t.firstNameShow,y=t.lastNameLabel,O=t.lastNamePlaceholder,w=t.lastNameShow,E=Object(l.useState)(""),C=b()(E,2),x=C[0],S=C[1];Object(l.useEffect)((function(){!x&&c&&S(c)}),[]);var A=Object(k.b)()||Object(k.a)()?"http://support.wordpress.com/wordpress-editor/blocks/revue-block/":"https://jetpack.com/support/jetpack-blocks/revue-block/";return Object(l.createElement)("div",{className:n},!c&&Object(l.createElement)(f.Placeholder,{icon:Object(l.createElement)(h.BlockIcon,{icon:j}),instructions:Object(a.__)("Enter your Revue username.","jetpack"),label:Object(a.__)("Revue","jetpack")},Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),r({revueUsername:x.trim()})}},Object(l.createElement)("input",{className:"components-placeholder__input",onChange:function(e){return S(e.target.value.trim())},placeholder:Object(a.__)("Enter your Revue username hereโฆ","jetpack"),type:"text",value:x}),Object(l.createElement)("div",null,Object(l.createElement)(f.Button,{disabled:!x,isDefault:!0,isLarge:!0,isSecondary:!0,type:"submit"},Object(a.__)("Add Form","jetpack")))),Object(l.createElement)("div",{className:"components-placeholder__learn-more"},Object(l.createElement)(f.ExternalLink,{href:A},Object(a.__)("Need help finding your Revue username?","jetpack")))),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(h.InspectorControls,null,Object(l.createElement)(f.PanelBody,{title:Object(a.__)("Settings","jetpack")},Object(l.createElement)(f.ToggleControl,{label:Object(a.__)("Show first name field.","jetpack"),checked:m,onChange:function(){return r({firstNameShow:!m})}}),Object(l.createElement)(f.ToggleControl,{label:Object(a.__)("Show last name field.","jetpack"),checked:w,onChange:function(){return r({lastNameShow:!w})}}),Object(l.createElement)(f.TextControl,{label:Object(a.__)("Revue Username","jetpack"),onChange:function(e){S(e.trim()),r({revueUsername:e.trim()})},value:c}))),Object(l.createElement)(f.TextControl,{label:Object(l.createElement)(g.a,{label:i,labelFieldName:"emailLabel",required:!0,setAttributes:r}),onChange:function(e){return r({emailPlaceholder:e})},placeholder:u,value:u}),m&&Object(l.createElement)(f.TextControl,{label:Object(l.createElement)(g.a,{label:p,labelFieldName:"firstNameLabel",setAttributes:r}),onChange:function(e){return r({firstNamePlaceholder:e})},placeholder:d,value:d}),w&&Object(l.createElement)(f.TextControl,{label:Object(l.createElement)(g.a,{label:y,labelFieldName:"lastNameLabel",setAttributes:r}),onChange:function(e){return r({lastNamePlaceholder:e})},placeholder:O,value:O}),Object(l.createElement)(h.InnerBlocks,{template:[[_.name,_.attributes]],templateLock:"all"})))},save:function(e){var t=e.attributes.revueUsername,n="https://www.getrevue.co/profile/".concat(t);return Object(l.createElement)("div",null,Object(l.createElement)(h.InnerBlocks.Content,null),Object(l.createElement)("a",{className:"wp-block-jetpack-revue__fallback",href:n},n))},example:{attributes:{revueUsername:"example"},innerBlocks:[_]},deprecated:[d]};Object(r.a)("revue",O)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=n(7),l=n.n(i),s=n(21),u=n.n(s),p=n(12),d=n.n(p),m=n(16),b=n.n(m),h=n(13),f=n.n(h),g=n(14),j=n.n(g),v=n(6),k=n.n(v),y=n(15),_=n.n(y),O=n(3),w=n.n(O),E=n(18),C=n(4),x=n(34),S=n(10),A=n(5),T=n(52),N=n(64),P=function(e){var t=e.allowedMediaTypes,n=e.attributes,r=n.autoplay,i=n.delay,l=n.effect,s=n.images,u=n.sizeSlug,p=e.imageSizeOptions,d=e.onChangeImageSize,m=e.onSelectImages,b=e.setAttributes,h="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,f=[{label:Object(o._x)("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:Object(o._x)("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(A.InspectorControls,null,Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Autoplay","jetpack")},Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Autoplay","jetpack"),help:Object(o.__)("Autoplay between slides","jetpack"),checked:r,onChange:function(e){b({autoplay:e})}}),r&&Object(a.createElement)(c.RangeControl,{label:Object(o.__)("Delay between transitions (in seconds)","jetpack"),value:i,onChange:function(e){b({delay:e})},min:1,max:5}),r&&h&&Object(a.createElement)("span",null,Object(o.__)("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack"))),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Effects","jetpack")},Object(a.createElement)(c.SelectControl,{label:Object(o.__)("Transition effect","jetpack"),value:l,onChange:function(e){b({effect:e})},options:f})),!Object(C.isEmpty)(s)&&!Object(C.isEmpty)(p)&&Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Image Settings","jetpack")},Object(a.createElement)(c.SelectControl,{label:Object(o.__)("Image Size","jetpack"),value:u,options:p,onChange:d}))),Object(a.createElement)(A.BlockControls,null,!!s.length&&Object(a.createElement)(c.Toolbar,null,Object(a.createElement)(A.MediaUpload,{onSelect:m,allowedTypes:t,multiple:!0,gallery:!0,value:s.map((function(e){return e.id})),render:function(e){var t=e.open;return Object(a.createElement)(N.a,{label:Object(o.__)("Edit Slideshow","jetpack"),onClick:t})}}))))},M=n(8),B=n.n(M),I=n(63),F=n(117),R=n(62),L=function(e){function t(e){var n;return d()(this,t),n=f()(this,j()(t).call(this,e)),w()(k()(n),"pendingRequestAnimationFrame",null),w()(k()(n),"resizeObserver",null),w()(k()(n),"initializeResizeObserver",(function(e){n.clearResizeObserver(),n.resizeObserver=new I.a((function(){n.clearPendingRequestAnimationFrame(),n.pendingRequestAnimationFrame=requestAnimationFrame((function(){Object(R.d)(e),e.update()}))})),n.resizeObserver.observe(e.el)})),w()(k()(n),"clearPendingRequestAnimationFrame",(function(){n.pendingRequestAnimationFrame&&(cancelAnimationFrame(n.pendingRequestAnimationFrame),n.pendingRequestAnimationFrame=null)})),w()(k()(n),"clearResizeObserver",(function(){n.resizeObserver&&(n.resizeObserver.disconnect(),n.resizeObserver=null)})),w()(k()(n),"prefersReducedMotion",(function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches})),w()(k()(n),"buildSwiper",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Object(F.a)(n.slideshowRef.current,{autoplay:!(!n.props.autoplay||n.prefersReducedMotion())&&{delay:1e3*n.props.delay,disableOnInteraction:!1},effect:n.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:n.btnNextRef.current,prevEl:n.btnPrevRef.current},pagination:{clickable:!0,el:n.paginationRef.current,type:"bullets"}},{init:R.b,imagesReady:R.d,paginationRender:R.c,transitionEnd:R.a})})),n.slideshowRef=Object(a.createRef)(),n.btnNextRef=Object(a.createRef)(),n.btnPrevRef=Object(a.createRef)(),n.paginationRef=Object(a.createRef)(),n}return _()(t,e),b()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.onError;this.buildSwiper().then((function(t){e.swiperInstance=t,e.initializeResizeObserver(t)})).catch((function(){t(Object(o.__)("The Swiper library could not be loaded.","jetpack"))}))}},{key:"componentWillUnmount",value:function(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}},{key:"componentDidUpdate",value:function(e){var t,n=this,r=this.props,a=r.align,c=r.autoplay,i=r.delay,l=r.effect,s=r.images,u=r.onError;(a===e.align&&Object(C.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),l!==e.effect||c!==e.autoplay||i!==e.delay||s!==e.images)&&(t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((function(e){n.swiperInstance=e,n.initializeResizeObserver(e)})).catch((function(){u(Object(o.__)("The Swiper library could not be loaded.","jetpack"))})))}},{key:"render",value:function(){var e,t;if(!(null===(e=this.props)||void 0===e||null===(t=e.images)||void 0===t?void 0:t.length))return null;var n=this.props,r=n.autoplay,o=n.className,i=n.delay,l=n.effect,s=n.images;return Object(a.createElement)("div",{className:o,"data-autoplay":r||null,"data-delay":r?i:null,"data-effect":l},Object(a.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},Object(a.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},s.map((function(e){var t=e.alt,n=e.caption,r=e.id,o=e.url;return Object(a.createElement)("li",{className:B()("wp-block-jetpack-slideshow_slide","swiper-slide",Object(x.isBlobURL)(o)&&"is-transient"),key:r},Object(a.createElement)("figure",null,Object(a.createElement)("img",{alt:t,className:"wp-block-jetpack-slideshow_image wp-image-".concat(r),"data-id":r,src:o}),Object(x.isBlobURL)(o)&&Object(a.createElement)(c.Spinner,null),n&&Object(a.createElement)(A.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:n})))}))),Object(a.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),Object(a.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),Object(a.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),Object(a.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}}]),t}(a.Component);w()(L,"defaultProps",{effect:"slide"});var D=L,z=(n(303),["image"]),U=function(e,t){var n=Object(C.pick)(e,["alt","id","link","caption"]);return n.url=Object(C.get)(e,["sizes",t,"url"])||Object(C.get)(e,["media_details","sizes",t,"source_url"])||e.url,n},V=function(e){function t(){var e;return d()(this,t),e=f()(this,j()(t).apply(this,arguments)),w()(k()(e),"onSelectImages",(function(t){var n=e.props.attributes.sizeSlug,r=t.map((function(e){return U(e,n)}));e.setAttributes({images:r})})),w()(k()(e),"onRemoveImage",(function(t){return function(){var n=Object(C.filter)(e.props.attributes.images,(function(e,n){return t!==n}));e.setState({selectedImage:null}),e.setAttributes({images:n})}})),w()(k()(e),"addFiles",(function(t){var n=e.props.attributes.images||[],r=e.props.attributes.sizeSlug,a=e.props,o=a.lockPostSaving,c=a.unlockPostSaving,i=a.noticeOperations;o("slideshowBlockLock"),Object(T.mediaUpload)({allowedTypes:z,filesList:t,onFileChange:function(t){var a=t.map((function(e){return U(e,r)}));e.setAttributes({images:[].concat(u()(n),u()(a))}),a.every((function(e){return Object(x.isBlobURL)(e.url)}))||c("slideshowBlockLock")},onError:i.createErrorNotice})})),w()(k()(e),"uploadFromFiles",(function(t){return e.addFiles(t.target.files)})),w()(k()(e),"updateImagesSize",(function(t){var n=e.props.attributes.images,r=e.props.resizedImages,a=n.map((function(e){var n=r.find((function(t){var n=t.id;return parseInt(n,10)===parseInt(e.id,10)})),a=Object(C.get)(n,["sizes",t,"source_url"]);return l()({},e,{},a&&{url:a})}));e.setAttributes({images:a,sizeSlug:t})})),e.state={selectedImage:null},e}return _()(t,e),b()(t,[{key:"componentDidMount",value:function(){var e=this.props.attributes,t=e.ids;e.sizeSlug||this.setAttributes({sizeSlug:t.length?"full":"large"})}},{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=l()({},e,{ids:e.images.map((function(e){var t=e.id;return parseInt(t,10)}))})),this.props.setAttributes(e)}},{key:"getImageSizeOptions",value:function(){var e=this.props.imageSizes;return Object(C.map)(e,(function(e){var t=e.name;return{value:e.slug,label:t}}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.className,i=t.isSelected,l=t.noticeOperations,s=t.noticeUI,u=n.align,p=n.autoplay,d=n.delay,m=n.effect,b=n.images,h=this.getImageSizeOptions(),f=Object(a.createElement)(P,{allowedMediaTypes:z,attributes:n,imageSizeOptions:h,onChangeImageSize:this.updateImagesSize,onSelectImages:this.onSelectImages,setAttributes:function(t){return e.setAttributes(t)}});return 0===b.length?Object(a.createElement)(a.Fragment,null,f,Object(a.createElement)(A.MediaPlaceholder,{icon:Object(a.createElement)(A.BlockIcon,{icon:te}),className:r,labels:{title:Object(o.__)("Slideshow","jetpack"),instructions:Object(o.__)("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:z,multiple:!0,notices:s,onError:l.createErrorNotice})):Object(a.createElement)(a.Fragment,null,f,s,Object(a.createElement)(D,{align:u,autoplay:p,className:r,delay:d,effect:m,images:b,onError:l.createErrorNotice}),Object(a.createElement)(c.DropZone,{onFilesDrop:this.addFiles}),i&&Object(a.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},Object(a.createElement)(c.FormFileUpload,{multiple:!0,isLarge:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},Object(o.__)("Upload an image","jetpack"))))}}]),t}(a.Component),q=Object(E.compose)(Object(S.withSelect)((function(e,t){return{imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:t.attributes.ids.reduce((function(t,n){var r=e("core").getMedia(n),a=Object(C.get)(r,["media_details","sizes"]);return[].concat(u()(t),[{id:n,sizes:a}])}),[])}})),Object(S.withDispatch)((function(e){var t=e("core/editor");return{lockPostSaving:t.lockPostSaving,unlockPostSaving:t.unlockPostSaving}})),c.withNotices)(V),H=n(11);function G(e){return Object(C.filter)(e,(function(e){var t=e.id,n=e.url;return t&&n}))}var W={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:function(e){return G(e).length>0},transform:function(e){var t=G(e);return Object(H.createBlock)("jetpack/slideshow",{images:t.map((function(e){return{alt:e.alt,caption:e.caption,id:e.id,url:e.url}})),ids:t.map((function(e){return e.id}))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:function(e){var t=G(e.images);return t.length>0?Object(H.createBlock)("jetpack/slideshow",{images:t.map((function(e){return{alt:e.alt,caption:e.caption,id:e.id,url:e.url}})),ids:t.map((function(e){return e.id}))}):Object(H.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:function(e){var t=e.images,n=e.ids;return Object(H.createBlock)("core/gallery",{images:t,ids:n})}},{type:"block",blocks:["core/image"],transform:function(e){var t=e.images;return t.length>0?t.map((function(e){var t=e.id,n=e.url,r=e.alt,a=e.caption;return Object(H.createBlock)("core/image",{id:t,url:n,alt:r,caption:a})})):Object(H.createBlock)("core/image")}}]},$=n(17),K=n(56),Z=n(152),J=n.n(Z),Y=n(153),Q=n.n(Y),X=n(154),ee=n.n(X),te=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(a.createElement)(c.Path,{d:"M10 8v8l5-4-5-4zm9-5H5c-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 16H5V5h14v14z"})),ne={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:J.a},{alt:"",caption:"",id:23,url:Q.a},{alt:"",caption:"",id:23,url:ee.a}],effect:"slide"},re={title:Object(o.__)("Slideshow","jetpack"),category:Object(K.a)("media","layout"),keywords:[Object(o._x)("image","block search term","jetpack"),Object(o._x)("gallery","block search term","jetpack"),Object(o._x)("slider","block search term","jetpack")],description:Object(o.__)("Add an interactive slideshow.","jetpack"),attributes:{align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}},supports:{align:["center","wide","full"],html:!1},icon:{src:te,foreground:Object($.a)()},edit:q,save:function(e){var t=e.attributes,n=t.align,r=t.autoplay,o=t.delay,c=t.effect,i=t.images,l=e.className;return Object(a.createElement)(D,{align:n,autoplay:r,className:l,delay:o,effect:c,images:i})},transforms:W,example:{attributes:ne}};Object(r.a)("slideshow",re)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=n(11),l=n(12),s=n.n(l),u=n(16),p=n.n(u),d=n(13),m=n.n(d),b=n(14),h=n.n(b),f=n(6),g=n.n(f),j=n(15),v=n.n(j),k=n(3),y=n.n(k),_=n(5),O=n(28);function w(e){if(!N.test(e))return"";var t=Object(O.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}function E(e,t){var n=Object(a.createElement)("a",{href:e},e);t(Object(i.createBlock)("core/paragraph",{content:Object(a.renderToString)(n)}))}var C=n(65),x=function(e){function t(){var e;return s()(this,t),e=m()(this,h()(t).apply(this,arguments)),y()(g()(e),"setUrl",(function(t){var n=e.props,r=n.noticeOperations,a=n.setAttributes;t&&P!==t&&Object(C.a)(t,e.setIsResolvingUrl).then((function(t){a({url:t}),e.setState({editedUrl:t}),r.removeAllNotices()})).catch((function(){a({url:void 0}),e.setErrorNotice()}))})),y()(g()(e),"setIsResolvingUrl",(function(t){return e.setState({isResolvingUrl:t})})),y()(g()(e),"setErrorNotice",(function(){var t=e.props,n=t.noticeOperations,r=t.onReplace,i=e.state.editedUrl;n.removeAllNotices(),n.createErrorNotice(Object(a.createElement)(a.Fragment,null,Object(o.__)("Sorry, this content could not be embedded.","jetpack")," ",Object(a.createElement)(c.Button,{isLink:!0,onClick:function(){return E(i,r)}},Object(o._x)("Convert block to link","button label","jetpack"))))})),y()(g()(e),"hideOverlay",(function(){e.setState({interactive:!0})})),y()(g()(e),"submitForm",(function(t){t&&t.preventDefault();var n=e.state.editedUrl;e.setUrl(n),e.setState({editingUrl:!1})})),y()(g()(e),"cannotEmbed",(function(){var t=e.props.attributes.url,n=e.state.isResolvingUrl,r=w(t);return!n&&t&&!r})),e.state={editedUrl:e.props.attributes.url||"",editingUrl:!1,interactive:!1,isResolvingUrl:!1},e}return v()(t,e),p()(t,[{key:"componentDidMount",value:function(){var e=this.props.attributes.url;this.setUrl(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.className,i=t.noticeUI,l=n.url,s=this.state,u=s.editedUrl,p=s.interactive,d=s.editingUrl;if(s.isResolvingUrl)return Object(a.createElement)("div",{className:"wp-block-embed is-loading"},Object(a.createElement)(c.Spinner,null),Object(a.createElement)("p",null,Object(o.__)("Embeddingโฆ","jetpack")));var m=w(l),b="<a data-pin-do='".concat(m,"' href='").concat(l,"'></a>"),h=Object(a.createElement)(_.BlockControls,null,Object(a.createElement)(c.Toolbar,null,Object(a.createElement)(c.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit URL","jetpack"),icon:"edit",onClick:function(){return e.setState({editingUrl:!0})}})));return d||!l||this.cannotEmbed()?Object(a.createElement)("div",{className:r},Object(a.createElement)(c.Placeholder,{label:Object(o.__)("Pinterest","jetpack"),icon:Object(a.createElement)(_.BlockIcon,{icon:B}),notices:i},Object(a.createElement)("form",{onSubmit:this.submitForm},Object(a.createElement)("input",{type:"url",value:u,className:"components-placeholder__input","aria-label":Object(o.__)("Pinterest URL","jetpack"),placeholder:Object(o.__)("Enter URL to embed hereโฆ","jetpack"),onChange:function(t){return e.setState({editedUrl:t.target.value})}}),Object(a.createElement)(c.Button,{isLarge:!0,isSecondary:!0,type:"submit"},Object(o._x)("Embed","button label","jetpack"))))):Object(a.createElement)("div",{className:r},h,Object(a.createElement)("div",null,Object(a.createElement)(c.SandBox,{html:b,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:this.hideOverlay}),!p&&Object(a.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(a.Component),S=Object(c.withNotices)(x);var A=n(17),T={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:function(e){var t=e.attributes,n=e.className,r=t.url;return w(r)?Object(a.createElement)("div",{className:n},Object(a.createElement)("a",{"data-pin-do":w(r),href:r})):null}},N=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,P="https://pinterest.com/anapinskywalker/",M=Object(o.__)("Pinterest","jetpack"),B=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(c.G,null,Object(a.createElement)(c.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"}))),I={title:M,description:Object(o.__)("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:B,foreground:Object(A.a)()},category:"embed",keywords:[Object(o._x)("social","block search term","jetpack"),Object(o._x)("pinboard","block search term","jetpack"),Object(o._x)("pins","block search term","jetpack")],supports:{align:!1,html:!1},attributes:{url:{type:"string"}},edit:S,save:function(e){var t=e.attributes.url;return Object(a.createElement)("a",{href:t},t)},transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&N.test(e.textContent)},transform:function(e){return Object(i.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}}]},example:{attributes:{url:P}},deprecated:[T]};Object(r.a)("pinterest",I)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=(n(212),n(170),n(23)),l=n.n(i),s=n(12),u=n.n(s),p=n(16),d=n.n(p),m=n(13),b=n.n(m),h=n(14),f=n.n(h),g=n(6),j=n.n(g),v=n(15),k=n.n(v),y=n(3),_=n.n(y),O=n(22),w=n.n(O),E=n(8),C=n.n(E),x=n(71),S=n(5),A=n(7),T=n.n(A),N=n(4),P=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return n=b()(this,(e=f()(t)).call.apply(e,[this].concat(i))),_()(j()(n),"renderInterval",(function(e,t){var r=n.props.day,i=e.opening,l=e.closing;return Object(a.createElement)(a.Fragment,{key:t},Object(a.createElement)("div",{className:"business-hours__row"},Object(a.createElement)("div",{className:C()(r.name,"business-hours__day")},0===t&&n.renderDayToggle()),Object(a.createElement)("div",{className:C()(r.name,"business-hours__hours")},Object(a.createElement)(c.TextControl,{type:"time",label:Object(o.__)("Opening","jetpack"),value:i,className:"business-hours__open",placeholder:"09:00",onChange:function(e){n.setHour(e,"opening",t)}}),Object(a.createElement)(c.TextControl,{type:"time",label:Object(o.__)("Closing","jetpack"),value:l,className:"business-hours__close",placeholder:"17:00",onChange:function(e){n.setHour(e,"closing",t)}})),Object(a.createElement)("div",{className:"business-hours__remove"},r.hours.length>1&&Object(a.createElement)(c.IconButton,{isSmall:!0,isLink:!0,icon:"trash",onClick:function(){n.removeInterval(t)}}))),t===r.hours.length-1&&Object(a.createElement)("div",{className:"business-hours__row business-hours-row__add"},Object(a.createElement)("div",{className:C()(r.name,"business-hours__day")},"ย "),Object(a.createElement)("div",{className:C()(r.name,"business-hours__hours")},Object(a.createElement)(c.IconButton,{isLink:!0,label:Object(o.__)("Add Hours","jetpack"),onClick:n.addInterval},Object(o.__)("Add Hours","jetpack"))),Object(a.createElement)("div",{className:"business-hours__remove"},"ย ")))})),_()(j()(n),"setHour",(function(e,t,r){var a=n.props,o=a.day,c=a.attributes;(0,a.setAttributes)({days:c.days.map((function(n){return n.name===o.name?T()({},n,{hours:n.hours.map((function(n,a){return a===r?T()({},n,_()({},t,e)):n}))}):n}))})})),_()(j()(n),"toggleClosed",(function(e){var t=n.props,r=t.day,a=t.attributes;(0,t.setAttributes)({days:a.days.map((function(t){if(t.name===r.name){var n=e?[{opening:"09:00",closing:"17:00"}]:[];return T()({},t,{hours:n})}return t}))})})),_()(j()(n),"addInterval",(function(){var e=n.props,t=e.day,r=e.attributes,a=e.setAttributes,o=r.days;t.hours.push({opening:"",closing:""}),a({days:o.map((function(e){return e.name===t.name?T()({},e,{hours:t.hours}):e}))})})),_()(j()(n),"removeInterval",(function(e){var t=n.props,r=t.day,a=t.attributes;(0,t.setAttributes)({days:a.days.map((function(t){return r.name===t.name?T()({},t,{hours:t.hours.filter((function(t,n){return e!==n}))}):t}))})})),n}return k()(t,e),d()(t,[{key:"isClosed",value:function(){var e=this.props.day;return Object(N.isEmpty)(e.hours)}},{key:"renderDayToggle",value:function(){var e=this.props,t=e.day,n=e.localization;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{className:"business-hours__day-name"},n.days[t.name]),Object(a.createElement)(c.ToggleControl,{label:this.isClosed()?Object(o.__)("Closed","jetpack"):Object(o.__)("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}},{key:"renderClosed",value:function(){var e=this.props.day;return Object(a.createElement)("div",{className:"business-hours__row business-hours-row__closed"},Object(a.createElement)("div",{className:C()(e.name,"business-hours__day")},this.renderDayToggle()),Object(a.createElement)("div",{className:C()(e.name,"closed","business-hours__hours")},"ย "),Object(a.createElement)("div",{className:"business-hours__remove"},"ย "))}},{key:"render",value:function(){var e=this.props.day;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}]),t}(a.Component),M=n(9),B=n.n(M),I=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return n=b()(this,(e=f()(t)).call.apply(e,[this].concat(c))),_()(j()(n),"renderInterval",(function(e,t){var r=n.props.day.hours;return Object(a.createElement)("span",{key:t},Object(o.sprintf)("%1$s - %2$s",n.formatTime(e.opening),n.formatTime(e.closing)),r.length>1+t&&Object(a.createElement)("span",null,", "))})),n}return k()(t,e),d()(t,[{key:"formatTime",value:function(e){var t=this.props.timeFormat,n=e.split(":"),r=B()(n,2),a=r[0],o=r[1],c=new Date;return!(!a||!o)&&(c.setHours(a),c.setMinutes(o),Object(x.date)(t,c))}},{key:"render",value:function(){var e=this,t=this.props,n=t.day,r=t.localization,c=n.hours.filter((function(t){return e.formatTime(t.opening)&&e.formatTime(t.closing)}));return Object(a.createElement)("div",{className:"jetpack-business-hours__item"},Object(a.createElement)("dt",{className:n.name},r.days[n.name]),Object(a.createElement)("dd",null,Object(N.isEmpty)(c)?Object(o._x)("Closed","business is closed on a full day","jetpack"):c.map(this.renderInterval),Object(a.createElement)("br",null)))}}]),t}(a.Component),F={days:{Sun:Object(o.__)("Sunday","jetpack"),Mon:Object(o.__)("Monday","jetpack"),Tue:Object(o.__)("Tuesday","jetpack"),Wed:Object(o.__)("Wednesday","jetpack"),Thu:Object(o.__)("Thursday","jetpack"),Fri:Object(o.__)("Friday","jetpack"),Sat:Object(o.__)("Saturday","jetpack")},startOfWeek:0},R=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=b()(this,(e=f()(t)).call.apply(e,[this].concat(a))),_()(j()(n),"state",{localization:F,hasFetched:!1}),n}return k()(t,e),d()(t,[{key:"componentDidMount",value:function(){this.apiFetch()}},{key:"apiFetch",value:function(){var e=this;this.setState({data:F},(function(){w()({path:"/wpcom/v2/business-hours/localized-week"}).then((function(t){e.setState({localization:t,hasFetched:!0})}),(function(){e.setState({localization:F,hasFetched:!0})}))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.className,i=t.isSelected,s=n.days,u=this.state,p=u.localization,d=u.hasFetched,m=p.startOfWeek,b=s.concat(s.slice(0,m)).slice(m);if(!d)return Object(a.createElement)(c.Placeholder,{icon:Object(a.createElement)(S.BlockIcon,{icon:U}),label:Object(o.__)("Loading business hours","jetpack")});if(!i){var h=Object(x.__experimentalGetSettings)().formats.time;return Object(a.createElement)("dl",{className:C()(r,"jetpack-business-hours")},b.map((function(e,t){return Object(a.createElement)(I,{key:t,day:e,localization:p,timeFormat:h})})))}return Object(a.createElement)("div",{className:C()(r,"is-edit")},b.map((function(t,n){return Object(a.createElement)(P,l()({key:n,day:t,localization:p},e.props))})))}}]),t}(a.Component),L=n(26),D=n(17),z=[{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=Object(L.a)(Object(a.createElement)(c.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"})),V={title:Object(o.__)("Business Hours","jetpack"),description:Object(o.__)("Display opening hours for your business.","jetpack"),icon:{src:U,foreground:Object(D.a)()},category:"grow",supports:{html:!0},keywords:[Object(o._x)("opening hours","block search term","jetpack"),Object(o._x)("closing time","block search term","jetpack"),Object(o._x)("schedule","block search term","jetpack"),Object(o._x)("working day","block search term","jetpack")],attributes:{days:{type:"array",default:z}},edit:function(e){return Object(a.createElement)(R,e)},save:function(){return null},example:{attributes:{days:z}}};Object(r.a)("business-hours",V)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(11),i=n(12),l=n.n(i),s=n(16),u=n.n(s),p=n(13),d=n.n(p),m=n(14),b=n.n(m),h=n(6),f=n.n(h),g=n(15),j=n.n(g),v=n(3),k=n.n(v),y=n(2),_=n(18),O=n(5),w=n(146),E=Object(a.createElement)(y.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(y.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"})),C="s*https?://calendar.google.com/calendar",x=new RegExp("^".concat(C),"i"),S=new RegExp("<iframe((?:\\s+\\w+=(['\"]).*?\\2)*)\\s+src=([\"'])(".concat(C,".*?)\\3((?:\\s+\\w+=(['\"]).*?\\6)*)"),"i"),A=new RegExp("".concat(C,"\\?cid=([-A-Za-z0-9+/]+={0,3})"),"i"),T=/\s+(\w+)=(["'])(.*?)\2/gi;function N(e){var t=A.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function P(e){var t=S.exec(e);if(t){var n={};return t.forEach((function(e,t){if(0!==t)if(x.test(e))n.url=e;else for(var r;null!==(r=T.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}}var M=n(24),B=function(e){function t(){var e;return l()(this,t),e=d()(this,b()(t).apply(this,arguments)),k()(f()(e),"hideOverlay",(function(){e.setState({interactive:!0})})),k()(f()(e),"handleEmbed",(function(t){t&&t.preventDefault();var n,r=e.props,a=r.noticeOperations,c=r.setAttributes,i=e.state.editedEmbed.trim();if(n=S.test(i)?P(i):A.test(i)?{url:N(i)}:{url:i},!x.test(n.url))return a.removeAllNotices(),void a.createErrorNotice(Object(o.__)("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"));c(n),e.setState({editingUrl:!1}),a.removeAllNotices()})),k()(f()(e),"getEditForm",(function(t,n){return Object(a.createElement)("form",{onSubmit:e.handleEmbed,className:t},Object(a.createElement)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":Object(o.__)("Google Calendar URL or iframe","jetpack"),placeholder:Object(o.__)("Enter URL or iframe to embed hereโฆ","jetpack"),onChange:function(t){return e.setState({editedEmbed:t.target.value})}}),Object(a.createElement)(y.Button,{isSecondary:!0,isLarge:!0,type:"submit"},Object(o._x)("Embed","button label","jetpack")))})),e.state={editedEmbed:e.props.attributes.url||"",editingUrl:!1,interactive:!1},e}return j()(t,e),u()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=e.name,i=e.noticeUI,l=Object(c.getBlockDefaultClassName)(r),s=t.url,u=t.height,p=this.state,d=p.editedEmbed,m=p.interactive,b=p.editingUrl,h=this.props.isMobile?"300":u,f='<iframe src="'.concat(s,'" style="border:0" scrolling="no" frameborder="0" height="').concat(h,'"></iframe>'),g=Object(a.createElement)(y.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},Object(o.__)("Enable Permissions for the calendar you want to share","jetpack")),j=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.InspectorControls,null,Object(a.createElement)(y.PanelBody,{title:Object(o.__)("Calendar Settings","jetpack"),initialOpen:!1},this.getEditForm("".concat(l,"-embed-form-sidebar"),d))));if(b||!s){var v=Object(M.b)()||Object(M.a)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return Object(a.createElement)("div",{className:n},j,Object(a.createElement)(y.Placeholder,{className:n,label:Object(o.__)("Google Calendar","jetpack"),icon:Object(a.createElement)(O.BlockIcon,{icon:E}),instructions:Object(a.createElement)("ol",{className:"".concat(l,"-placeholder-instructions")},Object(a.createElement)("li",null,g),Object(a.createElement)("li",null,Object(o.__)("Paste the embed code you copied from your Google Calendar below","jetpack"))),notices:i},this.getEditForm("".concat(l,"-embed-form-editor"),d),Object(a.createElement)("div",{className:"".concat(l,"-placeholder-links")},Object(a.createElement)(y.ExternalLink,{href:v},Object(o.__)("Learn more","jetpack")))))}return Object(a.createElement)("div",{className:n},j,Object(a.createElement)("div",null,Object(a.createElement)(y.SandBox,{html:f,onFocus:this.hideOverlay,key:f}),!m&&Object(a.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}(a.Component),I=Object(_.compose)(y.withNotices,Object(w.withViewportMatch)({isMobile:"< small"}))(B),F=(n(225),n(17)),R={title:Object(o.__)("Google Calendar","jetpack"),description:Object(o.__)("Embed a Google Calendar","jetpack"),keywords:[Object(o._x)("events","block search term","jetpack"),Object(o._x)("dates","block search term","jetpack"),Object(o._x)("schedule","block search term","jetpack"),Object(o._x)("appointments","block search term","jetpack")],icon:{src:E,foreground:Object(F.a)()},category:"embed",supports:{align:!0,alignWide:!0,html:!1},attributes:{url:{type:"string"},height:{type:"integer",default:600}},edit:I,save:function(e){var t=e.attributes.url;return Object(a.createElement)("a",{href:t},t)},transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:function(e){var t=e.named,n=t.domain,r=t.dir,a=t.query;return"https://".concat(n,".google.com/").concat(r,"?").concat(a)}}}},{type:"raw",isMatch:function(e){return"P"===e.nodeName&&x.test(e.textContent)},transform:function(e){return Object(c.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})}},{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&S.test(e.innerHTML)},transform:function(e){var t=P(e.innerHTML.trim()),n=t.url,r=t.height;return Object(c.createBlock)("jetpack/google-calendar",{url:n,height:r})}}]},example:{attributes:{url:"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}};Object(r.a)("google-calendar",R)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(5),i=n(2),l=n(7),s=n.n(l),u=n(4),p=n(11),d=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"],m={attributes:{emailPlaceholder:{type:"string",default:Object(o.__)("Enter your email","jetpack")},submitButtonText:{type:"string",default:Object(o.__)("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:Object(o.__)("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:Object(o.__)("Processingโฆ","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:Object(o.__)("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:Object(o.__)("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:function(e){var t,n=Object(u.omit)(e,d),r={text:(t=e).submitButtonText||Object(o.__)("Join my email list","jetpack"),textColor:t.textButtonColor,customTextColor:t.customTextButtonColor,backgroundColor:t.backgroundButtonColor,customBackgroundColor:t.customBackgroundButtonColor};return[n,[Object(p.createBlock)("jetpack/button",s()({element:"button",uniqueId:"mailchimp-widget-id"},r))]]},isEligible:function(e,t){return Object(u.isEmpty)(t)||Object(u.some)(Object(u.pick)(e,d),Boolean)},save:function(){return null}},b=n(21),h=n.n(b),f=n(12),g=n.n(f),j=n(13),v=n.n(j),k=n(14),y=n.n(k),_=n(6),O=n.n(_),w=n(15),E=n.n(w),C=n(3),x=n.n(C),S=n(22),A=n.n(S),T=n(8),N=n.n(T),P=n(16),M=n.n(P),B=function(e){function t(){var e,n;g()(this,t);for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=v()(this,(e=y()(t)).call.apply(e,[this].concat(o))),x()(O()(n),"state",{interest_categories:[]}),x()(O()(n),"retrieveGroups",(function(){A()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((function(e){var t=e.interest_categories;n.setState({interest_categories:t})}))})),x()(O()(n),"render",(function(){var e=n.state.interest_categories,t=n.props,r=t.interests,o=t.onChange;return Object(a.createElement)(a.Fragment,null,e&&(e||[]).map((function(e){return e.interests.map((function(e){return Object(a.createElement)(i.CheckboxControl,{label:e.name,value:e.id,checked:r.includes(e.id),onChange:function(t){return o(e.id,t)},key:e.id})}))})))})),n}return E()(t,e),M()(t,[{key:"componentDidMount",value:function(){this.retrieveGroups()}}]),t}(a.Component),I=B;B.defaultProps={interests:[],onChange:function(){return null}};var F=function(e){function t(){var e;return g()(this,t),e=v()(this,y()(t).apply(this,arguments)),x()(O()(e),"componentDidMount",(function(){e.apiCall()})),x()(O()(e),"onError",(function(t){var n=e.props.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)})),x()(O()(e),"apiCall",(function(){var t={path:"/wpcom/v2/mailchimp",method:"GET"};A()(t).then((function(t){var n=t.connect_url,r="connected"===t.code?1:2;e.setState({connected:r,connectURL:n})}),(function(t){e.setState({connected:2,connectURL:null}),e.onError(t.message)}))})),x()(O()(e),"auditionNotification",(function(t){e.setState({audition:t}),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(e.clearAudition,3e3)})),x()(O()(e),"clearAudition",(function(){e.setState({audition:null})})),x()(O()(e),"updateProcessingText",(function(t){(0,e.props.setAttributes)({processingLabel:t}),e.auditionNotification("processing")})),x()(O()(e),"updateSuccessText",(function(t){(0,e.props.setAttributes)({successLabel:t}),e.auditionNotification("success")})),x()(O()(e),"updateErrorText",(function(t){(0,e.props.setAttributes)({errorLabel:t}),e.auditionNotification("error")})),x()(O()(e),"updateEmailPlaceholder",(function(t){(0,e.props.setAttributes)({emailPlaceholder:t}),e.clearAudition()})),x()(O()(e),"labelForAuditionType",(function(t){var n=e.props.attributes,r=n.processingLabel,a=n.successLabel,o=n.errorLabel;return"processing"===t?r:"success"===t?a:"error"===t?o:null})),x()(O()(e),"roleForAuditionType",(function(e){return"error"===e?"alert":"status"})),x()(O()(e),"render",(function(){var t=e.props,n=t.attributes,r=t.className,l=t.notices,s=t.noticeUI,u=t.setAttributes,p=e.state,d=p.audition,m=p.connected,b=p.connectURL,f=n.emailPlaceholder,g=n.consentText,j=n.interests,v=n.processingLabel,k=n.successLabel,y=n.errorLabel,_=n.preview,O=n.signupFieldTag,w=n.signupFieldValue,E="wp-block-jetpack-mailchimp",C=Object(a.createElement)(i.Placeholder,{icon:D,notices:l},Object(a.createElement)(i.Spinner,null)),S=Object(a.createElement)(i.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:D,label:Object(o.__)("Mailchimp","jetpack"),notices:l,instructions:Object(o.__)("You need to connect your Mailchimp account and choose a list in order to start collecting Email subscribers.","jetpack")},Object(a.createElement)(i.Button,{isDefault:!0,isLarge:!0,href:b,target:"_blank"},Object(o.__)("Set up Mailchimp form","jetpack")),Object(a.createElement)("div",{className:"".concat(E,"-recheck")},Object(a.createElement)(i.Button,{isLink:!0,onClick:e.apiCall},Object(o.__)("Re-check Connection","jetpack")))),A=Object(a.createElement)(c.InspectorControls,null,Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Text Elements","jetpack")},Object(a.createElement)(i.TextControl,{label:Object(o.__)("Email Placeholder","jetpack"),value:f,onChange:e.updateEmailPlaceholder})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Notifications","jetpack")},Object(a.createElement)(i.TextControl,{label:Object(o.__)("Processing text","jetpack"),value:v,onChange:e.updateProcessingText}),Object(a.createElement)(i.TextControl,{label:Object(o.__)("Success text","jetpack"),value:k,onChange:e.updateSuccessText}),Object(a.createElement)(i.TextControl,{label:Object(o.__)("Error text","jetpack"),value:y,onChange:e.updateErrorText})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Mailchimp Groups","jetpack")},Object(a.createElement)(I,{interests:j,onChange:function(e,t){var n=h()(new Set([].concat(h()(j),[e]))).filter((function(n){return!(n===e&&!t)&&n}));u({interests:n})}}),Object(a.createElement)(i.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},Object(o.__)("Learn about groups","jetpack"))),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Signup Location Tracking","jetpack")},Object(a.createElement)(i.TextControl,{label:Object(o.__)("Signup Field Tag","jetpack"),placeholder:Object(o.__)("SIGNUP","jetpack"),value:O,onChange:function(e){return u({signupFieldTag:e})}}),Object(a.createElement)(i.TextControl,{label:Object(o.__)("Signup Field Value","jetpack"),placeholder:Object(o.__)("website","jetpack"),value:w,onChange:function(e){return u({signupFieldValue:e})}}),Object(a.createElement)(i.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},Object(o.__)("Learn about signup location tracking","jetpack"))),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Mailchimp Connection","jetpack")},Object(a.createElement)(i.ExternalLink,{href:b},Object(o.__)("Manage Connection","jetpack")))),T=N()(r,x()({},"".concat(E,"_notication-audition"),d)),P=Object(a.createElement)("div",{className:T},Object(a.createElement)(i.TextControl,{"aria-label":f,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:function(){return!1},placeholder:f,title:Object(o.__)("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),Object(a.createElement)(c.InnerBlocks,{template:[[z.name,z.attributes]],templateLock:"all"}),Object(a.createElement)(c.RichText,{tagName:"p",placeholder:Object(o.__)("Write consent text","jetpack"),value:g,onChange:function(e){return u({consentText:e})},inlineToolbar:!0}),d&&Object(a.createElement)("div",{className:"".concat(E,"_notification ").concat(E,"_").concat(d),role:e.roleForAuditionType(d)},e.labelForAuditionType(d))),M=P;return Object(a.createElement)(a.Fragment,null,s,_&&M,!_&&0===m&&C,!_&&2===m&&S,!_&&1===m&&A,!_&&1===m&&P)})),e.state={audition:null,connected:0,connectURL:null},e.timeout=null,e}return E()(t,e),t}(a.Component),R=Object(i.withNotices)(F),L=(n(234),n(17)),D=Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(i.G,{transform:"translate(-45.478101,-100.73059)"},Object(a.createElement)(i.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},Object(a.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"}),Object(a.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"}),Object(a.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"}),Object(a.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"}),Object(a.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"}),Object(a.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"}),Object(a.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"})))),z={name:"jetpack/button",attributes:{element:"button",text:Object(o.__)("Join my email list","jetpack"),uniqueId:"mailchimp-widget-id"}},U={title:Object(o.__)("Mailchimp","jetpack"),icon:{src:D,foreground:Object(L.a)()},description:Object(o.__)("A form enabling readers to join a Mailchimp list.","jetpack"),category:"grow",keywords:[Object(o._x)("email","block search term","jetpack"),Object(o._x)("subscription","block search term","jetpack"),Object(o._x)("newsletter","block search term","jetpack")],attributes:{emailPlaceholder:{type:"string",default:Object(o.__)("Enter your email","jetpack")},consentText:{type:"string",default:Object(o.__)("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:Object(o.__)("Processingโฆ","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:Object(o.__)("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:Object(o.__)("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:R,save:function(){return Object(a.createElement)(c.InnerBlocks.Content,null)},example:{attributes:{preview:!0},innerBlocks:[z]},deprecated:[m]};Object(r.a)("mailchimp",U)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=(n(238),n(24)),l=n(12),s=n.n(l),u=n(16),p=n.n(u),d=n(13),m=n.n(d),b=n(14),h=n.n(b),f=n(6),g=n.n(f),j=n(15),v=n.n(j),k=n(3),y=n.n(k),_=n(8),O=n.n(_),w=n(5),E=n(18),C=n(10),x=n(148),S=new(n.n(x).a),A=function(e){"A"===e.target.nodeName&&(window.confirm(Object(o.__)("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault())},T=function(e){var t=e.className,n=e.source,r=void 0===n?"":n;return Object(a.createElement)(a.RawHTML,{className:t,onClick:A},r.length?S.render(r):"")},N=function(e){function t(){var e,n;s()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=m()(this,(e=h()(t)).call.apply(e,[this].concat(a))),y()(g()(n),"input",null),y()(g()(n),"state",{activePanel:"editor"}),y()(g()(n),"bindInput",(function(e){n.input=e})),y()(g()(n),"updateSource",(function(e){return n.props.setAttributes({source:e})})),y()(g()(n),"handleKeyDown",(function(e){var t=n.props,r=t.attributes,a=t.removeBlock,o=r.source;8===e.keyCode&&""===o&&(a(),e.preventDefault())})),y()(g()(n),"toggleMode",(function(e){return function(){return n.setState({activePanel:e})}})),n}return v()(t,e),p()(t,[{key:"componentDidUpdate",value:function(e){e.isSelected&&!this.props.isSelected&&"preview"===this.state.activePanel&&this.toggleMode("editor")(),!e.isSelected&&this.props.isSelected&&"editor"===this.state.activePanel&&this.input&&this.input.focus()}},{key:"isEmpty",value:function(){var e=this.props.attributes.source;return!e||""===e.trim()}},{key:"renderToolbarButton",value:function(e,t){var n=this.state.activePanel,r=this.props.className,o=O()(r,"components-button components-tab-button",{"is-pressed":n===e});return Object(a.createElement)("button",{className:o,onClick:this.toggleMode(e)},Object(a.createElement)("span",null,t))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=e.isSelected,c=t.source,i=this.state.activePanel;return!r&&this.isEmpty()?Object(a.createElement)("p",{className:"".concat(n,"__placeholder")},Object(o.__)("Write your _Markdown_ **here**โฆ","jetpack")):Object(a.createElement)("div",{className:n},Object(a.createElement)(w.BlockControls,null,Object(a.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton("editor",Object(o.__)("Markdown","jetpack")),this.renderToolbarButton("preview",Object(o.__)("Preview","jetpack")))),"preview"!==i&&r?Object(a.createElement)(w.PlainText,{className:"".concat(n,"__editor"),onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":Object(o.__)("Markdown","jetpack"),innerRef:this.bindInput,value:c}):Object(a.createElement)(T,{className:"".concat(n,"__preview"),source:c}))}}]),t}(a.Component),P=Object(E.compose)([Object(C.withSelect)((function(e){return{currentBlockId:e("core/block-editor").getSelectedBlockClientId()}})),Object(C.withDispatch)((function(e,t){var n=t.currentBlockId;return{removeBlock:function(){return e("core/block-editor").removeBlocks(n)}}}))])(N),M=n(17),B=n(56),I=Object(o.__)("Try Markdown","jetpack"),F=Object(o.__)("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"),R=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},Object(a.createElement)(c.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),Object(a.createElement)(c.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),L=Object(i.b)()||Object(i.a)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",D={title:Object(o.__)("Markdown","jetpack"),description:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null,Object(o.__)("Use regular characters and punctuation to style text, links, and lists.","jetpack")),Object(a.createElement)(c.ExternalLink,{href:L},Object(o.__)("Support reference","jetpack"))),icon:{src:R,foreground:Object(M.a)()},category:Object(B.a)("text","formatting"),keywords:[Object(o._x)("formatting","block search term","jetpack"),Object(o._x)("syntax","block search term","jetpack"),Object(o._x)("markup","block search term","jetpack")],attributes:{source:{type:"string"}},supports:{html:!1},edit:P,save:function(e){var t=e.attributes,n=e.className;return Object(a.createElement)(T,{className:n,source:t.source})},example:{attributes:{source:"## ## ".concat(I,"\n\n").concat(F)}}};Object(r.a)("markdown",D)},function(e,t,n){"use strict";n.r(t);var r,a=n(20),o=n(1),c=n(0),i=n(4),l=n(5),s=n(2),u=n(25),p=function(e){var t,n=e.id,r=e.setRating,a=e.children;return Object(c.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(t=n,function(e){return e.keyCode===u.ENTER?r(t):null}),onClick:function(e){return function(){return r(e)}}(n)},a)},d=n(17),m=(n(295),n(185),{title:Object(o.__)("Star Rating","jetpack"),description:Object(o.__)("Rate movies, books, songs, recipes โ anything you can put a number on.","jetpack"),icon:{src:function(){return Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)(s.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"}))},foreground:Object(d.a)()},keywords:[Object(o._x)("star","block search term","jetpack"),Object(o._x)("rating","block search term","jetpack"),Object(o._x)("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:Object(o._x)("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:Object(o._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:function(e){return function(t){var n=t.className,r=t.setAttributes,a=t.attributes,u=a.align,d=a.color,m=a.rating,b=a.maxRating,h=function(e){e===m&&Math.ceil(m)===m&&(e-=.5),r({rating:e})};return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.BlockControls,null,Object(c.createElement)(l.AlignmentToolbar,{value:u,onChange:function(e){return r({align:e})}})),Object(c.createElement)("div",{className:n,style:{textAlign:u}},Object(i.range)(1,b+1).map((function(t){return Object(c.createElement)(p,{key:t,id:t,setRating:h},Object(c.createElement)("span",null,Object(c.createElement)(e,{className:m>=t-.5?null:"is-rating-unfilled",color:d})),Object(c.createElement)("span",null,Object(c.createElement)(e,{className:m>=t?null:"is-rating-unfilled",color:d})))}))),Object(c.createElement)(l.InspectorControls,null,Object(c.createElement)(s.PanelBody,{title:Object(o.__)("Settings","jetpack")},Object(c.createElement)(s.RangeControl,{label:Object(o.__)("Highest rating","jetpack"),value:b,onChange:function(e){return r({maxRating:e})},min:2,max:10}),Object(c.createElement)(l.PanelColorSettings,{title:Object(o.__)("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:d,onChange:function(e){return r({color:e})},label:Object(o.__)("Color","jetpack")}]}))))}}((function(e){var t=function(e){return e&&e.color?e.color:"currentColor"}(e),n=function(e){return e&&e.className?e.className:""}(e);return Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},Object(c.createElement)(s.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"}))})),save:(r="โ ",function(e){var t=e.className,n=e.attributes,a=n.align,o=n.rating,l=n.color;return Object(c.createElement)("figure",{className:t,style:{textAlign:a}},Object(i.range)(1,o+1).map((function(e){return Object(c.createElement)("span",{key:e,style:{color:l}},r)})))})});Object(a.a)("rating-star",m)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=n(12),l=n.n(i),s=n(16),u=n.n(s),p=n(13),d=n.n(p),m=n(14),b=n.n(m),h=n(6),f=n.n(h),g=n(15),j=n.n(g),v=n(3),k=n.n(v),y=n(5),_=[{height:250,icon:Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.Path,{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 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})),name:Object(o.__)("Rectangle 300x250","jetpack"),tag:"mrec",width:300,editorPadding:30},{height:90,icon:Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.Path,{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 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),name:Object(o.__)("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.Path,{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 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})),name:Object(o.__)("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),Object(a.createElement)(c.Path,{d:"M19.04 3h-14c-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 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})),name:Object(o.__)("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}],O=Object(o.__)("Pick an ad format","jetpack");function w(e){var t=e.value,n=e.onChange;return Object(a.createElement)(c.Dropdown,{position:"bottom right",renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(a.createElement)(c.Toolbar,{controls:[{icon:Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.Path,{d:"M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"})),title:O,onClick:t,extraProps:{"aria-expanded":n},className:"wp-block-jetpack-wordads__format-picker-icon"}]})},renderContent:function(e){var r=e.onClose;return Object(a.createElement)(c.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},_.map((function(e){var o=e.tag,i=e.name,l=e.icon;return Object(a.createElement)(c.MenuItem,{className:o===t?"is-active":void 0,icon:l,isSelected:o===t,key:o,onClick:function(){n(o),r()},role:"menuitemcheckbox"},i)})))}})}n(308);var E=n(162),C=n.n(E),x=n(163),S=n.n(x),A=n(164),T=n.n(A),N=n(165),P=n.n(N),M=function(e){function t(){var e,n;l()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=d()(this,(e=b()(t)).call.apply(e,[this].concat(a))),k()(f()(n),"handleHideMobileChange",(function(e){n.props.setAttributes({hideMobile:!!e})})),n}return j()(t,e),u()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.isSelected,i=t.format,l=t.hideMobile,s=_.filter((function(e){return e.tag===i}))[0],u=Object(a.createElement)(y.InspectorControls,null,Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Visibility","jetpack")},Object(a.createElement)(c.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:Boolean(l),label:Object(o.__)("Hide on mobile","jetpack"),help:Object(o.__)("Hides this block for site visitors on mobile devices.","jetpack"),onChange:this.handleHideMobileChange})));return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(y.BlockControls,null,Object(a.createElement)(w,{value:i,onChange:function(e){return n({format:e})}})),Object(a.createElement)("div",{className:"wp-block-jetpack-wordads jetpack-wordads-".concat(i)},Object(a.createElement)("div",{className:"jetpack-wordads__ad",style:{width:s.width,height:s.height,backgroundImage:"url( ".concat(function(e){switch(e){case"leaderboard":return S.a;case"mobile_leaderboard":return T.a;case"wideskyscraper":return P.a;default:return C.a}}(i)," )"),backgroundSize:"cover"}}),r&&u))}}]),t}(a.Component),B=n(17),I=Object(o.__)("Ad","jetpack"),F=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.Path,{fill:"currentColor",d:"M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z"})),R={title:I,description:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null,Object(o.__)("Earn income by adding high quality ads to your post","jetpack")),Object(a.createElement)(c.ExternalLink,{href:"https://wordads.co/"},Object(o.__)("Learn all about WordAds","jetpack"))),icon:{src:F,foreground:Object(B.a)()},attributes:{align:{type:"string",default:"center"},format:{type:"string",default:"mrec"},hideMobile:{type:"boolean",default:!1}},example:{attributes:{}},category:"earn",keywords:[Object(o._x)("ads","block search term","jetpack"),"WordAds",Object(o._x)("advertisement","block search term","jetpack")],supports:{align:["left","center","right"],alignWide:!1,className:!1,customClassName:!1,html:!1,reusable:!1},edit:M,save:function(){return null}};Object(r.a)("wordads",R)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(2),c=n(5),i=n(1),l=n(17),s=n(7),u=n.n(s),p=n(4),d=n(11),m=["submitButtonText","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"],b={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:function(e){var t,n=Object(p.omit)(e,m),r={text:(t=e).submitButtonText,textColor:t.textButtonColor,customTextColor:t.customTextButtonColor,backgroundColor:t.backgroundButtonColor,customBackgroundColor:t.customBackgroundButtonColor};return[n,[Object(d.createBlock)("jetpack/button",u()({element:"a",uniqueId:"recurring-payments-id"},r))]]},isEligible:function(e,t){return Object(p.isEmpty)(t)||Object(p.some)(Object(p.pick)(e,m),Boolean)},save:function(){return null}},h=n(27),f=n.n(h),g=n(12),j=n.n(g),v=n(13),k=n.n(v),y=n(14),_=n.n(y),O=n(6),w=n.n(O),E=n(15),C=n.n(E),x=n(3),S=n.n(x),A=n(8),T=n.n(A),N=n(22),P=n.n(N),M=n(36),B=n(18),I=n(10),F=n(30),R=n(48),L=n(39),D=n(50),z=n(32),U=function(e,t){return Object(M.a)(e,t,{decimal:".",symbol:""})},V=function(e){function t(){var e;j()(this,t),e=k()(this,_()(t).apply(this,arguments)),S()(w()(e),"componentDidMount",(function(){e.apiCall()})),S()(w()(e),"onError",(function(t){var n=e.props.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)})),S()(w()(e),"apiCall",(function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};P()(t).then((function(t){if(t.errors&&Object.values(t.errors)&&Object.values(t.errors)[0][0])return e.setState({connected:null,connectURL:2}),void e.onError(Object.values(t.errors)[0][0]);var n=t.connect_url,r=t.products,a=t.should_upgrade_to_access_memberships,o=t.upgrade_url,c=t.connected_account_id?1:2;e.setState({connected:c,connectURL:n,shouldUpgrade:a,upgradeURL:o,products:W(r)})}),(function(t){e.setState({connected:2,connectURL:null}),e.onError(t.message)}))})),S()(w()(e),"handleCurrencyChange",(function(t){var n=e.state.editedProductPrice;(void 0)(t,n)||(n=U(Object(L.d)(t),t)),e.setState({editedProductCurrency:t,editedProductPrice:n,editedProductPriceValid:!0})})),S()(w()(e),"handleRenewIntervalChange",(function(t){return e.setState({editedProductRenewInterval:t})})),S()(w()(e),"handlePriceChange",(function(t){var n=parseFloat(t),r=(void 0)(e.state.editedProductCurrency,n);e.setState({editedProductPrice:n,editedProductPriceValid:r})})),S()(w()(e),"handleTitleChange",(function(t){return e.setState({editedProductTitle:t,editedProductTitleValid:t.length>0})})),S()(w()(e),"saveProduct",(function(){if(e.state.editedProductTitle&&0!==e.state.editedProductTitle.length)if(e.state.editedProductPrice&&(void 0)(e.state.editedProductCurrency,e.state.editedProductPrice)){e.setState({addingMembershipAmount:2});var t={path:"/wpcom/v2/memberships/product",method:"POST",data:{currency:e.state.editedProductCurrency,price:e.state.editedProductPrice,title:e.state.editedProductTitle,interval:e.state.editedProductRenewInterval}};P()(t).then((function(t){e.setState({addingMembershipAmount:0,products:e.state.products.concat([{id:t.id,title:t.title,interval:t.interval,price:t.price,currency:t.currency}])}),e.setMembershipAmount(t.id)}),(function(t){e.setState({addingMembershipAmount:1}),e.onError(t.message)}))}else e.setState({editedProductPriceValid:!1});else e.setState({editedProductTitleValid:!1})})),S()(w()(e),"renderAmount",(function(e){var t=Object(M.a)(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(i.sprintf)(Object(i.__)("%s / month","jetpack"),t):"1 year"===e.interval?Object(i.sprintf)(Object(i.__)("%s / year","jetpack"),t):"one-time"===e.interval?t:Object(i.sprintf)(Object(i.__)("%1$s / %2$s","jetpack"),t,e.interval)})),S()(w()(e),"renderAddMembershipAmount",(function(t){if(0===e.state.addingMembershipAmount&&!t)return Object(a.createElement)(o.Button,{isPrimary:!0,isLarge:!0,onClick:function(){return e.setState({addingMembershipAmount:1})}},Object(i.__)("Add a payment plan","jetpack"));if(2!==e.state.addingMembershipAmount){var n=Object(M.a)(Object(L.d)(e.state.editedProductCurrency),e.state.editedProductCurrency),r=Object(i.sprintf)(Object(i.__)("Minimum allowed price is %s.","jetpack"),n);return Object(a.createElement)("div",null,Object(a.createElement)("div",{className:"membership-button__price-container"},Object(a.createElement)(o.SelectControl,{className:"membership-button__field membership-button__field-currency",label:Object(i.__)("Currency","jetpack"),onChange:e.handleCurrencyChange,options:void 0,value:e.state.editedProductCurrency}),Object(a.createElement)("div",{className:"membership-membership-button__field membership-button__field-price"},Object(a.createElement)(o.TextControl,{label:Object(i.__)("Price","jetpack"),className:T()({"membership-button__field-error":!e.state.editedProductPriceValid}),onChange:e.handlePriceChange,placeholder:n,required:!0,min:"0",step:"1",type:"number",value:e.state.editedProductPrice||""}),Object(a.createElement)("p",null,r))),Object(a.createElement)(o.TextControl,{className:T()({"membership-button__field":!0,"membership-button__field-error":!e.state.editedProductTitleValid}),label:Object(i.__)("Describe your subscription in a few words","jetpack"),onChange:e.handleTitleChange,placeholder:Object(i.__)("Subscription description","jetpack"),value:e.state.editedProductTitle}),Object(a.createElement)(o.SelectControl,{label:Object(i.__)("Renew interval","jetpack"),onChange:e.handleRenewIntervalChange,options:[{label:Object(i.__)("Monthly","jetpack"),value:"1 month"},{label:Object(i.__)("Yearly","jetpack"),value:"1 year"},{label:Object(i.__)("One-Time Payment","jetpack"),value:"one-time"}],value:e.state.editedProductRenewInterval}),Object(a.createElement)("div",null,Object(a.createElement)(o.Button,{isPrimary:!0,isLarge:!0,className:"membership-button__field-button membership-button__add-amount",onClick:e.saveProduct},Object(i.__)("Add this payment plan","jetpack")),Object(a.createElement)(o.Button,{isLarge:!0,className:"membership-button__field-button",onClick:function(){return e.setState({addingMembershipAmount:0})}},Object(i.__)("Cancel","jetpack"))))}})),S()(w()(e),"getFormattedPriceByProductId",(function(t){var n=e.state.products.filter((function(e){return parseInt(e.id)===parseInt(t)})).pop();return Object(M.a)(parseFloat(n.price),n.currency)})),S()(w()(e),"setMembershipAmount",(function(t){var n=e.props,r=n.innerButtons,a=n.updateBlockAttributes,o=n.setAttributes,c=e.props.attributes.planId,l=Object(i.sprintf)(Object(i.__)("%s contribution","jetpack"),e.getFormattedPriceByProductId(t)),s=c?Object(i.sprintf)(Object(i.__)("%s contribution","jetpack"),e.getFormattedPriceByProductId(c)):void 0;return r&&r.length&&r[0].innerBlocks.forEach((function(e){var t=e.attributes.text,n=t===s?l:t;a(e.clientId,{text:n})})),o({planId:parseInt(t)})})),S()(w()(e),"renderMembershipAmounts",(function(){return Object(a.createElement)("div",null,e.state.products.map((function(t){return Object(a.createElement)(o.Button,{className:"membership-button__field-button",isLarge:!0,isSecondary:!0,key:t.id,onClick:function(){return e.setMembershipAmount(t.id)}},e.renderAmount(t))})))})),S()(w()(e),"renderDisclaimer",(function(){return Object(a.createElement)("div",{className:"membership-button__disclaimer"},Object(a.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},Object(i.__)("Read more about Payments and related fees.","jetpack")))})),S()(w()(e),"renderUpgradeNudges",(function(){var t=e.props,n=t.notices,r=(t.postId,e.state),l=r.connected,s=r.connectURL;return Object(a.createElement)(a.Fragment,null,!e.hasUpgradeNudge&&!e.state.shouldUpgrade&&2===l&&Object(a.createElement)(c.BlockControls,null,Object(a.createElement)(o.ToolbarGroup,null,Object(a.createElement)(o.ToolbarButton,{icon:z.l,onClick:function(t){e.props.autosaveAndRedirect(t,s)},className:"connect-stripe components-tab-button"},Object(i.__)("Connect Stripe","jetpack")))),!e.hasUpgradeNudge&&e.state.shouldUpgrade&&Object(a.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(c.BlockIcon,{icon:H}),label:Object(i.__)("Payments","jetpack"),notices:n,instructions:Object(i.__)("You'll need to upgrade your plan to use the Payments block.","jetpack")},Object(a.createElement)(o.Button,{isSecondary:!0,isLarge:!0,href:e.state.upgradeURL,target:"_blank"},Object(i.__)("Upgrade your plan","jetpack")),e.renderDisclaimer())))})),S()(w()(e),"renderPlanNotices",(function(){var t=e.props.notices,n=e.state,r=n.connected,l=n.products;return Object(a.createElement)(a.Fragment,null,(0===r||2===e.state.addingMembershipAmount)&&!e.props.attributes.planId&&Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(c.BlockIcon,{icon:H}),notices:t},Object(a.createElement)(o.Spinner,null)),!e.state.shouldUpgrade&&!e.props.attributes.planId&&1===r&&0===l.length&&Object(a.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(c.BlockIcon,{icon:H}),label:Object(i.__)("Payments","jetpack"),notices:t},Object(a.createElement)("div",{className:"components-placeholder__instructions"},Object(a.createElement)("p",null,Object(i.__)("To use this block, first add at least one payment plan.","jetpack")),e.renderAddMembershipAmount(!0),e.renderDisclaimer()))),!e.state.shouldUpgrade&&!e.props.attributes.planId&&2!==e.state.addingMembershipAmount&&1===r&&l.length>0&&Object(a.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(c.BlockIcon,{icon:H}),label:Object(i.__)("Payments","jetpack"),notices:t},Object(a.createElement)("div",{className:"components-placeholder__instructions"},Object(a.createElement)("p",null,Object(i.__)("To use this block, select a previously created payment plan.","jetpack")),e.renderMembershipAmounts(),Object(a.createElement)("p",null,Object(i.__)("Or a new one.","jetpack")),e.renderAddMembershipAmount(!1),e.renderDisclaimer()))))})),S()(w()(e),"render",(function(){var t=e.state.products,n=Object(F.applyFilters)("jetpack.RecurringPayments.showControls",t.length>0,e.props.clientId),r=Object(a.createElement)(c.InspectorControls,null,Object(a.createElement)(o.PanelBody,{title:Object(i.__)("Payment plan","jetpack")},Object(a.createElement)(o.SelectControl,{label:Object(i.__)("Payment plan","jetpack"),value:e.props.attributes.planId,onChange:e.setMembershipAmount,options:t.map((function(t){return{label:e.renderAmount(t),value:t.id,key:t.id}}))})),Object(a.createElement)(o.PanelBody,{title:Object(i.__)("Management","jetpack")},Object(a.createElement)(o.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(Object(D.a)())},Object(i.__)("See your earnings, subscriber list, and payment plans.","jetpack"))));return Object(a.createElement)(a.Fragment,null,e.props.noticeUI,!e.isPremiumContentChild&&e.renderUpgradeNudges(),!e.isPremiumContentChild&&e.renderPlanNotices(),n&&r,Object(a.createElement)(c.InnerBlocks,{template:[["jetpack/button",{element:"a",uniqueId:"recurring-payments-id"}]],templateLock:"all",__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))})),e.state={connected:0,connectURL:null,addingMembershipAmount:0,shouldUpgrade:!1,upgradeURL:"",products:[],editedProductCurrency:"USD",editedProductPrice:U(Object(L.d)("USD"),"USD"),editedProductPriceValid:!0,editedProductTitle:"",editedProductTitleValid:!0,editedProductRenewInterval:"1 month"},e.timeout=null;var n=Object(R.a)("recurring-payments");return e.hasUpgradeNudge=!n.available&&"missing_plan"===n.unavailableReason,e.isPremiumContentChild=e.props.context.isPremiumContentChild||!1,e}return C()(t,e),t}(a.Component),q=Object(B.compose)([Object(I.withSelect)((function(e){return{postId:e("core/editor").getCurrentPostId()}})),Object(I.withDispatch)((function(e){var t;return{updateBlockAttributes:e("core/editor").updateBlockAttributes,autosaveAndRedirect:(t=f()(regeneratorRuntime.mark((function t(n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,e("core/editor").savePost();case 3:window.top.location.href=r;case 4:case"end":return t.stop()}}),t)}))),function(e,n){return t.apply(this,arguments)})}})),o.withNotices])(V),H=(n(296),Object(a.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(a.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(o.G,null,Object(a.createElement)(o.Path,{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})))),G={title:Object(i.__)("Payments","jetpack"),icon:{src:H,foreground:Object(l.a)()},description:Object(i.__)("Button allowing you to sell products and subscriptions.","jetpack"),category:"earn",keywords:[Object(i._x)("sell","block search term","jetpack"),Object(i._x)("subscriptions","block search term","jetpack"),Object(i._x)("product","block search term","jetpack"),"stripe",Object(i._x)("memberships","block search term","jetpack")],usesContext:["isPremiumContentChild"],attributes:{planId:{type:"integer"},align:{type:"string"}},edit:q,save:function(e){var t=e.className;return Object(a.createElement)("div",{className:t},Object(a.createElement)(c.InnerBlocks.Content,null))},supports:{html:!1,align:!0},deprecated:[b]};function W(e){return e.filter((function(e){return Object(L.c)(e.currency,e.price)}))}Object(r.a)("recurring-payments",G)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=n(26),l=n(12),s=n.n(l),u=n(16),p=n.n(u),d=n(13),m=n.n(d),b=n(14),h=n.n(b),f=n(6),g=n.n(f),j=n(15),v=n.n(j),k=n(3),y=n.n(k),_=n(5),O=n(10),w=n(8),E=n.n(w),C=n(57),x=[{value:C.b,label:Object(o.__)("Show after threshold","jetpack")},{value:C.c,label:Object(o.__)("Show before threshold","jetpack")}],S=function(e){function t(){var e,n;s()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=m()(this,(e=h()(t)).call.apply(e,[this].concat(a))),y()(g()(n),"state",{isThresholdValid:!0}),y()(g()(n),"setCriteria",(function(e){return n.props.setAttributes({criteria:e})})),y()(g()(n),"setThreshold",(function(e){if(/^\d+$/.test(e)&&+e>0)return n.props.setAttributes({threshold:+e}),void n.setState({isThresholdValid:!0});n.setState({isThresholdValid:!1})})),n}return v()(t,e),p()(t,[{key:"getNoticeLabel",value:function(){return this.props.attributes.criteria===C.b?1===this.props.attributes.threshold?Object(o.__)("This block will only appear to people who have visited this page more than once.","jetpack"):Object(o.sprintf)(Object(o._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?Object(o.__)("This block will only appear to people who are visiting this page for the first time.","jetpack"):Object(o.sprintf)(Object(o._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)}},{key:"render",value:function(){return Object(a.createElement)("div",{className:E()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},Object(a.createElement)(c.Placeholder,{icon:N,label:Object(o.__)("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},Object(a.createElement)(c.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":Object(o.__)("Please enter a valid number.","jetpack"),label:Object(o.__)("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),Object(a.createElement)(c.RadioControl,{label:Object(o.__)("Visibility","jetpack"),selected:this.props.attributes.criteria,options:x,onChange:this.setCriteria})),Object(a.createElement)(c.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),Object(a.createElement)(_.InnerBlocks,null))}}]),t}(a.Component),A=Object(O.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.isBlockSelected,a=n.hasSelectedInnerBlock;return{isSelected:r(t.clientId)||a(t.clientId)}}))(S),T=n(17),N=(n(298),Object(i.a)(Object(a.createElement)(c.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"}))),P={attributes:{criteria:{type:"string",default:C.b},threshold:{type:"number",default:C.d}},category:"widgets",description:Object(o.__)("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:N,foreground:Object(T.a)()},keywords:[Object(o._x)("return","block search term","jetpack"),Object(o._x)("visitors","block search term","jetpack"),Object(o._x)("visibility","block search term","jetpack")],supports:{html:!1},title:Object(o.__)("Repeat Visitor","jetpack"),edit:A,save:function(e){var t=e.className;return Object(a.createElement)("div",{className:t},Object(a.createElement)(_.InnerBlocks.Content,null))},example:{attributes:{criteria:C.b,threshold:C.d},innerBlocks:[{name:"core/paragraph",attributes:{content:Object(o.__)("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]}};Object(r.a)("repeat-visitor",P)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=n(12),l=n.n(i),s=n(16),u=n.n(s),p=n(13),d=n.n(p),m=n(14),b=n.n(m),h=n(6),f=n.n(h),g=n(15),j=n.n(g),v=n(3),k=n.n(v),y=n(8),_=n.n(y),O=n(5),w="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW",E=Object(o.__)("Search for a term or paste a Giphy URL","jetpack"),C=function(e){function t(){var e,n;l()(this,t);for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=d()(this,(e=b()(t)).call.apply(e,[this].concat(o))),k()(f()(n),"textControlRef",Object(a.createRef)()),k()(f()(n),"state",{captionFocus:!1,results:null}),k()(f()(n),"onFormSubmit",(function(e){e.preventDefault(),n.onSubmit()})),k()(f()(n),"onSubmit",(function(){var e=n.props.attributes.searchText;n.parseSearch(e)})),k()(f()(n),"parseSearch",(function(e){var t=null;-1!==e.indexOf("//giphy.com/gifs")&&(t=n.splitAndLast(n.splitAndLast(e,"/"),"-")),-1!==e.indexOf("//i.giphy.com")&&(t=n.splitAndLast(e,"/").replace(".gif",""));var r=e.match(/http[s]?:\/\/media.giphy.com\/media\/([A-Za-z0-9\-.]+)\/giphy.gif/);return r&&(t=r[1]),t?n.fetch(n.urlForId(t)):n.fetch(n.urlForSearch(e))})),k()(f()(n),"urlForSearch",(function(e){return"https://api.giphy.com/v1/gifs/search?q=".concat(encodeURIComponent(e),"&api_key=").concat(encodeURIComponent(w),"&limit=10")})),k()(f()(n),"urlForId",(function(e){return"https://api.giphy.com/v1/gifs/".concat(encodeURIComponent(e),"?api_key=").concat(encodeURIComponent(w))})),k()(f()(n),"splitAndLast",(function(e,t){var n=e.split(t);return n[n.length-1]})),k()(f()(n),"fetch",(function(e){var t=new XMLHttpRequest;t.open("GET",e),t.onload=function(){if(200===t.status){var e=JSON.parse(t.responseText),r=void 0!==e.data.images?[e.data]:e.data,a=r[0];if(!a.images)return;n.setState({results:r},(function(){n.selectGiphy(a)}))}},t.send()})),k()(f()(n),"selectGiphy",(function(e){var t=n.props.setAttributes,r=Math.floor(e.images.original.height/e.images.original.width*100),a="".concat(r,"%");t({giphyUrl:e.embed_url,paddingTop:a})})),k()(f()(n),"setFocus",(function(){n.textControlRef.current.querySelector("input").focus(),n.setState({captionFocus:!1})})),k()(f()(n),"hasSearchText",(function(){var e=n.props.attributes.searchText;return e&&e.length>0})),k()(f()(n),"thumbnailClicked",(function(e){n.selectGiphy(e)})),n}return j()(t,e),u()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.className,i=t.isSelected,l=t.setAttributes,s=n.align,u=n.caption,p=n.giphyUrl,d=n.searchText,m=n.paddingTop,b=this.state,h=b.captionFocus,f=b.results,g={paddingTop:m},j=_()(r,"align".concat(s)),v=Object(a.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:this.onFormSubmit,ref:this.textControlRef},Object(a.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:Object(o.__)("Enter search terms, e.g. catโฆ","jetpack"),onChange:function(e){return l({searchText:e.target.value})},value:d}),Object(a.createElement)(c.Button,{isDefault:!0,onClick:this.onSubmit},Object(o.__)("Search","jetpack")));return Object(a.createElement)("div",{className:j},Object(a.createElement)(O.InspectorControls,null,Object(a.createElement)(c.PanelBody,{className:"components-panel__body-gif-branding"},Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},Object(a.createElement)(c.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"}),Object(a.createElement)(c.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"})))),p?Object(a.createElement)("figure",null,i&&v,i&&f&&f.length>1&&Object(a.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},f.map((function(t){var n={backgroundImage:"url(".concat(t.images.downsized_still.url,")")};return Object(a.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:t.id,onClick:function(){e.thumbnailClicked(t)},style:n})}))),Object(a.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:g},Object(a.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:this.setFocus,onKeyDown:this.setFocus,role:"button",tabIndex:"0"}),Object(a.createElement)("iframe",{src:p,title:d})),(!O.RichText.isEmpty(u)||i)&&!!p&&Object(a.createElement)(O.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:h,unstableOnFocus:function(){e.setState({captionFocus:!0})},onChange:function(e){return l({caption:e})},placeholder:Object(o.__)("Write captionโฆ","jetpack"),tagName:"figcaption",value:u})):Object(a.createElement)(c.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:A,label:S,instructions:E},v))}}]),t}(a.Component),x=n(17),S=(n(181),n(224),Object(o.__)("GIF","jetpack")),A=Object(a.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.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"})),T={title:S,icon:{src:A,foreground:Object(x.a)()},category:"embed",keywords:[Object(o._x)("animated","block search term","jetpack"),Object(o._x)("giphy","block search term","jetpack"),Object(o._x)("image","block search term","jetpack")],description:Object(o.__)("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:C,save:function(){return null},example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}};Object(r.a)("gif",T)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(2),i=n(12),l=n.n(i),s=n(16),u=n.n(s),p=n(13),d=n.n(p),m=n(14),b=n.n(m),h=n(15),f=n.n(h),g=n(5),j=n(4),v=n(10),k=n(18);function y(e){return Object(a.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},Object(a.createElement)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link"},Object(o.__)("Preview unavailable: you haven't published enough posts with similar content.","jetpack")),e.displayThumbnails&&Object(a.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":Object(o.__)("Placeholder image","jetpack")},Object(a.createElement)(c.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"},Object(a.createElement)("title",null,Object(o.__)("Grey square","jetpack")),Object(a.createElement)(c.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),Object(a.createElement)(c.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"},Object(a.createElement)("title",null,Object(o.__)("Icon for image","jetpack")),Object(a.createElement)(c.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(c.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&&Object(a.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},Object(o.__)("August 3, 2018","jetpack")),e.displayContext&&Object(a.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},Object(o.__)("In โUncategorizedโ","jetpack")))}function _(e){return Object(a.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},Object(a.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&&Object(a.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},Object(a.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&&Object(a.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayContext&&Object(a.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},e.post.context))}function O(e){var t=0,n=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:t=2;break;default:t=3}return Object(a.createElement)("div",null,Object(a.createElement)("div",{className:"jp-related-posts-i2__row","data-post-count":e.posts.slice(0,t).length},e.posts.slice(0,t)),n&&Object(a.createElement)("div",{className:"jp-related-posts-i2__row","data-post-count":e.posts.slice(t).length},e.posts.slice(t)))}var w=function(e){function t(){return l()(this,t),d()(this,b()(t).apply(this,arguments))}return f()(t,e),u()(t,[{key:"render",value:function(){for(var e=this.props,t=e.attributes,n=e.className,r=e.posts,i=e.setAttributes,l=e.instanceId,s=t.displayContext,u=t.displayDate,p=t.displayThumbnails,d=t.postLayout,m=t.postsToShow,b=[{icon:"grid-view",title:Object(o.__)("Grid View","jetpack"),onClick:function(){return i({postLayout:"grid"})},isActive:"grid"===d},{icon:"list-view",title:Object(o.__)("List View","jetpack"),onClick:function(){return i({postLayout:"list"})},isActive:"list"===d}],h=[],f=0;f<m;f++)r[f]?h.push(Object(a.createElement)(_,{id:"related-posts-".concat(l,"-post-").concat(f),key:"jp-relatedposts-i2-"+f,post:r[f],displayThumbnails:p,displayDate:u,displayContext:s})):h.push(Object(a.createElement)(y,{id:"related-posts-".concat(l,"-post-").concat(f),key:"related-post-placeholder-"+f,displayThumbnails:p,displayDate:u,displayContext:s}));return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(g.InspectorControls,null,Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Related Posts Settings","jetpack")},Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Display thumbnails","jetpack"),checked:p,onChange:function(e){return i({displayThumbnails:e})}}),Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Display date","jetpack"),checked:u,onChange:function(e){return i({displayDate:e})}}),Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Display context (category or tag)","jetpack"),checked:s,onChange:function(e){return i({displayContext:e})}}),Object(a.createElement)(c.RangeControl,{label:Object(o.__)("Number of posts","jetpack"),value:m,onChange:function(e){return i({postsToShow:Math.min(e,6)})},min:1,max:6}))),Object(a.createElement)(g.BlockControls,null,Object(a.createElement)(c.Toolbar,{controls:b})),Object(a.createElement)("div",{className:n,id:"related-posts-".concat(l)},Object(a.createElement)("div",{className:"jp-relatedposts-i2","data-layout":d},Object(a.createElement)(O,{posts:h}))))}}]),t}(a.Component),E=Object(k.compose)(k.withInstanceId,Object(v.withSelect)((function(e){var t=e("core/editor").getCurrentPost;return{posts:Object(j.get)(t(),"jetpack-related-posts",[])}})))(w),C=(n(297),n(17)),x=Object(a.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(c.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},Object(a.createElement)(c.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"}))),S={title:Object(o.__)("Related Posts","jetpack"),icon:{src:x,foreground:Object(C.a)()},category:"embed",keywords:[Object(o._x)("similar content","block search term","jetpack"),Object(o._x)("linked","block search term","jetpack"),Object(o._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:E,save:function(){return null},example:{attributes:{postLayout:"grid",displayDate:!0,displayThumbnails:!0,displayContext:!1,postsToShow:2}}};Object(r.a)("related-posts",S)},,function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(345);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,c){if(c!==r){var i=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 i.name="Invariant Violation",i}}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}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){var r=n(351),a=n(352);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){},function(e,t){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}},function(e,t,n){},function(e,t,n){},function(e,t,n){},,function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setConnectionTestResults",(function(){return p})),n.d(r,"refreshConnectionTestResults",(function(){return d})),n.d(r,"fetchFromAPI",(function(){return m})),n.d(r,"refreshTweets",(function(){return b})),n.d(r,"setTweets",(function(){return h})),n.d(r,"getTwitterCards",(function(){return f})),n.d(r,"setTwitterCards",(function(){return g}));var a={};n.r(a),n.d(a,"getFailedConnections",(function(){return K})),n.d(a,"getMustReauthConnections",(function(){return Z})),n.d(a,"getTweetTemplate",(function(){return J})),n.d(a,"getTweetStorm",(function(){return Y})),n.d(a,"getFirstTweet",(function(){return Q})),n.d(a,"getLastTweet",(function(){return X})),n.d(a,"getSupportedBlockType",(function(){return ee})),n.d(a,"getTweetsForBlock",(function(){return te})),n.d(a,"getTwitterCardForURLs",(function(){return ne})),n.d(a,"twitterCardIsCached",(function(){return re})),n.d(a,"getShareMessage",(function(){return ae})),n.d(a,"getShareMessageMaxLength",(function(){return oe})),n.d(a,"isTweetStorm",(function(){return ce})),n.d(a,"getBoundariesForBlock",(function(){return ie})),n.d(a,"getBoundaryStyleSelectors",(function(){return le})),n.d(a,"checkForTagsInContentAttributes",(function(){return se})),n.d(a,"getPopoverWarnings",(function(){return ue})),n.d(a,"isSelectedTweetBoundary",(function(){return pe})),n.d(a,"contentAttributesChanged",(function(){return de}));var o=n(0),c=n(1),i=n(2),l=n(75),s=n(52),u=(n(340),n(10));function p(e){return{type:"SET_CONNECTION_TEST_RESULTS",results:e}}function d(){return{type:"REFRESH_CONNECTION_TEST_RESULTS"}}function m(e){return{type:"FETCH_FROM_API",path:e}}function b(){return{type:"REFRESH_TWEETS"}}function h(e){return{type:"SET_TWEETS",tweets:e}}function f(e){var t=Object(u.select)("jetpack/publicize").twitterCardIsCached;return{type:"GET_TWITTER_CARDS",urls:e.filter((function(e){return!t(e)}))}}function g(e){return{type:"SET_TWITTER_CARDS",cards:e}}var j,v,k=n(7),y=n.n(k),_=n(21),O=n.n(_),w=n(4);function E(e){return[e]}function C(){var e={clear:function(){e.head=null}};return e}function x(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}j={},v="undefined"!=typeof WeakMap;var S=function(e,t){var n,r;function a(){n=v?new WeakMap:C()}function o(){var n,a,o,c,i,l=arguments.length;for(c=new Array(l),o=0;o<l;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=r(i)).isUniqueByDependants||(n.lastDependants&&!x(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),a=n.head;a;){if(x(a.args,c,1))return a!==n.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n.head,a.prev=null,n.head.prev=a,n.head=a),a.val;a=a.next}return a={val:e.apply(null,c)},c[0]=null,a.args=c,n.head&&(n.head.prev=a,a.next=n.head),n.head=a,a.val}return t||(t=E),r=v?function(e){var t,r,a,o,c,i=n,l=!0;for(t=0;t<e.length;t++){if(r=e[t],!(c=r)||"object"!=typeof c){l=!1;break}i.has(r)?i=i.get(r):(a=new WeakMap,i.set(r,a),i=a)}return i.has(j)||((o=C()).isUniqueByDependants=l,i.set(j,o)),i.get(j)}:function(){return n},o.getDependants=t,o.clear=a,a(),o},A=n(18),T=n(30),N=n(12),P=n.n(N),M=n(16),B=n.n(M),I=n(13),F=n.n(I),R=n(14),L=n.n(R),D=n(15),z=n.n(D),U=(n(192),n(32)),V=(n(140),function(e){function t(){return P()(this,t),F()(this,L()(t).apply(this,arguments))}return z()(t,e),B()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isTweetStorm,n=e.updateTweets;t&&n()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.boundaries,r=t.childProps,a=t.currentAnnotations,o=t.isTweetStorm,c=t.updateAnnotations,i=t.updateTweets,l=t.supportedBlockType,s=t.contentAttributesChanged;o&&l&&(s(e.childProps,r)&&i(),a.length===n.filter((function(e){return["normal","line-break"].includes(e.type)})).length&&Object(w.isEqual)(e.boundaries,n)||c())}},{key:"render",value:function(){var e=this.props,t=e.ChildEdit,n=e.childProps,r=e.isTweetStorm,a=e.isSelectedTweetBoundary,c=e.boundaryStylesSelectors,l=e.popoverWarnings;return r?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(t,n),a&&Object(o.createElement)("div",{className:"jetpack-publicize-twitter__tweet-divider"},Object(o.createElement)("div",{className:"jetpack-publicize-twitter__tweet-divider-icon"},Object(o.createElement)(U.k,{serviceName:"twitter"})),l.length>0&&Object(o.createElement)(i.Popover,{className:"jetpack-publicize-twitter__tweet-divider-popover",focusOnMount:!1,position:"bottom center"},Object(o.createElement)("ol",null,l.map((function(e,t){return Object(o.createElement)("li",{key:"jetpack-publicize-twitter__tweet-divider-popover-warning-".concat(t)},e)}))))),c&&Object(o.createElement)("style",{type:"text/css"},c.map((function(e){return"".concat(e,'::after {\n\t\t\t\t\t\t\t\tcontent: "";\n\t\t\t\t\t\t\t\tbackground: #0009;\n\t\t\t\t\t\t\t\twidth: 3px;\n\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\tmargin: 0 1px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.is-dark-theme ').concat(e,"::after {\n\t\t\t\t\t\t\t\tbackground: #fff9;\n\t\t\t\t\t\t\t}")})))):Object(o.createElement)(t,n)}}]),t}(o.Component)),q=Object(A.compose)([Object(u.withSelect)((function(e,t){var n=t.childProps,r=e("jetpack/publicize"),a=r.isTweetStorm,o=r.getPopoverWarnings,c=r.getBoundariesForBlock,i=r.getBoundaryStyleSelectors,l=r.isSelectedTweetBoundary,s=r.getSupportedBlockType,u=r.contentAttributesChanged,p=e("core/annotations").__experimentalGetAllAnnotationsForBlock(n.clientId);return{isTweetStorm:a(),isSelectedTweetBoundary:l(n),boundaries:c(n.clientId),boundaryStylesSelectors:i(n.clientId),popoverWarnings:o(n),currentAnnotations:p,supportedBlockType:s(n.name),contentAttributesChanged:u}})),Object(u.withDispatch)((function(e,t,n){var r=t.childProps,a=n.select;return{updateTweets:function(){return e("jetpack/publicize").refreshTweets()},updateAnnotations:function(){var t=a("jetpack/publicize"),n=t.contentAttributesChanged,o=(0,t.getTweetsForBlock)(r.clientId);o&&0!==o.length&&(n(o.reduce((function(e,t){return e||t.blocks.find((function(e){return e.clientId===r.clientId}))}),!1),r)||(a("core/annotations").__experimentalGetAllAnnotationsForBlock(r.clientId).forEach((function(t){["jetpack-tweetstorm","jetpack-tweetstorm-line-break"].includes(t.source)&&e("core/annotations").__experimentalRemoveAnnotation(t.id)})),o.filter((function(e){return e.boundary})).map((function(e){return e.boundary})).forEach((function(t){var n=t.container,a=t.type,o=t.start,c=t.end;"normal"===a?e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm",richTextIdentifier:n,range:{start:o,end:c}}):"line-break"===a&&e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm-line-break",richTextIdentifier:n,range:{start:o,end:c}})}))))}}}))])(V),H={"core/gallery":{contentAttributes:["images"]},"core/heading":{contentAttributes:["content"]},"core/image":{contentAttributes:["alt","url"]},"core/list":{contentAttributes:["values"]},"core/paragraph":{contentAttributes:["content"]},"core/quote":{contentAttributes:["value","citation"]},"core/separator":{contentAttributes:[]},"core/spacer":{contentAttributes:[]},"core/verse":{contentAttributes:["content"]},"core/video":{contentAttributes:["src"]},"core/embed":{contentAttributes:["url"]},"jetpack/gif":{contentAttributes:["giphyUrl"]}},G=["core/column","core/columns","core/group"];Object(T.addFilter)("blocks.registerBlockType","jetpack/publishing-tweetstorms",(function(e){var t=e.edit;return y()({},e,{edit:function(e){return Object(o.createElement)(q,{ChildEdit:t,childProps:e})}})}));var W=Object(A.compose)([Object(u.withSelect)((function(e){return{isTweetStorm:e("jetpack/publicize").isTweetStorm(),isTyping:e("core/block-editor").isTyping()}}))])((function(e){var t=e.isTweetStorm,n=e.isTyping;return t?document.body.classList.add("jetpack-tweetstorm"):document.body.classList.remove("jetpack-tweetstorm"),t&&n?document.body.classList.add("jetpack-tweetstorm-is-typing"):document.body.classList.remove("jetpack-tweetstorm-is-typing"),null})),$="\n\n"+Object(c.__)("A thread โฌ๏ธ","jetpack");function K(e){return e.connections.filter((function(e){return!1===e.test_success}))}function Z(e){return e.connections.filter((function(e){return"must_reauth"===e.test_success})).map((function(e){return e.service_name}))}function J(e){var t,n=null===(t=e.connections)||void 0===t?void 0:t.find((function(e){return"twitter"===e.service_name}));return{date:Date.now(),name:(null==n?void 0:n.profile_display_name)||Object(c.__)("Account Name","jetpack"),profileImage:(null==n?void 0:n.profile_picture)||"https://abs.twimg.com/sticky/default_profile_images/default_profile_bigger.png",screenName:(null==n?void 0:n.display_name)||""}}function Y(e){var t=J(e),n=[Q(e)].concat(O()(e.tweets.slice(0,100).map((function(n){return y()({},t,{text:n.text,media:n.media,tweet:n.tweet,urls:n.urls,card:ne(e,n.urls)})}))));return n.length>1&&n.push(X(e)),n}function Q(e){var t,n,r,a;if(Object(u.select)("core")){var o=J(e),i=Object(u.select)("core").getMedia,l=Object(u.select)("core/editor").getEditedPostAttribute,s=l("featured_media"),p=l("link"),d=s&&i(s),m=(null==d||null===(t=d.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(r=n.large)||void 0===r?void 0:r.source_url)||(null==d?void 0:d.source_url);return y()({},o,{text:ae()+" ".concat(p),urls:[p],card:{title:l("title"),description:(null===(a=l("meta"))||void 0===a?void 0:a.advanced_seo_description)||l("excerpt")||l("content").split("\x3c!--more")[0]||Object(c.__)("Visit the post for more.","jetpack"),url:p,image:m,type:m?"summary_large_image":"summary"}})}}function X(e){if(Object(u.select)("core/editor")){var t=(0,Object(u.select)("core/editor").getEditedPostAttribute)("link"),n=e.tweets.length>100?Object(c.__)("The rest of this thread can be read here:","jetpack"):Object(c.__)("This thread can be read here:","jetpack");return y()({},Q(e),{text:"".concat(n," ").concat(t)})}}function ee(e,t){return H[t]?H[t]:t.startsWith("core-embed/")?H["core/embed"]:void 0}var te=S((function(e,t){return e.tweets.filter((function(e){return!!e.blocks.find((function(e){return e.clientId===t}))}))}),(function(e){return[e.tweets]}));function ne(e,t){if(t)return t.reduce((function(t,n){return t||(e.twitterCards[n]&&!e.twitterCards[n].error?y()({url:n},e.twitterCards[n]):void 0)}),void 0)}function re(e,t){return!!e.twitterCards[t]}function ae(){var e=Object(u.select)("core/editor").getEditedPostAttribute,t=e("meta"),n=e("title"),r=Object(w.get)(t,["jetpack_publicize_message"],""),a=Object(w.get)(t,["jetpack_publicize_hasEditedShareMessage"],!1);return r?r.substr(0,oe()):a&&""===r?"":n?n.substr(0,oe())+(ce()?$:""):""}function oe(){return ce()?255-$.length:255}function ce(){var e;return!!(null===(e=Object(u.select)("core/editor").getEditedPostAttribute("meta"))||void 0===e?void 0:e.jetpack_is_tweetstorm)}var ie=S((function(e,t){if(!ce())return[];var n=te(e,t);return n&&0!==n.length?n.filter((function(e){return e.boundary})).map((function(e){return e.boundary})):[]}),(function(e){return[e.tweets]}));var le=S((function(e,t){var n=ie(e,t),r=document.getElementById("block-".concat(t));return n.filter((function(e){return"end-of-line"===e.type})).map((function(e){if(!r)return!1;var n=r.getElementsByTagName("li").item(e.line);return!!n&&function e(t,n){if("block-".concat(n)===t.id)return"#block-".concat(n);var r=t.parentNode,a=Array.prototype.indexOf.call(r.children,t);return e(r,n)+" > :nth-child( ".concat(a+1," )")}(n,t)})).filter((function(e){return!!e}))}),(function(e){return[e.tweets]}));function se(e,t,n){var r;if(0===n.length)return!1;if(!(null===(r=ee(0,t.name))||void 0===r?void 0:r.contentAttributes))return!1;var a=new RegExp("<(".concat(n.join("|"),")( |>|/>)"),"gi");return ee(0,t.name).contentAttributes.reduce((function(e,n){return!!e||a.test(t.attributes[n])}),!1)}var ue=S((function(e,t){var n=Object(u.select)("core/block-editor"),r=n.isTyping,a=n.isDraggingBlocks,o=n.isMultiSelecting,i=n.hasMultiSelection,l=n.isCaretWithinFormattedText;if(!ce())return[];if(r()||a()||o()||i()||l())return[];var s=[];return ee(0,t.name)||G[t.name]?("core/gallery"===t.name&&t.attributes.images.length>4&&s.push(Object(c.__)("Twitter displays the first four images.","jetpack")),se(0,t,["strong","bold","em","i","sup","sub","span","s"])&&s.push(Object(c.__)("Twitter removes all text formatting.","jetpack")),se(0,t,["a"])&&s.push(Object(c.__)("Links will be posted seperately.","jetpack"))):s.push(Object(c.__)("This block is not exportable to Twitter","jetpack")),s}),(function(e){return[e.tweets]}));function pe(e,t){var n=Object(u.select)("core/block-editor").isBlockSelected;if(!ce())return!1;var r=ee(0,t.name),a=te(e,t.clientId);if(!a||0===a.length)return!1;var o=a[a.length-1];return n(t.clientId)&&!r||o.blocks[o.blocks.length-1].clientId===t.clientId&&a.some((function(e){return e.blocks.some((function(e){return n(e.clientId)}))}))}function de(e,t,n){var r=ee(0,n.name);if(!r)return!1;var a=r.contentAttributes;return!Object(w.isEqual)(a.map((function(e){return{attribute:e,content:t.attributes[e]}})),a.map((function(e){return{attribute:e,content:n.attributes[e]}})))}var me=n(196),be=n.n(me),he=n(27),fe=n.n(he),ge=n(22),je=n.n(ge),ve=n(11);function ke(){return(ke=fe()(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,je()({path:"/wpcom/v2/publicize/connection-test-results"});case 3:return t=e.sent,e.abrupt("return",Object(u.dispatch)("jetpack/publicize").setConnectionTestResults(t));case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}var ye=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=Object(u.select)("jetpack/publicize"),r=n.getSupportedBlockType;return Object(w.flatMap)(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(t.name)||t.name.startsWith("core-embed/")?t:G.includes(t.name)?e(t.innerBlocks):[]}))};function _e(){return(_e=fe()(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(u.select)("core/editor").getBlocks(),n=ye(t),e.prev=2,e.next=5,je()({path:"/wpcom/v2/tweetstorm/parse",data:{blocks:n.map((function(e){return{attributes:e.attributes,block:Object(ve.serialize)(e),clientId:e.clientId}}))},method:"POST"});case 5:return r=e.sent,a=Object(w.flatMap)(r,(function(e){return e.urls})),Object(u.dispatch)("jetpack/publicize").getTwitterCards(a),e.abrupt("return",Object(u.dispatch)("jetpack/publicize").setTweets(r));case 11:e.prev=11,e.t0=e.catch(2);case 13:case"end":return e.stop()}}),e,null,[[2,11]])})))).apply(this,arguments)}function Oe(){return(Oe=fe()(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.urls.length){e.next=2;break}return e.abrupt("return",Object(u.dispatch)("jetpack/publicize").setTwitterCards([]));case 2:return e.prev=2,e.next=5,je()({path:"/wpcom/v2/tweetstorm/generate-cards",data:{urls:t.urls},method:"POST"});case 5:return n=e.sent,e.abrupt("return",Object(u.dispatch)("jetpack/publicize").setTwitterCards(n));case 9:e.prev=9,e.t0=e.catch(2);case 11:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}var we={REFRESH_CONNECTION_TEST_RESULTS:function(){return ke.apply(this,arguments)},REFRESH_TWEETS:Object(w.throttle)((function(){return _e.apply(this,arguments)}),2e3,{leading:!0,trailing:!0}),GET_TWITTER_CARDS:function(e){return Oe.apply(this,arguments)}};var Ee,Ce,xe,Se,Ae,Te={FETCH_FROM_API:function(e){var t=e.path;return je()({path:t})}},Ne={connections:[],tweets:[],twitterCards:[]},Pe=Object(u.registerStore)("jetpack/publicize",{actions:r,controls:Te,reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CONNECTION_TEST_RESULTS":return y()({},e,{connections:t.results});case"REFRESH_CONNECTION_TEST_RESULTS":return y()({},e,{connections:[]});case"SET_TWEETS":return y()({},e,{tweets:t.tweets});case"GET_TWITTER_CARDS":var n={};return t.urls.forEach((function(e){return n[e]={error:"loading"}})),y()({},e,{twitterCards:y()({},e.twitterCards,{},n)});case"SET_TWITTER_CARDS":return y()({},e,{twitterCards:y()({},e.twitterCards,{},t.cards)})}return e},selectors:a});Ee=Pe,xe=[be()(we)],Se=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},Ae={getState:Ee.getState,dispatch:function(){return Se.apply(void 0,arguments)}},Ce=xe.map((function(e){return e(Ae)})),Se=w.flowRight.apply(void 0,O()(Ce))(Ee.dispatch),Ee.dispatch=Se;var Me=n(67),Be=n(6),Ie=n.n(Be),Fe=n(3),Re=n.n(Fe),Le=function(e){function t(){var e,n;P()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=F()(this,(e=L()(t)).call.apply(e,[this].concat(a))),Re()(Ie()(n),"refreshConnectionClick",(function(e){var t=e.target,r=t.href,a=t.title;e.preventDefault();var o=window.open(r,a,""),c=window.setInterval((function(){!1!==o.closed&&(window.clearInterval(c),n.props.refreshConnections())}),500)})),n}return z()(t,e),B()(t,[{key:"componentDidMount",value:function(){this.props.refreshConnections()}},{key:"renderRefreshableConnections",value:function(){var e=this,t=this.props.failedConnections.filter((function(e){return e.can_refresh}));return t.length?Object(o.createElement)(i.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},Object(o.createElement)("p",null,Object(c.__)("Before you hit Publish, please refresh the following connection(s) to make sure we can Publicize your post:","jetpack")),t.map((function(t){return Object(o.createElement)(i.Button,{href:t.refresh_url,isSmall:!0,key:t.id,onClick:e.refreshConnectionClick,title:t.refresh_text},t.refresh_text)}))):null}},{key:"renderNonRefreshableConnections",value:function(){var e=this.props.failedConnections.filter((function(e){return!e.can_refresh}));return e.length?e.map((function(e){return Object(o.createElement)(i.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},Object(o.createElement)("p",null,e.test_message))})):null}},{key:"render",value:function(){return Object(o.createElement)(o.Fragment,null,this.renderRefreshableConnections(),this.renderNonRefreshableConnections())}}]),t}(o.Component),De=Object(A.compose)([Object(u.withSelect)((function(e){return{failedConnections:e("jetpack/publicize").getFailedConnections()}})),Object(u.withDispatch)((function(e){return{refreshConnections:e("jetpack/publicize").refreshConnectionTestResults}}))])(Le),ze=n(8),Ue=n.n(ze),Ve=n(50),qe=function(e){function t(){var e,n;P()(this,t);for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return n=F()(this,(e=L()(t)).call.apply(e,[this].concat(a))),Re()(Ie()(n),"maybeDisplayLinkedInNotice",(function(){return n.connectionNeedsReauth()&&Object(o.createElement)(i.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},Object(o.createElement)("p",null,Object(c.__)("Your LinkedIn connection needs to be reauthenticated to continue working โ head to Sharing to take care of it.","jetpack")),Object(o.createElement)(i.ExternalLink,{href:"https://wordpress.com/marketing/connections/".concat(Object(Ve.a)())},Object(c.__)("Go to Sharing settings","jetpack")))})),Re()(Ie()(n),"connectionNeedsReauth",(function(){return Object(w.includes)(n.props.mustReauthConnections,n.props.name)})),Re()(Ie()(n),"onConnectionChange",(function(){var e=n.props.id;n.props.toggleConnection(e)})),n}return z()(t,e),B()(t,[{key:"connectionIsFailing",value:function(){var e=this.props,t=e.failedConnections,n=e.name;return t.some((function(e){return e.service_name===n}))}},{key:"render",value:function(){var e=this.props,t=e.disabled,n=e.enabled,r=e.id,a=e.label,c=e.name,l="connection-"+c+"-"+r,s=c.replace("_","-"),u=Object(o.createElement)(i.FormToggle,{id:l,className:"jetpack-publicize-connection-toggle",checked:n,onChange:this.onConnectionChange});return(t||this.connectionIsFailing()||this.connectionNeedsReauth())&&(u=Object(o.createElement)(i.Disabled,null,u)),Object(o.createElement)("li",null,this.maybeDisplayLinkedInNotice(),Object(o.createElement)("div",{className:"publicize-jetpack-connection-container"},Object(o.createElement)("label",{htmlFor:l,className:"jetpack-publicize-connection-label"},Object(o.createElement)(U.k,{serviceName:s,className:"jetpack-publicize-gutenberg-social-icon"}),Object(o.createElement)("span",{className:"jetpack-publicize-connection-label-copy"},a)),u))}}]),t}(o.Component),He=Object(u.withSelect)((function(e){return{failedConnections:e("jetpack/publicize").getFailedConnections(),mustReauthConnections:e("jetpack/publicize").getMustReauthConnections()}}))(qe),Ge=function(e){function t(){var e,n;P()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=F()(this,(e=L()(t)).call.apply(e,[this].concat(a))),Re()(Ie()(n),"settingsClick",(function(e){var t=n.getButtonLink(),r=n.props.refreshCallback;e.preventDefault();var a=window.open(t,"",""),o=window.setInterval((function(){!1!==a.closed&&(window.clearInterval(o),r())}),500)})),n}return z()(t,e),B()(t,[{key:"getButtonLink",value:function(){var e=Object(Ve.a)();return e?"https://wordpress.com/marketing/connections/".concat(e):"options-general.php?page=sharing&publicize_popup=true"}},{key:"render",value:function(){var e=Ue()("jetpack-publicize-add-connection-container",this.props.className);return Object(o.createElement)("div",{className:e},Object(o.createElement)(i.ExternalLink,{onClick:this.settingsClick},Object(c.__)("Connect an account","jetpack")))}}]),t}(o.Component),We=function(e){function t(){var e,n;P()(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=F()(this,(e=L()(t)).call.apply(e,[this].concat(a))),Re()(Ie()(n),"state",{hasEditedShareMessage:!1}),Re()(Ie()(n),"fieldId",Object(w.uniqueId)("jetpack-publicize-message-field-")),Re()(Ie()(n),"onMessageChange",(function(e){var t=n.props.messageChange;n.setState({hasEditedShareMessage:!0}),t(e,!0)})),n}return z()(t,e),B()(t,[{key:"isDisabled",value:function(){return this.props.connections.every((function(e){return!e.toggleable}))}},{key:"render",value:function(){var e=this.props,t=e.connections,n=e.toggleConnection,r=e.refreshCallback,a=e.shareMessage,i=e.maxLength,l=i-a.length,s=Ue()("jetpack-publicize-character-count",{"wpas-twitter-length-limit":l<=0});return Object(o.createElement)("div",{id:"publicize-form"},Object(o.createElement)("ul",{className:"jetpack-publicize__connections-list"},t.map((function(e){var t=e.display_name,r=e.enabled,a=e.id,c=e.service_name,i=e.toggleable;return Object(o.createElement)(He,{disabled:!i,enabled:r,key:a,id:a,label:t,name:c,toggleConnection:n})}))),Object(o.createElement)(Ge,{refreshCallback:r}),t.some((function(e){return e.enabled}))&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("label",{className:"jetpack-publicize-message-note",htmlFor:this.fieldId},Object(c.__)("Customize your message","jetpack")),Object(o.createElement)("div",{className:"jetpack-publicize-message-box"},Object(o.createElement)("textarea",{id:this.fieldId,value:a,onChange:this.onMessageChange,disabled:this.isDisabled(),maxLength:i,placeholder:Object(c.__)("Write a message for your audience here. If you leave this blank, we'll use an excerpt of the post content as the message.","jetpack"),rows:4}),Object(o.createElement)("div",{className:s},Object(c.sprintf)(Object(c._n)("%d character remaining","%d characters remaining",l,"jetpack"),l)))))}}]),t}(o.Component),$e=Object(A.compose)([Object(u.withSelect)((function(e){return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections"),shareMessage:e("jetpack/publicize").getShareMessage(),maxLength:e("jetpack/publicize").getShareMessageMaxLength()}})),Object(u.withDispatch)((function(e,t){var n=t.connections;return{toggleConnection:function(t){var r=n.map((function(e){return y()({},e,{enabled:e.id===t?!e.enabled:e.enabled})}));e("core/editor").editPost({jetpack_publicize_connections:r})},messageChange:function(t,n){e("core/editor").editPost({meta:{jetpack_publicize_message:t.target.value,jetpack_publicize_hasEditedShareMessage:n}})}}}))])(We),Ke=Object(A.compose)([Object(u.withSelect)((function(e){var t=e("jetpack/publicize"),n=t.isTweetStorm,r=t.getTweetStorm;return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections"),isTweetStorm:n(),tweetStormLength:r().length}})),Object(u.withDispatch)((function(e){return{setTweetstorm:function(t){e("core/editor").editPost({meta:{jetpack_is_tweetstorm:t}}),t?e("jetpack/publicize").refreshTweets():(e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm"),e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm-line-break"))}}}))])((function(e){var t=e.connections,n=e.isTweetStorm,r=e.tweetStormLength,a=e.setTweetstorm,l=e.prePublish;if(!(null==t?void 0:t.some((function(e){return"twitter"===e.service_name&&e.enabled}))))return null;var s=function(e,t){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e),Object(o.createElement)("br",null),t)},u=[];return r>=102?u.push({id:"jetpack-publicize-twitter-tweetstorm-too-long",status:"error",content:Object(c.__)("Only the first 100 tweets of this post will be published in the Twitter thread.","jetpack"),isDismissible:!1}):r>=22?u.push({id:"jetpack-publicize-twitter-tweetstorm-a-bit-long",status:"warning",content:Object(c.__)("This post will create a Twitter thread more than 20 tweets long.","jetpack"),isDismissible:!1}):l&&r<=2&&u.push({id:"jetpack-publicize-twitter-tweetstorm-too-short",status:"warning",content:Object(c.__)("None of the content in this post could be transformed into tweets, it may be better to share as a single tweet.","jetpack"),isDismissible:!1}),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("h3",{className:"jetpack-publicize-twitter-options__heading"},Object(c.__)("Twitter settings","jetpack")),Object(o.createElement)(i.RadioControl,{className:"jetpack-publicize-twitter-options__type",selected:n?"tweetstorm":"single",options:[{label:s(Object(c.__)("Single Tweet","jetpack"),Object(c.__)("Share a link to this post to Twitter.","jetpack")),value:"single"},{label:s(Object(c.__)("Twitter Thread","jetpack"),Object(c.__)("Share the content of this post as a Twitter thread.","jetpack")),value:"tweetstorm"}],onChange:function(e){a("tweetstorm"===e)}}),n&&Object(o.createElement)(i.NoticeList,{className:"jetpack-publicize-twitter-options__notices",notices:u}))})),Ze=Object(A.compose)([Object(u.withSelect)((function(e){return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")}})),Object(u.withDispatch)((function(e){return{refreshConnections:e("core/editor").refreshPost}}))])((function(e){var t=e.connections,n=e.refreshConnections,r=e.prePublish;return Object(o.createElement)(o.Fragment,null,t&&t.some((function(e){return e.enabled}))&&Object(o.createElement)(De,null),Object(o.createElement)("div",null,Object(c.__)("Connect and select the accounts where you'd like to share your post.","jetpack")),t&&t.length>0&&Object(o.createElement)($e,{refreshCallback:n}),Object(o.createElement)(Ke,{prePublish:r}),t&&0===t.length&&Object(o.createElement)(Ge,{className:"jetpack-publicize-add-connection-wrapper",refreshCallback:n}))})),Je={render:function(){return Object(o.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},Object(o.createElement)(W,null),Object(o.createElement)(Me.a,null,Object(o.createElement)(i.PanelBody,{title:Object(c.__)("Share this post","jetpack")},Object(o.createElement)(Ze,null))),Object(o.createElement)(l.PluginPrePublishPanel,{initialOpen:!0,id:"publicize-title",title:Object(o.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},Object(c.__)("Share this post","jetpack"))},Object(o.createElement)(Ze,{prePublish:!0})))}},Ye=n(61);Object(Ye.a)("publicize",Je)},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(66),o=n(9),c=n.n(o),i=n(1),l=n(2),s=n(67),u=n(23),p=n.n(u),d=n(41),m=n.n(d),b=n(19),h=n.n(b),f=n(4),g=function(e){return function(t){return t.length<=e&&t}},j=function(e,t){return function(n){var r=n.slice(0,t),a=r.lastIndexOf(" ");return a>e&&a<t&&r.slice(0,a).concat("โฆ")}},v=function(e){return function(t){return t.slice(0,e).concat("โฆ")}},k=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return Object(f.find)(t,(function(t){return!1!==t(e)}))(e)}},y=function(e){return e?e.replace(/(<([^>]+)>)/gi,""):""},_=(n(346),k(g(63),j(23,73),v(63))),O=k(g(160),j(80,170),v(160));function w(e){var t=e.description,n=e.title,r=e.url;return h.a.createElement("div",{className:"search-preview"},h.a.createElement("div",{className:"search-preview__display"},h.a.createElement("div",{className:"search-preview__url"},function(e){var t=e.replace(/^[^/]+[/]*/,"").split("/").join(" โบ ");return k(g(68),v(68))(t)}(r)," โพ"),h.a.createElement("div",{className:"search-preview__title"},_(n)),h.a.createElement("div",{className:"search-preview__description"},O(y(t)))))}w.propTypes={title:m.a.string,url:m.a.string,description:m.a.string},w.defaultProps={title:"",url:"",description:""};var E=n(83),C=n.n(E),x=n(84),S=n.n(x),A=n(85),T=n.n(A),N=n(86),P=n.n(N),M=(n(353),function(e){return e&&e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,"")}),B=k(g(80),v(80)),I=k(g(200),v(200)),F=function(e){T()(n,e);var t=P()(n);function n(){return C()(this,n),t.apply(this,arguments)}return S()(n,[{key:"render",value:function(){var e=this.props,t=e.url,n=e.type,r=e.title,a=e.description,o=e.image,c=e.author;return h.a.createElement("div",{className:"facebook-preview facebook-preview__".concat(n)},h.a.createElement("div",{className:"facebook-preview__content"},h.a.createElement("div",{className:"facebook-preview__image"},o&&h.a.createElement("img",{alt:"Facebook Preview Thumbnail",src:o})),h.a.createElement("div",{className:"facebook-preview__body"},h.a.createElement("div",{className:"facebook-preview__url"},Object(f.compact)([M(t),c]).join(" | ")),h.a.createElement("div",{className:"facebook-preview__title"},B(r||"")),h.a.createElement("div",{className:"facebook-preview__description"},I(y(a))))))}}]),n}(b.PureComponent);F.propTypes={url:m.a.string,type:m.a.string,title:m.a.string,description:m.a.string,image:m.a.string,author:m.a.string};var R=F,L=n(197),D=n.n(L),z=n(168),U=n.n(z),V=n(8),q=n.n(V),H=n(45),G=n.n(H),W=(n(193),k(g(200),v(200))),$=function(e){T()(n,e);var t=P()(n);function n(){return C()(this,n),t.apply(this,arguments)}return S()(n,[{key:"renderSidebar",value:function(e,t){return h.a.createElement("div",{className:"twitter-preview__sidebar"},h.a.createElement("div",{className:"twitter-preview__profile-image"},h.a.createElement("img",{alt:Object(i.__)("Twitter profile image"),src:e})),!t&&h.a.createElement("div",{className:"twitter-preview__connector"}))}},{key:"renderHeader",value:function(e,t,n){return h.a.createElement("div",{className:"twitter-preview__header"},h.a.createElement("span",{className:"twitter-preview__name"},e),h.a.createElement("span",{className:"twitter-preview__screen-name"},t),h.a.createElement("span",{className:"twitter-preview__date"},G()(n).format("MMM D")))}},{key:"renderText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.url||"",a=e.endsWith(r)?e.substr(0,e.lastIndexOf(r)):e,o=t.reduce((function(e,t){return e.replace(new RegExp("\\("+t+"\\)","g"),'(<a href="'.concat(t,'">').concat(t,"</a>)"))}),y(a).replace(new RegExp("\\n","g"),"<br/>"));return h.a.createElement("div",{className:"twitter-preview__text",dangerouslySetInnerHTML:{__html:o}})}},{key:"renderMedia",value:function(e){if(e){var t=e.filter((function(e){return e.type.startsWith("image/")||e.type.startsWith("video/")})).filter((function(e,t,n){return 0===t||!n[0].type.startsWith("video/")&&"image/gif"!==n[0].type&&(!e.type.startsWith("video/")&&"image/gif"!==e.type)})).slice(0,4),n=t.length>0&&t[0].type.startsWith("video/"),r=q()(["twitter-preview__media","twitter-preview__media-children-"+t.length]);if(0!==t.length)return h.a.createElement("div",{className:r},n&&t.map((function(e,t){return h.a.createElement("video",{key:"twitter-preview__media-item-".concat(t),controls:!0},h.a.createElement("source",{src:e.url,type:e.type})," ")})),!n&&t.map((function(e,t){return h.a.createElement("img",{key:"twitter-preview__media-item-".concat(t),alt:e.alt,src:e.url})})))}}},{key:"renderQuoteTweet",value:function(e){if(e)return h.a.createElement("div",{className:"twitter-preview__quote-tweet"},h.a.createElement(l.SandBox,{html:'<blockquote class="twitter-tweet" data-conversation="none" data-dnt="true"><a href="'.concat(e,'"></a></blockquote>'),scripts:["https://platform.twitter.com/widgets.js"],title:"Embedded tweet",onFocus:this.hideOverlay}),h.a.createElement("div",{className:"twitter-preview__quote-tweet-overlay"}))}},{key:"renderCard",value:function(e){if(e){var t=e.description,n=e.image,r=e.title,a=e.type,o=e.url,c=q()("twitter-preview__card-".concat(a),{"twitter-preview__card-has-image":!!n});return h.a.createElement("div",{className:"twitter-preview__card"},h.a.createElement("div",{className:c},n&&h.a.createElement("img",{className:"twitter-preview__card-image",src:n,alt:""}),h.a.createElement("div",{className:"twitter-preview__card-body"},h.a.createElement("div",{className:"twitter-preview__card-title"},r),h.a.createElement("div",{className:"twitter-preview__card-description"},W(y(t))),h.a.createElement("div",{className:"twitter-preview__card-url"},h.a.createElement("svg",{viewBox:"0 0 24 24"},h.a.createElement("g",null,h.a.createElement("path",{d:"M11.96 14.945c-.067 0-.136-.01-.203-.027-1.13-.318-2.097-.986-2.795-1.932-.832-1.125-1.176-2.508-.968-3.893s.942-2.605 2.068-3.438l3.53-2.608c2.322-1.716 5.61-1.224 7.33 1.1.83 1.127 1.175 2.51.967 3.895s-.943 2.605-2.07 3.438l-1.48 1.094c-.333.246-.804.175-1.05-.158-.246-.334-.176-.804.158-1.05l1.48-1.095c.803-.592 1.327-1.463 1.476-2.45.148-.988-.098-1.975-.69-2.778-1.225-1.656-3.572-2.01-5.23-.784l-3.53 2.608c-.802.593-1.326 1.464-1.475 2.45-.15.99.097 1.975.69 2.778.498.675 1.187 1.15 1.992 1.377.4.114.633.528.52.928-.092.33-.394.547-.722.547z"}),h.a.createElement("path",{d:"M7.27 22.054c-1.61 0-3.197-.735-4.225-2.125-.832-1.127-1.176-2.51-.968-3.894s.943-2.605 2.07-3.438l1.478-1.094c.334-.245.805-.175 1.05.158s.177.804-.157 1.05l-1.48 1.095c-.803.593-1.326 1.464-1.475 2.45-.148.99.097 1.975.69 2.778 1.225 1.657 3.57 2.01 5.23.785l3.528-2.608c1.658-1.225 2.01-3.57.785-5.23-.498-.674-1.187-1.15-1.992-1.376-.4-.113-.633-.527-.52-.927.112-.4.528-.63.926-.522 1.13.318 2.096.986 2.794 1.932 1.717 2.324 1.224 5.612-1.1 7.33l-3.53 2.608c-.933.693-2.023 1.026-3.105 1.026z"}))),function(e){return e.replace(/^[^/]+[/]*(www\.)?/,"").replace(/\/.*$/,"")}(o||"")))))}}},{key:"renderFooter",value:function(){return h.a.createElement("div",{className:"twitter-preview__footer"},h.a.createElement("span",{className:"twitter-preview__icon-replies"},h.a.createElement("svg",{viewBox:"0 0 24 24"},h.a.createElement("path",{d:"M14.046 2.242l-4.148-.01h-.002c-4.374 0-7.8 3.427-7.8 7.802 0 4.098 3.186 7.206 7.465 7.37v3.828c0 .108.044.286.12.403.142.225.384.347.632.347.138 0 .277-.038.402-.118.264-.168 6.473-4.14 8.088-5.506 1.902-1.61 3.04-3.97 3.043-6.312v-.017c-.006-4.367-3.43-7.787-7.8-7.788zm3.787 12.972c-1.134.96-4.862 3.405-6.772 4.643V16.67c0-.414-.335-.75-.75-.75h-.396c-3.66 0-6.318-2.476-6.318-5.886 0-3.534 2.768-6.302 6.3-6.302l4.147.01h.002c3.532 0 6.3 2.766 6.302 6.296-.003 1.91-.942 3.844-2.514 5.176z"}))),h.a.createElement("span",{className:"twitter-preview__icon-retweets"},h.a.createElement("svg",{viewBox:"0 0 24 24"},h.a.createElement("path",{d:"M23.77 15.67c-.292-.293-.767-.293-1.06 0l-2.22 2.22V7.65c0-2.068-1.683-3.75-3.75-3.75h-5.85c-.414 0-.75.336-.75.75s.336.75.75.75h5.85c1.24 0 2.25 1.01 2.25 2.25v10.24l-2.22-2.22c-.293-.293-.768-.293-1.06 0s-.294.768 0 1.06l3.5 3.5c.145.147.337.22.53.22s.383-.072.53-.22l3.5-3.5c.294-.292.294-.767 0-1.06zm-10.66 3.28H7.26c-1.24 0-2.25-1.01-2.25-2.25V6.46l2.22 2.22c.148.147.34.22.532.22s.384-.073.53-.22c.293-.293.293-.768 0-1.06l-3.5-3.5c-.293-.294-.768-.294-1.06 0l-3.5 3.5c-.294.292-.294.767 0 1.06s.767.293 1.06 0l2.22-2.22V16.7c0 2.068 1.683 3.75 3.75 3.75h5.85c.414 0 .75-.336.75-.75s-.337-.75-.75-.75z"}))),h.a.createElement("span",{className:"twitter-preview__icon-likes"},h.a.createElement("svg",{viewBox:"0 0 24 24"},h.a.createElement("path",{d:"M12 21.638h-.014C9.403 21.59 1.95 14.856 1.95 8.478c0-3.064 2.525-5.754 5.403-5.754 2.29 0 3.83 1.58 4.646 2.73.814-1.148 2.354-2.73 4.645-2.73 2.88 0 5.404 2.69 5.404 5.755 0 6.376-7.454 13.11-10.037 13.157H12zM7.354 4.225c-2.08 0-3.903 1.988-3.903 4.255 0 5.74 7.034 11.596 8.55 11.658 1.518-.062 8.55-5.917 8.55-11.658 0-2.267-1.823-4.255-3.903-4.255-2.528 0-3.94 2.936-3.952 2.965-.23.562-1.156.562-1.387 0-.014-.03-1.425-2.965-3.954-2.965z"}))),h.a.createElement("span",{className:"twitter-preview__icon-share"},h.a.createElement("svg",{viewBox:"0 0 24 24"},h.a.createElement("path",{d:"M17.53 7.47l-5-5c-.293-.293-.768-.293-1.06 0l-5 5c-.294.293-.294.768 0 1.06s.767.294 1.06 0l3.72-3.72V15c0 .414.336.75.75.75s.75-.336.75-.75V4.81l3.72 3.72c.146.147.338.22.53.22s.384-.072.53-.22c.293-.293.293-.767 0-1.06z"}),h.a.createElement("path",{d:"M19.708 21.944H4.292C3.028 21.944 2 20.916 2 19.652V14c0-.414.336-.75.75-.75s.75.336.75.75v5.652c0 .437.355.792.792.792h15.416c.437 0 .792-.355.792-.792V14c0-.414.336-.75.75-.75s.75.336.75.75v5.652c0 1.264-1.028 2.292-2.292 2.292z"}))))}},{key:"render",value:function(){var e=this.props,t=e.isLast,n=e.profileImage,r=e.name,a=e.screenName,o=e.date,c=e.text,i=e.media,l=e.tweet,s=e.urls,u=e.card;return h.a.createElement("div",{className:"twitter-preview__container"},this.renderSidebar(n,t),h.a.createElement("div",{className:"twitter-preview__main"},this.renderHeader(r,a,o),h.a.createElement("div",{className:"twitter-preview__content"},this.renderText(c,s,u),this.renderMedia(i),this.renderQuoteTweet(l),this.renderCard(u)),this.renderFooter()))}}]),n}(b.PureComponent);$.propTypes={tweets:m.a.array,isLast:m.a.bool,profileImage:m.a.string,name:m.a.string,screenName:m.a.string,date:m.a.number,text:m.a.string,media:m.a.array,tweet:m.a.string,urls:m.a.array,card:m.a.object};var K=function(e){T()(n,e);var t=P()(n);function n(){return C()(this,n),t.apply(this,arguments)}return S()(n,[{key:"render",value:function(){var e=this.props.tweets||[{text:"",media:[],card:U()(U()({},this.props),{},{type:"large_image_summary"===this.props.type?"summary_large_image":this.props.type}),date:Date.now(),name:"Account Name",profileImage:"https://abs.twimg.com/sticky/default_profile_images/default_profile_bigger.png",screenName:"@account"}];return h.a.createElement("div",{className:"twitter-preview"},e&&e.map((function(t,n){return h.a.createElement($,D()({key:"twitter-preview__tweet-".concat(n),isLast:n+1===e.length},t))})))}}]),n}(b.PureComponent);K.propTypes={tweets:m.a.array};var Z=K,J=[{title:Object(i.__)("Google Search","jetpack"),icon:"google",name:"google",preview:w},{title:Object(i.__)("Facebook","jetpack"),icon:"facebook",name:"facebook",preview:function(e){return Object(r.createElement)(R,p()({type:"article"},e))}},{title:Object(i.__)("Twitter","jetpack"),icon:"twitter",name:"twitter",preview:function(e){return Object(r.createElement)(Z,e)}}],Y=n(32),Q=function(e){var t=e.openModal,n=e.showUpgradeNudge,a=n?Object(i.__)("Learn more","jetpack"):Object(i.__)("Preview","jetpack"),o=n?Object(i.__)("Learn more about paid plans","jetpack"):Object(i.__)("Open Social Previews","jetpack");return Object(r.createElement)("div",{className:"jetpack-social-previews__panel"},Object(r.createElement)("p",null,Object(i.__)("Preview what this will look like on social networks and Google search.","jetpack")),n&&Object(r.createElement)("p",null,Object(i.__)("Business or eCommerce plan required.","jetpack")),Object(r.createElement)("div",{className:"jetpack-gutenberg-social-icons"},J.map((function(e){return Object(r.createElement)(Y.k,{key:e.icon,serviceName:e.icon,className:"jetpack-social-previews__icon"})}))),Object(r.createElement)(l.Button,{isSecondary:!0,onClick:t,label:o},a))},X=n(7),ee=n.n(X),te=n(10),ne=n(58),re=n(198),ae=n.n(re),oe=n(101),ce=n(48);function ie(){var e,t,n=null===(e=Object(ce.a)(ue))||void 0===e||null===(t=e.details)||void 0===t?void 0:t.required_plan,a=Object(oe.a)(n,(function(){ne.a.tracks.recordEvent("jetpack_editor_block_upgrade_click",{plan:n,block:ue})})),o=c()(a,3),s=o[0],u=o[1],p=o[2],d=p?Object(i.__)("Redirectingโฆ","jetpack"):Object(i.__)("Upgrade","jetpack");return Object(r.createElement)("div",{className:"jetpack-social-previews__modal-upgrade"},Object(r.createElement)("img",{className:"jetpack-social-previews__upgrade-illustration",src:ae.a,width:"351",height:"264",alt:""}),Object(r.createElement)("div",{className:"jetpack-social-previews__upgrade-description"},Object(r.createElement)("h2",{className:"jetpack-social-previews__upgrade-heading"},Object(i.__)("Upgrade to a Business plan to unlock the power of our SEO tools","jetpack")),Object(r.createElement)("ul",{className:"jetpack-social-previews__upgrade-feature-list"},Object(r.createElement)("li",null,Object(i.__)("Preview your siteโs content as it will appear on Facebook, Twitter, and the WordPress.com Reader.","jetpack")),Object(r.createElement)("li",null,Object(i.__)("Control how page titles will appear on Google search results and social networks.","jetpack")),Object(r.createElement)("li",null,Object(i.__)("Customize your front page metadata to change how your site appears to search engines.","jetpack"))),Object(r.createElement)(l.Button,{href:s,isPrimary:!0,label:Object(i.__)("Purchase a Business plan to access social previews","jetpack"),onClick:u,target:"_top",isBusy:p},d)))}n(355);var le,se=Object(te.withSelect)((function(e,t){var n;if(t.showUpgradeNudge)return{};var r,a,o,c,l=e("core"),s=l.getMedia,u=l.getUser,p=e("core/editor"),d=p.getCurrentPost,m=p.getEditedPostAttribute,b=e("jetpack/publicize"),h=b.getTweetTemplate,f=b.getTweetStorm,g=b.getShareMessage,j=b.isTweetStorm,v=m("featured_media"),k=m("author"),y=k&&u(k),_={post:d(),title:m("title"),description:(null===(n=m("meta"))||void 0===n?void 0:n.advanced_seo_description)||m("excerpt")||m("content").split("\x3c!--more")[0]||Object(i.__)("Visit the post for more.","jetpack"),url:m("link"),author:null==y?void 0:y.name,image:!!v&&(r=s(v),r?(null===(a=r.media_details)||void 0===a||null===(o=a.sizes)||void 0===o||null===(c=o.large)||void 0===c?void 0:c.source_url)||r.source_url:null)},O=[];return j()?O=f():O.push(ee()({},h(),{text:g(),card:ee()({},_,{type:_.image?"summary_large_image":"summary"})})),ee()({},_,{tweets:O,isTweetStorm:j()})}))((function(e){var t=e.onClose,n=e.showUpgradeNudge,a=e.image,o=e.title,c=e.description,s=e.url,u=e.author,p=e.isTweetStorm,d=e.tweets,m=J.map((function(e){return ee()({},e,{title:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Y.k,{serviceName:e.icon}),e.title)})}));return Object(r.createElement)(l.Modal,{onRequestClose:t,title:Object(i.__)("Social Previews","jetpack"),className:"jetpack-social-previews__modal"},n?Object(r.createElement)(ie,null):Object(r.createElement)(l.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:m,initialTabName:p?"twitter":null,orientation:"vertical"},(function(e){return Object(r.createElement)("div",null,Object(r.createElement)(e.preview,{title:o,description:c,url:s,author:u,image:a,isTweetStorm:p,tweets:d}))})))})),ue=(n(356),"social-previews"),pe={render:function(){return Object(r.createElement)(de,null)}},de=function(e){var t=e.showUpgradeNudge,n=Object(r.useState)(!1),a=c()(n,2),o=a[0],u=a[1];return Object(r.createElement)(r.Fragment,null,o&&Object(r.createElement)(se,{showUpgradeNudge:t,onClose:function(){return u(!1)}}),Object(r.createElement)(s.a,null,Object(r.createElement)(l.PanelBody,{title:Object(i.__)("Social Previews","jetpack")},Object(r.createElement)(Q,{openModal:function(){return u(!0)},showUpgradeNudge:t}))))},me=n(24),be=n(61);Object(be.a)(ue,pe),!(null===(le=Object(ce.a)("social-previews"))||void 0===le?void 0:le.available)&&Object(me.b)()&&Object(a.registerPlugin)("jetpack-".concat(ue,"-upgrade-nudge"),{render:function(){return Object(r.createElement)(de,{showUpgradeNudge:!0})}})},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(1),o=n(28),c=n(35),i={url:{type:"string",validator:o.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:c.a},hexPrimaryColor:{type:"string",validator:c.a},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:c.a},hexSecondaryColor:{type:"string",validator:c.a},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:c.a},hexBackgroundColor:{type:"string",validator:c.a},exampleFeedData:{type:"object"}},l={attributes:{url:{type:"string",validator:o.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:c.a},hexPrimaryColor:{type:"string",validator:c.a},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:c.a},hexSecondaryColor:{type:"string",validator:c.a},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:c.a},hexBackgroundColor:{type:"string",validator:c.a},exampleFeedData:{type:"object"}},supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:function(){return null}},s=n(3),u=n.n(s),p=n(9),d=n.n(p),m=n(0),b=n(82),h=n.n(b),f=n(2),g=n(18),j=n(5),v=n(10),k=n(11),y=n(44),_=(n(191),Object(m.createElement)(f.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},Object(m.createElement)(f.G,null,Object(m.createElement)(f.Rect,{fill:"none",height:"24",width:"24"}),Object(m.createElement)(f.Rect,{fill:"none",height:"24",width:"24"}),Object(m.createElement)(f.Rect,{fill:"none",height:"24",width:"24"})),Object(m.createElement)(f.G,null,Object(m.createElement)(f.G,null),Object(m.createElement)(f.G,null,Object(m.createElement)(f.G,{transform:"matrix(1 0 0 1 144 120)"},Object(m.createElement)(f.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"})))))),O=n(24),w=n(167),E=n(68),C=n(27),x=n.n(C),S=n(22),A=n.n(S),T=function(){var e=x()(regeneratorRuntime.mark((function e(t){var n,r,a,c,i,l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.url,r=t.guids,a=void 0===r?[]:r,e.prev=1,e.next=4,A()({path:Object(o.addQueryArgs)("/wpcom/v2/podcast-player",{url:n,guids:a})});case 4:c=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),i=e.t0;case 10:if(!c){e.next=12;break}return e.abrupt("return",{type:"podcast-feed",data:c});case 12:return e.prev=12,e.next=15,A()({path:Object(o.addQueryArgs)("/oembed/1.0/proxy",{url:n})});case 15:l=e.sent,e.next=20;break;case 18:e.prev=18,e.t1=e.catch(12);case 20:if(s='<a href="'+n+'">'+n+"</a>",!l||l.html===s){e.next=23;break}return e.abrupt("return",{type:"embed-block"});case 23:throw i;case 24:case"end":return e.stop()}}),e,null,[[1,7],[12,18]])})));return function(t){return e.apply(this,arguments)}}(),N=Object(f.withFallbackStyles)((function(e,t){var n=t.textColor,r=t.backgroundColor,a=r&&r.color,o=n&&n.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void 0:getComputedStyle(e).color}})),P=h()("jetpack:podcast-player:edit"),M=Object(O.b)()||Object(O.a)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/",B=Object(g.compose)([Object(v.withDispatch)((function(e,t){var n=t.clientId,r=t.attributes;return{replaceWithEmbedBlock:function(){e("core/block-editor").replaceBlock(n,Object(k.createBlock)("core/embed",{url:r.url}))}}})),Object(j.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),f.withNotices,g.withInstanceId,N])((function(e){var t=e.instanceId,n=e.className,r=e.attributes,c=e.setAttributes,l=e.noticeOperations,s=l.createErrorNotice,p=l.removeAllNotices,b=e.noticeUI,h=e.primaryColor,g=e.setPrimaryColor,v=e.secondaryColor,k=e.setSecondaryColor,O=e.fallbackTextColor,C=e.backgroundColor,x=e.setBackgroundColor,S=e.fallbackBackgroundColor,A=e.isSelected,N=e.replaceWithEmbedBlock,B=Object(y.a)(i,r),I=B.url,F=B.selectedEpisodes,R=B.itemsToShow,L=B.showCoverArt,D=B.showEpisodeTitle,z=B.showEpisodeDescription,U=B.exampleFeedData,V="jetpack-podcast-player-block-".concat(t),q=Object(m.useState)(I||""),H=d()(q,2),G=H[0],W=H[1],$=Object(m.useState)(!1),K=d()($,2),Z=K[0],J=K[1],Y=Object(m.useState)(U||{}),Q=d()(Y,2),X=Q[0],ee=Q[1],te=Object(m.useRef)(),ne=Object(m.useState)(!1),re=d()(ne,2),ae=re[0],oe=re[1],ce=Object(m.useCallback)((function(e){te.current=Object(E.c)(T(e)),te.current.promise.then((function(e){if(null==e?void 0:e.isCanceled)P("Block was unmounted during fetch",e);else switch(null==e?void 0:e.type){case"podcast-feed":return ee(e.data);case"embed-block":return N()}}),(function(e){(null==e?void 0:e.isCanceled)?P("Block was unmounted during fetch",e):(P("feed error",e),s(e.message||Object(a.__)("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),J(!0))}))}),[s,N]);Object(m.useEffect)((function(){return function(){var e,t;null==te||null===(e=te.current)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e)}}),[]),Object(m.useEffect)((function(){if(p(),I)return ee({}),ce({url:I,guids:F.map((function(e){return e.guid}))}),function(){var e,t;return null==te||null===(e=te.current)||void 0===e||null===(t=e.cancel)||void 0===t?void 0:t.call(e)}}),[ce,p,I,F]),Object(m.useEffect)((function(){!A&&ae&&oe(!1)}),[A]);var ie=Object(m.useCallback)((function(e){if(e.preventDefault(),p(),G){var t=Object(o.prependHTTP)(G);Object(o.isURL)(t)?(t===I?ce({url:I}):c({url:t}),W(t),J(!1)):s(Object(a.__)("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))}}),[G,I,ce,s,p,c]);if(Z||!I&&!U)return Object(m.createElement)(f.Placeholder,{icon:Object(m.createElement)(j.BlockIcon,{icon:_}),label:Object(a.__)("Podcast Player","jetpack"),instructions:Object(a.__)("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},Object(m.createElement)("form",{onSubmit:ie},b,Object(m.createElement)(f.TextControl,{type:"text",inputMode:"url",placeholder:Object(a.__)("Enter URL hereโฆ","jetpack"),value:G||"",className:"components-placeholder__input",onChange:W}),Object(m.createElement)(f.Button,{isPrimary:!0,type:"submit"},Object(a.__)("Embed","jetpack"))),Object(m.createElement)("div",{className:"components-placeholder__learn-more"},Object(m.createElement)(f.ExternalLink,{href:M},Object(a.__)("Learn more about embeds","jetpack"))));if(!X.tracks||!X.tracks.length)return Object(m.createElement)(f.Placeholder,{icon:Object(m.createElement)(j.BlockIcon,{icon:_}),label:Object(a.__)("Podcast Player","jetpack"),instructions:Object(a.__)("Loading podcast feedโฆ","jetpack")},Object(m.createElement)(f.Spinner,null));var le=function(e,t){return function(n){c(u()({},e,n)),t(n)}};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(j.BlockControls,null,Object(m.createElement)(f.ToolbarGroup,null,Object(m.createElement)(f.Button,{"aria-label":Object(a.__)("Edit Podcast Feed URL","jetpack"),onClick:function(){return J(!0)}},Object(a.__)("Replace","jetpack")))),Object(m.createElement)(j.InspectorControls,null,Object(m.createElement)(f.PanelBody,{title:Object(a.__)("Podcast settings","jetpack")},0===F.length&&Object(m.createElement)(f.RangeControl,{label:Object(a.__)("Number of items","jetpack"),value:R,onChange:function(e){return c({itemsToShow:e})},min:1,max:10,required:!0}),Object(m.createElement)(f.ToggleControl,{label:Object(a.__)("Show Cover Art","jetpack"),checked:L,onChange:function(e){return c({showCoverArt:e})}}),Object(m.createElement)(f.ToggleControl,{label:Object(a.__)("Show Episode Title","jetpack"),checked:D,onChange:function(e){return c({showEpisodeTitle:e})}}),Object(m.createElement)(f.ToggleControl,{label:Object(a.__)("Show Episode Description","jetpack"),checked:z,onChange:function(e){return c({showEpisodeDescription:e})}})),Object(m.createElement)(j.PanelColorSettings,{title:Object(a.__)("Color Settings","jetpack"),colorSettings:[{value:h.color,onChange:le("hexPrimaryColor",g),label:Object(a.__)("Primary Color","jetpack")},{value:v.color,onChange:le("hexSecondaryColor",k),label:Object(a.__)("Secondary Color","jetpack")},{value:C.color,onChange:le("hexBackgroundColor",x),label:Object(a.__)("Background Color","jetpack")}]},Object(m.createElement)(j.ContrastChecker,{isLargeText:!1,textColor:v.color,backgroundColor:C.color,fallbackBackgroundColor:S,fallbackTextColor:O}))),Object(m.createElement)("div",{id:V,className:n},Object(m.createElement)(w.a,{playerId:V,attributes:B,tracks:X.tracks,cover:X.cover,title:X.title,link:X.link}),!ae&&Object(m.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:function(){return oe(!0)}})))}));var I=n(17),F=(n(294),"jetpack/".concat("podcast-player"),{title:Object(a.__)("Podcast Player","jetpack"),description:Object(a.__)("Select and play episodes from a single podcast.","jetpack"),icon:{src:_,foreground:Object(I.a)()},category:"embed",keywords:[Object(a._x)("audio","block search term","jetpack"),Object(a._x)("embed","block search term","jetpack")],supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},edit:B,save:function(e){var t=e.attributes.url;if(t&&""!==t)return Object(m.createElement)("a",{className:"jetpack-podcast-player__direct-link",href:t},t)},attributes:i,example:{attributes:{customPrimaryColor:Object(I.a)(),hexPrimaryColor:Object(I.a)(),exampleFeedData:{title:Object(a.__)("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:Object(a.__)("3. Our third episode","jetpack"),duration:"14:58"},{id:"2",title:Object(a.__)("2. Interview with a special guest","jetpack"),duration:"19:17"},{id:"1",title:Object(a.__)("1. Welcome to Example Podcast","jetpack"),duration:"11:25"}]}}},deprecated:[l]});Object(r.a)("podcast-player",F)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(0),o=n(1),c=n(5),i=n(2);var l=n(17),s=Object(a.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},Object(a.createElement)(i.Path,{fill:Object(l.a)(),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"})),u=n(100),p=[{isDefault:!0,name:"whatsapp-button",title:Object(o.__)("WhatsApp Button","jetpack"),description:Object(o.__)("Let your visitors send you messages on WhatsApp with the tap of a button.","jetpack"),icon:Object(u.b)("send-a-message",s),innerBlocks:[["jetpack/whatsapp-button",{}]]}],d=n(26),m=(n(341),{title:Object(o.__)("Send A Message","jetpack"),description:Object(o.__)("Let your visitors send you messages with the tap of a button.","jetpack"),icon:{src:Object(d.a)(Object(a.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:Object(l.a)()},category:"grow",keywords:[Object(o._x)("whatsapp","keyword","jetpack"),Object(o._x)("messenger","keyword","jetpack"),Object(o._x)("contact","keyword","jetpack"),Object(o._x)("support","keyword","jetpack")],supports:{html:!1},attributes:{},edit:function(e){var t=e.className;return Object(a.createElement)("div",{className:t},Object(a.createElement)(c.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))},save:function(e){return Object(a.createElement)("div",{className:e.className},Object(a.createElement)(c.InnerBlocks.Content,null))},variations:p,example:{}}),b={countryCode:{type:"string"},phoneNumber:{type:"string"},firstMessage:{type:"string",default:Object(o.__)("Hi, I got your WhatsApp information from your website.","jetpack")},buttonText:{type:"array",source:"children",selector:"a.whatsapp-block__button",default:Object(o.__)("Chat on WhatsApp","jetpack")},backgroundColor:{type:"string",default:"#25D366"},colorClass:{type:"string",default:"dark"},openInNewTab:{type:"boolean",default:!1}},h=n(27),f=n.n(h),g=n(9),j=n.n(g),v=n(8),k=n.n(v),y=n(10),_=n(25),O=[{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:"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:"CY",label:"๐จ๐พ +537",value:"537CY"},{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"}],w=n(49);n(300);var E={attributes:b,supports:{html:!1,reusable:!1},save:function(e){var t,n=e.attributes,r=e.className,o=n.countryCode,i=n.phoneNumber,l=n.firstMessage,s=n.colorClass,u=n.buttonText,p=n.backgroundColor,d=n.openInNewTab?"_blank":"_self",m=o&&i?o.replace(/\D+/g,"")+i.replace(/\D+/g,""):"",b=k()(r,s?"is-color-"+s:void 0,u.length?void 0:"has-no-text");return Object(a.createElement)("div",{className:b},Object(a.createElement)("a",{className:"whatsapp-block__button",href:(t=x+m,""!==l&&(t+="&text="+encodeURIComponent(l)),t),style:{backgroundColor:p},target:d,rel:"noopener noreferrer"},Object(a.createElement)(c.RichText.Content,{value:u})))}},C=(n(342),Object(o.__)("WhatsApp Button","jetpack")),x="https://api.whatsapp.com/send?phone=",S=(Object(o.__)("Chat on WhatsApp","jetpack"),Object(o.__)("Hi, I got your WhatsApp information from your website.","jetpack"),{title:C,description:Object(o.__)("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:{src:s,foreground:Object(l.a)()},category:"grow",parent:["jetpack/send-a-message"],keywords:[Object(o._x)("whatsapp","keyword","jetpack"),Object(o._x)("messenger","keyword","jetpack"),Object(o._x)("contact","keyword","jetpack"),Object(o._x)("support","keyword","jetpack")],supports:{html:!1,reusable:!1,align:["left","center","right"]},attributes:b,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,l=e.clientId,s=t.countryCode,u=t.phoneNumber,p=t.buttonText,m=t.firstMessage,b=t.colorClass,h=t.backgroundColor,g=t.openInNewTab,v=Object(a.useState)(!0),E=j()(v,2),C=E[0],x=E[1],S=Object(y.useDispatch)("core/block-editor").selectBlock,A=Object(a.useCallback)(f()(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n({countryCode:"1"}),e.next=3,fetch("https://public-api.wordpress.com/geo/").then((function(e){return!!e.ok&&e})).catch((function(){return!1}));case 3:if(!(t=e.sent)){e.next=9;break}return e.next=7,t.json();case 7:r=e.sent,O.forEach((function(e){e.code===r.country_short&&n({countryCode:e.value})}));case 9:case"end":return e.stop()}}),e)}))),[n]);Object(a.useEffect)((function(){void 0===s&&(A(),S(l))}),[l,s,A,S]);var T=function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(i.BaseControl,{label:Object(o.__)("Phone Number","jetpack"),help:Object(o.__)("Enter the phone number you use for WhatsApp and would like to be contacted on.","jetpack"),className:"jetpack-whatsapp-button__phonenumber"},Object(a.createElement)(i.SelectControl,{value:s,onChange:function(e){return n({countryCode:e})},options:O}),Object(a.createElement)(i.TextControl,{placeholder:Object(o.__)("Your phone numberโฆ","jetpack"),onChange:function(e){n({phoneNumber:e}),0===e.length&&x(!0),e.length>2&&x(function(e){var t=RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,"g");return!(void 0===e||e.length<1)&&t.test(s.replace(/\D/g,"")+e)}(e))},value:u}),!C&&Object(a.createElement)(w.a,{isError:!0,className:"jetpack-whatsapp-error"},Object(o.__)("Please enter a valid phone number.","jetpack"))),Object(a.createElement)(i.TextareaControl,{label:Object(o.__)("Default First Message","jetpack"),help:Object(o.__)("The default first message that will be sent by visitors when using this button.","jetpack"),value:m,onChange:function(e){return n({firstMessage:e})}}),Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Open in new tab","jetpack"),checked:g,onChange:function(e){return n({openInNewTab:e})},help:Object(o.__)("When the button is tapped, should a new tab be opened if the visitor does not have WhatsApp installed?","jetpack")}))};return Object(a.createElement)("div",{className:k()(r,b?"is-color-"+b:void 0)},i.ToolbarGroup&&Object(a.createElement)(c.BlockControls,null,Object(a.createElement)(i.ToolbarGroup,null,Object(a.createElement)(i.Dropdown,{position:"bottom right",className:"jetpack-whatsapp-button-settings-selector",contentClassName:"jetpack-whatsapp-button__popover",renderToggle:function(e){return function(e,t){return Object(a.createElement)(i.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:Object(o.__)("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:function(n){e||n.keyCode!==_.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:Object(d.a)(Object(a.createElement)(i.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"}))})}(e.isOpen,e.onToggle)},renderContent:function(){return T()}}))),Object(a.createElement)(c.InspectorControls,null,Object(a.createElement)(i.PanelBody,{title:Object(o.__)("WhatsApp Button Settings","jetpack"),initialOpen:!0},T()),Object(a.createElement)(c.PanelColorSettings,{title:Object(o.__)("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:h,onChange:function(e){return function(e){if(n({backgroundColor:e}),void 0===e||"#25D366"===e||"#465B64"===e)return n({colorClass:"dark"});n({colorClass:"light"})}(e)},label:Object(o.__)("Background Color","jetpack"),disableCustomColors:!0,colors:[{name:Object(o._x)("WhatsApp Green","background color name","jetpack"),slug:"whatsapp-green",color:"#25D366"},{name:Object(o._x)("WhatsApp Dark","background color name","jetpack"),slug:"whatsapp-dark",color:"#465B64"},{name:Object(o._x)("WhatsApp Light","background color name","jetpack"),slug:"whatsapp-light",color:"#F4F4F4"},{name:Object(o._x)("White","background color name","jetpack"),slug:"whatsapp-white",color:"#FFFFFF"}]}]})),Object(a.createElement)(c.RichText,{placeholder:p.default,keepPlaceholderOnFocus:!0,value:p,onChange:function(e){return n({buttonText:e})},withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:h,color:"dark"===b?"#fff":"#465B64"}}))},save:function(e){var t,n=e.attributes,r=e.className,o=n.countryCode,i=n.phoneNumber,l=n.firstMessage,s=n.buttonText,u=n.backgroundColor,p=n.colorClass,d=n.openInNewTab,m=o&&i?o.replace(/\D+/g,"")+i.replace(/\D+/g,""):"",b=k()(r,p?"is-color-"+p:void 0,s.length?void 0:"has-no-text"),h=d?"_blank":"_self";return Object(a.createElement)("div",{className:b},Object(a.createElement)("a",{className:"whatsapp-block__button",href:(t=x+m,""!==l&&(t+="&text="+encodeURIComponent(l)),t),style:{backgroundColor:u,color:"dark"===p?"#fff":"#465B64"},target:h,rel:"noopener noreferrer"},Object(a.createElement)(c.RichText.Content,{value:s})))},example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}},deprecated:[E]});Object(r.a)("send-a-message",m,[{name:"whatsapp-button",settings:S}])},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(1),o=n(9),c=n.n(o),i=n(0),l=n(5),s=n(2),u=n(18),p=n(76),d=Object(u.compose)([s.withNotices])((function(e){var t=e.image,n=e.noticeOperations,r=e.noticeUI,a=e.onChange,o=(e.placeHolderTitle,e.placeHolderLabel),c=Object(i.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),s=Object(i.createElement)(i.Fragment,null,Object(i.createElement)(l.MediaPlaceholder,{labels:{title:o},accept:"image/*",allowedTypes:["image"],onSelect:a,onError:function(e){return n.createErrorNotice(e)},notices:r}));return t&&t.url?c:s})),m=function(e,t,n){Object(i.useEffect)((function(){var r=setTimeout((function(){return e(n)}),t);return function(){return clearTimeout(r)}}),[n])},b=(n(338),n(231),function(e){var t=e.attributes,n=e.className,r=e.clientId,o=e.isSelected,b=e.setAttributes,h=t.imageBefore,f=t.imageAfter,g=t.caption,j=t.orientation,v=null,k=null;if(u.useResizeObserver){var y=Object(u.useResizeObserver)(),_=c()(y,2);v=_[0],k=_[1],m((function(e){e>0&&"undefined"!=typeof juxtapose&&juxtapose.sliders&&juxtapose.sliders.forEach((function(t){t.wrapper.parentElement.id===r&&t.optimizeWrapper(e)}))}),200,k.width)}var O=h&&h.url&&f&&f.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return Object(i.useLayoutEffect)((function(){h.url&&f.url&&"undefined"!=typeof juxtapose&&juxtapose.scanPage()}),[h,f,j]),Object(i.createElement)("figure",{className:n,id:r},v,Object(i.createElement)(l.InspectorControls,{key:"controls"},Object(i.createElement)(s.PanelBody,{title:Object(a.__)("Orientation","jetpack")},Object(i.createElement)(s.RadioControl,{selected:j||"horizontal",options:[{label:Object(a.__)("Side by side","jetpack"),value:"horizontal"},{label:Object(a.__)("Above and below","jetpack"),value:"vertical"}],onChange:function(e){b({orientation:e})}}))),Object(i.createElement)("div",{className:O,"data-mode":j||"horizontal"},Object(i.createElement)(s.Placeholder,{label:null},Object(i.createElement)("div",{className:"image-compare__image-before"},Object(i.createElement)(d,{image:{id:h.id,url:h.url,alt:h.alt},placeHolderLabel:Object(a.__)("Image before","jetpack"),onChange:function(e){if("image"===e.media_type||"image"===e.type){var t,n,r=Object(p.b)(e).src,a=e.alt,o=e.id,c=e.media_details,i=null!==(t=null==c?void 0:c.width)&&void 0!==t?t:e.width,l=null!==(n=null==c?void 0:c.height)&&void 0!==n?n:e.height;b({imageBefore:{id:o,url:r||e.url,alt:a,width:i,height:l}})}}})),Object(i.createElement)("div",{className:"image-compare__image-after"},Object(i.createElement)(d,{image:{id:f.id,url:f.url,alt:f.alt},placeHolderLabel:Object(a.__)("Image after","jetpack"),onChange:function(e){if("image"===e.media_type||"image"===e.type){var t,n,r=Object(p.b)(e).src,a=e.alt,o=e.id,c=e.media_details,i=null!==(t=null==c?void 0:c.width)&&void 0!==t?t:e.width,l=null!==(n=null==c?void 0:c.height)&&void 0!==n?n:e.height;b({imageAfter:{id:o,url:r||e.url,alt:a,width:i,height:l}})}}})))),(!l.RichText.isEmpty(g)||o&&h.url&&f.url)&&Object(i.createElement)(l.RichText,{tagName:"figcaption",placeholder:Object(a.__)("Write caption","jetpack"),value:g,onChange:function(e){return b({caption:e})},inlineToolbar:!0}))}),h=Object(i.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)(s.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"})),f=function(e){var t=e.attributes,n=e.className,r=t.imageBefore,a=t.imageAfter,o=t.caption,c=t.orientation;return Object(i.createElement)("figure",{className:n},Object(i.createElement)("div",{className:"juxtapose","data-mode":c||"horizontal"},Object(i.createElement)("img",{id:r.id,src:r.url,alt:r.alt,width:r.width,height:r.height,className:"image-compare__image-before"}),Object(i.createElement)("img",{id:a.id,src:a.url,alt:a.alt,width:a.width,height:a.height,className:"image-compare__image-after"})),!l.RichText.isEmpty(o)&&Object(i.createElement)(l.RichText.Content,{tagName:"figcaption",value:o}))},g=n(194),j=n.n(g),v=n(195),k=n.n(v),y=n(56),_=n(17),O={title:Object(a.__)("Image Compare","jetpack"),description:Object(a.__)("Compare two images with a slider. Works best with images of the same size.","jetpack"),icon:{src:h,foreground:Object(_.a)()},category:Object(y.a)("media","layout"),keywords:[Object(a._x)("juxtapose","block search term","jetpack"),Object(a._x)("photos","block search term","jetpack"),Object(a._x)("pictures","block search term","jetpack"),Object(a._x)("side by side","block search term","jetpack"),Object(a._x)("slider","block search term","jetpack")],attributes:{imageBefore:{type:"object",default:{}},imageAfter:{type:"object",default:{}},caption:{type:"string"},orientation:{type:"string",default:"horizontal"}},example:{attributes:{imageBefore:{id:1,url:k.a,alt:Object(a.__)("Before","jetpack")},imageAfter:{id:2,url:j.a,alt:Object(a.__)("After","jetpack")},caption:Object(a.__)("Example image","jetpack")}},edit:b,save:f};Object(r.a)("image-compare",O)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n(1),o=n(0),c=n(8),i=n.n(c),l=n(4),s=n(34),u=n(10),p=n(5),d=n(2),m=n(64),b=function(e){var t=e.allowedMediaTypes,n=e.attributes.mediaFiles,r=e.onSelectMedia;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,!!n.length&&Object(o.createElement)(d.Toolbar,null,Object(o.createElement)(p.MediaUpload,{title:Object(a.__)("Edit Story","jetpack"),onSelect:r,allowedTypes:t,multiple:!0,value:n.map((function(e){return e.id})),render:function(e){var t=e.open;return Object(o.createElement)(m.a,{label:Object(a.__)("Edit Story","jetpack"),onClick:t})}}))))},h=n(166),f=(n(357),["image","video"]),g=Object(d.withNotices)((function(e){var t=e.attributes,n=e.className,r=e.isSelected,c=e.noticeOperations,d=e.noticeUI,m=e.setAttributes,g=t.mediaFiles,v=Object(u.useDispatch)("core/editor"),k=v.lockPostSaving,y=v.unlockPostSaving,_=function(e){var t=e.map((function(e){return function(e){var t,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"large",o=Object(l.pick)(e,["alt","title","id","link","type","mime","caption","width","height"]);return o.url=Object(l.get)(e,["sizes",a,"url"])||Object(l.get)(e,["media_details","sizes",a,"source_url"])||Object(l.get)(e,["media_details","videopress","original"])||Object(l.get)(e,["media_details","original","url"])||e.url,o.type=e.media_type||e.type,o.mime=e.mime_type||e.mime,o.title=(null===(t=o.title)||void 0===t?void 0:t.rendered)||o.title,o.width=o.width||(null===(n=e.media_details)||void 0===n?void 0:n.width),o.height=o.height||(null===(r=e.media_details)||void 0===r?void 0:r.height),o}(e)})),n=t.filter((function(e){return!Object(s.isBlobURL)(e.url)}));t.length!==n.length?k("storyBlockLock"):y("storyBlockLock"),m({mediaFiles:t})},O=Object(o.createElement)(b,{allowedMediaTypes:f,attributes:t,onSelectMedia:_}),w=!!g.length,E=Object(o.createElement)(p.MediaPlaceholder,{addToGallery:w,isAppender:w,className:n,disableMediaButtons:w&&!r,icon:!w&&Object(o.createElement)(p.BlockIcon,{icon:j.a}),labels:{title:!w&&Object(a.__)("Story","jetpack"),instructions:!w&&Object(a.__)("Drag images and videos, upload new ones, or select files from your library.","jetpack")},onSelect:_,accept:f.map((function(e){return e+"/*"})).join(","),allowedTypes:f,multiple:!0,value:g,notices:w?void 0:d,onError:c.createErrorNotice});return w?Object(o.createElement)(o.Fragment,null,O,d,Object(o.createElement)("div",{className:i()("wp-block-jetpack-story","wp-story",n)},Object(o.createElement)(h.a,{slides:g,disabled:!r,showSlideCount:r,shadowDOM:{enabled:!1},playInFullscreen:!1,tapToPlayPause:!1,playOnNextSlide:!1})),r&&E):Object(o.createElement)(o.Fragment,null,O,E)})),j=n(81),v=n(56),k=n(17),y=n(199),_={mediaFiles:[{alt:"",caption:"",mime:"image/jpg",type:"image",id:22,url:n.n(y).a}]},O={title:Object(a.__)("Story","jetpack"),category:Object(v.a)("media","layout"),keywords:[Object(a._x)("story","block search term","jetpack"),Object(a._x)("image","block search term","jetpack"),Object(a._x)("video","block search term","jetpack"),Object(a._x)("gallery","block search term","jetpack")],description:Object(a.__)("Add an interactive story.","jetpack"),attributes:{settings:{type:"object"},mediaFiles:{type:"array",default:[]}},supports:{html:!1,inserter:"web"!==o.Platform.OS},icon:{src:j.a,foreground:Object(k.a)()},edit:g,save:function(e){var t=e.className;return Object(o.createElement)("div",{className:i()("wp-story",t)})},example:{attributes:_}};Object(r.a)("story",O)},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(1),o=n(2),c=n(18),i=n(52),l=n(10),s=n(120),u=Object(l.withSelect)((function(e){return{areLikesEnabled:(0,e("core/editor").getEditedPostAttribute)("jetpack_likes_enabled")}})),p=Object(l.withDispatch)((function(e){return{editPost:e("core/editor").editPost}})),d={render:Object(c.compose)([u,p])((function(e){var t=e.areLikesEnabled,n=e.editPost;return Object(r.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},Object(r.createElement)(s.a,null,Object(r.createElement)(o.CheckboxControl,{label:Object(a.__)("Show likes.","jetpack"),checked:t,onChange:function(e){n({jetpack_likes_enabled:e})}})))}))},m=n(61);Object(m.a)("likes",d)},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(1),o=n(2),c=n(18),i=n(52),l=n(10),s=n(120),u=Object(l.withSelect)((function(e){return{isSharingEnabled:(0,e("core/editor").getEditedPostAttribute)("jetpack_sharing_enabled")}})),p=Object(l.withDispatch)((function(e){return{editPost:e("core/editor").editPost}})),d={render:Object(c.compose)([u,p])((function(e){var t=e.isSharingEnabled,n=e.editPost;return Object(r.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},Object(r.createElement)(s.a,null,Object(r.createElement)(o.CheckboxControl,{label:Object(a.__)("Show sharing buttons.","jetpack"),checked:t,onChange:function(e){n({jetpack_sharing_enabled:e})}})))}))},m=n(61);Object(m.a)("sharing",d)},function(e,t,n){"use strict";n.r(t);var r=n(12),a=n.n(r),o=n(16),c=n.n(o),i=n(13),l=n.n(i),s=n(14),u=n.n(s),p=n(15),d=n.n(p),m=n(0),b=n(1),h=n(4),f=n(2),g=n(10),j=n(6),v=n.n(j),k=n(3),y=n.n(k),_=(n(343),function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];return n=l()(this,(e=u()(t)).call.apply(e,[this].concat(o))),y()(v()(n),"state",{hasCopied:!1}),y()(v()(n),"onCopy",(function(){return n.setState({hasCopied:!0})})),y()(v()(n),"onFinishCopy",(function(){return n.setState({hasCopied:!1})})),y()(v()(n),"onFocus",(function(e){return e.target.select()})),n}return d()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.link,t=this.state.hasCopied;return e?Object(m.createElement)("div",{className:"jetpack-clipboard-input"},Object(m.createElement)(f.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),Object(m.createElement)(f.ClipboardButton,{isDefault:!0,onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?Object(b.__)("Copied!","jetpack"):Object(b._x)("Copy","verb","jetpack"))):null}}]),t}(m.Component)),O=n(67),w={render:function(){return Object(m.createElement)(C,null)}},E=function(e){function t(){return a()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.shortlink;return e?Object(m.createElement)(O.a,null,Object(m.createElement)(f.PanelBody,{title:Object(b.__)("Shortlink","jetpack"),className:"jetpack-shortlinks__panel"},Object(m.createElement)(_,{link:e}))):null}}]),t}(m.Component),C=Object(g.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{shortlink:Object(h.get)(t,"jetpack_shortlink","")}}))(E),x=n(61);Object(x.a)("shortlinks",w)},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n.n(r),o=n(0),c=n(30),i=n(9),l=n.n(i),s=n(4),u=n(22),p=n.n(u),d=n(1),m=n(28),b=n(11),h=n(10);var f=n(2),g=(n(337),n(52)),j=function(e){if(e.isDeprecation)return e;if("core-embed/twitter"!==e.name&&"core/embed"!==e.name)return e;var t=e.edit;return a()({},e,{edit:Object(f.withNotices)((function(n){var r=n.noticeOperations,a=n.noticeUI,c=n.onReplace,i=n.attributes.url,u=function(e){var t=e.onReplace,n=Object(o.useState)(!1),r=l()(n,2),a=r[0],c=r[1],i=Object(h.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")}));return{isGatheringStorm:a,unleashStorm:function(e,n){if(!Object(s.isEmpty)(e)){var r=e.match(/^https?:\/\/(?:www\.)?twitter\.com\/([^/]+)\/status\/\d+/);if(!Object(s.isEmpty)(r)){var a=r[1];n.removeAllNotices(),c(!0),p()({path:Object(m.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((function(e){(c(!1),Object(s.isArray)(e))?Object(s.isEmpty)(e)?n.createErrorNotice(Object(d.__)("We were unable to get any content from this tweet.","jetpack")):(t(e.map((function(e){switch(e.type){case"paragraph":return Object(b.createBlock)("core/paragraph",{content:e.content});case"gallery":return Object(b.createBlock)("core/gallery",{images:e.images});case"image":return Object(b.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return Object(b.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return Object(b.createBlock)("core/embed",{url:e.url})}}))),Object(s.some)(i,(function(e){return"twitter"===e.service_name&&"@".concat(a)===e.display_name}))||Object(h.dispatch)("core/notices").createWarningNotice(Object(d.__)("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")),Object(h.dispatch)("core/notices").createSuccessNotice(Object(d.__)("Twitter thread successfully imported","jetpack"),{type:"snackbar"})):n.createErrorNotice(Object(d.__)("An error occurred. Please try again later.","jetpack"))})).catch((function(e){c(!1),n.createErrorNotice(e.message)}))}}}}}({onReplace:c}),j=u.isGatheringStorm,v=u.unleashStorm;return"core/embed"===e.name&&"twitter"!==n.attributes.providerNameSlug?Object(o.createElement)(t,n):Object(o.createElement)(o.Fragment,null,a,Object(o.createElement)(g.BlockControls,null,Object(o.createElement)(f.ToolbarGroup,{className:"gathering-tweetstorms__embed-toolbar"},Object(o.createElement)(f.Button,{className:"gathering-tweetstorms__embed-toolbar-button",onClick:function(){return v(i,r)},label:Object(d.__)("Import the entire Twitter thread directly into this post.","jetpack"),showTooltip:!0,disabled:j||!i},Object(d.__)("Unroll","jetpack")),j&&Object(o.createElement)(f.Spinner,null))),Object(o.createElement)(t,n))}))})};Object(c.addFilter)("blocks.registerBlockType","jetpack/gathering-tweetstorms",j);t.default=j},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){n(309),n(326),n(317),n(322),n(311),n(314),n(312),n(319),n(368),n(334),n(327),n(363),n(321),n(365),n(328),n(320),n(329),n(318),n(325),n(361),n(359),n(330),n(332),n(335),n(333),n(323),n(362),n(366),n(367),n(316),n(324),n(360),n(364),n(313),n(310),n(315),e.exports=n(331)}]));