!function(){var e,t,r,n,a,o,i,s={4481:function(e,t,r){"use strict";r.d(t,{M:function(){return n},X:function(){return a}});var n={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function a(e){return n[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},5880:function(e,t,r){"use strict";r.d(t,{ZP:function(){return i}});var n=r(5993),a=r(3196),o=r(4481);function i(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(0,o.X)(t);if(!i||isNaN(e))return null;var s=(0,n.Z)({},i,r),l=s.decimal,c=s.grouping,u=s.precision,p=s.symbol,d=e<0?"-":"",m=(0,a.Y4)(Math.abs(e),{decimals:u,thousandsSep:c,decPoint:l});return"".concat(d).concat(p).concat(m)}},8787:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n,a=r(3804),o=r(2571);function i(){var e=this;this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=function(t){t.source===e.windowInstance&&e.emit("message",t.data)}}n=i.prototype,(0,a.assign)(n,o.EventEmitter.prototype),n.emitChange=function(){this.emit("change")},n.off=n.removeListener,i.prototype.open=function(e,t,r){return t=t||Date.now(),this.windowInstance=window.open(e,t,r),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},i.prototype.getScreenCenterSpecs=function(e,t){var r=void 0!==window.screenTop?window.screenTop:window.screenY,n=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(r+window.innerHeight/2-t/2),"left="+(n+window.innerWidth/2-e/2)].join()},i.prototype.isOpen=function(e){var t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(r){}return!t},i.prototype.checkStatus=function(){for(var e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit("close",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener("message",this.onMessage))},i.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};var s=i},3197:function(e){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},8900:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function a(e,t){var r,a,o,i,s,l,c=[];for(r=0;r=0||n[l]":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],o={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function a(e,t){var r;if(!Array.isArray(t))for(t=new Array(arguments.length-1),r=1;r>>1^r:o>>>=1;i=i>>>8^o}return-1^i}function a(e,r){var n,o,i;if(void 0!==a.crc&&r&&e||(a.crc=-1,e)){for(n=a.crc,o=0,i=e.length;o>>8^t[255&(n^e[o])];return a.crc=n,-1^n}}!function(){var e,n,a;for(n=0;n<256;n+=1){for(e=n,a=0;a<8;a+=1)1&e?e=r^e>>>1:e>>>=1;t[n]=e>>>0}}(),e.exports=function(e,t){var r;e="string"==typeof e?(r=e,Array.prototype.map.call(r,(function(e){return e.charCodeAt(0)}))):e;return((t?n(e):a(e))>>>0).toString(16)},e.exports.direct=n,e.exports.table=a}()},7115:function(e){"use strict";var t="%[a-f0-9]{2}",r=new RegExp(t,"gi"),n=new RegExp("("+t+")+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(o){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r),n=1;n254)return!1;if(!r.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2571:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var a,o,i,c;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),i=o[t]),void 0===i)i=o[t]=r,++e._eventsCount;else if("function"==typeof i?i=o[t]=n?[r,i]:[i,r]:n?i.unshift(r):i.push(r),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=u.bind(n);return a.listener=r,n.wrapFn=a,a}function d(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,u=h(l,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){i=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},524:function(e){"use strict";function t(e){return function(){return e}}var r=function(){};r.thatReturns=t,r.thatReturnsFalse=t(!1),r.thatReturnsTrue=t(!0),r.thatReturnsNull=t(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},7477:function(e){"use strict";e.exports=function(e,t,r,n,a,o,i,s){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 c=[r,n,a,o,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},335:function(e,t,r){"use strict";var n=r(524);e.exports=n},5946:function(e){"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),a=Array.isArray(t),o=0;o=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var a=0;a>>24&255,n[a++]=e>>>16&255,n[a++]=e>>>8&255,n[a++]=255&e}else for(n[a++]=255&e,n[a++]=e>>>8&255,n[a++]=e>>>16&255,n[a++]=e>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,o=8;o>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},3566:function(e,t,r){"use strict";var n=r(8282),a=r(9503);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];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>6|192,r[n++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=63&i|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=63&i|128)}else for(a=0;a>>0}return i},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,a=0;n>>24,r[a+1]=o>>>16&255,r[a+2]=o>>>8&255,r[a+3]=255&o):(r[a+3]=o>>>24,r[a+2]=o>>>16&255,r[a+1]=o>>>8&255,r[a]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,a){return e+t+r+n+a>>>0},t.sum64=function(e,t,r,n){var a=e[t],o=n+e[t+1]>>>0,i=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,a,o,i,s){var l=0,c=t;return l+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,a,o,i,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,a,o,i,s,l,c){var u=0,p=t;return u+=(p=p+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,a,o,i,s,l,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},8802:function(e,t,r){"use strict";var n=r(308),a=r(609),o=r(6431),i=r.n(o),s=r(215),l=r(8090),c=r(5565),u=r.n(c),p=r(9016),d=r.n(p),m=r(2571),h=r(702),g=r(4007),f=i()("i18n-calypso"),b="number_format_decimals",v="number_format_thousands_sep",k="messages",y=[function(e){return e}],E={};function w(){S.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function _(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",_(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",_(e));for(var r={},n=0;n=0;r--){var n=y[r](Object.assign({},t));if(e.state.locale[n.original])return j(e.state.tannin,n)}return null}function S(){if(!(this instanceof S))return new S;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:u()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}S.throwErrors=!1,S.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},S.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},S.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},S.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="number"==typeof t?t:t.decimals||0,n=t.decPoint||this.state.numberFormatSettings.decimal_point||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,g.Z)(e,r,n,a)},S.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},S.prototype.setLocale=function(e){var t,r,n;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var r=!1===t?"":String(t);if(void 0!==E[r+e])return E[r+e];var n=d()().update(e).digest("hex");return E[r+e]=t?n.substr(0,t):n},s=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)y.push(s(!1));else{var c=o.substr(5).indexOf("-");if(c<0){var u=Number(o.substr(5));y.push(s(u))}else for(var p=Number(o.substr(5,c)),m=Number(o.substr(6+c)),h=p;h<=m;h++)y.push(s(h))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(r=this.state.locale[""])||void 0===r||null===(n=r.momentjs_locale)||void 0===n?void 0:n.textDirection),this.state.tannin=new l.Z((0,a.Z)({},k,this.state.locale)),this.state.numberFormatSettings.decimal_point=j(this.state.tannin,C([b])),this.state.numberFormatSettings.thousands_sep=j(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===b&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},S.prototype.getLocale=function(){return this.state.locale},S.prototype.getLocaleSlug=function(){return this.state.localeSlug},S.prototype.isRtl=function(){return"rtl"===this.state.textDirection},S.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},S.prototype.hasTranslation=function(){return!!x(this,C(arguments))},S.prototype.translate=function(){var e=C(arguments),t=x(this,e);if(t||(t=j(this.state.tannin,e)),e.args){var r=Array.isArray(e.args)?e.args.slice(0):[e.args];r.unshift(t);try{t=h.Z.apply(void 0,(0,n.Z)(r))}catch(o){if(!window||!window.console)return;var a=this.throwErrors?"error":"warn";"string"!=typeof o?window.console[a](o):window.console[a]("i18n sprintf error:",r)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(r){t=r(t,e)})),t},S.prototype.reRenderTranslations=function(){f("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},S.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},S.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=S},3196:function(e,t,r){"use strict";r.d(t,{Y4:function(){return l}});var n=r(8802),a=r(5971),o=r(8698),i=r(3346),s=new n.Z,l=s.numberFormat.bind(s),c=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,a.Z)(s),(0,o.Z)(s),(0,i.Z)(s));c.useRtl,c.withRtl},5971:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var n=r(8799),a=r(5150),o=r(9534),i=r(8240),s=r(9967),l=r(6773),c=r(5155),u=r(609),p=r(6141),d=r.n(p);function m(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(r){var p,m,h=r.displayName||r.name||"";return m=p=function(p){function m(){var e,t;(0,a.Z)(this,m);for(var r=arguments.length,n=new Array(r),o=0;o3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length "+l);if("componentClose"===p.type)throw new Error("Missing opening component token: `"+p.value+"`");if("componentOpen"===p.type){r=t[p.value],s=d;break}g.push(t[p.value])}else g.push(p.value);return r&&(u=function(e,t){var r,n,a=t[e],o=0;for(n=e+1;n=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){var n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=r(8452)(e.__opts__),n=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.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]"),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var r=e.__schemas__[t];if(null!==r){var n={validate:null,link:null};if(e.__compiled__[t]=n,"[object Object]"===a(r))return!function(e){return"[object RegExp]"===a(e)}(r.validate)?o(r.validate)?n.validate=r.validate:c(t,r):n.validate=function(e){return function(t,r){var n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}(r.validate),void(o(r.normalize)?n.normalize=r.normalize:r.normalize?c(t,r):n.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(r)?c(t,r):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 r=e.__index__,n=e.__last_index__,a=e.__text_cache__.slice(r,n);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=n+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var r=new p(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function m(e,t){if(!(this instanceof m))return new m(e,t);var r;t||(r=e,Object.keys(r||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=n({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},m.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,r,n,a,o,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,i=n.index+n[0].length,(this.__index__<0||othis.__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,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0},m.prototype.match=function(e){var t=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(d(this,t)),t=this.__last_index__);for(var n=t?e.slice(t):e;this.test(n);)r.push(d(this,t)),n=n.slice(this.__last_index__),t+=this.__last_index__;return r.length?r: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,r){return e!==r[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},8452:function(e,t,r){"use strict";e.exports=function(e){var t={};t.src_Any=r(6285).source,t.src_Cc=r(5842).source,t.src_Z=r(6202).source,t.src_P=r(7696).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},7595:function(e,t,r){"use strict";const n=r(2199),a=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),m=Symbol("updateAgeOnGet"),h=()=>1;const g=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(f(e,t)){if(v(e,n),!e[s])return}else r&&(e[m]&&(n.value.now=Date.now()),e[p].unshiftNode(n));return t.value}},f=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},b=e=>{if(e[o]>e[a])for(let t=e[p].tail;e[o]>e[a]&&null!==t;){const r=t.prev;v(e,t),t=r}},v=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[o]-=r.length,e[d].delete(r.key),e[p].removeNode(t)}};class k{constructor(e,t,r,n,a){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=a||0}}const y=(e,t,r,n)=>{let a=r.value;f(e,a)&&(v(e,r),e[s]||(a=void 0)),a&&t.call(n,a.value,a.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[a]=e.max||1/0;const t=e.length||h;if(this[i]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[m]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,b(this)}get max(){return this[a]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[i]&&(this[i]=e,this[o]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let r=this[p].tail;null!==r;){const n=r.prev;y(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[p].head;null!==r;){const n=r.next;y(this,e,r,t),r=n}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[p]=new n,this[o]=0}dump(){return this[p].map((e=>!f(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,r){if((r=r||this[l])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[i](t,e);if(this[d].has(e)){if(s>this[a])return v(this,this[d].get(e)),!1;const i=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=n,i.maxAge=r,i.value=t,this[o]+=s-i.length,i.length=s,this.get(e),b(this),!0}const m=new k(e,t,s,n,r);return m.length>this[a]?(this[c]&&this[c](e,t),!1):(this[o]+=m.length,this[p].unshift(m),this[d].set(e,this[p].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!f(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],a=n.e||0;if(0===a)this.set(n.k,n.v);else{const e=a-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>g(this,t,!1)))}}},5565:function(e,t,r){var n=r(2571),a=r(9503);function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={}),n.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,n.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,r){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=r,this.cache[this.tail].prev=null):(this.cache[t].next=r,this.cache[r].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 r;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((r=this.cache[e]).value=t,this.maxAge&&(r.modified=Date.now()),e===this.head)return t;this._unlink(e,r.prev,r.next)}else r={value:t,modified:0,next:null,prev:null},this.maxAge&&(r.modified=Date.now()),this.cache[e]=r,this.length===this.max&&this.evict();return this.length++,r.next=null,r.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})}}},9472:function(e,t,r){"use strict";e.exports=r(8092)},5926:function(e,t,r){"use strict";e.exports=r(231)},4692:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},5501:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",r="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",n=new RegExp("^(?:"+t+"|"+r+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),a=new RegExp("^(?:"+t+"|"+r+")");e.exports.n=n,e.exports.q=a},8201:function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function a(e,t){return n.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=r(5926);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&","<":"<",">":">",'"':"""};function h(e){return m[e]}var g=/[.?*+^$[\]\\(){}|-]/g;var f=r(7696);t.lib={},t.lib.mdurl=r(6664),t.lib.ucmicro=r(9126),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(r){e[r]=t[r]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,r){return t||function(e,t){var r=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(r):e}(e,r)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return f.test(e)},t.escapeRE=function(e){return e.replace(g,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},9486:function(e,t,r){"use strict";t.parseLinkLabel=r(3020),t.parseLinkDestination=r(113),t.parseLinkTitle=r(7266)},113:function(e,t,r){"use strict";var n=r(8201).unescapeAll;e.exports=function(e,t,r){var a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(s.str=n(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},3020:function(e){"use strict";e.exports=function(e,t,r){var n,a,o,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,n=1;e.pos=r)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t=0))try{t.hostname=p.toASCII(t.hostname)}catch(r){}return u.encode(u.format(t))}function v(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(r){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||n.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new c,this.validateLink=g,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=n,this.helpers=n.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return n.assign(this.options,e),this},k.prototype.configure=function(e){var t,r=this;if(n.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&&r.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&r[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&r[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.enable(e,!0))}),this),r=r.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},k.prototype.disable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.disable(e,!0))}),this),r=r.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},3435:function(e,t,r){"use strict";var n=r(1473),a=[["table",r(3168),["paragraph","reference"]],["code",r(3390)],["fence",r(5723),["paragraph","reference","blockquote","list"]],["blockquote",r(1264),["paragraph","reference","blockquote","list"]],["hr",r(4438),["paragraph","reference","blockquote","list"]],["list",r(185),["paragraph","reference","blockquote"]],["reference",r(8707)],["heading",r(6926),["paragraph","reference","blockquote"]],["lheading",r(2288)],["html_block",r(7416),["paragraph","reference","blockquote"]],["paragraph",r(3958)]];function o(){this.ruler=new n;for(var e=0;e=r))&&!(e.sCount[i]=l){e.line=r;break}for(n=0;n=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,r,n){var a,o,i,s=new this.State(e,t,r,n);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a"+o(e[t].content)+""},i.code_block=function(e,t,r,n,a){var i=e[t];return""+o(e[t].content)+"\n"},i.fence=function(e,t,r,n,i){var s,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",g="";return m&&(h=(c=m.split(/(\s+)/g))[0],g=c.slice(2).join("")),0===(s=r.highlight&&r.highlight(d.content,h,g)||o(d.content)).indexOf(""+s+"\n"):"
"+s+"
\n"},i.image=function(e,t,r,n,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,r,n),a.renderToken(e,t,r)},i.hardbreak=function(e,t,r){return r.xhtmlOut?"
\n":"
\n"},i.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"
\n":"
\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;t\n":">")},s.prototype.renderInline=function(e,t,r){for(var n,a="",o=this.rules,i=0,s=e.length;i=4)return!1;if(62!==e.src.charCodeAt(x++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(x)?(x++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(x)?(y=!0,(e.bsCount[t]+m)%4==3?(x++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=x;x=S,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=x-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d=(S=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(x++)||C){if(u)break;for(E=!1,s=0,c=w.length;s=S,g.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=x-e.bMarks[d]}for(f=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=j,e.parentType=b,p[1]=e.line,s=0;s=4))break;a=++n}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}},5723:function(e){"use strict";e.exports=function(e,t,r,n){var a,o,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(o=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;for(s=t;!(++s>=r)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]=4||(d=e.skipChars(d,a))-l=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,o=e.src.charCodeAt(++c);35===o&&c6||cc&&n(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},4438:function(e,t,r){"use strict";var n=r(8201).isSpace;e.exports=function(e,t,r,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(i=1;c|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,r,n){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a=4)return!1;for(d=e.parentType,e.parentType="paragraph";m3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o=i)return-1;if((r=e.src.charCodeAt(o++))<48||r>57)return-1;for(;;){if(o>=i)return-1;if(!((r=e.src.charCodeAt(o++))>=48&&r<=57)){if(41===r||46===r)break;return-1}if(o-a>=10)return-1}return o=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(R=!0),(T=o(e,t))>=0){if(d=!0,A=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(A,T-A-1)),R&&1!==v)return!1}else{if(!((T=a(e,t))>=0))return!1;d=!1}if(R&&e.skipSpaces(T)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(T-1),n)return!0;for(f=e.tokens.length,d?(M=e.push("ordered_list_open","ol",1),1!==v&&(M.attrs=[["start",v]])):M=e.push("bullet_list_open","ul",1),M.map=g=[t,0],M.markup=String.fromCharCode(b),y=t,N=!1,I=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y=k?1:E-p)>4&&(u=1),c=p+u,(M=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),M.map=m=[t,0],x=e.tight,j=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=E,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,t,r,!0),e.tight&&!N||(L=!1),N=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=j,e.sCount[t]=C,e.tight=x,(M=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=r)break;if(e.sCount[y]=4)break;for(P=!1,l=0,h=I.length;l3||e.sCount[l]<0)){for(n=!1,a=0,o=c.length;a=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_3||e.sCount[j]<0)){for(k=!1,p=0,d=y.length;p0&&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;et;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var r=this.src.length;er;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,r,n){var o,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;dr?new Array(i-r+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=n,e.exports=o},3168:function(e,t,r){"use strict";var n=r(8201).isSpace;function a(e,t){var r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.substr(r,n-r)}function o(e){var t,r=[],n=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(n);nr)return!1;if(d=t+1,e.sCount[d]=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(s=e.src.charCodeAt(c++))&&45!==s&&58!==s)return!1;for(;c=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==f.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(g=e.push("table_open","table",1)).map=v=[t,0],(g=e.push("thead_open","thead",1)).map=[t,t+1],(g=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((g=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(g=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u/i.test(e)}e.exports=function(e){var t,r,o,i,s,l,c,u,p,d,m,h,g,f,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(r=0,o=E.length;r=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^\s]/i.test(y)&&g>0&&g--,a(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;um&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m=0;t--)"text"!==(r=e[t]).type||a||(r.content=r.content.replace(n,o)),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}function s(e){var r,n,a=0;for(r=e.length-1;r>=0;r--)"text"!==(n=e[r]).type||a||t.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}e.exports=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)"inline"===e.tokens[n].type&&(r.test(e.tokens[n].content)&&i(e.tokens[n].children),t.test(e.tokens[n].content)&&s(e.tokens[n].children))}},4335:function(e,t,r){"use strict";var n=r(8201).isWhiteSpace,a=r(8201).isPunctChar,o=r(8201).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,r){return e.substr(0,t)+r+e.substr(t+1)}function c(e,t){var r,i,c,u,p,d,m,h,g,f,b,v,k,y,E,w,_,C,j,x,S;for(j=[],r=0;r=0&&!(j[_].level<=m);_--);if(j.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p=0)g=c.charCodeAt(u.index-1);else for(_=r-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){g=e[_].content.charCodeAt(e[_].content.length-1);break}if(f=32,p=48&&g<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=j.length-1;_>=0&&(h=j[_],!(j[_].level=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},3706:function(e,t,r){"use strict";var n=r(2069);function a(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=n,e.exports=a},4145:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,r=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,n){var a,o,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return a=e.src.slice(l+1,u),r.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(n||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(n||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},1191:function(e){"use strict";e.exports=function(e,t){var r,n,a,o,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(r=u,u++,n=e.posMax;ui;n-=o.jump+1)if((o=t[n]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=n>0&&!t[n-1].open?t[n-1].jump+1:0,a.jump=r-n+c,a.open=!1,o.end=r,o.jump=c,o.close=!1,s=-1;break}-1!==s&&(u[a.marker][(a.length||0)%3]=s)}}e.exports=function(e){var r,n=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),r=0;r=0;r--)95!==(n=t[r]).marker&&42!==n.marker||-1!==n.end&&(a=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].token===n.token-1&&t[n.end+1].token===a.token+1&&t[r-1].marker===n.marker,i=String.fromCharCode(n.marker),(o=e.tokens[n.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--))}e.exports.w=function(e,t){var r,n,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(n=e.scanDelims(e.pos,42===o),r=0;r?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var r,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o=o)&&(!(33!==(r=e.src.charCodeAt(i+1))&&63!==r&&47!==r&&!function(e){var t=32|e;return t>=97&&t<=122}(r))&&(!!(a=e.src.slice(i).match(n))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},9590:function(e,t,r){"use strict";var n=r(8201).normalizeReference,a=r(8201).isSpace;e.exports=function(e,t){var r,o,i,s,l,c,u,p,d,m,h,g,f,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)=k)return!1;for(f=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),f=u;u=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u=0?s=e.src.slice(f,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[n(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,g=[]),(h=e.push("image","img",0)).attrs=r=[["src",b],["alt",""]],h.children=g,h.content=i,m&&r.push(["title",m])),e.pos=u,e.posMax=k,!0}},8839:function(e,t,r){"use strict";var n=r(8201).normalizeReference,a=r(8201).isSpace;e.exports=function(e,t){var r,o,i,s,l,c,u,p,d="",m="",h=e.pos,g=e.posMax,f=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)=g)return!1;if(f=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",f=c;c=g||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c=0?i=e.src.slice(f,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[n(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=r=[["href",d]],m&&r.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=g,!0}},2051:function(e,t,r){"use strict";var n=r(8201).isSpace;e.exports=function(e,t){var r,a,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;for(r=e.pending.length-1,a=e.posMax,t||(r>=0&&32===e.pending.charCodeAt(r)?r>=1&&32===e.pending.charCodeAt(r-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++;o0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var r,n,s,l,c,u,p,d,m,h=e,g=!0,f=!0,b=this.posMax,v=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;h0&&n++,"text"===a[t].type&&t+1=0&&(r=this.attrs[t][1]),r},t.prototype.attrJoin=function(e,t){var r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t},e.exports=t},2098:function(e){"use strict";var t={};function r(e,n){var a;return"string"!=typeof n&&(n=r.defaultChars),a=function(e){var r,n,a=t[e];if(a)return a;for(a=t[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),a.push(n);for(r=0;r=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&n)&&t+91114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}r.defaultChars=";/?:@&=+$,#",r.componentChars="",e.exports=r},9401:function(e){"use strict";var t={};function r(e,n,a){var o,i,s,l,c,u="";for("string"!=typeof n&&(a=n,n=r.defaultChars),void 0===a&&(a=!0),c=function(e){var r,n,a=t[e];if(a)return a;for(a=t[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),/^[0-9a-z]$/i.test(n)?a.push(n):a.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r=55296&&s<=57343){if(s>=55296&&s<=56319&&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}r.defaultChars=";/?:@&=+$,-_.!~*'()#",r.componentChars="-_.!~*'()",e.exports=r},6558:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},6664:function(e,t,r){"use strict";e.exports.encode=r(9401),e.exports.decode=r(2098),e.exports.format=r(6558),e.exports.parse=r(5)},5:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var n,o,i,m,h,g=e;if(g=g.trim(),!t&&1===e.split("#").length){var f=a.exec(g);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=r.exec(g);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,g=g.substr(b.length)),(t||b||g.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===g.substr(0,2))||b&&p[b]||(g=g.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(n=0;n127?j+="x":j+=C[x];if(!j.match(c)){var T=_.slice(0,n),N=_.slice(n+1),A=C.match(u);A&&(T.push(A[1]),N.unshift(A[2])),N.length&&(g=N.join(".")+g),this.hostname=T.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var P=g.indexOf("#");-1!==P&&(this.hash=g.substr(P),g=g.slice(0,P));var I=g.indexOf("?");return-1!==I&&(this.search=g.substr(I),g=g.slice(0,I)),g&&(this.pathname=g),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=n.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,r){if(e&&e instanceof t)return e;var n=new t;return n.parse(e,r),n}},8282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},2002:function(e){var t=1e3,r=60*t,n=60*r,a=24*n,o=7*a,i=365.25*a;function s(e,t,r,n){var a=t>=1.5*r;return Math.round(e/r)+" "+n+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=n)return s(e,o,n,"hour");if(o>=r)return s(e,o,r,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=n)return Math.round(e/n)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(a){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c0&&l>s&&(l=s);for(var c=0;c=0?(u=h.substr(0,g),p=h.substr(g+1)):(u=h,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),t(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},8527:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,a){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+n;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(r):o+encodeURIComponent(t(e[a]))})).join(r):a?encodeURIComponent(t(a))+n+encodeURIComponent(t(e)):""}},6250:function(e,t,r){"use strict";t.decode=t.parse=r(753),t.encode=t.stringify=r(8527)},7234:function(e,t,r){"use strict";var n=r(6141),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=r(524),i=r(7477),s=r(335),l="function"==typeof Symbol&&Symbol.iterator;function c(e,t){return e&&"object"==typeof e&&null!=e.key?(r=e.key,n={"=":"=0",":":"=2"},"$"+(""+r).replace(/[=:]/g,(function(e){return n[e]}))):t.toString(36);var r,n}function u(e,t,r,n){var o,s=typeof e;if("undefined"!==s&&"boolean"!==s||(e=null),null===e||"string"===s||"number"===s||"object"===s&&e.$$typeof===a)return r(n,e,""===t?"."+c(e,0):t),1;var p=0,d=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m0},e.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;i.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new r,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=l.getInstance(),n=new y(t,r,this);E.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));var _=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.Z=_},8211:function(e){"use strict";var t=256,r=[],n=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,l=Math.random;function c(e){var r,n=e.length,a=this,o=0,i=a.i=a.j=0,l=a.S=[];for(n||(e=[n++]);o=i;)e/=2,r/=2,n>>>=1;return(e+n)/r}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),r)},5702:function(e,t,r){const n=Symbol("SemVer ANY");class a{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(t){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||o&&i||s||c}}e.exports=a;const o=r(5265),{re:i,t:s}=r(5698),l=r(8937),c=r(2840),u=r(8208),p=r(5062)},5062:function(e,t,r){class n{constructor(e,t){if(t=o(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&g(t[0])){this.set=[t];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=a.get(t);if(r)return r;const n=this.options.loose,o=n?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,S(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),s("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],m)).split(/\s+/).join(" ");const l=n?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],g=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>x(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new i(e,this.options))),f=(g.length,new Map);for(const a of g){if(h(a))return[a];f.set(a.value,a)}f.size>1&&f.has("")&&f.delete("");const v=[...f.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>f(r,t)&&e.set.some((e=>f(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(t){return!1}for(let r=0;r"<0.0.0-0"===e.value,g=e=>""===e.value,f=(e,t)=>{let r=!0;const n=e.slice();let a=n.pop();for(;r&&n.length;)r=n.every((e=>a.intersects(e,t))),a=n.pop();return r},b=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=k(e,t),s("tildes",e),e=_(e,t),s("xrange",e),e=j(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,k=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const r=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(r,((t,r,n,a,o)=>{let i;return s("tilde",e,t,r,n,a,o),v(r)?i="":v(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:v(a)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(s("replaceTilde pr",o),i=`>=${r}.${n}.${a}-${o} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${a} <${r}.${+n+1}.0-0`,s("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{s("caret",e,t);const r=t.loose?c[u.CARETLOOSE]:c[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,a,o,i)=>{let l;return s("caret",e,t,r,a,o,i),v(r)?l="":v(a)?l=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(o)?l="0"===r?`>=${r}.${a}.0${n} <${r}.${+a+1}.0-0`:`>=${r}.${a}.0${n} <${+r+1}.0.0-0`:i?(s("replaceCaret pr",i),l="0"===r?"0"===a?`>=${r}.${a}.${o}-${i} <${r}.${a}.${+o+1}-0`:`>=${r}.${a}.${o}-${i} <${r}.${+a+1}.0-0`:`>=${r}.${a}.${o}-${i} <${+r+1}.0.0-0`):(s("no pr"),l="0"===r?"0"===a?`>=${r}.${a}.${o}${n} <${r}.${a}.${+o+1}-0`:`>=${r}.${a}.${o}${n} <${r}.${+a+1}.0-0`:`>=${r}.${a}.${o} <${+r+1}.0.0-0`),s("caret return",l),l}))},_=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const r=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(r,((r,n,a,o,i,l)=>{s("xRange",e,r,n,a,o,i,l);const c=v(a),u=c||v(o),p=u||v(i),d=p;return"="===n&&d&&(n=""),l=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(o=0),i=0,">"===n?(n=">=",u?(a=+a+1,o=0,i=0):(o=+o+1,i=0)):"<="===n&&(n="<",u?a=+a+1:o=+o+1),"<"===n&&(l="-0"),r=`${n+a}.${o}.${i}${l}`):u?r=`>=${a}.0.0${l} <${+a+1}.0.0-0`:p&&(r=`>=${a}.${o}.0${l} <${a}.${+o+1}.0-0`),s("xRange return",r),r}))},j=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),x=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),S=e=>(t,r,n,a,o,i,s,l,c,u,p,d,m)=>`${r=v(n)?"":v(a)?`>=${n}.0.0${e?"-0":""}`:v(o)?`>=${n}.${a}.0${e?"-0":""}`:i?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),T=(e,t,r)=>{for(let n=0;n0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},8208:function(e,t,r){const n=r(2840),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=r(9609),{re:i,t:s}=r(5698),l=r(5265),{compareIdentifiers:c}=r(5322);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},2045:function(e,t,r){const n=r(8675);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},8937:function(e,t,r){const n=r(2969),a=r(4619),o=r(4765),i=r(1767),s=r(3590),l=r(4638);e.exports=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return a(e,r,c);case">":return o(e,r,c);case">=":return i(e,r,c);case"<":return s(e,r,c);case"<=":return l(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},2977:function(e,t,r){const n=r(8208),a=r(8675),{re:o,t:i}=r(5698);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else r=e.match(o[i.COERCE]);return null===r?null:a(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},8230:function(e,t,r){const n=r(8208);e.exports=(e,t,r)=>{const a=new n(e,r),o=new n(t,r);return a.compare(o)||a.compareBuild(o)}},5112:function(e,t,r){const n=r(192);e.exports=(e,t)=>n(e,t,!0)},192:function(e,t,r){const n=r(8208);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},3751:function(e,t,r){const n=r(8675),a=r(2969);e.exports=(e,t)=>{if(a(e,t))return null;{const r=n(e),a=n(t),o=r.prerelease.length||a.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==a[e])return i+e;return s}}},2969:function(e,t,r){const n=r(192);e.exports=(e,t,r)=>0===n(e,t,r)},4765:function(e,t,r){const n=r(192);e.exports=(e,t,r)=>n(e,t,r)>0},1767:function(e,t,r){const n=r(192);e.exports=(e,t,r)=>n(e,t,r)>=0},177:function(e,t,r){const n=r(8208);e.exports=(e,t,r,a)=>{"string"==typeof r&&(a=r,r=void 0);try{return new n(e,r).inc(t,a).version}catch(o){return null}}},3590:function(e,t,r){const n=r(192);e.exports=(e,t,r)=>n(e,t,r)<0},4638:function(e,t,r){const n=r(192);e.exports=(e,t,r)=>n(e,t,r)<=0},1847:function(e,t,r){const n=r(8208);e.exports=(e,t)=>new n(e,t).major},7989:function(e,t,r){const n=r(8208);e.exports=(e,t)=>new n(e,t).minor},4619:function(e,t,r){const n=r(192);e.exports=(e,t,r)=>0!==n(e,t,r)},8675:function(e,t,r){const{MAX_LENGTH:n}=r(9609),{re:a,t:o}=r(5698),i=r(8208),s=r(5265);e.exports=(e,t)=>{if(t=s(t),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new i(e,t)}catch(r){return null}}},8906:function(e,t,r){const n=r(8208);e.exports=(e,t)=>new n(e,t).patch},5676:function(e,t,r){const n=r(8675);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},2576:function(e,t,r){const n=r(192);e.exports=(e,t,r)=>n(t,e,r)},5709:function(e,t,r){const n=r(8230);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},3907:function(e,t,r){const n=r(5062);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(a){return!1}return t.test(e)}},1978:function(e,t,r){const n=r(8230);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},5641:function(e,t,r){const n=r(8675);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},3377:function(e,t,r){const n=r(5698);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(9609).SEMVER_SPEC_VERSION,SemVer:r(8208),compareIdentifiers:r(5322).compareIdentifiers,rcompareIdentifiers:r(5322).rcompareIdentifiers,parse:r(8675),valid:r(5641),clean:r(2045),inc:r(177),diff:r(3751),major:r(1847),minor:r(7989),patch:r(8906),prerelease:r(5676),compare:r(192),rcompare:r(2576),compareLoose:r(5112),compareBuild:r(8230),sort:r(1978),rsort:r(5709),gt:r(4765),lt:r(3590),eq:r(2969),neq:r(4619),gte:r(1767),lte:r(4638),cmp:r(8937),coerce:r(2977),Comparator:r(5702),Range:r(5062),satisfies:r(3907),toComparators:r(6055),maxSatisfying:r(3422),minSatisfying:r(7212),minVersion:r(9077),validRange:r(3140),outside:r(4494),gtr:r(2824),ltr:r(4370),intersects:r(723),simplifyRange:r(3589),subset:r(4992)}},9609:function(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},2840:function(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},5322:function(e){const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),a=t.test(r);return n&&a&&(e=+e,r=+r),e===r?0:n&&!a?-1:a&&!n?1:er(t,e)}},5265:function(e){const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},5698:function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=r(9609),a=r(2840),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let l=0;const c=(e,t,r)=>{const n=l++;a(n,t),s[e]=n,i[n]=t,o[n]=new RegExp(t,r?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},2824:function(e,t,r){const n=r(4494);e.exports=(e,t,r)=>n(e,t,">",r)},723:function(e,t,r){const n=r(5062);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))},4370:function(e,t,r){const n=r(4494);e.exports=(e,t,r)=>n(e,t,"<",r)},3422:function(e,t,r){const n=r(8208),a=r(5062);e.exports=(e,t,r)=>{let o=null,i=null,s=null;try{s=new a(t,r)}catch(l){return null}return e.forEach((e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new n(o,r)))})),o}},7212:function(e,t,r){const n=r(8208),a=r(5062);e.exports=(e,t,r)=>{let o=null,i=null,s=null;try{s=new a(t,r)}catch(l){return null}return e.forEach((e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new n(o,r)))})),o}},9077:function(e,t,r){const n=r(8208),a=r(5062),o=r(4765);e.exports=(e,t)=>{e=new a(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let a=0;a{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!o(r,i)||(r=i)}return r&&e.test(r)?r:null}},4494:function(e,t,r){const n=r(8208),a=r(5702),{ANY:o}=a,i=r(5062),s=r(3907),l=r(4765),c=r(3590),u=r(4638),p=r(1767);e.exports=(e,t,r,d)=>{let m,h,g,f,b;switch(e=new n(e,d),t=new i(t,d),r){case">":m=l,h=u,g=c,f=">",b=">=";break;case"<":m=c,h=p,g=l,f="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let n=0;n{e.semver===o&&(e=new a(">=0.0.0")),i=i||e,s=s||e,m(e.semver,i.semver,d)?i=e:g(e.semver,s.semver,d)&&(s=e)})),i.operator===f||i.operator===b)return!1;if((!s.operator||s.operator===f)&&h(e,s.semver))return!1;if(s.operator===b&&g(e,s.semver))return!1}return!0}},3589:function(e,t,r){const n=r(3907),a=r(192);e.exports=(e,t,r)=>{const o=[];let i=null,s=null;const l=e.sort(((e,t)=>a(e,t,r)));for(const a of l){n(a,t,r)?(s=a,i||(i=a)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[n,a]of o)n===a?c.push(n):a||n!==l[0]?a?n===l[0]?c.push(`<=${a}`):c.push(`${n} - ${a}`):c.push(`>=${n}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?[new a(">=0.0.0-0")]:[new a(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=[new a(">=0.0.0")]}const n=new Set;let l,p,d,m,h,g,f;for(const a of e)">"===a.operator||">="===a.operator?l=c(l,a,r):"<"===a.operator||"<="===a.operator?p=u(p,a,r):n.add(a.semver);if(n.size>1)return null;if(l&&p){if(d=s(l.semver,p.semver,r),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==p.operator))return null}for(const a of n){if(l&&!i(a,String(l),r))return null;if(p&&!i(a,String(p),r))return null;for(const e of t)if(!i(a,String(e),r))return!1;return!0}let b=!(!p||r.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const a of t){if(f=f||">"===a.operator||">="===a.operator,g=g||"<"===a.operator||"<="===a.operator,l)if(v&&a.semver.prerelease&&a.semver.prerelease.length&&a.semver.major===v.major&&a.semver.minor===v.minor&&a.semver.patch===v.patch&&(v=!1),">"===a.operator||">="===a.operator){if(m=c(l,a,r),m===a&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,String(a),r))return!1;if(p)if(b&&a.semver.prerelease&&a.semver.prerelease.length&&a.semver.major===b.major&&a.semver.minor===b.minor&&a.semver.patch===b.patch&&(b=!1),"<"===a.operator||"<="===a.operator){if(h=u(p,a,r),h===a&&h!==p)return!1}else if("<="===p.operator&&!i(p.semver,String(a),r))return!1;if(!a.operator&&(p||l)&&0!==d)return!1}return!(l&&g&&!p&&0!==d)&&(!(p&&f&&!l&&0!==d)&&(!v&&!b))},c=(e,t,r)=>{if(!e)return t;const n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,r)=>{if(!e)return t;const n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let a=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},6055:function(e,t,r){const n=r(5062);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},3140:function(e,t,r){const n=r(5062);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(r){return null}}},8090:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(7478),a={contextDelimiter:"",onMissingKey:null};function o(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},a)this.options[r]=void 0!==t&&r in t?t[r]:a[r]}o.prototype.getPluralForm=function(e,t){var r,a,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(a=function(e){var t,r,n;for(t=e.split(";"),r=0;r{const{day:r}=this.props,{opening:n,closing:o}=e;return(0,a.createElement)(a.Fragment,{key:t},(0,a.createElement)("div",{className:"business-hours__row"},(0,a.createElement)("div",{className:h()(r.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,a.createElement)("div",{className:h()(r.name,"business-hours__hours")},(0,a.createElement)(i.TextControl,{type:"time",label:__("Opening","jetpack"),value:n,className:"business-hours__open",placeholder:v,onChange:e=>{this.setHour(e,"opening",t)}}),(0,a.createElement)(i.TextControl,{type:"time",label:__("Closing","jetpack"),value:o,className:"business-hours__close",placeholder:k,onChange:e=>{this.setHour(e,"closing",t)}})),(0,a.createElement)("div",{className:"business-hours__remove"},r.hours.length>1&&(0,a.createElement)(i.Button,{isSmall:!0,isLink:!0,icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===r.hours.length-1&&(0,a.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,a.createElement)("div",{className:h()(r.name,"business-hours__day")}," "),(0,a.createElement)("div",{className:h()(r.name,"business-hours__hours")},(0,a.createElement)(i.Button,{isLink:!0,label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,a.createElement)("div",{className:"business-hours__remove"}," ")))})),u()(this,"setHour",((e,t,r)=>{const{day:n,attributes:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===n.name?{...a,hours:a.hours.map(((n,a)=>a===r?{...n,[t]:e}:n))}:a))})})),u()(this,"toggleClosed",(e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:a}=r;n({days:a.map((r=>{if(r.name===t.name){const t=e?[{opening:v,closing:k}]:[];return{...r,hours:t}}return r}))})})),u()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:r}=this.props,{days:n}=t;e.hours.push({opening:"",closing:""}),r({days:n.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),u()(this,"removeInterval",(e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:a}=r;n({days:a.map((r=>t.name===r.name?{...r,hours:r.hours.filter(((t,r)=>e!==r))}:r))})}))}isClosed(){const{day:e}=this.props;return(0,b.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,a.createElement)(i.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,a.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,a.createElement)("div",{className:h()(e.name,"business-hours__day")},this.renderDayToggle()),(0,a.createElement)("div",{className:h()(e.name,"closed","business-hours__hours")}," "),(0,a.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}var E=y;const _x=o._x;class w extends a.Component{constructor(...e){super(...e),u()(this,"renderInterval",((e,t)=>{const{day:r}=this.props,n=r.hours;return(0,a.createElement)("span",{key:t},(0,o.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),n.length>1+t&&(0,a.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[r,n]=e.split(":"),a=new Date;return!(!r||!n)&&(a.setHours(r),a.setMinutes(n),(0,g.date)(t,a))}render(){const{day:e,localization:t}=this.props,r=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,a.createElement)("div",{className:"jetpack-business-hours__item"},(0,a.createElement)("dt",{className:e.name},t.days[e.name]),(0,a.createElement)("dd",null,(0,b.isEmpty)(r)?_x("Closed","business is closed on a full day","jetpack"):r.map(this.renderInterval),(0,a.createElement)("br",null)))}}var _=w;const C=o.__,j={days:{Sun:C("Sunday","jetpack"),Mon:C("Monday","jetpack"),Tue:C("Tuesday","jetpack"),Wed:C("Wednesday","jetpack"),Thu:C("Thursday","jetpack"),Fri:C("Friday","jetpack"),Sat:C("Saturday","jetpack")},startOfWeek:0};class x extends a.Component{constructor(...e){super(...e),u()(this,"state",{localization:j,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:j},(()=>{d()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:j,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:r}=this.props,{days:n}=e,{localization:o,hasFetched:s}=this.state,{startOfWeek:c}=o,u=n.concat(n.slice(0,c)).slice(c);if(!s)return(0,a.createElement)(i.Placeholder,{icon:(0,a.createElement)(f.BlockIcon,{icon:M}),label:C("Loading business hours","jetpack")});if(!r){const e=(0,g.__experimentalGetSettings)(),{formats:{time:r}}=e;return(0,a.createElement)("dl",{className:h()(t,"jetpack-business-hours")},u.map(((e,t)=>(0,a.createElement)(_,{key:t,day:e,localization:o,timeFormat:r}))))}return(0,a.createElement)("div",{className:h()(t,"is-edit")},u.map(((e,t)=>(0,a.createElement)(E,l()({key:t,day:e,localization:o},this.props)))))}}var S=x,T=r(4541),N=r(2750);const A=o.__,P=o._x,I=[{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:[]}],M=(0,T.Z)((0,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"})),R={title:A("Business Hours","jetpack"),description:A("Display opening hours for your business.","jetpack"),icon:{src:M,foreground:(0,N.m)()},category:"grow",supports:{html:!0},keywords:[P("opening hours","block search term","jetpack"),P("closing time","block search term","jetpack"),P("schedule","block search term","jetpack"),P("working day","block search term","jetpack")],attributes:{days:{type:"array",default:I}},edit:e=>(0,a.createElement)(S,e),save:()=>null,example:{attributes:{days:I}}};(0,n.Z)("business-hours",R)},2892:function(e,t,r){"use strict";r.d(t,{Z:function(){return p},h:function(){return d}});var n=r(3027),a=r(9105),o=r.n(a),i=r(7997),s=r(3163);const __=s.__,l=[{value:"px",label:"px",default:150},{value:"%",label:"%",default:100},{value:"em",label:"em",default:10}],c=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function p(e){return(0,n.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,n.createElement)(d,e))}function d({align:e,width:t,onChange:r}){const[a,s]=(0,n.useState)(null);(0,n.useEffect)((()=>{void 0===t&&s("px")}),[t]);const p="left"===e||"right"===e;return(0,n.createElement)(i.BaseControl,{label:__("Button width","jetpack")},(0,n.createElement)("div",{className:o()("jetpack-button__width-settings",{"is-aligned":p})},!p&&(0,n.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},u.map((e=>(0,n.createElement)(i.Button,{key:e,isSmall:!0,isPrimary:e===t,onClick:()=>function(e){const n=t===e?void 0:e;s("%"),r(n)}(e)},e)))),(0,n.createElement)(i.__experimentalUnitControl,{className:"jetpack-button__custom-width",isResetValueOnUnitChange:!0,max:"%"===a||null!=t&&t.includes("%")?100:void 0,min:0,onChange:e=>r(e),onUnitChange:e=>s(e),size:"small",units:p?c:l,value:t,unit:a})))}},5402:function(e,t,r){"use strict";var n=r(8952),a=r(3163),o=r(7432),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.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:o.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}},s=r(8900),l=r.n(s),c=r(3027),u=r(9105),p=r.n(u),d=r(6399),m=r(1417),h=r(3804),g=r(7997);var f=(0,g.withFallbackStyles)(((e,t)=>{const{backgroundColor:r,textColor:n}=t,a=(0,h.get)(r,"color"),o=!(0,h.get)(n,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:n||!o?void 0:getComputedStyle(o).color}}));const b=!!d.__experimentalUseGradient,__=a.__;function v({borderRadius:e="",setAttributes:t}){const r=(0,c.useCallback)((e=>t({borderRadius:e})),[t]);return(0,c.createElement)(g.PanelBody,{title:__("Border Settings","jetpack")},(0,c.createElement)(g.RangeControl,{allowReset:!0,initialPosition:5,label:__("Border radius","jetpack"),max:50,min:0,onChange:r,value:e}))}const k=a.__;function y({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:r,fallbackTextColor:n,gradientValue:a,setBackgroundColor:o,setGradient:i,setTextColor:s,textColor:l}){const u=(0,c.createElement)(d.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:r,fallbackTextColor:n,isLargeText:!1,textColor:l.color});return e?(0,c.createElement)(d.__experimentalPanelColorGradientSettings,{settings:[{colorValue:l.color,label:k("Text Color","jetpack"),onColorChange:s},{colorValue:t.color,gradientValue:a,label:k("Background","jetpack"),onColorChange:o,onGradientChange:i}],title:k("Background & Text Color","jetpack")},u):(0,c.createElement)(d.PanelColorSettings,{colorSettings:[{value:l.color,onChange:s,label:k("Text Color","jetpack")},{value:t.color,onChange:o,label:k("Background","jetpack")}],title:k("Background & Text Color","jetpack")},u)}var E=r(2892);function w({attributes:e,backgroundColor:t,fallbackBackgroundColor:r,fallbackTextColor:n,setAttributes:a,setBackgroundColor:o,setTextColor:i,textColor:s,gradientValue:l,setGradient:u,isGradientAvailable:p}){const{align:d,borderRadius:m,width:h}=e;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(y,{backgroundColor:t,fallbackBackgroundColor:r,fallbackTextColor:n,gradientValue:l,setBackgroundColor:o,setGradient:u,setTextColor:i,textColor:s,isGradientAvailable:p}),(0,c.createElement)(v,{borderRadius:m,setAttributes:a}),(0,c.createElement)(E.Z,{align:d,width:h,onChange:e=>a({width:e})}))}var _=r(5707);const C=a.__;var j=(0,m.compose)((0,d.withColors)({backgroundColor:"background-color"},{textColor:"color"}),f)((function(e){const{attributes:t,backgroundColor:r,className:n,clientId:a,setAttributes:o,textColor:i}=e,{align:s,borderRadius:u,element:m,placeholder:g,text:f,width:v}=t,k=(e=>{const t=(0,c.useRef)();return(0,c.useEffect)((()=>{t.current=e}),[e]),t.current})(s);!function({attributes:e,clientId:t,setAttributes:r}){const{passthroughAttributes:n}=e,{attributesToSync:a}=(0,_.useSelect)((r=>{const{getBlockAttributes:a,getBlockRootClientId:o}=r("core/block-editor"),i=a(o(t))||{},s=(0,h.mapValues)(n,(e=>i[e]));return{attributesToSync:(0,h.pickBy)(s,((t,r)=>t!==e[r]))}}));(0,c.useEffect)((()=>{(0,h.isEmpty)(a)||r(a)}),[a,r])}({attributes:t,clientId:a,setAttributes:o}),(0,c.useEffect)((()=>{k!==s&&("left"===s||"right"===s)&&null!=v&&v.includes("%")&&o({width:void 0})}),[s,k,o,v]);const{gradientClass:y,gradientValue:E,setGradient:j}=b?(0,d.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},x=p()("wp-block-button",n),S=p()("wp-block-button__link",{"has-background":r.color||E,[r.class]:!E&&r.class,"has-text-color":i.color,[i.class]:i.class,[y]:y,"no-border-radius":0===u,"has-custom-width":!!v}),T={...!r.color&&E?{background:E}:{backgroundColor:r.color},color:i.color,borderRadius:u?u+"px":void 0,width:v};return(0,c.createElement)("div",{className:x},(0,c.createElement)(d.RichText,{allowedFormats:"input"===m?[]:void 0,className:S,disableLineBreaks:"input"===m,onChange:e=>{const t="input"===m?e.replace(/
/gim," "):e;o({text:t})},placeholder:g||C("Add text…","jetpack"),style:T,value:f,withoutInteractiveFormatting:!0}),(0,c.createElement)(d.InspectorControls,null,(0,c.createElement)(w,l()({gradientValue:E,setGradient:j,isGradientAvailable:b},e))))})),x=(0,c.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,c.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 S=r(6012);const T=a.__,N={title:T("Button","jetpack"),icon:x,category:(0,S.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:T("Fill","jetpack"),isDefault:!0},{name:"outline",label:T("Outline","jetpack")}],attributes:i,edit:j,save:function({attributes:e,blockName:t,uniqueId:r}){const{backgroundColor:n,borderRadius:a,className:o,customBackgroundColor:i,customGradient:s,customTextColor:l,gradient:u,saveInPostContent:m,text:h,textColor:g,url:f,width:v}=e;if(!m)return null;const k=(0,d.getColorClassName)("background-color",n),y=b?(0,d.__experimentalGetGradientClass)(u):void 0,E=(0,d.getColorClassName)("color",g),w=p()("wp-block-button","jetpack-submit-button",o,{[`wp-block-jetpack-${t}`]:t}),_=p()("wp-block-button__link",{"has-text-color":g||l,[E]:E,"has-background":n||u||i||s,[k]:k,[y]:y,"no-border-radius":0===a,"has-custom-width":!!v}),C={background:s||void 0,backgroundColor:k||s||u?void 0:i,color:E?void 0:l,borderRadius:a?a+"px":void 0,width:v};return(0,c.createElement)("div",{className:w},(0,c.createElement)(d.RichText.Content,{className:_,"data-id-attr":r||"placeholder",href:f,id:r,rel:"noopener noreferrer",role:"button",style:C,tagName:"a",target:"_blank",value:h}))}};(0,n.Z)("button",N)},9698:function(e,t,r){"use strict";var n=r(8952),a=r(3163),o=r(9314),i=r(7432);var s={backgroundColor:{type:"string",default:"ffffff",validator:i.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}},l=r(3027);const __=a.__;var c={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:r,submitButtonBackgroundColor:n,submitButtonClasses:a,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,o.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:({attributes:{url:e}})=>(0,l.createElement)("a",{href:e},e)},u=r(8900),p=r.n(u),d=(r(6841),r(3804)),m=r(4286),h=r(6399),g=r(7997),f=r(5707),b=(0,l.createElement)(g.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(g.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"})),v=r(3353);const k=/(^|\/\/)(calendly\.com[^"']*)/i,y=e=>{if(!e)return;const t=(e=>{const t=e.match(k);if(t)return"https://"+t[2]})(e);if(!t)return;const r=(e=>{const t={},r=new URL(e);if(t.url=r.origin+r.pathname,!r.search)return t;const n=new URLSearchParams(r.search),a=n.get("background_color"),o=n.get("primary_color"),i=n.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return n.get("hide_event_type_details")&&(t.hideEventTypeDetails=n.get("hide_event_type_details")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),n=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(n&&(r.style=n),"link"===n){r.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(r.buttonAttributes.text=t);const n=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);n&&(r.buttonAttributes.textColor=void 0,r.buttonAttributes.customTextColor=n);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(r.buttonAttributes.backgroundColor=void 0,r.buttonAttributes.customBackgroundColor=a)}return r};var E=r(9737),w=r(9879);const _=a.__,_x=a._x,C=({onEditClick:e})=>(0,l.createElement)(g.ToolbarGroup,null,(0,l.createElement)(g.ToolbarButton,{onClick:()=>e(!0)},_("Edit","jetpack"))),j=e=>{const{attributes:{hideEventTypeDetails:t,url:r},defaultClassName:n,embedCode:a,parseEmbedCode:o,setAttributes:i,setEmbedCode:s}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(g.PanelBody,{PanelBody:!0,title:_("Calendar settings","jetpack"),initialOpen:!1},(0,l.createElement)("form",{onSubmit:o,className:`${n}-embed-form-sidebar`},(0,l.createElement)("input",{type:"text",id:"embedCode",onChange:e=>s(e.target.value),placeholder:_("Calendly web address or embed code…","jetpack"),value:a||"",className:"components-placeholder__input"}),(0,l.createElement)("div",null,(0,l.createElement)(g.Button,{isSecondary:!0,type:"submit"},_x("Embed","button label","jetpack")))),(0,l.createElement)(g.ToggleControl,{label:_("Hide event type details","jetpack"),checked:t,onChange:()=>i({hideEventTypeDetails:!t})})),r&&(0,l.createElement)(g.Notice,{className:`${n}-color-notice`,isDismissible:!1},(0,l.createElement)(g.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},_("Follow these instructions to change the colors in this block.","jetpack"))))};var x=e=>{const{attributes:t,clientId:r,isEditingUrl:n,setAttributes:a,setIsEditingUrl:o}=e,{style:i,url:s}=t,c=[{value:"inline",label:_("Inline","jetpack")},{value:"link",label:_("Link","jetpack")}];return(0,l.createElement)(l.Fragment,null,s&&!n&&(0,l.createElement)(h.BlockControls,null,(0,l.createElement)(C,{onEditClick:o})),s&&(0,l.createElement)(w.Z,{clientId:r,styleOptions:c,onSelectStyle:a,activeStyle:i,attributes:t,viewportWidth:500}),(0,l.createElement)(h.InspectorControls,null,(0,l.createElement)(j,e)))};const S=a.__,T=a._x;var N=(0,g.withNotices)((function(e){const{attributes:t,className:r,clientId:n,name:a,noticeOperations:i,noticeUI:c,setAttributes:u}=e,k=(0,o.getBlockDefaultClassName)(a),w=(0,v.S)(s,t);(0,d.isEqual)(w,t)||u(w);const{backgroundColor:_,hideEventTypeDetails:C,primaryColor:j,textColor:N,style:A,url:P}=w,[I,L]=(0,l.useState)(P),[B,D]=(0,l.useState)(!1),[F,O]=(0,l.useState)(!1),[z,$]=(0,l.useState)({}),U=()=>{i.removeAllNotices(),i.createErrorNotice(S("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,l.useEffect)((()=>{P&&M!==P&&"link"!==A&&(0,E.Z)(P,O).catch((()=>{u({url:void 0}),U()}))}),[]);const V=e=>{if(!e)return void U();e.preventDefault();const t=y(I);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,f.select)("core/editor").getBlocksByClientId(n);e.length&&e[0].innerBlocks.forEach((e=>{(0,f.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),$(t.buttonAttributes)}(0,E.Z)(t.url,O).then((()=>{const e=(0,v.S)(s,t);u(e),D(!1),i.removeAllNotices()})).catch((()=>{u({url:void 0}),U()}))}else U()},G=(0,l.createElement)("div",{className:"wp-block-embed is-loading"},(0,l.createElement)(g.Spinner,null),(0,l.createElement)("p",null,S("Embedding…","jetpack"))),q=(0,l.createElement)(g.Placeholder,{label:S("Calendly","jetpack"),instructions:S("Enter your Calendly web address or embed code below.","jetpack"),icon:(0,l.createElement)(h.BlockIcon,{icon:b}),notices:c},(0,l.createElement)("form",{onSubmit:V},(0,l.createElement)("input",{type:"text",id:"embedCode",onChange:e=>L(e.target.value),placeholder:S("Calendly web address or embed code…","jetpack"),value:I||"",className:"components-placeholder__input"}),(0,l.createElement)("div",null,(0,l.createElement)(g.Button,{isSecondary:!0,type:"submit"},T("Embed","button label","jetpack")))),(0,l.createElement)("div",{className:`${k}-learn-more`},(0,l.createElement)(g.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},S("Need help finding your embed code?","jetpack")))),H=(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:`${k}-overlay`}),(0,l.createElement)("iframe",{src:(()=>{const e=m.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:C?1:0,background_color:_,primary_color:j,text_color:N});return`${P}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),Z=(0,l.createElement)(h.InnerBlocks,{template:[[R.name,{...R.attributes,...z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(F)return G;let W=r;return P&&!B&&(W+=` calendly-style-${A}`),(0,l.createElement)("div",{className:W},(0,l.createElement)(x,p()({},e,{defaultClassName:k,embedCode:I,isEditingUrl:B,parseEmbedCode:V,setEmbedCode:L,setIsEditingUrl:D})),P&&!B?"inline"===A?H:Z:q)}));var A=r(2750);const P=a.__,I=a._x,M="https://calendly.com/wordpresscom/jetpack-block-example",R={name:"jetpack/button",attributes:{element:"a",text:P("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:M}},L={title:P("Calendly","jetpack"),description:P("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:b,foreground:(0,A.m)()},category:"grow",keywords:[I("calendar","block search term","jetpack"),I("schedule","block search term","jetpack"),I("appointments","block search term","jetpack"),I("events","block search term","jetpack"),I("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:N,save:function(){return(0,l.createElement)("div",null,(0,l.createElement)(h.InnerBlocks.Content,null))},attributes:s,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:M},innerBlocks:[R]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&k.test(e.textContent),transform:e=>{const t=y(e.textContent);return(0,o.createBlock)("jetpack/calendly",t)}}]},deprecated:[c]};(0,n.Z)("calendly",L)},3789:function(e,t,r){"use strict";var n=r(3027),a=r(3163),o=r(6399);const __=a.__;t.Z=({setAttributes:e,label:t,labelFieldName:r,placeholder:a,resetFocus:i,required:s})=>(0,n.createElement)("div",{className:"jetpack-field-label"},(0,n.createElement)(o.RichText,{tagName:"label",value:t,className:"jetpack-field-label__input",onChange:t=>{i&&i(),e(r?{[r]:t}:{label:t})},placeholder:null!=a?a:__("Add label…","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),s&&(0,n.createElement)("span",{className:"required"},__("(required)","jetpack")))},4163:function(e,t,r){"use strict";var n=r(8952),a=r(3027),o=r(3163),i=r(9314),s=r(7997),l=r(6399),c=r(3804),u=r(9105),p=r.n(u),d=r(9453),m=r(1417),h=r(5707),g=r(3983),f=r(2684),b=r(2975),v=r(4541),k=r(2750);const __=o.__;var y=(0,c.compact)([{name:"contact-form",title:__("Contact Form","jetpack"),description:__("Add a contact form to your page.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M21.99 8c0-.72-.37-1.35-.94-1.7l-8.04-4.71c-.62-.37-1.4-.37-2.02 0L2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zm-11.05 4.34l-7.2-4.5 7.25-4.25c.62-.37 1.4-.37 2.02 0l7.25 4.25-7.2 4.5c-.65.4-1.47.4-2.12 0z"}),48,48,"-4 -4 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-textarea",{}],["jetpack/button",{text:__("Contact Us","jetpack"),element:"button"}]]},!(0,b.Wp)()&&{name:"newsletter-form",title:__("Newsletter Sign-up","jetpack"),description:__("A simple way to collect information from folks visiting your site.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M37.9999 7.59998C49.3999 7.59998 68.3999 26.6 68.3999 26.6V68.4H7.59985V26.6C7.59985 26.6 26.5999 7.59998 37.9999 7.59998ZM64.5999 63.536L50.4259 52.44L64.5999 41.8L62.9659 40.394L54.3779 45.334L55.2899 28.956L21.9639 26.98L20.2159 44.232L12.6539 40.622L11.3999 41.8L25.5739 52.44L12.5019 63.27L14.0219 64.904L37.9999 49.4L62.8139 65.17L64.5999 63.536Z"}),48,48,"-6 -6 92 92"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-consent",{}],["jetpack/button",{text:__("Subscribe","jetpack"),element:"button"}]]},{name:"rsvp-form",title:__("RSVP Form","jetpack"),description:__("Add an RSVP form to your page","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M10 9V7.41c0-.89-1.08-1.34-1.71-.71L3.7 11.29c-.39.39-.39 1.02 0 1.41l4.59 4.59c.63.63 1.71.19 1.71-.7V14.9c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Attending?","jetpack"),required:!0,options:[__("Yes","jetpack"),__("No","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:__("A new RSVP from your website","jetpack")}},{name:"registration-form",title:__("Registration Form","jetpack"),description:__("Add a Registration form to your page","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M11.34 15.02c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95zm2.12-10.61L17 7.95l-4.95 4.95-3.54-3.54 4.95-4.95zm6.95 11l-2.12-2.12c-.18-.18-.44-.29-.7-.29h-.27l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2h-.42c-.27 0-.52.11-.71.29l-2.12 2.12c-.37.38-.58.89-.58 1.42V20c0 1.1.9 2 2 2h14c1.1 0 2-.89 2-2v-3.17c0-.53-.21-1.04-.59-1.42z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{label:__("Phone Number","jetpack")}],["jetpack/field-select",{label:__("How did you hear about us?","jetpack"),options:[__("Search Engine","jetpack"),__("Social Media","jetpack"),__("TV","jetpack"),__("Radio","jetpack"),__("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send","jetpack"),element:"button"}]],attributes:{subject:__("A new registration from your website","jetpack")}},{name:"appointment-form",title:__("Appointment Form","jetpack"),description:__("Add an Appointment booking form to your page","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V8c0-.55-.45-1-1-1s-1 .45-1 1v2H2c-.55 0-1 .45-1 1s.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1v-2h2c.55 0 1-.45 1-1s-.45-1-1-1H6zm9 4c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{required:!0}],["jetpack/field-date",{label:__("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:__("Time","jetpack"),required:!0,options:[__("Morning","jetpack"),__("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:__("Notes","jetpack")}],["jetpack/button",{text:__("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:__("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:__("Feedback Form","jetpack"),description:__("Add a Feedback form to your page","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.03 0 3.8-1.11 4.75-2.75.19-.33-.05-.75-.44-.75H7.69c-.38 0-.63.42-.44.75.95 1.64 2.72 2.75 4.75 2.75z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Please rate our website","jetpack"),required:!0,options:[__("1 - Very Bad","jetpack"),__("2 - Poor","jetpack"),__("3 - Average","jetpack"),__("4 - Good","jetpack"),__("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:__("How could we improve?","jetpack")}],["jetpack/button",{text:__("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:__("New feedback received from your website","jetpack")}}]),E=r(7606),w=r.n(E),_=r(3377),C=r.n(_);const j=o.__;var x=({error:e})=>(0,a.createElement)(s.Notice,{isDismissible:!1,status:"error"},(0,a.createInterpolateElement)(j('The CRM Jetpack Form extension failed to activate. The error message was "".',"jetpack"),{error:(0,a.createElement)("span",null,e)}));const S=o.__,T=({isActivatingExt:e,setIsActivatingExt:t,extActivationError:r,setExtActivationError:n,crmData:o,setCRMData:i})=>{const l=((e,t,r,n)=>()=>{t(void 0),e(!0),w()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((e=>{if("success"!==e.code)throw new Error(e.code);const t=Object.assign({},r);t.jp_form_ext_enabled=!0,n(t)})).catch((e=>{t(e.message)})).finally((()=>{e(!1)}))})(t,n,o,i);return e?(0,a.createElement)(s.Spinner,null):r?(0,a.createElement)(x,{error:r}):(0,a.createElement)(s.Button,{isSecondary:!0,onClick:l},S("Enable Jetpack Forms Extension","jetpack"))},N=()=>(0,a.createElement)("p",{className:"jetpack-contact-form__crm_text"},S("A site administrator must enable the CRM Jetpack Forms extension.","jetpack")),A=()=>(0,a.createElement)("p",{className:"jetpack-contact-form__crm_text"},S("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"));var P=({isActivatingExt:e,setIsActivatingExt:t,extActivationError:r,setExtActivationError:n,crmData:o,setCRMData:i})=>o.can_activate_extension?(0,a.createElement)("div",null,(0,a.createElement)(A,null),(0,a.createElement)("br",null),(0,a.createElement)(T,{isActivatingExt:e,setIsActivatingExt:t,extActivationError:r,setExtActivationError:n,crmData:o,setCRMData:i})):(0,a.createElement)(N,null);const I=o.__,M=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),R=()=>(0,a.createElement)("p",{className:"jetpack-contact-form__crm_text"},I("The Jetpack CRM is installed but has an invalid version.","jetpack")),L=()=>(0,a.createElement)("p",{className:"jetpack-contact-form__crm_text"},I("The Zero BS CRM plugin is now Jetpack CRM. Update to the latest version to integrate your contact form with your CRM.","jetpack")),B=()=>(0,a.createElement)("p",{className:"jetpack-contact-form__crm_text"},(0,a.createInterpolateElement)(I("You can save contacts from Jetpack contact forms in Jetpack CRM. Learn more at jetpackcrm.com","jetpack"),{a:(0,a.createElement)(s.ExternalLink,{href:"https://jetpackcrm.com"})})),D=()=>(0,a.createElement)("p",{className:"jetpack-contact-form__crm_text"},I("You already have the Jetpack CRM plugin installed, but it's not activated. Activate the Jetpack CRM plugin to save contacts from this contact form in your Jetpack CRM.","jetpack")),F=({crmData:e,setCRMData:t,jetpackCRM:r,setAttributes:n})=>{const[o,i]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1);return e.jp_form_ext_enabled?C().satisfies(C().coerce(e.crm_version),"3.0.19 - 4.0.0")?(0,a.createElement)("p",{className:"jetpack-contact-form__crm_text"},I("Contacts from this form will be stored in Jetpack CRM.","jetpack")):(0,a.createElement)(s.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:I("Jetpack CRM","jetpack"),checked:r,onChange:e=>n({jetpackCRM:e}),help:I("Store contact form submissions in your CRM.","jetpack")}):(0,a.createElement)(P,{isActivatingExt:o,setIsActivatingExt:i,extActivationError:l,setExtActivationError:c,crmData:e,setCRMData:t})};var O=({crmData:e,setCRMData:t,jetpackCRM:r,setAttributes:n})=>{const o=C().coerce(e.crm_version);if(e.crm_installed&&!o)return(0,a.createElement)(R,null);if(e.crm_installed&&C().lt(o,"3.0.19"))return(0,a.createElement)(L,null);let i=M.NOT_INSTALLED;return e.crm_active?i=M.ACTIVE:e.crm_installed&&(i=M.INSTALLED),(0,a.createElement)("div",{"aria-live":"polite"},M.ACTIVE===i&&(0,a.createElement)(F,{crmData:e,setCRMData:t,jetpackCRM:r,setAttributes:n}),M.INSTALLED===i&&(0,a.createElement)(D,null),M.NOT_INSTALLED===i&&(0,a.createElement)(B,null))};const z=o.__,$=({isFetchingCRMData:e,hasCRMDataError:t,crmData:r,setCRMData:n,jetpackCRM:o,setAttributes:i})=>e?(0,a.createElement)(s.Spinner,null):t?null:(0,a.createElement)(O,{crmData:r,setCRMData:n,jetpackCRM:o,setAttributes:i});var U=({jetpackCRM:e,setAttributes:t})=>{const[r,n]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!1),[l,c]=(0,a.useState)();return(0,a.useEffect)((()=>{w()({path:"/jetpack/v4/jetpack_crm"}).then((e=>{if(e.error)throw e.message;i(!1),c(e)})).catch((()=>i(!0))).finally((()=>n(!1)))}),[]),(0,a.createElement)(s.PanelBody,{title:z("CRM Integration","jetpack"),initialOpen:!1},(0,a.createElement)(s.BaseControl,null,(0,a.createElement)($,{isFetchingCRMData:r,hasCRMDataError:o,crmData:l,setCRMData:c,jetpackCRM:e,setAttributes:t})))};const V=o.__,G=()=>{const{insertConsentBlock:e}=(()=>{const e=(0,h.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),{insertBlock:t}=(0,h.useDispatch)("core/block-editor");return{insertConsentBlock:(0,a.useCallback)((async()=>{var r;let n=(null!==(r=e.innerBlocks)&&void 0!==r?r:[]).findIndex((({name:e})=>"jetpack/button"===e));var a;-1===n&&(n=(null!==(a=e.innerBlocks)&&void 0!==a?a:[]).length);const o=await(0,i.createBlock)("jetpack/field-consent");await t(o,n,e.clientId,!1)}),[t,e.clientId,e.innerBlocks])}})();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,V("You’re already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),(0,a.createElement)(s.Button,{isSecondary:!0,onClick:e,style:{marginBottom:"1em"}},V("Add email permission request","jetpack")),(0,a.createElement)("br",null))};var q=()=>{const e=(0,h.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);return(0,a.useMemo)((()=>(e=>{const t=e.some((({name:e})=>"jetpack/field-email"===e)),r=e.some((({name:e})=>"jetpack/field-consent"===e));return!!t&&!r})(e.innerBlocks)),[e.innerBlocks])?(0,a.createElement)(G,null):null};async function H(e){if((0,b.Wp)())return Promise.reject();try{return await w()({path:"/jetpack/v4/plugins",method:"POST",data:{slug:e,status:"active",source:"block-editor"}})}catch(t){return Promise.reject(t.message)}}async function Z(e){if((0,b.Wp)())return Promise.reject();try{return await w()({path:`/jetpack/v4/plugins/${e}`,method:"POST",data:{status:"active",source:"block-editor"}})}catch(t){return Promise.reject(t.message)}}const W=o.__;var K=({error:e})=>(0,a.createElement)(s.Notice,{isDismissible:!1,status:"error"},(0,a.createInterpolateElement)(W("The plugin failed to install. Please check the plugin information for detailed requirements.","jetpack"),{a:(0,a.createElement)(s.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:(0,a.createElement)("span",null,e)})),Y=r(4696);const J=o.__,X=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),Q=({isActivating:e})=>{const t=J(e?"Activating…":"Installing…","jetpack");return(0,a.createElement)(s.Button,{isSecondary:!0,icon:(0,a.createElement)(s.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":t},t)},ee=({installAndActivateCreativeMailPlugin:e,isInstalling:t})=>(0,a.createElement)("p",null,(0,a.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},J("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),(0,a.createElement)("br",null),t&&(0,a.createElement)(Q,null),!t&&(0,a.createElement)(s.Button,{isSecondary:!0,onClick:e},J("Install Creative Mail plugin","jetpack")))),te=({activateCreativeMailPlugin:e,isInstalling:t})=>(0,a.createElement)("p",null,(0,a.createElement)("em",null,J("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),(0,a.createElement)("br",null),t&&(0,a.createElement)(Q,{isActivating:!0}),!t&&(0,a.createElement)(s.Button,{isSecondary:!0,onClick:e},J("Activate Creative Mail Plugin","jetpack"))),re=()=>(0,a.createElement)("p",null,(0,a.createElement)("em",null,J("You’re all setup for email marketing with Creative Mail.","jetpack"),(0,a.createElement)("br",null),(0,a.createElement)(s.ExternalLink,{href:`${(0,c.get)((0,Y.Z)(),"adminUrl",!1)}admin.php?page=creativemail`},J("Open Creative Mail settings","jetpack"))));var ne=({pluginState:e,onCreativeMailPluginClick:t,isInstalling:r})=>(0,a.createElement)("div",{"aria-live":"polite"},X.ACTIVE===e&&(0,a.createElement)(re,null),X.INSTALLED===e&&(0,a.createElement)(te,{activateCreativeMailPlugin:()=>t(Z,"creative-mail-by-constant-contact/creative-mail-plugin"),isInstalling:r}),X.NOT_INSTALLED===e&&(0,a.createElement)(ee,{installAndActivateCreativeMailPlugin:()=>t(H,"creative-mail-by-constant-contact"),isInstalling:r}));const ae="creative-mail-by-constant-contact/creative-mail-plugin.php",oe=({pluginState:e,setPluginState:t})=>{const[r,n]=(0,a.useState)(),[o,i]=(0,a.useState)(!1),s=((e,t,r)=>(0,a.useCallback)(((n,a)=>{e(void 0),t(!0),n(a).then((()=>{r(X.ACTIVE)})).catch((t=>{e(t)})).finally((()=>t(!1)))}),[t,e,r]))(n,i,t);return r?(0,a.createElement)(K,{error:r}):(0,a.createElement)(ne,{pluginState:e,onCreativeMailPluginClick:s,isInstalling:o})},ie=({isFetchingPlugins:e,hasError:t,pluginState:r,setPluginState:n})=>e?(0,a.createElement)(s.Spinner,null):t?null:(0,a.createElement)(oe,{pluginState:r,setPluginState:n});var se=()=>{const[e,t]=(0,a.useState)(!0),[r,n]=(0,a.useState)(!1),[o,i]=(0,a.useState)(X.NOT_INSTALLED);return(0,a.useEffect)((()=>{(async function(){if((0,b.Wp)())return Promise.reject();try{return await w()({path:"/jetpack/v4/plugins"})}catch(e){return Promise.reject(e.message)}})().then((e=>{n(!1),(0,c.get)(e,ae)&&((0,c.get)(e,[ae,"active"])?i(X.ACTIVE):i(X.INSTALLED))})).catch((()=>n(!0))).finally((()=>t(!1)))}),[i,t,n]),(0,a.createElement)(ie,{isFetchingPlugins:e,hasError:r,pluginState:o,setPluginState:i})};const le=o.__;var ce=()=>(0,a.createElement)(s.PanelBody,{title:le("Newsletter Integration","jetpack"),initialOpen:!1},(0,a.createElement)(s.BaseControl,null,(0,a.createElement)(q,null),(0,a.createElement)(se,null)));const ue=o.__,pe=["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 de=(0,m.compose)([(0,h.withSelect)(((e,t)=>{const{getBlockType:r,getBlockVariations:n,getDefaultBlockVariation:a}=e("core/blocks"),{getBlocks:o}=e("core/block-editor"),{getEditedPostAttribute:i}=e("core/editor"),{getSite:s,getUser:l}=e("core"),u=o(t.clientId),p=i("author"),d=p&&l(p)&&l(p).email,m=i("title");return{blockType:r&&r(t.name),defaultVariation:a&&a(t.name,"block"),variations:n&&n(t.name,"block"),innerBlocks:u,hasInnerBlocks:u.length>0,siteTitle:(0,c.get)(s&&s(),["title"]),postTitle:m,postAuthorEmail:d}})),(0,h.withDispatch)((e=>{const{replaceInnerBlocks:t,selectBlock:r}=e("core/block-editor");return{replaceInnerBlocks:t,selectBlock:r}})),m.withInstanceId])((function({attributes:e,setAttributes:t,siteTitle:r,postTitle:n,postAuthorEmail:u,hasInnerBlocks:m,replaceInnerBlocks:h,selectBlock:v,clientId:k,instanceId:E,className:w,blockType:_,variations:C,defaultVariation:j}){const{to:x,subject:S,customThankyou:T,customThankyouHeading:N,customThankyouMessage:A,customThankyouRedirect:P,jetpackCRM:I}=e,[M,R]=(0,a.useState)(!1),L=p()(w,"jetpack-contact-form"),B=e=>(0,c.map)(e,(([e,t,r=[]])=>(0,i.createBlock)(e,t,B(r)))),D=e=>{e.attributes&&t(e.attributes),e.innerBlocks&&h(k,B(e.innerBlocks)),v(k)};(0,a.useEffect)((()=>{m||i.registerBlockVariation||D(y[0])})),(0,a.useEffect)((()=>{if(void 0===x&&u&&t({to:u}),void 0===S&&void 0!==r&&void 0!==n){t({subject:"["+r+"] "+n})}}),[x,u,S,r,n,t]);const F=e=>0!==(e=e.trim()).length&&(!d.validate(e)&&{email:e}),O=e=>{if(0===e.target.value.length)return R(!1),void t({to:u});const r=e.target.value.split(",").map(F).filter(Boolean);r&&r.length&&R(r)},z=e=>{R(!1),t({to:e.trim()})},$=()=>{const e=void 0!==x?x:"",r=void 0!==S?S:"";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s.TextControl,{"aria-describedby":`contact-form-${E}-email-${M&&M.length>0?"error":"help"}`,label:ue("Email address to send to","jetpack"),placeholder:ue("name@example.com","jetpack"),onKeyDown:e=>{"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:O,onChange:z,help:ue("You can enter multiple email addresses separated by commas.","jetpack")}),(0,a.createElement)(f.Z,{isError:!0,id:`contact-form-${E}-email-error`},(()=>{if(M){if(1===M.length)return M[0]&&M[0].email?(0,o.sprintf)(ue("%s is not a valid email address.","jetpack"),M[0].email):M[0];if(2===M.length)return(0,o.sprintf)(ue("%1$s and %2$s are not a valid email address.","jetpack"),M[0].email,M[1].email);const e=M.map((e=>e.email));return(0,o.sprintf)(ue("%s are not a valid email address.","jetpack"),e.join(", "))}return null})()),(0,a.createElement)(s.TextControl,{label:ue("Email subject line","jetpack"),value:r,placeholder:ue("Enter a subject","jetpack"),onChange:e=>t({subject:e}),help:ue("Choose a subject line that you recognize as an email from your website.","jetpack")}),(0,a.createElement)(s.SelectControl,{label:ue("On Submission","jetpack"),value:T,options:[{label:ue("Show a summary of submitted fields","jetpack"),value:""},{label:ue("Show a custom text message","jetpack"),value:"message"},{label:ue("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:e=>t({customThankyou:e})}),"redirect"!==T&&(0,a.createElement)(s.TextControl,{label:ue("Message Heading","jetpack"),value:N,placeholder:ue("Message Sent","jetpack"),onChange:e=>t({customThankyouHeading:e})}),"message"===T&&(0,a.createElement)(s.TextareaControl,{label:ue("Message Text","jetpack"),value:A,placeholder:ue("Thank you for your submission!","jetpack"),onChange:e=>t({customThankyouMessage:e})}),"redirect"===T&&(0,a.createElement)(s.BaseControl,{label:ue("Redirect Address","jetpack"),id:`contact-form-${E}-thankyou-url`},(0,a.createElement)(l.URLInput,{id:`contact-form-${E}-thankyou-url`,value:P,className:"jetpack-contact-form__thankyou-redirect-url",onChange:e=>t({customThankyouRedirect:e})})))};return!m&&i.registerBlockVariation?(0,a.createElement)("div",{className:L},(0,a.createElement)(l.__experimentalBlockVariationPicker,{icon:(0,c.get)(_,["icon","src"]),label:(0,c.get)(_,["title"]),instructions:ue("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:C,allowSkip:!0,onSelect:(e=j)=>{D(e)}})):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(l.BlockControls,null,(0,a.createElement)(s.ToolbarGroup,null,(0,a.createElement)(s.ToolbarItem,null,(()=>(0,a.createElement)(s.Dropdown,{position:"bottom right",className:"jetpack-contact-form-settings-selector",contentClassName:"jetpack-contact-form__popover",renderToggle:({isOpen:e,onToggle:t})=>((e,t)=>(0,a.createElement)(s.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:ue("Edit Form Settings","jetpack"),onClick:t,onKeyDown:r=>{e||r.keyCode!==g.DOWN||(r.preventDefault(),r.stopPropagation(),t())},icon:(0,a.createElement)(s.Icon,{icon:"edit"})}))(e,t),renderContent:()=>$()}))))),(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(s.PanelBody,{title:ue("Form Settings","jetpack")},$()),!(0,b.Wp)()&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(U,{jetpackCRM:I,setAttributes:t}),(0,a.createElement)(ce,null))),(0,a.createElement)("div",{className:L},(0,a.createElement)(l.InnerBlocks,{allowedBlocks:pe,templateInsertUpdatesSelection:!1})))}));var me={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouHeading:{type:"string",default:(0,o.__)("Message Sent","jetpack")},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}};const he=o.__,ge=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"];var fe=[{attributes:{submit_button_text:{type:"string",default:he("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:he("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"},...me},migrate:(e,t)=>{const r=(0,c.omit)(e,ge),n={text:e.submitButtonText||e.submit_button_text||he("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[r,t.concat((0,i.createBlock)("jetpack/button",{element:"button",...n}))]},isEligible:e=>!(!e.has_form_settings_set&&!e.hasFormSettingsSet),save:l.InnerBlocks.Content}];const be=o.__,ve=(e,t,r)=>{const n=r.match(new RegExp(`\\[${e}[^\\]]* ${t}="([^"]*)"`,"im"));if(n&&n.length)return n[1];const a=r.match(new RegExp(`\\[${e}[^\\]]* ${t}='([^']*)'`,"im"));if(a&&a.length)return a[1];const o=r.match(new RegExp(`\\[${e}[^\\]]* ${t}=([^\\s]*)\\s`,"im"));return!(!o||!o.length)&&o[1]},ke={root:{},innerBlocks:[]};var ye={from:[{type:"raw",priority:1,isMatch:e=>!("P"!==e.nodeName||!(/\[contact-form(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[contact-field(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[\/contact-form]/g.test(e.textContent))),transform:e=>{const t=e.textContent.replace("
","");if(t.includes("[contact-form")&&(ke.root={},ke.innerBlocks=[],ke.root=(e=>{const t={to:ve("contact-form","to",e),subject:ve("contact-form","subject",e),submitButtonText:ve("contact-form","submit_button_text",e)};return{blockName:"jetpack/contact-form",attrs:(0,c.pickBy)(t,c.identity)}})(t)),t.includes("[contact-field")){const e=t.match(/(\[contact-field[\s\S]*?\/?])/g);e&&e.length>0&&e.forEach((e=>{ke.innerBlocks.push((e=>{const t={label:ve("contact-field","label",e),placeholder:ve("contact-field","placeholder",e),required:ve("contact-field","required",e),options:ve("contact-field","options",e)},r=(e=>{const t={text:"jetpack/field-text",url:"jetpack/field-text",textarea:"jetpack/field-textarea",radio:"jetpack/field-radio",checkbox:"jetpack/field-checkbox","checkbox-multiple":"jetpack/field-checkbox-multiple",select:"jetpack/field-select",email:"jetpack/field-email",name:"jetpack/field-name",default:"jetpack/field-text"};return t[e]?t[e]:t.default})(ve("contact-field","type",e));return t.options&&(t.options=t.options.split(",")),(0,i.createBlock)(r,(0,c.pickBy)(t,c.identity))})(e))}))}if(t.includes("[/contact-form]")){ke.innerBlocks.push((0,i.createBlock)("jetpack/button",{element:"button",text:ke.root.attrs.submitButtonText||be("Contact Us","jetpack")}));return(0,i.createBlock)(ke.root.blockName,ke.root.attrs,ke.innerBlocks)}return!1}}]},Ee=r(8900),we=r.n(Ee),_e=r(5799),Ce=r(3789);const je=o.__;function xe({setAttributes:e,width:t}){return(0,a.createElement)(s.BaseControl,{label:je("Field Width","jetpack"),help:je("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},(0,a.createElement)(s.ButtonGroup,{"aria-label":je("Field Width","jetpack")},[25,50,75,100].map((r=>(0,a.createElement)(s.Button,{key:r,isSmall:!0,isPrimary:r===t,onClick:()=>e({width:r})},r,"%")))))}const Se=o.__;function Te({setAttributes:e,id:t}){return(0,a.createElement)(s.TextControl,{label:Se("Unique CSS ID","jetpack"),value:t,onChange:t=>e({id:t}),help:Se("A unique ID that can be used in CSS or as an anchor.","jetpack")})}const Ne=o.__;var Ae=({setAttributes:e,width:t,id:r,required:n})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(l.BlockControls,null,(0,a.createElement)(s.ToolbarGroup,null,(0,a.createElement)(s.ToolbarButton,{title:Ne("Required","jetpack"),icon:(0,v.Z)((0,a.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:()=>{e({required:!n})},className:n?"is-pressed":void 0}))),(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(s.PanelBody,{title:Ne("Field Settings","jetpack")},(0,a.createElement)(s.ToggleControl,{label:Ne("Field is required","jetpack"),className:"jetpack-field-label__required",checked:n,onChange:t=>e({required:t}),help:Ne("Does this field have to be completed for the form to be submitted?","jetpack")}),(0,a.createElement)(xe,{setAttributes:e,width:t}))),(0,a.createElement)(l.InspectorAdvancedControls,null,(0,a.createElement)(Te,{setAttributes:e,id:r})));const Pe=o.__;function Ie(e){const{id:t,type:r,required:n,label:o,setAttributes:i,placeholder:l,width:c}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"jetpack-field"},(0,a.createElement)(Ce.Z,{required:n,label:o,setAttributes:i}),(0,a.createElement)(s.Disabled,null,(0,a.createElement)(s.TextControl,{type:r,placeholder:l,value:l,onChange:e=>i({placeholder:e}),title:Pe("Set the placeholder text","jetpack")}))),(0,a.createElement)(Ae,{id:t,required:n,width:c,setAttributes:i}))}const Me=(0,m.createHigherOrderComponent)((e=>t=>{if(t.name.indexOf("jetpack/field")>-1){const r=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return(0,a.createElement)(e,we()({},t,{className:r}))}return(0,a.createElement)(e,t)}),"withCustomClassName");(0,_e.addFilter)("editor.BlockListBlock","jetpack/contact-form",Me);const Re=o.__;function Le(e){const{id:t,required:r,label:n,setAttributes:o,placeholder:i,width:l}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"jetpack-field"},(0,a.createElement)(Ce.Z,{required:r,label:n,setAttributes:o}),(0,a.createElement)(s.Disabled,null,(0,a.createElement)(s.TextareaControl,{placeholder:i,value:i,onChange:e=>o({placeholder:e}),title:Re("Set the placeholder text","jetpack")}))),(0,a.createElement)(Ae,{id:t,required:r,setAttributes:o,width:l}))}const Be=o.__;var De=(0,m.withInstanceId)((function(e){const{id:t,instanceId:r,required:n,label:o,setAttributes:i,width:c,defaultValue:u}=e;return(0,a.createElement)(s.BaseControl,{id:`jetpack-field-checkbox-${r}`,className:"jetpack-field jetpack-field-checkbox",label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:u}),(0,a.createElement)(Ce.Z,{required:n,label:o,setAttributes:i}),(0,a.createElement)(Ae,{id:t,required:n,width:c,setAttributes:i}),(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(s.PanelBody,{title:Be("Checkbox Settings","jetpack")},(0,a.createElement)(s.ToggleControl,{label:Be("Checked by default","jetpack"),checked:u,onChange:e=>i({defaultValue:e?"true":""})}))))})}));const Fe=o.__;class Oe extends a.Component{constructor(...e){super(...e),this.onChangeOption=this.onChangeOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onDeleteOption=this.onDeleteOption.bind(this),this.textInput=(0,a.createRef)()}componentDidMount(){this.props.isInFocus&&this.textInput.current.focus()}componentDidUpdate(){this.props.isInFocus&&this.textInput.current.focus()}onChangeOption(e){this.props.onChangeOption(this.props.index,e.target.value)}onKeyPress(e){return"Enter"===e.key?(this.props.onAddOption(this.props.index),void e.preventDefault()):"Backspace"===e.key&&""===e.target.value?(this.props.onChangeOption(this.props.index),void e.preventDefault()):void 0}onDeleteOption(){this.props.onChangeOption(this.props.index)}render(){const{isSelected:e,option:t,type:r}=this.props;return(0,a.createElement)("li",{className:"jetpack-option"},r&&"select"!==r&&(0,a.createElement)("input",{className:"jetpack-option__type",type:r,disabled:!0}),(0,a.createElement)("input",{type:"text",className:"jetpack-option__input",value:t,placeholder:Fe("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),e&&(0,a.createElement)(s.Button,{className:"jetpack-option__remove",icon:"trash",label:Fe("Remove option","jetpack"),onClick:this.onDeleteOption}))}}var ze=Oe;const $e=o.__;var Ue=(0,m.withInstanceId)((function(e){const{id:t,type:r,instanceId:n,required:o,label:i,setAttributes:l,isSelected:c,width:u,options:p}=e,[d,m]=(0,a.useState)(null),h=(e=null,t=null)=>{const r=p.slice(0);null===t?(r.splice(e,1),e>0&&m(e-1)):(r.splice(e,1,t),m(e)),l({options:r})},g=(e=null)=>{const t=p.slice(0);let r=0;"object"==typeof e?(t.push(""),r=t.length-1):(t.splice(e+1,0,""),r=e+1),m(r),l({options:t})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s.BaseControl,{id:`jetpack-field-multiple-${n}`,className:"jetpack-field jetpack-field-multiple",label:(0,a.createElement)(Ce.Z,{required:o,label:i,setAttributes:l,isSelected:c,resetFocus:()=>m(null)})},(0,a.createElement)("ol",{className:"jetpack-field-multiple__list",id:`jetpack-field-multiple-${n}`},p.map(((e,t)=>(0,a.createElement)(ze,{type:r,key:t,option:e,index:t,onChangeOption:h,onAddOption:g,isInFocus:t===d&&c,isSelected:c})))),c&&(0,a.createElement)(s.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:$e("Insert option","jetpack"),onClick:g},$e("Add option","jetpack"))),(0,a.createElement)(Ae,{id:t,required:o,setAttributes:l,width:u}))}));const Ve=o.__;var Ge=(0,m.withInstanceId)((({id:e,instanceId:t,width:r,consentType:n,implicitConsentMessage:i,explicitConsentMessage:c,setAttributes:u})=>{var p;return(0,a.createElement)(s.BaseControl,{id:`jetpack-field-consent-${t}`,className:"jetpack-field jetpack-field-consent",label:(0,a.createElement)(a.Fragment,null,"explicit"===n&&(0,a.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),(0,a.createElement)(Ce.Z,{required:!1,label:null!==(p={implicit:i,explicit:c}[n])&&void 0!==p?p:"",setAttributes:u,labelFieldName:`${n}ConsentMessage`,placeholder:(0,o.sprintf)(Ve("Add %s consent message…","jetpack"),n)}),(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(s.PanelBody,{title:Ve("Field Settings","jetpack")},(0,a.createElement)(xe,{setAttributes:u,width:r}))),(0,a.createElement)(l.InspectorAdvancedControls,null,(0,a.createElement)(Te,{setAttributes:u,id:e})),(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(s.PanelBody,{title:Ve("Consent Settings","jetpack")},(0,a.createElement)(s.BaseControl,null,(0,a.createElement)(s.SelectControl,{label:Ve("Permission to email","jetpack"),value:n,options:[{label:Ve("Mention that you can email","jetpack"),value:"implicit"},{label:Ve("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:e=>u({consentType:e})})))))})}));const qe=o.__,_x=o._x,He=(0,v.Z)((0,a.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"})),Ze={title:qe("Form","jetpack"),description:qe("A simple way to get feedback from folks visiting your site.","jetpack"),icon:{src:He,foreground:(0,k.m)()},keywords:[_x("email","block search term","jetpack"),_x("feedback","block search term","jetpack"),_x("contact form","block search term","jetpack")],supports:{html:!1},attributes:me,edit:de,save:l.InnerBlocks.Content,variations:y,category:"grow",transforms:ye,deprecated:fe},We={category:"grow",parent:["jetpack/contact-form"],supports:{reusable:!1,html:!1},attributes:{label:{type:"string",default:null},required:{type:"boolean",default:!1},options:{type:"array",default:[]},defaultValue:{type:"string",default:""},placeholder:{type:"string",default:""},id:{type:"string",default:""},width:{type:"number",default:100}},transforms:{to:[{type:"block",blocks:["jetpack/field-text"],isMatch:({options:e})=>!e.length,transform:e=>(0,i.createBlock)("jetpack/field-text",e)},{type:"block",blocks:["jetpack/field-name"],isMatch:({options:e})=>!e.length,transform:e=>(0,i.createBlock)("jetpack/field-name",e)},{type:"block",blocks:["jetpack/field-email"],isMatch:({options:e})=>!e.length,transform:e=>(0,i.createBlock)("jetpack/field-email",e)},{type:"block",blocks:["jetpack/field-url"],isMatch:({options:e})=>!e.length,transform:e=>(0,i.createBlock)("jetpack/field-url",e)},{type:"block",blocks:["jetpack/field-date"],isMatch:({options:e})=>!e.length,transform:e=>(0,i.createBlock)("jetpack/field-date",e)},{type:"block",blocks:["jetpack/field-telephone"],isMatch:({options:e})=>!e.length,transform:e=>(0,i.createBlock)("jetpack/field-telephone",e)},{type:"block",blocks:["jetpack/field-textarea"],isMatch:({options:e})=>!e.length,transform:e=>(0,i.createBlock)("jetpack/field-textarea",e)},{type:"block",blocks:["jetpack/field-checkbox-multiple"],isMatch:({options:e})=>1<=e.length,transform:e=>(0,i.createBlock)("jetpack/field-checkbox-multiple",e)},{type:"block",blocks:["jetpack/field-radio"],isMatch:({options:e})=>1<=e.length,transform:e=>(0,i.createBlock)("jetpack/field-radio",e)},{type:"block",blocks:["jetpack/field-select"],isMatch:({options:e})=>1<=e.length,transform:e=>(0,i.createBlock)("jetpack/field-select",e)},{type:"block",blocks:["jetpack/field-consent"],isMatch:({options:e})=>1<=e.length,transform:e=>(0,i.createBlock)("jetpack/field-consent",e)}]},save:()=>null,example:{}},Ke=({attributes:e,name:t})=>null===e.label?(0,i.getBlockType)(t).title:e.label,Ye=e=>t=>(0,a.createElement)(Ie,{type:e,label:Ke(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}),Je=e=>t=>(0,a.createElement)(Ue,{label:Ke(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}),Xe=[{name:"field-text",settings:{...We,title:qe("Text","jetpack"),description:qe("When you need just a small amount of text, add a text input.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:Ye("text")}},{name:"field-name",settings:{...We,title:qe("Name","jetpack"),description:qe("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})),edit:Ye("text")}},{name:"field-email",settings:{...We,title:qe("Email","jetpack"),keywords:[qe("e-mail","jetpack"),qe("mail","jetpack"),"email"],description:qe("Want to reply to folks? Add an email address input.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),edit:Ye("email")}},{name:"field-url",settings:{...We,title:qe("Website","jetpack"),keywords:["url",qe("internet page","jetpack"),"link"],description:qe("Add an address input for a website.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"})),edit:Ye("url")}},{name:"field-date",settings:{...We,title:qe("Date Picker","jetpack"),keywords:[qe("Calendar","jetpack"),_x("day month year","block search term","jetpack")],description:qe("The best way to set a date. Add a date picker.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V9h14v10zm0-12H5V5h14v2zM7 11h5v5H7z"})),edit:Ye("text")}},{name:"field-telephone",settings:{...We,title:qe("Phone Number","jetpack"),keywords:[qe("Phone","jetpack"),qe("Cellular phone","jetpack"),qe("Mobile","jetpack")],description:qe("Add a phone number input.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),edit:Ye("tel")}},{name:"field-textarea",settings:{...We,title:qe("Message","jetpack"),keywords:[qe("Textarea","jetpack"),"textarea",qe("Multiline text","jetpack")],description:qe("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:e=>(0,a.createElement)(Le,{label:Ke(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:{...We,title:qe("Checkbox","jetpack"),keywords:[qe("Confirm","jetpack"),qe("Accept","jetpack")],description:qe("Add a single checkbox.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM17.99 9l-1.41-1.42-6.59 6.59-2.58-2.57-1.42 1.41 4 3.99z"})),edit:e=>(0,a.createElement)(De,{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:{...We.attributes,label:{type:"string",default:""}}}},{name:"field-consent",settings:{...We,title:qe("Consent","jetpack"),keywords:[qe("Consent","jetpack")],description:qe("Ask for consent","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"m81 370h142v40h-142zm0-39h142v-40h-142zm0-79h245v-40h-245zm378 260h-40c0-40.253906-32.746094-73-73-73s-73 32.746094-73 73h-40c0-42.085938 23.128906-78.867188 57.34375-98.3125-11.40625-13.023438-18.34375-30.054688-18.34375-48.6875 0-40.804688 33.195312-74 74-74s74 33.195312 74 74c0 18.632812-6.9375 35.664062-18.34375 48.6875 34.214844 19.445312 57.34375 56.226562 57.34375 98.3125zm-113-113c18.746094 0 34-15.253906 34-34s-15.253906-34-34-34-34 15.253906-34 34 15.253906 34 34 34zm-286 73h138.316406c-3.460937 12.757812-5.316406 26.164062-5.316406 40h-133c-33.085938 0-60-26.914062-60-60v-392c0-33.085938 26.914062-60 60-60h203.757812l142.132813 142.855469v125.210937c-12.042969-7.476562-25.453125-12.765625-39.890625-15.324218v-81.632813h-71.109375c-33.085937 0-60-26.914063-60-60v-71.109375h-174.890625c-11.027344 0-20 8.972656-20 20v392c0 11.027344 8.972656 20 20 20zm234.890625-340.890625h42.972656l-62.972656-63.234375v43.234375c0 11.03125 8.96875 20 20 20zm0 0"}),24,25,"-26 0 512 512"),attributes:{...We.attributes,label:{type:"string",default:qe("Consent","jetpack")},consentType:{type:"string",default:"implicit"},implicitConsentMessage:{type:"string",default:qe("By submitting your information, you're giving us permission to email you. You may unsubscribe at any time.","jetpack")},explicitConsentMessage:{type:"string",default:qe("Can we send you an email from time to time?","jetpack")}},edit:({attributes:e,isSelected:t,setAttributes:r})=>{const{id:n,width:o,consentType:i,implicitConsentMessage:s,explicitConsentMessage:l}=e;return(0,a.createElement)(Ge,{id:n,isSelected:t,width:o,consentType:i,implicitConsentMessage:s,explicitConsentMessage:l,setAttributes:r})}}},{name:"field-checkbox-multiple",settings:{...We,title:qe("Checkbox Group","jetpack"),keywords:[qe("Choose Multiple","jetpack"),qe("Option","jetpack")],description:qe("People love options. Add several checkbox items.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"})),edit:Je("checkbox"),attributes:{...We.attributes,label:{type:"string",default:"Choose several"}}}},{name:"field-radio",settings:{...We,title:qe("Radio","jetpack"),keywords:[qe("Choose","jetpack"),qe("Select","jetpack"),qe("Option","jetpack")],description:qe("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:(0,v.Z)((0,a.createElement)(a.Fragment,null,(0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,a.createElement)(s.Circle,{cx:"12",cy:"12",r:"5"}))),edit:Je("radio"),attributes:{...We.attributes,label:{type:"string",default:"Choose one"}}}},{name:"field-select",settings:{...We,title:qe("Select","jetpack"),keywords:[qe("Choose","jetpack"),qe("Dropdown","jetpack"),qe("Option","jetpack")],description:qe("Compact, but powerful. Add a select box with several items.","jetpack"),icon:(0,v.Z)((0,a.createElement)(s.Path,{fill:(0,k.m)(),d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:Je("select"),attributes:{...We.attributes,label:{type:"string",default:"Select one"}}}}];(0,n.Z)("contact-form",Ze,Xe)},6004:function(e,t,r){"use strict";var n=r(8952),a=r(3027),o=r(3163),i=r(6399),s=r(7997),l=r(9105),c=r.n(l);const 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"]];var d=e=>{const{isSelected:t}=e;return(0,a.createElement)("div",{className:c()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,a.createElement)(i.InnerBlocks,{allowedBlocks:u,templateLock:!1,template:p}))},m=r(4541);const __=o.__,h=({attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:o,postal:i,country:s}})=>(0,a.createElement)(a.Fragment,null,e&&(0,a.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},e),t&&(0,a.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},t),r&&(0,a.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},r),n&&!(o||i)&&(0,a.createElement)("div",{className:"jetpack-address__city"},n),n&&(o||i)&&(0,a.createElement)("div",null,[(0,a.createElement)("span",{className:"jetpack-address__city"},n),", ",(0,a.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,a.createElement)("span",{className:"jetpack-address__postal"},i)]),!n&&(o||i)&&(0,a.createElement)("div",null,[(0,a.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,a.createElement)("span",{className:"jetpack-address__postal"},i)]),s&&(0,a.createElement)("div",{className:"jetpack-address__country"},s)),g=({attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:a,postal:o,country:i}})=>{let s=a?`+${a},`:"";s=o?`${s}+${o}`:s;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${r?`${r},`:""}${n?`+${n},`:""}${s}${i?`+${i}`:""}`.replace(" ","+")};var f=e=>(({address:e,addressLine2:t,addressLine3:r,city:n,region:a,postal:o,country:i})=>[e,t,r,n,a,o,i].some((e=>""!==e)))(e.attributes)&&(0,a.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,a.createElement)("a",{href:g(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,a.createElement)(h,e)),!e.attributes.linkToGoogleMaps&&(0,a.createElement)(h,e));const b=o.__;class v extends a.Component{constructor(...e){super(...e),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:o,postal:l,country:u,linkToGoogleMaps:p},isSelected:d,setAttributes:m}=this.props,h=[e,t,r,n,o,l,u].some((e=>""!==e)),g=c()({"jetpack-address-block":!0,"is-selected":d}),v=(0,a.createElement)(s.ToggleControl,{label:b("Link address to Google Maps","jetpack"),checked:p,onChange:e=>m({linkToGoogleMaps:e})});return(0,a.createElement)("div",{className:g},!d&&h&&f(this.props),(d||!h)&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.PlainText,{value:e,placeholder:b("Street Address","jetpack"),"aria-label":b("Street Address","jetpack"),onChange:e=>m({address:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(i.PlainText,{value:t,placeholder:b("Address Line 2","jetpack"),"aria-label":b("Address Line 2","jetpack"),onChange:e=>m({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(i.PlainText,{value:r,placeholder:b("Address Line 3","jetpack"),"aria-label":b("Address Line 3","jetpack"),onChange:e=>m({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(i.PlainText,{value:n,placeholder:b("City","jetpack"),"aria-label":b("City","jetpack"),onChange:e=>m({city:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(i.PlainText,{value:o,placeholder:b("State/Province/Region","jetpack"),"aria-label":b("State/Province/Region","jetpack"),onChange:e=>m({region:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(i.PlainText,{value:l,placeholder:b("Postal/Zip Code","jetpack"),"aria-label":b("Postal/Zip Code","jetpack"),onChange:e=>m({postal:e}),onKeyDown:this.preventEnterKey}),(0,a.createElement)(i.PlainText,{value:u,placeholder:b("Country","jetpack"),"aria-label":b("Country","jetpack"),onChange:e=>m({country:e}),onKeyDown:this.preventEnterKey}),v))}}var k=v;const y=o.__,_x=o._x,E={title:y("Address","jetpack"),description:y("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,m.Z)((0,a.createElement)(a.Fragment,null,(0,a.createElement)(s.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,a.createElement)(s.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:k,save:f};var w=r(9453);var _=({attributes:{email:e},className:t})=>e&&(0,a.createElement)("div",{className:t},e.split(/(\s+)/).map(((e,t)=>{const r=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&w.validate(r)?e===r?(0,a.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,a.createElement)(a.Fragment,{key:t},(0,a.createElement)("a",{href:`mailto:${e}`,key:t},r),(0,a.createElement)(a.Fragment,null,e.slice(-(e.length-r.length)))):(0,a.createElement)(a.Fragment,{key:t},e)})));var C=(e,t,r,n,o)=>{const{isSelected:s}=t,l=t.attributes[e];return(0,a.createElement)("div",{className:s?`jetpack-${e}-block is-selected`:`jetpack-${e}-block`},!s&&""!==l&&n(t),(s||""===l)&&(0,a.createElement)(i.PlainText,{value:l,placeholder:r,"aria-label":r,onChange:o}))};const j=o.__;var x=e=>{const{setAttributes:t}=e;return C("email",e,j("Email","jetpack"),_,(e=>t({email:e})))};const S=o.__,T=o._x,N={title:S("Email Address","jetpack"),description:S("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",T("message","block search term","jetpack")],icon:(0,m.Z)((0,a.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"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:x,save:_,parent:["jetpack/contact-info"]};var A=({attributes:{phone:e},className:t})=>e&&(0,a.createElement)("div",{className:t},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const r=e.indexOf(t[0]);let n=r?e.substring(r-1):e,o=r?e.substring(0,r):"",i=n.replace(/\D/g,"");return/[0-9/+/(]/.test(n[0])?(o=o.slice(0,-1),"+"===n[0]&&(i="+"+i)):n=n.substring(1),[o.trim()?(0,a.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,(0,a.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},n)]}(e));const P=o.__;var I=e=>{const{setAttributes:t}=e;return C("phone",e,P("Phone number","jetpack"),A,(e=>t({phone:e})))};const M=o.__,R=o._x,L={title:M("Phone Number","jetpack"),description:M("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[R("mobile","block search term","jetpack"),R("telephone","block search term","jetpack"),R("cell","block search term","jetpack")],icon:(0,m.Z)((0,a.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"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:I,save:A};var B=r(2750);const D=o.__,F=o._x,O=(0,m.Z)((0,a.createElement)(s.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"})),z={title:D("Contact Info","jetpack"),description:D("Lets you add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[F("email","block search term","jetpack"),F("phone","block search term","jetpack"),F("address","block search term","jetpack")],icon:{src:O,foreground:(0,B.m)()},category:"grow",supports:{align:["wide","full"],html:!1},attributes:{},edit:d,save:({className:e})=>(0,a.createElement)("div",{className:e},(0,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"}}]}},$=[{name:"address",settings:E},{name:"email",settings:N},{name:"phone",settings:L}];(0,n.Z)("contact-info",z,$)},49:function(e,t,r){"use strict";var n=r(8952),a=r(3163),o=r(8900),i=r.n(o),s=r(3027),l=r(5707),c=r(9105),u=r.n(c),p=r(4481),d=r(6399),m=r(7997),h=r(3983),g=r(7975),f=r(2754);const __=a.__;var b=e=>{const{attributes:t,setAttributes:r}=e,{currency:n,monthlyDonation:a,annualDonation:o,showCustomAmount:i}=t,l=(e,n)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];r({[a]:{...o,show:n}})};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(d.BlockControls,null,(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(m.ToolbarItem,null,(()=>(0,s.createElement)(m.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:({onToggle:e,isOpen:t})=>(0,s.createElement)(m.Button,{className:"jetpack-donations__currency-toggle",icon:(0,s.createElement)(s.Fragment,null,p.M[n].symbol+" - "+n,(0,s.createElement)(m.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:e,onKeyDown:r=>{t||r.keyCode!==h.DOWN||(r.preventDefault(),r.stopPropagation(),e())}}),renderContent:({onClose:e})=>(0,s.createElement)(m.MenuGroup,null,Object.keys(g.ck).map((t=>(0,s.createElement)(m.MenuItem,{isSelected:t===n,onClick:()=>{r({currency:t}),e()},key:`jetpack-donations-currency-${t}`},p.M[t].symbol+" - "+t))))}))))),(0,s.createElement)(d.InspectorControls,null,(0,s.createElement)(m.PanelBody,{title:__("Settings","jetpack")},(0,s.createElement)(m.ToggleControl,{checked:a.show,onChange:e=>l("1 month",e),label:__("Show monthly donations","jetpack")}),(0,s.createElement)(m.ToggleControl,{checked:o.show,onChange:e=>l("1 year",e),label:__("Show annual donations","jetpack")}),(0,s.createElement)(m.ToggleControl,{checked:i,onChange:e=>r({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,s.createElement)(m.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,f.Z)()}`},__("View donation earnings","jetpack")))))},v=r(5880);var k=({className:e=null,currency:t=null,defaultValue:r=null,disabled:n=!1,label:a="",onChange:o=null,value:i=""})=>{const[l,c]=(0,s.useState)((0,v.ZP)(i,t,{symbol:""})),[m,h]=(0,s.useState)(!1),[f,b]=(0,s.useState)(!1),k=(0,s.useRef)(null),y=(0,s.useCallback)((e=>{if(c(e),!o)return;const r=(0,g.Vm)(e,t);r&&r>=(0,g.hj)(t)?(o(r),b(!1)):e&&b(!0)}),[t,o]),E=()=>{k.current&&(k.current.focus(),h(!0))};return(0,s.useEffect)((()=>{k.current&&k.current.addEventListener("blur",(()=>h(!1)))}),[k]),(0,s.useEffect)((()=>{m||l||y((0,v.ZP)(r,t,{symbol:""}))}),[t,r,l,m,y]),(0,s.useEffect)((()=>{m||f||c((0,v.ZP)(i,t,{symbol:""}))}),[t,m,f,y,i]),(0,s.createElement)("div",{className:u()("donations__amount",e,{"has-focus":m,"has-error":f}),role:"button",tabIndex:0,onClick:E,onKeyDown:E},p.M[t].symbol,n?(0,s.createElement)("div",{className:"donations__amount-value"},(0,v.ZP)(i||r,t,{symbol:""})):(0,s.createElement)(d.RichText,{allowedFormats:[],"aria-label":a,keepPlaceholderOnFocus:!0,multiline:!1,onChange:e=>y(e),placeholder:(0,v.ZP)(r,t,{symbol:""}),ref:k,value:l,withoutInteractiveFormatting:!0}))};const y=a.__;var E=({activeTab:e,attributes:t,setAttributes:r})=>{const{currency:n,oneTimeDonation:o,monthlyDonation:i,annualDonation:c,showCustomAmount:u,chooseAmountText:p,customAmountText:m}=t,h={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},f=r=>t[h[e]][r],b=(n,a)=>{const o=h[e],i=t[o];r({[o]:{...i,[n]:a}})},[v,E]=(0,s.useState)(n),w=(0,g.hj)(n),_=(0,s.useMemo)((()=>[10*w,30*w,200*w]),[w]);(0,s.useEffect)((()=>{v!==n&&(E(n),r({oneTimeDonation:{...o,amounts:_},monthlyDonation:{...i,amounts:_},annualDonation:{...c,amounts:_}}))}),[n,v,_,o,i,c,r]);const C=f("amounts"),j=(0,l.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,s.createElement)("div",{className:"donations__tab"},(0,s.createElement)(d.RichText,{tagName:"h4",placeholder:y("Write a message…","jetpack"),value:f("heading"),onChange:e=>b("heading",e)}),(0,s.createElement)(d.RichText,{tagName:"p",placeholder:y("Write a message…","jetpack"),value:p,onChange:e=>r({chooseAmountText:e})}),(0,s.createElement)("div",{className:"donations__amounts"},C.map(((e,t)=>(0,s.createElement)(k,{currency:n,defaultValue:_[t],label:(0,a.sprintf)(y("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const r=[...C];r[t]=e,b("amounts",r)})(e,t),value:e})))),u&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(d.RichText,{tagName:"p",placeholder:y("Write a message…","jetpack"),value:m,onChange:e=>r({customAmountText:e})}),(0,s.createElement)(k,{currency:n,label:y("Custom amount","jetpack"),defaultValue:100*(0,g.hj)(n),className:"donations__custom-amount",disabled:!0})),(0,s.createElement)("hr",{className:"donations__separator"}),(0,s.createElement)(d.RichText,{tagName:"p",placeholder:y("Write a message…","jetpack"),value:f("extraText"),onChange:e=>b("extraText",e)}),(0,s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,s.createElement)(d.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:y("Write a message…","jetpack"),value:f("buttonText"),onChange:e=>{return t=e,void r({oneTimeDonation:{...o,buttonText:t},monthlyDonation:{...i,buttonText:t},annualDonation:{...c,buttonText:t}});var t},allowedFormats:j})))},w=r(3642),_=r.n(w),C=r(6268),j=r(363);function x({blockName:e,buttonLabel:t,href:r,icon:n,onClick:a,subtitle:o,title:i,className:l}){const{autosaveAndRedirect:c}=(0,j.Z)(r);return(0,s.createElement)(d.Warning,{actions:r&&[(0,s.createElement)(m.Button,{href:r,onClick:t=>{t.preventDefault(),a(e),c(t)},target:"_top",isSecondary:!0,isLarge:!0},t)],className:u()(l,"jetpack-block-nudge wp-block")},(0,s.createElement)("span",{className:"jetpack-block-nudge__info"},n,(0,s.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,s.createElement)("span",{className:"jetpack-block-nudge__title"},i),o&&(0,s.createElement)("span",{className:"jetpack-block-nudge__message"},o))))}var S=r(3691);const T=a.__,N=({blockName:e,url:t})=>(0,s.createElement)(x,{className:"jetpack-stripe-nudge__banner",buttonLabel:T("Connect","jetpack"),icon:(0,s.createElement)(_(),{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:t,onClick:()=>{C.Z.tracks.recordEvent("jetpack_editor_block_stripe_connect_click",{block:e})},title:T("Connect to Stripe to use this block on your site","jetpack"),subtitle:T("This block will be hidden from your visitors until you connect to Stripe.","jetpack")});var A=({blockName:e,postId:t,stripeConnectUrl:r})=>{const n=(0,S.Z)(t,r);return n?(0,s.createElement)(N,{blockName:e,url:n}):null};const P=a.__;var I=e=>{const{attributes:t,className:r,products:n,setAttributes:a,shouldUpgrade:o,stripeConnectUrl:i}=e,{oneTimeDonation:c,monthlyDonation:p,annualDonation:d}=t,[m,h]=(0,s.useState)("one-time"),g=(0,l.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),f=(0,s.useCallback)((e=>m===e),[m]),v={"one-time":{title:P("One-Time","jetpack")},...p.show&&{"1 month":{title:P("Monthly","jetpack")}},...d.show&&{"1 year":{title:P("Yearly","jetpack")}}};return(0,s.useEffect)((()=>{c.planId===n["one-time"]&&p.planId===n["1 month"]&&d.planId===n["1 year"]||a({oneTimeDonation:{...c,planId:n["one-time"]},monthlyDonation:{...p,planId:n["1 month"]},annualDonation:{...d,planId:n["1 year"]}})}),[c,p,d,a,n]),(0,s.useEffect)((()=>{!p.show&&f("1 month")&&h("one-time"),!d.show&&f("1 year")&&h("one-time")}),[p,d,h,f]),(0,s.createElement)("div",{className:r},!o&&i&&(0,s.createElement)(A,{blockName:"donations",postId:g,stripeConnectUrl:i}),(0,s.createElement)("div",{className:"donations__container"},Object.keys(v).length>1&&(0,s.createElement)("div",{className:"donations__nav"},Object.entries(v).map((([e,{title:t}])=>(0,s.createElement)("div",{role:"button",tabIndex:0,className:u()("donations__nav-item",{"is-active":f(e)}),onClick:()=>h(e),onKeyDown:()=>h(e),key:`jetpack-donations-nav-item-${e} `},t)))),(0,s.createElement)("div",{className:"donations__content"},(0,s.createElement)(E,{activeTab:m,attributes:t,setAttributes:a}))),(0,s.createElement)(b,e))};const M=a.__;var R=({className:e,error:t})=>(0,s.createElement)(m.Placeholder,{icon:"lock",label:M("Donations","jetpack"),instructions:t,className:e}),L=r(7606),B=r.n(L);var D=async e=>{try{return await B()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e}})}catch(t){return Promise.reject(t.message)}},F=r(2827),O=r(791);var z=async(e=null)=>{const{query:t}=(0,F.Qc)(window.location.href,!0),r=(0,O.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.origin?"gutenberg-wpcom":"gutenberg",...e&&{type:e}});try{return await B()({path:r,method:"GET"})}catch(n){return Promise.reject(n.message)}};const $=a.__;var U=e=>{const{attributes:t,className:r,setAttributes:n}=e,{currency:a}=t,[o,c]=(0,s.useState)(""),[u,p]=(0,s.useState)(!1),[d,m]=(0,s.useState)(!1),[h,g]=(0,s.useState)([]),f=(0,l.useSelect)((e=>e("core/editor").getCurrentPost()),[]);(0,s.useEffect)((()=>{n({fallbackLinkUrl:f.link})}),[f.link,n]);const b=e=>{c(e)},v=e=>e.reduce(((e,{id:t,currency:r,type:n,interval:o})=>(r===a&&"donation"===n&&(e[o]=t),e)),{}),k=e=>{if(!e&&"object"!=typeof e||e.errors)return void c($("Could not load data from WordPress.com.","jetpack"));p(e.should_upgrade_to_access_memberships),m(e.connect_url);const t=v(e.products);(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(t)?g(t):e.should_upgrade_to_access_memberships||e.connect_url?g({"one-time":-1,"1 month":-1,"1 year":-1}):D(a).then((e=>g(v(e))),b)};return(0,s.useEffect)((()=>{z("donation").then(k,b)}),[a]),o?(0,s.createElement)(R,{className:r,error:o}):(0,s.createElement)(I,i()({},e,{products:h,shouldUpgrade:u,stripeConnectUrl:d}))};var V=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:r,monthlyDonation:n,annualDonation:a}=e;return r&&r.show&&r.planId&&-1!==r.planId?(0,s.createElement)("div",null,(0,s.createElement)(d.RichText.Content,{tagName:"h4",value:r.heading}),(0,s.createElement)(d.RichText.Content,{tagName:"p",value:r.extraText}),(0,s.createElement)(d.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:r.buttonText}),n.show&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("hr",{className:"donations__separator"}),(0,s.createElement)(d.RichText.Content,{tagName:"h4",value:n.heading}),(0,s.createElement)(d.RichText.Content,{tagName:"p",value:n.extraText}),(0,s.createElement)(d.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:n.buttonText})),a.show&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("hr",{className:"donations__separator"}),(0,s.createElement)(d.RichText.Content,{tagName:"h4",value:a.heading}),(0,s.createElement)(d.RichText.Content,{tagName:"p",value:a.extraText}),(0,s.createElement)(d.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.buttonText}))):null};const G=a.__;var q={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:G("Make a one-time donation","jetpack"),extraText:G("Your contribution is appreciated.","jetpack"),buttonText:G("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:G("Make a monthly donation","jetpack"),extraText:G("Your contribution is appreciated.","jetpack"),buttonText:G("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:G("Make a yearly donation","jetpack"),extraText:G("Your contribution is appreciated.","jetpack"),buttonText:G("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:G("Choose an amount","jetpack")},customAmountText:{type:"string",default:G("Or enter a custom amount","jetpack")}},supports:{html:!1},save:({attributes:e})=>{const{currency:t,oneTimeDonation:r,monthlyDonation:n,annualDonation:a,showCustomAmount:o,chooseAmountText:i,customAmountText:l}=e;if(!r||!r.show||-1===r.planId)return null;const c={"one-time":{title:G("One-Time","jetpack")},...n.show&&{"1 month":{title:G("Monthly","jetpack")}},...a.show&&{"1 year":{title:G("Yearly","jetpack")}}};return(0,s.createElement)("div",null,(0,s.createElement)("div",{className:"donations__container"},Object.keys(c).length>1&&(0,s.createElement)("div",{className:"donations__nav"},Object.entries(c).map((([e,{title:t}])=>(0,s.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${e} `,"data-interval":e},t)))),(0,s.createElement)("div",{className:"donations__content"},(0,s.createElement)("div",{className:"donations__tab"},(0,s.createElement)(d.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:r.heading}),n.show&&(0,s.createElement)(d.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:n.heading}),a.show&&(0,s.createElement)(d.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:a.heading}),(0,s.createElement)(d.RichText.Content,{tagName:"p",value:i}),(0,s.createElement)("div",{className:"donations__amounts donations__one-time-item"},r.amounts.map((e=>(0,s.createElement)("div",{className:"donations__amount","data-amount":e},(0,v.ZP)(e,t))))),n.show&&(0,s.createElement)("div",{className:"donations__amounts donations__monthly-item"},n.amounts.map((e=>(0,s.createElement)("div",{className:"donations__amount","data-amount":e},(0,v.ZP)(e,t))))),a.show&&(0,s.createElement)("div",{className:"donations__amounts donations__annual-item"},a.amounts.map((e=>(0,s.createElement)("div",{className:"donations__amount","data-amount":e},(0,v.ZP)(e,t))))),o&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(d.RichText.Content,{tagName:"p",value:l}),(0,s.createElement)("div",{className:"donations__amount donations__custom-amount"},p.M[t].symbol,(0,s.createElement)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,v.ZP)(100*(0,g.hj)(t),t,{symbol:""})}))),(0,s.createElement)("div",{className:"donations__separator"},"——"),(0,s.createElement)(d.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:r.extraText}),n.show&&(0,s.createElement)(d.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:n.extraText}),a.show&&(0,s.createElement)(d.RichText.Content,{tagName:"p",className:"donations__annual-item",value:a.extraText}),(0,s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,s.createElement)(d.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:r.buttonText})),n.show&&(0,s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,s.createElement)(d.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:n.buttonText})),a.show&&(0,s.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,s.createElement)(d.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:a.buttonText}))))))}},H=r(5395);const Z=a.__,W={title:Z("Donations","jetpack"),description:Z("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:H.K9,category:"earn",keywords:[Z("Donations","jetpack")],supports:{html:!1},edit:U,save:V,example:{},deprecated:[q]};(0,n.Z)("donations",W)},6245:function(e,t,r){"use strict";var n=r(8952),a=r(3027),o=r(3163),i=r(7997),s=r(9314);var l={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}},c=r(9105),u=r.n(c),p=r(6399),d=r(3804);const _x=o._x,m=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];var h=[{attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:r}=e;let n=r;n||(n=e.useModal?"modal":"inline");const a={...(0,d.omit)(e,["useModal",...m]),className:t&&t.replace("is-style-outline",""),style:n},o=(0,d.pick)(e,m);return[a,[(0,s.createBlock)("jetpack/button",{element:"a",text:o.text||_x("Register","verb: e.g. register for an event.","jetpack"),...o,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function({attributes:e}){const{eventId:t,useModal:r,url:n,style:o}=e;if(t)return r||"modal"===o?function(e){const{backgroundColor:t,borderRadius:r,customBackgroundColor:n,customTextColor:o,eventId:i,text:s,textColor:l,url:c}=e,d=(0,p.getColorClassName)("color",l),m=(0,p.getColorClassName)("background-color",t),h=u()("wp-block-button__link",{"has-text-color":l||o,[d]:d,"has-background":t||n,[m]:m,"no-border-radius":0===r}),g={backgroundColor:m?void 0:n,color:d?void 0:o,borderRadius:r?r+"px":void 0};return(0,a.createElement)("div",{className:"wp-block-button"},(0,a.createElement)(p.RichText.Content,{className:h,href:c,id:`eventbrite-widget-${i}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:s}))}(e):n&&(0,a.createElement)("a",{className:"eventbrite__direct-link",href:n},n)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,d.isEmpty)(t)||(0,d.some)((0,d.pick)(e,m),Boolean))}],g=r(3197),f=r.n(g);function b(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}var v=r(3353),k=r(2975),y=r(8964),E=r(9879),w=r(9737);const __=o.__,_=({setEditingUrl:e})=>(0,a.createElement)(i.ToolbarGroup,null,(0,a.createElement)(i.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})),C=o.__,j=o._x;class x extends a.Component{constructor(...e){super(...e),f()(this,"state",{editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1}),f()(this,"setUrl",(e=>{const{attributes:t,noticeOperations:r,setAttributes:n}=this.props,{style:a}=t;if(!e||R===e||"modal"===a)return;const o={eventId:b(e),url:e};(0,w.Z)(o.url,this.setIsResolvingUrl).then((e=>{const t=(0,v.S)(l,{...o,url:e});n(t),this.setState({editedUrl:e}),r.removeAllNotices()})).catch((()=>{n({eventId:void 0,url:void 0}),this.setErrorNotice()}))})),f()(this,"setIsResolvingUrl",(e=>this.setState({isResolvingUrl:e}))),f()(this,"setEditingUrl",(e=>this.setState({editingUrl:e}))),f()(this,"setErrorNotice",(()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:r}=this.state;e.removeAllNotices(),e.createErrorNotice((0,a.createElement)(a.Fragment,null,C("Sorry, this content could not be embedded.","jetpack")," ",(0,a.createElement)(i.Button,{isLink:!0,onClick:()=>function(e,t){const r=(0,a.createElement)("a",{href:e},e);t((0,s.createBlock)("core/paragraph",{content:(0,a.renderToString)(r)}))}(r,t)},j("Convert block to link","button label","jetpack"))))})),f()(this,"submitForm",(e=>{e&&e.preventDefault(),this.setUrl(function(e=""){return e&&"string"==typeof e?e.trim():null}(this.state.editedUrl)),this.setState({editingUrl:!1})})),f()(this,"cannotEmbed",(()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!I.test(e)}))}componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}renderLoading(){return(0,a.createElement)("div",{className:"wp-block-embed is-loading"},(0,a.createElement)(i.Spinner,null),(0,a.createElement)("p",null,C("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:r,setAttributes:n}=this.props,o=[{value:"inline",label:C("In-page Embed","jetpack"),preview:(0,a.createElement)("div",{className:"block-editor-block-preview__container"},(0,a.createElement)("img",{src:y,alt:C("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:C("Button & Modal","jetpack")}];return(0,a.createElement)(E.Z,{title:j("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:r,styleOptions:o,onSelectStyle:n,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:r}=this.state,n=(0,k.Wp)()||(0,k.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,a.createElement)("div",{className:e},(0,a.createElement)(i.Placeholder,{label:C("Eventbrite Checkout","jetpack"),instructions:C("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:(0,a.createElement)(p.BlockIcon,{icon:B}),notices:t},(0,a.createElement)("form",{onSubmit:this.submitForm},(0,a.createElement)("input",{type:"url",value:r,className:"components-placeholder__input","aria-label":C("Eventbrite URL","jetpack"),placeholder:C("Enter an event URL to embed here…","jetpack"),onChange:e=>this.setState({editedUrl:e.target.value})}),(0,a.createElement)(i.Button,{isSecondary:!0,type:"submit"},j("Embed","submit button label","jetpack"))),(0,a.createElement)("div",{className:"components-placeholder__learn-more"},(0,a.createElement)(i.ExternalLink,{href:n},C("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const r=`eventbrite-widget-${t}`,n=`\n\t\t\t