Version Description
- Release date: July 14, 2020
Bug fixes
- Autoloader: avoid PHP warning on sites with an invalid
active_plugins
option. - Backwards Compatibility: Prevent fatal errors on themes relying on a deprecated static method.
- Blocks: show a loading spinner when unrolling Twitter threads on WordPress 5.3.
- General: prevent PHP notices with the Contact Form feature, Sharing feature, and the Latest Instagram Galleries block.
- Sharing: create proper Open Graph Description tag when a post starts with an image.
Download this release
Release Info
Developer | jeherve |
Plugin | Jetpack by WordPress.com |
Version | 8.7.1 |
Comparing to | |
See all releases |
Code changes from version 8.7.0.1 to 8.7.1
_inc/blocks/editor-beta.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-token-list', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-token-list', 'wp-url', 'wp-viewport'), 'version' => '88f235c47c114d25f648ccf41450b00f');
|
_inc/blocks/editor-beta.js
CHANGED
@@ -15,4 +15,4 @@ function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o)
|
|
15 |
/**
|
16 |
* @preserve jed.js https://github.com/SlexAxton/Jed
|
17 |
*/
|
18 |
-
!function(n,r){var a=Array.prototype,o=Object.prototype,i=a.slice,c=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(c.call(e,o)&&t.call(n,e[o],o,e)===s)return},extend:function(e){return this.forEach(i.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 i,c,l,s=t?t+p.context_delimiter+n:n,u=this.options.locale_data,m=u[e],h=(u.messages||this.defaults.locale_data.messages)[""],b=m[""].plural_forms||m[""]["Plural-Forms"]||m[""]["plural-forms"]||h.plural_forms||h["Plural-Forms"]||h["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(b)(a)}if(!m)throw new Error("No domain named `"+e+"` could be found.");return!(i=m[s])||l>i.length?(this.options.missing_key_callback&&this.options.missing_key_callback(s,e),c=[n,r],!0===this.options.debug&&console.log(c[d(b)(a)]),c[d()(a)]):(c=i[l])||(c=[n,r])[d()(a)]}});var h,b,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,i,c,l,s,u,p=1,d=n.length,m="",h=[];for(o=0;o<d;o++)if("string"===(m=e(n[o])))h.push(n[o]);else if("array"===m){if((c=n[o])[2])for(a=r[p],i=0;i<c[2].length;i++){if(!a.hasOwnProperty(c[2][i]))throw f('[sprintf] property "%s" does not exist',c[2][i]);a=a[c[2][i]]}else a=c[1]?r[c[1]]:r[p++];if(/[^s]/.test(c[8])&&"number"!=e(a))throw f("[sprintf] expecting number but found %s",e(a));switch(null==a&&(a=""),c[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=c[7]?a.toExponential(c[7]):a.toExponential();break;case"f":a=c[7]?parseFloat(a).toFixed(c[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&c[7]?a.substring(0,c[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(c[8])&&c[3]&&a>=0?"+"+a:a,s=c[4]?"0"==c[4]?"0":c[4].charAt(1):" ",u=c[6]-String(a).length,l=c[6]?t(s,u):"",h.push(c[5]?a+l:l+a)}return h.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=[],i=n[2],c=[];if(null===(c=/^([a-z_][a-z_\d]*)/i.exec(i)))throw"[sprintf] huh?";for(o.push(c[1]);""!==(i=i.substring(c[0].length));)if(null!==(c=/^\.([a-z_][a-z_\d]*)/i.exec(i)))o.push(c[1]);else{if(null===(c=/^\[(\d+)\]/.exec(i)))throw"[sprintf] huh?";o.push(c[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=(h={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,i){var c=o.length-1;switch(a){case 1:return{type:"GROUP",expr:o[c-1]};case 2:this.$={type:"TERNARY",expr:o[c-4],truthy:o[c-2],falsey:o[c]};break;case 3:this.$={type:"OR",left:o[c-2],right:o[c]};break;case 4:this.$={type:"AND",left:o[c-2],right:o[c]};break;case 5:this.$={type:"LT",left:o[c-2],right:o[c]};break;case 6:this.$={type:"LTE",left:o[c-2],right:o[c]};break;case 7:this.$={type:"GT",left:o[c-2],right:o[c]};break;case 8:this.$={type:"GTE",left:o[c-2],right:o[c]};break;case 9:this.$={type:"NEQ",left:o[c-2],right:o[c]};break;case 10:this.$={type:"EQ",left:o[c-2],right:o[c]};break;case 11:this.$={type:"MOD",left:o[c-2],right:o[c]};break;case 12:this.$={type:"GROUP",expr:o[c-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,i="",c=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,h,b,f,g,j,v,k,_,y={};;){if(h=n[n.length-1],this.defaultActions[h]?b=this.defaultActions[h]:(null==d&&(d=p()),b=o[h]&&o[h][d]),void 0===b||!b.length||!b[0]){if(!s){for(g in k=[],o[h])this.terminals_[g]&&g>2&&k.push("'"+this.terminals_[g]+"'");var O="";O=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+this.terminals_[d]+"'":"Parse error on line "+(c+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,i=this.lexer.yytext,c=this.lexer.yylineno,u=this.lexer.yylloc,d=p()}for(;!(2..toString()in o[h]);){if(0==h)throw new Error(O||"Parsing halted.");_=1,n.length=n.length-2*_,r.length=r.length-_,a.length=a.length-_,h=n[n.length-1]}m=d,d=2,b=o[h=n[n.length-1]]&&o[h][2],s=3}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+h+", token: "+d);switch(b[0]){case 1:n.push(d),r.push(this.lexer.yytext),a.push(this.lexer.yylloc),n.push(b[1]),d=null,m?(d=m,m=null):(l=this.lexer.yyleng,i=this.lexer.yytext,c=this.lexer.yylineno,u=this.lexer.yylloc,s>0&&s--);break;case 2:if(j=this.productions_[b[1]][1],y.$=r[r.length-j],y._$={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(y,i,l,c,this.yy,b[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_[b[1]][0]),r.push(y.$),a.push(y._$),v=o[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},b=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}(),h.lexer=b,h),e.exports&&(t=e.exports=p),t.Jed=p}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(15),a=n.n(r),o=n(24);function i(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 c(e,t){return function(e,t,n){var r=a()(t,2),c=r[0],l=r[1],m=1/c*(n-o.b*(e.childElementCount-1)-l);return function(e,t){var n=t.rawHeight,r=t.rowWidth,a=s(e),c=a.map((function(e){return(n-o.b*(e.childElementCount-1))*p(e)[0]})),l=i(c,r);return a.forEach((function(e,t){var r=c[t],a=l[t];!function(e,t){var n=t.colHeight,r=t.width,a=t.rawWidth,o=i(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],i=a()(t,2);return[r+i[0],o+i[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){var n=1e3,r=6e4,a=36e5,o=24*a;function i(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 c=typeof e;if("string"===c&&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 i=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*a;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return i(e,t,o,"day");if(t>=a)return i(e,t,a,"hour");if(t>=r)return i(e,t,r,"minute");if(t>=n)return i(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){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){"use strict";var r=n(121),a=n(120);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=c,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),c=0,l=t;c<i.length;c++,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],i[c]=s>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,a,o,i,c){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+i+(l+=(s=s+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,c){return t+r+o+c>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,c,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+c>>>0)<c?1:0,e+n+a+i+l+(u+=(p=p+s>>>0)<s?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,c,l,s){return t+r+o+c+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,t,n){"use strict";var r=n(3),a=n.n(r),o=n(8),i=n.n(o),c=n(12),l=n.n(c),s=n(9),u=n.n(s),p=n(10),d=n.n(p),m=n(11),h=n.n(m),b=n(0),f=n(1),g=n(7),j=n.n(g),v=n(17),k=n(2),_=n(6),y=n(4),O=window.getComputedStyle,w=Object(k.withFallbackStyles)((function(e,t){var n,r,a,o,i=t.textButtonColor,c=t.backgroundButtonColor,l=c&&c.color,s=i&&i.color;return!s&&e&&(n=e.querySelector('[contenteditable="true"]')),r=e.querySelector(".wp-block-button__link")?e.querySelector(".wp-block-button__link"):e,e&&(a=O(r).backgroundColor),n&&(o=O(n).color),{fallbackBackgroundColor:l||a,fallbackTextColor:s||o}})),C=function(e){function t(){return i()(this,t),u()(this,d()(t).apply(this,arguments))}return h()(t,e),l()(t,[{key:"componentDidUpdate",value:function(e){if(!Object(y.isEqual)(this.props.textButtonColor,e.textButtonColor)||!Object(y.isEqual)(this.props.backgroundButtonColor,e.backgroundButtonColor)){var t=this.getButtonClasses();this.props.setAttributes({submitButtonClasses:t})}}},{key:"getButtonClasses",value:function(){var e,t=this.props,n=t.textButtonColor,r=t.backgroundButtonColor,o=Object(y.get)(n,"class"),i=Object(y.get)(r,"class");return j()("wp-block-button__link",(e={"has-text-color":n.color},a()(e,o,o),a()(e,"has-background",r.color),a()(e,i,i),e))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.backgroundButtonColor,r=e.textButtonColor,a=e.fallbackBackgroundColor,o=e.fallbackTextColor,i=e.setAttributes,c=e.setBackgroundButtonColor,l=e.setTextButtonColor,s=n.color||a,u=r.color||o,p={backgroundColor:s,color:u},d=this.getButtonClasses();return Object(b.createElement)(b.Fragment,null,Object(b.createElement)("div",{className:"wp-block-button jetpack-submit-button"},Object(b.createElement)(_.RichText,{placeholder:Object(f.__)("Add text…","jetpack"),value:t.submitButtonText,onChange:function(e){return i({submitButtonText:e})},className:d,style:p,keepPlaceholderOnFocus:!0,allowedFormats:[]})),Object(b.createElement)(_.InspectorControls,null,Object(b.createElement)(_.PanelColorSettings,{title:Object(f.__)("Button Color Settings","jetpack"),colorSettings:[{value:s,onChange:c,label:Object(f.__)("Background Color","jetpack")},{value:u,onChange:l,label:Object(f.__)("Text Color","jetpack")}]}),Object(b.createElement)(_.ContrastChecker,{textColor:u,backgroundColor:s,fallbackBackgroundColor:!0,fallbackTextColor:!0})))}}]),t}(b.Component);t.a=Object(v.compose)([Object(_.withColors)({backgroundButtonColor:"background-color"},{textButtonColor:"color"}),w])(C)},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){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){!function(){e.exports=this.wp.tokenList}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(15),a=n.n(r),o=n(37),i=n.n(o),c=n(4);n(160);function l(){return s.apply(this,arguments)}function s(){return(s=i()(regeneratorRuntime.mark((function e(){var t,r,o,i,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]:{},i={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(c.mapValues)(o,(function(e){return function(){e(this)}}))},e.next=6,Promise.all([n.e(25).then(n.t.bind(null,319,7)),n.e(25).then(n.t.bind(null,320,7))]);case 6:return l=e.sent,s=a()(l,1),u=s[0].default,e.abrupt("return",new u(t,Object(c.merge)({},i,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(15),a=n.n(r),o=n(8),i=n.n(o),c=n(12),l=n.n(c),s=n(9),u=n.n(s),p=n(10),d=n.n(p),m=n(5),h=n.n(m),b=n(11),f=n.n(b),g=n(3),j=n.n(g),v=n(0),k=n(1),_=n(4),y=n(2),O=(n(155),function(e){function t(){var e,n;i()(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()(h()(n),"handleClick",(function(){(0,n.props.onClick)(h()(n))})),j()(h()(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,i=[n.coordinates.longitude,n.coordinates.latitude],c=this.marker?this.marker.getElement():document.createElement("div");this.marker?this.marker.setLngLat(i):(c.className="wp-block-jetpack-map-marker",this.marker=new r.Marker(c).setLngLat(i).setOffset([0,-19]).addTo(t),this.marker.getElement().addEventListener("click",o)),c.innerHTML='<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd"><path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="'+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,C=function(e){function t(){var e,n;i()(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()(h()(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);C.defaultProps={unsetActiveMarker:function(){},activeMarker:null,map:null,mapboxgl:null};var E=C;var x=function(e){function t(){var e;return i()(this,t),e=u()(this,d()(t).apply(this,arguments)),j()(h()(e),"onMarkerClick",(function(t){var n=e.props.onMarkerClick;e.setState({activeMarker:t}),n()})),j()(h()(e),"onMapClick",(function(){e.setState({activeMarker:null})})),j()(h()(e),"clearCurrentMarker",(function(){e.setState({activeMarker:null})})),j()(h()(e),"updateActiveMarker",(function(t){var n=e.props.points,r=e.state.activeMarker.props.index,a=n.slice(0);Object(_.assign)(a[r],t),e.props.onSetPoints(a)})),j()(h()(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()(h()(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,i=Math.min(.75*a,o);r.style.height=i+"px"}n.resize(),e.setBoundsByMarkers()})),j()(h()(e),"updateZoom",(function(){var t=e.props.zoom,n=e.state.map;n.setZoom(t),n.updateZoom(t)})),j()(h()(e),"setBoundsByMarkers",(function(){var t=e.props,n=t.admin,r=t.onSetMapCenter,a=t.onSetZoom,o=t.points,i=t.zoom,c=e.state,l=c.map,s=c.activeMarker,u=c.mapboxgl,p=c.zoomControl,d=c.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(h){}}else{if(l.setCenter(m.getCenter()),d){l.setZoom(12),a(12)}else l.setZoom(parseInt(i,10));l.addControl(p),e.setState({boundsSetProgrammatically:!1})}}})),j()(h()(e),"scriptsLoaded",(function(){var t=e.props,n=t.mapCenter,r=t.points;e.setState({loaded:!0}),r.length,e.initMap(n)})),j()(h()(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(_.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,i=this.state,c=i.map,l=i.activeMarker,s=i.mapboxgl,u=this.onMarkerClick,p=this.deleteActiveMarker,d=this.updateActiveMarker,m=Object(_.get)(l,"props.point")||{},h=m.title,b=m.caption,f=v.Children.map(a,(function(e){if("AddPoint"===Object(_.get)(e,"props.tagName"))return e})),g=c&&s&&n.map((function(e,t){return Object(v.createElement)(w,{key:t,point:e,index:t,map:c,mapboxgl:s,markerColor:o,onClick:u})})),j=s&&Object(v.createElement)(E,{activeMarker:l,map:c,mapboxgl:s,unsetActiveMarker:function(){return e.setState({activeMarker:null})}},l&&r&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)(y.TextControl,{label:Object(k.__)("Marker Title","jetpack"),value:h,onChange:function(e){return d({title:e})}}),Object(v.createElement)(y.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:Object(k.__)("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:function(e){return d({caption:e})}}),Object(v.createElement)(y.Button,{onClick:p,className:"wp-block-jetpack-map__delete-btn"},Object(v.createElement)(y.Dashicon,{icon:"trash",size:"15"})," ",Object(k.__)("Delete Marker","jetpack"))),l&&!r&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)("h3",null,h),Object(v.createElement)("p",null,b)));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,i=t.mapStyle,c=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(),i===e.mapStyle&&c===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(24).then(n.t.bind(null,376,7)),n.e(24).then(n.t.bind(null,377,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,i=r.onError,c=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 i("mapbox_error",m.message)}c||u.scrollZoom.disable();var p=new n.FullscreenControl;u.on("error",(function(e){i("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),i=n(73),c=n(66),l=Object(o.createSlotFill)("JetpackLikesAndSharingPanel"),s=l.Fill,u=l.Slot;Object(i.registerPlugin)("jetpack-likes-and-sharing-panel",{render:function(){return Object(r.createElement)(u,null,(function(e){return e.length?Object(r.createElement)(c.a,null,Object(r.createElement)(o.PanelBody,{title:Object(a.__)("Likes and Sharing","jetpack")},e)):null}))}})},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 i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{r||null==c.return||c.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,n){var r=n(69);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(){e.exports=this.wp.notices}()},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){!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}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 i in e)e.hasOwnProperty(i)&&this.append(i,e[i])}},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?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));var r,a=document;if(n&&(void 0===e.location||n!==e.location.href)){(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(p){throw new Error("URL unable to set base "+n+" due to "+p)}}var o=a.createElement("a");if(o.href=t,r&&(a.body.appendChild(o),o.href=o.href),":"===o.protocol||!/:/.test(o.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:o});var i=new e.URLSearchParams(this.search),c=!0,l=!0,s=this;["append","delete","set"].forEach((function(e){var t=i[e];i[e]=function(){t.apply(i,arguments),c&&(l=!1,s.search=i.toString(),l=!0)}})),Object.defineProperty(this,"searchParams",{value:i,enumerable:!0});var u=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==u&&(u=this.search,l&&(c=!1,this.searchParams._fromString(this.search),c=!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?window:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},function(e,t,n){},function(e,t,n){"use strict";e.exports=n(204)},function(e,t,n){"use strict";e.exports.encode=n(205),e.exports.decode=n(206),e.exports.format=n(207),e.exports.parse=n(208)},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|<[?].*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),i=new RegExp("^(?:"+r+"|"+a+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=i},function(e,t,n){"use strict";function r(e,t){var n,r,a,o,i,c=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&c.push(o.token-1));for(;c.length;){for(r=(n=c.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.tokenize=function(e,t){var n,r,a,o,i=e.pos,c=e.src.charCodeAt(i);if(t)return!1;if(126!==c)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(c),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:c,length:0,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){"use strict";function r(e,t){var n,r,a,o,i,c;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],c=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,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=c?"strong_open":"em_open",o.tag=c?"strong":"em",o.nesting=1,o.markup=c?i+i:i,o.content="",(o=e.tokens[a.token]).type=c?"strong_close":"em_close",o.tag=c?"strong":"em",o.nesting=-1,o.markup=c?i+i:i,o.content="",c&&(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){"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){e.exports=JSON.parse('{"production":["business-hours","button","calendly","contact-form","contact-info","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","subscriptions","tiled-gallery","videopress","wordads"],"beta":["amazon"],"experimental":["seo"],"no-post-editor":["business-hours","button","calendly","contact-form","contact-info","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";const r=n(179),a=n(180),o=n(181);function i(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function c(e,t){return t.decode?a(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function s(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){const n=function(e){let t;switch(e.arrayFormat){case"index":return(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(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};case"comma":return(e,t,n)=>{const r="string"==typeof t&&t.split("").indexOf(",")>-1?t.split(","):t;n[e]=r};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",parseNumbers:!1,parseBooleans:!1},t)),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const a of e.split("&")){let[e,i]=o(a.replace(/\+/g," "),"=");i=void 0===i?null:c(i,t),n(c(e,t),i,r)}for(const a of Object.keys(r)){const e=r[a];if("object"==typeof e&&null!==e)for(const n of Object.keys(e))e[n]=u(e[n],t);else r[a]=u(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const 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((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=s,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";const n=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const a=n.length;return void 0===r?n:null===r?[...n,[i(t,e),"[",a,"]"].join("")]:[...n,[i(t,e),"[",i(a,e),"]=",i(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r?n:null===r?[...n,[i(t,e),"[]"].join("")]:[...n,[i(t,e),"[]=",i(r,e)].join("")];case"comma":return t=>(n,r,a)=>null==r||0===r.length?n:0===a?[[i(t,e),"=",i(r,e)].join("")]:[[n,i(r,e)].join(",")];default:return t=>(n,r)=>void 0===r?n:null===r?[...n,i(t,e)]:[...n,[i(t,e),"=",i(r,e)].join("")]}}(t=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},t)),r=Object.keys(e);return!1!==t.sort&&r.sort(t.sort),r.map(r=>{const a=e[r];return void 0===a?"":null===a?i(r,t):Array.isArray(a)?a.reduce(n(r),[]).join("&"):i(r,t)+"="+i(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>({url:l(e).split("?")[0]||"",query:p(s(e),t)})},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,c=(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",c,(t=a,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return i.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"}),i.default.createElement("g",null,i.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(44),i=(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(203)},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(260)(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=c(n(44)),o=c(n(261)),i=c(n(264));function c(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function s(e,t){var n,i,c,u,p,d,m,h,b=[],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],c=d;break}b.push(t[p.value])}else b.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+"`")}(c,e),m=s(e.slice(c+1,u),t),i=a.default.cloneElement(n,{},m),b.push(i),u<e.length-1&&(h=s(e.slice(u+1),t),b=b.concat(h))),1===b.length?b[0]:(b.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,i.default)(t);try{return s(o,n)}catch(c){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+c.message+"`");return t}}},function(e,t,n){var r=n(68),a=n(120);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(87),a=n(265),o=n(266),i=r.rotl32,c=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]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),b=l(i(a,5),s(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=b}this.h[0]=c(this.h[0],a),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],u),this.h[3]=c(this.h[3],d),this.h[4]=c(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/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){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";var r={};n.r(r),n.d(r,"playing",(function(){return E})),n.d(r,"error",(function(){return x}));var a=n(8),o=n.n(a),i=n(12),c=n.n(i),l=n(9),s=n.n(l),u=n(10),p=n.n(u),d=n(5),m=n.n(d),h=n(11),b=n.n(h),f=n(3),g=n.n(f),j=n(0),v=n(7),k=n.n(v),_=n(1),y=n(53),O=n(36),w=n(2),C={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},E=Object(j.createElement)(w.SVG,C,Object(j.createElement)(w.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(j.createElement)(w.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"})),x=Object(j.createElement)(w.SVG,C,Object(j.createElement)(w.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(j.createElement)(w.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"})),S=Object(j.memo)((function(e){var t,n,a=e.isPlaying,o=e.isError,i=e.className;o?(n="error",t=Object(_.__)("Error:","jetpack")):a&&(n="playing",t=Object(_.__)("Playing:","jetpack"));var c=r[n];return c?Object(j.createElement)("span",{className:"".concat(i," ").concat(i,"--").concat(n)},Object(j.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},"".concat(t," ")),c):Object(j.createElement)("span",{className:i})})),A=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(_.__)("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(_.sprintf)(Object(_.__)("%s:","jetpack"),n)," ")),Object(_.__)("Open in a new tab","jetpack"))))})),P=n(59),N=Object(j.memo)((function(e){var t,n=e.track,r=e.isActive,a=e.isPlaying,o=e.isError,i=e.selectTrack,c=e.index,l=e.colors,s=void 0===l?{primary:{},secondary:{}}:l,u=Object(P.a)("color",s.primary.name),p=Object(P.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 h=r?Object(_.__)("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":h,onClick:function(e){e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),i(c))},onKeyDown:function(e){" "===event.key&&(e.preventDefault(),i(c))}},Object(j.createElement)(S,{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)(A,{link:n.link,title:n.title,colors:s}))})),T=Object(j.memo)((function(e){var t=e.playerId,n=e.tracks,r=e.selectTrack,a=e.currentTrack,o=e.playerState,i=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)(N,{key:e.id,index:t,track:e,selectTrack:r,isActive:n,isPlaying:n&&o===O.e,isError:n&&o===O.c,colors:i})})))})),F="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{},B=function(e){function t(){var e,n;o()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=s()(this,(e=p()(t)).call.apply(e,[this].concat(a))),g()(m()(n),"audioRef",(function(e){if(e){var t=document.createElement("audio");t.src=n.props.initialTrackSource,e.appendChild(t),n.mediaElement=new MediaElementPlayer(t,F),n.audio=n.mediaElement.domNode,n.audio.addEventListener("play",n.props.handlePlay),n.audio.addEventListener("pause",n.props.handlePause),n.audio.addEventListener("error",n.props.handleError)}else n.mediaElement.remove()})),g()(m()(n),"play",(function(){n.audio.play().catch((function(){}))})),g()(m()(n),"pause",(function(){n.audio.pause(),Object(y.speak)(Object(_.__)("Paused","jetpack"),"assertive")})),g()(m()(n),"togglePlayPause",(function(){n.audio.paused?n.play():n.pause()})),g()(m()(n),"setAudioSource",(function(e){n.audio.src=e})),n}return b()(t,e),c()(t,[{key:"render",value:function(){return Object(j.createElement)("div",{ref:this.audioRef,className:"jetpack-podcast-player__audio-player"})}}]),t}(j.Component),I=Object(j.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(j.createElement)(w.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"})),M=Object(j.memo)((function(e){var t=e.playerId,n=e.title,r=e.cover,a=e.link,o=e.track,i=e.children,c=e.showCoverArt,l=e.showEpisodeDescription,s=e.colors;return Object(j.createElement)("div",{className:"jetpack-podcast-player__header"},Object(j.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},c&&r&&Object(j.createElement)("div",{className:"jetpack-podcast-player__cover"},Object(j.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:r,alt:""})),!!(n||o&&o.title)&&Object(j.createElement)(L,{playerId:t,title:n,link:a,track:o,colors:s})),!!(l&&o&&o.description)&&Object(j.createElement)("p",{id:"".concat(t,"__track-description"),className:"jetpack-podcast-player__track-description"},o.description),i)})),L=Object(j.memo)((function(e){var t=e.playerId,n=e.title,r=e.link,a=e.track,o=e.colors,i=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",i.primary.classes),style:{color:i.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"},I)),!!(a&&a.title&&n)&&Object(j.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&Object(j.createElement)(R,{title:n,link:r,colors:i}))})),R=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})})),D=M;var z=function(){},U=function(e){function t(){var e,n;o()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=s()(this,(e=p()(t)).call.apply(e,[this].concat(a))),g()(m()(n),"state",{playerState:O.d,currentTrack:0,hasUserInteraction:!1}),g()(m()(n),"playerRef",(function(e){n.player=e,n.play=e?e.play:z,n.pause=e?e.pause:z,n.togglePlayPause=e?e.togglePlayPause:z,n.setAudioSource=e?e.setAudioSource:z})),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.togglePlayPause();-1!==t&&n.pause(),n.loadAndPlay(e)})),g()(m()(n),"loadAndPlay",(function(e){n.recordUserInteraction();var t=n.getTrack(e);t&&(n.setState({currentTrack:e}),n.setAudioSource(t.src),Object(y.speak)("".concat(Object(_.sprintf)(Object(_.__)("Loading: %s","jetpack"),t.title)," ").concat(t.description),"assertive"),n.play())})),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.setState({playerState:O.c}),Object(y.speak)("".concat(Object(_.__)("Error: Episode unavailable - Open in a new tab","jetpack")),"assertive")})),g()(m()(n),"handlePlay",(function(){n.setState({playerState:O.e,hasUserInteraction:!0})})),g()(m()(n),"handlePause",(function(){n.state.playerState!==O.c&&n.setState({playerState:O.d})})),g()(m()(n),"play",z),g()(m()(n),"pause",z),g()(m()(n),"togglePlayPause",z),g()(m()(n),"setAudioSource",z),n}return b()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.playerId,n=e.title,r=e.link,a=e.cover,o=e.tracks,i=e.attributes,c=i.itemsToShow,l=i.primaryColor,s=i.customPrimaryColor,u=i.hexPrimaryColor,p=i.secondaryColor,d=i.customSecondaryColor,m=i.hexSecondaryColor,h=i.backgroundColor,b=i.customBackgroundColor,f=i.hexBackgroundColor,g=i.showCoverArt,v=i.showEpisodeDescription,y=this.state,O=y.playerState,w=y.currentTrack,C=o.slice(0,c),E=this.getTrack(w),x=Object(P.b)({primaryColor:l,customPrimaryColor:s,secondaryColor:p,customSecondaryColor:d,backgroundColor:h,customBackgroundColor:b}),S={color:d,backgroundColor:b,"--jetpack-podcast-player-primary":u,"--jetpack-podcast-player-secondary":m,"--jetpack-podcast-player-background":f},A=k()("jetpack-podcast-player",O,x.secondary.classes,x.background.classes);return Object(j.createElement)("section",{className:A,style:S,"aria-labelledby":n||E&&E.title?"".concat(t,"__title"):void 0,"aria-describedby":E&&E.description?"".concat(t,"__track-description"):void 0,"data-jetpack-iframe-ignore":!0},Object(j.createElement)(D,{playerId:t,title:n,link:r,cover:a,track:this.getTrack(w),showCoverArt:g,showEpisodeDescription:v,colors:x},Object(j.createElement)(B,{initialTrackSource:this.getTrack(0).src,handlePlay:this.handlePlay,handlePause:this.handlePause,handleError:this.handleError,ref:this.playerRef})),Object(j.createElement)("h4",{id:"jetpack-podcast-player__tracklist-title--".concat(t),className:"jetpack-podcast-player--visually-hidden"},Object(_.sprintf)(Object(_.__)("Playlist: %s","jetpack"),n)),Object(j.createElement)("p",{id:"jetpack-podcast-player__tracklist-description--".concat(t),className:"jetpack-podcast-player--visually-hidden"},Object(_.__)("Select an episode to play it in the audio player.","jetpack")),C.length>1&&Object(j.createElement)(T,{playerId:t,playerState:O,currentTrack:w,tracks:C,selectTrack:this.selectTrack,colors:x}))}}]),t}(j.Component);U.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeDescription:!0},tracks:[]};var H,q;t.a=(H=U,q=function(e){function t(){var e,n;o()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=s()(this,(e=p()(t)).call.apply(e,[this].concat(a))),g()(m()(n),"state",{didError:!1,isIE11AudioIssue:!1}),g()(m()(n),"componentDidCatch",(function(e,t){n.props.onError(e,t)})),n}return b()(t,e),c()(t,[{key:"render",value:function(){var e=this.state,t=e.didError,n=e.isIE11AudioIssue;return t?Object(j.createElement)("section",{className:"jetpack-podcast-player"},Object(j.createElement)("p",{className:"jetpack-podcast-player__error"},n?Object(_.__)('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(_.__)("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack"))):Object(j.createElement)(H,this.props)}}]),t}(j.Component),g()(q,"getDerivedStateFromError",(function(e){return{didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}})),q.defaultProps={onError:function(){}},q)},function(e,t,n){var r=n(20);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 a.colors[Math.abs(t)%a.colors.length]}function a(e){var n;function r(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];if(r.enabled){var i=r,c=Number(new Date),l=c-(n||c);i.diff=l,i.prev=n,i.curr=c,n=c,t[0]=a.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 r=a.formatters[n];if("function"==typeof r){var o=t[s];e=r.call(i,o),t.splice(s,1),s--}return e})),a.formatArgs.call(i,t);var u=i.log||a.log;u.apply(i,t)}}return r.namespace=e,r.enabled=a.enabled(e),r.useColors=a.useColors(),r.color=t(e),r.destroy=o,r.extend=i,"function"==typeof a.init&&a.init(r),a.instances.push(r),r}function o(){var e=a.instances.indexOf(this);return-1!==e&&(a.instances.splice(e,1),!0)}function i(e,t){var n=a(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function c(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return a.debug=a,a.default=a,a.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},a.disable=function(){var e=[].concat(r(a.names.map(c)),r(a.skips.map(c).map((function(e){return"-"+e})))).join(",");return a.enable(""),e},a.enable=function(e){var t;a.save(e),a.names=[],a.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?a.skips.push(new RegExp("^"+e.substr(1)+"$")):a.names.push(new RegExp("^"+e+"$")));for(t=0;t<a.instances.length;t++){var o=a.instances[t];o.enabled=a.enabled(o.namespace)}},a.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=a.skips.length;t<n;t++)if(a.skips[t].test(e))return!1;for(t=0,n=a.names.length;t<n;t++)if(a.names[t].test(e))return!0;return!1},a.humanize=n(83),Object.keys(e).forEach((function(t){a[t]=e[t]})),a.instances=[],a.names=[],a.skips=[],a.formatters={},a.selectColor=t,a.enable(a.load()),a}},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){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,i=n[r.type],c=t(r);if(i)for(a=0;a<i.length;a++)(o=i[a](r,e))&&e.dispatch(o);return c}}}).effects=n,t}},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 i,c=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 h(e){throw RangeError(p[e])}function b(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+b((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 b(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 _(e){var t,n,r,a,o,i,l,s,u,p,m,b=[],f=e.length,g=0,v=128,_=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&h("not-basic"),b.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<f;){for(o=g,i=1,l=36;a>=f&&h("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((c-g)/i))&&h("overflow"),g+=s*i,!(s<(u=l<=_?1:l>=_+26?26:l-_));l+=36)i>d(c/(p=36-u))&&h("overflow"),i*=p;_=k(g-o,t=b.length+1,0==o),d(g/t)>c-v&&h("overflow"),v+=d(g/t),g%=t,b.splice(g++,0,v)}return j(b)}function y(e){var t,n,r,a,o,i,l,s,u,p,b,f,j,_,y,O=[];for(f=(e=g(e)).length,t=128,n=0,o=72,i=0;i<f;++i)(b=e[i])<128&&O.push(m(b));for(r=a=O.length,a&&O.push("-");r<f;){for(l=c,i=0;i<f;++i)(b=e[i])>=t&&b<l&&(l=b);for(l-t>d((c-n)/(j=r+1))&&h("overflow"),n+=(l-t)*j,t=l,i=0;i<f;++i)if((b=e[i])<t&&++n>c&&h("overflow"),b==t){for(s=n,u=36;!(s<(p=u<=o?1:u>=o+26?26:u-o));u+=36)y=s-p,_=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("")}i={version:"1.3.2",ucs2:{decode:g,encode:j},decode:_,encode:y,toASCII:function(e){return f(e,(function(e){return s.test(e)?"xn--"+y(e):e}))},toUnicode:function(e){return f(e,(function(e){return l.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()}).call(this,n(167)(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(170),t.encode=t.stringify=n(171)},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 i=/\+/g;e=e.split(t);var c=1e3;a&&"number"==typeof a.maxKeys&&(c=a.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var s=0;s<l;++s){var u,p,d,m,h=e[s].replace(i,"%20"),b=h.indexOf(n);b>=0?(u=h.substr(0,b),p=h.substr(b+1)):(u=h,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=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),a=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(a){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function i(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var n={"%FE%FF":"��","%FF%FE":"��"},r=a.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch(t){var o=i(r[0]);o!==r[0]&&(n[r[0]]=o)}r=a.exec(e)}n["%C2"]="�";for(var c=Object.keys(n),l=0;l<c.length;l++){var s=c[l];e=e.replace(new RegExp(s,"g"),n[s])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},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){},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,i;if(void 0!==r.crc&&n&&e||(r.crc=-1,e)){for(a=r.crc,o=0,i=e.length;o<i;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),i=Math.pow(2,52),c=2*i,l=Math.random;function s(e){var t,n=e.length,r=this,a=0,o=r.i=r.j=0,i=r.S=[];for(n||(e=[n++]);a<256;)i[a]=a++;for(a=0;a<256;a++)i[a]=i[o=255&o+e[a%n]+(t=i[a])],i[o]=t;(r.g=function(e){for(var t,n=0,a=r.i,o=r.j,i=r.S;e--;)t=i[a=255&a+1],n=256*n+i[255&(i[a]=i[o=255&o+t])+(i[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=[],h=(p(u(a?[t,m(r)]:0 in arguments?t:d(),3),l),new s(l));return p(m(h.S),r),function(){for(var e=h.g(6),t=o,n=0;e<i;)e=256*(e+n),t*=256,n=h.g(1);for(;e>=c;)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(194)(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 i(){if(i.enabled){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=i,c=Number(new Date),l=c-(n||c);o.diff=l,o.prev=n,o.curr=c,n=c,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 i=t[s];e=a.call(o,i),t.splice(s,1),s--}return e})),r.formatArgs.call(o,t);var u=o.log||r.log;u.apply(o,t)}}return i.namespace=e,i.enabled=r.enabled(e),i.useColors=r.useColors(),i.color=t(e),i.destroy=a,i.extend=o,"function"==typeof r.init&&r.init(i),r.instances.push(i),i}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(83),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(58),a=n.n(r);n(196);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},i=e.offsetWidth;n=(((r=t).pageX?r.pageX:r.touches?r.touches[0].pageX:r.clientX+document.body.scrollLeft+document.documentElement.scrollLeft)-o.left)/i*100}return n}function i(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},i=e.offsetHeight;n=(((r=t).pageY?r.pageY:r.touches?r.touches[0].pageY:r.clientY+document.body.scrollTop+document.documentElement.scrollTop)-o.top)/i*100}return n}var c={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 c?"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?i(this.slider,e):o(this.slider,e)).toFixed(2)+"%";var c=parseFloat(a),l=100-c+"%";c>0&&c<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){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.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 i={};a.getAttribute("data-animate")&&(i.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(i.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(i.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(i.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(i.mode=a.getAttribute("data-makeresponsive"));var c="juxtapose-"+r;n(t,c);var l="."+c;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}],i)}},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(25),a=n(211),o=n(215),i=n(216),c=n(224),l=n(238),s=n(251),u=n(111),p=n(253),d={default:n(254),zero:n(255),commonmark:n(256)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function b(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.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))}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 c,this.core=new i,this.renderer=new o,this.linkify=new s,this.validateLink=b,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":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","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":"IJ","ijlig":"ij","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":"ʼn","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,i,c,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,i=e.length;o<i;o++)if(c=e.charCodeAt(o),n&&37===c&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(c<128)u+=s[c];else if(c>=55296&&c<=57343){if(c>=55296&&c<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}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,i,c,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),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(s+=(l=a<<12&61440|o<<6&4032|63&i)<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),i=parseInt(e.slice(t+7,t+9),16),c=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&c))?((l=a<<18&1835008|o<<12&258048|i<<6&4032|63&c)<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]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),s=["%","/","?",";","#"].concat(l),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},h={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,c,l,b=e;if(b=b.trim(),!t&&1===e.split("#").length){var f=i.exec(b);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var g=a.exec(b);if(g&&(o=(g=g[0]).toLowerCase(),this.protocol=g,b=b.substr(g.length)),(t||g||b.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(l="//"===b.substr(0,2))||g&&m[g]||(b=b.substr(2),this.slashes=!0)),!m[g]&&(l||g&&!h[g])){var j,v,k=-1;for(n=0;n<u.length;n++)-1!==(c=b.indexOf(u[n]))&&(-1===k||c<k)&&(k=c);for(-1!==(v=-1===k?b.lastIndexOf("@"):b.lastIndexOf("@",k))&&(j=b.slice(0,v),b=b.slice(v+1),this.auth=j),k=-1,n=0;n<s.length;n++)-1!==(c=b.indexOf(s[n]))&&(-1===k||c<k)&&(k=c);-1===k&&(k=b.length),":"===b[k-1]&&k--;var _=b.slice(0,k);b=b.slice(k),this.parseHost(_),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y){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 C="",E=0,x=w.length;E<x;E++)w.charCodeAt(E)>127?C+="x":C+=w[E];if(!C.match(p)){var S=O.slice(0,n),A=O.slice(n+1),P=w.match(d);P&&(S.push(P[1]),A.unshift(P[2])),A.length&&(b=A.join(".")+b),this.hostname=S.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=b.indexOf("#");-1!==N&&(this.hash=b.substr(N),b=b.slice(0,N));var T=b.indexOf("?");return-1!==T&&(this.search=b.substr(T),b=b.slice(0,T)),b&&(this.pathname=b),h[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(112),t.Cc=n(113),t.Cf=n(210),t.P=n(84),t.Z=n(114)},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(212),t.parseLinkDestination=n(213),t.parseLinkTitle=n(214)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,a,o,i,c=-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(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=s,-1}return a&&(c=e.pos),e.pos=s,c}},function(e,t,n){"use strict";var r=n(25).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,c={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return c;if(62===a)return c.pos=t+1,c.str=r(e.slice(i+1,t)),c.ok=!0,c;92===a&&t+1<n?t+=2:t++}return c}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n)t+=2;else{if(40===a&&o++,41===a){if(0===o)break;o--}t++}return i===t?c:0!==o?c:(c.str=r(e.slice(i,t)),c.lines=0,c.pos=t,c.ok=!0,c)}},function(e,t,n){"use strict";var r=n(25).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,c=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(c+1,t)),l.ok=!0,l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},function(e,t,n){"use strict";var r=n(25).assign,a=n(25).unescapeAll,o=n(25).escapeHtml,i={};function c(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var c,l,s,u,p=e[t],d=p.info?a(p.info).trim():"",m="";return d&&(m=d.split(/\s+/g)[0]),0===(c=n.highlight&&n.highlight(p.content,m)||o(p.content)).indexOf("<pre")?c+"\n":d?(l=p.attrIndex("class"),s=p.attrs?p.attrs.slice():[],l<0?s.push(["class",n.langPrefix+m]):s[l][1]+=" "+n.langPrefix+m,u={attrs:s},"<pre><code"+i.renderAttrs(u)+">"+c+"</code></pre>\n"):"<pre><code"+i.renderAttrs(p)+">"+c+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},c.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},c.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden?o=!1:-1===r.nesting&&r.tag===i.tag&&(o=!1))),a+=o?">\n":">")},c.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,c=e.length;i<c;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},c.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},c.prototype.render=function(e,t,n){var r,a,o,i="",c=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==c[o]?i+=c[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=c},function(e,t,n){"use strict";var r=n(85),a=[["normalize",n(217)],["block",n(218)],["inline",n(219)],["linkify",n(220)],["replacements",n(221)],["smartquotes",n(222)]];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(223),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(25).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_=e.tokens;if(e.md.options.linkify)for(n=0,o=_.length;n<o;n++)if("inline"===_[n].type&&e.md.linkify.pretest(_[n].content))for(b=0,t=(i=_[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(k=l.content,/^<a[>\s]/i.test(k)&&b>0&&b--,a(l.content)&&b++),!(b>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,v=e.md.linkify.match(p),s=[],h=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&&((c=new e.Token("text","",0)).content=p.slice(m,d),c.level=h,s.push(c)),(c=new e.Token("link_open","a",1)).attrs=[["href",g]],c.level=h++,c.markup="linkify",c.info="auto",s.push(c),(c=new e.Token("text","",0)).content=j,c.level=h,s.push(c),(c=new e.Token("link_close","a",-1)).level=--h,c.markup="linkify",c.info="auto",s.push(c),m=v[u].lastIndex);m<p.length&&((c=new e.Token("text","",0)).content=p.slice(m),c.level=h,s.push(c)),_[n].children=i=r(i,t,s)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},function(e,t,n){"use strict";var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,o=/\((c|tm|r|p)\)/gi,i={c:"©",r:"®",p:"§",tm:"™"};function c(e,t){return i[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,c)),"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—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"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(25).isWhiteSpace,a=n(25).isPunctChar,o=n(25).isMdAsciiPunct,i=/['"]/,c=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function s(e,t){var n,i,s,u,p,d,m,h,b,f,g,j,v,k,_,y,O,w,C,E,x;for(C=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,O=C.length-1;O>=0&&!(C[O].level<=m);O--);if(C.length=O+1,"text"===i.type){p=0,d=(s=i.content).length;e:for(;p<d&&(c.lastIndex=p,u=c.exec(s));){if(_=y=!0,p=u.index+1,w="'"===u[0],b=32,u.index-1>=0)b=s.charCodeAt(u.index-1);else for(O=n-1;O>=0&&("softbreak"!==e[O].type&&"hardbreak"!==e[O].type);O--)if("text"===e[O].type){b=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("text"===e[O].type){f=e[O].content.charCodeAt(0);break}if(g=o(b)||a(String.fromCharCode(b)),j=o(f)||a(String.fromCharCode(f)),v=r(b),(k=r(f))?_=!1:j&&(v||g||(_=!1)),v?y=!1:g&&(k||j||(y=!1)),34===f&&'"'===u[0]&&b>=48&&b<=57&&(y=_=!1),_&&y&&(_=!1,y=j),_||y){if(y)for(O=C.length-1;O>=0&&(h=C[O],!(C[O].level<m));O--)if(h.single===w&&C[O].level===m){h=C[O],w?(E=t.md.options.quotes[2],x=t.md.options.quotes[3]):(E=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,E),p+=x.length-1,h.token===n&&(p+=E.length-1),d=(s=i.content).length,C.length=O;continue e}_?C.push({token:n,pos:u.index,single:w,level:m}):y&&w&&(i.content=l(i.content,u.index,"’"))}else w&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&s(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(86);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(85),a=[["table",n(225),["paragraph","reference"]],["code",n(226)],["fence",n(227),["paragraph","reference","blockquote","list"]],["blockquote",n(228),["paragraph","reference","blockquote","list"]],["hr",n(229),["paragraph","reference","blockquote","list"]],["list",n(230),["paragraph","reference","blockquote"]],["reference",n(231)],["heading",n(232),["paragraph","reference","blockquote"]],["lheading",n(233)],["html_block",n(234),["paragraph","reference","blockquote"]],["paragraph",n(236)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,c=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),(i=e.line)<n&&e.isEmpty(i)&&(c=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(237),e.exports=o},function(e,t,n){"use strict";var r=n(25).isSpace;function a(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=0,i=0,c=!1,l=0;for(t=e.charCodeAt(r);r<a;)96===t?c?(c=!1,l=r):o%2==0&&(c=!0,l=r):124!==t||o%2!=0||c||(n.push(e.substring(i,r)),i=r+1),92===t?o++:o=0,++r===a&&c&&(c=!1,r=l+1),t=e.charCodeAt(r);return n.push(e.substring(i)),n}e.exports=function(e,t,n,i){var c,l,s,u,p,d,m,h,b,f,g,j;if(t+2>n)return!1;if(p=t+1,e.sCount[p]<e.blkIndent)return!1;if(e.sCount[p]-e.blkIndent>=4)return!1;if((s=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(c=e.src.charCodeAt(s++))&&45!==c&&58!==c)return!1;for(;s<e.eMarks[p];){if(124!==(c=e.src.charCodeAt(s))&&45!==c&&58!==c&&!r(c))return!1;s++}for(d=(l=a(e,t+1)).split("|"),b=[],u=0;u<d.length;u++){if(!(f=d[u].trim())){if(0===u||u===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(f))return!1;58===f.charCodeAt(f.length-1)?b.push(58===f.charCodeAt(0)?"center":"right"):58===f.charCodeAt(0)?b.push("left"):b.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=(d=o(l.replace(/^\||\|$/g,""))).length)>b.length)return!1;if(i)return!0;for((h=e.push("table_open","table",1)).map=g=[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<d.length;u++)(h=e.push("th_open","th",1)).map=[t,t+1],b[u]&&(h.attrs=[["style","text-align:"+b[u]]]),(h=e.push("inline","",0)).content=d[u].trim(),h.map=[t,t+1],h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),(h=e.push("tbody_open","tbody",1)).map=j=[t+2,0],p=t+2;p<n&&!(e.sCount[p]<e.blkIndent)&&-1!==(l=a(e,p).trim()).indexOf("|")&&!(e.sCount[p]-e.blkIndent>=4);p++){for(d=o(l.replace(/^\||\|$/g,"")),h=e.push("tr_open","tr",1),u=0;u<m;u++)h=e.push("td_open","td",1),b[u]&&(h.attrs=[["style","text-align:"+b[u]]]),(h=e.push("inline","",0)).content=d[u]?d[u].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return h=e.push("tbody_close","tbody",-1),h=e.push("table_close","table",-1),g[1]=j[1]=p,e.line=p,!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,i,c,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),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(c=t;!(++c>=n)&&!((d=l=e.bMarks[c]+e.tShift[c])<(m=e.eMarks[c])&&e.sCount[c]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[c]-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=c+(p?1:0),(s=e.push("fence","code",0)).info=i,s.content=e.getLines(t+1,c,o,!0),s.markup=u,s.map=[t,e.line],!0}},function(e,t,n){"use strict";var r=n(25).isSpace;e.exports=function(e,t,n,a){var o,i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_,y,O,w,C=e.lineMax,E=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(E++))return!1;if(a)return!0;for(l=m=e.sCount[t]+E-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(E)?(E++,l++,m++,o=!1,k=!0):9===e.src.charCodeAt(E)?(k=!0,(e.bsCount[t]+m)%4==3?(E++,l++,m++,o=!1):o=!0):k=!1,h=[e.bMarks[t]],e.bMarks[t]=E;E<x&&(i=e.src.charCodeAt(E),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,E++;for(b=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(k?1:0),u=E>=x,j=[e.sCount[t]],e.sCount[t]=m-l,v=[e.tShift[t]],e.tShift[t]=E-e.bMarks[t],y=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",w=!1,d=t+1;d<n&&(e.sCount[d]<e.blkIndent&&(w=!0),!((E=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(E++)||w){if(u)break;for(_=!1,c=0,s=y.length;c<s;c++)if(y[c](e,d,n,!0)){_=!0;break}if(_){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),b.push(e.bsCount[d]),v.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),b.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]+E-(e.bMarks[d]+e.tShift[d]),32===e.src.charCodeAt(E)?(E++,l++,m++,o=!1,k=!0):9===e.src.charCodeAt(E)?(k=!0,(e.bsCount[d]+m)%4==3?(E++,l++,m++,o=!1):o=!0):k=!1,h.push(e.bMarks[d]),e.bMarks[d]=E;E<x&&(i=e.src.charCodeAt(E),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,E++;u=E>=x,b.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]=E-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=C,e.parentType=g,p[1]=e.line,c=0;c<v.length;c++)e.bMarks[c+t]=h[c],e.tShift[c+t]=v[c],e.sCount[c+t]=j[c],e.bsCount[c+t]=b[c];return e.blkIndent=f,!0}},function(e,t,n){"use strict";var r=n(25).isSpace;e.exports=function(e,t,n,a){var o,i,c,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(i=1;s<u;){if((c=e.src.charCodeAt(s++))!==o&&!r(c))return!1;c===o&&i++}return!(i<3)&&(!!a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o)),!0))}},function(e,t,n){"use strict";var r=n(25).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n?-1:a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_,y,O,w,C,E,x,S,A,P,N,T,F,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,P=e.bMarks[t]+e.tShift[t],j=Number(e.src.substr(P,S-P-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?(F=e.push("ordered_list_open","ol",1),1!==j&&(F.attrs=[["start",j]])):F=e.push("bullet_list_open","ul",1),F.map=b=[t,0],F.markup=String.fromCharCode(g),k=t,A=!1,T=e.md.block.ruler.getRules("list"),O=e.parentType,e.parentType="list";k<n;){for(x=S,v=e.eMarks[k],p=_=e.sCount[k]+S-(e.bMarks[t]+e.tShift[t]);x<v;){if(9===(i=e.src.charCodeAt(x)))_+=4-(_+e.bsCount[k])%4;else{if(32!==i)break;_++}x++}if((u=(c=x)>=v?1:_-p)>4&&(u=1),s=p+u,(F=e.push("list_item_open","li",1)).markup=String.fromCharCode(g),F.map=m=[t,0],E=e.tight,C=e.tShift[t],w=e.sCount[t],y=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=c-e.bMarks[t],e.sCount[t]=_,c>=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=y,e.tShift[t]=C,e.sCount[t]=w,e.tight=E,(F=e.push("list_item_close","li",-1)).markup=String.fromCharCode(g),k=t=e.line,m[1]=k,c=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,h=T.length;l<h;l++)if(T[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(F=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(g),b[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(25).normalizeReference,a=n(25).isSpace;e.exports=function(e,t,n,o){var i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_,y=0,O=e.bMarks[t]+e.tShift[t],w=e.eMarks[t],C=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"),b=e.parentType,e.parentType="reference";C<s&&!e.isEmpty(C);C++)if(!(e.sCount[C]-e.blkIndent>3||e.sCount[C]<0)){for(v=!1,p=0,d=k.length;p<d;p++)if(k[p](e,C,s,!0)){v=!0;break}if(v)break}for(w=(j=e.getLines(t,C,e.blkIndent,!1).trim()).length,O=1;O<w;O++){if(91===(i=j.charCodeAt(O)))return!1;if(93===i){h=O;break}10===i?y++:92===i&&++O<w&&10===j.charCodeAt(O)&&y++}if(h<0||58!==j.charCodeAt(h+1))return!1;for(O=h+2;O<w;O++)if(10===(i=j.charCodeAt(O)))y++;else if(!a(i))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(c=O=f.pos,l=y+=f.lines,g=O;O<w;O++)if(10===(i=j.charCodeAt(O)))y++;else if(!a(i))break;for(f=e.md.helpers.parseLinkTitle(j,O,w),O<w&&g!==O&&f.ok?(_=f.str,O=f.pos,y+=f.lines):(_="",O=c,y=l);O<w&&(i=j.charCodeAt(O),a(i));)O++;if(O<w&&10!==j.charCodeAt(O)&&_)for(_="",O=c,y=l;O<w&&(i=j.charCodeAt(O),a(i));)O++;return!(O<w&&10!==j.charCodeAt(O))&&(!!(m=r(j.slice(1,h)))&&(!!o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:_,href:u}),e.parentType=b,e.line=t+y+1,!0)))}},function(e,t,n){"use strict";var r=n(25).isSpace;e.exports=function(e,t,n,a){var o,i,c,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(i=1,o=e.src.charCodeAt(++s);35===o&&s<u&&i<=6;)i++,o=e.src.charCodeAt(++s);return!(i>6||s<u&&!r(o))&&(!!a||(u=e.skipSpacesBack(u,s),(c=e.skipCharsBack(u,35,s))>s&&r(e.src.charCodeAt(c-1))&&(u=c),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(s,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i),!0))}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,a,o,i,c,l,s,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(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,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(c=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),c.map=[t,e.line],(c=e.push("inline","",0)).content=r,c.map=[t,e.line-1],c.children=[],(c=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(235),a=n(115).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,i,c,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(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(s=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(s,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(c=e.push("html_block","",0)).map=[t,i],c.content=e.getLines(t,i,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","meta","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,i,c,l=t+1,s=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(c=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,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=c,!0}},function(e,t,n){"use strict";var r=n(86),a=n(25).isSpace;function o(e,t,n,r){var o,i,c,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,c=l=u=p=0,s=(i=this.src).length;l<s;l++){if(o=i.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(c),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,c=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,c,l,s,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],s=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<s&&i<n;){if(c=this.src.charCodeAt(l),a(c))9===c?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,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(85),a=[["text",n(239)],["newline",n(240)],["escape",n(241)],["backticks",n(242)],["strikethrough",n(116).tokenize],["emphasis",n(117).tokenize],["link",n(243)],["image",n(244)],["autolink",n(245)],["html_inline",n(246)],["entity",n(247)]],o=[["balance_pairs",n(248)],["strikethrough",n(116).postProcess],["emphasis",n(117).postProcess],["text_collapse",n(249)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,c=e.cache;if(void 0===c[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,c[r]=e.pos}else e.pos=c[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,c=new this.State(e,t,n,r);for(this.tokenize(c),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](c)},i.prototype.State=n(250),e.exports=i},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(25).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(25).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,a,o,i,c,l=e.pos;if(96!==e.src.charCodeAt(l))return!1;for(n=l,l++,r=e.posMax;l<r&&96===e.src.charCodeAt(l);)l++;for(a=e.src.slice(n,l),o=i=l;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;i<r&&96===e.src.charCodeAt(i);)i++;if(i-o===a.length)return t||((c=e.push("code_inline","code",0)).markup=a,c.content=e.src.slice(l,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=i,!0}return t||(e.pending+=a),e.pos+=a.length,!0}},function(e,t,n){"use strict";var r=n(25).normalizeReference,a=n(25).isSpace;e.exports=function(e,t){var n,o,i,c,l,s,u,p,d,m="",h=e.pos,b=e.posMax,f=e.pos,g=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(c=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((s=c+1)<b&&40===e.src.charCodeAt(s)){for(g=!1,s++;s<b&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);if(s>=b)return!1;for(f=s,(u=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok&&(m=e.md.normalizeLink(u.str),e.md.validateLink(m)?s=u.pos:m=""),f=s;s<b&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);if(u=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<b&&f!==s&&u.ok)for(d=u.str,s=u.pos;s<b&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);else d="";(s>=b||41!==e.src.charCodeAt(s))&&(g=!0),s++}if(g){if(void 0===e.env.references)return!1;if(s<b&&91===e.src.charCodeAt(s)?(f=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?i=e.src.slice(f,s++):s=c+1):s=c+1,i||(i=e.src.slice(l,c)),!(p=e.env.references[r(i)]))return e.pos=h,!1;m=p.href,d=p.title}return t||(e.pos=l,e.posMax=c,e.push("link_open","a",1).attrs=n=[["href",m]],d&&n.push(["title",d]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=s,e.posMax=b,!0}},function(e,t,n){"use strict";var r=n(25).normalizeReference,a=n(25).isSpace;e.exports=function(e,t){var n,o,i,c,l,s,u,p,d,m,h,b,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?c=e.src.slice(f,u++):u=l+1):u=l+1,c||(c=e.src.slice(s,l)),!(p=e.env.references[r(c)]))return e.pos=j,!1;g=p.href,m=p.title}return t||(i=e.src.slice(s,l),e.md.inline.parse(i,e.md,e.env,b=[]),(h=e.push("image","img",0)).attrs=n=[["src",g],["alt",""]],h.children=b,h.content=i,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,i,c,l,s,u=e.pos;return 60===e.src.charCodeAt(u)&&(!((n=e.src.slice(u)).indexOf(">")<0)&&(a.test(n)?(c=(o=n.match(a))[0].slice(1,-1),l=e.md.normalizeLink(c),!!e.md.validateLink(l)&&(t||((s=e.push("link_open","a",1)).attrs=[["href",l]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(c),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=o[0].length,!0)):!!r.test(n)&&(c=(i=n.match(r))[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+c),!!e.md.validateLink(l)&&(t||((s=e.push("link_open","a",1)).attrs=[["href",l]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(c),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=i[0].length,!0))))}},function(e,t,n){"use strict";var r=n(115).HTML_TAG_RE;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},function(e,t,n){"use strict";var r=n(110),a=n(25).has,o=n(25).isValidEntityCode,i=n(25).fromCodePoint,c=/^&#((?: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(c))return t||(n="x"===s[1][0].toLowerCase()?parseInt(s[1].slice(1),16):parseInt(s[1],10),e.pending+=o(n)?i(n):i(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,i,c,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]),i=u[a.marker][a.length%3],c=-1,r=n-a.jump-1;r>i;r-=o.jump+1)if((o=t[r]).marker===a.marker&&(-1===c&&(c=r),o.open&&o.end<0&&o.level===a.level&&(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,c=-1;break}-1!==c&&(u[a.marker][(a.length||0)%3]=c)}}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(86),a=n(25).isWhiteSpace,o=n(25).isPunctChar,i=n(25).isMdAsciiPunct;function c(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=[]}c.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},c.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},c.prototype.scanDelims=function(e,t){var n,r,c,l,s,u,p,d,m,h=e,b=!0,f=!0,g=this.posMax,j=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<g&&this.src.charCodeAt(h)===j;)h++;return c=h-e,r=h<g?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?b=!1:m&&(u||p||(b=!1)),u?f=!1:p&&(d||m||(f=!1)),t?(l=b,s=f):(l=b&&(!f||p),s=f&&(!b||m)),{can_open:l,can_close:s,length:c}},c.prototype.Token=r,e.exports=c},function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var c={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]?0: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(252)(e.__opts__),r=e.__tlds__.slice();function c(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(c(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(c(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(c(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(c(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(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||c.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},c,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,i,c,l;if(this.re.schema_test.test(e))for((c=this.re.schema_search).lastIndex=0;null!==(t=c.exec(e));)if(a=this.testSchemaAt(e,t[2],c.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(112).source,t.src_Cc=n(113).source,t.src_Z=n(114).source,t.src_P=n(84).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,4}[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 h})),n.d(t,"ucs2encode",(function(){return b})),n.d(t,"decode",(function(){return j})),n.d(t,"encode",(function(){return v})),n.d(t,"toASCII",(function(){return _})),n.d(t,"toUnicode",(function(){return k}));var r=n(20),a=n.n(r),o=2147483647,i=/^xn--/,c=/[^\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 h(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 b=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,i=128,c=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,h=1,b=36;;b+=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)/h))&&d("overflow"),a+=f*h;var j=b<=c?1:b>=c+26?26:b-c;if(f<j)break;var v=36-j;h>u(o/v)&&d("overflow"),h*=v}var k=n.length+1;c=g(a-m,k,0==m),u(a/k)>o-i&&d("overflow"),i+=u(a/k),a%=k,n.splice(a++,0,i)}return String.fromCodePoint.apply(String,n)},v=function(e){var t=[],n=(e=h(e)).length,r=128,a=0,i=72,c=!0,l=!1,s=void 0;try{for(var m,b=e[Symbol.iterator]();!(c=(m=b.next()).done);c=!0){var j=m.value;j<128&&t.push(p(j))}}catch(z){l=!0,s=z}finally{try{c||null==b.return||b.return()}finally{if(l)throw s}}var v=t.length,k=v;for(v&&t.push("-");k<n;){var _=o,y=!0,O=!1,w=void 0;try{for(var C,E=e[Symbol.iterator]();!(y=(C=E.next()).done);y=!0){var x=C.value;x>=r&&x<_&&(_=x)}}catch(z){O=!0,w=z}finally{try{y||null==E.return||E.return()}finally{if(O)throw w}}var S=k+1;_-r>u((o-a)/S)&&d("overflow"),a+=(_-r)*S,r=_;var A=!0,P=!1,N=void 0;try{for(var T,F=e[Symbol.iterator]();!(A=(T=F.next()).done);A=!0){var B=T.value;if(B<r&&++a>o&&d("overflow"),B==r){for(var I=a,M=36;;M+=36){var L=M<=i?1:M>=i+26?26:M-i;if(I<L)break;var R=I-L,D=36-L;t.push(p(f(L+R%D,0))),I=u(R/D)}t.push(p(f(I,0))),i=g(a,S,k==v),a=0,++k}}}catch(z){P=!0,N=z}finally{try{A||null==F.return||F.return()}finally{if(P)throw N}}++a,++r}return t.join("")},k=function(e){return m(e,(function(e){return i.test(e)?j(e.slice(4).toLowerCase()):e}))},_=function(e){return m(e,(function(e){return c.test(e)?"xn--"+v(e):e}))},y={version:"2.1.0",ucs2:{decode:h,encode:b},decode:j,encode:v,toASCII:_,toUnicode:k};t.default=y},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){"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 i(){if(i.enabled){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=i,c=Number(new Date),l=c-(n||c);o.diff=l,o.prev=n,o.curr=c,n=c,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 i=t[s];e=a.call(o,i),t.splice(s,1),s--}return e})),r.formatArgs.call(o,t);var u=o.log||r.log;u.apply(o,t)}}return i.namespace=e,i.enabled=r.enabled(e),i.useColors=r.useColors(),i.color=t(e),i.destroy=a,i.extend=o,"function"==typeof r.init&&r.init(i),r.instances.push(i),i}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(83),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(44),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(119),i=n(262),c=n(263),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,c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),null===e||"string"===c||"number"===c||"object"===c&&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 h=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h){0;for(var b,f=h.call(e),g=0;!(b=f.next()).done;)p+=u(o=b.value,d+s(o,g++),n,r)}else if("object"===c){0;var j=""+e;i(!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,h,b=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){i(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,i,c=e.result,l=e.keyPrefix,s=e.func,u=e.context,p=s.call(u,t,e.count++);Array.isArray(p)?k(p,c,n,o.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(a=p,i=l+(!p.key||t&&t.key===p.key?"":d(p.key)+"/")+n,p=r.cloneElement(a,{key:i},void 0!==a.props?a.props.children:void 0)),c.push(p))}function k(e,t,n,r,a){var o="";null!=n&&(o=d(n)+"/");var i=j.getPooled(t,o,r,a);!function(e,t,n){null==e||u(e,"",t,n)}(e,v,i),j.release(i)}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)},(h=j).instancePool=[],h.getPooled=m||b,h.poolSize||(h.poolSize=10),h.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return c(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return c(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;i(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,i,c){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,i,c],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(119);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(87),a=n(121);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(87).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},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);var r={};n.r(r),n.d(r,"save",(function(){return It})),n.d(r,"attributes",(function(){return Mt})),n.d(r,"support",(function(){return Lt}));var a={};n.r(a),n.d(a,"save",(function(){return wn})),n.d(a,"attributes",(function(){return En})),n.d(a,"supports",(function(){return xn}));var o=n(19),i=n(14),c=n.n(i),l=n(3),s=n.n(l),u=n(0),p=n(1),d=n(13),m=n(4),h=n(2),b=n(20),f=n.n(b),g=n(8),j=n.n(g),v=n(12),k=n.n(v),_=n(9),y=n.n(_),O=n(10),w=n.n(O),C=n(5),E=n.n(C),x=n(11),S=n.n(x),A=n(6),P=n(39),N=[{icon:Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0z"}),Object(u.createElement)(h.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"}],T=Object(p.__)("Pick an image filter","jetpack");function F(e){var t=e.value,n=e.onChange;return Object(u.createElement)(h.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)(h.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:T,tooltip:T,icon:Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},N.map((function(e){var a,o=e.icon,i=e.title,c=e.value;return Object(u.createElement)(h.MenuItem,{className:t===c?"is-active":void 0,icon:o,isSelected:t===c,key:c||"original",onClick:(a=c,function(){n(t===a?void 0:a),r()}),role:"menuitemcheckbox"},i)})))}})}var B=n(7),I=n.n(B),M=n(26),L=n(29),R=n(16),D=Object(u.createElement)(h.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),z=Object(u.createElement)(h.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),U=Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),H=Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),q=Object(u.createElement)(h.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.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"})),V=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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"img",Object(u.createRef)()),s()(E()(n),"onImageClick",(function(){n.props.isSelected||n.props.onSelect()})),s()(E()(n),"onImageKeyDown",(function(e){n.img.current===document.activeElement&&n.props.isSelected&&[M.BACKSPACE,M.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,i=e.width;if(r){var c={};!t&&r.alt_text&&(c.alt=r.alt_text),!n&&r.media_details&&r.media_details.height&&(c.height=+r.media_details.height),!a&&r.link&&(c.link=r.link),!o&&r.source_url&&(c.url=r.source_url),!i&&r.media_details&&r.media_details.width&&(c.width=+r.media_details.width),Object.keys(c).length&&this.props.setAttributes(c)}}},{key:"render",value:function(){var e,t=this.props,n=t["aria-label"],r=t.alt,a=t.columns,o=t.height,i=t.id,c=t.imageFilter,l=t.isFirstItem,d=t.isLastItem,m=t.isSelected,b=t.link,f=t.linkTo,g=t.onMoveBackward,j=t.onMoveForward,v=t.onRemove,k=t.origUrl,_=t.showMovers,y=t.srcSet,O=t.url,w=t.width;switch(f){case"media":e=O;break;case"attachment":e=b}var C=Object(L.isBlobURL)(k),E=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("img",{alt:r,"aria-label":n,"data-height":o,"data-id":i,"data-link":b,"data-url":k,"data-width":w,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:C?void 0:O,srcSet:C?void 0:y,tabIndex:"0",style:C?{backgroundImage:"url(".concat(k,")")}:void 0}),C&&Object(u.createElement)(h.Spinner,null));return Object(u.createElement)("figure",{className:I()("tiled-gallery__item",s()({"is-selected":m,"is-transient":C},"filter__".concat(c),!!c))},_&&Object(u.createElement)("div",{className:"tiled-gallery__item__move-menu"},Object(u.createElement)(h.IconButton,{icon:1===a?H: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)(h.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)(h.IconButton,{icon:q,onClick:v,className:"tiled-gallery__item__remove",label:Object(p.__)("Remove image","jetpack"),disabled:!m})),e?Object(u.createElement)("a",null,E):E)}}]),t}(u.Component),G=Object(R.withSelect)((function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}}))(V);function W(e){var t,n=e.alt,r=e.imageFilter,a=e.height,o=e.id,i=e.link,c=e.linkTo,l=e.origUrl,p=e.url,d=e.width;if(Object(L.isBlobURL)(l))return null;switch(c){case"media":t=p;break;case"attachment":t=i}var m=Object(u.createElement)("img",{alt:n,"data-height":a,"data-id":o,"data-link":i,"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 K=n(52);function $(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(82);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([_e,_e,ye,_e,_e]),te=ke([_e,_e,_e,ye,_e,_e,_e]),ne=ve([3,1,3],5),re=ke([ye,_e,_e,ye]),ae=ve([1,2,1],5),oe=ke([ye,_e,_e,_e]),ie=ve([1,3],3),ce=ke([_e,_e,_e,ye]),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),he=ke([Object(m.overEvery)(Oe(.9),we(2)),Object(m.overEvery)(Oe(.9),we(2)),we(1.6)]),be=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 _e(e){return e>=1&&e<2}function ye(e){return e<1}function Oe(e){return function(t){return t>=e}}function we(e){return function(t){return t<e}}var Ce=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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"gallery",Object(u.createRef)()),s()(E()(n),"pendingRaf",null),s()(E()(n),"ro",null),s()(E()(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,i=function(){var e=o.value,t=e.contentRect,r=e.target,a=t.width,i=[];Object(Y.a)(r).forEach((function(e){i.push(Object(Y.b)(e,a))})),void 0!==n.props.onResize&&n.props.onResize(i)},c=e[Symbol.iterator]();!(t=(o=c.next()).done);t=!0)i()}catch(l){r=!0,a=l}finally{try{t||null==c.return||c.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?this.triggerResize():"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 K.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,i=e.columnWidths,c=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,i=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)},c=0;c<t-1;c++)i(c);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&&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)&&ie(t)?[1,3]:ce(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]:he(r)&&be(t)?[2,1]:fe(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),i=Object(m.sum)(a);return e(o,r.slice(i))};return r([],e)}(c,{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)($,{key:n,width:i?i[t][n]:void 0},r)})))})))}}]),t}(u.Component),Ee=n(24);function xe(e){var t=e.columns,n=e.renderedImages,r=Math.min(Ee.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)($,{key:t},e)})))})))}var Se=n(67),Ae=function(e){function t(){return j()(this,t),y()(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,i=n.isSave,c=n.linkTo,l=n.layoutStyle,s=n.onMoveBackward,d=n.onMoveForward,m=n.onRemoveImage,h=n.onSelectImage,b=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=i?W:G,v=Object(Se.b)(e,{layoutStyle:l}),k=v.src,_=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:b===t,key:t,link:e.link,linkTo:c,onMoveBackward:i?void 0:s(t),onMoveForward:i?void 0:d(t),onRemove:i?void 0:m(t),onSelect:i?void 0:h(t),origUrl:e.url,setAttributes:i?void 0:f(t),showMovers:o.length>1,srcSet:_,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,i=e.layoutStyle,c=e.roundedCorners,l=e.onResize,p=e.isSave,d=e.columnWidths,m=Object(Se.a)(i)?xe:Ce,h=this.props.images.map(this.renderImage,this),b=i!==Ee.c?Math.min(c,Ee.i):0;return Object(u.createElement)("div",{className:I()(r,s()({},"has-rounded-corners-".concat(b),b>0))},Object(u.createElement)(m,{align:t,columns:a,columnWidths:p?d:void 0,images:o,layoutStyle:i,renderedImages:h,onResize:p?void 0:l}),n)}}]),t}(u.Component),Pe=n(38),Ne=n(65),Te=[{value:"attachment",label:Object(p.__)("Attachment Page","jetpack")},{value:"media",label:Object(p.__)("Media File","jetpack")},{value:"none",label:Object(p.__)("None","jetpack")}];function Fe(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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"state",{selectedImage:null,changed:void 0===n.props.attributes.columnWidths}),s()(E()(n),"addFiles",(function(e){var t=n.props.attributes.images||[],r=n.props.noticeOperations;Object(P.mediaUpload)({allowedTypes:Ee.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()(E()(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()(E()(n),"onSelectImage",(function(e){return function(){n.state.selectedImage!==e&&n.setState({selectedImage:e})}})),s()(E()(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()(E()(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()(E()(n),"onMoveForward",(function(e){return function(){e!==n.props.attributes.images.length-1&&n.onMove(e,e+1)}})),s()(E()(n),"onMoveBackward",(function(e){return function(){0!==e&&n.onMove(e,e-1)}})),s()(E()(n),"onResize",(function(e){n.state.changed&&n.setAttributes({columnWidths:e})})),s()(E()(n),"setColumnsNumber",(function(e){return n.setAttributes({columns:e})})),s()(E()(n),"setRoundedCorners",(function(e){return n.setAttributes({roundedCorners:e})})),s()(E()(n),"setImageAttributes",(function(e){return function(t){var r=n.props.attributes.images;r[e]&&n.setAttributes({images:[].concat(f()(r.slice(0,e)),[c()({},r[e],{},t)],f()(r.slice(e+1)))})}})),s()(E()(n),"setLinkTo",(function(e){return n.setAttributes({linkTo:e})})),s()(E()(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=c()({},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,i=n.noticeOperations,c=n.noticeUI,l=n.setAttributes,s=r.align,d=r.columns,m=void 0===d?Fe(r):d,b=r.imageFilter,f=r.images,g=r.linkTo,j=r.roundedCorners,v=Object(u.createElement)(h.DropZone,{onFilesDrop:this.addFiles}),k=Object(u.createElement)(A.BlockControls,null,!!f.length&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.Toolbar,null,Object(u.createElement)(A.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:Ee.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)(F,{value:b,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:Ee.a,multiple:!0,notices:c,onError:i.createErrorNotice}));var _=Object(Pe.a)(Ee.g,r.className);return Object(u.createElement)(u.Fragment,null,k,Object(u.createElement)(A.InspectorControls,null,Object(u.createElement)(h.PanelBody,{title:Object(p.__)("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(_)&&f.length>1&&Object(u.createElement)(h.RangeControl,{label:Object(p.__)("Columns","jetpack"),value:m,onChange:this.setColumnsNumber,min:1,max:Math.min(Ee.h,f.length)}),_!==Ee.c&&Object(u.createElement)(h.RangeControl,{label:Object(p.__)("Rounded corners","jetpack"),value:j,onChange:this.setRoundedCorners,min:0,max:Ee.i}),Object(u.createElement)(h.SelectControl,{label:Object(p.__)("Link To","jetpack"),value:g,onChange:this.setLinkTo,options:Te}))),c,Object(u.createElement)(Ae,{align:s,className:o,columns:m,imageFilter:b,images:f,layoutStyle:_,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)(h.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),Me=Object(h.withNotices)(Ie);var Le=n(22),Re=(n(275),n(49)),De=n.n(Re),ze=n(64),Ue=n.n(ze),He=n(33);function qe(e){var t,n=e["aria-label"],r=e.alt,a=e.height,o=e.id,i=e.link,c=e.linkTo,l=e.origUrl,s=e.url,p=e.width;if(Object(L.isBlobURL)(l))return null;switch(c){case"media":t=s;break;case"attachment":t=i}var d=Object(u.createElement)("img",{alt:r,"aria-label":n,"data-height":a,"data-id":o,"data-link":i,"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 Ve(e){var t=e.children;return Object(u.createElement)("div",{className:"tiled-gallery__col"},t)}function Ge(e){var t=e.children,n=e.galleryRef;return Object(u.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}function We(e){var t=e.children,n=e.className;return Object(u.createElement)("div",{className:I()("tiled-gallery__row",n)},t)}var Ke=n(15),$e=n.n(Ke),Ze=[{isDefault:!0,name:"rectangular"},{name:"circle"},{name:"square"},{name:"columns"}];function Je(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 Ye(e,t){!function(e,t,n){var r=$e()(t,2),a=r[0],o=r[1],i=1/a*(n-4*(e.childElementCount-1)-o);!function(e,t){var n=t.rawHeight,r=t.rowWidth,a=Xe(e),o=a.map((function(e){return(n-4*(e.childElementCount-1))*tt(e)[0]})),i=Je(o,r);a.forEach((function(e,t){var r=o[t],a=i[t];!function(e,t){var n=t.colHeight,r=t.width,a=t.rawWidth,o=Je(et(e).map((function(e){return a/nt(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:i,rowWidth:n-4*(e.childElementCount-1)})}(e,function(e){return Xe(e).map(tt).reduce((function(e,t){var n=$e()(e,2),r=n[0],a=n[1],o=$e()(t,2);return[r+o[0],a+o[1]]}),[0,0])}(e),t)}function Qe(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function Xe(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function et(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function tt(e){var t=et(e),n=t.length,r=1/t.map(nt).reduce((function(e,t){return e+1/t}),0);return[r,r*n||1]}function nt(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 rt(e){var t=e.height,n=e.width;return t&&n?n/t:1}var at=wt([2,1,2],5),ot=Ct([Et,Et,xt,Et,Et]),it=Ct([Et,Et,Et,xt,Et,Et,Et]),ct=wt([3,1,3],5),lt=Ct([xt,Et,Et,xt]),st=wt([1,2,1],5),ut=Ct([xt,Et,Et,Et]),pt=wt([1,3],3),dt=Ct([Et,Et,Et,xt]),mt=wt([3,1],3),ht=Ct([At(1.6),Object(m.overEvery)(St(.9),At(2)),Object(m.overEvery)(St(.9),At(2))]),bt=wt([1,2],3),ft=wt([1,1,1,1,1],1),gt=wt([1,1,1,1],1),jt=wt([1,1,1],3),vt=Ct([Object(m.overEvery)(St(.9),At(2)),Object(m.overEvery)(St(.9),At(2)),At(1.6)]),kt=wt([2,1],3),_t=Ct([function(e){return e>=2}]);function yt(e,t,n){var r=Object(m.sum)(Object(m.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&jt(e)&&(r<2.5||r<5&&t.length>=3&&t[0]===t[2]||n)}function Ot(e,t){var n=Object(m.sum)(Object(m.take)(t,4));return gt(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function wt(e,t){return function(n){return!Object(m.some)(Object(m.takeRight)(n,t),(function(t){return Object(m.isEqual)(t,e)}))}}function Ct(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 Et(e){return e>=1&&e<2}function xt(e){return e<1}function St(e){return function(t){return t>=e}}function At(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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"gallery",Object(u.createRef)()),s()(E()(n),"pendingRaf",null),s()(E()(n),"ro",null),s()(E()(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;Qe(n).forEach((function(e){return Ye(e,r)}))},i=e[Symbol.iterator]();!(t=(a=i.next()).done);t=!0)o()}catch(c){n=!0,r=c}finally{try{t||null==i.return||i.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?this.triggerResize():"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 K.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,i=function(e){return Object(m.map)(e,rt)}(r),c="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,i=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)},c=0;c<t-1;c++)i(c);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&&ot(r)&&at(t)?[2,1,2]:r.length>15&&it(r)&&ct(t)?[3,1,3]:5!==r.length&<(r)&&st(t)?[1,2,1]:ut(r)&&pt(t)?[1,3]:dt(r)&&mt(t)?[3,1]:ht(r)&&bt(t)?[1,2]:n&&(5===r.length||10!==r.length&&r.length>6)&&ft(t)&&Object(m.sum)(Object(m.take)(r,5))<5?[1,1,1,1,1]:Ot(t,r)?[1,1,1,1]:yt(t,r,n)?[1,1,1]:vt(r)&&kt(t)?[2,1]:_t(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),i=Object(m.sum)(a);return e(o,r.slice(i))};return r([],e)}(i,{isWide:["full","wide"].includes(t)}),l=0;return Object(u.createElement)(Ge,{galleryRef:this.gallery},c.map((function(e,t){return Object(u.createElement)(We,{key:t},e.map((function(e,t){var n=o.slice(l,l+e);return l+=e,Object(u.createElement)(Ve,{key:t},n)})))})))}}]),t}(u.Component);function Nt(e){var t=e.columns,n=e.renderedImages,r=Math.min(20,t),a=n.length%r;return Object(u.createElement)(Ge,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)(We,{key:t,className:"columns-".concat(e.length)},e.map((function(e,t){return Object(u.createElement)(Ve,{key:t},e)})))})))}var Tt=function(e){function t(){return j()(this,t),y()(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(L.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)?Bt:Ue.a;if(Ft(this.props.layoutStyle)&&n&&t){var i=Math.min(2e3,n,t);return o(a,{resize:"".concat(i,",").concat(i)})}return o(a)}}},{key:"renderImage",value:function(e,t){var n=this.props,r=n.images,a=n.linkTo,o=n.selectedImage,i=Object(p.sprintf)(Object(p.__)("image %1$d of %2$d in gallery","jetpack"),t+1,r.length);return Object(u.createElement)(qe,{alt:e.alt,"aria-label":i,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,i=e.layoutStyle,c=Ft(i)?Nt:Pt,l=this.props.images.map(this.renderImage,this);return Object(u.createElement)("div",{className:r},Object(u.createElement)(c,{align:t,columns:a,images:o,layoutStyle:i,renderedImages:l}),n)}}]),t}(u.Component);function Ft(e){return["circle","square"].includes(e)}function Bt(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,De()(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 It(e){var t=e.attributes,n=t.images;if(!n.length)return null;var r=t.align,a=t.className,o=t.columns,i=void 0===o?function(e){return Math.min(3,e.images.length)}(t):o,c=t.linkTo;return Object(u.createElement)(Tt,{align:r,className:a,columns:i,images:n,layoutStyle:Object(Pe.a)(Ze,a),linkTo:c})}var Mt={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"}},Lt={align:["center","wide","full"],customClassName:!1,html:!1},Rt=[{isDefault:!0,name:"rectangular"},{name:"circle"},{name:"square"},{name:"columns"}];function Dt(e){var t,n=e.alt,r=e.imageFilter,a=e.height,o=e.id,i=e.link,c=e.linkTo,l=e.origUrl,p=e.url,d=e.width;if(Object(L.isBlobURL)(l))return null;switch(c){case"media":t=p;break;case"attachment":t=i}var m=Object(u.createElement)("img",{alt:n,"data-height":a,"data-id":o,"data-link":i,"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 zt(e){var t=e.children;return Object(u.createElement)("div",{className:"tiled-gallery__col"},t)}function Ut(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 qt(e){var t=e.height,n=e.width;return t&&n?n/t:1}var Vt=pn([2,1,2],5),Gt=dn([mn,mn,hn,mn,mn]),Wt=dn([mn,mn,mn,hn,mn,mn,mn]),Kt=pn([3,1,3],5),$t=dn([hn,mn,mn,hn]),Zt=pn([1,2,1],5),Jt=dn([hn,mn,mn,mn]),Yt=pn([1,3],3),Qt=dn([mn,mn,mn,hn]),Xt=pn([3,1],3),en=dn([fn(1.6),Object(m.overEvery)(bn(.9),fn(2)),Object(m.overEvery)(bn(.9),fn(2))]),tn=pn([1,2],3),nn=pn([1,1,1,1,1],1),rn=pn([1,1,1,1],1),an=pn([1,1,1],3),on=dn([Object(m.overEvery)(bn(.9),fn(2)),Object(m.overEvery)(bn(.9),fn(2)),fn(1.6)]),cn=pn([2,1],3),ln=dn([function(e){return e>=2}]);function sn(e,t,n){var r=Object(m.sum)(Object(m.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&an(e)&&(r<2.5||r<5&&t.length>=3&&t[0]===t[2]||n)}function un(e,t){var n=Object(m.sum)(Object(m.take)(t,4));return rn(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function pn(e,t){return function(n){return!Object(m.some)(Object(m.takeRight)(n,t),(function(t){return Object(m.isEqual)(t,e)}))}}function dn(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 mn(e){return e>=1&&e<2}function hn(e){return e<1}function bn(e){return function(t){return t>=e}}function fn(e){return function(t){return t<e}}var gn=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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"gallery",Object(u.createRef)()),s()(E()(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,i=function(e){return Object(m.map)(e,qt)}(r),c="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,i=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)},c=0;c<t-1;c++)i(c);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&&Gt(r)&&Vt(t)?[2,1,2]:r.length>15&&Wt(r)&&Kt(t)?[3,1,3]:5!==r.length&&$t(r)&&Zt(t)?[1,2,1]:Jt(r)&&Yt(t)?[1,3]:Qt(r)&&Xt(t)?[3,1]:en(r)&&tn(t)?[1,2]:n&&(5===r.length||10!==r.length&&r.length>6)&&nn(t)&&Object(m.sum)(Object(m.take)(r,5))<5?[1,1,1,1,1]:un(t,r)?[1,1,1,1]:sn(t,r,n)?[1,1,1]:on(r)&&cn(t)?[2,1]:ln(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),i=Object(m.sum)(a);return e(o,r.slice(i))};return r([],e)}(i,{isWide:["full","wide"].includes(t)}),l=0;return Object(u.createElement)(Ut,{galleryRef:this.gallery},c.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)(zt,{key:t},n)})))})))}}]),t}(u.Component);function jn(e){var t=e.columns,n=e.renderedImages,r=Math.min(20,t),a=n.length%r;return Object(u.createElement)(Ut,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)(zt,{key:t},e)})))})))}function vn(e){return["circle","square"].includes(e)}function kn(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function _n(e){var t=Object(He.parse)(e).host;return/\.files\.wordpress\.com$/.test(t)}function yn(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,De()(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 On=function(e){function t(){return j()(this,t),y()(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,i=n.linkTo,c=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(L.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,i=t.layoutStyle,c=_n(r)||!0===kn()?yn:Ue.a;if(vn(i)&&o&&a){var l=Math.min(2e3,o,a);n=c(r,{resize:"".concat(l,",").concat(l)})}else n=c(r);var s,u=300,p=600;if(vn(i)){var d=Math.min(p,o,a),h=Math.min(2e3,o,a);s=Object(m.range)(d,h,u).map((function(e){var t=c(r,{resize:"".concat(e,",").concat(e),strip:"info"});return t?"".concat(t," ").concat(e,"w"):null})).filter(Boolean).join(",")}else{var b=Math.min(p,o),f=Math.min(2e3,o);s=Object(m.range)(b,f,u).map((function(e){var t=c(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:c}),h=d.src,b=d.srcSet;return Object(u.createElement)(Dt,{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:i,origUrl:e.url,showMovers:o.length>1,srcSet:b,url:h,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,i=e.layoutStyle,c=e.roundedCorners,l=vn(i)?jn:gn,p=this.props.images.map(this.renderImage,this),d="circle"!==i?Math.min(c,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:i,renderedImages:p}),n)}}]),t}(u.Component);function wn(e){var t=e.attributes,n=t.imageFilter,r=t.images;if(!r.length)return null;var a=t.align,o=t.className,i=t.columns,c=void 0===i?function(e){return Math.min(3,e.images.length)}(t):i,l=t.linkTo,s=t.roundedCorners;return Object(u.createElement)(On,{align:a,className:o,columns:c,imageFilter:n,images:r,isSave:!0,layoutStyle:Object(Pe.a)(Rt,o),linkTo:l,roundedCorners:s})}var Cn,En={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}},xn={align:["center","wide","full"],customClassName:!1,html:!1},Sn=[r,a],An=n(139),Pn=n.n(An),Nn=n(140),Tn=n.n(Nn),Fn=n(141),Bn=n.n(Fn),In=n(142),Mn=n.n(In),Ln=n(143),Rn=n.n(Ln),Dn=n(144),zn=n.n(Dn),Un=n(18),Hn=(Cn={},s()(Cn,Ee.e,Object(p._x)("Tiled mosaic","Tiled gallery layout","jetpack")),s()(Cn,Ee.c,Object(p._x)("Circles","Tiled gallery layout","jetpack")),s()(Cn,Ee.d,Object(p._x)("Tiled columns","Tiled gallery layout","jetpack")),s()(Cn,Ee.f,Object(p._x)("Square tiles","Tiled gallery layout","jetpack")),Cn),qn=Ee.g.map((function(e){return c()({},e,{label:Hn[e.name]})}));function Vn(e){return Object(m.filter)(e,(function(e){var t=e.id,n=e.url;return t&&n}))}var Gn={align:{default:"center",type:"string"},className:{default:"is-style-".concat(Ee.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}},Wn={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:Pn.a,width:160,height:95},{alt:"",link:"",url:Tn.a,width:160,height:107},{alt:"",link:"",url:Bn.a,width:304,height:203},{alt:"",link:"",url:Mn.a,width:312,height:207},{alt:"",link:"",url:Rn.a,width:152,height:101},{alt:"",link:"",url:zn.a,width:152,height:105}],linkTo:"none"},Kn=Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",width:24,height:24},Object(u.createElement)(h.Path,{fill:"currentColor",d:"M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z"})),$n={attributes:Gn,category:Object(Un.a)()?"layout":"jetpack",description:Object(p.__)("Display multiple images in an elegantly organized tiled layout.","jetpack")+(Object(Le.b)()?"":" "+Object(p.__)("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:Kn,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:qn,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 Vn(e).length>0},transform:function(e){var t=Vn(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=Vn(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:Me,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,i=t.columns,c=void 0===i?Fe(t):i,l=t.linkTo,s=t.roundedCorners,p=t.columnWidths;return Object(u.createElement)(Ae,{align:a,className:o,columns:c,imageFilter:n,images:r,isSave:!0,layoutStyle:Object(Pe.a)(Ee.g,o),linkTo:l,roundedCorners:s,columnWidths:p})},deprecated:Sn,example:{attributes:Wn}};Object(o.a)("tiled-gallery",$n)},function(e,t,n){"use strict";n.r(t);n(41),n(18);var r=n(14),a=n.n(r),o=n(37),i=n.n(o),c=n(21),l=n.n(c),s=n(16),u=n(1),p=(n(105),n(33)),d=n(47),m=n(22);function h(){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(i()(regeneratorRuntime.mark((function e(){var t,n,r,o,i;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,i=h(),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},i&&{actions:[{url:h(),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 b=Object(p.parse)(window.location.href,!0).query;b.stripe_connect_success?Object(s.dispatch)("core/notices").createNotice("success",Object(u.__)("Congrats! Your site is now connected to Stripe. You can now start making money!","jetpack")):b.stripe_connect_cancelled&&Object(s.dispatch)("core/notices").createNotice("error",Object(u.__)("You cancelled connecting your site to Stripe.","jetpack"))}var f=n(27),g=n.n(f),j=n(20),v=n.n(j),k=n(0),_=n(31),y=n(6),O=n(61),w=n(15),C=n.n(w),E=n(35),x=n(8),S=n.n(x),A=n(12),P=n.n(A),N=n(9),T=n.n(N),F=n(10),B=n.n(F),I=n(5),M=n.n(I),L=n(11),R=n.n(L),D=n(3),z=n.n(D),U=n(4),H=n(7),q=n.n(H),V=n(17),G=n(2),W=n(53),K=n(26),$=[{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")}];function Q(){return Object(V.createHigherOrderComponent)((function(e){var t=function(t){function n(e){var t;return S()(this,n),t=T()(this,B()(n).call(this,e)),z()(M()(t),"modalRef",(function(e){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)})),z()(M()(t),"stopArrowKeysPropagation",(function(e){[K.UP,K.DOWN,K.LEFT,K.RIGHT].includes(e.keyCode)&&e.stopPropagation()})),z()(M()(t),"setAuthenticated",(function(e){return t.setState({isAuthenticated:e})})),z()(M()(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({isLoading:!0,media:n?[]:t.state.media,nextHandle:!n&&t.state.nextHandle},(function(){return t.getMediaRequest(e)})))})),z()(M()(t),"handleApiError",(function(e){"authorization_required"!==e.code?(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()(M()(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({media:t.mergeMedia(a,e.media),nextHandle:e.meta.next_page,isLoading:!1})})).catch(t.handleApiError)}})),z()(M()(t),"copyMedia",(function(e,n){t.setState({isCopying:e}),t.props.noticeOperations.removeAllNotices(),t.modalElement&&t.modalElement.focus(),Object(W.speak)(Object(u.sprintf)(Object(u.__)("Inserting: %s","jetpack"),e.map((function(e){return e.title})).filter((function(e){return e})).join(", ")),"polite"),l()({path:n,method:"POST",data:{media:e.map((function(e){return{guid:e.guid,caption:e.caption,title:e.title}}))}}).then((function(e){var n=t.props,r=n.value,a=n.addToGallery,o=n.multiple?e:e[0];t.props.onClose(),t.props.onSelect(a?r.concat(e):o)})).catch(t.handleApiError)})),z()(M()(t),"onChangePath",(function(e,n){t.setState({path:e},n)})),t.state={media:[],nextHandle:!1,isLoading:!1,isCopying:null,isAuthenticated:!0,path:{ID:"recent"}},t}return R()(n,t),P()(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.isAuthenticated,r=t.isCopying,a=t.isLoading,o=t.media,i=t.nextHandle,c=t.path,l=this.props,s=l.allowedTypes,p=l.multiple,d=void 0!==p&&p,m=l.noticeUI,h=l.onClose,b=r?Object(u.__)("Inserting media","jetpack"):Object(u.__)("Select media","jetpack"),f=r?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"),g="jetpack-external-media-browser__description",j=q()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":r});return Object(k.createElement)(G.Modal,{onRequestClose:h,title:b,aria:{describedby:g},className:j},Object(k.createElement)("div",{ref:this.modalRef},m,Object(k.createElement)("p",{id:g,className:"jetpack-external-media-browser--visually-hidden"},f),Object(k.createElement)(e,{getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:r,isLoading:a,media:o,pageHandle:i,allowedTypes:s,isAuthenticated:n,setAuthenticated:this.setAuthenticated,multiple:d,path:c,onChangePath:this.onChangePath})))}}]),n}(k.Component);return Object(G.withNotices)(t)}))}var X=n(80),ee=function(e,t){var n,r=new X.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}))},te=n(28),ne={list:"/wpcom/v2/external-media/list/",copy:"/wpcom/v2/external-media/copy/",connection:"/wpcom/v2/external-media/connection/"};function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ne[e]?Object(te.addQueryArgs)(ne[e]+t,n):null}var ae=Object(k.memo)((function(){return Object(k.createElement)(k.Fragment,null,Object(k.createElement)(E.b,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 oe=Object(k.memo)((function(){return Object(k.createElement)("p",null,Object(u.__)("Awaiting authorization","jetpack"))}));var ie=function(e){var t=e.setAuthenticated,n=Object(k.useState)(!1),r=C()(n,2),a=r[0],o=r[1],i=Object(k.useCallback)((function(){o(!0),l()({path:re("connection","google_photos")}).then((function(e){if(e.error)throw e.message;ee(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)(oe,null):Object(k.createElement)(ae,null),Object(k.createElement)(G.Button,{isPrimary:!0,disabled:a,onClick:i},Object(u.__)("Authorize","jetpack")))};var ce=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 le=function(e){var t=Object(k.useCallback)((function(){e.onClick&&e.onClick(e.item)}),[e.onClick]),n=e.item,r=e.focusOnMount,a=e.isSelected,o=e.isCopying,i=void 0!==o&&o,c=n.thumbnails,l=n.caption,s=n.name,p=n.title,d=n.type,m=n.children,h=void 0===m?0:m,b=c.medium,f=void 0===b?null:b,g=c.fmt_hd,j=void 0===g?null:g,v=p||l||s,_=q()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":a,"jetpack-external-media-browser__media__folder":"folder"===d,"is-transient":i}),y=Object(k.useRef)(null);return Object(k.useEffect)((function(){r&&y.current.focus()}),[]),Object(k.createElement)("li",{ref:y,className:_,onClick:i?void 0:t,onKeyDown:i?void 0:function(e){K.ENTER!==e.keyCode&&K.SPACE!==e.keyCode||(e.preventDefault(),t(e))},role:"checkbox",tabIndex:"0","aria-checked":!!a,"aria-disabled":!!i},a&&i&&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:f||j,alt:v}),"folder"===d&&Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__info"},Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__name"},s),Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__count"},h)))},se=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 ue=function(e){var t=e.media,n=e.isCopying,r=e.isLoading,a=e.pageHandle,o=e.className,i=e.multiple,c=e.setPath,l=e.nextPage,s=e.onCopy,p=Object(k.useState)([]),d=C()(p,2),m=d[0],h=d[1],b=Object(k.useCallback)((function(e){var t=[e];"folder"===e.type?c(e.ID):i?(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=[]),h(t)}),[m,i,c]),f=Object(k.useCallback)((function(){s(m)}),[m,s]),g=t.filter((function(e){return"folder"!==e.type})).length>0,j=q()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":r}),v=q()(z()({"jetpack-external-media-browser":!0},o,!0)),_=Object(k.useRef)(0);return Object(k.createElement)("div",{className:v},Object(k.createElement)("ul",{className:j},t.map((function(e,t){return Object(k.createElement)(le,{item:e,key:e.ID,onClick:b,focusOnMount:!!_.current&&t===_.current,isSelected:m.find((function(t){return t.ID===e.ID})),isCopying:n})})),0===t.length&&!r&&Object(k.createElement)(se,null),r&&Object(k.createElement)(ce,null),a&&!r&&Object(k.createElement)(G.Button,{isLarge:!0,isSecondary:!0,className:"jetpack-external-media-browser__loadmore",disabled:r||n,onClick:function(){_.current=t.length,l()}},Object(u.__)("Load More","jetpack"))),g&&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,isLarge:!0,isBusy:n,disabled:e,onClick:f},t))}),null))};function pe(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 de(e){var t=e.value,n=e.updateFilter;return Object(k.createElement)(G.SelectControl,{label:Object(u.__)("Filter by time period","jetpack"),value:(null==t?void 0:t.range)||"ANY",options:Y,onChange:function(e){return n({range:e})}})}function me(){return Object(k.createElement)("span",null,Object(u.__)("Favorites","jetpack"))}function he(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 be(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 fe=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)(be,{key:e,removeFilter:function(){return n(Object(U.omit)(t,e))}},(r=e,o=t[e],i=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)(pe,{value:o,updateFilter:i}):"date"===r?Object(k.createElement)(de,{value:o,updateFilter:i}):"favorite"===r?Object(k.createElement)(me,{value:o}):"mediaType"===r?Object(k.createElement)(he,{value:o,updateFilter:i}):null));var r,o,i}));return 0===o.length?null:o},ge=[{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 je(e){return ge.filter((function(t){return void 0===e[t.value]}))}function ve(e){var t=je(e);return t.length>0?t[0].value:""}var ke=function(e){var t=Object(k.useState)(ve([])),n=C()(t,2),r=n[0],o=n[1],i=e.isLoading,c=e.isCopying,l=e.filters,s=e.canChangeMedia,p=function(e,t){return t?e:e.filter((function(e){return"mediaType"!==e.value}))}(je(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:i||c,options:p,onChange:o}),Object(k.createElement)(G.Button,{disabled:i||c,isSecondary:!0,isSmall:!0,onClick:function(){var t,n,i=(t=l,n=r,a()({},t,z()({},n,"favorite"===n||"")));e.setFilters(i),o(ve(i))}},Object(u.__)("Add Filter","jetpack")))};var _e=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)})),ye=n(42),Oe=n.n(ye),we=Oe()();var Ce=function(e){var t,n=e.media,r=e.isCopying,a=e.isLoading,o=e.pageHandle,i=e.multiple,c=e.onChangePath,l=e.getMedia,s=e.allowedTypes,p=e.path,d=e.copyMedia,m=e.showAdditionalFilters,h=void 0!==m&&m,b=(t=s)&&1===t.length&&"image"===t[0],f=Object(k.useState)(b?{mediaType:"photo",date:{range:"ANY"}}:{date:{range:"ANY"}}),g=C()(f,2),j=g[0],v=g[1],_=Object(k.useRef)(""),y=Object(k.useRef)(""),O="recent"===p.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 i=null,c=we;switch(a.range){case"LAST_7_DAYS":i=Oe()(we).subtract(7,"days");break;case"LAST_30_DAYS":i=Oe()(we).subtract(30,"days");break;case"LAST_6_MONTHS":i=Oe()(we).subtract(6,"months");break;case"LAST_12_MONTHS":i=Oe()(we).subtract(1,"year");break;case"CUSTOM":a.year&&a.month&&(i=Oe()([a.year,a.month-1]),c=Oe()(i).endOf("month"))}var l=i?i.format("YYYY-MM-DD"):"0000-00-00",s=c?c.format("YYYY-MM-DD"):"0000-00-00";o.push("dateRange=".concat(l,":").concat(s))}return o.length>0?o:null}(j):null,w={number:20,path:p.ID};O&&(w.filter=O);var E=re("list","google_photos",w),x=Object(k.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l(E,t)}),[l,E]),S=Object(k.useCallback)((function(e){var t=n.find((function(t){return t.ID===e}));y.current=p,c(t||{ID:e})}),[n,c,y,p]),A=Object(k.useCallback)((function(e){d(e,re("copy","google_photos"))}),[d]);return Object(k.useEffect)((function(){_!==E&&(_.current=E,x({},p!==y.current))}),[_,E,x,p]),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"!==p.ID?"/":"recent",disabled:a||r,options:$,onChange:S}),h&&"recent"===p.ID&&Object(k.createElement)(ke,{filters:j,isLoading:a,setFilters:v,canChangeMedia:!b}),Object(k.createElement)("div",{className:"jetpack-external-media-header__filter"},"recent"===p.ID&&Object(k.createElement)(fe,{filters:j,isLoading:a,setFilters:v,canChangeMedia:!b}),"recent"!==p.ID&&"/"!==p.ID&&Object(k.createElement)(_e,{path:p,setPath:S}))),Object(k.createElement)(ue,{className:"jetpack-external-media-browser__google",key:E,media:n,isCopying:r,isLoading:a,nextPage:x,onCopy:A,pageHandle:o,multiple:i,setPath:S}))};var Ee=Q()((function(e){return e.isAuthenticated?Object(k.createElement)(Ce,e):Object(k.createElement)(ie,e)}));var xe=Q()((function(e){var t=e.media,n=e.isCopying,r=e.isLoading,a=e.pageHandle,o=e.multiple,i=e.copyMedia,c=e.getMedia,l=Object(k.useState)(Object(U.sample)(J)),s=C()(l,2),p=s[0],d=s[1],m=Object(k.useState)(""),h=C()(m,2),b=h[0],f=h[1],g=Object(k.useCallback)((function(e){i(e,re("copy","pexels"))}),[i]),j=Object(k.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p&&c(re("list","pexels",{number:20,path:"recent",search:p}),t)}),[c,p]),v=Object(k.useRef)(),_=Object(k.useCallback)((function(e){e.preventDefault(),f(p),j(e,!0),v.current=p}),[j,p]);Object(k.useEffect)(j,[]);var y=Object(k.useRef)(null);return Object(k.useEffect)((function(){if(y.current){var e=Array.from(y.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:y,className:"jetpack-external-media-header__pexels",onSubmit:_},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:_,type:"submit",disabled:!p.length||p===v.current||n},Object(u.__)("Search","jetpack"))),Object(k.createElement)(ue,{key:b,className:"jetpack-external-media-browser__pexels",media:t,isCopying:n,isLoading:r,nextPage:j,onCopy:g,pageHandle:a,multiple:o}))})),Se=[{id:"google_photos",label:Object(u.__)("Google Photos","jetpack"),icon:Object(k.createElement)(E.a,null),keyword:"google photos"},{id:"pexels",label:Object(u.__)("Pexels Free Photos","jetpack"),icon:Object(k.createElement)(E.d,null),keyword:"pexels"}];var Ae=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}),Se.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 Pe=function(e){var t=e.mediaProps,n=e.open,r=e.setSelectedSource,a=e.isFeatured,o=e.isReplace,i=t.render;if(a&&void 0===t.value)return i({open:n});if(o)return Object(k.createElement)(Ae,{originalButton:i,open:n,setSource:r});var c=Object(u.__)("Select Image","jetpack");return t.multiple&&(c=Object(u.__)("Select Images","jetpack")),t.allowedTypes.length>1&&(c=Object(u.__)("Select Media","jetpack")),Object(k.createElement)(k.Fragment,null,a&&i({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},c)},renderContent:function(){return Object(k.createElement)(G.NavigableMenu,{"aria-label":c},Object(k.createElement)(G.MenuGroup,null,Object(k.createElement)(G.MenuItem,{icon:"admin-media",onClick:n},Object(u.__)("Media Library","jetpack")),Object(k.createElement)(Ae,{open:n,setSource:r})))}}))},Ne=function(e){return e.unstableFeaturedImageFlow||e.modalClass&&-1!==e.modalClass.indexOf("featured-image")},Te=function(e){return void 0===e.multiple&&!Ne(e)};var Fe=function(e){var t,n=e.mediaProps,r=Object(k.useState)(null),a=C()(r,2),o=a[0],i=a[1],c="pexels"===(t=o)?xe:"google_photos"===t?Ee:null;return Object(k.createElement)(k.Fragment,null,Object(k.createElement)(Pe,g()({},e,{setSelectedSource:i,isReplace:Te(n),isFeatured:Ne(n)})),c&&Object(k.createElement)(c,g()({onClose:function(e){e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||i(null)}},n)))};n(172);if(Object(O.a)()&&"function"==typeof y.useBlockEditContext){Object(_.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(function(e){return function(t){var n=Object(y.useBlockEditContext)().name,r=t.render;if(["core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/tiled-gallery"].indexOf(n)>-1||function(e){return e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1}(t)){var a=t.allowedTypes,o=t.gallery,i=void 0!==o&&o,c=t.value,l=void 0===c?[]:c;a.indexOf("image")>-1&&!(i&&l.length>0)&&(r=function(e){return Object(k.createElement)(Fe,g()({},e,{mediaProps:t}))})}return Object(k.createElement)(e,g()({},t,{render:r}))}}),11),Object(_.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:a()({},e,{keywords:[].concat(v()(e.keywords),v()(Se.map((function(e){return e.keyword}))))})}))}var Be=n(45),Ie=n(62);function Me(){return Object(U.get)(Object(Ie.a)(),["allowedMimeTypes"],[])}function Le(e){if(!e)return!1;if(!Me())return!1;var t,n,r=(t="video")?Object(U.pickBy)(Me(),(function(e){return Object(U.startsWith)(e,"".concat(t,"/"))})):{},a=(n=r)?Object(U.flatten)(Object(U.map)(Object(U.keys)(n),(function(e){return e.split("|")}))):[];if("string"==typeof e){var o=e.split(".").pop();return o&&a.includes(o)}return"object"==typeof e&&(e.type&&Object(U.values)(r).includes(e.type))}function Re(e){var t=Object(Be.a)("videopress").unavailableReason;return e&&"core/cover"===e&&Object(m.b)()&&["missing_plan","unknown"].includes(t)}var De=n(79),ze=function(e){var t=e.name,n=e.show,r=e.align;return n?Object(k.createElement)("div",{className:"jetpack-upgrade-nudge-wrapper wp-block","data-align":r},Object(k.createElement)(De.a,{plan:"value_bundle",blockName:t,title:{knownPlan:Object(u.__)("To use a video in this block, upgrade to %(planName)s.","jetpack"),unknownPlan:Object(u.__)("To use a video in this block, upgrade to a paid plan.","jetpack")},subtitle:!1})):null},Ue=Object(k.createContext)(),He=function(e){var t=e.onFilesUpload,n=e.children;return Object(k.createElement)(Ue.Provider,{value:t},n)},qe=Object(V.createHigherOrderComponent)((function(e){return function(t){if("core/cover"!==Object(y.useBlockEditContext)().name)return Object(k.createElement)(e,t);var n=Object(k.useContext)(Ue),r=t.onError,a=Object(k.useCallback)((function(e){var t,a,o=null==e?void 0:null===(t=e[0])||void 0===t?void 0:null===(a=t.props)||void 0===a?void 0:a.children;return Le(o)?n([o]):r(e)}),[n,r]);return Object(k.createElement)("div",{className:"jetpack-cover-media-placeholder"},Object(k.createElement)(e,g()({},t,{onFilesPreUpload:n,onError:a})))}}),"JetpackCoverMediaPlaceholder"),Ve=Object(V.createHigherOrderComponent)((function(e){return function(t){var n=Object(y.useBlockEditContext)().name,r=Object(k.useRef)();if("core/cover"!==n)return Object(k.createElement)(e,t);var a=Object(k.useContext)(Ue);return Object(k.createElement)(e,g()({},t,{onFilesUpload:function(e){r.current=(null==e?void 0:e.length)?e[0]:null,a(e)},createNotice:function(e,n,a){if(Le(r.current))return r.current=null,null;t.createNotice(e,n,a)}}))}}),"JetpackCoverMediaReplaceFlow"),Ge=Object(V.createHigherOrderComponent)((function(e){return function(t){var n=Object(k.useState)(!1),r=C()(n,2),a=r[0],o=r[1],i=t.attributes;Object(k.useEffect)((function(){return o(!1)}),[i]);var c=Object(k.useCallback)((function(e){(null==e?void 0:e.length)&&Le(e[0])&&o(!0)})),l=Object(y.useBlockEditContext)().name;return Re(l)?Object(k.createElement)(k.Fragment,null,Object(k.createElement)(He,{onFilesUpload:c},Object(k.createElement)(ze,{show:a,name:l,align:i.align}),Object(k.createElement)(e,t))):Object(k.createElement)(e,t)}}),"JetpackCoverBlockEdit");n(175);Object(_.addFilter)("blocks.registerBlockType","core/cover",(function(e,t){return!e.isDeprecation&&Re(t)&&(Object(_.addFilter)("editor.MediaPlaceholder","jetpack/cover-edit-media-placeholder",qe),Object(_.addFilter)("editor.MediaReplaceFlow","jetpack/cover-media-replace-flow",Ve),Object(_.addFilter)("editor.BlockEdit","jetpack/cover-block-edit",Ge)),e}));var We=n(55);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 Ke=window.Jetpack_Editor_Initial_State.tracksUserData,$e=Ke.userid,Ze=Ke.username;We.a.initialize($e,Ze,{blog_id:window.Jetpack_Editor_Initial_State.wpcomBlogId})}},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(14),o=n.n(a),i=n(0),c=n(1),l=n(13),s=n(2),u=n(6),p=(n(183),n(15)),d=n.n(p),m=n(4),h=n(7),b=n.n(h),f=n(56),g=n.n(f),j=n(17),v=n(16),k=n(26),_=n(48),y=n(23),O=[{name:"contact-form",title:Object(c.__)("Contact Form","jetpack"),description:Object(c.__)("Add a contact form to your page.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Contact Us","jetpack"),element:"button"}]]},{name:"rsvp-form",title:Object(c.__)("RSVP Form","jetpack"),description:Object(c.__)("Add an RSVP form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Attending?","jetpack"),required:!0,options:[Object(c.__)("Yes","jetpack"),Object(c.__)("No","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("Other Details","jetpack")}],["jetpack/button",{text:Object(c.__)("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("A new RSVP from your website","jetpack")}},{name:"registration-form",title:Object(c.__)("Registration Form","jetpack"),description:Object(c.__)("Add a Registration form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Phone Number","jetpack")}],["jetpack/field-select",{label:Object(c.__)("How did you hear about us?","jetpack"),options:[Object(c.__)("Search Engine","jetpack"),Object(c.__)("Social Media","jetpack"),Object(c.__)("TV","jetpack"),Object(c.__)("Radio","jetpack"),Object(c.__)("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("Other Details","jetpack")}],["jetpack/button",{text:Object(c.__)("Send","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("A new registration from your website","jetpack")}},{name:"appointment-form",title:Object(c.__)("Appointment Form","jetpack"),description:Object(c.__)("Add an Appointment booking form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:Object(c.__)("Time","jetpack"),required:!0,options:[Object(c.__)("Morning","jetpack"),Object(c.__)("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("Notes","jetpack")}],["jetpack/button",{text:Object(c.__)("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:Object(c.__)("Feedback Form","jetpack"),description:Object(c.__)("Add a Feedback form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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 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(c.__)("Please rate our website","jetpack"),required:!0,options:[Object(c.__)("1 - Very Bad","jetpack"),Object(c.__)("2 - Poor","jetpack"),Object(c.__)("3 - Average","jetpack"),Object(c.__)("4 - Good","jetpack"),Object(c.__)("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("How could we improve?","jetpack")}],["jetpack/button",{text:Object(c.__)("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("New feedback received from your website","jetpack")}}],w=["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 C=Object(j.compose)([Object(v.withSelect)((function(e,t){var n=e("core/blocks"),r=n.getBlockType,a=n.getBlockVariations,o=n.getDefaultBlockVariation,i=e("core/block-editor").getBlocks,c=e("core").getSite,l=i(t.clientId);return{blockType:r&&r(t.name),defaultVariation:o&&o(t.name,"block"),variations:a&&a(t.name,"block"),innerBlocks:l,hasInnerBlocks:l.length>0,adminEmail:Object(m.get)(c&&c(),["email"])}})),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.adminEmail,a=e.hasInnerBlocks,o=e.replaceInnerBlocks,p=e.selectBlock,h=e.clientId,f=e.instanceId,j=e.className,v=e.blockType,y=e.variations,C=e.defaultVariation,E=t.to,x=t.subject,S=t.customThankyou,A=t.customThankyouMessage,P=t.customThankyouRedirect,N=Object(i.useState)(!1),T=d()(N,2),F=T[0],B=T[1],I=b()(j,"jetpack-contact-form"),M=function(e){e.attributes&&n(e.attributes),e.innerBlocks&&o(h,function e(t){return Object(m.map)(t,(function(t){var n=d()(t,3),r=n[0],a=n[1],o=n[2],i=void 0===o?[]:o;return Object(l.createBlock)(r,a,e(i))}))}(e.innerBlocks)),p(h)};Object(i.useEffect)((function(){a||l.registerBlockVariation||M(O[0])}));var L=function(e){return 0!==(e=e.trim()).length&&(!g.a.validate(e)&&{email:e})},R=function(e){if(0===e.target.value.length)return B(!1),void n({to:r});var t=e.target.value.split(",").map(L).filter(Boolean);t&&t.length&&B(t)},D=function(e){B(!1),n({to:e.trim()})},z=function(){var e=void 0!==E?E:r;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(s.TextControl,{"aria-describedby":"contact-form-".concat(f,"-email-").concat(F&&F.length>0?"error":"help"),label:Object(c.__)("Email address to send to","jetpack"),placeholder:Object(c.__)("name@example.com","jetpack"),onKeyDown:function(e){"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:R,onChange:D,help:Object(c.__)("You can enter multiple email addresses separated by commas.","jetpack")}),Object(i.createElement)(_.a,{isError:!0,id:"contact-form-".concat(f,"-email-error")},function(){if(F){if(1===F.length)return F[0]&&F[0].email?Object(c.sprintf)(Object(c.__)("%s is not a valid email address.","jetpack"),F[0].email):F[0];if(2===F.length)return Object(c.sprintf)(Object(c.__)("%s and %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(c.sprintf)(Object(c.__)("%s are not a valid email address.","jetpack"),e.join(", "))}return null}()),Object(i.createElement)(s.TextControl,{label:Object(c.__)("Email subject line","jetpack"),value:x,placeholder:Object(c.__)("Enter a subject","jetpack"),onChange:function(e){return n({subject:e})},help:Object(c.__)("Choose a subject line that you recognize as an email from your website.","jetpack")}),Object(i.createElement)(s.SelectControl,{label:Object(c.__)("On Submission","jetpack"),value:S,options:[{label:Object(c.__)("Show a summary of submitted fields","jetpack"),value:""},{label:Object(c.__)("Show a custom text message","jetpack"),value:"message"},{label:Object(c.__)("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:function(e){return n({customThankyou:e})}}),"message"===S&&Object(i.createElement)(s.TextareaControl,{label:Object(c.__)("Message Text","jetpack"),value:A,placeholder:Object(c.__)("Thank you for your submission!","jetpack"),onChange:function(e){return n({customThankyouMessage:e})}}),"redirect"===S&&Object(i.createElement)(s.BaseControl,{label:Object(c.__)("Redirect Address","jetpack"),id:"contact-form-".concat(f,"-thankyou-url")},Object(i.createElement)(u.URLInput,{id:"contact-form-".concat(f,"-thankyou-url"),value:P,className:"jetpack-contact-form__thankyou-redirect-url",onChange:function(e){return n({customThankyouRedirect:e})}})))};return!a&&l.registerBlockVariation?Object(i.createElement)("div",{className:I},Object(i.createElement)(u.__experimentalBlockVariationPicker,{icon:Object(m.get)(v,["icon","src"]),label:Object(m.get)(v,["title"]),instructions:Object(c.__)("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:y,allowSkip:!0,onSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;M(e)}})):Object(i.createElement)(i.Fragment,null,s.ToolbarGroup&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(s.ToolbarGroup,null,Object(i.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(i.createElement)(s.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:Object(c.__)("Edit Form Settings"),onClick:t,onKeyDown:function(n){e||n.keyCode!==k.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:Object(i.createElement)(s.Icon,{icon:"edit"})})}(e.isOpen,e.onToggle)},renderContent:function(){return z()}}))),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(c.__)("Form Settings","jetpack")},z())),Object(i.createElement)("div",{className:I},Object(i.createElement)(u.InnerBlocks,{allowedBlocks:w,templateInsertUpdatesSelection:!1})))})),E={subject:{type:"string",default:Object(c.__)("A new message from your website","jetpack")},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""}},x=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],S=[{attributes:o()({submit_button_text:{type:"string",default:Object(c.__)("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:Object(c.__)("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},E),migrate:function(e,t){var n=Object(m.omit)(e,x),r={text:e.submitButtonText||e.submit_button_text||Object(c.__)("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}],A=n(27),P=n.n(A),N=n(31),T=n(40);function F(e){var t=e.setAttributes,n=e.width;return Object(i.createElement)(s.BaseControl,{label:Object(c.__)("Field Width","jetpack"),help:Object(c.__)("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},Object(i.createElement)(s.ButtonGroup,{"aria-label":Object(c.__)("Field Width","jetpack")},[25,50,75,100].map((function(e){return Object(i.createElement)(s.Button,{key:e,isSmall:!0,isPrimary:e===n,onClick:function(){return t({width:e})}},e,"%")}))))}var B=function(e){var t=e.setAttributes,n=e.width,r=e.id,a=e.required;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(s.Toolbar,null,Object(i.createElement)(s.ToolbarButton,{title:Object(c.__)("Required","jetpack"),icon:Object(y.a)(Object(i.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(i.createElement)(u.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(c.__)("Field Settings","jetpack")},Object(i.createElement)(s.ToggleControl,{label:Object(c.__)("Field is required","jetpack"),className:"jetpack-field-label__required",checked:a,onChange:function(e){return t({required:e})},help:Object(c.__)("Does this field have to be completed for the form to be submitted?","jetpack")}),Object(i.createElement)(F,{setAttributes:t,width:n}))),Object(i.createElement)(u.InspectorAdvancedControls,null,Object(i.createElement)(s.TextControl,{label:Object(c.__)("Unique CSS ID","jetpack"),value:r,onChange:function(e){return t({id:e})},help:Object(c.__)("A unique ID that can be used in CSS or as an anchor.","jetpack")})))};function I(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(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"jetpack-field"},Object(i.createElement)(T.a,{required:r,label:a,setAttributes:o}),Object(i.createElement)(s.Disabled,null,Object(i.createElement)(s.TextControl,{type:n,placeholder:l,value:l,onChange:function(e){return o({placeholder:e})},title:Object(c.__)("Set the placeholder text","jetpack")}))),Object(i.createElement)(B,{id:t,required:r,width:u,setAttributes:o}))}var M=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(i.createElement)(e,P()({},t,{className:n}))}return Object(i.createElement)(e,t)}}),"withCustomClassName");function L(e){var t=e.id,n=e.required,r=e.label,a=e.setAttributes,o=e.placeholder,l=e.width;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"jetpack-field"},Object(i.createElement)(T.a,{required:n,label:r,setAttributes:a}),Object(i.createElement)(s.Disabled,null,Object(i.createElement)(s.TextareaControl,{placeholder:o,value:o,onChange:function(e){return a({placeholder:e})},title:Object(c.__)("Set the placeholder text","jetpack")}))),Object(i.createElement)(B,{id:t,required:n,setAttributes:a,width:l}))}Object(N.addFilter)("editor.BlockListBlock","jetpack/contact-form",M);var R=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(i.createElement)(s.BaseControl,{id:"jetpack-field-checkbox-".concat(n),className:"jetpack-field jetpack-field-checkbox",label:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:p}),Object(i.createElement)(T.a,{required:r,label:a,setAttributes:o}),Object(i.createElement)(B,{id:t,required:r,width:l,setAttributes:o}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(c.__)("Checkbox Settings","jetpack")},Object(i.createElement)(s.ToggleControl,{label:Object(c.__)("Checked by default","jetpack"),checked:p,onChange:function(e){return o({defaultValue:e?"true":""})}}))))})})),D=n(8),z=n.n(D),U=n(12),H=n.n(U),q=n(9),V=n.n(q),G=n(10),W=n.n(G),K=n(5),$=n.n(K),Z=n(11),J=n.n(Z),Y=function(e){function t(){var e,n;z()(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=W()(t)).call.apply(e,[this].concat(a)))).onChangeOption=n.onChangeOption.bind($()(n)),n.onKeyPress=n.onKeyPress.bind($()(n)),n.onDeleteOption=n.onDeleteOption.bind($()(n)),n.textInput=Object(i.createRef)(),n}return J()(t,e),H()(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(i.createElement)("li",{className:"jetpack-option"},r&&"select"!==r&&Object(i.createElement)("input",{className:"jetpack-option__type",type:r,disabled:!0}),Object(i.createElement)("input",{type:"text",className:"jetpack-option__input",value:n,placeholder:Object(c.__)("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),t&&Object(i.createElement)(s.IconButton,{className:"jetpack-option__remove",icon:"trash",label:Object(c.__)("Remove option","jetpack"),onClick:this.onDeleteOption}))}}]),t}(i.Component);var Q=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,h=Object(i.useState)(null),b=d()(h,2),f=b[0],g=b[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(i.createElement)(i.Fragment,null,Object(i.createElement)(s.BaseControl,{id:"jetpack-field-multiple-".concat(r),className:"jetpack-field jetpack-field-multiple",label:Object(i.createElement)(T.a,{required:a,label:o,setAttributes:l,isSelected:u,resetFocus:function(){return g(null)}})},Object(i.createElement)("ol",{className:"jetpack-field-multiple__list",id:"jetpack-field-multiple-".concat(r)},m.map((function(e,t){return Object(i.createElement)(Y,{type:n,key:t,option:e,index:t,onChangeOption:j,onAddOption:v,isInFocus:t===f&&u,isSelected:u})}))),u&&Object(i.createElement)(s.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:Object(c.__)("Insert option","jetpack"),onClick:v},Object(c.__)("Add option","jetpack"))),Object(i.createElement)(B,{id:t,required:a,setAttributes:l,width:p}))})),X=n(18),ee={title:Object(c.__)("Form","jetpack"),description:Object(c.__)("A simple way to get feedback from folks visiting your site.","jetpack"),icon:Object(y.a)(Object(i.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"})),keywords:[Object(c._x)("email","block search term","jetpack"),Object(c._x)("feedback","block search term","jetpack"),Object(c._x)("contact form","block search term","jetpack")],supports:{html:!1},attributes:E,edit:C,save:u.InnerBlocks.Content,variations:O,category:Object(X.a)()?"grow":"jetpack",deprecated:S},te={category:Object(X.a)()?"grow":"jetpack",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)}}]},save:function(){return null},example:{}},ne=function(e){var t=e.attributes,n=e.name;return null===t.label?Object(l.getBlockType)(n).title:t.label},re=function(e){return function(t){return Object(i.createElement)(I,{type:e,label:ne(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})}},ae=function(e){return function(t){return Object(i.createElement)(Q,{label:ne(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})}},oe=[{name:"field-text",settings:o()({},te,{title:Object(c.__)("Text","jetpack"),description:Object(c.__)("When you need just a small amount of text, add a text input.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:re("text")})},{name:"field-name",settings:o()({},te,{title:Object(c.__)("Name","jetpack"),description:Object(c.__)("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:re("text")})},{name:"field-email",settings:o()({},te,{title:Object(c.__)("Email","jetpack"),keywords:[Object(c.__)("e-mail","jetpack"),Object(c.__)("mail","jetpack"),"email"],description:Object(c.__)("Want to reply to folks? Add an email address input.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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"})),edit:re("email")})},{name:"field-url",settings:o()({},te,{title:Object(c.__)("Website","jetpack"),keywords:["url",Object(c.__)("internet page","jetpack"),"link"],description:Object(c.__)("Add an address input for a website.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:re("url")})},{name:"field-date",settings:o()({},te,{title:Object(c.__)("Date Picker","jetpack"),keywords:[Object(c.__)("Calendar","jetpack"),Object(c.__)("day month year","block search term","jetpack")],description:Object(c.__)("The best way to set a date. Add a date picker.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:re("text")})},{name:"field-telephone",settings:o()({},te,{title:Object(c.__)("Phone Number","jetpack"),keywords:[Object(c.__)("Phone","jetpack"),Object(c.__)("Cellular phone","jetpack"),Object(c.__)("Mobile","jetpack")],description:Object(c.__)("Add a phone number input.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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"})),edit:re("tel")})},{name:"field-textarea",settings:o()({},te,{title:Object(c.__)("Message","jetpack"),keywords:[Object(c.__)("Textarea","jetpack"),"textarea",Object(c.__)("Multiline text","jetpack")],description:Object(c.__)("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:function(e){return Object(i.createElement)(L,{label:ne(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()({},te,{title:Object(c.__)("Checkbox","jetpack"),keywords:[Object(c.__)("Confirm","jetpack"),Object(c.__)("Accept","jetpack")],description:Object(c.__)("Add a single checkbox.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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 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(i.createElement)(R,{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()({},te.attributes,{label:{type:"string",default:""}})})},{name:"field-checkbox-multiple",settings:o()({},te,{title:Object(c.__)("Checkbox Group","jetpack"),keywords:[Object(c.__)("Choose Multiple","jetpack"),Object(c.__)("Option","jetpack")],description:Object(c.__)("People love options. Add several checkbox items.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:ae("checkbox"),attributes:o()({},te.attributes,{label:{type:"string",default:"Choose several"}})})},{name:"field-radio",settings:o()({},te,{title:Object(c.__)("Radio","jetpack"),keywords:[Object(c.__)("Choose","jetpack"),Object(c.__)("Select","jetpack"),Object(c.__)("Option","jetpack")],description:Object(c.__)("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:Object(y.a)(Object(i.createElement)(i.Fragment,null,Object(i.createElement)(s.Path,{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(i.createElement)(s.Circle,{cx:"12",cy:"12",r:"5"}))),edit:ae("radio"),attributes:o()({},te.attributes,{label:{type:"string",default:"Choose one"}})})},{name:"field-select",settings:o()({},te,{title:Object(c.__)("Select","jetpack"),keywords:[Object(c.__)("Choose","jetpack"),Object(c.__)("Dropdown","jetpack"),Object(c.__)("Option","jetpack")],description:Object(c.__)("Compact, but powerful. Add a select box with several items.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:ae("select"),attributes:o()({},te.attributes,{label:{type:"string",default:"Select one"}})})}];Object(r.a)("contact-form",ee,oe)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(6),c=n(2),l=n(7),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)(i.InnerBlocks,{allowedBlocks:u,templateLock:!1,template:p}))},m=n(23),h=(n(186),n(153),n(8)),b=n.n(h),f=n(12),g=n.n(f),j=n(9),v=n.n(j),k=n(10),_=n.n(k),y=n(5),O=n.n(y),w=n(11),C=n.n(w),E=function(e){var t=e.attributes,n=t.address,r=t.addressLine2,o=t.addressLine3,i=t.city,c=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),i&&!(c||l)&&Object(a.createElement)("div",{className:"jetpack-address__city"},i),i&&(c||l)&&Object(a.createElement)("div",null,[Object(a.createElement)("span",{className:"jetpack-address__city"},i),", ",Object(a.createElement)("span",{className:"jetpack-address__region"},c)," ",Object(a.createElement)("span",{className:"jetpack-address__postal"},l)]),!i&&(c||l)&&Object(a.createElement)("div",null,[Object(a.createElement)("span",{className:"jetpack-address__region"},c)," ",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,i=t.region,c=t.postal,l=t.country,s=n?"".concat(n,","):"",u=r?"".concat(r,","):"",p=a?"".concat(a,","):"",d=o?"+".concat(o,","):"",m=i?"+".concat(i,","):"";m=c?"".concat(m,"+").concat(c):m;var h=l?"+".concat(l):"";return"https://www.google.com/maps/search/".concat(s).concat(u).concat(p).concat(d).concat(m).concat(h).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)(E,e)),!e.attributes.linkToGoogleMaps&&Object(a.createElement)(E,e));var t},A=function(e){function t(){var e,n;b()(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=_()(t)).call.apply(e,[this].concat(a)))).preventEnterKey=n.preventEnterKey.bind(O()(n)),n}return C()(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,h=t.linkToGoogleMaps,b=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":b}),v=Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Link address to Google Maps","jetpack"),checked:h,onChange:function(e){return f({linkToGoogleMaps:e})}});return Object(a.createElement)("div",{className:j},!b&&g&&S(this.props),(b||!g)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(i.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)(i.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)(i.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)(i.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)(i.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)(i.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)(i.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),P=n(18),N={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)(c.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)(c.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:Object(P.a)()?"grow":"jetpack",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},T=n(56),F=n.n(T),B=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("@")&&F.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)})))},I=function(e,t,n,r,o){var c=t.isSelected,l=t.attributes[e];return Object(a.createElement)("div",{className:"jetpack-".concat(e,c?"-block is-selected":"-block")},!c&&""!==l&&r(t),(c||""===l)&&Object(a.createElement)(i.PlainText,{value:l,placeholder:n,"aria-label":n,onChange:o}))},M=function(e){var t=e.setAttributes;return I("email",e,Object(o.__)("Email","jetpack"),B,(function(e){return t({email:e})}))},L={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)(c.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:Object(P.a)()?"grow":"jetpack",attributes:{email:{type:"string",default:""}},edit:M,save:B,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):"",i=r.replace(/\D/g,"");return/[0-9/+/(]/.test(r[0])?(o=o.slice(0,-1),"+"===r[0]&&(i="+"+i)):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(i)},r)]}(t))},D=function(e){var t=e.setAttributes;return I("phone",e,Object(o.__)("Phone number","jetpack"),R,(function(e){return t({phone:e})}))},z={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)(c.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:Object(P.a)()?"grow":"jetpack",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:D,save:R},U={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:Object(m.a)(Object(a.createElement)(c.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"})),category:Object(P.a)()?"grow":"jetpack",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)(i.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"}}]}},H=[{name:"address",settings:N},{name:"email",settings:L},{name:"phone",settings:z}];Object(r.a)("contact-info",U,H)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(1),o=n(32),i={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"}},c=n(14),l=n.n(c),s=n(3),u=n.n(s),p=n(0),d=n(7),m=n.n(d),h=n(6),b=n(17),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=!!h.__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 _(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.gradientValue,i=e.setBackgroundColor,c=e.setGradient,l=e.setTextColor,s=e.textColor,u=Object(p.createElement)(h.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:n,fallbackTextColor:r,isLargeText:!1,textColor:s.color});return v?Object(p.createElement)(h.__experimentalPanelColorGradientSettings,{settings:[{colorValue:s.color,label:Object(a.__)("Text Color","jetpack"),onColorChange:l},{colorValue:t.color,gradientValue:o,label:Object(a.__)("Background","jetpack"),onColorChange:i,onGradientChange:c}],title:Object(a.__)("Background & Text Color","jetpack")},u):Object(p.createElement)(h.PanelColorSettings,{colorSettings:[{value:s.color,onChange:l,label:Object(a.__)("Text Color","jetpack")},{value:t.color,onChange:i,label:Object(a.__)("Background","jetpack")}],title:Object(a.__)("Background & Text Color","jetpack")},u)}var y=n(16);n(178);var O=Object(b.compose)(Object(h.withColors)({backgroundColor:"background-color"},{textColor:"color"}),j)((function(e){var t,n=e.attributes,r=e.backgroundColor,o=e.className,i=e.clientId,c=e.fallbackBackgroundColor,s=e.fallbackTextColor,d=e.setAttributes,b=e.setBackgroundColor,g=e.setTextColor,j=e.textColor,O=n.borderRadius,w=n.element,C=n.placeholder,E=n.text;!function(e){var t=e.attributes,n=e.clientId,r=e.setAttributes,a=t.passthroughAttributes,o=Object(y.useSelect)((function(e){var r=e("core/block-editor"),o=(0,r.getBlockAttributes)((0,r.getBlockHierarchyRootClientId)(n)),i=Object(f.mapValues)(a,(function(e){return o[e]}));return{attributesToSync:Object(f.pickBy)(i,(function(e,n){return e!==t[n]}))}})).attributesToSync;Object(p.useEffect)((function(){Object(f.isEmpty)(o)||r(o)}),[o,r])}({attributes:n,clientId:i,setAttributes:d});var x=v?Object(h.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},S=x.gradientClass,A=x.gradientValue,P=x.setGradient,N=m()("wp-block-button",o),T=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)),F=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)(h.RichText,{allowedFormats:"input"===w?[]:void 0,className:T,disableLineBreaks:"input"===w,onChange:function(e){var t="input"===w?e.replace(/<br>/gim," "):e;d({text:t})},placeholder:C||Object(a.__)("Add text…","jetpack"),style:F,value:E,withoutInteractiveFormatting:!0}),Object(p.createElement)(h.InspectorControls,null,Object(p.createElement)(_,{backgroundColor:r,fallbackBackgroundColor:c,fallbackTextColor:s,gradientValue:A,setBackgroundColor:b,setGradient:P,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 C={title:Object(a.__)("Button","jetpack"),icon:w,category:"layout",keywords:[],supports:{html:!1,inserter:!1,align:["left","right"]},styles:[{name:"fill",label:Object(a.__)("Fill","jetpack"),isDefault:!0},{name:"outline",label:Object(a.__)("Outline","jetpack")}],attributes:i,edit:O,save:function(e){var t,n=e.attributes,r=e.blockName,a=e.uniqueId,o=n.backgroundColor,i=n.borderRadius,c=n.className,l=n.customBackgroundColor,s=n.customGradient,d=n.customTextColor,b=n.gradient,f=n.saveInPostContent,g=n.text,j=n.textColor,k=n.url;if(!f)return null;var _=Object(h.getColorClassName)("background-color",o),y=v?Object(h.__experimentalGetGradientClass)(b):void 0,O=Object(h.getColorClassName)("color",j),w=m()("wp-block-button","jetpack-submit-button",c,u()({},"wp-block-jetpack-".concat(r),r)),C=m()("wp-block-button__link",(t={"has-text-color":j||d},u()(t,O,O),u()(t,"has-background",o||b||l||s),u()(t,_,_),u()(t,y,y),u()(t,"no-border-radius",0===i),t)),E={background:s||void 0,backgroundColor:_||s||b?void 0:l,color:O?void 0:d,borderRadius:i?i+"px":void 0};return Object(p.createElement)("div",{className:w},Object(p.createElement)(h.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:k,id:a,rel:"noopener noreferrer",role:"button",style:E,tagName:"a",target:"_blank",value:g}))}};Object(r.a)("button",C)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(13),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(7),d=n.n(p),m=n(6);var h={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,i=e.customTextColor,c=e.eventId,l=e.text,s=e.textColor,p=e.url,h=Object(m.getColorClassName)("color",s),b=Object(m.getColorClassName)("background-color",n),f=d()("wp-block-button__link",(t={"has-text-color":s||i},u()(t,h,h),u()(t,"has-background",n||o),u()(t,b,b),u()(t,"no-border-radius",0===r),t)),g={backgroundColor:b?void 0:o,color:h?void 0:i,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(c),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)}},b=n(14),f=n.n(b),g=n(4);var j=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"],v=[h,{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(c.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,i=e.customTextColor,c=e.eventId,l=e.text,s=e.textColor,p=e.url,h=Object(m.getColorClassName)("color",s),b=Object(m.getColorClassName)("background-color",n),f=d()("wp-block-button__link",(t={"has-text-color":s||i},u()(t,h,h),u()(t,"has-background",n||o),u()(t,b,b),u()(t,"no-border-radius",0===r),t)),g={backgroundColor:b?void 0:o,color:h?void 0:i,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(c),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(8),_=n.n(k),y=n(12),O=n.n(y),w=n(9),C=n.n(w),E=n(10),x=n.n(E),S=n(5),A=n.n(S),P=n(11),N=n.n(P);function T(e,t){var n=Object(a.createElement)("a",{href:e},e);t(Object(c.createBlock)("core/paragraph",{content:Object(a.renderToString)(n)}))}function F(e){if(!e)return null;var t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}var B=n(34),I=n(22),M=n(125),L=n.n(M),R=n(63),D=n(54),z=(n(187),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,c=new Array(r),s=0;s<r;s++)c[s]=arguments[s];return n=C()(this,(e=x()(t)).call.apply(e,[this].concat(c))),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,i=r.style;if(e&&W!==e&&"modal"!==i){var c={eventId:F(e),url:e};Object(D.a)(c.url,n.setIsResolvingUrl).then((function(e){var t=Object(B.a)(l,f()({},c,{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,c=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)(i.Button,{isLink:!0,onClick:function(){return T(c,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&&!V.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)(i.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,i=t.setAttributes,c=[{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:L.a,alt:Object(o.__)("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:Object(o.__)("Button & Modal","jetpack")}];return Object(a.createElement)(R.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:c,onSelectStyle:i,activeStyle:e,attributes:n,viewportWidth:130})}},{key:"renderBlockControls",value:function(){var e=this;return Object(a.createElement)(m.BlockControls,null,Object(a.createElement)(i.Toolbar,null,Object(a.createElement)(i.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,c=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)(i.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:$}),notices:r},Object(a.createElement)("form",{onSubmit:this.submitForm},Object(a.createElement)("input",{type:"url",value:c,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)(i.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)(i.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)(i.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(i.withNotices)(z);var H=n(18),q={name:"jetpack/button",attributes:{element:"a",text:Object(o._x)("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},V=/^\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",K=Object(o.__)("Eventbrite Checkout","jetpack"),$={src:Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(i.G,{id:"eventbrite-icon"},Object(a.createElement)(i.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"}))),foreground:"#555d66"},Z={title:K,description:Object(o.__)("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:$,category:Object(H.a)()?"embed":"jetpack",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&&(V.test(e.textContent)||G.test(e.textContent))},transform:function(e){return Object(c.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(19),a=n(14),o=n.n(a),i=n(4),c=n(30),l=n(8),s=n.n(l),u=n(12),p=n.n(u),d=n(9),m=n.n(d),h=n(10),b=n.n(h),f=n(5),g=n.n(f),j=n(11),v=n.n(j),k=n(3),_=n.n(k),y=n(0),O=n(21),w=n.n(O),C=n(1),E=n(2),x=n(6),S=n(7),A=n.n(S),P=(n(199),n(20)),N=n.n(P),T=n(26),F=n(17);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,i=void 0===o?[]:o;if("string"==typeof a.label&&(i=[].concat(N()(i),[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,b()(t).apply(this,arguments)),_()(g()(e),"select",(function(t){(e.props.completer.getOptionCompletion||{})(t),e.reset()})),_()(g()(e),"reset",(function(){e.setState(e.constructor.getInitialState())})),_()(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()})),_()(g()(e),"onKeyDown",(function(t){var n=e.state,r=n.isOpen,a=n.selectedIndex,o=n.filteredOptions;if(r){var i;switch(t.keyCode){case T.UP:i=(0===a?o.length:a)-1,e.setState({selectedIndex:i});break;case T.DOWN:i=(a+1)%o.length,e.setState({selectedIndex:i});break;case T.ENTER:e.select(o[a]);break;case T.LEFT:case T.RIGHT:case T.ESCAPE:return void e.reset();default:return}t.preventDefault(),t.stopPropagation()}})),e.debouncedLoadOptions=Object(i.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):[]}})),i=B(o),c=i.length===n.state.filteredOptions.length?n.state.selectedIndex:0;n.setState((r={},_()(r,"options",o),_()(r,"filteredOptions",i),_()(r,"selectedIndex",c),_()(r,"isOpen",i.length>0),r)),n.announce(i)}}))}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(C.sprintf)(Object(C._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(C.__)("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,c=r.completer,l=this.state,s=l.selectedIndex,u=l.filteredOptions,p=(u[s]||{}).key,d=void 0===p?"":p,m=c.className,h=u.length>0,b=h?"components-autocomplete-listbox-".concat(o):null,f=h?"components-autocomplete-item-".concat(o,"-").concat(d):null;return Object(y.createElement)("div",{className:"components-autocomplete"},a({isExpanded:h,listBoxId:b,activeId:f,onChange:t,onKeyDown:n}),h&&Object(y.createElement)(E.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},Object(y.createElement)("div",{id:b,role:"listbox",className:"components-autocomplete__results"},Object(i.map)(u,(function(t,n){return Object(y.createElement)(E.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}(y.Component),M=Object(F.compose)([E.withSpokenMessages,F.withInstanceId,E.withFocusOutside])(I),L=Object(C.__)("Add a marker…","jetpack"),R=function(e){function t(){var e;return s()(this,t),e=m()(this,b()(t).apply(this,arguments)),_()(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})),_()(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()}))})),_()(g()(e),"onReset",(function(){e.textRef.current.value=null})),e.textRef=Object(y.createRef)(),e.containerRef=Object(y.createRef)(),e.state={isEmpty:!0},e.autocompleter={name:"placeSearch",options:e.search,isDebounced:!0,getOptionLabel:function(e){return Object(y.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(y.createElement)("div",{ref:this.containerRef},Object(y.createElement)(E.BaseControl,{label:t,className:"components-location-search"},Object(y.createElement)(M,{completer:this.autocompleter,onReset:this.onReset},(function(t){var n=t.isExpanded,r=t.listBoxId,a=t.activeId,o=t.onChange,i=t.onKeyDown;return Object(y.createElement)(E.TextControl,{placeholder:L,ref:e.textRef,onChange:o,"aria-expanded":n,"aria-owns":r,"aria-activedescendant":a,onKeyDown:i})}))))}}]),t}(y.Component);R.defaultProps={onError:function(){}};var D=R,z=function(e){function t(){return s()(this,t),m()(this,b()(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(y.createElement)(E.Button,{className:"component__add-point"},Object(C.__)("Add marker","jetpack"),Object(y.createElement)(E.Popover,{className:"component__add-point__popover"},Object(y.createElement)(E.Button,{className:"component__add-point__close",onClick:t},Object(y.createElement)(E.Dashicon,{icon:"no"})),Object(y.createElement)(D,{onAddPoint:n,label:Object(C.__)("Add a location","jetpack"),apiKey:a,onError:r})))}}]),t}(y.Component);z.defaultProps={onAddPoint:function(){},onClose:function(){},onError:function(){}};var U=z,H=(n(200),function(e){function t(){var e;return s()(this,t),e=m()(this,b()(t).apply(this,arguments)),_()(g()(e),"onDeletePoint",(function(t){var n=parseInt(t.target.getAttribute("data-id")),r=e.props,a=r.points,o=r.onChange,i=a.slice(0);i.splice(n,1),o(i)})),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,i=a.slice(0);i[n][e]=t,o(i)}},{key:"render",value:function(){var e=this,t=this.props.points.map((function(t,n){return Object(y.createElement)(E.PanelBody,{title:t.placeTitle,key:t.id,initialOpen:!1},Object(y.createElement)(E.TextControl,{label:"Marker Title",value:t.title,onChange:function(t){return e.setMarkerField("title",t,n)}}),Object(y.createElement)(E.TextareaControl,{label:"Marker Caption",value:t.caption,rows:"3",onChange:function(t){return e.setMarkerField("caption",t,n)}}),Object(y.createElement)(E.Button,{"data-id":n,onClick:e.onDeletePoint,className:"component__locations__delete-btn"},Object(y.createElement)(E.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))}));return Object(y.createElement)("div",{className:"component__locations"},Object(y.createElement)(E.Panel,{className:"component__locations__panel"},t))}}]),t}(y.Component));H.defaultProps={points:Object.freeze([]),onChange:function(){}};var q=H,V=n(97),G=n(127),W=n.n(G),K=n(16),$=n(38),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,b()(t).apply(this,arguments)),_()(g()(e),"addPoint",(function(t){var n=e.props,r=n.attributes,a=n.setAttributes,o=r.points,i=o.slice(0),c=!1;o.map((function(e){e.id===t.id&&(c=!0)})),c||(i.push(t),a({points:i}),e.setState({addPointVisibility:!1}))})),_()(g()(e),"updateAlignment",(function(t){e.props.setAttributes({align:t}),setTimeout(e.mapRef.current.sizeMap,0)})),_()(g()(e),"updateAPIKeyControl",(function(t){e.setState({apiKeyControl:t.target.value})})),_()(g()(e),"updateAPIKey",(function(){var t=e.props.noticeOperations,n=e.state.apiKeyControl;t.removeAllNotices(),n&&e.apiCall(n,"POST")})),_()(g()(e),"removeAPIKey",(function(){e.apiCall(null,"DELETE")})),_()(g()(e),"onError",(function(t,n){var r=e.props.noticeOperations;r.removeAllNotices(),r.createErrorNotice(n)})),_()(g()(e),"onHeightChange",(function(t){var n=e.props,r=n.attributes,a=n.setAttributes,o=r.mapHeight,i=parseInt(t.target.value,10);isNaN(i)?i=null:null==o?i=e.mapRef.current.mapRef.current.offsetHeight:i<400&&(i=400),a({mapHeight:i}),setTimeout(e.mapRef.current.sizeMap,0)})),_()(g()(e),"onMapResize",(function(t,n,r,a){var o=e.props,i=o.onResizeStop,c=o.setAttributes;i(),c({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(y.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,i="wpcom"===a?"":n;e.setState({apiState:o,apiKey:n,apiKeyControl:i,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,i=t.notices,l=t.isSelected,s=t.instanceId,u=t.onResizeStart,p=a.mapDetails,d=a.points,m=a.zoom,h=a.mapCenter,b=a.markerColor,f=a.align,g=a.preview,j=a.scrollToZoom,v=a.mapHeight,k=a.showFullscreenButton,_=this.state,O=_.addPointVisibility,w=_.apiKey,S=_.apiKeyControl,P=_.apiKeySource,N=_.apiState,T=_.apiRequestOutstanding,F=Object(y.createElement)(y.Fragment,null,Object(y.createElement)(x.BlockControls,null,Object(y.createElement)(x.BlockAlignmentToolbar,{value:f,onChange:this.updateAlignment,controls:["center","wide","full"]}),Object(y.createElement)(E.Toolbar,null,Object(y.createElement)(E.IconButton,{icon:c.a.markerIcon,label:Object(C.__)("Add a marker","jetpack"),onClick:function(){return e.setState({addPointVisibility:!0})}}))),Object(y.createElement)(x.InspectorControls,null,Object(y.createElement)(x.PanelColorSettings,{title:Object(C.__)("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:b,onChange:function(e){return r({markerColor:e})},label:Object(C.__)("Marker Color","jetpack")}]}),Object(y.createElement)(E.PanelBody,{title:Object(C.__)("Map Settings","jetpack")},Object(y.createElement)(E.BaseControl,{label:Object(C.__)("Height in pixels","jetpack"),id:"block-jetpack-map-height-input-".concat(s)},Object(y.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(y.createElement)(E.RangeControl,{label:Object(C.__)("Zoom level","jetpack"),help:d.length>1&&Object(C.__)("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(y.createElement)(E.ToggleControl,{label:Object(C.__)("Show street names","jetpack"),checked:p,onChange:function(e){return r({mapDetails:e})}}),Object(y.createElement)(E.ToggleControl,{label:Object(C.__)("Scroll to zoom","jetpack"),help:Object(C.__)("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:j,onChange:function(e){return r({scrollToZoom:e})}}),Object(y.createElement)(E.ToggleControl,{label:Object(C.__)("Show Fullscreen Button","jetpack"),help:Object(C.__)("Allow your visitors to display the map in fullscreen.","jetpack"),checked:k,onChange:function(e){return r({showFullscreenButton:e})}})),d.length?Object(y.createElement)(E.PanelBody,{title:Object(C.__)("Markers","jetpack"),initialOpen:!1},Object(y.createElement)(q,{points:d,onChange:function(e){r({points:e})}})):null,Object(y.createElement)(E.PanelBody,{title:Object(C.__)("Mapbox Access Token","jetpack"),initialOpen:!1},Object(y.createElement)(E.TextControl,{help:"wpcom"===P&&Object(y.createElement)(y.Fragment,null,Object(C.__)("You can optionally enter your own access token.","jetpack")," ",Object(y.createElement)(E.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},Object(C.__)("Find it on Mapbox","jetpack"))),label:Object(C.__)("Mapbox Access Token","jetpack"),value:S,onChange:function(t){return e.setState({apiKeyControl:t})}}),Object(y.createElement)(E.ButtonGroup,null,Object(y.createElement)(E.Button,{type:"button",onClick:this.updateAPIKey,disabled:!S||S===w,isDefault:!0},Object(C.__)("Update Token","jetpack")),Object(y.createElement)(E.Button,{type:"button",onClick:this.removeAPIKey,disabled:"wpcom"===P,isDefault:!0},Object(C.__)("Remove Token","jetpack")))))),B=Object(y.createElement)(E.Placeholder,{icon:c.a.icon},Object(y.createElement)(E.Spinner,null)),I=Object(y.createElement)(y.Fragment,null,Object(C.__)("To use the map block, you need an Access Token.","jetpack"),Object(y.createElement)("br",null),Object(y.createElement)(E.ExternalLink,{href:"https://www.mapbox.com"},Object(C.__)("Create an account or log in to Mapbox.","jetpack")),Object(y.createElement)("br",null),Object(C.__)("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),M=Object(y.createElement)(E.Placeholder,{icon:c.a.icon,label:Object(C.__)("Map","jetpack"),notices:i,instructions:I},Object(y.createElement)(y.Fragment,null,Object(y.createElement)("form",null,Object(y.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:T,placeholder:Object(C.__)("Paste Token Here","jetpack"),value:S,onChange:this.updateAPIKeyControl}),Object(y.createElement)(E.Button,{isLarge:!0,isSecondary:!0,disabled:T||!S||S.length<1,onClick:this.updateAPIKey},Object(C.__)("Set Token","jetpack"))))),L=l&&d.length<=1,R=Object($.a)(c.a.styles,a.className),D=Object(y.createElement)(y.Fragment,null,F,Object(y.createElement)("div",{className:n},Object(y.createElement)(E.ResizableBox,{className:A()({"is-selected":l}),size:{height:v||"auto",width:"100%"},grid:[10,10],showHandle:l,minHeight:400,enable:Z,onResizeStart:u,onResizeStop:this.onMapResize},Object(y.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},Object(y.createElement)(V.a,{ref:this.mapRef,scrollToZoom:L,showFullscreenButton:k,mapStyle:R||"default",mapDetails:p,mapHeight:v,points:d,zoom:m,mapCenter:h,markerColor:b,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(y.createElement)(U,{onAddPoint:this.addPoint,onClose:function(){return e.setState({addPointVisibility:!1})},apiKey:w,onError:this.onError,tagName:"AddPoint"})))))),z=c.a.styles.find((function(e){return e.name===R})),H=Object(y.createElement)("div",null,Object(y.createElement)("img",{alt:Object(C.__)("Map Preview","jetpack"),src:z?z.preview:W.a}));return Object(y.createElement)(y.Fragment,null,o,g&&H,!g&&0===N&&B,!g&&1===N&&M,!g&&2===N&&D)}}]),t}(y.Component),Y=Object(F.compose)([E.withNotices,Object(K.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,b()(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,i=e.mapCenter,l=e.markerColor,s=e.scrollToZoom,u=e.mapHeight,p=e.showFullscreenButton,d=Object($.a)(c.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(y.createElement)("li",{key:t},Object(y.createElement)("a",{href:a},e.title))})),h=t?"align".concat(t):null;return Object(y.createElement)("div",{className:h,"data-map-style":d,"data-map-details":r,"data-points":JSON.stringify(a),"data-zoom":o,"data-map-center":JSON.stringify(i),"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(y.createElement)("ul",null,m))}}]),t}(y.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(i.omit)(e,"mapStyle"),{className:t})},save:function(e){function t(){return s()(this,t),m()(this,b()(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,i=e.mapCenter,c=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(y.createElement)("li",{key:t},Object(y.createElement)("a",{href:a},e.title))})),d=t?"align".concat(t):null;return Object(y.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(i),"data-marker-color":c,"data-scroll-to-zoom":l||null,"data-map-height":s||null,"data-show-fullscreen-button":u||null},a.length>0&&Object(y.createElement)("ul",null,p))}}]),t}(y.Component)},ee=(n(156),n(201),c.a.name),te={title:c.a.title,icon:c.a.icon,category:c.a.category,keywords:c.a.keywords,description:c.a.description,attributes:c.a.attributes,supports:c.a.supports,styles:c.a.styles,getEditWrapperProps:function(e){var t=e.align;if(-1!==c.a.validAlignments.indexOf(t))return{"data-align":t}},edit:Y,save:Q,example:c.a.example,deprecated:[{attributes:Object(i.omit)(c.a.attributes,"showFullscreenButton"),migrate:function(e){return o()({},e,{showFullscreenButton:!0})},save:Q},X]};Object(r.a)(ee,te)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c={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"}},l=n(4);var 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"]'))}},{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,i=t.customTextButtonColor,c=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(i,'" submit_button_text="').concat(c,'" submit_button_classes="').concat(r,'" show_subscribers_total="').concat(n,'" ]'))}}],u=n(14),p=n.n(u),d=n(3),m=n.n(d),h=n(15),b=n.n(h),f=n(7),g=n.n(f),j=n(21),v=n.n(j),k=n(6),_=n(17),y=(n(161),n(34)),O=window.getComputedStyle,w=!!k.__experimentalUseGradient,C=Object(i.withFallbackStyles)((function(e,t){var n=t.buttonBackgroundColor,r=t.textColor,a=n&&n.color,o=r&&r.color,i=e.querySelector('[contenteditable="true"]');return{fallbackButtonBackgroundColor:a||!e?void 0:O(i).backgroundColor,fallbackTextColor:o||!e?void 0:O(i).color}}));var E=Object(_.compose)([Object(k.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),Object(k.withFontSizes)("fontSize"),C])((function(e){var t,n,r,s=e.className,u=e.attributes,d=e.setAttributes,h=e.emailFieldBackgroundColor,f=e.buttonBackgroundColor,j=e.setButtonBackgroundColor,_=e.fallbackButtonBackgroundColor,O=e.textColor,C=e.fallbackTextColor,E=e.setTextColor,x=e.borderColor,S=e.fontSize,A=Object(y.a)(c,u);Object(l.isEqual)(A,u)||d(A);var P,N,T=A.borderRadius,F=A.borderWeight,B=A.padding,I=A.spacing,M=A.submitButtonText,L=A.subscribePlaceholder,R=A.showSubscribersTotal,D=A.buttonOnNewLine,z=Object(a.useState)(""),U=b()(z,2),H=U[0],q=U[1],V=Object(a.useState)(""),G=b()(V,2),W=G[0],K=G[1],$=w?Object(k.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},Z=w?Object(k.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},J=(t={"no-border-radius":0===T},m()(t,S.class,S.class),m()(t,"has-text-color",O.color),m()(t,O.class,O.class),t),Y=p()({},J,(n={"has-background":h.color||$.gradientValue},m()(n,h.class,!$.gradientValue&&h.class),m()(n,$.gradientClass,$.gradientClass),n)),Q=p()({},J,(r={"has-background":f.color||Z.gradientValue},m()(r,f.class,!Z.gradientValue&&f.class),m()(r,Z.gradientClass,Z.gradientClass),r)),X=function(e){return e||10},ee={color:O.color,borderColor:x.color,borderRadius:T?T+"px":"0px",borderWidth:F?F+"px":"1px",fontSize:S.size?S.size+"px":"16px",padding:(P=B,N=P||15,N+"px "+Math.round(1.5*N)+"px "+N+"px "+Math.round(1.5*N)+"px")},te=p()({},ee,{},!h.color&&$.gradientValue?{background:$.gradientValue}:{backgroundColor:h.color}),ne=p()({},ee,{},!f.color&&Z.gradientValue?{background:Z.gradientValue}:{backgroundColor:f.color},{},D?{marginTop:X(I)+"px"}:{marginLeft:X(I)+"px"});return Object(a.useEffect)((function(){v()({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)),K(e.count)):(q(Object(o.__)("Subscriber count unavailable","jetpack")),K(0))}))}),[]),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(k.InspectorControls,null,w&&Object(a.createElement)(k.__experimentalPanelColorGradientSettings,{title:Object(o.__)("Color Settings","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:f.color,onColorChange:j,gradientValue:Z.gradientValue,onGradientChange:Z.setGradient,label:Object(o.__)("Button Background Color","jetpack")},{colorValue:O.color,onColorChange:E,label:Object(o.__)("Button Text Color","jetpack")},{colorValue:x.color,onColorChange:function(e){d({borderColor:e,customBorderColor:e})},label:Object(o.__)("Border Color","jetpack")}],initialOpen:!0},Object(a.createElement)(k.ContrastChecker,{fontSize:S.size,textColor:O.color,backgroundColor:h.color,fallbackButtonBackgroundColor:_,fallbackTextColor:C})),!w&&Object(a.createElement)(k.PanelColorSettings,{title:Object(o.__)("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:f.color,onChange:j,label:Object(o.__)("Button Background Color","jetpack")},{value:O.color,onChange:E,label:Object(o.__)("Button Text Color","jetpack")},{value:x.color,onColorChange:function(e){d({borderColor:e,customBorderColor:e})},label:Object(o.__)("Border Color","jetpack")}],initialOpen:!1},Object(a.createElement)(k.ContrastChecker,{fontSize:S.size,textColor:O.color,backgroundColor:h.color,fallbackButtonBackgroundColor:_,fallbackTextColor:C})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Text Settings"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},Object(a.createElement)(k.FontSizePicker,{withSlider:!0,value:S.size,onChange:function(e){var t=e||16;d({fontSize:t,customFontSize:t})}})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Border Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},Object(a.createElement)(i.RangeControl,{value:T,label:Object(o.__)("Border Radius","jetpack"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){return d({borderRadius:e})}}),Object(a.createElement)(i.RangeControl,{value:F,label:Object(o.__)("Border Weight","jetpack"),min:0,max:15,initialPosition:1,allowReset:!0,onChange:function(e){return d({borderWeight:e})}})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Spacing Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},Object(a.createElement)(i.RangeControl,{value:B,label:Object(o.__)("Space Inside","jetpack"),min:5,max:50,initialPosition:15,allowReset:!0,onChange:function(e){return d({padding:e})}}),Object(a.createElement)(i.RangeControl,{value:I,label:Object(o.__)("Space Between","jetpack"),min:0,max:50,initialPosition:10,allowReset:!0,onChange:function(e){return d({spacing:e})}})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Display Settings"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Show subscriber count","jetpack"),checked:R,onChange:function(){d({showSubscribersTotal:!R})},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)(i.ToggleControl,{label:Object(o.__)("Place button on new line","jetpack"),checked:D,onChange:function(){d({buttonOnNewLine:!D})}}))),Object(a.createElement)("div",{className:g()(s,"wp-block-jetpack-subscriptions__supports-newline",D?"wp-block-jetpack-subscriptions__use-newline":void 0,R?"wp-block-jetpack-subscriptions__show-subs":void 0)},Object(a.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},Object(a.createElement)(i.TextControl,{placeholder:L,disabled:!0,className:g()(Y,"wp-block-jetpack-subscriptions__textfield"),style:te}),Object(a.createElement)(k.RichText,{className:g()(Q,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:function(e){return d({submitButtonText:e})},style:ne,value:M,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),R&&Object(a.createElement)("p",{className:"wp-block-jetpack-subscriptions__subscount"},H)))}));var x=n(18),S={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:Object(a.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(i.Rect,{x:"4.75",y:"6.75",width:"14.5",height:"10.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(a.createElement)(i.Path,{d:"M19 7L13.3609 12.2363C12.5935 12.9489 11.4065 12.9489 10.6391 12.2363L5 7",stroke:"black",strokeWidth:"1.5",strokeLinejoin:"bevel",fill:"none"})),category:Object(x.a)()?"grow":"jetpack",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:c,edit:E,save:function(e){var t=e.className,n=e.attributes,r=n.subscribePlaceholder,o=n.showSubscribersTotal,i=n.buttonOnNewLine,c=n.submitButtonText,l=n.emailFieldBackgroundColor,s=n.customEmailFieldBackgroundColor,u=n.emailFieldGradient,p=n.customEmailFieldGradient,d=n.buttonBackgroundColor,m=n.customButtonBackgroundColor,h=n.buttonGradient,b=n.customButtonGradient,f=n.textColor,j=n.customTextColor,v=n.fontSize,_=n.customFontSize,y=n.borderRadius,O=n.borderWeight,w=n.borderColor,C=n.customBorderColor,E=n.padding,x=n.spacing,S=!!k.__experimentalGetGradientClass,A=Object(k.getColorClassName)("color",f),P=Object(k.getFontSizeClass)(v),N=Object(k.getColorClassName)("border-color",w),T=Object(k.getColorClassName)("background-color",d),F=S?Object(k.__experimentalGetGradientClass)(h):void 0,B=Object(k.getColorClassName)("background-color",l),I=S?Object(k.__experimentalGetGradientClass)(u):void 0,M=g()(0===y?"no-border-radius":void 0,P,N),L=g()(M,f?"has-text-color":void 0,A,d||h?"has-background":void 0,T,F),R=g()(M,B,I),D=!B&&p?p:s,z=!T&&b?b:m;return Object(a.createElement)("div",{className:g()(t,"wp-block-jetpack-subscriptions__supports-newline",i?"wp-block-jetpack-subscriptions__use-newline":void 0,o?"wp-block-jetpack-subscriptions__show-subs":void 0)},Object(a.createElement)(a.RawHTML,null,'\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="'.concat(r,'"\n\t\t\t\tshow_subscribers_total="').concat(o,'"\n\t\t\t\tbutton_on_newline="').concat(i,'"\n\t\t\t\tsubmit_button_text="').concat(c,'"\n\t\t\t\tcustom_background_emailfield_color="').concat(D,'"\n\t\t\t\tcustom_background_button_color="').concat(z,'"\n\t\t\t\tcustom_text_button_color="').concat(j,'"\n\t\t\t\tcustom_font_size="').concat(_||16,'"\n\t\t\t\tcustom_border_radius="').concat(y||0,'"\n\t\t\t\tcustom_border_weight="').concat(O||1,'"\n\t\t\t\tcustom_border_color="').concat(C,'"\n\t\t\t\tcustom_padding="').concat(E||15,'"\n\t\t\t\tcustom_spacing="').concat(x||10,'"\n\t\t\t\tsubmit_button_classes="').concat(L,'"\n\t\t\t\temail_field_classes="').concat(R,'"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]')))},example:{attributes:{}},deprecated:s};Object(r.a)("subscriptions",S)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i={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}},c=n(20),l=n.n(c),s=n(3),u=n.n(s),p=n(15),d=n.n(p),m=n(7),h=n.n(m),b=n(4),f=n(6),g=n(2),j=n(34),v=n(80),k=n(21),_=n.n(k);var y=n(16),O=n(28),w=n(61);function C(e){var t=e.src,n=e.alt,r=Object(a.useState)(!1),o=d()(r,2),i=o[0],c=o[1],l=Object(a.useState)("auto"),s=d()(l,2),u=s[0],p=s[1],m=Object(a.useRef)(),b=function(){c(!0),p("auto")};Object(a.useEffect)((function(){var e=t;if(e){var n=new window.Image;n.src=e,n.onload=b}m.current&&p(m.current.parentNode.getBoundingClientRect().width)}),[t]);var f=h()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),g=i?{}:{height:u},j=h()({"is-loaded":i});return Object(a.createElement)("span",{style:g,className:f},Object(a.createElement)("img",{alt:n,className:j,ref:m,src:t}))}n(197);var E=Object(g.withNotices)((function(e){var t=e.attributes,n=e.className,r=e.isSelected,c=e.noticeOperations,s=e.noticeUI,p=e.setAttributes,m=t.accessToken,k=t.align,E=t.columns,x=t.count,S=t.instagramUser,A=t.isStackedOnMobile,P=t.spacing;Object(a.useEffect)((function(){var e=Object(j.a)(i,t);Object(b.isEqual)(e,t)||p(e)}),[t,p]);var N,T,F,B=Object(a.useState)(m),I=d()(B,2),M=I[0],L=I[1],R=function(){var e=Object(y.useSelect)((function(e){return{isAutoDraft:"auto-draft"===e("core/editor").getCurrentPost().status}})).isAutoDraft,t=Object(y.useDispatch)("core/editor").savePost,n=Object(a.useState)(),r=d()(n,2),o=r[0],i=r[1],c=Object(a.useState)(!1),l=d()(c,2),s=l[0],u=l[1],p=Object(w.a)();return Object(a.useEffect)((function(){p||o||s||(e?t():(u(!0),_()({path:Object(O.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((function(e){i(e),u(!1)}))))}),[p,e,s,t,o]),{isRequestingWpcomConnectUrl:s,wpcomConnectUrl:o}}(),D=R.isRequestingWpcomConnectUrl,z=R.wpcomConnectUrl,U=function(e){var t=e.accessToken,n=e.noticeOperations,r=e.setAttributes,i=e.setSelectedAccount,c=Object(a.useState)([]),l=d()(c,2),s=l[0],u=l[1],p=Object(a.useState)(!1),m=d()(p,2),h=m[0],f=m[1];return Object(a.useEffect)((function(){t&&(n.removeAllNotices(),f(!0),_()({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(b.isArray)(a))return n.createErrorNotice(Object(o.__)("An error occurred. Please try again later.","jetpack")),u([]),r({accessToken:void 0,instagramUser:void 0}),void i(void 0);Object(b.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}),i(void 0)})))}),[t,n,r,i]),{images:s,isLoadingGallery:h,setImages:u}}({accessToken:m,noticeOperations:c,setAttributes:p,setSelectedAccount:L}),H=U.images,q=U.isLoadingGallery,V=U.setImages,G=function(e){var t=e.accessToken,n=e.noticeOperations,r=e.selectedAccount,i=e.setAttributes,c=e.setImages,l=e.setSelectedAccount,s=Object(a.useState)(!1),u=d()(s,2),p=u[0],m=u[1],h=Object(a.useState)(!1),f=d()(h,2),g=f[0],j=f[1],k=Object(a.useState)([]),y=d()(k,2),O=y[0],w=y[1];return Object(a.useEffect)((function(){t||(j(!0),_()({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(b.find)(O,{token:r})||l(void 0)}),[r,l,O]),{connectToService:function(){n.removeAllNotices(),m(!0),_()({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();i({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(),i({accessToken:void 0,instagramUser:void 0}),c([])},isConnecting:p,isRequestingUserConnections:g,userConnections:O}}({accessToken:m,noticeOperations:c,selectedAccount:M,setAttributes:p,setImages:V,setSelectedAccount:L}),W=G.connectToService,K=G.disconnectFromService,$=G.isConnecting,Z=G.isRequestingUserConnections,J=G.userConnections,Y=Object(w.a)(),Q=x>H.length?H.length:x,X=!q&&(!m||Object(b.isEmpty)(H)),ee=!X,te=m&&q&&Object(b.isEmpty)(H),ne=!X&&!te,re=h()(n,u()({},"align".concat(k),k)),ae=h()("wp-block-jetpack-instagram-gallery__grid","wp-block-jetpack-instagram-gallery__grid-columns-".concat(E),{"is-stacked-on-mobile":A}),oe={gridGap:P},ie={padding:P},ce=function(){M&&"jetpack-new-instagram-connection"!==M?p({accessToken:M,instagramUser:Object(b.find)(J,{token:M}).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,T=[].concat(l()(Object(b.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"}]),F=$||Z||N&&!M,Object(a.createElement)("div",null,N&&Object(a.createElement)(g.RadioControl,{label:Object(o.__)("Select your Instagram account:","jetpack"),onChange:function(e){return L(e)},options:T,selected:M}),"jetpack-new-instagram-connection"===M&&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:F,isLarge:!0,isPrimary:!0,onClick:ce},$&&Object(o.__)("Connecting…","jetpack"),Z&&Object(o.__)("Loading your connections…","jetpack"),!$&&!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(b.times)(r?x:Q,(function(e){return Object(a.createElement)("span",{className:h()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:ie},function(e){if(H[e]){var n=H[e];return Object(a.createElement)(C,{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 K(m)}},Object(o.__)("Disconnect your account","jetpack")))),Object(a.createElement)(g.PanelBody,{title:Object(o.__)("Display Settings","jetpack")},function(){var e=H.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:E,onChange:function(e){return p({columns:e})},min:1,max:6}),Object(a.createElement)(g.RangeControl,{label:Object(o.__)("Image Spacing (px)","jetpack"),value:P,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(18),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:"instagram",category:Object(x.a)()?"embed":"jetpack",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:i,edit:E,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(19),a=n(1),o=n(13),i=n(32),c={backgroundColor:{type:"string",default:"ffffff",validator:i.a},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.a},textColor:{type:"string",default:"4D5055",validator:i.a},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:function(e){return!e||e.startsWith("https://calendly.com/")}}},l=n(14),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:i.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:i.a},textColor:{type:"string",default:"4D5055",validator:i.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:i.a},customTextButtonColor:{type:"string",validator:i.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)}},h=n(15),b=n.n(h),f=(n(108),n(123)),g=n.n(f),j=n(6),v=n(2),k=n(16),_=(n(109),n(152),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.G,{fill:"none",fillRule:"evenodd"},Object(u.createElement)(v.Rect,{height:"20.956522",rx:"3",stroke:"#656a74",strokeWidth:"2",width:"20.956522",x:"1",y:"2.043478"}),Object(u.createElement)(v.Rect,{fill:"#656a74",height:"4.869565",rx:"1",width:"2",x:"6.565217"}),Object(u.createElement)(v.Rect,{fill:"#656a74",height:"4.869565",rx:"1",width:"2",x:"14.652174"}),Object(u.createElement)(v.Path,{d:"m14.6086957 10.0869565c-.6956522-.57971012-1.6231885-.8695652-2.7826087-.8695652-1.7391305 0-3.47826091 1.5652174-3.47826091 3.6521739s1.73913041 3.6521739 3.47826091 3.6521739c1.1594202 0 2.0869565-.3478261 2.7826087-1.0434782",stroke:"#656a74"})))),y=n(34),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"),i=r.get("text_color"),c=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(c)&&(t.backgroundColor=a),o&&o.match(c)&&(t.primaryColor=o),i&&i.match(c)&&(t.textColor=i),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[1]:(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 i=function(e){var t=e.match(/color: '([^']*?)'/);if(t)return t[1]}(e);i&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=i)}return n}}},C=n(63),E=n(54);var x=Object(v.withNotices)((function(e){var t=e.attributes,n=e.className,r=e.clientId,i=e.name,l=e.noticeOperations,d=e.noticeUI,m=e.setAttributes,h=Object(o.getBlockDefaultClassName)(i),f=Object(y.a)(c,t);Object(p.isEqual)(f,t)||m(f);var O=f.backgroundColor,x=f.submitButtonText,S=f.hideEventTypeDetails,N=f.primaryColor,T=f.textColor,F=f.style,B=f.url,I=Object(u.useState)(""),M=b()(I,2),L=M[0],R=M[1],D=Object(u.useState)(!1),z=b()(D,2),U=z[0],H=z[1],q=Object(u.useState)({}),V=b()(q,2),G=V[0],W=V[1],K=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"!==F&&Object(E.a)(B,H).catch((function(){m({url:void 0}),K()}))}),[]);var $,Z=function(e){if(e){e.preventDefault();var t=w(L);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)})),W(t.buttonAttributes)}Object(E.a)(t.url,H).then((function(){var e=Object(y.a)(c,t);m(e),l.removeAllNotices()})).catch((function(){m({url:void 0}),K()}))}else K()}else K()},J=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("form",{onSubmit:Z},Object(u.createElement)("input",{type:"text",id:"embedCode",onChange:function(e){return R(e.target.value)},placeholder:Object(a.__)("Calendly web address or embed code…","jetpack"),value:L,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(h,"-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")))),Y=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"))),Q=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:_}),notices:d},J),X=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"".concat(h,"-overlay")}),Object(u.createElement)("iframe",{src:($=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:T}),"".concat(B,"?").concat($)),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),ee=Object(u.createElement)(j.InnerBlocks,{template:[[P.name,s()({},P.attributes,{},G,{passthroughAttributes:{url:"url"}})]],templateLock:"all"}),te=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("a",{style:{alignSelf:"flex-start",border:"none"},className:"wp-block-button__link"},x)),ne=[{value:"inline",label:Object(a.__)("Inline","jetpack")},{value:"link",label:Object(a.__)("Link","jetpack")}],re=Object(u.createElement)(u.Fragment,null,B&&Object(u.createElement)(C.a,{clientId:r,styleOptions:ne,onSelectStyle:m,activeStyle:F,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:Z,className:"".concat(h,"-embed-form-sidebar")},Object(u.createElement)("input",{type:"text",id:"embedCode",onChange:function(e){return R(e.target.value)},placeholder:Object(a.__)("Calendly web address or embed code…","jetpack"),value:L,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(h,"-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(U)return Y;var ae,oe="".concat(n," calendly-style-").concat(F);return Object(u.createElement)("div",{className:oe},re,B?"inline"===F?X:ae?te:ee:Q)}));var S=n(18),A="https://calendly.com/wordpresscom/jetpack-block-example",P={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:_,category:Object(S.a)()?"grow":"jetpack",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:c,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:A},innerBlocks:[P]},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(19),a=n(0),o=n(1),i=n(13),c=n(16),l=n(4),s=function(e){return e.map((function(e){return e.value}))},u=[{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"}],p=s(u),d=function(e){return Object(l.compact)([{value:"standard",label:Object(o.__)("Standard (224 x 301 pixels)","jetpack")},{value:"tall",label:Object(o.__)("Tall (288 x 490 pixels)","jetpack")},{value:"wide",label:Object(o.__)("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&{value:"button",label:Object(o.__)("Button (210 x 113 pixels)","jetpack")}])},m=function(e){return s(d(e))},h=Object(c.select)("core/block-editor").getSettings().siteLocale,b=!Object(l.isEmpty)(h)&&p.includes(h)?h:"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:b,type:"string",validValues:p},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}},g=n(3),j=n.n(g),v=n(15),k=n.n(v),_=(n(108),n(7)),y=n.n(_),O=n(6),w=n(2),C=(n(118),Object(a.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},Object(a.createElement)(w.Path,{fill:"#555d66",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"}))),E=n(22),x=n(27),S=n.n(x),A=/^\s*(http[s]?:\/\/|\<script)/;function P(e){var t=Object(a.useState)(""),n=k()(t,2),r=n[0],i=n[1],c=function(e,t){var n=Object(a.useState)([]),r=k()(n,2),o=r[0],i=r[1],c=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 i(Object(l.unionBy)(o,e.items,"rid"))}))}),500),[o]);return Object(a.useEffect)((function(){Object(l.isEmpty)(e)||A.test(e)||c(e)}),[e]),o}(r,20),s=Object(a.useState)(e.rids||[]),u=k()(s,2),p=u[0],d=u[1],m=/^(\d+)$|\(\#(\d+)\)$/,h=c.filter((function(e){return p.indexOf(e.rid.toString())})).map((function(e){return e.name+" (#".concat(e.rid,")")})),b=Object(a.createElement)(w.FormTokenField,S()({value:p,suggestions:h,saveTransform:function(e){return A.test(e)?"":e.trim()},onInputChange:i,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)}},b,Object(a.createElement)(w.Button,{isSecondary:!0,isLarge:!0,type:"submit"},Object(o.__)("Embed","jetpack"))):b)}var N=n(63),T=n(34),F=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,B=/restref=([0-9]+)&/,I=/rid=([0-9]+)&/,M=function(e){if(e)return function(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 i=n.get("domain");i&&(o.domain=i);var c=n.get("iframe");c&&(o.iframe=c);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(F);return t&&t[1]?t[1]:B.test(e)||I.test(e)?e:void 0}(e))};var L=Object(w.withNotices)((function(e){var t,n=e.attributes,r=e.className,c=e.clientId,s=e.name,h=e.noticeOperations,b=e.noticeUI,g=e.setAttributes,v=Object(i.getBlockDefaultClassName)(s),_=Object(T.a)(f,n);Object(l.isEqual)(_,n)||g(_);var x=n.align,S=n.rid,A=n.style,F=n.iframe,B=n.domain,I=n.lang,L=n.newtab,R=n.negativeMargin,D=n.__isBlockPreview,z=Object(l.isEmpty)(S);Object(a.useEffect)((function(){if(h.removeAllNotices(),!z&&!D&&"wide"===A&&"wide"!==x&&"full"!==x){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"));h.createNotice({status:"warning",content:e})}}),[D,x,z,h,S,A]);var U,H,q,V,G,W=d(S),K=m(S),$=function(e){return S.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e]},Z=function(e){Array.isArray(e)?g({rid:e,style:e.length>1&&"button"===A?"standard":A}):function(e){var t=M(e);t||(h.removeAllNotices(),h.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(T.a)(f,t);g(n),h.removeAllNotices()}(e)},J=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.InspectorAdvancedControls,null,Object(a.createElement)(w.ToggleControl,{label:Object(o.__)("Load the widget in an iFrame (Recommended)","jetpack"),checked:F,onChange:function(){return g({iframe:!F})},className:"is-opentable"}),"button"===A&&Object(a.createElement)(w.ToggleControl,{label:Object(o.__)("Remove button margin","jetpack"),checked:R,onChange:function(){return g({negativeMargin:!R})}})),Object(a.createElement)(N.a,{clientId:c,styleOptions:W,onSelectStyle:function(e){g(e),"wide"===A&&"wide"===x&&g({align:""}),"wide"===e.style&&g({align:"wide"})},activeStyle:A,attributes:n,viewportWidth:150}),Object(a.createElement)(O.InspectorControls,null,Object(a.createElement)(w.PanelBody,{title:Object(o.__)("Settings","jetpack")},Object(a.createElement)(P,{rids:S,onChange:Z}),Object(a.createElement)(w.SelectControl,{label:Object(o.__)("Language","jetpack"),value:I,onChange:function(e){return g({lang:e})},options:u}),Object(a.createElement)(w.ToggleControl,{label:Object(o.__)("Open in a new window","jetpack"),checked:L,onChange:function(){return g({newtab:!L})}})))),Y=Object(E.b)()||Object(E.a)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",Q=Object(a.createElement)(w.Placeholder,{label:Object(o.__)("OpenTable Reservation","jetpack"),icon:Object(a.createElement)(O.BlockIcon,{icon:C}),instructions:Object(o.__)("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:b},Object(a.createElement)(P,{rids:S,onSubmit:Z}),Object(a.createElement)("div",{className:"".concat(v,"-placeholder-links")},Object(a.createElement)(w.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},Object(o.__)("Sign up for OpenTable","jetpack")),Object(a.createElement)(w.ExternalLink,{href:Y},Object(o.__)("Learn more","jetpack")))),X=y()(r,(t={},j()(t,"".concat(v,"-theme-").concat(A),!z&&K.includes(A)),j()(t,"is-placeholder",z),j()(t,"is-multi","multi"===$(A)[0]),j()(t,"align".concat(x),x),j()(t,"has-no-margin",R),t));return Object(a.createElement)(a.Fragment,null,b,Object(a.createElement)("div",{className:X},!z&&J,z?Q:(H=$(U||A),q=k()(H,2),V=q[0],G=q[1],Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"".concat(v,"-overlay")}),Object(a.createElement)("iframe",{title:Object(o.sprintf)(Object(o.__)("Open Table Preview %s","jetpack"),c),scrolling:"no",src:"https://www.opentable.com/widget/reservation/canvas?rid=".concat(Object(l.join)(S,"%2C"),"&type=").concat(V,"&theme=").concat(G,"&overlay=false&domain=").concat(B,"&lang=").concat(I&&p.includes(I)?I:"en-US","&newtab=").concat(L,"&disablega=true")})))))})),R=(n(157),n(18)),D={title:Object(o.__)("OpenTable","jetpack"),description:Object(o.__)("Allow visitors to book a reservation with OpenTable","jetpack"),icon:C,category:Object(R.a)()?"earn":"jetpack",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:L,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))})))},attributes:f,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")&&(I.test(e.textContent)||B.test(e.textContent))},transform:function(e){var t=M(e.textContent);return Object(i.createBlock)("jetpack/opentable",t)}}]}};Object(r.a)("opentable",D)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=["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(22),s=n(8),u=n.n(s),p=n(12),d=n.n(p),m=n(9),h=n.n(m),b=n(10),f=n.n(b),g=n(5),j=n.n(g),v=n(11),k=n.n(v),_=n(3),y=n.n(_),O=n(7),w=n.n(O),C=n(56),E=n.n(C),x=n(17),S=n(16),A=n(4),P=n(60),N=n(48),T=(n(272),n(133)),F=n.n(T),B=n(134),I=n.n(B),M=function(e){var t=e.title,n=void 0===t?"":t,r=e.content,i=void 0===r?"":r,c=e.formattedPrice,l=void 0===c?"":c,s=e.multiple,u=void 0!==s&&s,p=e.featuredMediaUrl,d=void 0===p?null:p,m=e.featuredMediaTitle,h=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:h}))),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)),i&&Object(a.createElement)("div",{className:"jetpack-simple-payments-description"},Object(a.createElement)("p",null,i)),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:F.a,srcSet:"".concat(I.a," 2x")}))))))},L=n(6),R=n(65),D=function(e){return function(t){return e({featuredMediaId:Object(A.get)(t,"id",0),featuredMediaUrl:Object(A.get)(t,"url",null),featuredMediaTitle:Object(A.get)(t,"title",null)})}},z=function(e){var t=e.featuredMediaId,n=e.featuredMediaUrl,r=e.featuredMediaTitle,c=e.setAttributes;return t?Object(a.createElement)("div",null,Object(a.createElement)(a.Fragment,null,Object(a.createElement)(L.BlockControls,null,Object(a.createElement)(i.Toolbar,null,Object(a.createElement)(L.MediaUpload,{onSelect:D(c),allowedTypes:["image"],value:t,render:function(e){var t=e.open;return Object(a.createElement)(R.a,{label:Object(o.__)("Edit Image","jetpack"),onClick:t})}}),Object(a.createElement)(i.ToolbarButton,{icon:"trash",title:Object(o.__)("Remove Image","jetpack"),onClick:function(){return c({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}}))),Object(a.createElement)("figure",null,Object(a.createElement)("img",{src:n,alt:r})))):Object(a.createElement)(L.MediaPlaceholder,{icon:Object(a.createElement)(L.BlockIcon,{icon:"format-image"}),labels:{title:Object(o.__)("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:D(c)})},U=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},H=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Object(P.a)(t),a=r.precision,o=r.symbol,i=e.toFixed(a);return n?"".concat(i," ").concat(Object(A.trimEnd)(o,".")):i},q=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=h()(this,(e=f()(t)).call.apply(e,[this].concat(a))),y()(j()(n),"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),y()(j()(n),"shouldInjectPaymentAttributes",!!n.props.attributes.productId),y()(j()(n),"validateAttributes",(function(){var e=n.validatePrice(),t=n.validateTitle(),r=n.validateEmail(),a=n.validateCurrency();return e&&t&&r&&a})),y()(j()(n),"validateCurrency",(function(){var e=n.props.attributes.currency;return c.includes(e)})),y()(j()(n),"validatePrice",(function(){var e=n.props.attributes,t=e.currency,r=e.price,a=Object(P.a)(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):U(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)})),y()(j()(n),"validateEmail",(function(){var e=n.props.attributes.email;return e?E.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)})),y()(j()(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)})),y()(j()(n),"handleEmailChange",(function(e){n.props.setAttributes({email:e}),n.setState({fieldEmailError:null})})),y()(j()(n),"handleFeaturedMediaSelect",(function(e){n.props.setAttributes({featuredMediaId:Object(A.get)(e,"id",0)})})),y()(j()(n),"handleContentChange",(function(e){n.props.setAttributes({content:e})})),y()(j()(n),"handlePriceChange",(function(e){e=parseFloat(e),isNaN(e)?n.props.setAttributes({price:void 0}):n.props.setAttributes({price:e}),n.setState({fieldPriceError:null})})),y()(j()(n),"handleCurrencyChange",(function(e){n.props.setAttributes({currency:e})})),y()(j()(n),"handleMultipleChange",(function(e){n.props.setAttributes({multiple:!!e})})),y()(j()(n),"handleTitleChange",(function(e){n.props.setAttributes({title:e}),n.setState({fieldTitleError:null})})),y()(j()(n),"getCurrencyList",c.map((function(e){var t=Object(P.a)(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(A.trimEnd)(t,"."))}}))),n}return k()(t,e),d()(t,[{key:"componentDidMount",value:function(){this.injectPaymentAttributes();var e=this.props,t=e.attributes,n=e.hasPublishAction;!t.productId&&n&&this.saveProduct()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.hasPublishAction,r=t.isSelected;Object(A.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&n&&this.validateAttributes()?this.saveProduct():e.isSelected&&!r&&this.validateAttributes()}},{key:"injectPaymentAttributes",value:function(){var e=this.props.simplePayment;if(this.shouldInjectPaymentAttributes&&!Object(A.isEmpty)(e)){var t=this.props,n=t.attributes,r=t.setAttributes,a=n.content,o=n.currency,i=n.email,c=n.featuredMediaId,l=n.multiple,s=n.price,u=n.title;r({content:Object(A.get)(e,["content","raw"],a),currency:Object(A.get)(e,["meta","spay_currency"],o),email:Object(A.get)(e,["meta","spay_email"],i),featuredMediaId:Object(A.get)(e,["featured_media"],c),multiple:Boolean(Object(A.get)(e,["meta","spay_multiple"],Boolean(l))),price:Object(A.get)(e,["meta","spay_price"],s||void 0),title:Object(A.get)(e,["title","raw"],u)}),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,i=e.price,c=e.productId;return{id:c,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:i},status:c?"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,i=Object(S.dispatch)("core").saveEntityRecord;this.setState({isSavingProduct:!0},(function(){i("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,c=this.props,l=c.attributes,s=c.featuredMedia,u=c.instanceId,p=c.isSelected,d=c.setAttributes,m=c.simplePayment,h=l.content,b=l.currency,f=l.email,g=l.featuredMediaId,j=l.featuredMediaUrl,v=l.featuredMediaTitle,k=l.multiple,_=l.price,y=l.productId,O=l.title,C=j||s&&s.source_url,E=v||s&&s.alt_text,x=y&&Object(A.isEmpty)(m);if(!p&&x)return Object(a.createElement)("div",{className:"simple-payments__loading"},Object(a.createElement)(M,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!p&&f&&_&&O&&!t&&!n&&!r)return Object(a.createElement)(M,{"aria-busy":"false",content:h,featuredMediaUrl:C,featuredMediaTitle:E,formattedPrice:H(_,b),multiple:k,title:O});var S=x?i.Disabled:"div";return Object(a.createElement)(S,{className:"wp-block-jetpack-simple-payments"},Object(a.createElement)(z,{featuredMediaId:g,featuredMediaUrl:C,featuredMediaTitle:E,setAttributes:d}),Object(a.createElement)("div",null,Object(a.createElement)(i.TextControl,{"aria-describedby":"".concat(u,"-title-error"),className:w()("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:O}),Object(a.createElement)(N.a,{id:"".concat(u,"-title-error"),isError:!0},r),Object(a.createElement)(i.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:h}),Object(a.createElement)("div",{className:"simple-payments__price-container"},Object(a.createElement)(i.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)(i.TextControl,{"aria-describedby":"".concat(u,"-price-error"),className:w()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":n}),label:Object(o.__)("Price","jetpack"),onChange:this.handlePriceChange,placeholder:H(0,b,!1),required:!0,step:"1",type:"number",value:_||""}),Object(a.createElement)(N.a,{id:"".concat(u,"-price-error"),isError:!0},n)),Object(a.createElement)("div",{className:"simple-payments__field-multiple"},Object(a.createElement)(i.ToggleControl,{checked:Boolean(k),label:Object(o.__)("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),Object(a.createElement)(i.TextControl,{"aria-describedby":"".concat(u,"-email-").concat(t?"error":"help"),className:w()("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:f}),Object(a.createElement)(N.a,{id:"".concat(u,"-email-error"),isError:!0},t),Object(a.createElement)(N.a,{id:"".concat(u,"-email-help")},Object(o.__)("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",Object(a.createElement)(i.ExternalLink,{href:"https://www.paypal.com/"},Object(o.__)("Create one on PayPal","jetpack")))))}}]),t}(a.Component),V=Object(S.withSelect)((function(e,t){var n=e("core"),r=n.getEntityRecord,a=n.getMedia,o=e("core/editor"),i=o.isSavingPost,c=o.getCurrentPost,l=t.attributes,s=l.productId,u=l.featuredMediaId,p=s?Object(A.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;return{hasPublishAction:!!Object(A.get)(c(),["_links","wp:action-publish"]),isSaving:!!i(),simplePayment:p,featuredMedia:u?a(u):null}})),G=Object(x.compose)(V,x.withInstanceId)(q);var W=n(135),K=n.n(W),$=(n(273),n(18)),Z=Object(l.b)()||Object(l.a)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",J={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)(i.ExternalLink,{href:Z},Object(o.__)("Support reference","jetpack"))),icon:Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.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"})),category:Object($.a)()?"earn":"jetpack",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",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:""}},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:G,save:function(e){var t=e.attributes.productId;return t?Object(a.createElement)(a.RawHTML,null,'[simple-payment id="'.concat(t,'"]')):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:K.a}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1}};Object(r.a)("simple-payments",J)},function(e,t,n){"use strict";n.r(t);var r=n(19),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}},i=n(14),c=n.n(i),l=n(0),s=n(4),u=n(13),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",c()({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(15),h=n.n(m),b=n(6),f=n(2),g=n(40),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,{fill:"#555d66",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(34),k=n(22);n(270),n(159);var _=n(18),y={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:j,category:Object(_.a)()?"grow":"jetpack",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 i=t.revueUsername,c=t.emailLabel,u=t.emailPlaceholder,p=t.firstNameLabel,d=t.firstNamePlaceholder,m=t.firstNameShow,_=t.lastNameLabel,O=t.lastNamePlaceholder,w=t.lastNameShow,C=Object(l.useState)(""),E=h()(C,2),x=E[0],S=E[1];Object(l.useEffect)((function(){!x&&i&&S(i)}),[]);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},!i&&Object(l.createElement)(f.Placeholder,{icon:Object(l.createElement)(b.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")))),i&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(b.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:i}))),Object(l.createElement)(f.TextControl,{label:Object(l.createElement)(g.a,{label:c,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:_,labelFieldName:"lastNameLabel",setAttributes:r}),onChange:function(e){return r({lastNamePlaceholder:e})},placeholder:O,value:O}),Object(l.createElement)(b.InnerBlocks,{template:[[y.name,y.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)(b.InnerBlocks.Content,null),Object(l.createElement)("a",{className:"wp-block-jetpack-revue__fallback",href:n},n))},example:{attributes:{revueUsername:"example"},innerBlocks:[y]},deprecated:[d]};Object(r.a)("revue",O)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(14),l=n.n(c),s=n(20),u=n.n(s),p=n(8),d=n.n(p),m=n(12),h=n.n(m),b=n(9),f=n.n(b),g=n(10),j=n.n(g),v=n(5),k=n.n(v),_=n(11),y=n.n(_),O=n(3),w=n.n(O),C=n(17),E=n(4),x=n(29),S=n(16),A=n(6),P=n(39),N=n(65),T=function(e){var t=e.allowedMediaTypes,n=e.attributes,r=n.autoplay,c=n.delay,l=n.effect,s=n.images,u=n.sizeSlug,p=e.imageSizeOptions,d=e.onChangeImageSize,m=e.onSelectImages,h=e.setAttributes,b="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)(i.PanelBody,{title:Object(o.__)("Autoplay","jetpack")},Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Autoplay","jetpack"),help:Object(o.__)("Autoplay between slides","jetpack"),checked:r,onChange:function(e){h({autoplay:e})}}),r&&Object(a.createElement)(i.RangeControl,{label:Object(o.__)("Delay between transitions (in seconds)","jetpack"),value:c,onChange:function(e){h({delay:e})},min:1,max:5}),r&&b&&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)(i.PanelBody,{title:Object(o.__)("Effects","jetpack")},Object(a.createElement)(i.SelectControl,{label:Object(o.__)("Transition effect","jetpack"),value:l,onChange:function(e){h({effect:e})},options:f})),!Object(E.isEmpty)(s)&&!Object(E.isEmpty)(p)&&Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Image Settings","jetpack")},Object(a.createElement)(i.SelectControl,{label:Object(o.__)("Image Size","jetpack"),value:u,options:p,onChange:d}))),Object(a.createElement)(A.BlockControls,null,!!s.length&&Object(a.createElement)(i.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})}}))))},F=n(7),B=n.n(F),I=n(52),M=n(95),L=n(51),R=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(L.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(M.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:L.b,imagesReady:L.d,paginationRender:L.c,transitionEnd:L.a}))})),n.slideshowRef=Object(a.createRef)(),n.btnNextRef=Object(a.createRef)(),n.btnPrevRef=Object(a.createRef)(),n.paginationRef=Object(a.createRef)(),n}return y()(t,e),h()(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,i=r.autoplay,c=r.delay,l=r.effect,s=r.images,u=r.onError;(a===e.align&&Object(E.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),l!==e.effect||i!==e.autoplay||c!==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?void 0:null===(t=e.images)||void 0===t?void 0:t.length))return null;var n=this.props,r=n.autoplay,o=n.className,c=n.delay,l=n.effect,s=n.images;return Object(a.createElement)("div",{className:o,"data-autoplay":r||null,"data-delay":r?c: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)(i.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()(R,"defaultProps",{effect:"slide"});var D=R,z=(n(274),["image"]),U=function(e,t){var n=Object(E.pick)(e,["alt","id","link","caption"]);return n.url=Object(E.get)(e,["sizes",t,"url"])||Object(E.get)(e,["media_details","sizes",t,"source_url"])||e.url,n},H=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(E.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,i=a.unlockPostSaving,c=a.noticeOperations;o("slideshowBlockLock"),Object(P.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)}))||i("slideshowBlockLock")},onError:c.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(E.get)(n,["sizes",t,"source_url"]);return l()({},e,{},a&&{url:a})}));e.setAttributes({images:a,sizeSlug:t})})),e.state={selectedImage:null},e}return y()(t,e),h()(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(E.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,c=t.isSelected,l=t.noticeOperations,s=t.noticeUI,u=n.align,p=n.autoplay,d=n.delay,m=n.effect,h=n.images,b=this.getImageSizeOptions(),f=Object(a.createElement)(T,{allowedMediaTypes:z,attributes:n,imageSizeOptions:b,onChangeImageSize:this.updateImagesSize,onSelectImages:this.onSelectImages,setAttributes:function(t){return e.setAttributes(t)}});return 0===h.length?Object(a.createElement)(a.Fragment,null,f,Object(a.createElement)(A.MediaPlaceholder,{icon:Object(a.createElement)(A.BlockIcon,{icon:ee}),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:h,onError:l.createErrorNotice}),Object(a.createElement)(i.DropZone,{onFilesDrop:this.addFiles}),c&&Object(a.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},Object(a.createElement)(i.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(C.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(E.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}})),i.withNotices)(H),V=n(13);function G(e){return Object(E.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(V.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(V.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(V.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:function(e){var t=e.images,n=e.ids;return Object(V.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(V.createBlock)("core/image",{id:t,url:n,alt:r,caption:a})})):Object(V.createBlock)("core/image")}}]},K=n(18),$=n(136),Z=n.n($),J=n(137),Y=n.n(J),Q=n(138),X=n.n(Q),ee=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.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(a.createElement)(i.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"})),te={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:Z.a},{alt:"",caption:"",id:23,url:Y.a},{alt:"",caption:"",id:23,url:X.a}],effect:"slide"},ne={title:Object(o.__)("Slideshow","jetpack"),category:Object(K.a)()?"layout":"jetpack",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:ee,edit:q,save:function(e){var t=e.attributes,n=t.align,r=t.autoplay,o=t.delay,i=t.effect,c=t.images,l=e.className;return Object(a.createElement)(D,{align:n,autoplay:r,className:l,delay:o,effect:i,images:c})},transforms:W,example:{attributes:te}};Object(r.a)("slideshow",ne)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n.n(r),o=n(15),i=n.n(o),c=n(14),l=n.n(c),s=n(27),u=n.n(s),p=n(0),d=n(2),m=n(29),h=n(13),b=n(39),f=n(6),g=n(31),j=n(17),v=n(1),k=n(4),_=n(37),y=n.n(_),O=n(8),w=n.n(O),C=n(12),E=n.n(C),x=n(9),S=n.n(x),A=n(10),P=n.n(A),N=n(5),T=n.n(N),F=n(11),B=n.n(F),I=n(3),M=n.n(I),L=n(21),R=n.n(L),D=n(16),z=n(7),U=n.n(z),H=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),V=function(e,t){var n=t.autoplay,r=t.controls,a=t.loop,o=t.muted,i=t.poster,c=t.preload;if(!e)return null;var s=l()({},n&&{autoPlay:!0},{},!r&&{controls:!1},{},a&&{loop:!0},{},o&&{muted:!0,persistVolume:!1},{},i&&{posterUrl:i},{},"none"!==c&&{preloadContent:c});return Object(q.addQueryArgs)("https://videopress.com/v/".concat(e),s)},G=["image"],W=f.__experimentalBlock?f.__experimentalBlock.figure:"figure",K=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,i=n.loop,c=n.muted,l=n.poster,s=n.preload,u=n.src,p=e("core"),d=p.getEmbedPreview,h=p.isRequestingEmbedPreview,b=V(o,{autoplay:r,controls:a,loop:i,muted:c,poster:l,preload:s}),f=!!b&&d(b);return{isFetchingPreview:!!b&&h(b),isUploading:Object(m.isBlobURL)(u),preview:f,url:b}})),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,P()(n).apply(this,arguments)),M()(T()(e),"hideOverlay",(function(){e.setState({interactive:!0})})),M()(T()(e),"fallbackToCore",(function(){e.props.setAttributes({guid:void 0}),e.setState({fallback:!0})})),M()(T()(e),"setGuid",y()(regeneratorRuntime.mark((function t(){var n,r,a,o,i,c,l;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,e.setState({isFetchingMedia:!0}),t.next=9,R()({path:"/wp/v2/media/".concat(o)});case 9:if(i=t.sent,e.setState({isFetchingMedia:!1}),c=e.props.attributes.id,o===c){t.next=14;break}return t.abrupt("return");case 14:e.setState({media:i}),(l=Object(k.get)(i,"jetpack_videopress_guid"))?a({guid:l}):e.fallbackToCore(),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(5),e.setState({isFetchingMedia:!1}),e.fallbackToCore();case 23:case"end":return t.stop()}}),t,null,[[5,19]])})))),M()(T()(e),"switchToEditing",(function(){e.props.setAttributes({id:void 0,guid:void 0,src:void 0})})),M()(T()(e),"onSelectPoster",(function(t){(0,e.props.setAttributes)({poster:t.url})})),M()(T()(e),"onRemovePoster",(function(){(0,e.props.setAttributes)({poster:""}),e.posterImageButton.current.focus()})),M()(T()(e),"toggleAttribute",(function(t){return function(n){e.props.setAttributes(M()({},t,n))}})),M()(T()(e),"getAutoplayHelp",(function(e){return e?Object(v.__)("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null})),e.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1},e.posterImageButton=Object(p.createRef)(),e}return B()(n,t),E()(n,[{key:"componentDidMount",value:function(){this.props.attributes.guid||this.setGuid()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.attributes,r=t.invalidateCachedEmbedPreview,a=t.url;n.id!==e.attributes.id&&this.setGuid(),a&&a!==e.url&&r(a)}},{key:"render",value:function(){var t=this,n=this.props,r=n.attributes,a=n.className,o=n.instanceId,i=n.isFetchingPreview,c=n.isSelected,l=n.isUploading,s=n.preview,u=n.setAttributes,m=this.state,h=m.fallback,b=m.isFetchingMedia,g=m.interactive,j=r.autoplay,k=r.caption,_=r.controls,y=r.loop,O=r.muted,w=r.poster,C=r.preload,E="video-block__poster-image-description-".concat(o),x=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:j,help:this.getAutoplayHelp}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Loop","jetpack"),onChange:this.toggleAttribute("loop"),checked:y}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:O}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Playback Controls","jetpack"),onChange:this.toggleAttribute("controls"),checked:_}),Object(p.createElement)(d.SelectControl,{label:Object(v.__)("Preload","jetpack"),value:C,onChange:function(e){return u({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:G,render:function(e){var n=e.open;return Object(p.createElement)(d.Button,{isDefault:!0,onClick:n,ref:t.posterImageButton,"aria-describedby":E},w?Object(v.__)("Replace image","jetpack"):Object(v.__)("Select Poster Image","jetpack"))}}),Object(p.createElement)("p",{id:E,hidden:!0},w?Object(v.sprintf)(Object(v.__)("The current poster image url is %s","jetpack"),w):Object(v.__)("There is no poster image currently selected","jetpack")),!!w&&Object(p.createElement)(d.Button,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},Object(v.__)("Remove Poster Image")))))));if(l)return Object(p.createElement)(p.Fragment,null,x,Object(p.createElement)(H,{text:Object(v.__)("Uploading…","jetpack")}));if(b||i)return Object(p.createElement)(p.Fragment,null,x,Object(p.createElement)(H,{text:Object(v.__)("Generating preview…","jetpack")}));if(h||!s)return Object(p.createElement)(e,this.props);var S=s.html,A=s.scripts;return Object(p.createElement)(p.Fragment,null,x,Object(p.createElement)(W,{className:U()(a,"wp-block-embed","is-type-video")},Object(p.createElement)("div",{className:"wp-block-embed__wrapper"},Object(p.createElement)(d.SandBox,{html:S,scripts:A})),!g&&Object(p.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),(!f.RichText.isEmpty(k)||c)&&Object(p.createElement)(f.RichText,{tagName:"figcaption",placeholder:Object(v.__)("Write caption…","jetpack"),value:k,onChange:function(e){return u({caption:e})},inlineToolbar:!0})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),n}(p.Component)}]),"withVideoPressEdit"),$=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,i=n.guid,c=n.loop,l=n.muted,s=n.poster,u=n.preload;if(!i)return e(t);var d=V(i,{autoplay:r,controls:o,loop:c,muted:l,poster:s,preload:u});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(d,"\n")),!f.RichText.isEmpty(a)&&Object(p.createElement)(f.RichText.Content,{tagName:"figcaption",value:a}))}}),"withVideoPressSave"),Z=n(45);var J={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},Y=n(77),Q=n(22),X=n(76),ee=(n(276),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"));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,c=e.save,s=e.supports,u=e.transforms,p=Object(Z.a)("videopress"),d=p.available,f=p.unavailableReason;return Object(Q.b)()&&["missing_plan","unknown"].includes(f)&&(Object(g.addFilter)("editor.MediaPlaceholder","jetpack/videopress",ee),Object(g.addFilter)("editor.BlockListBlock","jetpack/videopress-with-has-warning-is-interactive-class-names",Object(X.a)("core/video"))),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"}},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(h.createBlock)("core/video",{src:Object(m.createBlobURL)(e)});Object(b.mediaUpload)({filesList:[e],onFileChange:function(e){var n=i()(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:Object(Q.b)()&&["missing_plan","unknown"].includes(f)?Object(Y.a)({requiredPlan:"value_bundle",customTitle:{knownPlan:Object(v.__)("Upgrade to %(planName)s to upload videos.","jetpack"),unknownPlan:Object(v.__)("Upgrade to a paid plan to upload videos.","jetpack")},customSubTitle:Object(v.__)("Upload unlimited videos to your website and \t\t\t\t\t\tdisplay them using a fast, unbranded, \t\t\t\t\t\tcustomizable player.","jetpack")})(K(o)):K(o),save:$(c),deprecated:[].concat(a()(r||[]),[{attributes:n,isEligible:function(e){return!e.guid},save:c,supports:s,isDeprecation:!0},J])}):e}))},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=(n(177),n(151),n(27)),l=n.n(c),s=n(8),u=n.n(s),p=n(12),d=n.n(p),m=n(9),h=n.n(m),b=n(10),f=n.n(b),g=n(5),j=n.n(g),v=n(11),k=n.n(v),_=n(3),y=n.n(_),O=n(21),w=n.n(O),C=n(7),E=n.n(C),x=n(78),S=n(6),A=n(14),P=n.n(A),N=n(4),T=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,c=new Array(r),l=0;l<r;l++)c[l]=arguments[l];return n=h()(this,(e=f()(t)).call.apply(e,[this].concat(c))),y()(j()(n),"renderInterval",(function(e,t){var r=n.props.day,c=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:E()(r.name,"business-hours__day")},0===t&&n.renderDayToggle()),Object(a.createElement)("div",{className:E()(r.name,"business-hours__hours")},Object(a.createElement)(i.TextControl,{type:"time",label:Object(o.__)("Opening","jetpack"),value:c,className:"business-hours__open",placeholder:"09:00",onChange:function(e){n.setHour(e,"opening",t)}}),Object(a.createElement)(i.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)(i.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:E()(r.name,"business-hours__day")}," "),Object(a.createElement)("div",{className:E()(r.name,"business-hours__hours")},Object(a.createElement)(i.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"}," ")))})),y()(j()(n),"setHour",(function(e,t,r){var a=n.props,o=a.day,i=a.attributes;(0,a.setAttributes)({days:i.days.map((function(n){return n.name===o.name?P()({},n,{hours:n.hours.map((function(n,a){return a===r?P()({},n,y()({},t,e)):n}))}):n}))})})),y()(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 P()({},t,{hours:n})}return t}))})})),y()(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?P()({},e,{hours:t.hours}):e}))})})),y()(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?P()({},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)(i.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:E()(e.name,"business-hours__day")},this.renderDayToggle()),Object(a.createElement)("div",{className:E()(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),F=n(15),B=n.n(F),I=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];return n=h()(this,(e=f()(t)).call.apply(e,[this].concat(i))),y()(j()(n),"renderInterval",(function(e,t){var r=n.props.day.hours;return Object(a.createElement)("span",{key:t},Object(o.sprintf)("%s - %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],i=new Date;return!(!a||!o)&&(i.setHours(a),i.setMinutes(o),Object(x.date)(t,i))}},{key:"render",value:function(){var e=this,t=this.props,n=t.day,r=t.localization,i=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)(i)?Object(o._x)("Closed","business is closed on a full day","jetpack"):i.map(this.renderInterval),Object(a.createElement)("br",null)))}}]),t}(a.Component),M={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},L=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=h()(this,(e=f()(t)).call.apply(e,[this].concat(a))),y()(j()(n),"state",{localization:M,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:M},(function(){w()({path:"/wpcom/v2/business-hours/localized-week"}).then((function(t){e.setState({localization:t,hasFetched:!0})}),(function(){e.setState({localization:M,hasFetched:!0})}))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.className,c=t.isSelected,s=n.days,u=this.state,p=u.localization,d=u.hasFetched,m=p.startOfWeek,h=s.concat(s.slice(0,m)).slice(m);if(!d)return Object(a.createElement)(i.Placeholder,{icon:Object(a.createElement)(S.BlockIcon,{icon:U}),label:Object(o.__)("Loading business hours","jetpack")});if(!c){var b=Object(x.__experimentalGetSettings)().formats.time;return Object(a.createElement)("dl",{className:E()(r,"jetpack-business-hours")},h.map((function(e,t){return Object(a.createElement)(I,{key:t,day:e,localization:p,timeFormat:b})})))}return Object(a.createElement)("div",{className:E()(r,"is-edit")},h.map((function(t,n){return Object(a.createElement)(T,l()({key:n,day:t,localization:p},e.props))})))}}]),t}(a.Component),R=n(23),D=n(18),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(R.a)(Object(a.createElement)(i.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"})),H={title:Object(o.__)("Business Hours","jetpack"),description:Object(o.__)("Display opening hours for your business.","jetpack"),icon:U,category:Object(D.a)()?"grow":"jetpack",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)(L,e)},save:function(){return null},example:{attributes:{days:z}}};Object(r.a)("business-hours",H)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(13),c=n(8),l=n.n(c),s=n(12),u=n.n(s),p=n(9),d=n.n(p),m=n(10),h=n.n(m),b=n(5),f=n.n(b),g=n(11),j=n.n(g),v=n(3),k=n.n(v),_=n(2),y=n(17),O=n(6),w=n(126),C=Object(a.createElement)(_.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(_.G,{fill:"none",fillRule:"evenodd",transform:"translate(.5)"},Object(a.createElement)(_.Rect,{height:"20.956522",rx:"3",stroke:"#656a74",strokeWidth:"2",width:"20.956522",x:"1",y:"1.043478"}),Object(a.createElement)(_.G,{fill:"#656a74"},Object(a.createElement)(_.Rect,{height:"2",rx:".869565",width:"1.73913",x:"5.565217",y:"3.869565"}),Object(a.createElement)(_.Rect,{height:"2",rx:".869565",width:"1.73913",x:"15.652174",y:"3.869565"}),Object(a.createElement)(_.Path,{d:"m8.32727582 17.5986753c1.84391988 0 3.17781928-1.0256454 3.17781928-2.4436142 0-1.0648777-.6949728-1.8046875-1.80468749-1.9279891v-.1008831c.90234379-.1849525 1.49082879-.913553 1.49082879-1.8495245 0-1.2722486-1.19378395-2.18019701-2.85275135-2.18019701-1.76545516 0-2.90319293.96399461-2.95923913 2.49405571h1.56368886c.04483696-.7005774.56606658-1.1433424 1.35071332-1.1433424.79025136 0 1.29466712.4147419 1.29466712 1.0648777 0 .6613451-.52122962 1.1097147-1.2890625 1.1097147h-.98641305v1.2610394h1.00322691c.90794837 0 1.4628057.4371603 1.4628057 1.1433424 0 .6893682-.58848505 1.1657609-1.43478261 1.1657609-.86871603 0-1.44599184-.4315557-1.49643342-1.1153193h-1.61973505c.07286005 1.5244565 1.29466712 2.5220788 3.09935462 2.5220788zm8.74709068-.207371v-8.08746598h-1.6869904l-2.0905231 1.44038718v1.5748981l1.9840353-1.3675271h.1008831v6.4397078z",fillRule:"nonzero"})))),E="s*https?://calendar.google.com/calendar",x=new RegExp("^".concat(E),"i"),S=new RegExp("<iframe((?:\\s+\\w+=(['\"]).*?\\2)*)\\s+src=([\"'])(".concat(E,".*?)\\3((?:\\s+\\w+=(['\"]).*?\\6)*)"),"i"),A=new RegExp("".concat(E,"\\?cid=([-A-Za-z0-9+/]+={0,3})"),"i"),P=/\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 T(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=P.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}}var F=n(22),B=function(e){function t(){var e;return l()(this,t),e=d()(this,h()(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,i=r.setAttributes,c=e.state.editedEmbed.trim();if(n=S.test(c)?T(c):A.test(c)?{url:N(c)}:{url:c},!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"));i(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)(_.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,c=e.noticeUI,l=Object(i.getBlockDefaultClassName)(r),s=t.url,u=t.height,p=this.state,d=p.editedEmbed,m=p.interactive,h=p.editingUrl,b=this.props.isMobile?"300":u,f='<iframe src="'.concat(s,'" style="border:0" scrolling="no" frameborder="0" height="').concat(b,'"></iframe>'),g=Object(a.createElement)(_.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)(_.PanelBody,{title:Object(o.__)("Calendar Settings","jetpack"),initialOpen:!1},this.getEditForm("".concat(l,"-embed-form-sidebar"),d))));if(h||!s){var v=Object(F.b)()||Object(F.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)(_.Placeholder,{className:n,label:Object(o.__)("Google Calendar","jetpack"),icon:Object(a.createElement)(O.BlockIcon,{icon:C}),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:c},this.getEditForm("".concat(l,"-embed-form-editor"),d),Object(a.createElement)("div",{className:"".concat(l,"-placeholder-links")},Object(a.createElement)(_.ExternalLink,{href:v},Object(o.__)("Learn more","jetpack")))))}return Object(a.createElement)("div",{className:n},j,Object(a.createElement)("div",null,Object(a.createElement)(_.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(y.compose)(_.withNotices,Object(w.withViewportMatch)({isMobile:"< small"}))(B),M=(n(189),n(18)),L={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:C,category:Object(M.a)()?"embed":"jetpack",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(i.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=T(e.innerHTML.trim()),n=t.url,r=t.height;return Object(i.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",L)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(6),c=n(2),l=n(14),s=n.n(l),u=n(4),p=n(13),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}},h=n(20),b=n.n(h),f=n(8),g=n.n(f),j=n(9),v=n.n(j),k=n(10),_=n.n(k),y=n(5),O=n.n(y),w=n(11),C=n.n(w),E=n(3),x=n.n(E),S=n(21),A=n.n(S),P=n(7),N=n.n(P),T=(n(88),n(12)),F=n.n(T),B=function(e){function t(){var e,n;g()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=v()(this,(e=_()(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)(c.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 C()(t,e),F()(t,[{key:"componentDidMount",value:function(){this.retrieveGroups()}}]),t}(a.Component),I=B;B.defaultProps={interests:[],onChange:function(){return null}};var M=function(e){function t(){var e;return g()(this,t),e=v()(this,_()(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,h=p.connectURL,f=n.emailPlaceholder,g=n.consentText,j=n.interests,v=n.processingLabel,k=n.successLabel,_=n.errorLabel,y=n.preview,O=n.signupFieldTag,w=n.signupFieldValue,C="wp-block-jetpack-mailchimp",E=Object(a.createElement)(c.Placeholder,{icon:D,notices:l},Object(a.createElement)(c.Spinner,null)),S=Object(a.createElement)(c.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)(c.Button,{isDefault:!0,isLarge:!0,href:h,target:"_blank"},Object(o.__)("Set up Mailchimp form","jetpack")),Object(a.createElement)("div",{className:"".concat(C,"-recheck")},Object(a.createElement)(c.Button,{isLink:!0,onClick:e.apiCall},Object(o.__)("Re-check Connection","jetpack")))),A=Object(a.createElement)(i.InspectorControls,null,Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Text Elements","jetpack")},Object(a.createElement)(c.TextControl,{label:Object(o.__)("Email Placeholder","jetpack"),value:f,onChange:e.updateEmailPlaceholder})),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Notifications","jetpack")},Object(a.createElement)(c.TextControl,{label:Object(o.__)("Processing text","jetpack"),value:v,onChange:e.updateProcessingText}),Object(a.createElement)(c.TextControl,{label:Object(o.__)("Success text","jetpack"),value:k,onChange:e.updateSuccessText}),Object(a.createElement)(c.TextControl,{label:Object(o.__)("Error text","jetpack"),value:_,onChange:e.updateErrorText})),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Mailchimp Groups","jetpack")},Object(a.createElement)(I,{interests:j,onChange:function(e,t){var n=b()(new Set([].concat(b()(j),[e]))).filter((function(n){return!(n===e&&!t)&&n}));u({interests:n})}}),Object(a.createElement)(c.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},Object(o.__)("Learn about groups","jetpack"))),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Signup Location Tracking","jetpack")},Object(a.createElement)(c.TextControl,{label:Object(o.__)("Signup Field Tag","jetpack"),placeholder:Object(o.__)("SIGNUP"),value:O,onChange:function(e){return u({signupFieldTag:e})}}),Object(a.createElement)(c.TextControl,{label:Object(o.__)("Signup Field Value","jetpack"),placeholder:Object(o.__)("website"),value:w,onChange:function(e){return u({signupFieldValue:e})}}),Object(a.createElement)(c.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},Object(o.__)("Learn about signup location tracking","jetpack"))),Object(a.createElement)(c.PanelBody,{title:Object(o.__)("Mailchimp Connection","jetpack")},Object(a.createElement)(c.ExternalLink,{href:h},Object(o.__)("Manage Connection","jetpack")))),P=N()(r,x()({},"".concat(C,"_notication-audition"),d)),T=Object(a.createElement)("div",{className:P},Object(a.createElement)(c.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)(i.InnerBlocks,{template:[[z.name,z.attributes]],templateLock:"all"}),Object(a.createElement)(i.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(C,"_notification ").concat(C,"_").concat(d),role:e.roleForAuditionType(d)},e.labelForAuditionType(d))),F=T;return Object(a.createElement)(a.Fragment,null,s,y&&F,!y&&0===m&&E,!y&&2===m&&S,!y&&1===m&&A,!y&&1===m&&T)})),e.state={audition:null,connected:0,connectURL:null},e.timeout=null,e}return C()(t,e),t}(a.Component),L=Object(c.withNotices)(M),R=(n(198),n(18)),D=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.G,{transform:"translate(-45.478101,-100.73059)"},Object(a.createElement)(c.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},Object(a.createElement)(c.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)(c.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)(c.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)(c.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)(c.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)(c.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)(c.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:D,description:Object(o.__)("A form enabling readers to join a Mailchimp list.","jetpack"),category:Object(R.a)()?"grow":"jetpack",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:L,save:function(){return Object(a.createElement)(i.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(19),a=n(0),o=n(1),i=n(2),c=(n(202),n(22)),l=n(8),s=n.n(l),u=n(12),p=n.n(u),d=n(9),m=n.n(d),h=n(10),b=n.n(h),f=n(5),g=n.n(f),j=n(11),v=n.n(j),k=n(3),_=n.n(k),y=n(7),O=n.n(y),w=n(6),C=n(17),E=n(16),x=n(128),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())},P=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=b()(t)).call.apply(e,[this].concat(a))),_()(g()(n),"input",null),_()(g()(n),"state",{activePanel:"editor"}),_()(g()(n),"bindInput",(function(e){n.input=e})),_()(g()(n),"updateSource",(function(e){return n.props.setAttributes({source:e})})),_()(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())})),_()(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,i=t.source,c=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"!==c&&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:i}):Object(a.createElement)(P,{className:"".concat(n,"__preview"),source:i}))}}]),t}(a.Component),T=Object(C.compose)([Object(E.withSelect)((function(e){return{currentBlockId:e("core/block-editor").getSelectedBlockClientId()}})),Object(E.withDispatch)((function(e,t){var n=t.currentBlockId;return{removeBlock:function(){return e("core/block-editor").removeBlocks(n)}}}))])(N),F=n(18),B=Object(o.__)("Try Markdown","jetpack"),I=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"),M=Object(c.b)()||Object(c.a)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",L={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)(i.ExternalLink,{href:M},Object(o.__)("Support reference","jetpack"))),icon:Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},Object(a.createElement)(i.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),Object(a.createElement)(i.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),category:Object(F.a)()?"formatting":"jetpack",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:T,save:function(e){var t=e.attributes,n=e.className;return Object(a.createElement)(P,{className:n,source:t.source})},example:{attributes:{source:"## ## ".concat(B,"\n\n").concat(I)}}};Object(r.a)("markdown",L)},function(e,t,n){"use strict";n.r(t);var r,a=n(19),o=n(1),i=n(0),c=n(4),l=n(6),s=n(2),u=n(26),p=function(e){var t,n=e.id,r=e.setRating,a=e.children;return Object(i.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(258),n(158),n(18)),m={title:Object(o.__)("Star Rating","jetpack"),description:Object(o.__)("Rate movies, books, songs, recipes — anything you can put a number on.","jetpack"),icon:function(){return Object(i.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(i.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"}))},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:Object(d.a)()?"formatting":"jetpack",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,h=a.maxRating,b=function(e){e===m&&Math.ceil(m)===m&&(e-=.5),r({rating:e})};return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(l.BlockControls,null,Object(i.createElement)(l.AlignmentToolbar,{value:u,onChange:function(e){return r({align:e})}})),Object(i.createElement)("div",{className:n,style:{textAlign:u}},Object(c.range)(1,h+1).map((function(t){return Object(i.createElement)(p,{key:t,id:t,setRating:b},Object(i.createElement)("span",null,Object(i.createElement)(e,{className:m>=t-.5?null:"is-rating-unfilled",color:d})),Object(i.createElement)("span",null,Object(i.createElement)(e,{className:m>=t?null:"is-rating-unfilled",color:d})))}))),Object(i.createElement)(l.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(o.__)("Settings","jetpack")},Object(i.createElement)(s.RangeControl,{label:Object(o.__)("Highest rating","jetpack"),value:h,onChange:function(e){return r({maxRating:e})},min:2,max:10}),Object(i.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(i.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},Object(i.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(i.createElement)("figure",{className:t,style:{textAlign:a}},Object(c.range)(1,o+1).map((function(e){return Object(i.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(19),a=n(0),o=n(1),i=n(2),c=n(8),l=n.n(c),s=n(12),u=n.n(s),p=n(9),d=n.n(p),m=n(10),h=n.n(m),b=n(5),f=n.n(b),g=n(11),j=n.n(g),v=n(3),k=n.n(v),_=n(6),y=[{height:250,icon: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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.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)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.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)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.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)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)(i.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),Object(a.createElement)(i.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)(i.Dropdown,{position:"bottom right",renderToggle:function(e){var t=e.onToggle,n=e.isOpen;return Object(a.createElement)(i.Toolbar,{controls:[{icon:Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.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)(i.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},y.map((function(e){var o=e.tag,c=e.name,l=e.icon;return Object(a.createElement)(i.MenuItem,{className:o===t?"is-active":void 0,icon:l,isSelected:o===t,key:o,onClick:function(){n(o),r()},role:"menuitemcheckbox"},c)})))}})}n(277);var C=n(145),E=n.n(C),x=n(146),S=n.n(x),A=n(147),P=n.n(A),N=n(148),T=n.n(N),F=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=h()(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,c=t.format,l=t.hideMobile,s=y.filter((function(e){return e.tag===c}))[0],u=Object(a.createElement)(_.InspectorControls,null,Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Visibility","jetpack")},Object(a.createElement)(i.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)(_.BlockControls,null,Object(a.createElement)(w,{value:c,onChange:function(e){return n({format:e})}})),Object(a.createElement)("div",{className:"wp-block-jetpack-wordads jetpack-wordads-".concat(c)},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 P.a;case"wideskyscraper":return T.a;default:return E.a}}(c)," )"),backgroundSize:"cover"}}),r&&u))}}]),t}(a.Component),B=n(18),I=Object(o.__)("Ad","jetpack"),M=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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.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"})),L={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)(i.ExternalLink,{href:"https://wordads.co/"},Object(o.__)("Learn all about WordAds","jetpack"))),icon:M,attributes:{align:{type:"string",default:"center"},format:{type:"string",default:"mrec"},hideMobile:{type:"boolean",default:!1}},example:{attributes:{}},category:Object(B.a)()?"earn":"jetpack",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:F,save:function(){return null}};Object(r.a)("wordads",L)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(13),l=n(8),s=n.n(l),u=n(12),p=n.n(u),d=n(9),m=n.n(d),h=n(10),b=n.n(h),f=n(5),g=n.n(f),j=n(11),v=n.n(j),k=n(3),_=n.n(k),y=n(6),O=n(28);function w(e){if(!P.test(e))return"";var t=Object(O.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}function C(e,t){var n=Object(a.createElement)("a",{href:e},e);t(Object(c.createBlock)("core/paragraph",{content:Object(a.renderToString)(n)}))}var E=n(54),x=function(e){function t(){var e;return s()(this,t),e=m()(this,b()(t).apply(this,arguments)),_()(g()(e),"setUrl",(function(t){var n=e.props,r=n.noticeOperations,a=n.setAttributes;t&&N!==t&&Object(E.a)(t,e.setIsResolvingUrl).then((function(t){a({url:t}),e.setState({editedUrl:t}),r.removeAllNotices()})).catch((function(){a({url:void 0}),e.setErrorNotice()}))})),_()(g()(e),"setIsResolvingUrl",(function(t){return e.setState({isResolvingUrl:t})})),_()(g()(e),"setErrorNotice",(function(){var t=e.props,n=t.noticeOperations,r=t.onReplace,c=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)(i.Button,{isLink:!0,onClick:function(){return C(c,r)}},Object(o._x)("Convert block to link","button label","jetpack"))))})),_()(g()(e),"hideOverlay",(function(){e.setState({interactive:!0})})),_()(g()(e),"submitForm",(function(t){t&&t.preventDefault();var n=e.state.editedUrl;e.setUrl(n),e.setState({editingUrl:!1})})),_()(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,c=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)(i.Spinner,null),Object(a.createElement)("p",null,Object(o.__)("Embedding…")));var m=w(l),h="<a data-pin-do='".concat(m,"' href='").concat(l,"'></a>"),b=Object(a.createElement)(y.BlockControls,null,Object(a.createElement)(i.Toolbar,null,Object(a.createElement)(i.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)(i.Placeholder,{label:Object(o.__)("Pinterest","jetpack"),icon:Object(a.createElement)(y.BlockIcon,{icon:F}),notices:c},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)(i.Button,{isLarge:!0,isSecondary:!0,type:"submit"},Object(o._x)("Embed","button label","jetpack"))))):Object(a.createElement)("div",{className:r},b,Object(a.createElement)("div",null,Object(a.createElement)(i.SandBox,{html:h,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(i.withNotices)(x),A=n(18),P=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,N="https://pinterest.com/anapinskywalker/",T=Object(o.__)("Pinterest","jetpack"),F=Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(i.G,null,Object(a.createElement)(i.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"}))),B={title:T,description:Object(o.__)("Embed a Pinterest pin, board, or user.","jetpack"),icon:F,category:Object(A.a)()?"embed":"jetpack",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,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},transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&P.test(e.textContent)},transform:function(e){return Object(c.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}}]},example:{attributes:{url:N}}};Object(r.a)("pinterest",B)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(2),i=n(60),c=n(4),l=n(1),s=n(8),u=n.n(s),p=n(12),d=n.n(p),m=n(9),h=n.n(m),b=n(10),f=n.n(b),g=n(5),j=n.n(g),v=n(11),k=n.n(v),_=n(3),y=n.n(_),O=n(7),w=n.n(O),C=n(88),E=n(21),x=n.n(E),S=n(50),A=n(28),P=n(17),N=n(16),T=n(6),F=n(31),B=n(45),I=n(74),M=n.n(I),L=n(55),R=n(75),D=(n(259),function(e){var t=e.blockName,n=e.stripeConnectUrl;return Object(a.createElement)(R.a,{buttonLabel:Object(l.__)("Connect","jetpack"),icon:Object(a.createElement)(M.a,{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:n,onClick:function(){L.a.tracks.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t})},title:Object(l.__)("Connect to Stripe to use this block on your site","jetpack"),subtitle:Object(l.__)("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})}),z=function(e,t){return Object(S.a)(e,t,{decimal:".",symbol:""})},U=function(e){function t(){var e;u()(this,t),e=h()(this,f()(t).apply(this,arguments)),y()(j()(e),"componentDidMount",(function(){e.apiCall()})),y()(j()(e),"onError",(function(t){var n=e.props.noticeOperations;n.removeAllNotices(),n.createErrorNotice(t)})),y()(j()(e),"apiCall",(function(){var t={path:"/wpcom/v2/memberships/status",method:"GET"};x()(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,i=t.site_slug,c=t.connected_account_id?1:2;e.setState({connected:c,connectURL:n,shouldUpgrade:a,upgradeURL:o,siteSlug:i,products:J(r)})}),(function(t){e.setState({connected:2,connectURL:null}),e.onError(t.message)}))})),y()(j()(e),"handleCurrencyChange",(function(t){var n=e.state.editedProductPrice;Z(t,n)||(n=z($(t),t)),e.setState({editedProductCurrency:t,editedProductPrice:n,editedProductPriceValid:!0})})),y()(j()(e),"handleRenewIntervalChange",(function(t){return e.setState({editedProductRenewInterval:t})})),y()(j()(e),"handlePriceChange",(function(t){var n=parseFloat(t),r=Z(e.state.editedProductCurrency,n);e.setState({editedProductPrice:n,editedProductPriceValid:r})})),y()(j()(e),"handleTitleChange",(function(t){return e.setState({editedProductTitle:t,editedProductTitleValid:t.length>0})})),y()(j()(e),"saveProduct",(function(){if(e.state.editedProductTitle&&0!==e.state.editedProductTitle.length)if(e.state.editedProductPrice&&Z(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}};x()(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})})),y()(j()(e),"renderAmount",(function(e){var t=Object(S.a)(parseFloat(e.price),e.currency);return"1 month"===e.interval?Object(l.sprintf)(Object(l.__)("%s / month","jetpack"),t):"1 year"===e.interval?Object(l.sprintf)(Object(l.__)("%s / year","jetpack"),t):"one-time"===e.interval?t:Object(l.sprintf)(Object(l.__)("%s / %s","jetpack"),t,e.interval)})),y()(j()(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(l.__)("Add a payment plan","jetpack"));if(2!==e.state.addingMembershipAmount){var n=Object(S.a)($(e.state.editedProductCurrency),e.state.editedProductCurrency),r=Object(l.sprintf)(Object(l.__)("Minimum allowed price is %s."),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(l.__)("Currency","jetpack"),onChange:e.handleCurrencyChange,options:K,value:e.state.editedProductCurrency}),Object(a.createElement)("div",{className:"membership-membership-button__field membership-button__field-price"},Object(a.createElement)(o.TextControl,{label:Object(l.__)("Price","jetpack"),className:w()({"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:w()({"membership-button__field":!0,"membership-button__field-error":!e.state.editedProductTitleValid}),label:Object(l.__)("Describe your subscription in a few words","jetpack"),onChange:e.handleTitleChange,placeholder:Object(l.__)("Subscription description","jetpack"),value:e.state.editedProductTitle}),Object(a.createElement)(o.SelectControl,{label:Object(l.__)("Renew interval","jetpack"),onChange:e.handleRenewIntervalChange,options:[{label:Object(l.__)("Monthly","jetpack"),value:"1 month"},{label:Object(l.__)("Yearly","jetpack"),value:"1 year"},{label:Object(l.__)("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(l.__)("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(l.__)("Cancel","jetpack"))))}})),y()(j()(e),"getFormattedPriceByProductId",(function(t){var n=e.state.products.filter((function(e){return parseInt(e.id)===parseInt(t)})).pop();return Object(S.a)(parseFloat(n.price),n.currency)})),y()(j()(e),"setMembershipAmount",(function(t){var n=e.props.attributes.planId,r=e.props.attributes.submitButtonText,a=e.getFormattedPriceByProductId(t)+Object(l.__)(" Contribution","jetpack"),o=r===(n?e.getFormattedPriceByProductId(n)+Object(l.__)(" Contribution","jetpack"):void 0)?a:r;e.props.setAttributes({planId:t,submitButtonText:o})})),y()(j()(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))})))})),y()(j()(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(l.__)("Read more about Payments and related fees.","jetpack")))})),y()(j()(e),"render",(function(){var t=e.props.notices,n=e.state,r=n.connected,i=n.products,s=e.getConnectUrl(),u=Object(F.applyFilters)("jetpack.RecurringPayments.showControls",i.length>0,e.props.clientId),p=Object(a.createElement)(T.InspectorControls,null,Object(a.createElement)(o.PanelBody,{title:Object(l.__)("Payment plan","jetpack")},Object(a.createElement)(o.SelectControl,{label:Object(l.__)("Payment plan","jetpack"),value:e.props.attributes.planId,onChange:e.setMembershipAmount,options:i.map((function(t){return{label:e.renderAmount(t),value:t.id,key:t.id}}))})),Object(a.createElement)(o.PanelBody,{title:Object(l.__)("Management","jetpack")},Object(a.createElement)(o.ExternalLink,{href:"https://wordpress.com/earn/payments/".concat(e.state.siteSlug)},Object(l.__)("See your earnings, subscriber list, and payment plans.","jetpack"))));return Object(a.createElement)(a.Fragment,null,e.props.noticeUI,!e.hasUpgradeNudge&&!e.state.shouldUpgrade&&2===r&&Object(a.createElement)(D,{blockName:"recurring-payments",stripeConnectUrl:s}),!e.hasUpgradeNudge&&e.state.shouldUpgrade&&Object(a.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(T.BlockIcon,{icon:V}),label:Object(l.__)("Payments","jetpack"),notices:t,instructions:Object(l.__)("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(l.__)("Upgrade your plan","jetpack")),e.renderDisclaimer())),(0===r||2===e.state.addingMembershipAmount)&&!e.props.attributes.planId&&Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(T.BlockIcon,{icon:V}),notices:t},Object(a.createElement)(o.Spinner,null)),!e.state.shouldUpgrade&&!e.props.attributes.planId&&1===r&&0===i.length&&Object(a.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(T.BlockIcon,{icon:V}),label:Object(l.__)("Payments","jetpack"),notices:t},Object(a.createElement)("div",{className:"components-placeholder__instructions"},Object(a.createElement)("p",null,Object(l.__)("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&&i.length>0&&Object(a.createElement)("div",{className:"wp-block-jetpack-recurring-payments"},Object(a.createElement)(o.Placeholder,{icon:Object(a.createElement)(T.BlockIcon,{icon:V}),label:Object(l.__)("Payments","jetpack"),notices:t},Object(a.createElement)("div",{className:"components-placeholder__instructions"},Object(a.createElement)("p",null,Object(l.__)("To use this block, select a previously created payment plan.","jetpack")),e.renderMembershipAmounts(),Object(a.createElement)("p",null,Object(l.__)("Or a new one.","jetpack")),e.renderAddMembershipAmount(!1),e.renderDisclaimer()))),u&&p,((e.hasUpgradeNudge||!e.state.shouldUpgrade)&&0!==r||e.props.attributes.planId)&&Object(a.createElement)(C.a,{attributes:Object(c.pick)(e.props.attributes,["submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"]),setAttributes:e.props.setAttributes}),e.hasUpgradeNudge&&2===r&&Object(a.createElement)("div",{className:"wp-block-jetpack-recurring-payments disclaimer-only"},e.renderDisclaimer()))})),e.state={connected:0,connectURL:null,addingMembershipAmount:0,shouldUpgrade:!1,upgradeURL:"",products:[],siteSlug:"",editedProductCurrency:"USD",editedProductPrice:z($("USD"),"USD"),editedProductPriceValid:!0,editedProductTitle:"",editedProductTitleValid:!0,editedProductRenewInterval:"1 month"},e.timeout=null;var n=Object(B.a)("recurring-payments");return e.hasUpgradeNudge=!n.available&&"missing_plan"===n.unavailableReason,e}return k()(t,e),d()(t,[{key:"getConnectUrl",value:function(){var e,t=this.props.postId,n=this.state.connectURL;if(!Object(A.isURL)(n))return null;if(!t)return n;try{var r=Object(A.getQueryArg)(n,"state");e=JSON.parse(atob(r))}catch(a){return n}return e.from_editor_post_id=t,Object(A.addQueryArgs)(n,{state:btoa(JSON.stringify(e))})}}]),t}(a.Component),H=Object(P.compose)([Object(N.withSelect)((function(e){return{postId:e("core/editor").getCurrentPostId()}})),o.withNotices])(U),q=(n(267),n(18)),V=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(l.__)("Payments","jetpack"),icon:V,description:Object(l.__)("Button allowing you to sell products and subscriptions.","jetpack"),category:Object(q.a)()?"earn":"jetpack",keywords:[Object(l._x)("sell","block search term","jetpack"),Object(l._x)("subscriptions","block search term","jetpack"),Object(l._x)("product","block search term","jetpack"),"stripe",Object(l._x)("memberships","block search term","jetpack")],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"}},edit:H,save:function(){return null},supports:{html:!1,align:!0}},W={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},K=Object.keys(W).map((function(e){var t=Object(i.a)(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(c.trimEnd)(t,"."))}}));function $(e){return W[e]}function Z(e,t){return!isNaN(t)&&t>=$(e)}function J(e){return e.filter((function(e){return Z(e.currency,e.price)}))}Object(r.a)("recurring-payments",G)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(23),l=n(8),s=n.n(l),u=n(12),p=n.n(u),d=n(9),m=n.n(d),h=n(10),b=n.n(h),f=n(5),g=n.n(f),j=n(11),v=n.n(j),k=n(3),_=n.n(k),y=n(6),O=n(16),w=n(7),C=n.n(w),E=n(43),x=[{value:E.b,label:Object(o.__)("Show after threshold","jetpack")},{value:E.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=b()(t)).call.apply(e,[this].concat(a))),_()(g()(n),"state",{isThresholdValid:!0}),_()(g()(n),"setCriteria",(function(e){return n.props.setAttributes({criteria:e})})),_()(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===E.b?Object(o.sprintf)(Object(o._n)("This block will only appear to people who have visited this page more than once.","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):Object(o.sprintf)(Object(o._n)("This block will only appear to people who are visiting this page for the first 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:C()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},Object(a.createElement)(i.Placeholder,{icon:N,label:Object(o.__)("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},Object(a.createElement)(i.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)(i.RadioControl,{label:Object(o.__)("Visibility","jetpack"),selected:this.props.attributes.criteria,options:x,onChange:this.setCriteria})),Object(a.createElement)(i.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),Object(a.createElement)(y.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),P=(n(269),n(18)),N=Object(c.a)(Object(a.createElement)(i.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"})),T={attributes:{criteria:{type:"string",default:E.b},threshold:{type:"number",default:E.d}},category:Object(P.a)()?"widgets":"jetpack",description:Object(o.__)("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:N,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)(y.InnerBlocks.Content,null))},example:{attributes:{criteria:E.b,threshold:E.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",T)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(8),l=n.n(c),s=n(12),u=n.n(s),p=n(9),d=n.n(p),m=n(10),h=n.n(m),b=n(5),f=n.n(b),g=n(11),j=n.n(g),v=n(3),k=n.n(v),_=n(7),y=n.n(_),O=n(6),w="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW",C=Object(o.__)("Search for a term or paste a Giphy URL","jetpack"),E=function(e){function t(){var e,n;l()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=d()(this,(e=h()(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,c=t.isSelected,l=t.setAttributes,s=n.align,u=n.caption,p=n.giphyUrl,d=n.searchText,m=n.paddingTop,h=this.state,b=h.captionFocus,f=h.results,g={paddingTop:m},j=y()(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)(i.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)(i.PanelBody,{className:"components-panel__body-gif-branding"},Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},Object(a.createElement)(i.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)(i.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,c&&v,c&&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)||c)&&!!p&&Object(a.createElement)(O.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:b,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)(i.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:A,label:S,instructions:C},v))}}]),t}(a.Component),x=(n(154),n(188),n(18)),S=Object(o.__)("GIF","jetpack"),A=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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.Path,{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"})),P={title:S,icon:A,category:Object(x.a)()?"embed":"jetpack",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:E,save:function(){return null},example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}};Object(r.a)("gif",P)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(8),l=n.n(c),s=n(12),u=n.n(s),p=n(9),d=n.n(p),m=n(10),h=n.n(m),b=n(11),f=n.n(b),g=n(6),j=n(4),v=n(16),k=n(17);function _(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)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200"},Object(a.createElement)("title",null,Object(o.__)("Grey square","jetpack")),Object(a.createElement)(i.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),Object(a.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(a.createElement)("title",null,Object(o.__)("Icon for image","jetpack")),Object(a.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}))),e.displayDate&&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 y(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,h()(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,c=e.setAttributes,l=e.instanceId,s=t.displayContext,u=t.displayDate,p=t.displayThumbnails,d=t.postLayout,m=t.postsToShow,h=[{icon:"grid-view",title:Object(o.__)("Grid View","jetpack"),onClick:function(){return c({postLayout:"grid"})},isActive:"grid"===d},{icon:"list-view",title:Object(o.__)("List View","jetpack"),onClick:function(){return c({postLayout:"list"})},isActive:"list"===d}],b=[],f=0;f<m;f++)r[f]?b.push(Object(a.createElement)(y,{id:"related-posts-".concat(l,"-post-").concat(f),key:"jp-relatedposts-i2-"+f,post:r[f],displayThumbnails:p,displayDate:u,displayContext:s})):b.push(Object(a.createElement)(_,{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)(i.PanelBody,{title:Object(o.__)("Related Posts Settings","jetpack")},Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Display thumbnails","jetpack"),checked:p,onChange:function(e){return c({displayThumbnails:e})}}),Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Display date","jetpack"),checked:u,onChange:function(e){return c({displayDate:e})}}),Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Display context (category or tag)","jetpack"),checked:s,onChange:function(e){return c({displayContext:e})}}),Object(a.createElement)(i.RangeControl,{label:Object(o.__)("Number of posts","jetpack"),value:m,onChange:function(e){return c({postsToShow:Math.min(e,6)})},min:1,max:6}))),Object(a.createElement)(g.BlockControls,null,Object(a.createElement)(i.Toolbar,{controls:h})),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:b}))))}}]),t}(a.Component),C=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),E=(n(268),n(18)),x={title:Object(o.__)("Related Posts","jetpack"),icon:Object(a.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(i.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},Object(a.createElement)(i.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"}))),category:Object(E.a)()?"embed":"jetpack",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:C,save:function(){return null},example:{attributes:{postLayout:"grid",displayDate:!0,displayThumbnails:!0,displayContext:!1,postsToShow:2}}};Object(r.a)("related-posts",x)},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);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}));var a={};n.r(a),n.d(a,"getFailedConnections",(function(){return h})),n.d(a,"getMustReauthConnections",(function(){return b}));var o=n(0),i=n(1),c=n(2),l=n(70),s=n(39),u=(n(307),n(16));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 h(e){return e.filter((function(e){return!1===e.test_success}))}function b(e){return e.filter((function(e){return"must_reauth"===e.test_success})).map((function(e){return e.service_name}))}var f=n(20),g=n.n(f),j=n(165),v=n.n(j),k=n(4),_=n(37),y=n.n(_),O=n(21),w=n.n(O);function C(){return(C=y()(regeneratorRuntime.mark((function e(t,n){var r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.dispatch,e.prev=1,e.next=4,w()({path:"/wpcom/v2/publicize/connection-test-results"});case 4:return a=e.sent,e.abrupt("return",r(p(a)));case 8:e.prev=8,e.t0=e.catch(1);case 10:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}var E={REFRESH_CONNECTION_TEST_RESULTS:function(e,t){return C.apply(this,arguments)}};var x,S,A,P,N,T={FETCH_FROM_API:function(e){var t=e.path;return w()({path:t})}},F=Object(u.registerStore)("jetpack/publicize",{actions:r,controls:T,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_CONNECTION_TEST_RESULTS":return t.results;case"REFRESH_CONNECTION_TEST_RESULTS":return[]}return e},selectors:a});x=F,A=[v()(E)],P=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},N={getState:x.getState,dispatch:function(){return P.apply(void 0,arguments)}},S=A.map((function(e){return e(N)})),P=k.flowRight.apply(void 0,g()(S))(x.dispatch),x.dispatch=P;var B=n(66),I=n(17),M=n(8),L=n.n(M),R=n(12),D=n.n(R),z=n(9),U=n.n(z),H=n(10),q=n.n(H),V=n(5),G=n.n(V),W=n(11),K=n.n(W),$=n(3),Z=n.n($),J=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=U()(this,(e=q()(t)).call.apply(e,[this].concat(a))),Z()(G()(n),"refreshConnectionClick",(function(e){var t=e.target,r=t.href,a=t.title;e.preventDefault();var o=window.open(r,a,""),i=window.setInterval((function(){!1!==o.closed&&(window.clearInterval(i),n.props.refreshConnections())}),500)})),n}return K()(t,e),D()(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)(c.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},Object(o.createElement)("p",null,Object(i.__)("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)(c.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)(c.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),Y=Object(I.compose)([Object(u.withSelect)((function(e){return{failedConnections:e("jetpack/publicize").getFailedConnections()}})),Object(u.withDispatch)((function(e){return{refreshConnections:e("jetpack/publicize").refreshConnectionTestResults}}))])(J),Q=n(14),X=n.n(Q),ee=n(7),te=n.n(ee),ne=n(27),re=n.n(ne),ae=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"}))),oe=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"}))),ie=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"}))),ce=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"}))),le=function(e){var t=e.serviceName,n={className:"jetpack-publicize-gutenberg-social-icon is-".concat(t),size:24};switch(t){case"facebook":return Object(o.createElement)(c.Icon,re()({icon:ae},n));case"twitter":return Object(o.createElement)(c.Icon,re()({icon:oe},n));case"linkedin":return Object(o.createElement)(c.Icon,re()({icon:ie},n));case"tumblr":return Object(o.createElement)(c.Icon,re()({icon:ce},n))}return null},se=n(47),ue=function(e){function t(){var e,n;L()(this,t);for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return n=U()(this,(e=q()(t)).call.apply(e,[this].concat(a))),Z()(G()(n),"maybeDisplayLinkedInNotice",(function(){return n.connectionNeedsReauth()&&Object(o.createElement)(c.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},Object(o.createElement)("p",null,Object(i.__)("Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.","jetpack")),Object(o.createElement)(c.ExternalLink,{href:"https://wordpress.com/marketing/connections/".concat(Object(se.a)())},Object(i.__)("Go to Sharing settings","jetpack")))})),Z()(G()(n),"connectionNeedsReauth",(function(){return Object(k.includes)(n.props.mustReauthConnections,n.props.name)})),Z()(G()(n),"onConnectionChange",(function(){var e=n.props.id;n.props.toggleConnection(e)})),n}return K()(t,e),D()(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,i=e.name,l="connection-"+i+"-"+r,s=i.replace("_","-"),u=Object(o.createElement)(c.FormToggle,{id:l,className:"jetpack-publicize-connection-toggle",checked:n,onChange:this.onConnectionChange});return(t||this.connectionIsFailing()||this.connectionNeedsReauth())&&(u=Object(o.createElement)(c.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)(le,{serviceName:s}),Object(o.createElement)("span",{className:"jetpack-publicize-connection-label-copy"},a)),u))}}]),t}(o.Component),pe=Object(u.withSelect)((function(e){return{failedConnections:e("jetpack/publicize").getFailedConnections(),mustReauthConnections:e("jetpack/publicize").getMustReauthConnections()}}))(ue),de=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=U()(this,(e=q()(t)).call.apply(e,[this].concat(a))),Z()(G()(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 K()(t,e),D()(t,[{key:"getButtonLink",value:function(){var e=Object(se.a)();return e?"https://wordpress.com/marketing/connections/".concat(e):"options-general.php?page=sharing&publicize_popup=true"}},{key:"render",value:function(){var e=te()("jetpack-publicize-add-connection-container",this.props.className);return Object(o.createElement)("div",{className:e},Object(o.createElement)(c.ExternalLink,{onClick:this.settingsClick},Object(i.__)("Connect an account","jetpack")))}}]),t}(o.Component),me=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=U()(this,(e=q()(t)).call.apply(e,[this].concat(a))),Z()(G()(n),"state",{hasEditedShareMessage:!1}),Z()(G()(n),"fieldId",Object(k.uniqueId)("jetpack-publicize-message-field-")),Z()(G()(n),"onMessageChange",(function(e){var t=n.props.messageChange;n.setState({hasEditedShareMessage:!0}),t(e)})),n}return K()(t,e),D()(t,[{key:"isDisabled",value:function(){return this.props.connections.every((function(e){return!e.toggleable}))}},{key:"getShareMessage",value:function(){var e=this.props,t=e.shareMessage,n=e.defaultShareMessage;return this.state.hasEditedShareMessage||""!==t?t:n}},{key:"render",value:function(){var e=this.props,t=e.connections,n=e.toggleConnection,r=e.refreshCallback,a=this.getShareMessage(),c=256-a.length,l=te()("jetpack-publicize-character-count",{"wpas-twitter-length-limit":c<=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,i=e.service_name,c=e.toggleable;return Object(o.createElement)(pe,{disabled:!c,enabled:r,key:a,id:a,label:t,name:i,toggleConnection:n})}))),Object(o.createElement)(de,{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(i.__)("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:256,placeholder:Object(i.__)("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:l},Object(i.sprintf)(Object(i._n)("%d character remaining","%d characters remaining",c,"jetpack"),c)))))}}]),t}(o.Component),he=Object(I.compose)([Object(u.withSelect)((function(e){var t=e("core/editor").getEditedPostAttribute("meta"),n=e("core/editor").getEditedPostAttribute("title"),r=Object(k.get)(t,["jetpack_publicize_message"],"");return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections"),defaultShareMessage:n.substr(0,256),shareMessage:r.substr(0,256)}})),Object(u.withDispatch)((function(e,t){var n=t.connections;return{toggleConnection:function(t){var r=n.map((function(e){return X()({},e,{enabled:e.id===t?!e.enabled:e.enabled})}));e("core/editor").editPost({jetpack_publicize_connections:r})},messageChange:function(t){e("core/editor").editPost({meta:{jetpack_publicize_message:t.target.value}})}}}))])(me),be=Object(I.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;return Object(o.createElement)(o.Fragment,null,t&&t.some((function(e){return e.enabled}))&&Object(o.createElement)(Y,null),Object(o.createElement)("div",null,Object(i.__)("Connect and select the accounts where you'd like to share your post.","jetpack")),t&&t.length>0&&Object(o.createElement)(he,{refreshCallback:n}),t&&0===t.length&&Object(o.createElement)(de,{className:"jetpack-publicize-add-connection-wrapper",refreshCallback:n}))})),fe={render:function(){return Object(o.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},Object(o.createElement)(B.a,null,Object(o.createElement)(c.PanelBody,{title:Object(i.__)("Share this post","jetpack")},Object(o.createElement)(be,null))),Object(o.createElement)(l.PluginPrePublishPanel,{initialOpen:!0,id:"publicize-title",title:Object(o.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},Object(i.__)("Share this post","jetpack"))},Object(o.createElement)(be,null)))}},ge=n(57);Object(ge.a)("publicize",fe)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(6),c=n(2);var l=Object(a.createElement)(c.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},Object(a.createElement)(c.Path,{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"})),s=[{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:l,innerBlocks:[["jetpack/whatsapp-button",{}]]}],u=n(23),p=n(18),d=(n(308),{title:Object(o.__)("Send A Message","jetpack"),description:Object(o.__)("Let your visitors send you messages with the tap of a button.","jetpack"),icon:Object(u.a)(Object(a.createElement)(c.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"})),category:Object(p.a)()?"grow":"jetpack",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)(i.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))},save:function(e){return Object(a.createElement)("div",{className:e.className},Object(a.createElement)(i.InnerBlocks.Content,null))},variations:s,example:{}}),m={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(37),b=n.n(h),f=n(15),g=n.n(f),j=n(16),v=n(26),k=[{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:"EC",label:"🇪🇨 +593",value:"593EC"},{code:"GF",label:"🇬🇫 +594",value:"594GF"},{code:"GY",label:"🇬🇾 +595",value:"595GY"},{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"}],_=n(48);n(271);var y=n(7),O=n.n(y);n(309);var w=Object(o.__)("WhatsApp Button","jetpack"),C="https://api.whatsapp.com/send?phone=",E=(Object(o.__)("Chat on WhatsApp","jetpack"),Object(o.__)("Hi, I got your WhatsApp information from your website.","jetpack"),{title:w,description:Object(o.__)("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:l,category:Object(p.a)()?"grow":"jetpack",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},attributes:m,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,l=e.clientId,s=t.countryCode,p=t.phoneNumber,d=t.buttonText,m=t.firstMessage,h=t.colorClass,f=t.backgroundColor,y=t.openInNewTab,O=Object(a.useState)(!0),w=g()(O,2),C=w[0],E=w[1],x=Object(j.useDispatch)("core/block-editor").selectBlock,S=Object(a.useCallback)(b()(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,k.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&&(S(),x(l))}),[l,s,S,x]);var A=function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(c.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)(c.SelectControl,{value:s,onChange:function(e){return n({countryCode:e})},options:k}),Object(a.createElement)(c.TextControl,{placeholder:Object(o.__)("Your phone number…","jetpack"),onChange:function(e){n({phoneNumber:e}),0===e.length&&E(!0),e.length>2&&E(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:p}),!C&&Object(a.createElement)(_.a,{isError:!0,className:"jetpack-whatsapp-error"},Object(o.__)("Please enter a valid phone number.","jetpack"))),Object(a.createElement)(c.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)(c.ToggleControl,{label:Object(o.__)("Open in new tab","jetpack"),checked:y,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:r+" is-color-"+h},c.ToolbarGroup&&Object(a.createElement)(i.BlockControls,null,Object(a.createElement)(c.ToolbarGroup,null,Object(a.createElement)(c.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)(c.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:Object(o.__)("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:function(n){e||n.keyCode!==v.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:Object(u.a)(Object(a.createElement)(c.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 A()}}))),Object(a.createElement)(i.InspectorControls,null,Object(a.createElement)(c.PanelBody,{title:Object(o.__)("WhatsApp Button Settings","jetpack"),initialOpen:!0},A()),Object(a.createElement)(i.PanelColorSettings,{title:Object(o.__)("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:f,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)(i.RichText,{placeholder:d.default,keepPlaceholderOnFocus:!0,value:d,onChange:function(e){return n({buttonText:e})},withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:f}}))},save:function(e){var t,n=e.attributes,r=e.className,o=n.countryCode,c=n.phoneNumber,l=n.firstMessage,s=n.buttonText,u=n.backgroundColor,p=n.colorClass,d=n.openInNewTab,m=o&&c?o.replace(/\D+/g,"")+c.replace(/\D+/g,""):"",h=O()(r,p?"is-color-"+p:void 0,s.length?void 0:"has-no-text"),b=d?"_blank":"_self";return Object(a.createElement)("div",{className:h},Object(a.createElement)("a",{className:"whatsapp-block__button",href:(t=C+m,""!==l&&(t+="&text="+encodeURIComponent(l)),t),style:{backgroundColor:u},target:b,rel:"noopener noreferrer"},Object(a.createElement)(i.RichText.Content,{value:s})))},example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}}});Object(r.a)("send-a-message",d,[{name:"whatsapp-button",settings:E}])},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(1),o=n(28),i=n(32),c={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:i.a},hexPrimaryColor:{type:"string",validator:i.a},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:i.a},hexSecondaryColor:{type:"string",validator:i.a},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:i.a},hexBackgroundColor:{type:"string",validator:i.a},exampleFeedData:{type:"object"}},l=n(3),s=n.n(l),u=n(15),p=n.n(u),d=n(0),m=n(72),h=n.n(m),b=n(2),f=n(17),g=n(6),j=n(16),v=n(13),k=n(34),_=(n(162),Object(d.createElement)(b.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(b.G,null,Object(d.createElement)(b.Rect,{fill:"none",height:"24",width:"24"}),Object(d.createElement)(b.Rect,{fill:"none",height:"24",width:"24"}),Object(d.createElement)(b.Rect,{fill:"none",height:"24",width:"24"})),Object(d.createElement)(b.G,null,Object(d.createElement)(b.G,null),Object(d.createElement)(b.G,null,Object(d.createElement)(b.G,{transform:"matrix(1 0 0 1 144 120)"},Object(d.createElement)(b.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"})))))),y=n(22),O=n(149),w=n(59),C=n(37),E=n.n(C),x=n(36),S=n(21),A=n.n(S),P=function(){var e=E()(regeneratorRuntime.mark((function e(t){var n,r,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A()({path:Object(o.addQueryArgs)("/wpcom/v2/podcast-player",{url:t})});case 3:n=e.sent,e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),r=e.t0;case 9:if(!n){e.next=11;break}return e.abrupt("return",{type:x.b,data:n});case 11:return e.next=13,A()({path:Object(o.addQueryArgs)("/oembed/1.0/proxy",{url:t})});case 13:if(a=e.sent,i='<a href="'+t+'">'+t+"</a>",!a||a.html===i){e.next=17;break}return e.abrupt("return",{type:x.a});case 17:throw r;case 18:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),N=Object(b.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}})),T=h()("jetpack:podcast-player:edit"),F=Object(y.b)()||Object(y.a)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/",B=Object(f.compose)([Object(j.withDispatch)((function(e,t){var n=t.clientId,r=t.attributes;return{replaceWithEmbedBlock:function(){e("core/block-editor").replaceBlock(n,Object(v.createBlock)("core/embed",{url:r.url}))}}})),Object(g.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),b.withNotices,f.withInstanceId,N])((function(e){var t=e.instanceId,n=e.className,r=e.attributes,i=e.setAttributes,l=e.noticeOperations,u=l.createErrorNotice,m=l.removeAllNotices,h=e.noticeUI,f=e.primaryColor,j=e.setPrimaryColor,v=e.secondaryColor,y=e.setSecondaryColor,C=e.fallbackTextColor,E=e.backgroundColor,S=e.setBackgroundColor,A=e.fallbackBackgroundColor,N=e.isSelected,B=e.replaceWithEmbedBlock,I=Object(k.a)(c,r),M=I.url,L=I.itemsToShow,R=I.showCoverArt,D=I.showEpisodeDescription,z=I.exampleFeedData,U="jetpack-podcast-player-block-".concat(t),H=Object(d.useState)(M||""),q=p()(H,2),V=q[0],G=q[1],W=Object(d.useState)(!1),K=p()(W,2),$=K[0],Z=K[1],J=Object(d.useState)(z||{}),Y=p()(J,2),Q=Y[0],X=Y[1],ee=Object(d.useRef)(),te=Object(d.useState)(!1),ne=p()(te,2),re=ne[0],ae=ne[1],oe=Object(d.useCallback)((function(e){ee.current=Object(w.c)(P(e)),ee.current.promise.then((function(e){if(null!=e&&e.isCanceled)T("Block was unmounted during fetch",e);else switch(null==e?void 0:e.type){case x.b:return X(e.data);case x.a:return B()}}),(function(e){null!=e&&e.isCanceled?T("Block was unmounted during fetch",e):(T("feed error",e),u(Object(a.__)("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),Z(!0))}))}),[u,B]);Object(d.useEffect)((function(){return function(){var e,t;null==ee||null===(e=ee.current)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e)}}),[]),Object(d.useEffect)((function(){m(),M&&(X({}),oe(M))}),[oe,m,M]),Object(d.useEffect)((function(){!N&&re&&ae(!1)}),[N]);var ie=Object(d.useCallback)((function(e){if(e.preventDefault(),m(),V){var t=Object(o.prependHTTP)(V);Object(o.isURL)(t)?(t===M?oe(M):i({url:t}),G(t),Z(!1)):u(Object(a.__)("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))}}),[V,M,oe,u,m,i]);if($||!M&&!z)return Object(d.createElement)(b.Placeholder,{icon:Object(d.createElement)(g.BlockIcon,{icon:_}),label:Object(a.__)("Podcast Player","jetpack"),instructions:Object(a.__)("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},Object(d.createElement)("form",{onSubmit:ie},h,Object(d.createElement)(b.TextControl,{type:"text",inputMode:"url",placeholder:Object(a.__)("Enter URL here…","jetpack"),value:V||"",className:"components-placeholder__input",onChange:G}),Object(d.createElement)(b.Button,{isPrimary:!0,type:"submit"},Object(a.__)("Embed","jetpack"))),Object(d.createElement)("div",{className:"components-placeholder__learn-more"},Object(d.createElement)(b.ExternalLink,{href:F},Object(a.__)("Learn more about embeds","jetpack"))));if(!Q.tracks||!Q.tracks.length)return Object(d.createElement)(b.Placeholder,{icon:Object(d.createElement)(g.BlockIcon,{icon:_}),label:Object(a.__)("Podcast Player","jetpack"),instructions:Object(a.__)("Loading podcast feed…","jetpack")},Object(d.createElement)(b.Spinner,null));var ce=function(e,t){return function(n){i(s()({},e,n)),t(n)}};return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.BlockControls,null,b.ToolbarGroup?Object(d.createElement)(b.ToolbarGroup,null,Object(d.createElement)(b.Button,{"aria-label":Object(a.__)("Edit Podcast Feed URL","jetpack"),onClick:function(){return Z(!0)}},Object(a.__)("Replace","jetpack"))):Object(d.createElement)(b.Toolbar,{controls:[{title:Object(a.__)("Edit Podcast Feed URL","jetpack"),onClick:function(){return Z(!0)},extraProps:{children:Object(a.__)("Replace","jetpack")}}]})),Object(d.createElement)(g.InspectorControls,null,Object(d.createElement)(b.PanelBody,{title:Object(a.__)("Podcast settings","jetpack")},Object(d.createElement)(b.RangeControl,{label:Object(a.__)("Number of items","jetpack"),value:L,onChange:function(e){return i({itemsToShow:e})},min:1,max:10,required:!0}),Object(d.createElement)(b.ToggleControl,{label:Object(a.__)("Show Cover Art","jetpack"),checked:R,onChange:function(e){return i({showCoverArt:e})}}),Object(d.createElement)(b.ToggleControl,{label:Object(a.__)("Show Episode Description","jetpack"),checked:D,onChange:function(e){return i({showEpisodeDescription:e})}})),Object(d.createElement)(g.PanelColorSettings,{title:Object(a.__)("Color Settings","jetpack"),colorSettings:[{value:f.color,onChange:ce("hexPrimaryColor",j),label:Object(a.__)("Primary Color","jetpack")},{value:v.color,onChange:ce("hexSecondaryColor",y),label:Object(a.__)("Secondary Color","jetpack")},{value:E.color,onChange:ce("hexBackgroundColor",S),label:Object(a.__)("Background Color","jetpack")}]},Object(d.createElement)(g.ContrastChecker,{isLargeText:!1,textColor:v.color,backgroundColor:E.color,fallbackBackgroundColor:A,fallbackTextColor:C}))),Object(d.createElement)("div",{id:U,className:n},Object(d.createElement)(O.a,{playerId:U,attributes:I,tracks:Q.tracks,cover:Q.cover,title:Q.title,link:Q.link}),!re&&Object(d.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:function(){return ae(!0)}})))})),I=(n(257),n(18)),M=("jetpack/".concat("podcast-player"),{title:Object(a.__)("Podcast Player","jetpack"),description:Object(a.__)("Select and play episodes from a single podcast.","jetpack"),icon:_,category:Object(I.a)()?"embed":"jetpack",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(){return null},attributes:c,example:{attributes:{customPrimaryColor:"#00be28",hexPrimaryColor:"#00be28",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"}]}}}});Object(r.a)("podcast-player",M)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(1),o=n(15),i=n.n(o),c=n(0),l=n(6),s=n(2),u=n(17),p=n(67),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),i=Object(c.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),s=Object(c.createElement)(c.Fragment,null,Object(c.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?i:s})),m=function(e,t,n){Object(c.useEffect)((function(){var r=setTimeout((function(){return e(n)}),t);return function(){return clearTimeout(r)}}),[n])},h=(n(305),n(195),function(e){var t=e.attributes,n=e.className,r=e.clientId,o=e.isSelected,h=e.setAttributes,b=t.imageBefore,f=t.imageAfter,g=t.caption,j=t.orientation,v=null,k=null;if(u.useResizeObserver){var _=Object(u.useResizeObserver)(),y=i()(_,2);v=y[0],k=y[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=b&&b.url&&f&&f.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return Object(c.useLayoutEffect)((function(){b.url&&f.url&&"undefined"!=typeof juxtapose&&juxtapose.scanPage()}),[b,f,j]),Object(c.createElement)("figure",{className:n,id:r},v,Object(c.createElement)(l.InspectorControls,{key:"controls"},Object(c.createElement)(s.PanelBody,{title:Object(a.__)("Orientation","jetpack")},Object(c.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){h({orientation:e})}}))),Object(c.createElement)("div",{className:O,"data-mode":j||"horizontal"},Object(c.createElement)(s.Placeholder,{label:null},Object(c.createElement)("div",{className:"image-compare__image-before"},Object(c.createElement)(d,{image:{id:b.id,url:b.url,alt:b.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,i=e.media_details,c=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,l=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;h({imageBefore:{id:o,url:r||e.url,alt:a,width:c,height:l}})}}})),Object(c.createElement)("div",{className:"image-compare__image-after"},Object(c.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,i=e.media_details,c=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,l=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;h({imageAfter:{id:o,url:r||e.url,alt:a,width:c,height:l}})}}})))),(!l.RichText.isEmpty(g)||o&&b.url&&f.url)&&Object(c.createElement)(l.RichText,{tagName:"figcaption",placeholder:Object(a.__)("Write caption","jetpack"),value:g,onChange:function(e){return h({caption:e})},inlineToolbar:!0}))}),b=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.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,i=t.orientation;return Object(c.createElement)("figure",{className:n},Object(c.createElement)("div",{className:"juxtapose","data-mode":i||"horizontal"},Object(c.createElement)("img",{id:r.id,src:r.url,alt:r.alt,width:r.width,height:r.height,className:"image-compare__image-before"}),Object(c.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(c.createElement)(l.RichText.Content,{tagName:"figcaption",value:o}))},g=n(163),j=n.n(g),v=n(164),k=n.n(v),_=n(18),y={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:b,category:Object(_.a)()?"layout":"jetpack",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:h,save:f};Object(r.a)("image-compare",y)},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(1),o=n(2),i=n(17),c=n(39),l=n(16),s=n(98),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(i.compose)([u,p])((function(e){var t=e.areLikesEnabled,n=e.editPost;return Object(r.createElement)(c.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(57);Object(m.a)("likes",d)},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(1),o=n(2),i=n(17),c=n(39),l=n(16),s=n(98),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(i.compose)([u,p])((function(e){var t=e.isSharingEnabled,n=e.editPost;return Object(r.createElement)(c.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(57);Object(m.a)("sharing",d)},function(e,t,n){"use strict";n.r(t);var r=n(8),a=n.n(r),o=n(12),i=n.n(o),c=n(9),l=n.n(c),s=n(10),u=n.n(s),p=n(11),d=n.n(p),m=n(0),h=n(1),b=n(4),f=n(2),g=n(16),j=n(5),v=n.n(j),k=n(3),_=n.n(k),y=(n(310),function(e){function t(){var e,n;a()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=l()(this,(e=u()(t)).call.apply(e,[this].concat(o))),_()(v()(n),"state",{hasCopied:!1}),_()(v()(n),"onCopy",(function(){return n.setState({hasCopied:!0})})),_()(v()(n),"onFinishCopy",(function(){return n.setState({hasCopied:!1})})),_()(v()(n),"onFocus",(function(e){return e.target.select()})),n}return d()(t,e),i()(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(h.__)("Copied!","jetpack"):Object(h._x)("Copy","verb","jetpack"))):null}}]),t}(m.Component)),O=n(66),w={render:function(){return Object(m.createElement)(E,null)}},C=function(e){function t(){return a()(this,t),l()(this,u()(t).apply(this,arguments))}return d()(t,e),i()(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(h.__)("Shortlink","jetpack"),className:"jetpack-shortlinks__panel"},Object(m.createElement)(y,{link:e}))):null}}]),t}(m.Component),E=Object(g.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{shortlink:Object(b.get)(t,"jetpack_shortlink","")}}))(C),x=n(57);Object(x.a)("shortlinks",w)},function(e,t,n){"use strict";n.r(t);var r=n(14),a=n.n(r),o=n(0),i=n(31),c=n(15),l=n.n(c),s=n(4),u=n(21),p=n.n(u),d=n(1),m=n(28),h=n(13),b=n(16);var f=n(2),g=(n(304),n(39));Object(i.addFilter)("blocks.registerBlockType","jetpack/gathering-tweetstorms",(function(e){if("core-embed/twitter"!==e.name||e.isDeprecation)return e;var t=e.edit;return a()({},e,{edit:Object(f.withNotices)((function(e){var n=e.noticeOperations,r=e.noticeUI,a=e.onReplace,i=e.attributes.url,c=function(e){var t=e.onReplace,n=Object(o.useState)(!1),r=l()(n,2),a=r[0],i=r[1],c=Object(b.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(),i(!0),p()({path:Object(m.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((function(e){(i(!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(h.createBlock)("core/paragraph",{content:e.content});case"gallery":return Object(h.createBlock)("core/gallery",{images:e.images});case"image":return Object(h.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return Object(h.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return Object(h.createBlock)("core/embed",{url:e.url})}}))),Object(s.some)(c,(function(e){return"twitter"===e.service_name&&"@".concat(a)===e.display_name}))||Object(b.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(b.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){i(!1),n.createErrorNotice(e.message)}))}}}}}({onReplace:a}),u=c.isGatheringStorm,j=c.unleashStorm;return Object(o.createElement)(o.Fragment,null,r,Object(o.createElement)(g.BlockControls,null,f.ToolbarGroup?Object(o.createElement)(f.ToolbarGroup,{className:"gathering-tweetstorms__embed-toolbar"},Object(o.createElement)(f.Button,{className:"gathering-tweetstorms__embed-toolbar-button",onClick:function(){return j(i,n)},label:Object(d.__)("Import the entire Twitter thread directly into this post.","jetpack"),showTooltip:!0,disabled:u},Object(d.__)("Unroll","jetpack")),u&&Object(o.createElement)(f.Spinner,null)):Object(o.createElement)(f.Toolbar,{controls:[{title:Object(d.__)("Import the entire Twitter thread directly into this post.","jetpack"),onClick:function(){return j(i,n)},extraProps:{className:"gathering-tweetstorms__embed-toolbar-button",children:Object(d.__)("Unroll","jetpack")}}]})),Object(o.createElement)(t,e))}))})}))},,,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(1),o=n(2),i=n(70),c=(n(321),n(66)),l=n(8),s=n.n(l),u=n(12),p=n.n(u),d=n(9),m=n.n(d),h=n(10),b=n.n(h),f=n(5),g=n.n(f),j=n(11),v=n.n(j),k=n(3),_=n.n(k),y=n(17),O=n(4),w=n(16),C=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=b()(t)).call.apply(e,[this].concat(a))),_()(g()(n),"onMessageChange",(function(e){n.props.updateSeoDescription(e.target.value)})),n}return v()(t,e),p()(t,[{key:"render",value:function(){var e=this.props.seoDescription;return Object(r.createElement)("div",{className:"jetpack-seo-message-box"},Object(r.createElement)("textarea",{value:e,onChange:this.onMessageChange,placeholder:Object(a.__)("Write a description…","jetpack"),rows:4}),Object(r.createElement)("div",{className:"jetpack-seo-character-count"},Object(a.sprintf)(Object(a._n)("%d character","%d characters",e.length,"jetpack"),e.length)))}}]),t}(r.Component),E=Object(y.compose)([Object(w.withSelect)((function(e){return{seoDescription:Object(O.get)(e("core/editor").getEditedPostAttribute("meta"),["advanced_seo_description"],"")}})),Object(w.withDispatch)((function(e){return{updateSeoDescription:function(t){e("core/editor").editPost({meta:{advanced_seo_description:t}})}}}))])(C),x={render:function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(c.a,null,Object(r.createElement)(o.PanelBody,{title:Object(a.__)("SEO Description","jetpack")},Object(r.createElement)(E,null))),Object(r.createElement)(i.PluginPrePublishPanel,{initialOpen:!0,id:"seo-title",title:Object(r.createElement)("span",{id:"seo-defaults",key:"seo-title-span"},Object(a.__)("SEO Description","jetpack"))},Object(r.createElement)(E,null)))}},S=n(57);Object(S.a)("seo",x)},,function(e,t,n){},function(e,t,n){var r;!function(a){var o=/^\s+/,i=/\s+$/,c=0,l=a.round,s=a.min,u=a.max,p=a.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,c=null,l=null,p=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(i,"").toLowerCase();var t,n=!1;if(P[e])e=P[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=q.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=q.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=q.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=q.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=q.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=q.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=q.hex8.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),a:D(t[4]),format:n?"name":"hex8"};if(t=q.hex6.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),format:n?"name":"hex"};if(t=q.hex4.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),a:D(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=q.hex3.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(m=e.r,h=e.g,b=e.b,t={r:255*F(m,255),g:255*F(h,255),b:255*F(b,255)},p=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):V(e.h)&&V(e.s)&&V(e.v)?(r=L(e.s),c=L(e.v),t=function(e,t,n){e=6*F(e,360),t=F(t,100),n=F(n,100);var r=a.floor(e),o=e-r,i=n*(1-t),c=n*(1-o*t),l=n*(1-(1-o)*t),s=r%6;return{r:255*[n,c,i,i,l,n][s],g:255*[l,n,n,c,i,i][s],b:255*[i,i,l,n,n,c][s]}}(e.h,r,c),p=!0,d="hsv"):V(e.h)&&V(e.s)&&V(e.l)&&(r=L(e.s),l=L(e.l),t=function(e,t,n){var r,a,o;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=a=o=n;else{var c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=i(l,c,e+1/3),a=i(l,c,e),o=i(l,c,e-1/3)}return{r:255*r,g:255*a,b:255*o}}(e.h,r,l),p=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var m,h,b;return n=T(n),{ok:p,format:e.format||d,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=c++}function m(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,a,o=u(e,t,n),i=s(e,t,n),c=(o+i)/2;if(o==i)r=a=0;else{var l=o-i;switch(a=c>.5?l/(2-o-i):l/(o+i),o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:a,l:c}}function h(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,a,o=u(e,t,n),i=s(e,t,n),c=o,l=o-i;if(a=0===o?0:l/o,o==i)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:a,v:c}}function b(e,t,n,r){var a=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function f(e,t,n,r){return[M(R(r)),M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s-=t/100,n.s=B(n.s),d(n)}function j(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s+=t/100,n.s=B(n.s),d(n)}function v(e){return d(e).desaturate(100)}function k(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l+=t/100,n.l=B(n.l),d(n)}function _(e,t){t=0===t?0:t||10;var n=d(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(255,n.b-l(-t/100*255))),d(n)}function y(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l-=t/100,n.l=B(n.l),d(n)}function O(e,t){var n=d(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,d(n)}function w(e){var t=d(e).toHsl();return t.h=(t.h+180)%360,d(t)}function C(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+120)%360,s:t.s,l:t.l}),d({h:(n+240)%360,s:t.s,l:t.l})]}function E(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+90)%360,s:t.s,l:t.l}),d({h:(n+180)%360,s:t.s,l:t.l}),d({h:(n+270)%360,s:t.s,l:t.l})]}function x(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+72)%360,s:t.s,l:t.l}),d({h:(n+216)%360,s:t.s,l:t.l})]}function S(e,t,n){t=t||6,n=n||30;var r=d(e).toHsl(),a=360/n,o=[d(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,o.push(d(r));return o}function A(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,a=n.s,o=n.v,i=[],c=1/t;t--;)i.push(d({h:r,s:a,v:o})),o=(o+c)%1;return i}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:a.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=m(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return b(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,a){var o=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16)),M(R(r))];if(a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*F(this._r,255))+"%",g:l(100*F(this._g,255))+"%",b:l(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*F(this._r,255))+"%, "+l(100*F(this._g,255))+"%, "+l(100*F(this._b,255))+"%)":"rgba("+l(100*F(this._r,255))+"%, "+l(100*F(this._g,255))+"%, "+l(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(N[b(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+f(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=d(e);n="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(j,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:p(),g:p(),b:p()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),a=d(t).toRgb(),o=n/100;return d({r:(a.r-r.r)*o+r.r,g:(a.g-r.g)*o+r.g,b:(a.b-r.b)*o+r.b,a:(a.a-r.a)*o+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(a.max(n.getLuminance(),r.getLuminance())+.05)/(a.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,a,o=d.readability(e,t);switch(a=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},d.mostReadable=function(e,t,n){var r,a,o,i,c=null,l=0;a=(n=n||{}).includeFallbackColors,o=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=d.readability(e,t[s]))>l&&(l=r,c=d(t[s]));return d.isReadable(e,c,{level:o,size:i})||!a?c:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var P=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(P);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function B(e){return s(1,u(0,e))}function I(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return a.round(255*parseFloat(e)).toString(16)}function D(e){return I(e)/255}var z,U,H,q=(U="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",H="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(e){return!!q.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},,,function(e,t,n){n(279),n(293),n(282),n(287),n(280),n(281),n(283),n(318),n(302),n(294),n(314),n(286),n(315),n(295),n(284),n(296),n(288),n(299),n(313),n(311),n(297),n(300),n(303),n(301),n(290),n(312),n(316),n(317),n(289),n(291),n(285),n(278),n(292),n(298),n(322),e.exports=n(374)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(1),o=n(32),i={backgroundColor:{type:"string",validator:o.a},textColor:{type:"string",validator:o.a},buttonAndLinkColor:{type:"string",validator:o.a},style:{type:"string",default:"small",validValues:["small","large"]},asin:{type:"string"},showImage:{default:!0,type:"boolean"},showTitle:{default:!0,type:"boolean"},showSeller:{default:!1,type:"boolean"},showPrice:{default:!0,type:"boolean"},showPurchaseButton:{default:!0,type:"boolean"}},c=n(0),l=n(2),s=Object(c.createElement)(l.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)(l.Path,{clipRule:"evenodd",d:"m13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277002-.202-.481003.154-.251003.416 2.925003 3.326 6.786003 5.326 11.076003 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",fillRule:"evenodd"})),u=n(15),p=n.n(u),d=n(325),m=n.n(d),h=n(6),b=n(13),f={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]};n(324);var g=Object(l.withNotices)((function(e){var t,n,r,o,i,u,d,g,j,v=e.attributes,k=v.backgroundColor,_=v.textColor,y=v.buttonAndLinkColor,O=v.asin,w=v.showImage,C=v.showTitle,E=v.showSeller,x=v.showPrice,S=v.showPurchaseButton,A=e.className,P=e.name,N=e.noticeUI,T=e.setAttributes,F=Object(b.getBlockDefaultClassName)(P),B=Object(c.useState)([]),I=p()(B,2),M=I[0],L=I[1],R=/^(\d+)$|\(ASIN:(.+)\)$/,D=Object(c.createElement)(l.Placeholder,{label:Object(a.__)("Amazon","jetpack"),instructions:Object(a.__)("Search by entering an Amazon product name or ID below.","jetpack"),icon:Object(c.createElement)(h.BlockIcon,{icon:s}),notices:N},Object(c.createElement)("form",null,Object(c.createElement)(l.FormTokenField,{value:O,suggestions:M,onInputChange:function(){L(f.products.map((function(e){return"".concat(e.title," (ASIN:").concat(e.asin,")")})))},maxSuggestions:10,label:Object(a.__)("Products","jetpack"),onChange:function(e){var t=e.map((function(e){var t=R.exec(e),n=t[1]||t[2];return f.products.filter((function(e){return e.asin===n}))}));T({asin:t[0][0].asin})}}),Object(c.createElement)(l.Button,{isSecondary:!0,isLarge:!0,type:"submit"},Object(a.__)("Preview","jetpack")))),z=Object(c.createElement)(h.InspectorControls,null,O&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(l.PanelBody,{title:Object(a.__)("Promotion Settings","jetpack")},Object(c.createElement)(l.ToggleControl,{label:Object(a.__)("Show Image","jetpack"),checked:w,onChange:function(){return T({showImage:!w})}}),Object(c.createElement)(l.ToggleControl,{label:Object(a.__)("Show Title","jetpack"),checked:C,onChange:function(){return T({showTitle:!C})}}),Object(c.createElement)(l.ToggleControl,{label:Object(a.__)("Show Author/Seller","jetpack"),checked:E,onChange:function(){return T({showSeller:!E})}}),Object(c.createElement)(l.ToggleControl,{label:Object(a.__)("Show Price","jetpack"),checked:x,onChange:function(){return T({showPrice:!x})}}),Object(c.createElement)(l.ToggleControl,{label:Object(a.__)("Show Purchase Button","jetpack"),checked:S,onChange:function(){return T({showPurchaseButton:!S})}})),Object(c.createElement)(h.PanelColorSettings,{title:Object(a.__)("Color Settings","jetpack"),colorSettings:[{value:k,onChange:function(e){return T({backgroundColor:e})},label:Object(a.__)("Background Color","jetpack")},{value:_,onChange:function(e){return T({textColor:e})},label:Object(a.__)("Text Color","jetpack")},{value:y,onChange:function(e){return T({buttonAndLinkColor:e})},label:Object(a.__)("Button & Link Color","jetpack")}]},Object(c.createElement)(h.ContrastChecker,{isLargeText:!1,textColor:_,backgroundColor:k}))));return Object(c.createElement)("div",{className:A},z,O?(t=f.products.filter((function(e){return e.asin===O}))[0],n=t.title,r=t.detailPageUrl,o=t.listPrice,i=t.imageUrlMedium,u=t.imageWidthMedium,d=t.imageHeightMedium,g=i&&Object(c.createElement)("a",{target:"_blank",href:r,rel:"noopener noreferrer"},Object(c.createElement)("img",{alt:n,src:i,width:u,heigth:d})),j=m.a.mostReadable(y,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString(),O?Object(c.createElement)("div",{style:{backgroundColor:k,color:_,width:u}},w&&g,C&&Object(c.createElement)("div",{className:"".concat(F,"-title")},Object(c.createElement)(l.ExternalLink,{href:r,style:{color:y}},n)),E&&Object(c.createElement)("div",{className:"".concat(F,"-seller")},"TODO"),x&&Object(c.createElement)("div",{className:"".concat(F,"-list-price")},o),S&&Object(c.createElement)(l.Button,{href:r,icon:s,isPrimary:!0,className:"".concat(F,"-button"),style:{color:j,backgroundColor:y,borderColor:y}},Object(a.__)("Shop Now","jetpack"))):null):D)})),j=n(18),v={attributes:i,title:Object(a.__)("Amazon","jetpack"),description:Object(a.__)("Promote Amazon products and earn a commission from sales.","jetpack"),icon:s,category:Object(j.a)()?"earn":"jetpack",keywords:[Object(a.__)("amazon","jetpack"),Object(a.__)("affiliate","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:g,save:function(){return null},example:{attributes:{}}};Object(r.a)("amazon",v)}]));
|
15 |
/**
|
16 |
* @preserve jed.js https://github.com/SlexAxton/Jed
|
17 |
*/
|
18 |
+
!function(n,r){var a=Array.prototype,o=Object.prototype,i=a.slice,c=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(c.call(e,o)&&t.call(n,e[o],o,e)===s)return},extend:function(e){return this.forEach(i.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 i,c,l,s=t?t+p.context_delimiter+n:n,u=this.options.locale_data,m=u[e],h=(u.messages||this.defaults.locale_data.messages)[""],b=m[""].plural_forms||m[""]["Plural-Forms"]||m[""]["plural-forms"]||h.plural_forms||h["Plural-Forms"]||h["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(b)(a)}if(!m)throw new Error("No domain named `"+e+"` could be found.");return!(i=m[s])||l>i.length?(this.options.missing_key_callback&&this.options.missing_key_callback(s,e),c=[n,r],!0===this.options.debug&&console.log(c[d(b)(a)]),c[d()(a)]):(c=i[l])||(c=[n,r])[d()(a)]}});var h,b,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,i,c,l,s,u,p=1,d=n.length,m="",h=[];for(o=0;o<d;o++)if("string"===(m=e(n[o])))h.push(n[o]);else if("array"===m){if((c=n[o])[2])for(a=r[p],i=0;i<c[2].length;i++){if(!a.hasOwnProperty(c[2][i]))throw f('[sprintf] property "%s" does not exist',c[2][i]);a=a[c[2][i]]}else a=c[1]?r[c[1]]:r[p++];if(/[^s]/.test(c[8])&&"number"!=e(a))throw f("[sprintf] expecting number but found %s",e(a));switch(null==a&&(a=""),c[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=c[7]?a.toExponential(c[7]):a.toExponential();break;case"f":a=c[7]?parseFloat(a).toFixed(c[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&c[7]?a.substring(0,c[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(c[8])&&c[3]&&a>=0?"+"+a:a,s=c[4]?"0"==c[4]?"0":c[4].charAt(1):" ",u=c[6]-String(a).length,l=c[6]?t(s,u):"",h.push(c[5]?a+l:l+a)}return h.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=[],i=n[2],c=[];if(null===(c=/^([a-z_][a-z_\d]*)/i.exec(i)))throw"[sprintf] huh?";for(o.push(c[1]);""!==(i=i.substring(c[0].length));)if(null!==(c=/^\.([a-z_][a-z_\d]*)/i.exec(i)))o.push(c[1]);else{if(null===(c=/^\[(\d+)\]/.exec(i)))throw"[sprintf] huh?";o.push(c[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=(h={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,i){var c=o.length-1;switch(a){case 1:return{type:"GROUP",expr:o[c-1]};case 2:this.$={type:"TERNARY",expr:o[c-4],truthy:o[c-2],falsey:o[c]};break;case 3:this.$={type:"OR",left:o[c-2],right:o[c]};break;case 4:this.$={type:"AND",left:o[c-2],right:o[c]};break;case 5:this.$={type:"LT",left:o[c-2],right:o[c]};break;case 6:this.$={type:"LTE",left:o[c-2],right:o[c]};break;case 7:this.$={type:"GT",left:o[c-2],right:o[c]};break;case 8:this.$={type:"GTE",left:o[c-2],right:o[c]};break;case 9:this.$={type:"NEQ",left:o[c-2],right:o[c]};break;case 10:this.$={type:"EQ",left:o[c-2],right:o[c]};break;case 11:this.$={type:"MOD",left:o[c-2],right:o[c]};break;case 12:this.$={type:"GROUP",expr:o[c-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,i="",c=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,h,b,f,g,j,v,k,_,y={};;){if(h=n[n.length-1],this.defaultActions[h]?b=this.defaultActions[h]:(null==d&&(d=p()),b=o[h]&&o[h][d]),void 0===b||!b.length||!b[0]){if(!s){for(g in k=[],o[h])this.terminals_[g]&&g>2&&k.push("'"+this.terminals_[g]+"'");var O="";O=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+this.terminals_[d]+"'":"Parse error on line "+(c+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,i=this.lexer.yytext,c=this.lexer.yylineno,u=this.lexer.yylloc,d=p()}for(;!(2..toString()in o[h]);){if(0==h)throw new Error(O||"Parsing halted.");_=1,n.length=n.length-2*_,r.length=r.length-_,a.length=a.length-_,h=n[n.length-1]}m=d,d=2,b=o[h=n[n.length-1]]&&o[h][2],s=3}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+h+", token: "+d);switch(b[0]){case 1:n.push(d),r.push(this.lexer.yytext),a.push(this.lexer.yylloc),n.push(b[1]),d=null,m?(d=m,m=null):(l=this.lexer.yyleng,i=this.lexer.yytext,c=this.lexer.yylineno,u=this.lexer.yylloc,s>0&&s--);break;case 2:if(j=this.productions_[b[1]][1],y.$=r[r.length-j],y._$={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(y,i,l,c,this.yy,b[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_[b[1]][0]),r.push(y.$),a.push(y._$),v=o[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},b=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}(),h.lexer=b,h),e.exports&&(t=e.exports=p),t.Jed=p}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(15),a=n.n(r),o=n(24);function i(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 c(e,t){return function(e,t,n){var r=a()(t,2),c=r[0],l=r[1],m=1/c*(n-o.b*(e.childElementCount-1)-l);return function(e,t){var n=t.rawHeight,r=t.rowWidth,a=s(e),c=a.map((function(e){return(n-o.b*(e.childElementCount-1))*p(e)[0]})),l=i(c,r);return a.forEach((function(e,t){var r=c[t],a=l[t];!function(e,t){var n=t.colHeight,r=t.width,a=t.rawWidth,o=i(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],i=a()(t,2);return[r+i[0],o+i[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){var n=1e3,r=6e4,a=36e5,o=24*a;function i(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 c=typeof e;if("string"===c&&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 i=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return i*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*a;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return i(e,t,o,"day");if(t>=a)return i(e,t,a,"hour");if(t>=r)return i(e,t,r,"minute");if(t>=n)return i(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){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){"use strict";var r=n(121),a=n(120);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=c,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),c=0,l=t;c<i.length;c++,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],i[c]=s>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,a,o,i,c){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+i+(l+=(s=s+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,c){return t+r+o+c>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,c,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+c>>>0)<c?1:0,e+n+a+i+l+(u+=(p=p+s>>>0)<s?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,c,l,s){return t+r+o+c+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,t,n){"use strict";var r=n(3),a=n.n(r),o=n(8),i=n.n(o),c=n(12),l=n.n(c),s=n(9),u=n.n(s),p=n(10),d=n.n(p),m=n(11),h=n.n(m),b=n(0),f=n(1),g=n(7),j=n.n(g),v=n(17),k=n(2),_=n(6),y=n(4),O=window.getComputedStyle,w=Object(k.withFallbackStyles)((function(e,t){var n,r,a,o,i=t.textButtonColor,c=t.backgroundButtonColor,l=c&&c.color,s=i&&i.color;return!s&&e&&(n=e.querySelector('[contenteditable="true"]')),r=e.querySelector(".wp-block-button__link")?e.querySelector(".wp-block-button__link"):e,e&&(a=O(r).backgroundColor),n&&(o=O(n).color),{fallbackBackgroundColor:l||a,fallbackTextColor:s||o}})),C=function(e){function t(){return i()(this,t),u()(this,d()(t).apply(this,arguments))}return h()(t,e),l()(t,[{key:"componentDidUpdate",value:function(e){if(!Object(y.isEqual)(this.props.textButtonColor,e.textButtonColor)||!Object(y.isEqual)(this.props.backgroundButtonColor,e.backgroundButtonColor)){var t=this.getButtonClasses();this.props.setAttributes({submitButtonClasses:t})}}},{key:"getButtonClasses",value:function(){var e,t=this.props,n=t.textButtonColor,r=t.backgroundButtonColor,o=Object(y.get)(n,"class"),i=Object(y.get)(r,"class");return j()("wp-block-button__link",(e={"has-text-color":n.color},a()(e,o,o),a()(e,"has-background",r.color),a()(e,i,i),e))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.backgroundButtonColor,r=e.textButtonColor,a=e.fallbackBackgroundColor,o=e.fallbackTextColor,i=e.setAttributes,c=e.setBackgroundButtonColor,l=e.setTextButtonColor,s=n.color||a,u=r.color||o,p={backgroundColor:s,color:u},d=this.getButtonClasses();return Object(b.createElement)(b.Fragment,null,Object(b.createElement)("div",{className:"wp-block-button jetpack-submit-button"},Object(b.createElement)(_.RichText,{placeholder:Object(f.__)("Add text…","jetpack"),value:t.submitButtonText,onChange:function(e){return i({submitButtonText:e})},className:d,style:p,keepPlaceholderOnFocus:!0,allowedFormats:[]})),Object(b.createElement)(_.InspectorControls,null,Object(b.createElement)(_.PanelColorSettings,{title:Object(f.__)("Button Color Settings","jetpack"),colorSettings:[{value:s,onChange:c,label:Object(f.__)("Background Color","jetpack")},{value:u,onChange:l,label:Object(f.__)("Text Color","jetpack")}]}),Object(b.createElement)(_.ContrastChecker,{textColor:u,backgroundColor:s,fallbackBackgroundColor:!0,fallbackTextColor:!0})))}}]),t}(b.Component);t.a=Object(v.compose)([Object(_.withColors)({backgroundButtonColor:"background-color"},{textButtonColor:"color"}),w])(C)},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){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){!function(){e.exports=this.wp.tokenList}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(15),a=n.n(r),o=n(37),i=n.n(o),c=n(4);n(160);function l(){return s.apply(this,arguments)}function s(){return(s=i()(regeneratorRuntime.mark((function e(){var t,r,o,i,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]:{},i={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(c.mapValues)(o,(function(e){return function(){e(this)}}))},e.next=6,Promise.all([n.e(25).then(n.t.bind(null,319,7)),n.e(25).then(n.t.bind(null,320,7))]);case 6:return l=e.sent,s=a()(l,1),u=s[0].default,e.abrupt("return",new u(t,Object(c.merge)({},i,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(15),a=n.n(r),o=n(8),i=n.n(o),c=n(12),l=n.n(c),s=n(9),u=n.n(s),p=n(10),d=n.n(p),m=n(5),h=n.n(m),b=n(11),f=n.n(b),g=n(3),j=n.n(g),v=n(0),k=n(1),_=n(4),y=n(2),O=(n(155),function(e){function t(){var e,n;i()(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()(h()(n),"handleClick",(function(){(0,n.props.onClick)(h()(n))})),j()(h()(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,i=[n.coordinates.longitude,n.coordinates.latitude],c=this.marker?this.marker.getElement():document.createElement("div");this.marker?this.marker.setLngLat(i):(c.className="wp-block-jetpack-map-marker",this.marker=new r.Marker(c).setLngLat(i).setOffset([0,-19]).addTo(t),this.marker.getElement().addEventListener("click",o)),c.innerHTML='<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd"><path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="'+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,C=function(e){function t(){var e,n;i()(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()(h()(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);C.defaultProps={unsetActiveMarker:function(){},activeMarker:null,map:null,mapboxgl:null};var E=C;var x=function(e){function t(){var e;return i()(this,t),e=u()(this,d()(t).apply(this,arguments)),j()(h()(e),"onMarkerClick",(function(t){var n=e.props.onMarkerClick;e.setState({activeMarker:t}),n()})),j()(h()(e),"onMapClick",(function(){e.setState({activeMarker:null})})),j()(h()(e),"clearCurrentMarker",(function(){e.setState({activeMarker:null})})),j()(h()(e),"updateActiveMarker",(function(t){var n=e.props.points,r=e.state.activeMarker.props.index,a=n.slice(0);Object(_.assign)(a[r],t),e.props.onSetPoints(a)})),j()(h()(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()(h()(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,i=Math.min(.75*a,o);r.style.height=i+"px"}n.resize(),e.setBoundsByMarkers()})),j()(h()(e),"updateZoom",(function(){var t=e.props.zoom,n=e.state.map;n.setZoom(t),n.updateZoom(t)})),j()(h()(e),"setBoundsByMarkers",(function(){var t=e.props,n=t.admin,r=t.onSetMapCenter,a=t.onSetZoom,o=t.points,i=t.zoom,c=e.state,l=c.map,s=c.activeMarker,u=c.mapboxgl,p=c.zoomControl,d=c.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(h){}}else{if(l.setCenter(m.getCenter()),d){l.setZoom(12),a(12)}else l.setZoom(parseInt(i,10));l.addControl(p),e.setState({boundsSetProgrammatically:!1})}}})),j()(h()(e),"scriptsLoaded",(function(){var t=e.props,n=t.mapCenter,r=t.points;e.setState({loaded:!0}),r.length,e.initMap(n)})),j()(h()(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(_.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,i=this.state,c=i.map,l=i.activeMarker,s=i.mapboxgl,u=this.onMarkerClick,p=this.deleteActiveMarker,d=this.updateActiveMarker,m=Object(_.get)(l,"props.point")||{},h=m.title,b=m.caption,f=v.Children.map(a,(function(e){if("AddPoint"===Object(_.get)(e,"props.tagName"))return e})),g=c&&s&&n.map((function(e,t){return Object(v.createElement)(w,{key:t,point:e,index:t,map:c,mapboxgl:s,markerColor:o,onClick:u})})),j=s&&Object(v.createElement)(E,{activeMarker:l,map:c,mapboxgl:s,unsetActiveMarker:function(){return e.setState({activeMarker:null})}},l&&r&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)(y.TextControl,{label:Object(k.__)("Marker Title","jetpack"),value:h,onChange:function(e){return d({title:e})}}),Object(v.createElement)(y.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:Object(k.__)("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:function(e){return d({caption:e})}}),Object(v.createElement)(y.Button,{onClick:p,className:"wp-block-jetpack-map__delete-btn"},Object(v.createElement)(y.Dashicon,{icon:"trash",size:"15"})," ",Object(k.__)("Delete Marker","jetpack"))),l&&!r&&Object(v.createElement)(v.Fragment,null,Object(v.createElement)("h3",null,h),Object(v.createElement)("p",null,b)));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,i=t.mapStyle,c=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(),i===e.mapStyle&&c===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(24).then(n.t.bind(null,376,7)),n.e(24).then(n.t.bind(null,377,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,i=r.onError,c=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 i("mapbox_error",m.message)}c||u.scrollZoom.disable();var p=new n.FullscreenControl;u.on("error",(function(e){i("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),i=n(73),c=n(66),l=Object(o.createSlotFill)("JetpackLikesAndSharingPanel"),s=l.Fill,u=l.Slot;Object(i.registerPlugin)("jetpack-likes-and-sharing-panel",{render:function(){return Object(r.createElement)(u,null,(function(e){return e.length?Object(r.createElement)(c.a,null,Object(r.createElement)(o.PanelBody,{title:Object(a.__)("Likes and Sharing","jetpack")},e)):null}))}})},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 i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{r||null==c.return||c.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,n){var r=n(69);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(){e.exports=this.wp.notices}()},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){!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}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 i in e)e.hasOwnProperty(i)&&this.append(i,e[i])}},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?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));var r,a=document;if(n&&(void 0===e.location||n!==e.location.href)){(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(p){throw new Error("URL unable to set base "+n+" due to "+p)}}var o=a.createElement("a");if(o.href=t,r&&(a.body.appendChild(o),o.href=o.href),":"===o.protocol||!/:/.test(o.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:o});var i=new e.URLSearchParams(this.search),c=!0,l=!0,s=this;["append","delete","set"].forEach((function(e){var t=i[e];i[e]=function(){t.apply(i,arguments),c&&(l=!1,s.search=i.toString(),l=!0)}})),Object.defineProperty(this,"searchParams",{value:i,enumerable:!0});var u=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==u&&(u=this.search,l&&(c=!1,this.searchParams._fromString(this.search),c=!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?window:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},function(e,t,n){},function(e,t,n){"use strict";e.exports=n(204)},function(e,t,n){"use strict";e.exports.encode=n(205),e.exports.decode=n(206),e.exports.format=n(207),e.exports.parse=n(208)},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|<[?].*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),i=new RegExp("^(?:"+r+"|"+a+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=i},function(e,t,n){"use strict";function r(e,t){var n,r,a,o,i,c=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&c.push(o.token-1));for(;c.length;){for(r=(n=c.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.tokenize=function(e,t){var n,r,a,o,i=e.pos,c=e.src.charCodeAt(i);if(t)return!1;if(126!==c)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(c),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:c,length:0,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){"use strict";function r(e,t){var n,r,a,o,i,c;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],c=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,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=c?"strong_open":"em_open",o.tag=c?"strong":"em",o.nesting=1,o.markup=c?i+i:i,o.content="",(o=e.tokens[a.token]).type=c?"strong_close":"em_close",o.tag=c?"strong":"em",o.nesting=-1,o.markup=c?i+i:i,o.content="",c&&(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){"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){e.exports=JSON.parse('{"production":["business-hours","button","calendly","contact-form","contact-info","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","subscriptions","tiled-gallery","videopress","wordads"],"beta":["amazon"],"experimental":["seo"],"no-post-editor":["business-hours","button","calendly","contact-form","contact-info","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";const r=n(179),a=n(180),o=n(181);function i(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function c(e,t){return t.decode?a(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function s(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){const n=function(e){let t;switch(e.arrayFormat){case"index":return(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(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};case"comma":return(e,t,n)=>{const r="string"==typeof t&&t.split("").indexOf(",")>-1?t.split(","):t;n[e]=r};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",parseNumbers:!1,parseBooleans:!1},t)),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const a of e.split("&")){let[e,i]=o(a.replace(/\+/g," "),"=");i=void 0===i?null:c(i,t),n(c(e,t),i,r)}for(const a of Object.keys(r)){const e=r[a];if("object"==typeof e&&null!==e)for(const n of Object.keys(e))e[n]=u(e[n],t);else r[a]=u(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const 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((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=s,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";const n=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const a=n.length;return void 0===r?n:null===r?[...n,[i(t,e),"[",a,"]"].join("")]:[...n,[i(t,e),"[",i(a,e),"]=",i(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r?n:null===r?[...n,[i(t,e),"[]"].join("")]:[...n,[i(t,e),"[]=",i(r,e)].join("")];case"comma":return t=>(n,r,a)=>null==r||0===r.length?n:0===a?[[i(t,e),"=",i(r,e)].join("")]:[[n,i(r,e)].join(",")];default:return t=>(n,r)=>void 0===r?n:null===r?[...n,i(t,e)]:[...n,[i(t,e),"=",i(r,e)].join("")]}}(t=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},t)),r=Object.keys(e);return!1!==t.sort&&r.sort(t.sort),r.map(r=>{const a=e[r];return void 0===a?"":null===a?i(r,t):Array.isArray(a)?a.reduce(n(r),[]).join("&"):i(r,t)+"="+i(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>({url:l(e).split("?")[0]||"",query:p(s(e),t)})},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,c=(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",c,(t=a,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return i.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"}),i.default.createElement("g",null,i.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(44),i=(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(203)},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(260)(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=c(n(44)),o=c(n(261)),i=c(n(264));function c(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function s(e,t){var n,i,c,u,p,d,m,h,b=[],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],c=d;break}b.push(t[p.value])}else b.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+"`")}(c,e),m=s(e.slice(c+1,u),t),i=a.default.cloneElement(n,{},m),b.push(i),u<e.length-1&&(h=s(e.slice(u+1),t),b=b.concat(h))),1===b.length?b[0]:(b.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,i.default)(t);try{return s(o,n)}catch(c){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+c.message+"`");return t}}},function(e,t,n){var r=n(68),a=n(120);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(87),a=n(265),o=n(266),i=r.rotl32,c=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]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),b=l(i(a,5),s(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=b}this.h[0]=c(this.h[0],a),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],u),this.h[3]=c(this.h[3],d),this.h[4]=c(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/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){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";var r={};n.r(r),n.d(r,"playing",(function(){return E})),n.d(r,"error",(function(){return x}));var a=n(8),o=n.n(a),i=n(12),c=n.n(i),l=n(9),s=n.n(l),u=n(10),p=n.n(u),d=n(5),m=n.n(d),h=n(11),b=n.n(h),f=n(3),g=n.n(f),j=n(0),v=n(7),k=n.n(v),_=n(1),y=n(53),O=n(36),w=n(2),C={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},E=Object(j.createElement)(w.SVG,C,Object(j.createElement)(w.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(j.createElement)(w.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"})),x=Object(j.createElement)(w.SVG,C,Object(j.createElement)(w.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(j.createElement)(w.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"})),S=Object(j.memo)((function(e){var t,n,a=e.isPlaying,o=e.isError,i=e.className;o?(n="error",t=Object(_.__)("Error:","jetpack")):a&&(n="playing",t=Object(_.__)("Playing:","jetpack"));var c=r[n];return c?Object(j.createElement)("span",{className:"".concat(i," ").concat(i,"--").concat(n)},Object(j.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},"".concat(t," ")),c):Object(j.createElement)("span",{className:i})})),A=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(_.__)("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(_.sprintf)(Object(_.__)("%s:","jetpack"),n)," ")),Object(_.__)("Open in a new tab","jetpack"))))})),P=n(59),N=Object(j.memo)((function(e){var t,n=e.track,r=e.isActive,a=e.isPlaying,o=e.isError,i=e.selectTrack,c=e.index,l=e.colors,s=void 0===l?{primary:{},secondary:{}}:l,u=Object(P.a)("color",s.primary.name),p=Object(P.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 h=r?Object(_.__)("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":h,onClick:function(e){e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),i(c))},onKeyDown:function(e){" "===event.key&&(e.preventDefault(),i(c))}},Object(j.createElement)(S,{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)(A,{link:n.link,title:n.title,colors:s}))})),T=Object(j.memo)((function(e){var t=e.playerId,n=e.tracks,r=e.selectTrack,a=e.currentTrack,o=e.playerState,i=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)(N,{key:e.id,index:t,track:e,selectTrack:r,isActive:n,isPlaying:n&&o===O.e,isError:n&&o===O.c,colors:i})})))})),F="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{},B=function(e){function t(){var e,n;o()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=s()(this,(e=p()(t)).call.apply(e,[this].concat(a))),g()(m()(n),"audioRef",(function(e){if(e){var t=document.createElement("audio");t.src=n.props.initialTrackSource,e.appendChild(t),n.mediaElement=new MediaElementPlayer(t,F),n.audio=n.mediaElement.domNode,n.audio.addEventListener("play",n.props.handlePlay),n.audio.addEventListener("pause",n.props.handlePause),n.audio.addEventListener("error",n.props.handleError)}else n.mediaElement.remove()})),g()(m()(n),"play",(function(){n.audio.play().catch((function(){}))})),g()(m()(n),"pause",(function(){n.audio.pause(),Object(y.speak)(Object(_.__)("Paused","jetpack"),"assertive")})),g()(m()(n),"togglePlayPause",(function(){n.audio.paused?n.play():n.pause()})),g()(m()(n),"setAudioSource",(function(e){n.audio.src=e})),n}return b()(t,e),c()(t,[{key:"render",value:function(){return Object(j.createElement)("div",{ref:this.audioRef,className:"jetpack-podcast-player__audio-player"})}}]),t}(j.Component),I=Object(j.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(j.createElement)(w.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"})),M=Object(j.memo)((function(e){var t=e.playerId,n=e.title,r=e.cover,a=e.link,o=e.track,i=e.children,c=e.showCoverArt,l=e.showEpisodeDescription,s=e.colors;return Object(j.createElement)("div",{className:"jetpack-podcast-player__header"},Object(j.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},c&&r&&Object(j.createElement)("div",{className:"jetpack-podcast-player__cover"},Object(j.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:r,alt:""})),!!(n||o&&o.title)&&Object(j.createElement)(L,{playerId:t,title:n,link:a,track:o,colors:s})),!!(l&&o&&o.description)&&Object(j.createElement)("p",{id:"".concat(t,"__track-description"),className:"jetpack-podcast-player__track-description"},o.description),i)})),L=Object(j.memo)((function(e){var t=e.playerId,n=e.title,r=e.link,a=e.track,o=e.colors,i=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",i.primary.classes),style:{color:i.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"},I)),!!(a&&a.title&&n)&&Object(j.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&Object(j.createElement)(R,{title:n,link:r,colors:i}))})),R=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})})),D=M;var z=function(){},U=function(e){function t(){var e,n;o()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=s()(this,(e=p()(t)).call.apply(e,[this].concat(a))),g()(m()(n),"state",{playerState:O.d,currentTrack:0,hasUserInteraction:!1}),g()(m()(n),"playerRef",(function(e){n.player=e,n.play=e?e.play:z,n.pause=e?e.pause:z,n.togglePlayPause=e?e.togglePlayPause:z,n.setAudioSource=e?e.setAudioSource:z})),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.togglePlayPause();-1!==t&&n.pause(),n.loadAndPlay(e)})),g()(m()(n),"loadAndPlay",(function(e){n.recordUserInteraction();var t=n.getTrack(e);t&&(n.setState({currentTrack:e}),n.setAudioSource(t.src),Object(y.speak)("".concat(Object(_.sprintf)(Object(_.__)("Loading: %s","jetpack"),t.title)," ").concat(t.description),"assertive"),n.play())})),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.setState({playerState:O.c}),Object(y.speak)("".concat(Object(_.__)("Error: Episode unavailable - Open in a new tab","jetpack")),"assertive")})),g()(m()(n),"handlePlay",(function(){n.setState({playerState:O.e,hasUserInteraction:!0})})),g()(m()(n),"handlePause",(function(){n.state.playerState!==O.c&&n.setState({playerState:O.d})})),g()(m()(n),"play",z),g()(m()(n),"pause",z),g()(m()(n),"togglePlayPause",z),g()(m()(n),"setAudioSource",z),n}return b()(t,e),c()(t,[{key:"render",value:function(){var e=this.props,t=e.playerId,n=e.title,r=e.link,a=e.cover,o=e.tracks,i=e.attributes,c=i.itemsToShow,l=i.primaryColor,s=i.customPrimaryColor,u=i.hexPrimaryColor,p=i.secondaryColor,d=i.customSecondaryColor,m=i.hexSecondaryColor,h=i.backgroundColor,b=i.customBackgroundColor,f=i.hexBackgroundColor,g=i.showCoverArt,v=i.showEpisodeDescription,y=this.state,O=y.playerState,w=y.currentTrack,C=o.slice(0,c),E=this.getTrack(w),x=Object(P.b)({primaryColor:l,customPrimaryColor:s,secondaryColor:p,customSecondaryColor:d,backgroundColor:h,customBackgroundColor:b}),S={color:d,backgroundColor:b,"--jetpack-podcast-player-primary":u,"--jetpack-podcast-player-secondary":m,"--jetpack-podcast-player-background":f},A=k()("jetpack-podcast-player",O,x.secondary.classes,x.background.classes);return Object(j.createElement)("section",{className:A,style:S,"aria-labelledby":n||E&&E.title?"".concat(t,"__title"):void 0,"aria-describedby":E&&E.description?"".concat(t,"__track-description"):void 0,"data-jetpack-iframe-ignore":!0},Object(j.createElement)(D,{playerId:t,title:n,link:r,cover:a,track:this.getTrack(w),showCoverArt:g,showEpisodeDescription:v,colors:x},Object(j.createElement)(B,{initialTrackSource:this.getTrack(0).src,handlePlay:this.handlePlay,handlePause:this.handlePause,handleError:this.handleError,ref:this.playerRef})),Object(j.createElement)("h4",{id:"jetpack-podcast-player__tracklist-title--".concat(t),className:"jetpack-podcast-player--visually-hidden"},Object(_.sprintf)(Object(_.__)("Playlist: %s","jetpack"),n)),Object(j.createElement)("p",{id:"jetpack-podcast-player__tracklist-description--".concat(t),className:"jetpack-podcast-player--visually-hidden"},Object(_.__)("Select an episode to play it in the audio player.","jetpack")),C.length>1&&Object(j.createElement)(T,{playerId:t,playerState:O,currentTrack:w,tracks:C,selectTrack:this.selectTrack,colors:x}))}}]),t}(j.Component);U.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeDescription:!0},tracks:[]};var H,q;t.a=(H=U,q=function(e){function t(){var e,n;o()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=s()(this,(e=p()(t)).call.apply(e,[this].concat(a))),g()(m()(n),"state",{didError:!1,isIE11AudioIssue:!1}),g()(m()(n),"componentDidCatch",(function(e,t){n.props.onError(e,t)})),n}return b()(t,e),c()(t,[{key:"render",value:function(){var e=this.state,t=e.didError,n=e.isIE11AudioIssue;return t?Object(j.createElement)("section",{className:"jetpack-podcast-player"},Object(j.createElement)("p",{className:"jetpack-podcast-player__error"},n?Object(_.__)('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(_.__)("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack"))):Object(j.createElement)(H,this.props)}}]),t}(j.Component),g()(q,"getDerivedStateFromError",(function(e){return{didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}})),q.defaultProps={onError:function(){}},q)},function(e,t,n){var r=n(20);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 a.colors[Math.abs(t)%a.colors.length]}function a(e){var n;function r(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];if(r.enabled){var i=r,c=Number(new Date),l=c-(n||c);i.diff=l,i.prev=n,i.curr=c,n=c,t[0]=a.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 r=a.formatters[n];if("function"==typeof r){var o=t[s];e=r.call(i,o),t.splice(s,1),s--}return e})),a.formatArgs.call(i,t);var u=i.log||a.log;u.apply(i,t)}}return r.namespace=e,r.enabled=a.enabled(e),r.useColors=a.useColors(),r.color=t(e),r.destroy=o,r.extend=i,"function"==typeof a.init&&a.init(r),a.instances.push(r),r}function o(){var e=a.instances.indexOf(this);return-1!==e&&(a.instances.splice(e,1),!0)}function i(e,t){var n=a(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function c(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return a.debug=a,a.default=a,a.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},a.disable=function(){var e=[].concat(r(a.names.map(c)),r(a.skips.map(c).map((function(e){return"-"+e})))).join(",");return a.enable(""),e},a.enable=function(e){var t;a.save(e),a.names=[],a.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?a.skips.push(new RegExp("^"+e.substr(1)+"$")):a.names.push(new RegExp("^"+e+"$")));for(t=0;t<a.instances.length;t++){var o=a.instances[t];o.enabled=a.enabled(o.namespace)}},a.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=a.skips.length;t<n;t++)if(a.skips[t].test(e))return!1;for(t=0,n=a.names.length;t<n;t++)if(a.names[t].test(e))return!0;return!1},a.humanize=n(83),Object.keys(e).forEach((function(t){a[t]=e[t]})),a.instances=[],a.names=[],a.skips=[],a.formatters={},a.selectColor=t,a.enable(a.load()),a}},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){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,i=n[r.type],c=t(r);if(i)for(a=0;a<i.length;a++)(o=i[a](r,e))&&e.dispatch(o);return c}}}).effects=n,t}},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 i,c=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 h(e){throw RangeError(p[e])}function b(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+b((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 b(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 _(e){var t,n,r,a,o,i,l,s,u,p,m,b=[],f=e.length,g=0,v=128,_=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&h("not-basic"),b.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<f;){for(o=g,i=1,l=36;a>=f&&h("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((c-g)/i))&&h("overflow"),g+=s*i,!(s<(u=l<=_?1:l>=_+26?26:l-_));l+=36)i>d(c/(p=36-u))&&h("overflow"),i*=p;_=k(g-o,t=b.length+1,0==o),d(g/t)>c-v&&h("overflow"),v+=d(g/t),g%=t,b.splice(g++,0,v)}return j(b)}function y(e){var t,n,r,a,o,i,l,s,u,p,b,f,j,_,y,O=[];for(f=(e=g(e)).length,t=128,n=0,o=72,i=0;i<f;++i)(b=e[i])<128&&O.push(m(b));for(r=a=O.length,a&&O.push("-");r<f;){for(l=c,i=0;i<f;++i)(b=e[i])>=t&&b<l&&(l=b);for(l-t>d((c-n)/(j=r+1))&&h("overflow"),n+=(l-t)*j,t=l,i=0;i<f;++i)if((b=e[i])<t&&++n>c&&h("overflow"),b==t){for(s=n,u=36;!(s<(p=u<=o?1:u>=o+26?26:u-o));u+=36)y=s-p,_=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("")}i={version:"1.3.2",ucs2:{decode:g,encode:j},decode:_,encode:y,toASCII:function(e){return f(e,(function(e){return s.test(e)?"xn--"+y(e):e}))},toUnicode:function(e){return f(e,(function(e){return l.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()}).call(this,n(167)(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(170),t.encode=t.stringify=n(171)},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 i=/\+/g;e=e.split(t);var c=1e3;a&&"number"==typeof a.maxKeys&&(c=a.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var s=0;s<l;++s){var u,p,d,m,h=e[s].replace(i,"%20"),b=h.indexOf(n);b>=0?(u=h.substr(0,b),p=h.substr(b+1)):(u=h,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=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),a=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(a){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function i(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var n={"%FE%FF":"��","%FF%FE":"��"},r=a.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch(t){var o=i(r[0]);o!==r[0]&&(n[r[0]]=o)}r=a.exec(e)}n["%C2"]="�";for(var c=Object.keys(n),l=0;l<c.length;l++){var s=c[l];e=e.replace(new RegExp(s,"g"),n[s])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},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){},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,i;if(void 0!==r.crc&&n&&e||(r.crc=-1,e)){for(a=r.crc,o=0,i=e.length;o<i;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),i=Math.pow(2,52),c=2*i,l=Math.random;function s(e){var t,n=e.length,r=this,a=0,o=r.i=r.j=0,i=r.S=[];for(n||(e=[n++]);a<256;)i[a]=a++;for(a=0;a<256;a++)i[a]=i[o=255&o+e[a%n]+(t=i[a])],i[o]=t;(r.g=function(e){for(var t,n=0,a=r.i,o=r.j,i=r.S;e--;)t=i[a=255&a+1],n=256*n+i[255&(i[a]=i[o=255&o+t])+(i[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=[],h=(p(u(a?[t,m(r)]:0 in arguments?t:d(),3),l),new s(l));return p(m(h.S),r),function(){for(var e=h.g(6),t=o,n=0;e<i;)e=256*(e+n),t*=256,n=h.g(1);for(;e>=c;)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(194)(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 i(){if(i.enabled){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=i,c=Number(new Date),l=c-(n||c);o.diff=l,o.prev=n,o.curr=c,n=c,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 i=t[s];e=a.call(o,i),t.splice(s,1),s--}return e})),r.formatArgs.call(o,t);var u=o.log||r.log;u.apply(o,t)}}return i.namespace=e,i.enabled=r.enabled(e),i.useColors=r.useColors(),i.color=t(e),i.destroy=a,i.extend=o,"function"==typeof r.init&&r.init(i),r.instances.push(i),i}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(83),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(58),a=n.n(r);n(196);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},i=e.offsetWidth;n=(((r=t).pageX?r.pageX:r.touches?r.touches[0].pageX:r.clientX+document.body.scrollLeft+document.documentElement.scrollLeft)-o.left)/i*100}return n}function i(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},i=e.offsetHeight;n=(((r=t).pageY?r.pageY:r.touches?r.touches[0].pageY:r.clientY+document.body.scrollTop+document.documentElement.scrollTop)-o.top)/i*100}return n}var c={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 c?"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?i(this.slider,e):o(this.slider,e)).toFixed(2)+"%";var c=parseFloat(a),l=100-c+"%";c>0&&c<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){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.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 i={};a.getAttribute("data-animate")&&(i.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(i.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(i.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(i.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(i.mode=a.getAttribute("data-makeresponsive"));var c="juxtapose-"+r;n(t,c);var l="."+c;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}],i)}},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(25),a=n(211),o=n(215),i=n(216),c=n(224),l=n(238),s=n(251),u=n(111),p=n(253),d={default:n(254),zero:n(255),commonmark:n(256)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function b(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.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))}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 c,this.core=new i,this.renderer=new o,this.linkify=new s,this.validateLink=b,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":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","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":"IJ","ijlig":"ij","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":"ʼn","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,i,c,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,i=e.length;o<i;o++)if(c=e.charCodeAt(o),n&&37===c&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(c<128)u+=s[c];else if(c>=55296&&c<=57343){if(c>=55296&&c<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}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,i,c,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),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(s+=(l=a<<12&61440|o<<6&4032|63&i)<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),i=parseInt(e.slice(t+7,t+9),16),c=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&c))?((l=a<<18&1835008|o<<12&258048|i<<6&4032|63&c)<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]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),s=["%","/","?",";","#"].concat(l),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},h={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,c,l,b=e;if(b=b.trim(),!t&&1===e.split("#").length){var f=i.exec(b);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var g=a.exec(b);if(g&&(o=(g=g[0]).toLowerCase(),this.protocol=g,b=b.substr(g.length)),(t||g||b.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(l="//"===b.substr(0,2))||g&&m[g]||(b=b.substr(2),this.slashes=!0)),!m[g]&&(l||g&&!h[g])){var j,v,k=-1;for(n=0;n<u.length;n++)-1!==(c=b.indexOf(u[n]))&&(-1===k||c<k)&&(k=c);for(-1!==(v=-1===k?b.lastIndexOf("@"):b.lastIndexOf("@",k))&&(j=b.slice(0,v),b=b.slice(v+1),this.auth=j),k=-1,n=0;n<s.length;n++)-1!==(c=b.indexOf(s[n]))&&(-1===k||c<k)&&(k=c);-1===k&&(k=b.length),":"===b[k-1]&&k--;var _=b.slice(0,k);b=b.slice(k),this.parseHost(_),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y){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 C="",E=0,x=w.length;E<x;E++)w.charCodeAt(E)>127?C+="x":C+=w[E];if(!C.match(p)){var S=O.slice(0,n),A=O.slice(n+1),P=w.match(d);P&&(S.push(P[1]),A.unshift(P[2])),A.length&&(b=A.join(".")+b),this.hostname=S.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=b.indexOf("#");-1!==N&&(this.hash=b.substr(N),b=b.slice(0,N));var T=b.indexOf("?");return-1!==T&&(this.search=b.substr(T),b=b.slice(0,T)),b&&(this.pathname=b),h[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(112),t.Cc=n(113),t.Cf=n(210),t.P=n(84),t.Z=n(114)},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(212),t.parseLinkDestination=n(213),t.parseLinkTitle=n(214)},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,a,o,i,c=-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(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=s,-1}return a&&(c=e.pos),e.pos=s,c}},function(e,t,n){"use strict";var r=n(25).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,c={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return c;if(62===a)return c.pos=t+1,c.str=r(e.slice(i+1,t)),c.ok=!0,c;92===a&&t+1<n?t+=2:t++}return c}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n)t+=2;else{if(40===a&&o++,41===a){if(0===o)break;o--}t++}return i===t?c:0!==o?c:(c.str=r(e.slice(i,t)),c.lines=0,c.pos=t,c.ok=!0,c)}},function(e,t,n){"use strict";var r=n(25).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,c=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(c+1,t)),l.ok=!0,l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},function(e,t,n){"use strict";var r=n(25).assign,a=n(25).unescapeAll,o=n(25).escapeHtml,i={};function c(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var c,l,s,u,p=e[t],d=p.info?a(p.info).trim():"",m="";return d&&(m=d.split(/\s+/g)[0]),0===(c=n.highlight&&n.highlight(p.content,m)||o(p.content)).indexOf("<pre")?c+"\n":d?(l=p.attrIndex("class"),s=p.attrs?p.attrs.slice():[],l<0?s.push(["class",n.langPrefix+m]):s[l][1]+=" "+n.langPrefix+m,u={attrs:s},"<pre><code"+i.renderAttrs(u)+">"+c+"</code></pre>\n"):"<pre><code"+i.renderAttrs(p)+">"+c+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},c.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},c.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden?o=!1:-1===r.nesting&&r.tag===i.tag&&(o=!1))),a+=o?">\n":">")},c.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,c=e.length;i<c;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},c.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},c.prototype.render=function(e,t,n){var r,a,o,i="",c=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==c[o]?i+=c[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=c},function(e,t,n){"use strict";var r=n(85),a=[["normalize",n(217)],["block",n(218)],["inline",n(219)],["linkify",n(220)],["replacements",n(221)],["smartquotes",n(222)]];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(223),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(25).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_=e.tokens;if(e.md.options.linkify)for(n=0,o=_.length;n<o;n++)if("inline"===_[n].type&&e.md.linkify.pretest(_[n].content))for(b=0,t=(i=_[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(k=l.content,/^<a[>\s]/i.test(k)&&b>0&&b--,a(l.content)&&b++),!(b>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,v=e.md.linkify.match(p),s=[],h=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&&((c=new e.Token("text","",0)).content=p.slice(m,d),c.level=h,s.push(c)),(c=new e.Token("link_open","a",1)).attrs=[["href",g]],c.level=h++,c.markup="linkify",c.info="auto",s.push(c),(c=new e.Token("text","",0)).content=j,c.level=h,s.push(c),(c=new e.Token("link_close","a",-1)).level=--h,c.markup="linkify",c.info="auto",s.push(c),m=v[u].lastIndex);m<p.length&&((c=new e.Token("text","",0)).content=p.slice(m),c.level=h,s.push(c)),_[n].children=i=r(i,t,s)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},function(e,t,n){"use strict";var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,a=/\((c|tm|r|p)\)/i,o=/\((c|tm|r|p)\)/gi,i={c:"©",r:"®",p:"§",tm:"™"};function c(e,t){return i[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,c)),"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—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"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(25).isWhiteSpace,a=n(25).isPunctChar,o=n(25).isMdAsciiPunct,i=/['"]/,c=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function s(e,t){var n,i,s,u,p,d,m,h,b,f,g,j,v,k,_,y,O,w,C,E,x;for(C=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,O=C.length-1;O>=0&&!(C[O].level<=m);O--);if(C.length=O+1,"text"===i.type){p=0,d=(s=i.content).length;e:for(;p<d&&(c.lastIndex=p,u=c.exec(s));){if(_=y=!0,p=u.index+1,w="'"===u[0],b=32,u.index-1>=0)b=s.charCodeAt(u.index-1);else for(O=n-1;O>=0&&("softbreak"!==e[O].type&&"hardbreak"!==e[O].type);O--)if("text"===e[O].type){b=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("text"===e[O].type){f=e[O].content.charCodeAt(0);break}if(g=o(b)||a(String.fromCharCode(b)),j=o(f)||a(String.fromCharCode(f)),v=r(b),(k=r(f))?_=!1:j&&(v||g||(_=!1)),v?y=!1:g&&(k||j||(y=!1)),34===f&&'"'===u[0]&&b>=48&&b<=57&&(y=_=!1),_&&y&&(_=!1,y=j),_||y){if(y)for(O=C.length-1;O>=0&&(h=C[O],!(C[O].level<m));O--)if(h.single===w&&C[O].level===m){h=C[O],w?(E=t.md.options.quotes[2],x=t.md.options.quotes[3]):(E=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,E),p+=x.length-1,h.token===n&&(p+=E.length-1),d=(s=i.content).length,C.length=O;continue e}_?C.push({token:n,pos:u.index,single:w,level:m}):y&&w&&(i.content=l(i.content,u.index,"’"))}else w&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&s(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(86);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(85),a=[["table",n(225),["paragraph","reference"]],["code",n(226)],["fence",n(227),["paragraph","reference","blockquote","list"]],["blockquote",n(228),["paragraph","reference","blockquote","list"]],["hr",n(229),["paragraph","reference","blockquote","list"]],["list",n(230),["paragraph","reference","blockquote"]],["reference",n(231)],["heading",n(232),["paragraph","reference","blockquote"]],["lheading",n(233)],["html_block",n(234),["paragraph","reference","blockquote"]],["paragraph",n(236)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,c=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),(i=e.line)<n&&e.isEmpty(i)&&(c=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(237),e.exports=o},function(e,t,n){"use strict";var r=n(25).isSpace;function a(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=0,i=0,c=!1,l=0;for(t=e.charCodeAt(r);r<a;)96===t?c?(c=!1,l=r):o%2==0&&(c=!0,l=r):124!==t||o%2!=0||c||(n.push(e.substring(i,r)),i=r+1),92===t?o++:o=0,++r===a&&c&&(c=!1,r=l+1),t=e.charCodeAt(r);return n.push(e.substring(i)),n}e.exports=function(e,t,n,i){var c,l,s,u,p,d,m,h,b,f,g,j;if(t+2>n)return!1;if(p=t+1,e.sCount[p]<e.blkIndent)return!1;if(e.sCount[p]-e.blkIndent>=4)return!1;if((s=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(c=e.src.charCodeAt(s++))&&45!==c&&58!==c)return!1;for(;s<e.eMarks[p];){if(124!==(c=e.src.charCodeAt(s))&&45!==c&&58!==c&&!r(c))return!1;s++}for(d=(l=a(e,t+1)).split("|"),b=[],u=0;u<d.length;u++){if(!(f=d[u].trim())){if(0===u||u===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(f))return!1;58===f.charCodeAt(f.length-1)?b.push(58===f.charCodeAt(0)?"center":"right"):58===f.charCodeAt(0)?b.push("left"):b.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=(d=o(l.replace(/^\||\|$/g,""))).length)>b.length)return!1;if(i)return!0;for((h=e.push("table_open","table",1)).map=g=[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<d.length;u++)(h=e.push("th_open","th",1)).map=[t,t+1],b[u]&&(h.attrs=[["style","text-align:"+b[u]]]),(h=e.push("inline","",0)).content=d[u].trim(),h.map=[t,t+1],h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),(h=e.push("tbody_open","tbody",1)).map=j=[t+2,0],p=t+2;p<n&&!(e.sCount[p]<e.blkIndent)&&-1!==(l=a(e,p).trim()).indexOf("|")&&!(e.sCount[p]-e.blkIndent>=4);p++){for(d=o(l.replace(/^\||\|$/g,"")),h=e.push("tr_open","tr",1),u=0;u<m;u++)h=e.push("td_open","td",1),b[u]&&(h.attrs=[["style","text-align:"+b[u]]]),(h=e.push("inline","",0)).content=d[u]?d[u].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return h=e.push("tbody_close","tbody",-1),h=e.push("table_close","table",-1),g[1]=j[1]=p,e.line=p,!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,i,c,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),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(c=t;!(++c>=n)&&!((d=l=e.bMarks[c]+e.tShift[c])<(m=e.eMarks[c])&&e.sCount[c]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[c]-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=c+(p?1:0),(s=e.push("fence","code",0)).info=i,s.content=e.getLines(t+1,c,o,!0),s.markup=u,s.map=[t,e.line],!0}},function(e,t,n){"use strict";var r=n(25).isSpace;e.exports=function(e,t,n,a){var o,i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_,y,O,w,C=e.lineMax,E=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(E++))return!1;if(a)return!0;for(l=m=e.sCount[t]+E-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(E)?(E++,l++,m++,o=!1,k=!0):9===e.src.charCodeAt(E)?(k=!0,(e.bsCount[t]+m)%4==3?(E++,l++,m++,o=!1):o=!0):k=!1,h=[e.bMarks[t]],e.bMarks[t]=E;E<x&&(i=e.src.charCodeAt(E),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,E++;for(b=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(k?1:0),u=E>=x,j=[e.sCount[t]],e.sCount[t]=m-l,v=[e.tShift[t]],e.tShift[t]=E-e.bMarks[t],y=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",w=!1,d=t+1;d<n&&(e.sCount[d]<e.blkIndent&&(w=!0),!((E=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(E++)||w){if(u)break;for(_=!1,c=0,s=y.length;c<s;c++)if(y[c](e,d,n,!0)){_=!0;break}if(_){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),b.push(e.bsCount[d]),v.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),b.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]+E-(e.bMarks[d]+e.tShift[d]),32===e.src.charCodeAt(E)?(E++,l++,m++,o=!1,k=!0):9===e.src.charCodeAt(E)?(k=!0,(e.bsCount[d]+m)%4==3?(E++,l++,m++,o=!1):o=!0):k=!1,h.push(e.bMarks[d]),e.bMarks[d]=E;E<x&&(i=e.src.charCodeAt(E),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,E++;u=E>=x,b.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]=E-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=C,e.parentType=g,p[1]=e.line,c=0;c<v.length;c++)e.bMarks[c+t]=h[c],e.tShift[c+t]=v[c],e.sCount[c+t]=j[c],e.bsCount[c+t]=b[c];return e.blkIndent=f,!0}},function(e,t,n){"use strict";var r=n(25).isSpace;e.exports=function(e,t,n,a){var o,i,c,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(i=1;s<u;){if((c=e.src.charCodeAt(s++))!==o&&!r(c))return!1;c===o&&i++}return!(i<3)&&(!!a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o)),!0))}},function(e,t,n){"use strict";var r=n(25).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n?-1:a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_,y,O,w,C,E,x,S,A,P,N,T,F,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,P=e.bMarks[t]+e.tShift[t],j=Number(e.src.substr(P,S-P-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?(F=e.push("ordered_list_open","ol",1),1!==j&&(F.attrs=[["start",j]])):F=e.push("bullet_list_open","ul",1),F.map=b=[t,0],F.markup=String.fromCharCode(g),k=t,A=!1,T=e.md.block.ruler.getRules("list"),O=e.parentType,e.parentType="list";k<n;){for(x=S,v=e.eMarks[k],p=_=e.sCount[k]+S-(e.bMarks[t]+e.tShift[t]);x<v;){if(9===(i=e.src.charCodeAt(x)))_+=4-(_+e.bsCount[k])%4;else{if(32!==i)break;_++}x++}if((u=(c=x)>=v?1:_-p)>4&&(u=1),s=p+u,(F=e.push("list_item_open","li",1)).markup=String.fromCharCode(g),F.map=m=[t,0],E=e.tight,C=e.tShift[t],w=e.sCount[t],y=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=c-e.bMarks[t],e.sCount[t]=_,c>=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=y,e.tShift[t]=C,e.sCount[t]=w,e.tight=E,(F=e.push("list_item_close","li",-1)).markup=String.fromCharCode(g),k=t=e.line,m[1]=k,c=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,h=T.length;l<h;l++)if(T[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(F=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(g),b[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(25).normalizeReference,a=n(25).isSpace;e.exports=function(e,t,n,o){var i,c,l,s,u,p,d,m,h,b,f,g,j,v,k,_,y=0,O=e.bMarks[t]+e.tShift[t],w=e.eMarks[t],C=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"),b=e.parentType,e.parentType="reference";C<s&&!e.isEmpty(C);C++)if(!(e.sCount[C]-e.blkIndent>3||e.sCount[C]<0)){for(v=!1,p=0,d=k.length;p<d;p++)if(k[p](e,C,s,!0)){v=!0;break}if(v)break}for(w=(j=e.getLines(t,C,e.blkIndent,!1).trim()).length,O=1;O<w;O++){if(91===(i=j.charCodeAt(O)))return!1;if(93===i){h=O;break}10===i?y++:92===i&&++O<w&&10===j.charCodeAt(O)&&y++}if(h<0||58!==j.charCodeAt(h+1))return!1;for(O=h+2;O<w;O++)if(10===(i=j.charCodeAt(O)))y++;else if(!a(i))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(c=O=f.pos,l=y+=f.lines,g=O;O<w;O++)if(10===(i=j.charCodeAt(O)))y++;else if(!a(i))break;for(f=e.md.helpers.parseLinkTitle(j,O,w),O<w&&g!==O&&f.ok?(_=f.str,O=f.pos,y+=f.lines):(_="",O=c,y=l);O<w&&(i=j.charCodeAt(O),a(i));)O++;if(O<w&&10!==j.charCodeAt(O)&&_)for(_="",O=c,y=l;O<w&&(i=j.charCodeAt(O),a(i));)O++;return!(O<w&&10!==j.charCodeAt(O))&&(!!(m=r(j.slice(1,h)))&&(!!o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:_,href:u}),e.parentType=b,e.line=t+y+1,!0)))}},function(e,t,n){"use strict";var r=n(25).isSpace;e.exports=function(e,t,n,a){var o,i,c,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(i=1,o=e.src.charCodeAt(++s);35===o&&s<u&&i<=6;)i++,o=e.src.charCodeAt(++s);return!(i>6||s<u&&!r(o))&&(!!a||(u=e.skipSpacesBack(u,s),(c=e.skipCharsBack(u,35,s))>s&&r(e.src.charCodeAt(c-1))&&(u=c),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(s,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i),!0))}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,a,o,i,c,l,s,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(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,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(c=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),c.map=[t,e.line],(c=e.push("inline","",0)).content=r,c.map=[t,e.line-1],c.children=[],(c=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(235),a=n(115).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,i,c,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(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(s=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(s,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(c=e.push("html_block","",0)).map=[t,i],c.content=e.getLines(t,i,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","meta","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,i,c,l=t+1,s=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(c=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,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=c,!0}},function(e,t,n){"use strict";var r=n(86),a=n(25).isSpace;function o(e,t,n,r){var o,i,c,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,c=l=u=p=0,s=(i=this.src).length;l<s;l++){if(o=i.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(c),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,c=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,c,l,s,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],s=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<s&&i<n;){if(c=this.src.charCodeAt(l),a(c))9===c?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,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(85),a=[["text",n(239)],["newline",n(240)],["escape",n(241)],["backticks",n(242)],["strikethrough",n(116).tokenize],["emphasis",n(117).tokenize],["link",n(243)],["image",n(244)],["autolink",n(245)],["html_inline",n(246)],["entity",n(247)]],o=[["balance_pairs",n(248)],["strikethrough",n(116).postProcess],["emphasis",n(117).postProcess],["text_collapse",n(249)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,c=e.cache;if(void 0===c[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,c[r]=e.pos}else e.pos=c[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,c=new this.State(e,t,n,r);for(this.tokenize(c),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](c)},i.prototype.State=n(250),e.exports=i},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(25).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(25).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,a,o,i,c,l=e.pos;if(96!==e.src.charCodeAt(l))return!1;for(n=l,l++,r=e.posMax;l<r&&96===e.src.charCodeAt(l);)l++;for(a=e.src.slice(n,l),o=i=l;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;i<r&&96===e.src.charCodeAt(i);)i++;if(i-o===a.length)return t||((c=e.push("code_inline","code",0)).markup=a,c.content=e.src.slice(l,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=i,!0}return t||(e.pending+=a),e.pos+=a.length,!0}},function(e,t,n){"use strict";var r=n(25).normalizeReference,a=n(25).isSpace;e.exports=function(e,t){var n,o,i,c,l,s,u,p,d,m="",h=e.pos,b=e.posMax,f=e.pos,g=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(c=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((s=c+1)<b&&40===e.src.charCodeAt(s)){for(g=!1,s++;s<b&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);if(s>=b)return!1;for(f=s,(u=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok&&(m=e.md.normalizeLink(u.str),e.md.validateLink(m)?s=u.pos:m=""),f=s;s<b&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);if(u=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<b&&f!==s&&u.ok)for(d=u.str,s=u.pos;s<b&&(o=e.src.charCodeAt(s),a(o)||10===o);s++);else d="";(s>=b||41!==e.src.charCodeAt(s))&&(g=!0),s++}if(g){if(void 0===e.env.references)return!1;if(s<b&&91===e.src.charCodeAt(s)?(f=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?i=e.src.slice(f,s++):s=c+1):s=c+1,i||(i=e.src.slice(l,c)),!(p=e.env.references[r(i)]))return e.pos=h,!1;m=p.href,d=p.title}return t||(e.pos=l,e.posMax=c,e.push("link_open","a",1).attrs=n=[["href",m]],d&&n.push(["title",d]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=s,e.posMax=b,!0}},function(e,t,n){"use strict";var r=n(25).normalizeReference,a=n(25).isSpace;e.exports=function(e,t){var n,o,i,c,l,s,u,p,d,m,h,b,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?c=e.src.slice(f,u++):u=l+1):u=l+1,c||(c=e.src.slice(s,l)),!(p=e.env.references[r(c)]))return e.pos=j,!1;g=p.href,m=p.title}return t||(i=e.src.slice(s,l),e.md.inline.parse(i,e.md,e.env,b=[]),(h=e.push("image","img",0)).attrs=n=[["src",g],["alt",""]],h.children=b,h.content=i,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,i,c,l,s,u=e.pos;return 60===e.src.charCodeAt(u)&&(!((n=e.src.slice(u)).indexOf(">")<0)&&(a.test(n)?(c=(o=n.match(a))[0].slice(1,-1),l=e.md.normalizeLink(c),!!e.md.validateLink(l)&&(t||((s=e.push("link_open","a",1)).attrs=[["href",l]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(c),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=o[0].length,!0)):!!r.test(n)&&(c=(i=n.match(r))[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+c),!!e.md.validateLink(l)&&(t||((s=e.push("link_open","a",1)).attrs=[["href",l]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(c),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=i[0].length,!0))))}},function(e,t,n){"use strict";var r=n(115).HTML_TAG_RE;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},function(e,t,n){"use strict";var r=n(110),a=n(25).has,o=n(25).isValidEntityCode,i=n(25).fromCodePoint,c=/^&#((?: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(c))return t||(n="x"===s[1][0].toLowerCase()?parseInt(s[1].slice(1),16):parseInt(s[1],10),e.pending+=o(n)?i(n):i(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,i,c,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]),i=u[a.marker][a.length%3],c=-1,r=n-a.jump-1;r>i;r-=o.jump+1)if((o=t[r]).marker===a.marker&&(-1===c&&(c=r),o.open&&o.end<0&&o.level===a.level&&(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,c=-1;break}-1!==c&&(u[a.marker][(a.length||0)%3]=c)}}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(86),a=n(25).isWhiteSpace,o=n(25).isPunctChar,i=n(25).isMdAsciiPunct;function c(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=[]}c.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},c.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},c.prototype.scanDelims=function(e,t){var n,r,c,l,s,u,p,d,m,h=e,b=!0,f=!0,g=this.posMax,j=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<g&&this.src.charCodeAt(h)===j;)h++;return c=h-e,r=h<g?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?b=!1:m&&(u||p||(b=!1)),u?f=!1:p&&(d||m||(f=!1)),t?(l=b,s=f):(l=b&&(!f||p),s=f&&(!b||m)),{can_open:l,can_close:s,length:c}},c.prototype.Token=r,e.exports=c},function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var c={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]?0: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(252)(e.__opts__),r=e.__tlds__.slice();function c(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(c(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(c(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(c(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(c(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(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||c.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},c,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,i,c,l;if(this.re.schema_test.test(e))for((c=this.re.schema_search).lastIndex=0;null!==(t=c.exec(e));)if(a=this.testSchemaAt(e,t[2],c.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(112).source,t.src_Cc=n(113).source,t.src_Z=n(114).source,t.src_P=n(84).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,4}[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 h})),n.d(t,"ucs2encode",(function(){return b})),n.d(t,"decode",(function(){return j})),n.d(t,"encode",(function(){return v})),n.d(t,"toASCII",(function(){return _})),n.d(t,"toUnicode",(function(){return k}));var r=n(20),a=n.n(r),o=2147483647,i=/^xn--/,c=/[^\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 h(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 b=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,i=128,c=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,h=1,b=36;;b+=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)/h))&&d("overflow"),a+=f*h;var j=b<=c?1:b>=c+26?26:b-c;if(f<j)break;var v=36-j;h>u(o/v)&&d("overflow"),h*=v}var k=n.length+1;c=g(a-m,k,0==m),u(a/k)>o-i&&d("overflow"),i+=u(a/k),a%=k,n.splice(a++,0,i)}return String.fromCodePoint.apply(String,n)},v=function(e){var t=[],n=(e=h(e)).length,r=128,a=0,i=72,c=!0,l=!1,s=void 0;try{for(var m,b=e[Symbol.iterator]();!(c=(m=b.next()).done);c=!0){var j=m.value;j<128&&t.push(p(j))}}catch(z){l=!0,s=z}finally{try{c||null==b.return||b.return()}finally{if(l)throw s}}var v=t.length,k=v;for(v&&t.push("-");k<n;){var _=o,y=!0,O=!1,w=void 0;try{for(var C,E=e[Symbol.iterator]();!(y=(C=E.next()).done);y=!0){var x=C.value;x>=r&&x<_&&(_=x)}}catch(z){O=!0,w=z}finally{try{y||null==E.return||E.return()}finally{if(O)throw w}}var S=k+1;_-r>u((o-a)/S)&&d("overflow"),a+=(_-r)*S,r=_;var A=!0,P=!1,N=void 0;try{for(var T,F=e[Symbol.iterator]();!(A=(T=F.next()).done);A=!0){var B=T.value;if(B<r&&++a>o&&d("overflow"),B==r){for(var I=a,M=36;;M+=36){var L=M<=i?1:M>=i+26?26:M-i;if(I<L)break;var R=I-L,D=36-L;t.push(p(f(L+R%D,0))),I=u(R/D)}t.push(p(f(I,0))),i=g(a,S,k==v),a=0,++k}}}catch(z){P=!0,N=z}finally{try{A||null==F.return||F.return()}finally{if(P)throw N}}++a,++r}return t.join("")},k=function(e){return m(e,(function(e){return i.test(e)?j(e.slice(4).toLowerCase()):e}))},_=function(e){return m(e,(function(e){return c.test(e)?"xn--"+v(e):e}))},y={version:"2.1.0",ucs2:{decode:h,encode:b},decode:j,encode:v,toASCII:_,toUnicode:k};t.default=y},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){"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 i(){if(i.enabled){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=i,c=Number(new Date),l=c-(n||c);o.diff=l,o.prev=n,o.curr=c,n=c,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 i=t[s];e=a.call(o,i),t.splice(s,1),s--}return e})),r.formatArgs.call(o,t);var u=o.log||r.log;u.apply(o,t)}}return i.namespace=e,i.enabled=r.enabled(e),i.useColors=r.useColors(),i.color=t(e),i.destroy=a,i.extend=o,"function"==typeof r.init&&r.init(i),r.instances.push(i),i}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(83),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(44),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(119),i=n(262),c=n(263),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,c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),null===e||"string"===c||"number"===c||"object"===c&&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 h=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h){0;for(var b,f=h.call(e),g=0;!(b=f.next()).done;)p+=u(o=b.value,d+s(o,g++),n,r)}else if("object"===c){0;var j=""+e;i(!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,h,b=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){i(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,i,c=e.result,l=e.keyPrefix,s=e.func,u=e.context,p=s.call(u,t,e.count++);Array.isArray(p)?k(p,c,n,o.thatReturnsArgument):null!=p&&(r.isValidElement(p)&&(a=p,i=l+(!p.key||t&&t.key===p.key?"":d(p.key)+"/")+n,p=r.cloneElement(a,{key:i},void 0!==a.props?a.props.children:void 0)),c.push(p))}function k(e,t,n,r,a){var o="";null!=n&&(o=d(n)+"/");var i=j.getPooled(t,o,r,a);!function(e,t,n){null==e||u(e,"",t,n)}(e,v,i),j.release(i)}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)},(h=j).instancePool=[],h.getPooled=m||b,h.poolSize||(h.poolSize=10),h.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return c(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return c(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;i(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,i,c){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,i,c],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(119);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(87),a=n(121);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(87).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},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);var r={};n.r(r),n.d(r,"save",(function(){return It})),n.d(r,"attributes",(function(){return Mt})),n.d(r,"support",(function(){return Lt}));var a={};n.r(a),n.d(a,"save",(function(){return wn})),n.d(a,"attributes",(function(){return En})),n.d(a,"supports",(function(){return xn}));var o=n(19),i=n(14),c=n.n(i),l=n(3),s=n.n(l),u=n(0),p=n(1),d=n(13),m=n(4),h=n(2),b=n(20),f=n.n(b),g=n(8),j=n.n(g),v=n(12),k=n.n(v),_=n(9),y=n.n(_),O=n(10),w=n.n(O),C=n(5),E=n.n(C),x=n(11),S=n.n(x),A=n(6),P=n(39),N=[{icon:Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0z"}),Object(u.createElement)(h.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"}],T=Object(p.__)("Pick an image filter","jetpack");function F(e){var t=e.value,n=e.onChange;return Object(u.createElement)(h.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)(h.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:T,tooltip:T,icon:Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(u.createElement)(h.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)(h.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},N.map((function(e){var a,o=e.icon,i=e.title,c=e.value;return Object(u.createElement)(h.MenuItem,{className:t===c?"is-active":void 0,icon:o,isSelected:t===c,key:c||"original",onClick:(a=c,function(){n(t===a?void 0:a),r()}),role:"menuitemcheckbox"},i)})))}})}var B=n(7),I=n.n(B),M=n(26),L=n(29),R=n(16),D=Object(u.createElement)(h.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),z=Object(u.createElement)(h.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),U=Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),H=Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),q=Object(u.createElement)(h.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(h.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"})),V=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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"img",Object(u.createRef)()),s()(E()(n),"onImageClick",(function(){n.props.isSelected||n.props.onSelect()})),s()(E()(n),"onImageKeyDown",(function(e){n.img.current===document.activeElement&&n.props.isSelected&&[M.BACKSPACE,M.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,i=e.width;if(r){var c={};!t&&r.alt_text&&(c.alt=r.alt_text),!n&&r.media_details&&r.media_details.height&&(c.height=+r.media_details.height),!a&&r.link&&(c.link=r.link),!o&&r.source_url&&(c.url=r.source_url),!i&&r.media_details&&r.media_details.width&&(c.width=+r.media_details.width),Object.keys(c).length&&this.props.setAttributes(c)}}},{key:"render",value:function(){var e,t=this.props,n=t["aria-label"],r=t.alt,a=t.columns,o=t.height,i=t.id,c=t.imageFilter,l=t.isFirstItem,d=t.isLastItem,m=t.isSelected,b=t.link,f=t.linkTo,g=t.onMoveBackward,j=t.onMoveForward,v=t.onRemove,k=t.origUrl,_=t.showMovers,y=t.srcSet,O=t.url,w=t.width;switch(f){case"media":e=O;break;case"attachment":e=b}var C=Object(L.isBlobURL)(k),E=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("img",{alt:r,"aria-label":n,"data-height":o,"data-id":i,"data-link":b,"data-url":k,"data-width":w,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:C?void 0:O,srcSet:C?void 0:y,tabIndex:"0",style:C?{backgroundImage:"url(".concat(k,")")}:void 0}),C&&Object(u.createElement)(h.Spinner,null));return Object(u.createElement)("figure",{className:I()("tiled-gallery__item",s()({"is-selected":m,"is-transient":C},"filter__".concat(c),!!c))},_&&Object(u.createElement)("div",{className:"tiled-gallery__item__move-menu"},Object(u.createElement)(h.IconButton,{icon:1===a?H: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)(h.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)(h.IconButton,{icon:q,onClick:v,className:"tiled-gallery__item__remove",label:Object(p.__)("Remove image","jetpack"),disabled:!m})),e?Object(u.createElement)("a",null,E):E)}}]),t}(u.Component),G=Object(R.withSelect)((function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}}))(V);function W(e){var t,n=e.alt,r=e.imageFilter,a=e.height,o=e.id,i=e.link,c=e.linkTo,l=e.origUrl,p=e.url,d=e.width;if(Object(L.isBlobURL)(l))return null;switch(c){case"media":t=p;break;case"attachment":t=i}var m=Object(u.createElement)("img",{alt:n,"data-height":a,"data-id":o,"data-link":i,"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 K=n(52);function $(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(82);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([_e,_e,ye,_e,_e]),te=ke([_e,_e,_e,ye,_e,_e,_e]),ne=ve([3,1,3],5),re=ke([ye,_e,_e,ye]),ae=ve([1,2,1],5),oe=ke([ye,_e,_e,_e]),ie=ve([1,3],3),ce=ke([_e,_e,_e,ye]),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),he=ke([Object(m.overEvery)(Oe(.9),we(2)),Object(m.overEvery)(Oe(.9),we(2)),we(1.6)]),be=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 _e(e){return e>=1&&e<2}function ye(e){return e<1}function Oe(e){return function(t){return t>=e}}function we(e){return function(t){return t<e}}var Ce=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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"gallery",Object(u.createRef)()),s()(E()(n),"pendingRaf",null),s()(E()(n),"ro",null),s()(E()(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,i=function(){var e=o.value,t=e.contentRect,r=e.target,a=t.width,i=[];Object(Y.a)(r).forEach((function(e){i.push(Object(Y.b)(e,a))})),void 0!==n.props.onResize&&n.props.onResize(i)},c=e[Symbol.iterator]();!(t=(o=c.next()).done);t=!0)i()}catch(l){r=!0,a=l}finally{try{t||null==c.return||c.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?this.triggerResize():"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 K.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,i=e.columnWidths,c=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,i=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)},c=0;c<t-1;c++)i(c);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&&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)&&ie(t)?[1,3]:ce(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]:he(r)&&be(t)?[2,1]:fe(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),i=Object(m.sum)(a);return e(o,r.slice(i))};return r([],e)}(c,{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)($,{key:n,width:i?i[t][n]:void 0},r)})))})))}}]),t}(u.Component),Ee=n(24);function xe(e){var t=e.columns,n=e.renderedImages,r=Math.min(Ee.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)($,{key:t},e)})))})))}var Se=n(67),Ae=function(e){function t(){return j()(this,t),y()(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,i=n.isSave,c=n.linkTo,l=n.layoutStyle,s=n.onMoveBackward,d=n.onMoveForward,m=n.onRemoveImage,h=n.onSelectImage,b=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=i?W:G,v=Object(Se.b)(e,{layoutStyle:l}),k=v.src,_=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:b===t,key:t,link:e.link,linkTo:c,onMoveBackward:i?void 0:s(t),onMoveForward:i?void 0:d(t),onRemove:i?void 0:m(t),onSelect:i?void 0:h(t),origUrl:e.url,setAttributes:i?void 0:f(t),showMovers:o.length>1,srcSet:_,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,i=e.layoutStyle,c=e.roundedCorners,l=e.onResize,p=e.isSave,d=e.columnWidths,m=Object(Se.a)(i)?xe:Ce,h=this.props.images.map(this.renderImage,this),b=i!==Ee.c?Math.min(c,Ee.i):0;return Object(u.createElement)("div",{className:I()(r,s()({},"has-rounded-corners-".concat(b),b>0))},Object(u.createElement)(m,{align:t,columns:a,columnWidths:p?d:void 0,images:o,layoutStyle:i,renderedImages:h,onResize:p?void 0:l}),n)}}]),t}(u.Component),Pe=n(38),Ne=n(65),Te=[{value:"attachment",label:Object(p.__)("Attachment Page","jetpack")},{value:"media",label:Object(p.__)("Media File","jetpack")},{value:"none",label:Object(p.__)("None","jetpack")}];function Fe(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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"state",{selectedImage:null,changed:void 0===n.props.attributes.columnWidths}),s()(E()(n),"addFiles",(function(e){var t=n.props.attributes.images||[],r=n.props.noticeOperations;Object(P.mediaUpload)({allowedTypes:Ee.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()(E()(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()(E()(n),"onSelectImage",(function(e){return function(){n.state.selectedImage!==e&&n.setState({selectedImage:e})}})),s()(E()(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()(E()(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()(E()(n),"onMoveForward",(function(e){return function(){e!==n.props.attributes.images.length-1&&n.onMove(e,e+1)}})),s()(E()(n),"onMoveBackward",(function(e){return function(){0!==e&&n.onMove(e,e-1)}})),s()(E()(n),"onResize",(function(e){n.state.changed&&n.setAttributes({columnWidths:e})})),s()(E()(n),"setColumnsNumber",(function(e){return n.setAttributes({columns:e})})),s()(E()(n),"setRoundedCorners",(function(e){return n.setAttributes({roundedCorners:e})})),s()(E()(n),"setImageAttributes",(function(e){return function(t){var r=n.props.attributes.images;r[e]&&n.setAttributes({images:[].concat(f()(r.slice(0,e)),[c()({},r[e],{},t)],f()(r.slice(e+1)))})}})),s()(E()(n),"setLinkTo",(function(e){return n.setAttributes({linkTo:e})})),s()(E()(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=c()({},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,i=n.noticeOperations,c=n.noticeUI,l=n.setAttributes,s=r.align,d=r.columns,m=void 0===d?Fe(r):d,b=r.imageFilter,f=r.images,g=r.linkTo,j=r.roundedCorners,v=Object(u.createElement)(h.DropZone,{onFilesDrop:this.addFiles}),k=Object(u.createElement)(A.BlockControls,null,!!f.length&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.Toolbar,null,Object(u.createElement)(A.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:Ee.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)(F,{value:b,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:Ee.a,multiple:!0,notices:c,onError:i.createErrorNotice}));var _=Object(Pe.a)(Ee.g,r.className);return Object(u.createElement)(u.Fragment,null,k,Object(u.createElement)(A.InspectorControls,null,Object(u.createElement)(h.PanelBody,{title:Object(p.__)("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(_)&&f.length>1&&Object(u.createElement)(h.RangeControl,{label:Object(p.__)("Columns","jetpack"),value:m,onChange:this.setColumnsNumber,min:1,max:Math.min(Ee.h,f.length)}),_!==Ee.c&&Object(u.createElement)(h.RangeControl,{label:Object(p.__)("Rounded corners","jetpack"),value:j,onChange:this.setRoundedCorners,min:0,max:Ee.i}),Object(u.createElement)(h.SelectControl,{label:Object(p.__)("Link To","jetpack"),value:g,onChange:this.setLinkTo,options:Te}))),c,Object(u.createElement)(Ae,{align:s,className:o,columns:m,imageFilter:b,images:f,layoutStyle:_,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)(h.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),Me=Object(h.withNotices)(Ie);var Le=n(22),Re=(n(275),n(49)),De=n.n(Re),ze=n(64),Ue=n.n(ze),He=n(33);function qe(e){var t,n=e["aria-label"],r=e.alt,a=e.height,o=e.id,i=e.link,c=e.linkTo,l=e.origUrl,s=e.url,p=e.width;if(Object(L.isBlobURL)(l))return null;switch(c){case"media":t=s;break;case"attachment":t=i}var d=Object(u.createElement)("img",{alt:r,"aria-label":n,"data-height":a,"data-id":o,"data-link":i,"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 Ve(e){var t=e.children;return Object(u.createElement)("div",{className:"tiled-gallery__col"},t)}function Ge(e){var t=e.children,n=e.galleryRef;return Object(u.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}function We(e){var t=e.children,n=e.className;return Object(u.createElement)("div",{className:I()("tiled-gallery__row",n)},t)}var Ke=n(15),$e=n.n(Ke),Ze=[{isDefault:!0,name:"rectangular"},{name:"circle"},{name:"square"},{name:"columns"}];function Je(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 Ye(e,t){!function(e,t,n){var r=$e()(t,2),a=r[0],o=r[1],i=1/a*(n-4*(e.childElementCount-1)-o);!function(e,t){var n=t.rawHeight,r=t.rowWidth,a=Xe(e),o=a.map((function(e){return(n-4*(e.childElementCount-1))*tt(e)[0]})),i=Je(o,r);a.forEach((function(e,t){var r=o[t],a=i[t];!function(e,t){var n=t.colHeight,r=t.width,a=t.rawWidth,o=Je(et(e).map((function(e){return a/nt(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:i,rowWidth:n-4*(e.childElementCount-1)})}(e,function(e){return Xe(e).map(tt).reduce((function(e,t){var n=$e()(e,2),r=n[0],a=n[1],o=$e()(t,2);return[r+o[0],a+o[1]]}),[0,0])}(e),t)}function Qe(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function Xe(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function et(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function tt(e){var t=et(e),n=t.length,r=1/t.map(nt).reduce((function(e,t){return e+1/t}),0);return[r,r*n||1]}function nt(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 rt(e){var t=e.height,n=e.width;return t&&n?n/t:1}var at=wt([2,1,2],5),ot=Ct([Et,Et,xt,Et,Et]),it=Ct([Et,Et,Et,xt,Et,Et,Et]),ct=wt([3,1,3],5),lt=Ct([xt,Et,Et,xt]),st=wt([1,2,1],5),ut=Ct([xt,Et,Et,Et]),pt=wt([1,3],3),dt=Ct([Et,Et,Et,xt]),mt=wt([3,1],3),ht=Ct([At(1.6),Object(m.overEvery)(St(.9),At(2)),Object(m.overEvery)(St(.9),At(2))]),bt=wt([1,2],3),ft=wt([1,1,1,1,1],1),gt=wt([1,1,1,1],1),jt=wt([1,1,1],3),vt=Ct([Object(m.overEvery)(St(.9),At(2)),Object(m.overEvery)(St(.9),At(2)),At(1.6)]),kt=wt([2,1],3),_t=Ct([function(e){return e>=2}]);function yt(e,t,n){var r=Object(m.sum)(Object(m.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&jt(e)&&(r<2.5||r<5&&t.length>=3&&t[0]===t[2]||n)}function Ot(e,t){var n=Object(m.sum)(Object(m.take)(t,4));return gt(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function wt(e,t){return function(n){return!Object(m.some)(Object(m.takeRight)(n,t),(function(t){return Object(m.isEqual)(t,e)}))}}function Ct(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 Et(e){return e>=1&&e<2}function xt(e){return e<1}function St(e){return function(t){return t>=e}}function At(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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"gallery",Object(u.createRef)()),s()(E()(n),"pendingRaf",null),s()(E()(n),"ro",null),s()(E()(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;Qe(n).forEach((function(e){return Ye(e,r)}))},i=e[Symbol.iterator]();!(t=(a=i.next()).done);t=!0)o()}catch(c){n=!0,r=c}finally{try{t||null==i.return||i.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?this.triggerResize():"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 K.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,i=function(e){return Object(m.map)(e,rt)}(r),c="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,i=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)},c=0;c<t-1;c++)i(c);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&&ot(r)&&at(t)?[2,1,2]:r.length>15&&it(r)&&ct(t)?[3,1,3]:5!==r.length&<(r)&&st(t)?[1,2,1]:ut(r)&&pt(t)?[1,3]:dt(r)&&mt(t)?[3,1]:ht(r)&&bt(t)?[1,2]:n&&(5===r.length||10!==r.length&&r.length>6)&&ft(t)&&Object(m.sum)(Object(m.take)(r,5))<5?[1,1,1,1,1]:Ot(t,r)?[1,1,1,1]:yt(t,r,n)?[1,1,1]:vt(r)&&kt(t)?[2,1]:_t(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),i=Object(m.sum)(a);return e(o,r.slice(i))};return r([],e)}(i,{isWide:["full","wide"].includes(t)}),l=0;return Object(u.createElement)(Ge,{galleryRef:this.gallery},c.map((function(e,t){return Object(u.createElement)(We,{key:t},e.map((function(e,t){var n=o.slice(l,l+e);return l+=e,Object(u.createElement)(Ve,{key:t},n)})))})))}}]),t}(u.Component);function Nt(e){var t=e.columns,n=e.renderedImages,r=Math.min(20,t),a=n.length%r;return Object(u.createElement)(Ge,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)(We,{key:t,className:"columns-".concat(e.length)},e.map((function(e,t){return Object(u.createElement)(Ve,{key:t},e)})))})))}var Tt=function(e){function t(){return j()(this,t),y()(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(L.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)?Bt:Ue.a;if(Ft(this.props.layoutStyle)&&n&&t){var i=Math.min(2e3,n,t);return o(a,{resize:"".concat(i,",").concat(i)})}return o(a)}}},{key:"renderImage",value:function(e,t){var n=this.props,r=n.images,a=n.linkTo,o=n.selectedImage,i=Object(p.sprintf)(Object(p.__)("image %1$d of %2$d in gallery","jetpack"),t+1,r.length);return Object(u.createElement)(qe,{alt:e.alt,"aria-label":i,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,i=e.layoutStyle,c=Ft(i)?Nt:Pt,l=this.props.images.map(this.renderImage,this);return Object(u.createElement)("div",{className:r},Object(u.createElement)(c,{align:t,columns:a,images:o,layoutStyle:i,renderedImages:l}),n)}}]),t}(u.Component);function Ft(e){return["circle","square"].includes(e)}function Bt(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,De()(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 It(e){var t=e.attributes,n=t.images;if(!n.length)return null;var r=t.align,a=t.className,o=t.columns,i=void 0===o?function(e){return Math.min(3,e.images.length)}(t):o,c=t.linkTo;return Object(u.createElement)(Tt,{align:r,className:a,columns:i,images:n,layoutStyle:Object(Pe.a)(Ze,a),linkTo:c})}var Mt={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"}},Lt={align:["center","wide","full"],customClassName:!1,html:!1},Rt=[{isDefault:!0,name:"rectangular"},{name:"circle"},{name:"square"},{name:"columns"}];function Dt(e){var t,n=e.alt,r=e.imageFilter,a=e.height,o=e.id,i=e.link,c=e.linkTo,l=e.origUrl,p=e.url,d=e.width;if(Object(L.isBlobURL)(l))return null;switch(c){case"media":t=p;break;case"attachment":t=i}var m=Object(u.createElement)("img",{alt:n,"data-height":a,"data-id":o,"data-link":i,"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 zt(e){var t=e.children;return Object(u.createElement)("div",{className:"tiled-gallery__col"},t)}function Ut(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 qt(e){var t=e.height,n=e.width;return t&&n?n/t:1}var Vt=pn([2,1,2],5),Gt=dn([mn,mn,hn,mn,mn]),Wt=dn([mn,mn,mn,hn,mn,mn,mn]),Kt=pn([3,1,3],5),$t=dn([hn,mn,mn,hn]),Zt=pn([1,2,1],5),Jt=dn([hn,mn,mn,mn]),Yt=pn([1,3],3),Qt=dn([mn,mn,mn,hn]),Xt=pn([3,1],3),en=dn([fn(1.6),Object(m.overEvery)(bn(.9),fn(2)),Object(m.overEvery)(bn(.9),fn(2))]),tn=pn([1,2],3),nn=pn([1,1,1,1,1],1),rn=pn([1,1,1,1],1),an=pn([1,1,1],3),on=dn([Object(m.overEvery)(bn(.9),fn(2)),Object(m.overEvery)(bn(.9),fn(2)),fn(1.6)]),cn=pn([2,1],3),ln=dn([function(e){return e>=2}]);function sn(e,t,n){var r=Object(m.sum)(Object(m.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&an(e)&&(r<2.5||r<5&&t.length>=3&&t[0]===t[2]||n)}function un(e,t){var n=Object(m.sum)(Object(m.take)(t,4));return rn(e)&&n<3.5&&t.length>5||n<7&&4===t.length}function pn(e,t){return function(n){return!Object(m.some)(Object(m.takeRight)(n,t),(function(t){return Object(m.isEqual)(t,e)}))}}function dn(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 mn(e){return e>=1&&e<2}function hn(e){return e<1}function bn(e){return function(t){return t>=e}}function fn(e){return function(t){return t<e}}var gn=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=y()(this,(e=w()(t)).call.apply(e,[this].concat(a))),s()(E()(n),"gallery",Object(u.createRef)()),s()(E()(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,i=function(e){return Object(m.map)(e,qt)}(r),c="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,i=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)},c=0;c<t-1;c++)i(c);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&&Gt(r)&&Vt(t)?[2,1,2]:r.length>15&&Wt(r)&&Kt(t)?[3,1,3]:5!==r.length&&$t(r)&&Zt(t)?[1,2,1]:Jt(r)&&Yt(t)?[1,3]:Qt(r)&&Xt(t)?[3,1]:en(r)&&tn(t)?[1,2]:n&&(5===r.length||10!==r.length&&r.length>6)&&nn(t)&&Object(m.sum)(Object(m.take)(r,5))<5?[1,1,1,1,1]:un(t,r)?[1,1,1,1]:sn(t,r,n)?[1,1,1]:on(r)&&cn(t)?[2,1]:ln(r)?[1]:r.length>3?[1,1]:Array(r.length).fill(1);var o=t.concat([a]),i=Object(m.sum)(a);return e(o,r.slice(i))};return r([],e)}(i,{isWide:["full","wide"].includes(t)}),l=0;return Object(u.createElement)(Ut,{galleryRef:this.gallery},c.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)(zt,{key:t},n)})))})))}}]),t}(u.Component);function jn(e){var t=e.columns,n=e.renderedImages,r=Math.min(20,t),a=n.length%r;return Object(u.createElement)(Ut,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)(zt,{key:t},e)})))})))}function vn(e){return["circle","square"].includes(e)}function kn(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}function _n(e){var t=Object(He.parse)(e).host;return/\.files\.wordpress\.com$/.test(t)}function yn(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,De()(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 On=function(e){function t(){return j()(this,t),y()(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,i=n.linkTo,c=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(L.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,i=t.layoutStyle,c=_n(r)||!0===kn()?yn:Ue.a;if(vn(i)&&o&&a){var l=Math.min(2e3,o,a);n=c(r,{resize:"".concat(l,",").concat(l)})}else n=c(r);var s,u=300,p=600;if(vn(i)){var d=Math.min(p,o,a),h=Math.min(2e3,o,a);s=Object(m.range)(d,h,u).map((function(e){var t=c(r,{resize:"".concat(e,",").concat(e),strip:"info"});return t?"".concat(t," ").concat(e,"w"):null})).filter(Boolean).join(",")}else{var b=Math.min(p,o),f=Math.min(2e3,o);s=Object(m.range)(b,f,u).map((function(e){var t=c(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:c}),h=d.src,b=d.srcSet;return Object(u.createElement)(Dt,{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:i,origUrl:e.url,showMovers:o.length>1,srcSet:b,url:h,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,i=e.layoutStyle,c=e.roundedCorners,l=vn(i)?jn:gn,p=this.props.images.map(this.renderImage,this),d="circle"!==i?Math.min(c,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:i,renderedImages:p}),n)}}]),t}(u.Component);function wn(e){var t=e.attributes,n=t.imageFilter,r=t.images;if(!r.length)return null;var a=t.align,o=t.className,i=t.columns,c=void 0===i?function(e){return Math.min(3,e.images.length)}(t):i,l=t.linkTo,s=t.roundedCorners;return Object(u.createElement)(On,{align:a,className:o,columns:c,imageFilter:n,images:r,isSave:!0,layoutStyle:Object(Pe.a)(Rt,o),linkTo:l,roundedCorners:s})}var Cn,En={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}},xn={align:["center","wide","full"],customClassName:!1,html:!1},Sn=[r,a],An=n(139),Pn=n.n(An),Nn=n(140),Tn=n.n(Nn),Fn=n(141),Bn=n.n(Fn),In=n(142),Mn=n.n(In),Ln=n(143),Rn=n.n(Ln),Dn=n(144),zn=n.n(Dn),Un=n(18),Hn=(Cn={},s()(Cn,Ee.e,Object(p._x)("Tiled mosaic","Tiled gallery layout","jetpack")),s()(Cn,Ee.c,Object(p._x)("Circles","Tiled gallery layout","jetpack")),s()(Cn,Ee.d,Object(p._x)("Tiled columns","Tiled gallery layout","jetpack")),s()(Cn,Ee.f,Object(p._x)("Square tiles","Tiled gallery layout","jetpack")),Cn),qn=Ee.g.map((function(e){return c()({},e,{label:Hn[e.name]})}));function Vn(e){return Object(m.filter)(e,(function(e){var t=e.id,n=e.url;return t&&n}))}var Gn={align:{default:"center",type:"string"},className:{default:"is-style-".concat(Ee.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}},Wn={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:Pn.a,width:160,height:95},{alt:"",link:"",url:Tn.a,width:160,height:107},{alt:"",link:"",url:Bn.a,width:304,height:203},{alt:"",link:"",url:Mn.a,width:312,height:207},{alt:"",link:"",url:Rn.a,width:152,height:101},{alt:"",link:"",url:zn.a,width:152,height:105}],linkTo:"none"},Kn=Object(u.createElement)(h.SVG,{viewBox:"0 0 24 24",width:24,height:24},Object(u.createElement)(h.Path,{fill:"currentColor",d:"M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z"})),$n={attributes:Gn,category:Object(Un.a)()?"layout":"jetpack",description:Object(p.__)("Display multiple images in an elegantly organized tiled layout.","jetpack")+(Object(Le.b)()?"":" "+Object(p.__)("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:Kn,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:qn,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 Vn(e).length>0},transform:function(e){var t=Vn(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=Vn(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:Me,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,i=t.columns,c=void 0===i?Fe(t):i,l=t.linkTo,s=t.roundedCorners,p=t.columnWidths;return Object(u.createElement)(Ae,{align:a,className:o,columns:c,imageFilter:n,images:r,isSave:!0,layoutStyle:Object(Pe.a)(Ee.g,o),linkTo:l,roundedCorners:s,columnWidths:p})},deprecated:Sn,example:{attributes:Wn}};Object(o.a)("tiled-gallery",$n)},function(e,t,n){"use strict";n.r(t);n(41),n(18);var r=n(14),a=n.n(r),o=n(37),i=n.n(o),c=n(21),l=n.n(c),s=n(16),u=n(1),p=(n(105),n(33)),d=n(47),m=n(22);function h(){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(i()(regeneratorRuntime.mark((function e(){var t,n,r,o,i;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,i=h(),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},i&&{actions:[{url:h(),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 b=Object(p.parse)(window.location.href,!0).query;b.stripe_connect_success?Object(s.dispatch)("core/notices").createNotice("success",Object(u.__)("Congrats! Your site is now connected to Stripe. You can now start making money!","jetpack")):b.stripe_connect_cancelled&&Object(s.dispatch)("core/notices").createNotice("error",Object(u.__)("You cancelled connecting your site to Stripe.","jetpack"))}var f=n(27),g=n.n(f),j=n(20),v=n.n(j),k=n(0),_=n(31),y=n(6),O=n(61),w=n(15),C=n.n(w),E=n(35),x=n(8),S=n.n(x),A=n(12),P=n.n(A),N=n(9),T=n.n(N),F=n(10),B=n.n(F),I=n(5),M=n.n(I),L=n(11),R=n.n(L),D=n(3),z=n.n(D),U=n(4),H=n(7),q=n.n(H),V=n(17),G=n(2),W=n(53),K=n(26),$=[{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")}];function Q(){return Object(V.createHigherOrderComponent)((function(e){var t=function(t){function n(e){var t;return S()(this,n),t=T()(this,B()(n).call(this,e)),z()(M()(t),"modalRef",(function(e){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)})),z()(M()(t),"stopArrowKeysPropagation",(function(e){[K.UP,K.DOWN,K.LEFT,K.RIGHT].includes(e.keyCode)&&e.stopPropagation()})),z()(M()(t),"setAuthenticated",(function(e){return t.setState({isAuthenticated:e})})),z()(M()(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({isLoading:!0,media:n?[]:t.state.media,nextHandle:!n&&t.state.nextHandle},(function(){return t.getMediaRequest(e)})))})),z()(M()(t),"handleApiError",(function(e){"authorization_required"!==e.code?(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()(M()(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({media:t.mergeMedia(a,e.media),nextHandle:e.meta.next_page,isLoading:!1})})).catch(t.handleApiError)}})),z()(M()(t),"copyMedia",(function(e,n){t.setState({isCopying:e}),t.props.noticeOperations.removeAllNotices(),t.modalElement&&t.modalElement.focus(),Object(W.speak)(Object(u.sprintf)(Object(u.__)("Inserting: %s","jetpack"),e.map((function(e){return e.title})).filter((function(e){return e})).join(", ")),"polite"),l()({path:n,method:"POST",data:{media:e.map((function(e){return{guid:e.guid,caption:e.caption,title:e.title}}))}}).then((function(e){var n=t.props,r=n.value,a=n.addToGallery,o=n.multiple?e:e[0];t.props.onClose(),t.props.onSelect(a?r.concat(e):o)})).catch(t.handleApiError)})),z()(M()(t),"onChangePath",(function(e,n){t.setState({path:e},n)})),t.state={media:[],nextHandle:!1,isLoading:!1,isCopying:null,isAuthenticated:!0,path:{ID:"recent"}},t}return R()(n,t),P()(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.isAuthenticated,r=t.isCopying,a=t.isLoading,o=t.media,i=t.nextHandle,c=t.path,l=this.props,s=l.allowedTypes,p=l.multiple,d=void 0!==p&&p,m=l.noticeUI,h=l.onClose,b=r?Object(u.__)("Inserting media","jetpack"):Object(u.__)("Select media","jetpack"),f=r?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"),g="jetpack-external-media-browser__description",j=q()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":r});return Object(k.createElement)(G.Modal,{onRequestClose:h,title:b,aria:{describedby:g},className:j},Object(k.createElement)("div",{ref:this.modalRef},m,Object(k.createElement)("p",{id:g,className:"jetpack-external-media-browser--visually-hidden"},f),Object(k.createElement)(e,{getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:r,isLoading:a,media:o,pageHandle:i,allowedTypes:s,isAuthenticated:n,setAuthenticated:this.setAuthenticated,multiple:d,path:c,onChangePath:this.onChangePath})))}}]),n}(k.Component);return Object(G.withNotices)(t)}))}var X=n(80),ee=function(e,t){var n,r=new X.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}))},te=n(28),ne={list:"/wpcom/v2/external-media/list/",copy:"/wpcom/v2/external-media/copy/",connection:"/wpcom/v2/external-media/connection/"};function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ne[e]?Object(te.addQueryArgs)(ne[e]+t,n):null}var ae=Object(k.memo)((function(){return Object(k.createElement)(k.Fragment,null,Object(k.createElement)(E.b,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 oe=Object(k.memo)((function(){return Object(k.createElement)("p",null,Object(u.__)("Awaiting authorization","jetpack"))}));var ie=function(e){var t=e.setAuthenticated,n=Object(k.useState)(!1),r=C()(n,2),a=r[0],o=r[1],i=Object(k.useCallback)((function(){o(!0),l()({path:re("connection","google_photos")}).then((function(e){if(e.error)throw e.message;ee(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)(oe,null):Object(k.createElement)(ae,null),Object(k.createElement)(G.Button,{isPrimary:!0,disabled:a,onClick:i},Object(u.__)("Authorize","jetpack")))};var ce=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 le=function(e){var t=Object(k.useCallback)((function(){e.onClick&&e.onClick(e.item)}),[e.onClick]),n=e.item,r=e.focusOnMount,a=e.isSelected,o=e.isCopying,i=void 0!==o&&o,c=n.thumbnails,l=n.caption,s=n.name,p=n.title,d=n.type,m=n.children,h=void 0===m?0:m,b=c.medium,f=void 0===b?null:b,g=c.fmt_hd,j=void 0===g?null:g,v=p||l||s,_=q()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":a,"jetpack-external-media-browser__media__folder":"folder"===d,"is-transient":i}),y=Object(k.useRef)(null);return Object(k.useEffect)((function(){r&&y.current.focus()}),[]),Object(k.createElement)("li",{ref:y,className:_,onClick:i?void 0:t,onKeyDown:i?void 0:function(e){K.ENTER!==e.keyCode&&K.SPACE!==e.keyCode||(e.preventDefault(),t(e))},role:"checkbox",tabIndex:"0","aria-checked":!!a,"aria-disabled":!!i},a&&i&&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:f||j,alt:v}),"folder"===d&&Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__info"},Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__name"},s),Object(k.createElement)("div",{className:"jetpack-external-media-browser__media__count"},h)))},se=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 ue=function(e){var t=e.media,n=e.isCopying,r=e.isLoading,a=e.pageHandle,o=e.className,i=e.multiple,c=e.setPath,l=e.nextPage,s=e.onCopy,p=Object(k.useState)([]),d=C()(p,2),m=d[0],h=d[1],b=Object(k.useCallback)((function(e){var t=[e];"folder"===e.type?c(e.ID):i?(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=[]),h(t)}),[m,i,c]),f=Object(k.useCallback)((function(){s(m)}),[m,s]),g=t.filter((function(e){return"folder"!==e.type})).length>0,j=q()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":r}),v=q()(z()({"jetpack-external-media-browser":!0},o,!0)),_=Object(k.useRef)(0);return Object(k.createElement)("div",{className:v},Object(k.createElement)("ul",{className:j},t.map((function(e,t){return Object(k.createElement)(le,{item:e,key:e.ID,onClick:b,focusOnMount:!!_.current&&t===_.current,isSelected:m.find((function(t){return t.ID===e.ID})),isCopying:n})})),0===t.length&&!r&&Object(k.createElement)(se,null),r&&Object(k.createElement)(ce,null),a&&!r&&Object(k.createElement)(G.Button,{isLarge:!0,isSecondary:!0,className:"jetpack-external-media-browser__loadmore",disabled:r||n,onClick:function(){_.current=t.length,l()}},Object(u.__)("Load More","jetpack"))),g&&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,isLarge:!0,isBusy:n,disabled:e,onClick:f},t))}),null))};function pe(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 de(e){var t=e.value,n=e.updateFilter;return Object(k.createElement)(G.SelectControl,{label:Object(u.__)("Filter by time period","jetpack"),value:(null==t?void 0:t.range)||"ANY",options:Y,onChange:function(e){return n({range:e})}})}function me(){return Object(k.createElement)("span",null,Object(u.__)("Favorites","jetpack"))}function he(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 be(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 fe=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)(be,{key:e,removeFilter:function(){return n(Object(U.omit)(t,e))}},(r=e,o=t[e],i=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)(pe,{value:o,updateFilter:i}):"date"===r?Object(k.createElement)(de,{value:o,updateFilter:i}):"favorite"===r?Object(k.createElement)(me,{value:o}):"mediaType"===r?Object(k.createElement)(he,{value:o,updateFilter:i}):null));var r,o,i}));return 0===o.length?null:o},ge=[{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 je(e){return ge.filter((function(t){return void 0===e[t.value]}))}function ve(e){var t=je(e);return t.length>0?t[0].value:""}var ke=function(e){var t=Object(k.useState)(ve([])),n=C()(t,2),r=n[0],o=n[1],i=e.isLoading,c=e.isCopying,l=e.filters,s=e.canChangeMedia,p=function(e,t){return t?e:e.filter((function(e){return"mediaType"!==e.value}))}(je(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:i||c,options:p,onChange:o}),Object(k.createElement)(G.Button,{disabled:i||c,isSecondary:!0,isSmall:!0,onClick:function(){var t,n,i=(t=l,n=r,a()({},t,z()({},n,"favorite"===n||"")));e.setFilters(i),o(ve(i))}},Object(u.__)("Add Filter","jetpack")))};var _e=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)})),ye=n(42),Oe=n.n(ye),we=Oe()();var Ce=function(e){var t,n=e.media,r=e.isCopying,a=e.isLoading,o=e.pageHandle,i=e.multiple,c=e.onChangePath,l=e.getMedia,s=e.allowedTypes,p=e.path,d=e.copyMedia,m=e.showAdditionalFilters,h=void 0!==m&&m,b=(t=s)&&1===t.length&&"image"===t[0],f=Object(k.useState)(b?{mediaType:"photo",date:{range:"ANY"}}:{date:{range:"ANY"}}),g=C()(f,2),j=g[0],v=g[1],_=Object(k.useRef)(""),y=Object(k.useRef)(""),O="recent"===p.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 i=null,c=we;switch(a.range){case"LAST_7_DAYS":i=Oe()(we).subtract(7,"days");break;case"LAST_30_DAYS":i=Oe()(we).subtract(30,"days");break;case"LAST_6_MONTHS":i=Oe()(we).subtract(6,"months");break;case"LAST_12_MONTHS":i=Oe()(we).subtract(1,"year");break;case"CUSTOM":a.year&&a.month&&(i=Oe()([a.year,a.month-1]),c=Oe()(i).endOf("month"))}var l=i?i.format("YYYY-MM-DD"):"0000-00-00",s=c?c.format("YYYY-MM-DD"):"0000-00-00";o.push("dateRange=".concat(l,":").concat(s))}return o.length>0?o:null}(j):null,w={number:20,path:p.ID};O&&(w.filter=O);var E=re("list","google_photos",w),x=Object(k.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l(E,t)}),[l,E]),S=Object(k.useCallback)((function(e){var t=n.find((function(t){return t.ID===e}));y.current=p,c(t||{ID:e})}),[n,c,y,p]),A=Object(k.useCallback)((function(e){d(e,re("copy","google_photos"))}),[d]);return Object(k.useEffect)((function(){_!==E&&(_.current=E,x({},p!==y.current))}),[_,E,x,p]),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"!==p.ID?"/":"recent",disabled:a||r,options:$,onChange:S}),h&&"recent"===p.ID&&Object(k.createElement)(ke,{filters:j,isLoading:a,setFilters:v,canChangeMedia:!b}),Object(k.createElement)("div",{className:"jetpack-external-media-header__filter"},"recent"===p.ID&&Object(k.createElement)(fe,{filters:j,isLoading:a,setFilters:v,canChangeMedia:!b}),"recent"!==p.ID&&"/"!==p.ID&&Object(k.createElement)(_e,{path:p,setPath:S}))),Object(k.createElement)(ue,{className:"jetpack-external-media-browser__google",key:E,media:n,isCopying:r,isLoading:a,nextPage:x,onCopy:A,pageHandle:o,multiple:i,setPath:S}))};var Ee=Q()((function(e){return e.isAuthenticated?Object(k.createElement)(Ce,e):Object(k.createElement)(ie,e)}));var xe=Q()((function(e){var t=e.media,n=e.isCopying,r=e.isLoading,a=e.pageHandle,o=e.multiple,i=e.copyMedia,c=e.getMedia,l=Object(k.useState)(Object(U.sample)(J)),s=C()(l,2),p=s[0],d=s[1],m=Object(k.useState)(""),h=C()(m,2),b=h[0],f=h[1],g=Object(k.useCallback)((function(e){i(e,re("copy","pexels"))}),[i]),j=Object(k.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p&&c(re("list","pexels",{number:20,path:"recent",search:p}),t)}),[c,p]),v=Object(k.useRef)(),_=Object(k.useCallback)((function(e){e.preventDefault(),f(p),j(e,!0),v.current=p}),[j,p]);Object(k.useEffect)(j,[]);var y=Object(k.useRef)(null);return Object(k.useEffect)((function(){if(y.current){var e=Array.from(y.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:y,className:"jetpack-external-media-header__pexels",onSubmit:_},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:_,type:"submit",disabled:!p.length||p===v.current||n},Object(u.__)("Search","jetpack"))),Object(k.createElement)(ue,{key:b,className:"jetpack-external-media-browser__pexels",media:t,isCopying:n,isLoading:r,nextPage:j,onCopy:g,pageHandle:a,multiple:o}))})),Se=[{id:"google_photos",label:Object(u.__)("Google Photos","jetpack"),icon:Object(k.createElement)(E.a,null),keyword:"google photos"},{id:"pexels",label:Object(u.__)("Pexels Free Photos","jetpack"),icon:Object(k.createElement)(E.d,null),keyword:"pexels"}];var Ae=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}),Se.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 Pe=function(e){var t=e.mediaProps,n=e.open,r=e.setSelectedSource,a=e.isFeatured,o=e.isReplace,i=t.render;if(a&&void 0===t.value)return i({open:n});if(o)return Object(k.createElement)(Ae,{originalButton:i,open:n,setSource:r});var c=Object(u.__)("Select Image","jetpack");return t.multiple&&(c=Object(u.__)("Select Images","jetpack")),t.allowedTypes.length>1&&(c=Object(u.__)("Select Media","jetpack")),Object(k.createElement)(k.Fragment,null,a&&i({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},c)},renderContent:function(){return Object(k.createElement)(G.NavigableMenu,{"aria-label":c},Object(k.createElement)(G.MenuGroup,null,Object(k.createElement)(G.MenuItem,{icon:"admin-media",onClick:n},Object(u.__)("Media Library","jetpack")),Object(k.createElement)(Ae,{open:n,setSource:r})))}}))},Ne=function(e){return e.unstableFeaturedImageFlow||e.modalClass&&-1!==e.modalClass.indexOf("featured-image")},Te=function(e){return void 0===e.multiple&&!Ne(e)};var Fe=function(e){var t,n=e.mediaProps,r=Object(k.useState)(null),a=C()(r,2),o=a[0],i=a[1],c="pexels"===(t=o)?xe:"google_photos"===t?Ee:null;return Object(k.createElement)(k.Fragment,null,Object(k.createElement)(Pe,g()({},e,{setSelectedSource:i,isReplace:Te(n),isFeatured:Ne(n)})),c&&Object(k.createElement)(c,g()({onClose:function(e){e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||i(null)}},n)))};n(172);if(Object(O.a)()&&"function"==typeof y.useBlockEditContext){Object(_.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(function(e){return function(t){var n=Object(y.useBlockEditContext)().name,r=t.render;if(["core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/tiled-gallery"].indexOf(n)>-1||function(e){return e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1}(t)){var a=t.allowedTypes,o=t.gallery,i=void 0!==o&&o,c=t.value,l=void 0===c?[]:c;a.indexOf("image")>-1&&!(i&&l.length>0)&&(r=function(e){return Object(k.createElement)(Fe,g()({},e,{mediaProps:t}))})}return Object(k.createElement)(e,g()({},t,{render:r}))}}),11),Object(_.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:a()({},e,{keywords:[].concat(v()(e.keywords),v()(Se.map((function(e){return e.keyword}))))})}))}var Be=n(45),Ie=n(62);function Me(){return Object(U.get)(Object(Ie.a)(),["allowedMimeTypes"],[])}function Le(e){if(!e)return!1;if(!Me())return!1;var t,n,r=(t="video")?Object(U.pickBy)(Me(),(function(e){return Object(U.startsWith)(e,"".concat(t,"/"))})):{},a=(n=r)?Object(U.flatten)(Object(U.map)(Object(U.keys)(n),(function(e){return e.split("|")}))):[];if("string"==typeof e){var o=e.split(".").pop();return o&&a.includes(o)}return"object"==typeof e&&(e.type&&Object(U.values)(r).includes(e.type))}function Re(e){var t=Object(Be.a)("videopress").unavailableReason;return e&&"core/cover"===e&&Object(m.b)()&&["missing_plan","unknown"].includes(t)}var De=n(79),ze=function(e){var t=e.name,n=e.show,r=e.align;return n?Object(k.createElement)("div",{className:"jetpack-upgrade-nudge-wrapper wp-block","data-align":r},Object(k.createElement)(De.a,{plan:"value_bundle",blockName:t,title:{knownPlan:Object(u.__)("To use a video in this block, upgrade to %(planName)s.","jetpack"),unknownPlan:Object(u.__)("To use a video in this block, upgrade to a paid plan.","jetpack")},subtitle:!1})):null},Ue=Object(k.createContext)(),He=function(e){var t=e.onFilesUpload,n=e.children;return Object(k.createElement)(Ue.Provider,{value:t},n)},qe=Object(V.createHigherOrderComponent)((function(e){return function(t){if("core/cover"!==Object(y.useBlockEditContext)().name)return Object(k.createElement)(e,t);var n=Object(k.useContext)(Ue),r=t.onError,a=Object(k.useCallback)((function(e){var t,a,o=null==e?void 0:null===(t=e[0])||void 0===t?void 0:null===(a=t.props)||void 0===a?void 0:a.children;return Le(o)?n([o]):r(e)}),[n,r]);return Object(k.createElement)("div",{className:"jetpack-cover-media-placeholder"},Object(k.createElement)(e,g()({},t,{onFilesPreUpload:n,onError:a})))}}),"JetpackCoverMediaPlaceholder"),Ve=Object(V.createHigherOrderComponent)((function(e){return function(t){var n=Object(y.useBlockEditContext)().name,r=Object(k.useRef)();if("core/cover"!==n)return Object(k.createElement)(e,t);var a=Object(k.useContext)(Ue);return Object(k.createElement)(e,g()({},t,{onFilesUpload:function(e){r.current=(null==e?void 0:e.length)?e[0]:null,a(e)},createNotice:function(e,n,a){if(Le(r.current))return r.current=null,null;t.createNotice(e,n,a)}}))}}),"JetpackCoverMediaReplaceFlow"),Ge=Object(V.createHigherOrderComponent)((function(e){return function(t){var n=Object(k.useState)(!1),r=C()(n,2),a=r[0],o=r[1],i=t.attributes;Object(k.useEffect)((function(){return o(!1)}),[i]);var c=Object(k.useCallback)((function(e){(null==e?void 0:e.length)&&Le(e[0])&&o(!0)})),l=Object(y.useBlockEditContext)().name;return Re(l)?Object(k.createElement)(k.Fragment,null,Object(k.createElement)(He,{onFilesUpload:c},Object(k.createElement)(ze,{show:a,name:l,align:i.align}),Object(k.createElement)(e,t))):Object(k.createElement)(e,t)}}),"JetpackCoverBlockEdit");n(175);Object(_.addFilter)("blocks.registerBlockType","core/cover",(function(e,t){return!e.isDeprecation&&Re(t)&&(Object(_.addFilter)("editor.MediaPlaceholder","jetpack/cover-edit-media-placeholder",qe),Object(_.addFilter)("editor.MediaReplaceFlow","jetpack/cover-media-replace-flow",Ve),Object(_.addFilter)("editor.BlockEdit","jetpack/cover-block-edit",Ge)),e}));var We=n(55);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 Ke=window.Jetpack_Editor_Initial_State.tracksUserData,$e=Ke.userid,Ze=Ke.username;We.a.initialize($e,Ze,{blog_id:window.Jetpack_Editor_Initial_State.wpcomBlogId})}},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(14),o=n.n(a),i=n(0),c=n(1),l=n(13),s=n(2),u=n(6),p=(n(183),n(15)),d=n.n(p),m=n(4),h=n(7),b=n.n(h),f=n(56),g=n.n(f),j=n(17),v=n(16),k=n(26),_=n(48),y=n(23),O=[{name:"contact-form",title:Object(c.__)("Contact Form","jetpack"),description:Object(c.__)("Add a contact form to your page.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Contact Us","jetpack"),element:"button"}]]},{name:"rsvp-form",title:Object(c.__)("RSVP Form","jetpack"),description:Object(c.__)("Add an RSVP form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Attending?","jetpack"),required:!0,options:[Object(c.__)("Yes","jetpack"),Object(c.__)("No","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("Other Details","jetpack")}],["jetpack/button",{text:Object(c.__)("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("A new RSVP from your website","jetpack")}},{name:"registration-form",title:Object(c.__)("Registration Form","jetpack"),description:Object(c.__)("Add a Registration form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Phone Number","jetpack")}],["jetpack/field-select",{label:Object(c.__)("How did you hear about us?","jetpack"),options:[Object(c.__)("Search Engine","jetpack"),Object(c.__)("Social Media","jetpack"),Object(c.__)("TV","jetpack"),Object(c.__)("Radio","jetpack"),Object(c.__)("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("Other Details","jetpack")}],["jetpack/button",{text:Object(c.__)("Send","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("A new registration from your website","jetpack")}},{name:"appointment-form",title:Object(c.__)("Appointment Form","jetpack"),description:Object(c.__)("Add an Appointment booking form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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(c.__)("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:Object(c.__)("Time","jetpack"),required:!0,options:[Object(c.__)("Morning","jetpack"),Object(c.__)("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("Notes","jetpack")}],["jetpack/button",{text:Object(c.__)("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:Object(c.__)("Feedback Form","jetpack"),description:Object(c.__)("Add a Feedback form to your page","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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 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(c.__)("Please rate our website","jetpack"),required:!0,options:[Object(c.__)("1 - Very Bad","jetpack"),Object(c.__)("2 - Poor","jetpack"),Object(c.__)("3 - Average","jetpack"),Object(c.__)("4 - Good","jetpack"),Object(c.__)("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:Object(c.__)("How could we improve?","jetpack")}],["jetpack/button",{text:Object(c.__)("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:Object(c.__)("New feedback received from your website","jetpack")}}],w=["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 C=Object(j.compose)([Object(v.withSelect)((function(e,t){var n=e("core/blocks"),r=n.getBlockType,a=n.getBlockVariations,o=n.getDefaultBlockVariation,i=e("core/block-editor").getBlocks,c=e("core").getSite,l=i(t.clientId);return{blockType:r&&r(t.name),defaultVariation:o&&o(t.name,"block"),variations:a&&a(t.name,"block"),innerBlocks:l,hasInnerBlocks:l.length>0,adminEmail:Object(m.get)(c&&c(),["email"])}})),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.adminEmail,a=e.hasInnerBlocks,o=e.replaceInnerBlocks,p=e.selectBlock,h=e.clientId,f=e.instanceId,j=e.className,v=e.blockType,y=e.variations,C=e.defaultVariation,E=t.to,x=t.subject,S=t.customThankyou,A=t.customThankyouMessage,P=t.customThankyouRedirect,N=Object(i.useState)(!1),T=d()(N,2),F=T[0],B=T[1],I=b()(j,"jetpack-contact-form"),M=function(e){e.attributes&&n(e.attributes),e.innerBlocks&&o(h,function e(t){return Object(m.map)(t,(function(t){var n=d()(t,3),r=n[0],a=n[1],o=n[2],i=void 0===o?[]:o;return Object(l.createBlock)(r,a,e(i))}))}(e.innerBlocks)),p(h)};Object(i.useEffect)((function(){a||l.registerBlockVariation||M(O[0])}));var L=function(e){return 0!==(e=e.trim()).length&&(!g.a.validate(e)&&{email:e})},R=function(e){if(0===e.target.value.length)return B(!1),void n({to:r});var t=e.target.value.split(",").map(L).filter(Boolean);t&&t.length&&B(t)},D=function(e){B(!1),n({to:e.trim()})},z=function(){var e=void 0!==E?E:r;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(s.TextControl,{"aria-describedby":"contact-form-".concat(f,"-email-").concat(F&&F.length>0?"error":"help"),label:Object(c.__)("Email address to send to","jetpack"),placeholder:Object(c.__)("name@example.com","jetpack"),onKeyDown:function(e){"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:R,onChange:D,help:Object(c.__)("You can enter multiple email addresses separated by commas.","jetpack")}),Object(i.createElement)(_.a,{isError:!0,id:"contact-form-".concat(f,"-email-error")},function(){if(F){if(1===F.length)return F[0]&&F[0].email?Object(c.sprintf)(Object(c.__)("%s is not a valid email address.","jetpack"),F[0].email):F[0];if(2===F.length)return Object(c.sprintf)(Object(c.__)("%s and %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(c.sprintf)(Object(c.__)("%s are not a valid email address.","jetpack"),e.join(", "))}return null}()),Object(i.createElement)(s.TextControl,{label:Object(c.__)("Email subject line","jetpack"),value:x,placeholder:Object(c.__)("Enter a subject","jetpack"),onChange:function(e){return n({subject:e})},help:Object(c.__)("Choose a subject line that you recognize as an email from your website.","jetpack")}),Object(i.createElement)(s.SelectControl,{label:Object(c.__)("On Submission","jetpack"),value:S,options:[{label:Object(c.__)("Show a summary of submitted fields","jetpack"),value:""},{label:Object(c.__)("Show a custom text message","jetpack"),value:"message"},{label:Object(c.__)("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:function(e){return n({customThankyou:e})}}),"message"===S&&Object(i.createElement)(s.TextareaControl,{label:Object(c.__)("Message Text","jetpack"),value:A,placeholder:Object(c.__)("Thank you for your submission!","jetpack"),onChange:function(e){return n({customThankyouMessage:e})}}),"redirect"===S&&Object(i.createElement)(s.BaseControl,{label:Object(c.__)("Redirect Address","jetpack"),id:"contact-form-".concat(f,"-thankyou-url")},Object(i.createElement)(u.URLInput,{id:"contact-form-".concat(f,"-thankyou-url"),value:P,className:"jetpack-contact-form__thankyou-redirect-url",onChange:function(e){return n({customThankyouRedirect:e})}})))};return!a&&l.registerBlockVariation?Object(i.createElement)("div",{className:I},Object(i.createElement)(u.__experimentalBlockVariationPicker,{icon:Object(m.get)(v,["icon","src"]),label:Object(m.get)(v,["title"]),instructions:Object(c.__)("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:y,allowSkip:!0,onSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;M(e)}})):Object(i.createElement)(i.Fragment,null,s.ToolbarGroup&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(s.ToolbarGroup,null,Object(i.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(i.createElement)(s.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:Object(c.__)("Edit Form Settings"),onClick:t,onKeyDown:function(n){e||n.keyCode!==k.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:Object(i.createElement)(s.Icon,{icon:"edit"})})}(e.isOpen,e.onToggle)},renderContent:function(){return z()}}))),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(c.__)("Form Settings","jetpack")},z())),Object(i.createElement)("div",{className:I},Object(i.createElement)(u.InnerBlocks,{allowedBlocks:w,templateInsertUpdatesSelection:!1})))})),E={subject:{type:"string",default:Object(c.__)("A new message from your website","jetpack")},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""}},x=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],S=[{attributes:o()({submit_button_text:{type:"string",default:Object(c.__)("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:Object(c.__)("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},E),migrate:function(e,t){var n=Object(m.omit)(e,x),r={text:e.submitButtonText||e.submit_button_text||Object(c.__)("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}],A=n(27),P=n.n(A),N=n(31),T=n(40);function F(e){var t=e.setAttributes,n=e.width;return Object(i.createElement)(s.BaseControl,{label:Object(c.__)("Field Width","jetpack"),help:Object(c.__)("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},Object(i.createElement)(s.ButtonGroup,{"aria-label":Object(c.__)("Field Width","jetpack")},[25,50,75,100].map((function(e){return Object(i.createElement)(s.Button,{key:e,isSmall:!0,isPrimary:e===n,onClick:function(){return t({width:e})}},e,"%")}))))}var B=function(e){var t=e.setAttributes,n=e.width,r=e.id,a=e.required;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(s.Toolbar,null,Object(i.createElement)(s.ToolbarButton,{title:Object(c.__)("Required","jetpack"),icon:Object(y.a)(Object(i.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(i.createElement)(u.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(c.__)("Field Settings","jetpack")},Object(i.createElement)(s.ToggleControl,{label:Object(c.__)("Field is required","jetpack"),className:"jetpack-field-label__required",checked:a,onChange:function(e){return t({required:e})},help:Object(c.__)("Does this field have to be completed for the form to be submitted?","jetpack")}),Object(i.createElement)(F,{setAttributes:t,width:n}))),Object(i.createElement)(u.InspectorAdvancedControls,null,Object(i.createElement)(s.TextControl,{label:Object(c.__)("Unique CSS ID","jetpack"),value:r,onChange:function(e){return t({id:e})},help:Object(c.__)("A unique ID that can be used in CSS or as an anchor.","jetpack")})))};function I(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(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"jetpack-field"},Object(i.createElement)(T.a,{required:r,label:a,setAttributes:o}),Object(i.createElement)(s.Disabled,null,Object(i.createElement)(s.TextControl,{type:n,placeholder:l,value:l,onChange:function(e){return o({placeholder:e})},title:Object(c.__)("Set the placeholder text","jetpack")}))),Object(i.createElement)(B,{id:t,required:r,width:u,setAttributes:o}))}var M=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(i.createElement)(e,P()({},t,{className:n}))}return Object(i.createElement)(e,t)}}),"withCustomClassName");function L(e){var t=e.id,n=e.required,r=e.label,a=e.setAttributes,o=e.placeholder,l=e.width;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"jetpack-field"},Object(i.createElement)(T.a,{required:n,label:r,setAttributes:a}),Object(i.createElement)(s.Disabled,null,Object(i.createElement)(s.TextareaControl,{placeholder:o,value:o,onChange:function(e){return a({placeholder:e})},title:Object(c.__)("Set the placeholder text","jetpack")}))),Object(i.createElement)(B,{id:t,required:n,setAttributes:a,width:l}))}Object(N.addFilter)("editor.BlockListBlock","jetpack/contact-form",M);var R=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(i.createElement)(s.BaseControl,{id:"jetpack-field-checkbox-".concat(n),className:"jetpack-field jetpack-field-checkbox",label:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:p}),Object(i.createElement)(T.a,{required:r,label:a,setAttributes:o}),Object(i.createElement)(B,{id:t,required:r,width:l,setAttributes:o}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(c.__)("Checkbox Settings","jetpack")},Object(i.createElement)(s.ToggleControl,{label:Object(c.__)("Checked by default","jetpack"),checked:p,onChange:function(e){return o({defaultValue:e?"true":""})}}))))})})),D=n(8),z=n.n(D),U=n(12),H=n.n(U),q=n(9),V=n.n(q),G=n(10),W=n.n(G),K=n(5),$=n.n(K),Z=n(11),J=n.n(Z),Y=function(e){function t(){var e,n;z()(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=W()(t)).call.apply(e,[this].concat(a)))).onChangeOption=n.onChangeOption.bind($()(n)),n.onKeyPress=n.onKeyPress.bind($()(n)),n.onDeleteOption=n.onDeleteOption.bind($()(n)),n.textInput=Object(i.createRef)(),n}return J()(t,e),H()(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(i.createElement)("li",{className:"jetpack-option"},r&&"select"!==r&&Object(i.createElement)("input",{className:"jetpack-option__type",type:r,disabled:!0}),Object(i.createElement)("input",{type:"text",className:"jetpack-option__input",value:n,placeholder:Object(c.__)("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),t&&Object(i.createElement)(s.IconButton,{className:"jetpack-option__remove",icon:"trash",label:Object(c.__)("Remove option","jetpack"),onClick:this.onDeleteOption}))}}]),t}(i.Component);var Q=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,h=Object(i.useState)(null),b=d()(h,2),f=b[0],g=b[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(i.createElement)(i.Fragment,null,Object(i.createElement)(s.BaseControl,{id:"jetpack-field-multiple-".concat(r),className:"jetpack-field jetpack-field-multiple",label:Object(i.createElement)(T.a,{required:a,label:o,setAttributes:l,isSelected:u,resetFocus:function(){return g(null)}})},Object(i.createElement)("ol",{className:"jetpack-field-multiple__list",id:"jetpack-field-multiple-".concat(r)},m.map((function(e,t){return Object(i.createElement)(Y,{type:n,key:t,option:e,index:t,onChangeOption:j,onAddOption:v,isInFocus:t===f&&u,isSelected:u})}))),u&&Object(i.createElement)(s.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:Object(c.__)("Insert option","jetpack"),onClick:v},Object(c.__)("Add option","jetpack"))),Object(i.createElement)(B,{id:t,required:a,setAttributes:l,width:p}))})),X=n(18),ee={title:Object(c.__)("Form","jetpack"),description:Object(c.__)("A simple way to get feedback from folks visiting your site.","jetpack"),icon:Object(y.a)(Object(i.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"})),keywords:[Object(c._x)("email","block search term","jetpack"),Object(c._x)("feedback","block search term","jetpack"),Object(c._x)("contact form","block search term","jetpack")],supports:{html:!1},attributes:E,edit:C,save:u.InnerBlocks.Content,variations:O,category:Object(X.a)()?"grow":"jetpack",deprecated:S},te={category:Object(X.a)()?"grow":"jetpack",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)}}]},save:function(){return null},example:{}},ne=function(e){var t=e.attributes,n=e.name;return null===t.label?Object(l.getBlockType)(n).title:t.label},re=function(e){return function(t){return Object(i.createElement)(I,{type:e,label:ne(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})}},ae=function(e){return function(t){return Object(i.createElement)(Q,{label:ne(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})}},oe=[{name:"field-text",settings:o()({},te,{title:Object(c.__)("Text","jetpack"),description:Object(c.__)("When you need just a small amount of text, add a text input.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:re("text")})},{name:"field-name",settings:o()({},te,{title:Object(c.__)("Name","jetpack"),description:Object(c.__)("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:re("text")})},{name:"field-email",settings:o()({},te,{title:Object(c.__)("Email","jetpack"),keywords:[Object(c.__)("e-mail","jetpack"),Object(c.__)("mail","jetpack"),"email"],description:Object(c.__)("Want to reply to folks? Add an email address input.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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"})),edit:re("email")})},{name:"field-url",settings:o()({},te,{title:Object(c.__)("Website","jetpack"),keywords:["url",Object(c.__)("internet page","jetpack"),"link"],description:Object(c.__)("Add an address input for a website.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:re("url")})},{name:"field-date",settings:o()({},te,{title:Object(c.__)("Date Picker","jetpack"),keywords:[Object(c.__)("Calendar","jetpack"),Object(c.__)("day month year","block search term","jetpack")],description:Object(c.__)("The best way to set a date. Add a date picker.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:re("text")})},{name:"field-telephone",settings:o()({},te,{title:Object(c.__)("Phone Number","jetpack"),keywords:[Object(c.__)("Phone","jetpack"),Object(c.__)("Cellular phone","jetpack"),Object(c.__)("Mobile","jetpack")],description:Object(c.__)("Add a phone number input.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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"})),edit:re("tel")})},{name:"field-textarea",settings:o()({},te,{title:Object(c.__)("Message","jetpack"),keywords:[Object(c.__)("Textarea","jetpack"),"textarea",Object(c.__)("Multiline text","jetpack")],description:Object(c.__)("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:function(e){return Object(i.createElement)(L,{label:ne(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()({},te,{title:Object(c.__)("Checkbox","jetpack"),keywords:[Object(c.__)("Confirm","jetpack"),Object(c.__)("Accept","jetpack")],description:Object(c.__)("Add a single checkbox.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.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 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(i.createElement)(R,{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()({},te.attributes,{label:{type:"string",default:""}})})},{name:"field-checkbox-multiple",settings:o()({},te,{title:Object(c.__)("Checkbox Group","jetpack"),keywords:[Object(c.__)("Choose Multiple","jetpack"),Object(c.__)("Option","jetpack")],description:Object(c.__)("People love options. Add several checkbox items.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{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:ae("checkbox"),attributes:o()({},te.attributes,{label:{type:"string",default:"Choose several"}})})},{name:"field-radio",settings:o()({},te,{title:Object(c.__)("Radio","jetpack"),keywords:[Object(c.__)("Choose","jetpack"),Object(c.__)("Select","jetpack"),Object(c.__)("Option","jetpack")],description:Object(c.__)("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:Object(y.a)(Object(i.createElement)(i.Fragment,null,Object(i.createElement)(s.Path,{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(i.createElement)(s.Circle,{cx:"12",cy:"12",r:"5"}))),edit:ae("radio"),attributes:o()({},te.attributes,{label:{type:"string",default:"Choose one"}})})},{name:"field-select",settings:o()({},te,{title:Object(c.__)("Select","jetpack"),keywords:[Object(c.__)("Choose","jetpack"),Object(c.__)("Dropdown","jetpack"),Object(c.__)("Option","jetpack")],description:Object(c.__)("Compact, but powerful. Add a select box with several items.","jetpack"),icon:Object(y.a)(Object(i.createElement)(s.Path,{d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:ae("select"),attributes:o()({},te.attributes,{label:{type:"string",default:"Select one"}})})}];Object(r.a)("contact-form",ee,oe)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(6),c=n(2),l=n(7),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)(i.InnerBlocks,{allowedBlocks:u,templateLock:!1,template:p}))},m=n(23),h=(n(186),n(153),n(8)),b=n.n(h),f=n(12),g=n.n(f),j=n(9),v=n.n(j),k=n(10),_=n.n(k),y=n(5),O=n.n(y),w=n(11),C=n.n(w),E=function(e){var t=e.attributes,n=t.address,r=t.addressLine2,o=t.addressLine3,i=t.city,c=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),i&&!(c||l)&&Object(a.createElement)("div",{className:"jetpack-address__city"},i),i&&(c||l)&&Object(a.createElement)("div",null,[Object(a.createElement)("span",{className:"jetpack-address__city"},i),", ",Object(a.createElement)("span",{className:"jetpack-address__region"},c)," ",Object(a.createElement)("span",{className:"jetpack-address__postal"},l)]),!i&&(c||l)&&Object(a.createElement)("div",null,[Object(a.createElement)("span",{className:"jetpack-address__region"},c)," ",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,i=t.region,c=t.postal,l=t.country,s=n?"".concat(n,","):"",u=r?"".concat(r,","):"",p=a?"".concat(a,","):"",d=o?"+".concat(o,","):"",m=i?"+".concat(i,","):"";m=c?"".concat(m,"+").concat(c):m;var h=l?"+".concat(l):"";return"https://www.google.com/maps/search/".concat(s).concat(u).concat(p).concat(d).concat(m).concat(h).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)(E,e)),!e.attributes.linkToGoogleMaps&&Object(a.createElement)(E,e));var t},A=function(e){function t(){var e,n;b()(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=_()(t)).call.apply(e,[this].concat(a)))).preventEnterKey=n.preventEnterKey.bind(O()(n)),n}return C()(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,h=t.linkToGoogleMaps,b=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":b}),v=Object(a.createElement)(c.ToggleControl,{label:Object(o.__)("Link address to Google Maps","jetpack"),checked:h,onChange:function(e){return f({linkToGoogleMaps:e})}});return Object(a.createElement)("div",{className:j},!b&&g&&S(this.props),(b||!g)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(i.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)(i.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)(i.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)(i.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)(i.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)(i.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)(i.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),P=n(18),N={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)(c.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)(c.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:Object(P.a)()?"grow":"jetpack",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},T=n(56),F=n.n(T),B=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("@")&&F.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)})))},I=function(e,t,n,r,o){var c=t.isSelected,l=t.attributes[e];return Object(a.createElement)("div",{className:"jetpack-".concat(e,c?"-block is-selected":"-block")},!c&&""!==l&&r(t),(c||""===l)&&Object(a.createElement)(i.PlainText,{value:l,placeholder:n,"aria-label":n,onChange:o}))},M=function(e){var t=e.setAttributes;return I("email",e,Object(o.__)("Email","jetpack"),B,(function(e){return t({email:e})}))},L={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)(c.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:Object(P.a)()?"grow":"jetpack",attributes:{email:{type:"string",default:""}},edit:M,save:B,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):"",i=r.replace(/\D/g,"");return/[0-9/+/(]/.test(r[0])?(o=o.slice(0,-1),"+"===r[0]&&(i="+"+i)):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(i)},r)]}(t))},D=function(e){var t=e.setAttributes;return I("phone",e,Object(o.__)("Phone number","jetpack"),R,(function(e){return t({phone:e})}))},z={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)(c.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:Object(P.a)()?"grow":"jetpack",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:D,save:R},U={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:Object(m.a)(Object(a.createElement)(c.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"})),category:Object(P.a)()?"grow":"jetpack",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)(i.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"}}]}},H=[{name:"address",settings:N},{name:"email",settings:L},{name:"phone",settings:z}];Object(r.a)("contact-info",U,H)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(1),o=n(32),i={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"}},c=n(14),l=n.n(c),s=n(3),u=n.n(s),p=n(0),d=n(7),m=n.n(d),h=n(6),b=n(17),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=!!h.__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 _(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.gradientValue,i=e.setBackgroundColor,c=e.setGradient,l=e.setTextColor,s=e.textColor,u=Object(p.createElement)(h.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:n,fallbackTextColor:r,isLargeText:!1,textColor:s.color});return v?Object(p.createElement)(h.__experimentalPanelColorGradientSettings,{settings:[{colorValue:s.color,label:Object(a.__)("Text Color","jetpack"),onColorChange:l},{colorValue:t.color,gradientValue:o,label:Object(a.__)("Background","jetpack"),onColorChange:i,onGradientChange:c}],title:Object(a.__)("Background & Text Color","jetpack")},u):Object(p.createElement)(h.PanelColorSettings,{colorSettings:[{value:s.color,onChange:l,label:Object(a.__)("Text Color","jetpack")},{value:t.color,onChange:i,label:Object(a.__)("Background","jetpack")}],title:Object(a.__)("Background & Text Color","jetpack")},u)}var y=n(16);n(178);var O=Object(b.compose)(Object(h.withColors)({backgroundColor:"background-color"},{textColor:"color"}),j)((function(e){var t,n=e.attributes,r=e.backgroundColor,o=e.className,i=e.clientId,c=e.fallbackBackgroundColor,s=e.fallbackTextColor,d=e.setAttributes,b=e.setBackgroundColor,g=e.setTextColor,j=e.textColor,O=n.borderRadius,w=n.element,C=n.placeholder,E=n.text;!function(e){var t=e.attributes,n=e.clientId,r=e.setAttributes,a=t.passthroughAttributes,o=Object(y.useSelect)((function(e){var r=e("core/block-editor"),o=(0,r.getBlockAttributes)((0,r.getBlockHierarchyRootClientId)(n)),i=Object(f.mapValues)(a,(function(e){return o[e]}));return{attributesToSync:Object(f.pickBy)(i,(function(e,n){return e!==t[n]}))}})).attributesToSync;Object(p.useEffect)((function(){Object(f.isEmpty)(o)||r(o)}),[o,r])}({attributes:n,clientId:i,setAttributes:d});var x=v?Object(h.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},S=x.gradientClass,A=x.gradientValue,P=x.setGradient,N=m()("wp-block-button",o),T=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)),F=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)(h.RichText,{allowedFormats:"input"===w?[]:void 0,className:T,disableLineBreaks:"input"===w,onChange:function(e){var t="input"===w?e.replace(/<br>/gim," "):e;d({text:t})},placeholder:C||Object(a.__)("Add text…","jetpack"),style:F,value:E,withoutInteractiveFormatting:!0}),Object(p.createElement)(h.InspectorControls,null,Object(p.createElement)(_,{backgroundColor:r,fallbackBackgroundColor:c,fallbackTextColor:s,gradientValue:A,setBackgroundColor:b,setGradient:P,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 C={title:Object(a.__)("Button","jetpack"),icon:w,category:"layout",keywords:[],supports:{html:!1,inserter:!1,align:["left","right"]},styles:[{name:"fill",label:Object(a.__)("Fill","jetpack"),isDefault:!0},{name:"outline",label:Object(a.__)("Outline","jetpack")}],attributes:i,edit:O,save:function(e){var t,n=e.attributes,r=e.blockName,a=e.uniqueId,o=n.backgroundColor,i=n.borderRadius,c=n.className,l=n.customBackgroundColor,s=n.customGradient,d=n.customTextColor,b=n.gradient,f=n.saveInPostContent,g=n.text,j=n.textColor,k=n.url;if(!f)return null;var _=Object(h.getColorClassName)("background-color",o),y=v?Object(h.__experimentalGetGradientClass)(b):void 0,O=Object(h.getColorClassName)("color",j),w=m()("wp-block-button","jetpack-submit-button",c,u()({},"wp-block-jetpack-".concat(r),r)),C=m()("wp-block-button__link",(t={"has-text-color":j||d},u()(t,O,O),u()(t,"has-background",o||b||l||s),u()(t,_,_),u()(t,y,y),u()(t,"no-border-radius",0===i),t)),E={background:s||void 0,backgroundColor:_||s||b?void 0:l,color:O?void 0:d,borderRadius:i?i+"px":void 0};return Object(p.createElement)("div",{className:w},Object(p.createElement)(h.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:k,id:a,rel:"noopener noreferrer",role:"button",style:E,tagName:"a",target:"_blank",value:g}))}};Object(r.a)("button",C)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(13),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(7),d=n.n(p),m=n(6);var h={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,i=e.customTextColor,c=e.eventId,l=e.text,s=e.textColor,p=e.url,h=Object(m.getColorClassName)("color",s),b=Object(m.getColorClassName)("background-color",n),f=d()("wp-block-button__link",(t={"has-text-color":s||i},u()(t,h,h),u()(t,"has-background",n||o),u()(t,b,b),u()(t,"no-border-radius",0===r),t)),g={backgroundColor:b?void 0:o,color:h?void 0:i,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(c),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)}},b=n(14),f=n.n(b),g=n(4);var j=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"],v=[h,{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(c.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,i=e.customTextColor,c=e.eventId,l=e.text,s=e.textColor,p=e.url,h=Object(m.getColorClassName)("color",s),b=Object(m.getColorClassName)("background-color",n),f=d()("wp-block-button__link",(t={"has-text-color":s||i},u()(t,h,h),u()(t,"has-background",n||o),u()(t,b,b),u()(t,"no-border-radius",0===r),t)),g={backgroundColor:b?void 0:o,color:h?void 0:i,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(c),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(8),_=n.n(k),y=n(12),O=n.n(y),w=n(9),C=n.n(w),E=n(10),x=n.n(E),S=n(5),A=n.n(S),P=n(11),N=n.n(P);function T(e,t){var n=Object(a.createElement)("a",{href:e},e);t(Object(c.createBlock)("core/paragraph",{content:Object(a.renderToString)(n)}))}function F(e){if(!e)return null;var t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}var B=n(34),I=n(22),M=n(125),L=n.n(M),R=n(63),D=n(54),z=(n(187),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,c=new Array(r),s=0;s<r;s++)c[s]=arguments[s];return n=C()(this,(e=x()(t)).call.apply(e,[this].concat(c))),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,i=r.style;if(e&&W!==e&&"modal"!==i){var c={eventId:F(e),url:e};Object(D.a)(c.url,n.setIsResolvingUrl).then((function(e){var t=Object(B.a)(l,f()({},c,{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,c=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)(i.Button,{isLink:!0,onClick:function(){return T(c,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&&!V.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)(i.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,i=t.setAttributes,c=[{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:L.a,alt:Object(o.__)("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:Object(o.__)("Button & Modal","jetpack")}];return Object(a.createElement)(R.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:c,onSelectStyle:i,activeStyle:e,attributes:n,viewportWidth:130})}},{key:"renderBlockControls",value:function(){var e=this;return Object(a.createElement)(m.BlockControls,null,Object(a.createElement)(i.Toolbar,null,Object(a.createElement)(i.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,c=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)(i.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:$}),notices:r},Object(a.createElement)("form",{onSubmit:this.submitForm},Object(a.createElement)("input",{type:"url",value:c,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)(i.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)(i.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)(i.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(i.withNotices)(z);var H=n(18),q={name:"jetpack/button",attributes:{element:"a",text:Object(o._x)("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},V=/^\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",K=Object(o.__)("Eventbrite Checkout","jetpack"),$={src:Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(a.createElement)(i.G,{id:"eventbrite-icon"},Object(a.createElement)(i.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"}))),foreground:"#555d66"},Z={title:K,description:Object(o.__)("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:$,category:Object(H.a)()?"embed":"jetpack",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&&(V.test(e.textContent)||G.test(e.textContent))},transform:function(e){return Object(c.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(19),a=n(14),o=n.n(a),i=n(4),c=n(30),l=n(8),s=n.n(l),u=n(12),p=n.n(u),d=n(9),m=n.n(d),h=n(10),b=n.n(h),f=n(5),g=n.n(f),j=n(11),v=n.n(j),k=n(3),_=n.n(k),y=n(0),O=n(21),w=n.n(O),C=n(1),E=n(2),x=n(6),S=n(7),A=n.n(S),P=(n(199),n(20)),N=n.n(P),T=n(26),F=n(17);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,i=void 0===o?[]:o;if("string"==typeof a.label&&(i=[].concat(N()(i),[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,b()(t).apply(this,arguments)),_()(g()(e),"select",(function(t){(e.props.completer.getOptionCompletion||{})(t),e.reset()})),_()(g()(e),"reset",(function(){e.setState(e.constructor.getInitialState())})),_()(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()})),_()(g()(e),"onKeyDown",(function(t){var n=e.state,r=n.isOpen,a=n.selectedIndex,o=n.filteredOptions;if(r){var i;switch(t.keyCode){case T.UP:i=(0===a?o.length:a)-1,e.setState({selectedIndex:i});break;case T.DOWN:i=(a+1)%o.length,e.setState({selectedIndex:i});break;case T.ENTER:e.select(o[a]);break;case T.LEFT:case T.RIGHT:case T.ESCAPE:return void e.reset();default:return}t.preventDefault(),t.stopPropagation()}})),e.debouncedLoadOptions=Object(i.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):[]}})),i=B(o),c=i.length===n.state.filteredOptions.length?n.state.selectedIndex:0;n.setState((r={},_()(r,"options",o),_()(r,"filteredOptions",i),_()(r,"selectedIndex",c),_()(r,"isOpen",i.length>0),r)),n.announce(i)}}))}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(C.sprintf)(Object(C._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(C.__)("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,c=r.completer,l=this.state,s=l.selectedIndex,u=l.filteredOptions,p=(u[s]||{}).key,d=void 0===p?"":p,m=c.className,h=u.length>0,b=h?"components-autocomplete-listbox-".concat(o):null,f=h?"components-autocomplete-item-".concat(o,"-").concat(d):null;return Object(y.createElement)("div",{className:"components-autocomplete"},a({isExpanded:h,listBoxId:b,activeId:f,onChange:t,onKeyDown:n}),h&&Object(y.createElement)(E.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},Object(y.createElement)("div",{id:b,role:"listbox",className:"components-autocomplete__results"},Object(i.map)(u,(function(t,n){return Object(y.createElement)(E.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}(y.Component),M=Object(F.compose)([E.withSpokenMessages,F.withInstanceId,E.withFocusOutside])(I),L=Object(C.__)("Add a marker…","jetpack"),R=function(e){function t(){var e;return s()(this,t),e=m()(this,b()(t).apply(this,arguments)),_()(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})),_()(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()}))})),_()(g()(e),"onReset",(function(){e.textRef.current.value=null})),e.textRef=Object(y.createRef)(),e.containerRef=Object(y.createRef)(),e.state={isEmpty:!0},e.autocompleter={name:"placeSearch",options:e.search,isDebounced:!0,getOptionLabel:function(e){return Object(y.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(y.createElement)("div",{ref:this.containerRef},Object(y.createElement)(E.BaseControl,{label:t,className:"components-location-search"},Object(y.createElement)(M,{completer:this.autocompleter,onReset:this.onReset},(function(t){var n=t.isExpanded,r=t.listBoxId,a=t.activeId,o=t.onChange,i=t.onKeyDown;return Object(y.createElement)(E.TextControl,{placeholder:L,ref:e.textRef,onChange:o,"aria-expanded":n,"aria-owns":r,"aria-activedescendant":a,onKeyDown:i})}))))}}]),t}(y.Component);R.defaultProps={onError:function(){}};var D=R,z=function(e){function t(){return s()(this,t),m()(this,b()(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(y.createElement)(E.Button,{className:"component__add-point"},Object(C.__)("Add marker","jetpack"),Object(y.createElement)(E.Popover,{className:"component__add-point__popover"},Object(y.createElement)(E.Button,{className:"component__add-point__close",onClick:t},Object(y.createElement)(E.Dashicon,{icon:"no"})),Object(y.createElement)(D,{onAddPoint:n,label:Object(C.__)("Add a location","jetpack"),apiKey:a,onError:r})))}}]),t}(y.Component);z.defaultProps={onAddPoint:function(){},onClose:function(){},onError:function(){}};var U=z,H=(n(200),function(e){function t(){var e;return s()(this,t),e=m()(this,b()(t).apply(this,arguments)),_()(g()(e),"onDeletePoint",(function(t){var n=parseInt(t.target.getAttribute("data-id")),r=e.props,a=r.points,o=r.onChange,i=a.slice(0);i.splice(n,1),o(i)})),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,i=a.slice(0);i[n][e]=t,o(i)}},{key:"render",value:function(){var e=this,t=this.props.points.map((function(t,n){return Object(y.createElement)(E.PanelBody,{title:t.placeTitle,key:t.id,initialOpen:!1},Object(y.createElement)(E.TextControl,{label:"Marker Title",value:t.title,onChange:function(t){return e.setMarkerField("title",t,n)}}),Object(y.createElement)(E.TextareaControl,{label:"Marker Caption",value:t.caption,rows:"3",onChange:function(t){return e.setMarkerField("caption",t,n)}}),Object(y.createElement)(E.Button,{"data-id":n,onClick:e.onDeletePoint,className:"component__locations__delete-btn"},Object(y.createElement)(E.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))}));return Object(y.createElement)("div",{className:"component__locations"},Object(y.createElement)(E.Panel,{className:"component__locations__panel"},t))}}]),t}(y.Component));H.defaultProps={points:Object.freeze([]),onChange:function(){}};var q=H,V=n(97),G=n(127),W=n.n(G),K=n(16),$=n(38),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,b()(t).apply(this,arguments)),_()(g()(e),"addPoint",(function(t){var n=e.props,r=n.attributes,a=n.setAttributes,o=r.points,i=o.slice(0),c=!1;o.map((function(e){e.id===t.id&&(c=!0)})),c||(i.push(t),a({points:i}),e.setState({addPointVisibility:!1}))})),_()(g()(e),"updateAlignment",(function(t){e.props.setAttributes({align:t}),setTimeout(e.mapRef.current.sizeMap,0)})),_()(g()(e),"updateAPIKeyControl",(function(t){e.setState({apiKeyControl:t.target.value})})),_()(g()(e),"updateAPIKey",(function(){var t=e.props.noticeOperations,n=e.state.apiKeyControl;t.removeAllNotices(),n&&e.apiCall(n,"POST")})),_()(g()(e),"removeAPIKey",(function(){e.apiCall(null,"DELETE")})),_()(g()(e),"onError",(function(t,n){var r=e.props.noticeOperations;r.removeAllNotices(),r.createErrorNotice(n)})),_()(g()(e),"onHeightChange",(function(t){var n=e.props,r=n.attributes,a=n.setAttributes,o=r.mapHeight,i=parseInt(t.target.value,10);isNaN(i)?i=null:null==o?i=e.mapRef.current.mapRef.current.offsetHeight:i<400&&(i=400),a({mapHeight:i}),setTimeout(e.mapRef.current.sizeMap,0)})),_()(g()(e),"onMapResize",(function(t,n,r,a){var o=e.props,i=o.onResizeStop,c=o.setAttributes;i(),c({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(y.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,i="wpcom"===a?"":n;e.setState({apiState:o,apiKey:n,apiKeyControl:i,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,i=t.notices,l=t.isSelected,s=t.instanceId,u=t.onResizeStart,p=a.mapDetails,d=a.points,m=a.zoom,h=a.mapCenter,b=a.markerColor,f=a.align,g=a.preview,j=a.scrollToZoom,v=a.mapHeight,k=a.showFullscreenButton,_=this.state,O=_.addPointVisibility,w=_.apiKey,S=_.apiKeyControl,P=_.apiKeySource,N=_.apiState,T=_.apiRequestOutstanding,F=Object(y.createElement)(y.Fragment,null,Object(y.createElement)(x.BlockControls,null,Object(y.createElement)(x.BlockAlignmentToolbar,{value:f,onChange:this.updateAlignment,controls:["center","wide","full"]}),Object(y.createElement)(E.Toolbar,null,Object(y.createElement)(E.IconButton,{icon:c.a.markerIcon,label:Object(C.__)("Add a marker","jetpack"),onClick:function(){return e.setState({addPointVisibility:!0})}}))),Object(y.createElement)(x.InspectorControls,null,Object(y.createElement)(x.PanelColorSettings,{title:Object(C.__)("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:b,onChange:function(e){return r({markerColor:e})},label:Object(C.__)("Marker Color","jetpack")}]}),Object(y.createElement)(E.PanelBody,{title:Object(C.__)("Map Settings","jetpack")},Object(y.createElement)(E.BaseControl,{label:Object(C.__)("Height in pixels","jetpack"),id:"block-jetpack-map-height-input-".concat(s)},Object(y.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(y.createElement)(E.RangeControl,{label:Object(C.__)("Zoom level","jetpack"),help:d.length>1&&Object(C.__)("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(y.createElement)(E.ToggleControl,{label:Object(C.__)("Show street names","jetpack"),checked:p,onChange:function(e){return r({mapDetails:e})}}),Object(y.createElement)(E.ToggleControl,{label:Object(C.__)("Scroll to zoom","jetpack"),help:Object(C.__)("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:j,onChange:function(e){return r({scrollToZoom:e})}}),Object(y.createElement)(E.ToggleControl,{label:Object(C.__)("Show Fullscreen Button","jetpack"),help:Object(C.__)("Allow your visitors to display the map in fullscreen.","jetpack"),checked:k,onChange:function(e){return r({showFullscreenButton:e})}})),d.length?Object(y.createElement)(E.PanelBody,{title:Object(C.__)("Markers","jetpack"),initialOpen:!1},Object(y.createElement)(q,{points:d,onChange:function(e){r({points:e})}})):null,Object(y.createElement)(E.PanelBody,{title:Object(C.__)("Mapbox Access Token","jetpack"),initialOpen:!1},Object(y.createElement)(E.TextControl,{help:"wpcom"===P&&Object(y.createElement)(y.Fragment,null,Object(C.__)("You can optionally enter your own access token.","jetpack")," ",Object(y.createElement)(E.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},Object(C.__)("Find it on Mapbox","jetpack"))),label:Object(C.__)("Mapbox Access Token","jetpack"),value:S,onChange:function(t){return e.setState({apiKeyControl:t})}}),Object(y.createElement)(E.ButtonGroup,null,Object(y.createElement)(E.Button,{type:"button",onClick:this.updateAPIKey,disabled:!S||S===w,isDefault:!0},Object(C.__)("Update Token","jetpack")),Object(y.createElement)(E.Button,{type:"button",onClick:this.removeAPIKey,disabled:"wpcom"===P,isDefault:!0},Object(C.__)("Remove Token","jetpack")))))),B=Object(y.createElement)(E.Placeholder,{icon:c.a.icon},Object(y.createElement)(E.Spinner,null)),I=Object(y.createElement)(y.Fragment,null,Object(C.__)("To use the map block, you need an Access Token.","jetpack"),Object(y.createElement)("br",null),Object(y.createElement)(E.ExternalLink,{href:"https://www.mapbox.com"},Object(C.__)("Create an account or log in to Mapbox.","jetpack")),Object(y.createElement)("br",null),Object(C.__)("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),M=Object(y.createElement)(E.Placeholder,{icon:c.a.icon,label:Object(C.__)("Map","jetpack"),notices:i,instructions:I},Object(y.createElement)(y.Fragment,null,Object(y.createElement)("form",null,Object(y.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:T,placeholder:Object(C.__)("Paste Token Here","jetpack"),value:S,onChange:this.updateAPIKeyControl}),Object(y.createElement)(E.Button,{isLarge:!0,isSecondary:!0,disabled:T||!S||S.length<1,onClick:this.updateAPIKey},Object(C.__)("Set Token","jetpack"))))),L=l&&d.length<=1,R=Object($.a)(c.a.styles,a.className),D=Object(y.createElement)(y.Fragment,null,F,Object(y.createElement)("div",{className:n},Object(y.createElement)(E.ResizableBox,{className:A()({"is-selected":l}),size:{height:v||"auto",width:"100%"},grid:[10,10],showHandle:l,minHeight:400,enable:Z,onResizeStart:u,onResizeStop:this.onMapResize},Object(y.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},Object(y.createElement)(V.a,{ref:this.mapRef,scrollToZoom:L,showFullscreenButton:k,mapStyle:R||"default",mapDetails:p,mapHeight:v,points:d,zoom:m,mapCenter:h,markerColor:b,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(y.createElement)(U,{onAddPoint:this.addPoint,onClose:function(){return e.setState({addPointVisibility:!1})},apiKey:w,onError:this.onError,tagName:"AddPoint"})))))),z=c.a.styles.find((function(e){return e.name===R})),H=Object(y.createElement)("div",null,Object(y.createElement)("img",{alt:Object(C.__)("Map Preview","jetpack"),src:z?z.preview:W.a}));return Object(y.createElement)(y.Fragment,null,o,g&&H,!g&&0===N&&B,!g&&1===N&&M,!g&&2===N&&D)}}]),t}(y.Component),Y=Object(F.compose)([E.withNotices,Object(K.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,b()(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,i=e.mapCenter,l=e.markerColor,s=e.scrollToZoom,u=e.mapHeight,p=e.showFullscreenButton,d=Object($.a)(c.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(y.createElement)("li",{key:t},Object(y.createElement)("a",{href:a},e.title))})),h=t?"align".concat(t):null;return Object(y.createElement)("div",{className:h,"data-map-style":d,"data-map-details":r,"data-points":JSON.stringify(a),"data-zoom":o,"data-map-center":JSON.stringify(i),"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(y.createElement)("ul",null,m))}}]),t}(y.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(i.omit)(e,"mapStyle"),{className:t})},save:function(e){function t(){return s()(this,t),m()(this,b()(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,i=e.mapCenter,c=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(y.createElement)("li",{key:t},Object(y.createElement)("a",{href:a},e.title))})),d=t?"align".concat(t):null;return Object(y.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(i),"data-marker-color":c,"data-scroll-to-zoom":l||null,"data-map-height":s||null,"data-show-fullscreen-button":u||null},a.length>0&&Object(y.createElement)("ul",null,p))}}]),t}(y.Component)},ee=(n(156),n(201),c.a.name),te={title:c.a.title,icon:c.a.icon,category:c.a.category,keywords:c.a.keywords,description:c.a.description,attributes:c.a.attributes,supports:c.a.supports,styles:c.a.styles,getEditWrapperProps:function(e){var t=e.align;if(-1!==c.a.validAlignments.indexOf(t))return{"data-align":t}},edit:Y,save:Q,example:c.a.example,deprecated:[{attributes:Object(i.omit)(c.a.attributes,"showFullscreenButton"),migrate:function(e){return o()({},e,{showFullscreenButton:!0})},save:Q},X]};Object(r.a)(ee,te)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c={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"}},l=n(4);var 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"]'))}},{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,i=t.customTextButtonColor,c=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(i,'" submit_button_text="').concat(c,'" submit_button_classes="').concat(r,'" show_subscribers_total="').concat(n,'" ]'))}}],u=n(14),p=n.n(u),d=n(3),m=n.n(d),h=n(15),b=n.n(h),f=n(7),g=n.n(f),j=n(21),v=n.n(j),k=n(6),_=n(17),y=(n(161),n(34)),O=window.getComputedStyle,w=!!k.__experimentalUseGradient,C=Object(i.withFallbackStyles)((function(e,t){var n=t.buttonBackgroundColor,r=t.textColor,a=n&&n.color,o=r&&r.color,i=e.querySelector('[contenteditable="true"]');return{fallbackButtonBackgroundColor:a||!e?void 0:O(i).backgroundColor,fallbackTextColor:o||!e?void 0:O(i).color}}));var E=Object(_.compose)([Object(k.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),Object(k.withFontSizes)("fontSize"),C])((function(e){var t,n,r,s=e.className,u=e.attributes,d=e.setAttributes,h=e.emailFieldBackgroundColor,f=e.buttonBackgroundColor,j=e.setButtonBackgroundColor,_=e.fallbackButtonBackgroundColor,O=e.textColor,C=e.fallbackTextColor,E=e.setTextColor,x=e.borderColor,S=e.fontSize,A=Object(y.a)(c,u);Object(l.isEqual)(A,u)||d(A);var P,N,T=A.borderRadius,F=A.borderWeight,B=A.padding,I=A.spacing,M=A.submitButtonText,L=A.subscribePlaceholder,R=A.showSubscribersTotal,D=A.buttonOnNewLine,z=Object(a.useState)(""),U=b()(z,2),H=U[0],q=U[1],V=Object(a.useState)(""),G=b()(V,2),W=G[0],K=G[1],$=w?Object(k.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},Z=w?Object(k.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},J=(t={"no-border-radius":0===T},m()(t,S.class,S.class),m()(t,"has-text-color",O.color),m()(t,O.class,O.class),t),Y=p()({},J,(n={"has-background":h.color||$.gradientValue},m()(n,h.class,!$.gradientValue&&h.class),m()(n,$.gradientClass,$.gradientClass),n)),Q=p()({},J,(r={"has-background":f.color||Z.gradientValue},m()(r,f.class,!Z.gradientValue&&f.class),m()(r,Z.gradientClass,Z.gradientClass),r)),X=function(e){return e||10},ee={color:O.color,borderColor:x.color,borderRadius:T?T+"px":"0px",borderWidth:F?F+"px":"1px",fontSize:S.size?S.size+"px":"16px",padding:(P=B,N=P||15,N+"px "+Math.round(1.5*N)+"px "+N+"px "+Math.round(1.5*N)+"px")},te=p()({},ee,{},!h.color&&$.gradientValue?{background:$.gradientValue}:{backgroundColor:h.color}),ne=p()({},ee,{},!f.color&&Z.gradientValue?{background:Z.gradientValue}:{backgroundColor:f.color},{},D?{marginTop:X(I)+"px"}:{marginLeft:X(I)+"px"});return Object(a.useEffect)((function(){v()({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)),K(e.count)):(q(Object(o.__)("Subscriber count unavailable","jetpack")),K(0))}))}),[]),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(k.InspectorControls,null,w&&Object(a.createElement)(k.__experimentalPanelColorGradientSettings,{title:Object(o.__)("Color Settings","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:f.color,onColorChange:j,gradientValue:Z.gradientValue,onGradientChange:Z.setGradient,label:Object(o.__)("Button Background Color","jetpack")},{colorValue:O.color,onColorChange:E,label:Object(o.__)("Button Text Color","jetpack")},{colorValue:x.color,onColorChange:function(e){d({borderColor:e,customBorderColor:e})},label:Object(o.__)("Border Color","jetpack")}],initialOpen:!0},Object(a.createElement)(k.ContrastChecker,{fontSize:S.size,textColor:O.color,backgroundColor:h.color,fallbackButtonBackgroundColor:_,fallbackTextColor:C})),!w&&Object(a.createElement)(k.PanelColorSettings,{title:Object(o.__)("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:f.color,onChange:j,label:Object(o.__)("Button Background Color","jetpack")},{value:O.color,onChange:E,label:Object(o.__)("Button Text Color","jetpack")},{value:x.color,onColorChange:function(e){d({borderColor:e,customBorderColor:e})},label:Object(o.__)("Border Color","jetpack")}],initialOpen:!1},Object(a.createElement)(k.ContrastChecker,{fontSize:S.size,textColor:O.color,backgroundColor:h.color,fallbackButtonBackgroundColor:_,fallbackTextColor:C})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Text Settings"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},Object(a.createElement)(k.FontSizePicker,{withSlider:!0,value:S.size,onChange:function(e){var t=e||16;d({fontSize:t,customFontSize:t})}})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Border Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},Object(a.createElement)(i.RangeControl,{value:T,label:Object(o.__)("Border Radius","jetpack"),min:0,max:50,initialPosition:0,allowReset:!0,onChange:function(e){return d({borderRadius:e})}}),Object(a.createElement)(i.RangeControl,{value:F,label:Object(o.__)("Border Weight","jetpack"),min:0,max:15,initialPosition:1,allowReset:!0,onChange:function(e){return d({borderWeight:e})}})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Spacing Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},Object(a.createElement)(i.RangeControl,{value:B,label:Object(o.__)("Space Inside","jetpack"),min:5,max:50,initialPosition:15,allowReset:!0,onChange:function(e){return d({padding:e})}}),Object(a.createElement)(i.RangeControl,{value:I,label:Object(o.__)("Space Between","jetpack"),min:0,max:50,initialPosition:10,allowReset:!0,onChange:function(e){return d({spacing:e})}})),Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Display Settings"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Show subscriber count","jetpack"),checked:R,onChange:function(){d({showSubscribersTotal:!R})},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)(i.ToggleControl,{label:Object(o.__)("Place button on new line","jetpack"),checked:D,onChange:function(){d({buttonOnNewLine:!D})}}))),Object(a.createElement)("div",{className:g()(s,"wp-block-jetpack-subscriptions__supports-newline",D?"wp-block-jetpack-subscriptions__use-newline":void 0,R?"wp-block-jetpack-subscriptions__show-subs":void 0)},Object(a.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},Object(a.createElement)(i.TextControl,{placeholder:L,disabled:!0,className:g()(Y,"wp-block-jetpack-subscriptions__textfield"),style:te}),Object(a.createElement)(k.RichText,{className:g()(Q,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:function(e){return d({submitButtonText:e})},style:ne,value:M,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),R&&Object(a.createElement)("p",{className:"wp-block-jetpack-subscriptions__subscount"},H)))}));var x=n(18),S={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:Object(a.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(i.Rect,{x:"4.75",y:"6.75",width:"14.5",height:"10.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),Object(a.createElement)(i.Path,{d:"M19 7L13.3609 12.2363C12.5935 12.9489 11.4065 12.9489 10.6391 12.2363L5 7",stroke:"black",strokeWidth:"1.5",strokeLinejoin:"bevel",fill:"none"})),category:Object(x.a)()?"grow":"jetpack",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:c,edit:E,save:function(e){var t=e.className,n=e.attributes,r=n.subscribePlaceholder,o=n.showSubscribersTotal,i=n.buttonOnNewLine,c=n.submitButtonText,l=n.emailFieldBackgroundColor,s=n.customEmailFieldBackgroundColor,u=n.emailFieldGradient,p=n.customEmailFieldGradient,d=n.buttonBackgroundColor,m=n.customButtonBackgroundColor,h=n.buttonGradient,b=n.customButtonGradient,f=n.textColor,j=n.customTextColor,v=n.fontSize,_=n.customFontSize,y=n.borderRadius,O=n.borderWeight,w=n.borderColor,C=n.customBorderColor,E=n.padding,x=n.spacing,S=!!k.__experimentalGetGradientClass,A=Object(k.getColorClassName)("color",f),P=Object(k.getFontSizeClass)(v),N=Object(k.getColorClassName)("border-color",w),T=Object(k.getColorClassName)("background-color",d),F=S?Object(k.__experimentalGetGradientClass)(h):void 0,B=Object(k.getColorClassName)("background-color",l),I=S?Object(k.__experimentalGetGradientClass)(u):void 0,M=g()(0===y?"no-border-radius":void 0,P,N),L=g()(M,f?"has-text-color":void 0,A,d||h?"has-background":void 0,T,F),R=g()(M,B,I),D=!B&&p?p:s,z=!T&&b?b:m;return Object(a.createElement)("div",{className:g()(t,"wp-block-jetpack-subscriptions__supports-newline",i?"wp-block-jetpack-subscriptions__use-newline":void 0,o?"wp-block-jetpack-subscriptions__show-subs":void 0)},Object(a.createElement)(a.RawHTML,null,'\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="'.concat(r,'"\n\t\t\t\tshow_subscribers_total="').concat(o,'"\n\t\t\t\tbutton_on_newline="').concat(i,'"\n\t\t\t\tsubmit_button_text="').concat(c,'"\n\t\t\t\tcustom_background_emailfield_color="').concat(D,'"\n\t\t\t\tcustom_background_button_color="').concat(z,'"\n\t\t\t\tcustom_text_button_color="').concat(j,'"\n\t\t\t\tcustom_font_size="').concat(_||16,'"\n\t\t\t\tcustom_border_radius="').concat(y||0,'"\n\t\t\t\tcustom_border_weight="').concat(O||1,'"\n\t\t\t\tcustom_border_color="').concat(C,'"\n\t\t\t\tcustom_padding="').concat(E||15,'"\n\t\t\t\tcustom_spacing="').concat(x||10,'"\n\t\t\t\tsubmit_button_classes="').concat(L,'"\n\t\t\t\temail_field_classes="').concat(R,'"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]')))},example:{attributes:{}},deprecated:s};Object(r.a)("subscriptions",S)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i={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}},c=n(20),l=n.n(c),s=n(3),u=n.n(s),p=n(15),d=n.n(p),m=n(7),h=n.n(m),b=n(4),f=n(6),g=n(2),j=n(34),v=n(80),k=n(21),_=n.n(k);var y=n(16),O=n(28),w=n(61);function C(e){var t=e.src,n=e.alt,r=Object(a.useState)(!1),o=d()(r,2),i=o[0],c=o[1],l=Object(a.useState)("auto"),s=d()(l,2),u=s[0],p=s[1],m=Object(a.useRef)(),b=function(){c(!0),p("auto")};Object(a.useEffect)((function(){var e=t;if(e){var n=new window.Image;n.src=e,n.onload=b}m.current&&p(m.current.parentNode.getBoundingClientRect().width)}),[t]);var f=h()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),g=i?{}:{height:u},j=h()({"is-loaded":i});return Object(a.createElement)("span",{style:g,className:f},Object(a.createElement)("img",{alt:n,className:j,ref:m,src:t}))}n(197);var E=Object(g.withNotices)((function(e){var t=e.attributes,n=e.className,r=e.isSelected,c=e.noticeOperations,s=e.noticeUI,p=e.setAttributes,m=t.accessToken,k=t.align,E=t.columns,x=t.count,S=t.instagramUser,A=t.isStackedOnMobile,P=t.spacing;Object(a.useEffect)((function(){var e=Object(j.a)(i,t);Object(b.isEqual)(e,t)||p(e)}),[t,p]);var N,T,F,B=Object(a.useState)(m),I=d()(B,2),M=I[0],L=I[1],R=function(){var e=Object(y.useSelect)((function(e){return{isAutoDraft:"auto-draft"===e("core/editor").getCurrentPost().status}})).isAutoDraft,t=Object(y.useDispatch)("core/editor").savePost,n=Object(a.useState)(),r=d()(n,2),o=r[0],i=r[1],c=Object(a.useState)(!1),l=d()(c,2),s=l[0],u=l[1],p=Object(w.a)();return Object(a.useEffect)((function(){p||o||s||(e?t():(u(!0),_()({path:Object(O.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((function(e){i(e),u(!1)}))))}),[p,e,s,t,o]),{isRequestingWpcomConnectUrl:s,wpcomConnectUrl:o}}(),D=R.isRequestingWpcomConnectUrl,z=R.wpcomConnectUrl,U=function(e){var t=e.accessToken,n=e.noticeOperations,r=e.setAttributes,i=e.setSelectedAccount,c=Object(a.useState)([]),l=d()(c,2),s=l[0],u=l[1],p=Object(a.useState)(!1),m=d()(p,2),h=m[0],f=m[1];return Object(a.useEffect)((function(){t&&(n.removeAllNotices(),f(!0),_()({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(b.isArray)(a))return n.createErrorNotice(Object(o.__)("An error occurred. Please try again later.","jetpack")),u([]),r({accessToken:void 0,instagramUser:void 0}),void i(void 0);Object(b.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}),i(void 0)})))}),[t,n,r,i]),{images:s,isLoadingGallery:h,setImages:u}}({accessToken:m,noticeOperations:c,setAttributes:p,setSelectedAccount:L}),H=U.images,q=U.isLoadingGallery,V=U.setImages,G=function(e){var t=e.accessToken,n=e.noticeOperations,r=e.selectedAccount,i=e.setAttributes,c=e.setImages,l=e.setSelectedAccount,s=Object(a.useState)(!1),u=d()(s,2),p=u[0],m=u[1],h=Object(a.useState)(!1),f=d()(h,2),g=f[0],j=f[1],k=Object(a.useState)([]),y=d()(k,2),O=y[0],w=y[1];return Object(a.useEffect)((function(){t||(j(!0),_()({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(b.find)(O,{token:r})||l(void 0)}),[r,l,O]),{connectToService:function(){n.removeAllNotices(),m(!0),_()({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();i({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(),i({accessToken:void 0,instagramUser:void 0}),c([])},isConnecting:p,isRequestingUserConnections:g,userConnections:O}}({accessToken:m,noticeOperations:c,selectedAccount:M,setAttributes:p,setImages:V,setSelectedAccount:L}),W=G.connectToService,K=G.disconnectFromService,$=G.isConnecting,Z=G.isRequestingUserConnections,J=G.userConnections,Y=Object(w.a)(),Q=x>H.length?H.length:x,X=!q&&(!m||Object(b.isEmpty)(H)),ee=!X,te=m&&q&&Object(b.isEmpty)(H),ne=!X&&!te,re=h()(n,u()({},"align".concat(k),k)),ae=h()("wp-block-jetpack-instagram-gallery__grid","wp-block-jetpack-instagram-gallery__grid-columns-".concat(E),{"is-stacked-on-mobile":A}),oe={gridGap:P},ie={padding:P},ce=function(){M&&"jetpack-new-instagram-connection"!==M?p({accessToken:M,instagramUser:Object(b.find)(J,{token:M}).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,T=[].concat(l()(Object(b.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"}]),F=$||Z||N&&!M,Object(a.createElement)("div",null,N&&Object(a.createElement)(g.RadioControl,{label:Object(o.__)("Select your Instagram account:","jetpack"),onChange:function(e){return L(e)},options:T,selected:M}),"jetpack-new-instagram-connection"===M&&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:F,isLarge:!0,isPrimary:!0,onClick:ce},$&&Object(o.__)("Connecting…","jetpack"),Z&&Object(o.__)("Loading your connections…","jetpack"),!$&&!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(b.times)(r?x:Q,(function(e){return Object(a.createElement)("span",{className:h()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:ie},function(e){if(H[e]){var n=H[e];return Object(a.createElement)(C,{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 K(m)}},Object(o.__)("Disconnect your account","jetpack")))),Object(a.createElement)(g.PanelBody,{title:Object(o.__)("Display Settings","jetpack")},function(){var e=H.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:E,onChange:function(e){return p({columns:e})},min:1,max:6}),Object(a.createElement)(g.RangeControl,{label:Object(o.__)("Image Spacing (px)","jetpack"),value:P,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(18),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:"instagram",category:Object(x.a)()?"embed":"jetpack",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:i,edit:E,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(19),a=n(1),o=n(13),i=n(32),c={backgroundColor:{type:"string",default:"ffffff",validator:i.a},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.a},textColor:{type:"string",default:"4D5055",validator:i.a},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:function(e){return!e||e.startsWith("https://calendly.com/")}}},l=n(14),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:i.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:i.a},textColor:{type:"string",default:"4D5055",validator:i.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:i.a},customTextButtonColor:{type:"string",validator:i.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)}},h=n(15),b=n.n(h),f=(n(108),n(123)),g=n.n(f),j=n(6),v=n(2),k=n(16),_=(n(109),n(152),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.G,{fill:"none",fillRule:"evenodd"},Object(u.createElement)(v.Rect,{height:"20.956522",rx:"3",stroke:"#656a74",strokeWidth:"2",width:"20.956522",x:"1",y:"2.043478"}),Object(u.createElement)(v.Rect,{fill:"#656a74",height:"4.869565",rx:"1",width:"2",x:"6.565217"}),Object(u.createElement)(v.Rect,{fill:"#656a74",height:"4.869565",rx:"1",width:"2",x:"14.652174"}),Object(u.createElement)(v.Path,{d:"m14.6086957 10.0869565c-.6956522-.57971012-1.6231885-.8695652-2.7826087-.8695652-1.7391305 0-3.47826091 1.5652174-3.47826091 3.6521739s1.73913041 3.6521739 3.47826091 3.6521739c1.1594202 0 2.0869565-.3478261 2.7826087-1.0434782",stroke:"#656a74"})))),y=n(34),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"),i=r.get("text_color"),c=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(c)&&(t.backgroundColor=a),o&&o.match(c)&&(t.primaryColor=o),i&&i.match(c)&&(t.textColor=i),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[1]:(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 i=function(e){var t=e.match(/color: '([^']*?)'/);if(t)return t[1]}(e);i&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=i)}return n}}},C=n(63),E=n(54);var x=Object(v.withNotices)((function(e){var t=e.attributes,n=e.className,r=e.clientId,i=e.name,l=e.noticeOperations,d=e.noticeUI,m=e.setAttributes,h=Object(o.getBlockDefaultClassName)(i),f=Object(y.a)(c,t);Object(p.isEqual)(f,t)||m(f);var O=f.backgroundColor,x=f.submitButtonText,S=f.hideEventTypeDetails,N=f.primaryColor,T=f.textColor,F=f.style,B=f.url,I=Object(u.useState)(""),M=b()(I,2),L=M[0],R=M[1],D=Object(u.useState)(!1),z=b()(D,2),U=z[0],H=z[1],q=Object(u.useState)({}),V=b()(q,2),G=V[0],W=V[1],K=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"!==F&&Object(E.a)(B,H).catch((function(){m({url:void 0}),K()}))}),[]);var $,Z=function(e){if(e){e.preventDefault();var t=w(L);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)})),W(t.buttonAttributes)}Object(E.a)(t.url,H).then((function(){var e=Object(y.a)(c,t);m(e),l.removeAllNotices()})).catch((function(){m({url:void 0}),K()}))}else K()}else K()},J=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("form",{onSubmit:Z},Object(u.createElement)("input",{type:"text",id:"embedCode",onChange:function(e){return R(e.target.value)},placeholder:Object(a.__)("Calendly web address or embed code…","jetpack"),value:L,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(h,"-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")))),Y=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"))),Q=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:_}),notices:d},J),X=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"".concat(h,"-overlay")}),Object(u.createElement)("iframe",{src:($=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:T}),"".concat(B,"?").concat($)),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),ee=Object(u.createElement)(j.InnerBlocks,{template:[[P.name,s()({},P.attributes,{},G,{passthroughAttributes:{url:"url"}})]],templateLock:"all"}),te=Object(u.createElement)(u.Fragment,null,Object(u.createElement)("a",{style:{alignSelf:"flex-start",border:"none"},className:"wp-block-button__link"},x)),ne=[{value:"inline",label:Object(a.__)("Inline","jetpack")},{value:"link",label:Object(a.__)("Link","jetpack")}],re=Object(u.createElement)(u.Fragment,null,B&&Object(u.createElement)(C.a,{clientId:r,styleOptions:ne,onSelectStyle:m,activeStyle:F,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:Z,className:"".concat(h,"-embed-form-sidebar")},Object(u.createElement)("input",{type:"text",id:"embedCode",onChange:function(e){return R(e.target.value)},placeholder:Object(a.__)("Calendly web address or embed code…","jetpack"),value:L,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(h,"-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(U)return Y;var ae,oe="".concat(n," calendly-style-").concat(F);return Object(u.createElement)("div",{className:oe},re,B?"inline"===F?X:ae?te:ee:Q)}));var S=n(18),A="https://calendly.com/wordpresscom/jetpack-block-example",P={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:_,category:Object(S.a)()?"grow":"jetpack",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:c,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:A},innerBlocks:[P]},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(19),a=n(0),o=n(1),i=n(13),c=n(16),l=n(4),s=function(e){return e.map((function(e){return e.value}))},u=[{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"}],p=s(u),d=function(e){return Object(l.compact)([{value:"standard",label:Object(o.__)("Standard (224 x 301 pixels)","jetpack")},{value:"tall",label:Object(o.__)("Tall (288 x 490 pixels)","jetpack")},{value:"wide",label:Object(o.__)("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&{value:"button",label:Object(o.__)("Button (210 x 113 pixels)","jetpack")}])},m=function(e){return s(d(e))},h=Object(c.select)("core/block-editor").getSettings().siteLocale,b=!Object(l.isEmpty)(h)&&p.includes(h)?h:"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:b,type:"string",validValues:p},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}},g=n(3),j=n.n(g),v=n(15),k=n.n(v),_=(n(108),n(7)),y=n.n(_),O=n(6),w=n(2),C=(n(118),Object(a.createElement)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},Object(a.createElement)(w.Path,{fill:"#555d66",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"}))),E=n(22),x=n(27),S=n.n(x),A=/^\s*(http[s]?:\/\/|\<script)/;function P(e){var t=Object(a.useState)(""),n=k()(t,2),r=n[0],i=n[1],c=function(e,t){var n=Object(a.useState)([]),r=k()(n,2),o=r[0],i=r[1],c=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 i(Object(l.unionBy)(o,e.items,"rid"))}))}),500),[o]);return Object(a.useEffect)((function(){Object(l.isEmpty)(e)||A.test(e)||c(e)}),[e]),o}(r,20),s=Object(a.useState)(e.rids||[]),u=k()(s,2),p=u[0],d=u[1],m=/^(\d+)$|\(\#(\d+)\)$/,h=c.filter((function(e){return p.indexOf(e.rid.toString())})).map((function(e){return e.name+" (#".concat(e.rid,")")})),b=Object(a.createElement)(w.FormTokenField,S()({value:p,suggestions:h,saveTransform:function(e){return A.test(e)?"":e.trim()},onInputChange:i,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)}},b,Object(a.createElement)(w.Button,{isSecondary:!0,isLarge:!0,type:"submit"},Object(o.__)("Embed","jetpack"))):b)}var N=n(63),T=n(34),F=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,B=/restref=([0-9]+)&/,I=/rid=([0-9]+)&/,M=function(e){if(e)return function(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 i=n.get("domain");i&&(o.domain=i);var c=n.get("iframe");c&&(o.iframe=c);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(F);return t&&t[1]?t[1]:B.test(e)||I.test(e)?e:void 0}(e))};var L=Object(w.withNotices)((function(e){var t,n=e.attributes,r=e.className,c=e.clientId,s=e.name,h=e.noticeOperations,b=e.noticeUI,g=e.setAttributes,v=Object(i.getBlockDefaultClassName)(s),_=Object(T.a)(f,n);Object(l.isEqual)(_,n)||g(_);var x=n.align,S=n.rid,A=n.style,F=n.iframe,B=n.domain,I=n.lang,L=n.newtab,R=n.negativeMargin,D=n.__isBlockPreview,z=Object(l.isEmpty)(S);Object(a.useEffect)((function(){if(h.removeAllNotices(),!z&&!D&&"wide"===A&&"wide"!==x&&"full"!==x){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"));h.createNotice({status:"warning",content:e})}}),[D,x,z,h,S,A]);var U,H,q,V,G,W=d(S),K=m(S),$=function(e){return S.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e]},Z=function(e){Array.isArray(e)?g({rid:e,style:e.length>1&&"button"===A?"standard":A}):function(e){var t=M(e);t||(h.removeAllNotices(),h.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(T.a)(f,t);g(n),h.removeAllNotices()}(e)},J=Object(a.createElement)(a.Fragment,null,Object(a.createElement)(O.InspectorAdvancedControls,null,Object(a.createElement)(w.ToggleControl,{label:Object(o.__)("Load the widget in an iFrame (Recommended)","jetpack"),checked:F,onChange:function(){return g({iframe:!F})},className:"is-opentable"}),"button"===A&&Object(a.createElement)(w.ToggleControl,{label:Object(o.__)("Remove button margin","jetpack"),checked:R,onChange:function(){return g({negativeMargin:!R})}})),Object(a.createElement)(N.a,{clientId:c,styleOptions:W,onSelectStyle:function(e){g(e),"wide"===A&&"wide"===x&&g({align:""}),"wide"===e.style&&g({align:"wide"})},activeStyle:A,attributes:n,viewportWidth:150}),Object(a.createElement)(O.InspectorControls,null,Object(a.createElement)(w.PanelBody,{title:Object(o.__)("Settings","jetpack")},Object(a.createElement)(P,{rids:S,onChange:Z}),Object(a.createElement)(w.SelectControl,{label:Object(o.__)("Language","jetpack"),value:I,onChange:function(e){return g({lang:e})},options:u}),Object(a.createElement)(w.ToggleControl,{label:Object(o.__)("Open in a new window","jetpack"),checked:L,onChange:function(){return g({newtab:!L})}})))),Y=Object(E.b)()||Object(E.a)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",Q=Object(a.createElement)(w.Placeholder,{label:Object(o.__)("OpenTable Reservation","jetpack"),icon:Object(a.createElement)(O.BlockIcon,{icon:C}),instructions:Object(o.__)("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:b},Object(a.createElement)(P,{rids:S,onSubmit:Z}),Object(a.createElement)("div",{className:"".concat(v,"-placeholder-links")},Object(a.createElement)(w.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},Object(o.__)("Sign up for OpenTable","jetpack")),Object(a.createElement)(w.ExternalLink,{href:Y},Object(o.__)("Learn more","jetpack")))),X=y()(r,(t={},j()(t,"".concat(v,"-theme-").concat(A),!z&&K.includes(A)),j()(t,"is-placeholder",z),j()(t,"is-multi","multi"===$(A)[0]),j()(t,"align".concat(x),x),j()(t,"has-no-margin",R),t));return Object(a.createElement)(a.Fragment,null,b,Object(a.createElement)("div",{className:X},!z&&J,z?Q:(H=$(U||A),q=k()(H,2),V=q[0],G=q[1],Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"".concat(v,"-overlay")}),Object(a.createElement)("iframe",{title:Object(o.sprintf)(Object(o.__)("Open Table Preview %s","jetpack"),c),scrolling:"no",src:"https://www.opentable.com/widget/reservation/canvas?rid=".concat(Object(l.join)(S,"%2C"),"&type=").concat(V,"&theme=").concat(G,"&overlay=false&domain=").concat(B,"&lang=").concat(I&&p.includes(I)?I:"en-US","&newtab=").concat(L,"&disablega=true")})))))})),R=(n(157),n(18)),D={title:Object(o.__)("OpenTable","jetpack"),description:Object(o.__)("Allow visitors to book a reservation with OpenTable","jetpack"),icon:C,category:Object(R.a)()?"earn":"jetpack",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:L,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))})))},attributes:f,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")&&(I.test(e.textContent)||B.test(e.textContent))},transform:function(e){var t=M(e.textContent);return Object(i.createBlock)("jetpack/opentable",t)}}]}};Object(r.a)("opentable",D)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=["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(22),s=n(8),u=n.n(s),p=n(12),d=n.n(p),m=n(9),h=n.n(m),b=n(10),f=n.n(b),g=n(5),j=n.n(g),v=n(11),k=n.n(v),_=n(3),y=n.n(_),O=n(7),w=n.n(O),C=n(56),E=n.n(C),x=n(17),S=n(16),A=n(4),P=n(60),N=n(48),T=(n(272),n(133)),F=n.n(T),B=n(134),I=n.n(B),M=function(e){var t=e.title,n=void 0===t?"":t,r=e.content,i=void 0===r?"":r,c=e.formattedPrice,l=void 0===c?"":c,s=e.multiple,u=void 0!==s&&s,p=e.featuredMediaUrl,d=void 0===p?null:p,m=e.featuredMediaTitle,h=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:h}))),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)),i&&Object(a.createElement)("div",{className:"jetpack-simple-payments-description"},Object(a.createElement)("p",null,i)),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:F.a,srcSet:"".concat(I.a," 2x")}))))))},L=n(6),R=n(65),D=function(e){return function(t){return e({featuredMediaId:Object(A.get)(t,"id",0),featuredMediaUrl:Object(A.get)(t,"url",null),featuredMediaTitle:Object(A.get)(t,"title",null)})}},z=function(e){var t=e.featuredMediaId,n=e.featuredMediaUrl,r=e.featuredMediaTitle,c=e.setAttributes;return t?Object(a.createElement)("div",null,Object(a.createElement)(a.Fragment,null,Object(a.createElement)(L.BlockControls,null,Object(a.createElement)(i.Toolbar,null,Object(a.createElement)(L.MediaUpload,{onSelect:D(c),allowedTypes:["image"],value:t,render:function(e){var t=e.open;return Object(a.createElement)(R.a,{label:Object(o.__)("Edit Image","jetpack"),onClick:t})}}),Object(a.createElement)(i.ToolbarButton,{icon:"trash",title:Object(o.__)("Remove Image","jetpack"),onClick:function(){return c({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}}))),Object(a.createElement)("figure",null,Object(a.createElement)("img",{src:n,alt:r})))):Object(a.createElement)(L.MediaPlaceholder,{icon:Object(a.createElement)(L.BlockIcon,{icon:"format-image"}),labels:{title:Object(o.__)("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:D(c)})},U=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},H=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Object(P.a)(t),a=r.precision,o=r.symbol,i=e.toFixed(a);return n?"".concat(i," ").concat(Object(A.trimEnd)(o,".")):i},q=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=h()(this,(e=f()(t)).call.apply(e,[this].concat(a))),y()(j()(n),"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),y()(j()(n),"shouldInjectPaymentAttributes",!!n.props.attributes.productId),y()(j()(n),"validateAttributes",(function(){var e=n.validatePrice(),t=n.validateTitle(),r=n.validateEmail(),a=n.validateCurrency();return e&&t&&r&&a})),y()(j()(n),"validateCurrency",(function(){var e=n.props.attributes.currency;return c.includes(e)})),y()(j()(n),"validatePrice",(function(){var e=n.props.attributes,t=e.currency,r=e.price,a=Object(P.a)(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):U(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)})),y()(j()(n),"validateEmail",(function(){var e=n.props.attributes.email;return e?E.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)})),y()(j()(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)})),y()(j()(n),"handleEmailChange",(function(e){n.props.setAttributes({email:e}),n.setState({fieldEmailError:null})})),y()(j()(n),"handleFeaturedMediaSelect",(function(e){n.props.setAttributes({featuredMediaId:Object(A.get)(e,"id",0)})})),y()(j()(n),"handleContentChange",(function(e){n.props.setAttributes({content:e})})),y()(j()(n),"handlePriceChange",(function(e){e=parseFloat(e),isNaN(e)?n.props.setAttributes({price:void 0}):n.props.setAttributes({price:e}),n.setState({fieldPriceError:null})})),y()(j()(n),"handleCurrencyChange",(function(e){n.props.setAttributes({currency:e})})),y()(j()(n),"handleMultipleChange",(function(e){n.props.setAttributes({multiple:!!e})})),y()(j()(n),"handleTitleChange",(function(e){n.props.setAttributes({title:e}),n.setState({fieldTitleError:null})})),y()(j()(n),"getCurrencyList",c.map((function(e){var t=Object(P.a)(e).symbol;return{value:e,label:t===e?e:"".concat(e," ").concat(Object(A.trimEnd)(t,"."))}}))),n}return k()(t,e),d()(t,[{key:"componentDidMount",value:function(){this.injectPaymentAttributes();var e=this.props,t=e.attributes,n=e.hasPublishAction;!t.productId&&n&&this.saveProduct()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.hasPublishAction,r=t.isSelected;Object(A.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&n&&this.validateAttributes()?this.saveProduct():e.isSelected&&!r&&this.validateAttributes()}},{key:"injectPaymentAttributes",value:function(){var e=this.props.simplePayment;if(this.shouldInjectPaymentAttributes&&!Object(A.isEmpty)(e)){var t=this.props,n=t.attributes,r=t.setAttributes,a=n.content,o=n.currency,i=n.email,c=n.featuredMediaId,l=n.multiple,s=n.price,u=n.title;r({content:Object(A.get)(e,["content","raw"],a),currency:Object(A.get)(e,["meta","spay_currency"],o),email:Object(A.get)(e,["meta","spay_email"],i),featuredMediaId:Object(A.get)(e,["featured_media"],c),multiple:Boolean(Object(A.get)(e,["meta","spay_multiple"],Boolean(l))),price:Object(A.get)(e,["meta","spay_price"],s||void 0),title:Object(A.get)(e,["title","raw"],u)}),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,i=e.price,c=e.productId;return{id:c,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:i},status:c?"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,i=Object(S.dispatch)("core").saveEntityRecord;this.setState({isSavingProduct:!0},(function(){i("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,c=this.props,l=c.attributes,s=c.featuredMedia,u=c.instanceId,p=c.isSelected,d=c.setAttributes,m=c.simplePayment,h=l.content,b=l.currency,f=l.email,g=l.featuredMediaId,j=l.featuredMediaUrl,v=l.featuredMediaTitle,k=l.multiple,_=l.price,y=l.productId,O=l.title,C=j||s&&s.source_url,E=v||s&&s.alt_text,x=y&&Object(A.isEmpty)(m);if(!p&&x)return Object(a.createElement)("div",{className:"simple-payments__loading"},Object(a.createElement)(M,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!p&&f&&_&&O&&!t&&!n&&!r)return Object(a.createElement)(M,{"aria-busy":"false",content:h,featuredMediaUrl:C,featuredMediaTitle:E,formattedPrice:H(_,b),multiple:k,title:O});var S=x?i.Disabled:"div";return Object(a.createElement)(S,{className:"wp-block-jetpack-simple-payments"},Object(a.createElement)(z,{featuredMediaId:g,featuredMediaUrl:C,featuredMediaTitle:E,setAttributes:d}),Object(a.createElement)("div",null,Object(a.createElement)(i.TextControl,{"aria-describedby":"".concat(u,"-title-error"),className:w()("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:O}),Object(a.createElement)(N.a,{id:"".concat(u,"-title-error"),isError:!0},r),Object(a.createElement)(i.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:h}),Object(a.createElement)("div",{className:"simple-payments__price-container"},Object(a.createElement)(i.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)(i.TextControl,{"aria-describedby":"".concat(u,"-price-error"),className:w()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":n}),label:Object(o.__)("Price","jetpack"),onChange:this.handlePriceChange,placeholder:H(0,b,!1),required:!0,step:"1",type:"number",value:_||""}),Object(a.createElement)(N.a,{id:"".concat(u,"-price-error"),isError:!0},n)),Object(a.createElement)("div",{className:"simple-payments__field-multiple"},Object(a.createElement)(i.ToggleControl,{checked:Boolean(k),label:Object(o.__)("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),Object(a.createElement)(i.TextControl,{"aria-describedby":"".concat(u,"-email-").concat(t?"error":"help"),className:w()("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:f}),Object(a.createElement)(N.a,{id:"".concat(u,"-email-error"),isError:!0},t),Object(a.createElement)(N.a,{id:"".concat(u,"-email-help")},Object(o.__)("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",Object(a.createElement)(i.ExternalLink,{href:"https://www.paypal.com/"},Object(o.__)("Create one on PayPal","jetpack")))))}}]),t}(a.Component),V=Object(S.withSelect)((function(e,t){var n=e("core"),r=n.getEntityRecord,a=n.getMedia,o=e("core/editor"),i=o.isSavingPost,c=o.getCurrentPost,l=t.attributes,s=l.productId,u=l.featuredMediaId,p=s?Object(A.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;return{hasPublishAction:!!Object(A.get)(c(),["_links","wp:action-publish"]),isSaving:!!i(),simplePayment:p,featuredMedia:u?a(u):null}})),G=Object(x.compose)(V,x.withInstanceId)(q);var W=n(135),K=n.n(W),$=(n(273),n(18)),Z=Object(l.b)()||Object(l.a)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",J={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)(i.ExternalLink,{href:Z},Object(o.__)("Support reference","jetpack"))),icon:Object(a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)(i.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"})),category:Object($.a)()?"earn":"jetpack",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",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:""}},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:G,save:function(e){var t=e.attributes.productId;return t?Object(a.createElement)(a.RawHTML,null,'[simple-payment id="'.concat(t,'"]')):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:K.a}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1}};Object(r.a)("simple-payments",J)},function(e,t,n){"use strict";n.r(t);var r=n(19),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}},i=n(14),c=n.n(i),l=n(0),s=n(4),u=n(13),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",c()({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(15),h=n.n(m),b=n(6),f=n(2),g=n(40),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,{fill:"#555d66",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(34),k=n(22);n(270),n(159);var _=n(18),y={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:j,category:Object(_.a)()?"grow":"jetpack",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 i=t.revueUsername,c=t.emailLabel,u=t.emailPlaceholder,p=t.firstNameLabel,d=t.firstNamePlaceholder,m=t.firstNameShow,_=t.lastNameLabel,O=t.lastNamePlaceholder,w=t.lastNameShow,C=Object(l.useState)(""),E=h()(C,2),x=E[0],S=E[1];Object(l.useEffect)((function(){!x&&i&&S(i)}),[]);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},!i&&Object(l.createElement)(f.Placeholder,{icon:Object(l.createElement)(b.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")))),i&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(b.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:i}))),Object(l.createElement)(f.TextControl,{label:Object(l.createElement)(g.a,{label:c,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:_,labelFieldName:"lastNameLabel",setAttributes:r}),onChange:function(e){return r({lastNamePlaceholder:e})},placeholder:O,value:O}),Object(l.createElement)(b.InnerBlocks,{template:[[y.name,y.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)(b.InnerBlocks.Content,null),Object(l.createElement)("a",{className:"wp-block-jetpack-revue__fallback",href:n},n))},example:{attributes:{revueUsername:"example"},innerBlocks:[y]},deprecated:[d]};Object(r.a)("revue",O)},function(e,t,n){"use strict";n.r(t);var r=n(19),a=n(0),o=n(1),i=n(2),c=n(14),l=n.n(c),s=n(20),u=n.n(s),p=n(8),d=n.n(p),m=n(12),h=n.n(m),b=n(9),f=n.n(b),g=n(10),j=n.n(g),v=n(5),k=n.n(v),_=n(11),y=n.n(_),O=n(3),w=n.n(O),C=n(17),E=n(4),x=n(29),S=n(16),A=n(6),P=n(39),N=n(65),T=function(e){var t=e.allowedMediaTypes,n=e.attributes,r=n.autoplay,c=n.delay,l=n.effect,s=n.images,u=n.sizeSlug,p=e.imageSizeOptions,d=e.onChangeImageSize,m=e.onSelectImages,h=e.setAttributes,b="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)(i.PanelBody,{title:Object(o.__)("Autoplay","jetpack")},Object(a.createElement)(i.ToggleControl,{label:Object(o.__)("Autoplay","jetpack"),help:Object(o.__)("Autoplay between slides","jetpack"),checked:r,onChange:function(e){h({autoplay:e})}}),r&&Object(a.createElement)(i.RangeControl,{label:Object(o.__)("Delay between transitions (in seconds)","jetpack"),value:c,onChange:function(e){h({delay:e})},min:1,max:5}),r&&b&&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)(i.PanelBody,{title:Object(o.__)("Effects","jetpack")},Object(a.createElement)(i.SelectControl,{label:Object(o.__)("Transition effect","jetpack"),value:l,onChange:function(e){h({effect:e})},options:f})),!Object(E.isEmpty)(s)&&!Object(E.isEmpty)(p)&&Object(a.createElement)(i.PanelBody,{title:Object(o.__)("Image Settings","jetpack")},Object(a.createElement)(i.SelectControl,{label:Object(o.__)("Image Size","jetpack"),value:u,options:p,onChange:d}))),Object(a.createElement)(A.BlockControls,null,!!s.length&&Object(a.createElement)(i.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})}}))))},F=n(7),B=n.n(F),I=n(52),M=n(95),L=n(51),R=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(L.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(M.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:L.b,imagesReady:L.d,paginationRender:L.c,transitionEnd:L.a}))})),n.slideshowRef=Object(a.createRef)(),n.btnNextRef=Object(a.createRef)(),n.btnPrevRef=Object(a.createRef)(),n.paginationRef=Object(a.createRef)(),n}return y()(t,e),h()(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,i=r.autoplay,c=r.delay,l=r.effect,s=r.images,u=r.onError;(a===e.align&&Object(E.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),l!==e.effect||i!==e.autoplay||c!==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?void 0:null===(t=e.images)||void 0===t?void 0:t.length))return null;var n=this.props,r=n.autoplay,o=n.className,c=n.delay,l=n.effect,s=n.images;return Object(a.createElement)("div",{className:o,"data-autoplay":r||null,"data-delay":r?c: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)(i.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()(R,"defaultProps",{effect:"slide"});var D=R,z=(n(274),["image"]),U=function(e,t){var n=Object(E.pick)(e,["alt","id","link","caption"]);return n.url=Object(E.get)(e,["sizes",t,"url"])||Object(E.get)(e,["media_details","sizes",t,"source_url"])||e.url,n},H=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(E.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,i=a.unlockPostSaving,c=a.noticeOperations;o("slideshowBlockLock"),Object(P.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)}))||i("slideshowBlockLock")},onError:c.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(E.get)(n,["sizes",t,"source_url"]);return l()({},e,{},a&&{url:a})}));e.setAttributes({images:a,sizeSlug:t})})),e.state={selectedImage:null},e}return y()(t,e),h()(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(E.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,c=t.isSelected,l=t.noticeOperations,s=t.noticeUI,u=n.align,p=n.autoplay,d=n.delay,m=n.effect,h=n.images,b=this.getImageSizeOptions(),f=Object(a.createElement)(T,{allowedMediaTypes:z,attributes:n,imageSizeOptions:b,onChangeImageSize:this.updateImagesSize,onSelectImages:this.onSelectImages,setAttributes:function(t){return e.setAttributes(t)}});return 0===h.length?Object(a.createElement)(a.Fragment,null,f,Object(a.createElement)(A.MediaPlaceholder,{icon:Object(a.createElement)(A.BlockIcon,{icon:ee}),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:h,onError:l.createErrorNotice}),Object(a.createElement)(i.DropZone,{onFilesDrop:this.addFiles}),c&&Object(a.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},Object(a.createElement)(i.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(C.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(E.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}})),i.withNotices)(H),V=n(13);function G(e){return Object(E.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(V.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(V.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(V.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:function(e){var t=e.images,n=e.ids;return Object(V.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(V.createBlock)("core/image",{id:t,url:n,alt:r,caption:a})})):Object(V.createBlock)("core/image")}}]},K=n(18),$=n(136),Z=n.n($),J=n(137),Y=n.n(J),Q=n(138),X=n.n(Q),ee=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.Path,{d:"M0 0h24v24H0z",fill:"none"}),Object(a.createElement)(i.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"})),te={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:Z.a},{alt:"",caption:"",id:23,url:Y.a},{alt:"",caption:"",id:23,url:X.a}],effect:"slide"},ne={title:Object(o.__)("Slideshow","jetpack"),category:Object(K.a)()?"layout":"jetpack",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:ee,edit:q,save:function(e){var t=e.attributes,n=t.align,r=t.autoplay,o=t.delay,i=t.effect,c=t.images,l=e.className;return Object(a.createElement)(D,{align:n,autoplay:r,className:l,delay:o,effect:i,images:c})},transforms:W,example:{attributes:te}};Object(r.a)("slideshow",ne)},function(e,t,n){"use strict";n.r(t);var r=n(20),a=n.n(r),o=n(15),i=n.n(o),c=n(14),l=n.n(c),s=n(27),u=n.n(s),p=n(0),d=n(2),m=n(29),h=n(13),b=n(39),f=n(6),g=n(31),j=n(17),v=n(1),k=n(4),_=n(37),y=n.n(_),O=n(8),w=n.n(O),C=n(12),E=n.n(C),x=n(9),S=n.n(x),A=n(10),P=n.n(A),N=n(5),T=n.n(N),F=n(11),B=n.n(F),I=n(3),M=n.n(I),L=n(21),R=n.n(L),D=n(16),z=n(7),U=n.n(z),H=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),V=function(e,t){var n=t.autoplay,r=t.controls,a=t.loop,o=t.muted,i=t.poster,c=t.preload;if(!e)return null;var s=l()({},n&&{autoPlay:!0},{},!r&&{controls:!1},{},a&&{loop:!0},{},o&&{muted:!0,persistVolume:!1},{},i&&{posterUrl:i},{},"none"!==c&&{preloadContent:c});return Object(q.addQueryArgs)("https://videopress.com/v/".concat(e),s)},G=["image"],W=f.__experimentalBlock?f.__experimentalBlock.figure:"figure",K=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,i=n.loop,c=n.muted,l=n.poster,s=n.preload,u=n.src,p=e("core"),d=p.getEmbedPreview,h=p.isRequestingEmbedPreview,b=V(o,{autoplay:r,controls:a,loop:i,muted:c,poster:l,preload:s}),f=!!b&&d(b);return{isFetchingPreview:!!b&&h(b),isUploading:Object(m.isBlobURL)(u),preview:f,url:b}})),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,P()(n).apply(this,arguments)),M()(T()(e),"hideOverlay",(function(){e.setState({interactive:!0})})),M()(T()(e),"fallbackToCore",(function(){e.props.setAttributes({guid:void 0}),e.setState({fallback:!0})})),M()(T()(e),"setGuid",y()(regeneratorRuntime.mark((function t(){var n,r,a,o,i,c,l;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,e.setState({isFetchingMedia:!0}),t.next=9,R()({path:"/wp/v2/media/".concat(o)});case 9:if(i=t.sent,e.setState({isFetchingMedia:!1}),c=e.props.attributes.id,o===c){t.next=14;break}return t.abrupt("return");case 14:e.setState({media:i}),(l=Object(k.get)(i,"jetpack_videopress_guid"))?a({guid:l}):e.fallbackToCore(),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(5),e.setState({isFetchingMedia:!1}),e.fallbackToCore();case 23:case"end":return t.stop()}}),t,null,[[5,19]])})))),M()(T()(e),"switchToEditing",(function(){e.props.setAttributes({id:void 0,guid:void 0,src:void 0})})),M()(T()(e),"onSelectPoster",(function(t){(0,e.props.setAttributes)({poster:t.url})})),M()(T()(e),"onRemovePoster",(function(){(0,e.props.setAttributes)({poster:""}),e.posterImageButton.current.focus()})),M()(T()(e),"toggleAttribute",(function(t){return function(n){e.props.setAttributes(M()({},t,n))}})),M()(T()(e),"getAutoplayHelp",(function(e){return e?Object(v.__)("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null})),e.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1},e.posterImageButton=Object(p.createRef)(),e}return B()(n,t),E()(n,[{key:"componentDidMount",value:function(){this.props.attributes.guid||this.setGuid()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.attributes,r=t.invalidateCachedEmbedPreview,a=t.url;n.id!==e.attributes.id&&this.setGuid(),a&&a!==e.url&&r(a)}},{key:"render",value:function(){var t=this,n=this.props,r=n.attributes,a=n.className,o=n.instanceId,i=n.isFetchingPreview,c=n.isSelected,l=n.isUploading,s=n.preview,u=n.setAttributes,m=this.state,h=m.fallback,b=m.isFetchingMedia,g=m.interactive,j=r.autoplay,k=r.caption,_=r.controls,y=r.loop,O=r.muted,w=r.poster,C=r.preload,E="video-block__poster-image-description-".concat(o),x=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:j,help:this.getAutoplayHelp}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Loop","jetpack"),onChange:this.toggleAttribute("loop"),checked:y}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:O}),Object(p.createElement)(d.ToggleControl,{label:Object(v.__)("Playback Controls","jetpack"),onChange:this.toggleAttribute("controls"),checked:_}),Object(p.createElement)(d.SelectControl,{label:Object(v.__)("Preload","jetpack"),value:C,onChange:function(e){return u({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:G,render:function(e){var n=e.open;return Object(p.createElement)(d.Button,{isDefault:!0,onClick:n,ref:t.posterImageButton,"aria-describedby":E},w?Object(v.__)("Replace image","jetpack"):Object(v.__)("Select Poster Image","jetpack"))}}),Object(p.createElement)("p",{id:E,hidden:!0},w?Object(v.sprintf)(Object(v.__)("The current poster image url is %s","jetpack"),w):Object(v.__)("There is no poster image currently selected","jetpack")),!!w&&Object(p.createElement)(d.Button,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},Object(v.__)("Remove Poster Image")))))));if(l)return Object(p.createElement)(p.Fragment,null,x,Object(p.createElement)(H,{text:Object(v.__)("Uploading…","jetpack")}));if(b||i)return Object(p.createElement)(p.Fragment,null,x,Object(p.createElement)(H,{text:Object(v.__)("Generating preview…","jetpack")}));if(h||!s)return Object(p.createElement)(e,this.props);var S=s.html,A=s.scripts;return Object(p.createElement)(p.Fragment,null,x,Object(p.createElement)(W,{className:U()(a,"wp-block-embed","is-type-video")},Object(p.createElement)("div",{className:"wp-block-embed__wrapper"},Object(p.createElement)(d.SandBox,{html:S,scripts:A})),!g&&Object(p.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}),(!f.RichText.isEmpty(k)||c)&&Object(p.createElement)(f.RichText,{tagName:"figcaption",placeholder:Object(v.__)("Write caption…","jetpack"),value:k,onChange:function(e){return u({caption:e})},inlineToolbar:!0})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),n}(p.Component)}]),"withVideoPressEdit"),$=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,i=n.guid,c=n.loop,l=n.muted,s=n.poster,u=n.preload;if(!i)return e(t);var d=V(i,{autoplay:r,controls:o,loop:c,muted:l,poster:s,preload:u});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(d,"\n")),!f.RichText.isEmpty(a)&&Object(p.createElement)(f.RichText.Content,{tagName:"figcaption",value:a}))}}),"withVideoPressSave"),Z=n(45);var J={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},Y=n(77),Q=n(22),X=n(76),ee=(n(
|