File: //wordpress/plugins/jetpack/16.0/_inc/blocks/editor-no-post-editor.js
/*! For license information please see editor-no-post-editor.js.LICENSE.txt */
(()=>{var e={7675(e,t,n){"use strict";n.d(t,{y:()=>a});var r=n(76416),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};const o="text/event-stream",i="last-event-id";function a(e,t){var{signal:n,headers:a,onopen:c,onmessage:u,onclose:d,onerror:p,openWhenHidden:h,fetch:m}=t,g=s(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((t,s)=>{const f=Object.assign({},a);let b;function v(){b.abort(),document.hidden||j()}f.accept||(f.accept=o),h||document.addEventListener("visibilitychange",v);let y=1e3,k=0;function x(){document.removeEventListener("visibilitychange",v),window.clearTimeout(k),b.abort()}null==n||n.addEventListener("abort",()=>{x(),t()});const _=null!=m?m:window.fetch,w=null!=c?c:l;async function j(){var n;b=new AbortController;try{const n=await _(e,Object.assign(Object.assign({},g),{headers:f,signal:b.signal}));await w(n),await(0,r.q5)(n.body,(0,r.iv)((0,r.VL)(e=>{e?f[i]=e:delete f[i]},e=>{y=e},u))),null==d||d(),x(),t()}catch(e){if(!b.signal.aborted)try{const t=null!==(n=null==p?void 0:p(e))&&void 0!==n?n:y;window.clearTimeout(k),k=window.setTimeout(j,t)}catch(e){x(),s(e)}}}j()})}function l(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(o)))throw new Error(`Expected content-type to be ${o}, Actual: ${t}`)}},76416(e,t,n){"use strict";async function r(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function s(e){let t,n,r,s=!1;return function(o){void 0===t?(t=o,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,o);const i=t.length;let a=0;for(;n<i;){s&&(10===t[n]&&(a=++n),s=!1);let o=-1;for(;n<i&&-1===o;++n)switch(t[n]){case 58:-1===r&&(r=n-a);break;case 13:s=!0;case 10:o=n}if(-1===o)break;e(t.subarray(a,o),r),a=n,r=-1}a===i?t=void 0:0!==a&&(t=t.subarray(a),n-=a)}}function o(e,t,n){let r=i();const s=new TextDecoder;return function(o,a){if(0===o.length)null==n||n(r),r=i();else if(a>0){const n=s.decode(o.subarray(0,a)),i=a+(32===o[a+1]?2:1),l=s.decode(o.subarray(i));switch(n){case"data":r.data=r.data?r.data+"\n"+l:l;break;case"event":r.event=l;break;case"id":e(r.id=l);break;case"retry":const n=parseInt(l,10);isNaN(n)||t(r.retry=n)}}}}function i(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{VL:()=>o,iv:()=>s,q5:()=>r})},87399(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,s,o,i=-1;for(t=0,s=e.length;t<s;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1&~o?o>>>=1:o=o>>>1^n;i=i>>>8^o}return-1^i}function s(e,n){var r,o,i;if(void 0!==s.crc&&n&&e||(s.crc=~0,e)){for(r=s.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return s.crc=r,-1^r}}!function(){var e,r,s;for(r=0;r<256;r+=1){for(e=r,s=0;s<8;s+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,function(e){return e.charCodeAt(0)})):e;return((t?r(e):s(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=s}()},39904(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.t=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some(function(e){return e.length>63})}},2467(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(n,r){function s(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,s,{once:!0})})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var s,o,i,c;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(s=l(e))>0&&i.length>s&&!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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=u.bind(r);return s.listener=n,r.wrapFn=s,s}function p(e,t,n){var r=e._events;if(void 0===r)return[];var s=r[t];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(s):m(s,s.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function s(o){r.once&&e.removeEventListener(t,s),n(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var s="error"===e,o=this._events;if(void 0!==o)s=s&&void 0===o.error;else if(!s)return!1;if(s){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,s,o,i;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,s=o;break}if(s<0)return this;0===s?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,s),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var s,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(s=o[r])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},20305(e){"use strict";function t(e,t,n,r){var s=Number(e[t].meta.id+1).toString(),o="";return"string"==typeof r.docId&&(o="-"+r.docId+"-"),o+s}function n(e,t){var n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=":"+e[t].meta.subId),"["+n+"]"}function r(e,t,n,r,s){var o=s.rules.footnote_anchor_name(e,t,n,r,s),i=s.rules.footnote_caption(e,t,n,r,s),a=o;return e[t].meta.subId>0&&(a+=":"+e[t].meta.subId),'<sup class="footnote-ref"><a href="#fn'+o+'" id="fnref'+a+'">'+i+"</a></sup>"}function s(e,t,n){return(n.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'}function o(){return"</ol>\n</section>\n"}function i(e,t,n,r,s){var o=s.rules.footnote_anchor_name(e,t,n,r,s);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),'<li id="fn'+o+'" class="footnote-item">'}function a(){return"</li>\n"}function l(e,t,n,r,s){var o=s.rules.footnote_anchor_name(e,t,n,r,s);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),' <a href="#fnref'+o+'" class="footnote-backref">↩︎</a>'}e.exports=function(e){var c=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=r,e.renderer.rules.footnote_block_open=s,e.renderer.rules.footnote_block_close=o,e.renderer.rules.footnote_open=i,e.renderer.rules.footnote_close=a,e.renderer.rules.footnote_anchor=l,e.renderer.rules.footnote_caption=n,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",function(e,t,n,r){var s,o,i,a,l,c,d,p,h,m,g,f=e.bMarks[t]+e.tShift[t],b=e.eMarks[t];if(f+4>b)return!1;if(91!==e.src.charCodeAt(f))return!1;if(94!==e.src.charCodeAt(f+1))return!1;for(l=f+2;l<b;l++){if(32===e.src.charCodeAt(l))return!1;if(93===e.src.charCodeAt(l))break}if(l===f+2)return!1;if(l+1>=b||58!==e.src.charCodeAt(++l))return!1;if(r)return!0;for(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),c=e.src.slice(f+2,l-2),e.env.footnotes.refs[":"+c]=-1,(d=new e.Token("footnote_reference_open","",1)).meta={label:c},d.level=e.level++,e.tokens.push(d),s=e.bMarks[t],o=e.tShift[t],i=e.sCount[t],a=e.parentType,g=l,p=h=e.sCount[t]+l-(e.bMarks[t]+e.tShift[t]);l<b&&(m=e.src.charCodeAt(l),u(m));)9===m?h+=4-h%4:h++,l++;return e.tShift[t]=l-g,e.sCount[t]=h-p,e.bMarks[t]=g,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,n,!0),e.parentType=a,e.blkIndent-=4,e.tShift[t]=o,e.sCount[t]=i,e.bMarks[t]=s,(d=new e.Token("footnote_reference_close","",-1)).level=--e.level,e.tokens.push(d),!0},{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",function(e,t){var n,r,s,o,i=e.posMax,a=e.pos;return!(a+2>=i)&&(94===e.src.charCodeAt(a)&&(91===e.src.charCodeAt(a+1)&&(n=a+2,!((r=c(e,a+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),s=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(n,r),e.md,e.env,o=[]),e.push("footnote_ref","",0).meta={id:s},e.env.footnotes.list[s]={content:e.src.slice(n,r),tokens:o}),e.pos=r+1,e.posMax=i,!0))))}),e.inline.ruler.after("footnote_inline","footnote_ref",function(e,t){var n,r,s,o,i=e.posMax,a=e.pos;if(a+3>i)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(a))return!1;if(94!==e.src.charCodeAt(a+1))return!1;for(r=a+2;r<i;r++){if(32===e.src.charCodeAt(r))return!1;if(10===e.src.charCodeAt(r))return!1;if(93===e.src.charCodeAt(r))break}return r!==a+2&&(!(r>=i)&&(r++,n=e.src.slice(a+2,r-1),void 0!==e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(s=e.env.footnotes.list.length,e.env.footnotes.list[s]={label:n,count:0},e.env.footnotes.refs[":"+n]=s):s=e.env.footnotes.refs[":"+n],o=e.env.footnotes.list[s].count,e.env.footnotes.list[s].count++,e.push("footnote_ref","",0).meta={id:s,subId:o,label:n}),e.pos=r,e.posMax=i,!0)))}),e.core.ruler.after("inline","footnote_tail",function(e){var t,n,r,s,o,i,a,l,c,u,d=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(e){return"footnote_reference_open"===e.type?(d=!0,c=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(d=!1,p[":"+u]=c,!1):(d&&c.push(e),!d)}),e.env.footnotes.list)){for(i=e.env.footnotes.list,a=new e.Token("footnote_block_open","",1),e.tokens.push(a),t=0,n=i.length;t<n;t++){for((a=new e.Token("footnote_open","",1)).meta={id:t,label:i[t].label},e.tokens.push(a),i[t].tokens?(l=[],(a=new e.Token("paragraph_open","p",1)).block=!0,l.push(a),(a=new e.Token("inline","",0)).children=i[t].tokens,a.content=i[t].content,l.push(a),(a=new e.Token("paragraph_close","p",-1)).block=!0,l.push(a)):i[t].label&&(l=p[":"+i[t].label]),l&&(e.tokens=e.tokens.concat(l)),o="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,s=i[t].count>0?i[t].count:1,r=0;r<s;r++)(a=new e.Token("footnote_anchor","",0)).meta={id:t,subId:r,label:i[t].label},e.tokens.push(a);o&&e.tokens.push(o),a=new e.Token("footnote_close","",-1),e.tokens.push(a)}a=new e.Token("footnote_block_close","",-1),e.tokens.push(a)}})}},34657(){},57799(){},56239(){},23263(){},45349(){},45817(){},28151(){},44582(){},60802(){},1184(){},92051(){},33829(){},55307(){},68294(){},29900(){},8243(){},76391(){},94089(){},39769(){},87682(e,t,n){"use strict";n.d(t,{A:()=>r});const r={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},8706(e,t,n){"use strict";n.d(t,{A:()=>r});const r={global:"_fUXxnSp5pagKBp9gSN7"}},48297(){},75070(){},47621(){},13371(){},37209(){},49663(){},97850(){},78518(){},84368(){},85808(){},49882(){},18681(){},82805(){},28769(){},78215(){},61095(){},75360(){},25378(){},45318(){},16279(){},59357(){},88561(){},27453(){},14647(){},93726(){},31369(){},30938(){},50221(){},2753(){},52918(){},64525(){},1982(){},79935(){},45199(){},89399(){},73163(){},63036(){},88894(){},75646(){},89275(){},17309(){},17319(){},58203(){},80490(){},20744(){},591(){},86154(){},58227(){},89732(e,t,n){"use strict";n.d(t,{A:()=>r});const r={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},60333(){},94533(){},42265(){},22734(){},24920(){},72613(){},90698(){},42036(){},93571(){},94378(){},51082(){},51521(){},62653(){},44997(e){var t=1e3,n=60*t,r=60*n,s=24*r,o=7*s,i=365.25*s;function a(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"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 a=/^(-?(?:\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(!a)return;var l=parseFloat(a[1]);switch((a[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*s;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=s)return a(e,o,s,"day");if(o>=r)return a(e,o,r,"hour");if(o>=n)return a(e,o,n,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=s)return Math.round(e/s)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},14936(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(87399),s=n.n(r),o=n(10067),i=n.n(o),a=n(11264),l=n.n(a);const c=i()("photon"),u={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},d="__domain__.invalid",p=`https://${d}`;function h(e,t){let n;try{n=new URL(e,p)}catch{return null}const r="https:"===n.protocol,o=new URL("https://i0.wp.com");if(i=n.host,/^i[0-2]\.wp\.com$/.test(i))o.pathname=n.pathname,o.hostname=r?"i0.wp.com":n.hostname;else{if(n.search)return null;let e=n.href.replace(`${n.protocol}/`,"");"blob:"===n.protocol&&(e=n.pathname.replace("://","//")),n.hostname===d&&(e=n.pathname),o.pathname=e,o.hostname=function(e,t){if(t)return"i0.wp.com";const n=s()(e),r=l()(n),o="i"+Math.floor(3*r());return c('determined server "%s" to use with "%s"',o,e),o+".wp.com"}(e,"https:"===o.protocol),r&&o.searchParams.set("ssl","1")}var i;if(t)for(const[e,n]of Object.entries(t))"host"!==e&&"hostname"!==e?"secure"!==e||n?o.searchParams.set(u[e]??e,n.toString()):o.protocol="http:":o.hostname=n;return c("generated Photon URL: %s",o.href),o.href}},87072(e,t,n){"use strict";n.d(t,{Ay:()=>y});const r=2147483647,s=36,o=/^xn--/,i=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(l[e])}function p(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const s=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(a,".")).split("."),t).join(".");return r+s}function h(e){const t=[];let n=0;const r=e.length;for(;n<r;){const s=e.charCodeAt(n++);if(s>=55296&&s<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&s)<<10)+(1023&r)+65536):(t.push(s),n--)}else t.push(s)}return t}const m=function(e){return e>=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:s},g=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,n){let r=0;for(e=n?c(e/700):e>>1,e+=c(e/t);e>455;r+=s)e=c(e/35);return c(r+36*e/(e+38))},b=function(e){const t=[],n=e.length;let o=0,i=128,a=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let n=0;n<l;++n)e.charCodeAt(n)>=128&&d("not-basic"),t.push(e.charCodeAt(n));for(let u=l>0?l+1:0;u<n;){const l=o;for(let t=1,i=s;;i+=s){u>=n&&d("invalid-input");const l=m(e.charCodeAt(u++));l>=s&&d("invalid-input"),l>c((r-o)/t)&&d("overflow"),o+=l*t;const p=i<=a?1:i>=a+26?26:i-a;if(l<p)break;const h=s-p;t>c(r/h)&&d("overflow"),t*=h}const p=t.length+1;a=f(o-l,p,0==l),c(o/p)>r-i&&d("overflow"),i+=c(o/p),o%=p,t.splice(o++,0,i)}return String.fromCodePoint(...t)},v=function(e){const t=[],n=(e=h(e)).length;let o=128,i=0,a=72;for(const n of e)n<128&&t.push(u(n));const l=t.length;let p=l;for(l&&t.push("-");p<n;){let n=r;for(const t of e)t>=o&&t<n&&(n=t);const h=p+1;n-o>c((r-i)/h)&&d("overflow"),i+=(n-o)*h,o=n;for(const n of e)if(n<o&&++i>r&&d("overflow"),n===o){let e=i;for(let n=s;;n+=s){const r=n<=a?1:n>=a+26?26:n-a;if(e<r)break;const o=e-r,i=s-r;t.push(u(g(r+o%i,0))),e=c(o/i)}t.push(u(g(e,0))),a=f(i,h,p===l),i=0,++p}++i,++o}return t.join("")},y={version:"2.3.1",ucs2:{decode:h,encode:e=>String.fromCodePoint(...e)},decode:b,encode:v,toASCII:function(e){return p(e,function(e){return i.test(e)?"xn--"+v(e):e})},toUnicode:function(e){return p(e,function(e){return o.test(e)?b(e.slice(4).toLowerCase()):e})}}},24588(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=s(o),r=s(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,s={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in s||(s[o]=i)}return s}},96811(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},94107(e,t,n){"use strict";n.d(t,{A:()=>j});var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var s=r[n];e.call(t,s[1],s[0])}},t}()}(),s="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),i="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],l="undefined"!=typeof MutationObserver,c=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,s=0;function o(){n&&(n=!1,e()),r&&l()}function a(){i(o)}function l(){var e=Date.now();if(n){if(e-s<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);s=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){s&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){s&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},p=v(0,0,0,0);function h(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+h(e["border-"+n+"-width"])},0)}function g(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=d(e).getComputedStyle(e),s=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var s=r[n],o=e["padding-"+s];t[s]=h(o)}return t}(r),o=s.left+s.right,i=s.top+s.bottom,a=h(r.width),l=h(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==t&&(a-=m(r,"left","right")+o),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===d(e).document.documentElement}(e)){var c=Math.round(a+o)-t,u=Math.round(l+i)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(u)&&(l-=u)}return v(s.left,s.top,a,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function b(e){return s?f(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):g(e):p}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var y=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=b(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,s,o,i,a,l,c=(r=(n=t).x,s=n.y,o=n.width,i=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),u(l,{x:r,y:s,width:o,height:i,top:s,right:r+o,bottom:i+s,left:r}),l);u(this,{target:e,contentRect:c})},x=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new k(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),_="undefined"!=typeof WeakMap?new WeakMap:new r,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new x(t,n,this);_.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){w.prototype[e]=function(){var t;return(t=_.get(this))[e].apply(t,arguments)}});const j=void 0!==o.ResizeObserver?o.ResizeObserver:w},11264(e){"use strict";var t=256,n=[],r=window,s=Math.pow(t,6),o=Math.pow(2,52),i=2*o,a=255,l=Math.random;function c(e){var n,r=e.length,s=this,o=0,i=s.i=s.j=0,l=s.S=[];for(r||(e=[r++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[i=a&i+e[o%r]+(n=l[o])],l[i]=n;(s.g=function(e){for(var n,r=0,o=s.i,i=s.j,l=s.S;e--;)n=l[o=a&o+1],r=r*t+l[a&(l[o]=l[i=a&i+n])+(l[i]=n)];return s.i=o,s.j=i,r})(t)}function u(e,t){var n,r=[],s=(typeof e)[0];if(t&&"o"==s)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==s?e:e+"\0"}function d(e,t){for(var n,r=e+"",s=0;s<r.length;)t[a&s]=a&(n^=19*t[a&s])+r.charCodeAt(s++);return p(t)}function p(e){return String.fromCharCode.apply(0,e)}e.exports=function(a,l){if(l&&!0===l.global)return l.global=!1,Math.random=e.exports(a,l),l.global=!0,Math.random;var h=[],m=(d(u(l&&l.entropy||!1?[a,p(n)]:0 in arguments?a:function(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),p(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,p(n)]}}(),3),h),new c(h));return d(p(m.S),n),function(){for(var e=m.g(6),n=s,r=0;e<o;)e=(e+r)*t,n*=t,r=m.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},d(Math.random(),n)},48931(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(1455),s=n.n(r);const o="default"in s()?s().default:s()},87286(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(47143),s=n(10067),o=n.n(s),i=n(53664);const a=o()("jetpack-ai-client:ask-question");async function l(e,{postId:t=null,fromCache:n=!1,feature:s,functions:o,model:l,languageCode:c}={}){const u=c||(0,r.select)("core").getEntityRecord("root","site")?.language||"en_US";return a("Asking question: %o. options: %o",e,{postId:t,fromCache:n,feature:s,functions:o,model:l,languageCode:u}),new i.A({question:e,options:{postId:t,feature:s,fromCache:n,functions:o,model:l,languageCode:u}})}},31439(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(47143),s=n(10067),o=n.n(s),i=n(51391);const a=o()("jetpack-ai-client:ask-question-sync");async function l(e,t={}){t.languageCode=t.languageCode||(0,r.select)("core").getEntityRecord("root","site")?.language||"en_US",a("Asking question with no streaming: %o. options: %o",e,t);let n;try{n=(await(0,i.A)()).token}catch(e){return a("Error getting token: %o",e),Promise.reject(e)}const s=Array.isArray(e)?{messages:e}:{question:e},{languageCode:o,...l}=t,c={...s,...l,language_code:o,stream:!1},u={Authorization:`Bearer ${n}`,"Content-Type":"application/json"};try{const e=await fetch("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",{method:"POST",headers:u,body:JSON.stringify(c)}).then(e=>e.json());return e?.data?.status&&e?.data?.status>200?(a("Error generating prompt: %o",e),Promise.reject(e)):e.choices?.[0]?.message?.content}catch(e){return a("Error asking question: %o",e),Promise.reject(e)}}},57745(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(10067),s=n.n(r),o=n(51391);const i=s()("jetpack-ai-client:audio-transcription");async function a(e,t,n){let r;i("Transcribing audio: %o. Feature: %o",e,t);try{r=(await(0,o.A)()).token}catch(e){return i("Error getting token: %o",e),Promise.reject(e)}const s=new FormData;s.append("audio_file",e);try{const e={Authorization:`Bearer ${r}`},o="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-transcription"+(t?`?feature=${t}`:"");return fetch(o,{method:"POST",body:s,headers:e,signal:n??void 0}).then(e=>(i("Transcription response: %o",e),e.ok?e.json().then(e=>e?.text):e.json().then(e=>Promise.reject(e))))}catch(e){return i("Transcription error response: %o",e),Promise.reject(e)}}},70629(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(13022),o=n(6754),i=(n(34657),n(10790));function a({className:e,disabled:t=!1,value:n="",placeholder:a="",isTransparent:l=!1,state:c="init",onChange:u,banner:d=null,error:p=null,actions:h=null,message:m=null,promptUserInputRef:g=null,wrapperRef:f=null}){return(0,i.jsxs)("div",{className:(0,s.A)("jetpack-components-ai-control__container-wrapper",e),ref:f,children:[p,(0,i.jsxs)("div",{className:"jetpack-components-ai-control__container",children:[d,(0,i.jsxs)("div",{className:(0,s.A)("jetpack-components-ai-control__wrapper",{"is-transparent":l}),children:[(0,i.jsx)(o.A,{state:c}),(0,i.jsx)("div",{className:"jetpack-components-ai-control__input-wrapper",children:(0,i.jsx)(r.PlainText,{value:n,onChange:u,placeholder:a,className:"jetpack-components-ai-control__input",disabled:t,ref:g})}),h]}),m]})]})}},71417(e,t,n){"use strict";n.d(t,{A:()=>x});var r=n(56427),s=n(29491),o=n(86087),i=n(27723),a=n(13109),l=n(87756),c=n(88901),u=n(65995),d=n(48568),p=n(57839),h=n(10067),m=n.n(h),g=n(51609),f=n(63098),b=n(70629),v=(n(34657),n(10790));const __=i.__,y=m()("jetpack-ai-client:block-ai-control");function k({disabled:e=!1,value:t="",placeholder:n="",showAccept:i=!1,acceptLabel:h=__("Accept","jetpack"),showButtonLabels:m=!0,isTransparent:g=!1,state:k="init",showGuideLine:x=!1,customFooter:_=null,onChange:w,onSend:j,onStop:C,onAccept:A,onDiscard:S,showRemove:E=!1,banner:T=null,error:N=null,lastAction:P},B){const R="requesting"===k||"suggesting"===k,[I,D]=(0,o.useState)(!1),[L,F]=(0,o.useState)(t||null),M=(0,o.useRef)(null);(0,o.useImperativeHandle)(B,()=>M.current),(0,o.useEffect)(()=>{I&&M?.current?.focus()},[I]);const O=(0,o.useCallback)(()=>{F(t),D(!1),j?.(t)},[t]),U=(0,o.useCallback)(e=>{w?.(e),"init"!==k&&D(L?e!==L:e.length>0)},[L,k]),z=(0,o.useCallback)(()=>{S?.()},[]),$=(0,o.useCallback)(()=>{y("cancelEdit, revert to last value",L),w?.(L||""),D(!1)},[L]);(0,s.useKeyboardShortcut)("mod+enter",()=>{i&&A?.()},{target:M}),(0,s.useKeyboardShortcut)("enter",e=>{e.preventDefault(),O()},{target:M});const q=(0,v.jsxs)(v.Fragment,{children:[(!i||I)&&(0,v.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:R?(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:C,variant:"secondary",label:__("Stop request","jetpack"),children:m?__("Stop","jetpack"):(0,v.jsx)(a.A,{icon:u.A})}):(0,v.jsxs)(v.Fragment,{children:[I&&(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:$,variant:"secondary",label:__("Cancel","jetpack"),children:m?__("Cancel","jetpack"):(0,v.jsx)(a.A,{icon:u.A})}),E&&!I&&!t?.length&&S&&(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:z,variant:"secondary",label:__("Cancel","jetpack"),children:m?__("Cancel","jetpack"):(0,v.jsx)(a.A,{icon:u.A})}),t?.length>0&&(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:O,variant:"primary",disabled:!t?.length||e,label:__("Send request","jetpack"),children:m?__("Generate","jetpack"):(0,v.jsx)(a.A,{icon:l.A})})]})}),i&&!I&&(0,v.jsxs)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:[(t?.length>0||null===L)&&(0,v.jsxs)(r.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Discard","jetpack"),onClick:z,tooltipPosition:"top",children:(0,v.jsx)(a.A,{icon:p.A})}),(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Regenerate","jetpack"),onClick:()=>j?.(t),tooltipPosition:"top",disabled:!t?.length||null===t||e,children:(0,v.jsx)(a.A,{icon:d.A})})]}),(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:A,variant:"primary",label:h,children:m?h:(0,v.jsx)(a.A,{icon:c.A})})]})]}),H=x&&!R&&!I&&(_||(0,v.jsx)(f.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:"ai-assistant"}}));return(0,v.jsx)(b.A,{disabled:e||R,value:t,placeholder:n,isTransparent:g,state:k,onChange:U,banner:T,error:N,actions:q,message:H,promptUserInputRef:M})}const x=(0,g.forwardRef)(k)},61(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(56427),s=n(29491),o=n(86087),i=n(27723),a=n(13109),l=n(87756),c=n(65995),u=n(84701),d=n(51609),p=n(63098),h=n(70629),m=(n(34657),n(10790));const __=i.__;function g({className:e,disabled:t=!1,value:n="",placeholder:i="",showButtonLabels:d=!0,isTransparent:g=!1,state:f="init",showGuideLine:b=!1,error:v,requestsRemaining:y,showUpgradeMessage:k=!1,showFairUsageMessage:x=!1,upgradeUrl:_,wrapperRef:w,onChange:j,onSend:C,onStop:A,onClose:S,onUndo:E,onUpgrade:T,onTryAgain:N,lastAction:P,blockType:B},R){const I="requesting"===f||"suggesting"===f,[D,L]=(0,o.useState)(!1),[F,M]=(0,o.useState)(n||null),O=(0,o.useRef)(null),U=n?.length<=0&&"done"===f;(0,o.useImperativeHandle)(R,()=>O.current),(0,o.useEffect)(()=>{D&&O?.current?.focus()},[D]);const z=(0,o.useCallback)(()=>{M(n),L(!1),C?.(n)},[C,n]),$=(0,o.useCallback)(e=>{j?.(e),"init"!==f&&L(F?e!==F:e.length>0)},[j,F,f]),q=(0,o.useCallback)(()=>{A?.()},[A]),H=(0,o.useCallback)(()=>{S?.()},[S]),V=(0,o.useCallback)(()=>{E?.()},[E]),G=(0,o.useCallback)(e=>{T?.(e)},[T]),W=(0,o.useCallback)(()=>{N?.()},[N]);(0,s.useKeyboardShortcut)("enter",e=>{e.preventDefault(),z()},{target:O});const Z=(0,m.jsx)(m.Fragment,{children:I?(0,m.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:q,variant:"secondary",label:__("Stop request","jetpack"),children:d?__("Stop","jetpack"):(0,m.jsx)(a.A,{icon:c.A})}):(0,m.jsxs)(m.Fragment,{children:[n?.length>0&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:z,variant:"primary",disabled:!n?.length||t,label:__("Send request","jetpack"),children:d?__("Generate","jetpack"):(0,m.jsx)(a.A,{icon:l.A})})}),U&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsxs)(r.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,m.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Undo","jetpack"),onClick:V,tooltipPosition:"top",children:(0,m.jsx)(a.A,{icon:u.A})}),(0,m.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Close","jetpack"),onClick:H,variant:"tertiary",children:__("Close","jetpack")})]})})]})});let J=null;return v?.message?J=(0,m.jsx)(p.Kw,{error:v.message,code:v.code,onTryAgainClick:W,onUpgradeClick:G,upgradeUrl:_}):x?J=(0,m.jsx)(p.k9,{}):k?J=(0,m.jsx)(p.AK,{requestsRemaining:y,onUpgradeClick:G,upgradeUrl:_}):b&&(J=U?(0,m.jsx)(p.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:B}}):(0,m.jsx)(p.Yj,{})),(0,m.jsx)(h.A,{className:e,disabled:t||I,value:n,placeholder:i,isTransparent:g,state:f,onChange:$,actions:Z,message:J,promptUserInputRef:O,wrapperRef:w})}const f=(0,d.forwardRef)(g)},42299(e,t,n){"use strict";n.d(t,{FC:()=>s.A,N0:()=>r.A});n(70629);var r=n(71417),s=n(61)},11497(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(85985),s=n(56427),o=n(86087),i=n(27723),a=n(57577),l=n(22201),c=n(13022),u=(n(57799),n(10790));const __=i.__;function d({disabled:e=!1,iconSize:t=24,ratedItem:n="",feature:i="",savedRatings:d={},options:p={},onRate:h}){if(!function(e){return!0===(0,r.FB)(e).available}("ai-response-feedback"))return null;const[m,g]=(0,o.useState)({}),{tracks:f}=(0,r.st)();(0,o.useEffect)(()=>{const e={...d,...m};JSON.stringify(e)!==JSON.stringify(m)&&g(e)},[d]);const b=e=>!!m[n]&&m[n]===e,v=e=>{const t=e?"thumbs-up":"thumbs-down";b(t)||(g({...m,[n]:t}),h?.(t),f.recordEvent("jetpack_ai_feedback",{type:i,rating:t,media_library_id:p.mediaLibraryId||null,prompt:p.prompt||null,revised_prompt:p.revisedPrompt||null,block:p.block||null}))};return(0,u.jsxs)("div",{className:"ai-assistant-feedback__selection",children:[(0,u.jsx)(s.Tooltip,{text:__("I like this","jetpack"),children:(0,u.jsx)(s.Button,{disabled:e,icon:l.A,onClick:()=>v(!0),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-up")})})}),(0,u.jsx)(s.Tooltip,{text:__("I don't find this useful","jetpack"),children:(0,u.jsx)(s.Button,{disabled:e,icon:a.A,onClick:()=>v(!1),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-down")})})})]})}},23059(e,t,n){"use strict";n(56427),n(5573),n(10790)},96390(e,t,n){"use strict";n(85985),n(56427),n(86087),n(27723);var r=n(10067),s=n.n(r);n(23101),n(46381),n(14016),n(57853),n(77990),n(47560),n(56239),n(10790);s()("jetpack-ai-client:ai-image-modal")},77990(e,t,n){"use strict";n(56427),n(86087),n(27723),n(11497),n(23059),n(23263),n(10790)},47560(e,t,n){"use strict";n(86087),n(27723),n(45349),n(10790)},89289(e,t,n){"use strict";n(85985),n(56427),n(47143),n(43656),n(86087),n(27723);var r=n(10067),s=n.n(r);n(45817),n(43984),n(72448),n(71508),n(62038),n(96390),n(3620),n(35918),n(10790);s()("jetpack-ai-client:featured-image")},83158(e,t,n){"use strict";n(85985),n(56427),n(86087),n(27723);var r=n(10067),s=n.n(r);n(45817),n(72448),n(71508),n(62038),n(96390),n(3620),n(35918),n(10790);s()("jetpack-ai:general-purpose-image")},3620(e,t,n){"use strict";n(47143),n(86087),n(27723),n(93832),n(31439),n(72448),n(62614),n(62038)},35918(e,t,n){"use strict";n(97999),n(86087)},77089(e,t,n){"use strict";n(89289),n(83158)},46381(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(56427),s=n(86087),o=n(27723),i=n(13109),a=n(28847),l=(n(28151),n(10790));const __=o.__;function c({onGuidelinesClick:e,onFeedbackClick:t}){const n=(0,s.useCallback)(()=>{e?.()},[e]),o=(0,s.useCallback)(()=>{t?.()},[t]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"ai-image-modal__footer-disclaimer",children:[(0,l.jsx)(i.A,{icon:a.A}),(0,l.jsx)("span",{children:__("Generated images could be inaccurate, biased or include text.","jetpack")}),(0,l.jsx)(r.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:n,children:(0,l.jsxs)("span",{children:[__("Guidelines","jetpack")," ↗"]})})]}),(0,l.jsx)(r.Button,{variant:"link",className:"ai-image-modal__feedback-button",href:"https://jetpack.com/redirect/?source=jetpack-ai-feedback",target:"_blank",onClick:o,children:(0,l.jsxs)("span",{children:[__("Give feedback","jetpack")," ↗"]})})]})}},6754(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(56427),s=n(13022),o=(n(44582),n(10790));function i({state:e}){return(0,o.jsx)("div",{className:(0,s.A)("jetpack-ai-status-indicator__icon-wrapper",{[`is-${e}`]:!0}),children:(0,o.jsx)(r.Spinner,{})})}},68203(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(32569),s=n(10790);function o({duration:e,className:t}){return(0,s.jsx)("span",{className:t,children:(0,r.f)(e,{addDecimalPart:!1})})}},32569(e,t,n){"use strict";function r(e,{addDecimalPart:t=!1,showMinutes:n=!0,showHours:r=!1}={}){const s=Math.floor(e/36e5),o=Math.floor(e/6e4)%60,i=Math.floor(e/1e3)%60,a=Math.floor(e/10)%100,l=[s>0||r?s.toString().padStart(2,"0")+":":"",s>0||o>0||n?o.toString().padStart(2,"0")+":":"",i.toString().padStart(2,"0")];return t&&l.push("."+a.toString().padStart(2,"0")),l.join("")}n.d(t,{f:()=>r})},27802(e,t,n){"use strict";n.d(t,{AK:()=>o.AK,FC:()=>r.FC,Hb:()=>i.A,N0:()=>r.N0,QA:()=>i.Q,z3:()=>s.A});var r=n(42299),s=(n(11497),n(23059),n(77089),n(6754),n(68203)),o=(n(46381),n(63098)),i=(n(14016),n(57853))},63098(e,t,n){"use strict";n.d(t,{AK:()=>w,Kw:()=>j,Yj:()=>x,k9:()=>_});var r=n(56427),s=n(86087),o=n(27723),i=n(13109),a=n(88901),l=n(79654),c=n(13022),u=(n(60802),n(42154)),d=n(78836),p=n(11497),h=n(10790);const __=o.__,m="warning",g="error",f="success",b="info",v={[b]:null,[m]:null,[g]:u.A,[f]:a.A};function y({severity:e=b,icon:t=null,aiFeedbackThumbsOptions:n={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}},children:r}){return(0,h.jsxs)("div",{className:(0,c.A)("jetpack-ai-assistant__message",`jetpack-ai-assistant__message-severity-${e}`),children:[(v[e]||t)&&(0,h.jsx)(i.A,{icon:v[e]||t}),(0,h.jsx)("div",{className:"jetpack-ai-assistant__message-content",children:r}),n.showAIFeedbackThumbs&&n.prompt&&(0,h.jsx)(p.A,{disabled:!1,ratedItem:n.ratedItem,feature:"ai-assistant",options:{prompt:n.prompt,block:n.block},onRate:n.onRate})]})}function k(){return(0,h.jsx)(l.N,{openInNewTab:!0,href:"https://jetpack.com/redirect/?source=ai-guidelines",children:__("Learn more","jetpack")})}function x({aiFeedbackThumbsOptions:e={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}}}){return(0,h.jsxs)(y,{aiFeedbackThumbsOptions:e,children:[(0,h.jsx)("span",{children:__("AI-generated content could be inaccurate or biased.","jetpack")}),(0,h.jsx)(k,{})]})}function _(){const e=__("You've reached this month's request limit, per our <link>fair usage policy</link>","jetpack"),t=(0,s.createInterpolateElement)(e,{link:(0,h.jsx)(l.N,{openInNewTab:!0,href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",children:null})});return(0,h.jsx)(y,{severity:m,children:t})}function w({requestsRemaining:e,severity:t,onUpgradeClick:n,upgradeUrl:s}){let i=t;return null==i&&(i=e>0?b:m),(0,h.jsxs)(y,{severity:i,children:[(0,h.jsx)("span",{children:(0,o.sprintf)(
// translators: %1$d: number of requests remaining
__("You have %1$d requests remaining.","jetpack"),e)}),(0,h.jsx)(r.Button,{variant:"link",onClick:n,href:s,target:s?"_blank":null,children:(0,h.jsx)("span",{children:__("Upgrade now","jetpack")})})]})}function j({error:e,code:t,onTryAgainClick:n,onUpgradeClick:s,upgradeUrl:i}){const a=e||__("Something went wrong","jetpack");return(0,h.jsxs)(y,{severity:g,children:[(0,h.jsx)("span",{children:(0,o.sprintf)(
// translators: %1$d: A dynamic error message
__("Error: %1$s","jetpack"),a)}),t===d.Or?(0,h.jsx)(r.Button,{variant:"link",onClick:s,href:i,target:i?"_blank":null,children:(0,h.jsx)("span",{children:__("Upgrade now","jetpack")})}):(0,h.jsx)(r.Button,{variant:"link",onClick:n,children:(0,h.jsx)("span",{children:__("Try again","jetpack")})})]})}},14016(e,t,n){"use strict";n(56427),n(27723),n(6754),n(1184),n(10790)},57853(e,t,n){"use strict";n.d(t,{A:()=>b,Q:()=>f});var r=n(3924),s=n(85985),o=n(82201),i=n(56427),a=n(86087),l=n(27723),c=n(10067),u=n.n(c),d=n(42694),p=n(72448),h=n(71567),m=(n(92051),n(10790));const __=l.__,g=u()("jetpack-ai-client:upgrade-prompt"),f=({variant:e="error"})=>{const t=(()=>{const{usagePeriod:e}=(0,p.A)(),t=(e=>{const t=__("You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.","jetpack");if(!e)return t;
// Translators: %s is the date when the requests will reset.
const n=__("Requests will reset on %s.","jetpack");return`${t} ${(0,l.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e));return(0,a.createInterpolateElement)(t,{link:(0,m.jsx)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"}),span:(0,m.jsx)("span",{})})})();return"muted"===e?(0,m.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,m.jsx)(i.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null},b=e=>{const{upgradeType:t,currentTier:n}=(0,p.A)();return 1===n?.value?(0,m.jsx)(f,{}):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const n=t?h.U:o.cb,r=(0,a.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(n,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||r,goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null})})({description:e.description,useLightNudge:e?.useLightNudge}):(({placement:e=null,description:t=null,useLightNudge:n=!1})=>{const i=n?h.U:o.cb,{checkoutUrl:c}=(0,d.A)(),u=(0,s.CP)(),{nextTier:f,tierPlansEnabled:b,currentTier:v,requestsCount:y}=(0,p.A)(),{tracks:k}=(0,s.st)(),x=(0,a.useCallback)(()=>{g("upgrade",e),k.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:v?.slug,requests_count:y,placement:e})},[v,y,k,e]),_=(0,a.useCallback)(()=>{g("contact us",e),k.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})},[k,e]);if(!u){const e=(0,a.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Reach out to the site administrator to upgrade and keep using Jetpack AI.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(i,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(b){if(!f){const e=(0,r.A)("jetpack-ai-tiers-more-requests-contact"),n=__("You have reached the request limit for your current plan.","jetpack");return(0,m.jsx)(i,{buttonText:__("Contact Us","jetpack"),description:t||n,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:_,target:"_blank"})}const e=(0,a.createInterpolateElement)((0,l.sprintf)(/* Translators: %d: the number of requests allowed */
__("You have reached the requests limit for your current plan. <strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack"),f.limit),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(i,{buttonText:(0,l.sprintf)(/* Translators: %d: the number of requests */
__("Upgrade to %d requests","jetpack"),f.limit),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:x,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,m.jsx)(i,{buttonText:__("Upgrade","jetpack"),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:(0,a.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Upgrade now to keep using it.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})}),goToCheckoutPage:x,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},71567(e,t,n){"use strict";n.d(t,{U:()=>i});var r=n(56427),s=n(27723),o=(n(92051),n(10790));const __=s.__,i=({title:e,description:t,buttonText:n=null,checkoutUrl:s=null,goToCheckoutPage:i=null,isRedirecting:a=!1,showButton:l=!0,target:c="_top"})=>{const u=__("Redirecting…","jetpack");return(0,o.jsx)("div",{className:"jetpack-upgrade-plan-banner-light",children:(0,o.jsx)(r.Notice,{status:"error",isDismissible:!1,children:(0,o.jsxs)("p",{children:[e&&(0,o.jsx)("strong",{children:e}),t," ",l&&(0,o.jsx)(r.Button,{href:a?null:s,onClick:i,variant:"link",target:c,children:(0,o.jsx)("span",{children:a?u:n})})]})})})}},43984(e,t,n){"use strict";n.d(t,{A4:()=>l,DD:()=>x,DT:()=>N,Gm:()=>g,HM:()=>_,JR:()=>w,K2:()=>C,Rq:()=>T,UA:()=>m,UD:()=>j,br:()=>d,d5:()=>b,eJ:()=>h,fD:()=>p,fv:()=>v,im:()=>i,mI:()=>A,mT:()=>E,oZ:()=>o,pE:()=>f,sn:()=>a,so:()=>s,u0:()=>y,uQ:()=>k,vE:()=>u,yQ:()=>S,yy:()=>c});var r=n(27723);const __=r.__,s={en:{label:__("English","jetpack")},es:{label:__("Spanish","jetpack")},fr:{label:__("French","jetpack")},de:{label:__("German","jetpack")},it:{label:__("Italian","jetpack")},pt:{label:__("Portuguese","jetpack")},ru:{label:__("Russian","jetpack")},zh:{label:__("Chinese","jetpack")},ja:{label:__("Japanese","jetpack")},ar:{label:__("Arabic","jetpack")},hi:{label:__("Hindi","jetpack")},ko:{label:__("Korean","jetpack")}},o={formal:{label:__("Formal","jetpack"),emoji:"🎩"},informal:{label:__("Informal","jetpack"),emoji:"😊"},optimistic:{label:__("Optimistic","jetpack"),emoji:"😃"},humorous:{label:__("Humorous","jetpack"),emoji:"😂"},serious:{label:__("Serious","jetpack"),emoji:"😐"},skeptical:{label:__("Skeptical","jetpack"),emoji:"🤨"},empathetic:{label:__("Empathetic","jetpack"),emoji:"💗"},confident:{label:__("Confident","jetpack"),emoji:"😎"},passionate:{label:__("Passionate","jetpack"),emoji:"❤️"},provocative:{label:__("Provocative","jetpack"),emoji:"🔥"}},i="titleSummary",a="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",h="changeTone",m="summarize",g="changeLanguage",f="userPrompt",b="transformListToTable",v="writePostFromList",y=__("Translate","jetpack"),k=__("Change tone","jetpack"),x=__("Correct spelling and grammar","jetpack"),_=__("Simplify","jetpack"),w=__("Summarize","jetpack"),j=__("Make shorter","jetpack"),C=__("Expand","jetpack"),A=__("Turn list into a table","jetpack"),S=__("Write a post from this list","jetpack"),E=__("Generate a post title","jetpack"),T=__("Summary based on title","jetpack"),N=__("Continue writing","jetpack")},2166(e,t,n){"use strict";n.d(t,{R:()=>i});var r=n(51609),s=n(10790);const o=(0,r.createContext)({}),i=({value:e,children:t})=>(0,s.jsx)(o.Provider,{value:e,children:t})},13965(e,t,n){"use strict";n.d(t,{Rb:()=>r.R});var r=n(2166);n(59886),n(53471)},53471(e,t,n){"use strict";n(51609),n(78836),n(13965)},59886(e,t,n){"use strict";var r=n(29491),s=n(86087),o=n(46219),i=n(13965),a=n(10790);(0,r.createHigherOrderComponent)(e=>t=>{const{suggestion:n,error:r,requestingState:l,request:c,stopSuggestion:u,eventSource:d}=(0,o.Ay)(),p=(0,s.useMemo)(()=>({suggestion:n,requestingError:r,requestingState:l,eventSource:d,requestSuggestion:c,stopSuggestion:u}),[n,r,l,d,c,u]);return(0,a.jsx)(i.Rb,{value:p,children:(0,a.jsx)(e,{...t})})},"withAiDataProvider")},42694(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(3924),s=n(97999),o=n(85985),i=n(72448);function a(){const{nextTier:e,tierPlansEnabled:t}=(0,i.A)(),n=(()=>{const e=new URLSearchParams(window.location.search),t=(0,o.GE)();return(0,s.isSimpleSite)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`})(),a=(0,r.A)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,o.GE)(),path:t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly",query:`redirect_to=${encodeURIComponent(n)}`}),l=(0,r.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,o.GE)(),path:"jetpack_ai_yearly"}),c=(0,s.isWpcomPlatformSite)()?a:l,{autosaveAndRedirect:u,isRedirecting:d}=(0,o.ZR)(c);return{checkoutUrl:c,autosaveAndRedirect:u,isRedirecting:d}}},72448(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(85985),s=n(47143),o=n(86087);function i(){const e=(0,s.useSelect)(e=>e("wordpress-com/plans").getAiAssistantFeature(),[]),t=(0,s.useSelect)(e=>e("wordpress-com/plans").getIsRequestingAiAssistantFeature(),[]),{fetchAiAssistantFeature:n,increaseAiAssistantRequestsCount:i,dequeueAiAssistantFeatureAsyncRequest:a}=(0,s.useDispatch)("wordpress-com/plans");return(0,o.useMemo)(()=>{const s=(0,r.Bd)(e?.currentTier),o=e?.currentTier?.limit||e?.requestsLimit,l=s===r._X?e?.requestsCount:e?.usagePeriod?.requestsCount,c=s===r._X?e?.requestsLimit:o;return{...e,requestsCount:l,requestsLimit:c,loading:t,error:null,refresh:n,increaseRequestsCount:i,dequeueAsyncRequest:a}},[e,t,n,i,a])}},46219(e,t,n){"use strict";n.d(t,{Ay:()=>p,fC:()=>u});var r=n(86087),s=n(27723),o=n(10067),i=n.n(o),a=n(87286),l=n(78836);const __=s.__,c=i()("ai-client:use-ai-suggestions");function u(e){switch(e){case l.Or:return{code:l.Or,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case l.L9:return{code:l.L9,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case l.AZ:return{code:l.AZ,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case l.ud:return{code:l.ud,message:__("Our service provider OpenAI could not process your prompt due to a moderation system. Please try to rephrase it changing potentially problematic words and try again.","jetpack"),severity:"info"};case l.cT:return{code:l.cT,message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),severity:"info"};case l.mA:default:return{code:l.mA,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function d(e){return e.replace(/^<\|start_header_id\|>assistant<\|end_header_id\|>[\n]+/,"")}function p({prompt:e,autoRequest:t=!1,askQuestionOptions:n={},initialRequestingState:s="init",onSuggestion:o,onDone:i,onStop:p,onError:h,onAllErrors:m}={}){const[g,f]=(0,r.useState)(s),[b,v]=(0,r.useState)(""),[y,k]=(0,r.useState)(l.Np),x=(0,r.useRef)(l.Np),[_,w]=(0,r.useState)(),j=(0,r.useRef)(void 0),C=(0,r.useCallback)(e=>{c("handleSuggestion",e);const t=d(e?.detail);t?(v(t),o?.(t)):c("no partial suggestion")},[o]),A=(0,r.useCallback)(e=>{L();const t=d(e?.detail?.message??e?.detail);i?.(t,x.current),f("done")},[i]),S=(0,r.useCallback)(e=>{m?.(e?.detail)},[m]),E=(0,r.useCallback)(e=>{j?.current?.close(),f("error"),w(u(e)),h?.(u(e))},[h]),T=(0,r.useCallback)(()=>E(l.Or),[]),N=(0,r.useCallback)(()=>E(l.L9),[]),P=(0,r.useCallback)(()=>E(l.AZ),[]),B=(0,r.useCallback)(()=>E(l.ud),[]),R=(0,r.useCallback)(()=>E(l.mA),[]),I=(0,r.useCallback)(async(e,t={...n})=>{var r;if(w(void 0),f("requesting"),r=l.Np,k(r),x.current=r,j.current=await(0,a.A)(e,t),!j?.current)return void c("no event source");const s=j.current;f("suggesting"),s.addEventListener("suggestion",C),s.addEventListener(l.Or,T),s.addEventListener(l.L9,N),s.addEventListener(l.AZ,P),s.addEventListener(l.ud,B),s.addEventListener(l.mA,R),s.addEventListener(l.zn,S),s.addEventListener("done",A)},[A,T,N,P,B,R,C]),D=(0,r.useCallback)(()=>{f("init"),v(""),w(void 0)},[]),L=(0,r.useCallback)(()=>{if(!j?.current)return;const e=j?.current;e.close(),e.removeEventListener("suggestion",C),e.removeEventListener(l.Or,T),e.removeEventListener(l.L9,N),e.removeEventListener(l.AZ,P),e.removeEventListener(l.ud,B),e.removeEventListener(l.mA,R),e.removeEventListener("done",A)},[j,C,T,N,P,B,R,A]),F=(0,r.useCallback)(()=>{L(),p?.(),f("done")},[p]);return(0,r.useEffect)(()=>{if(e?.length)return t&&I(e,n),()=>{F()}},[t,e,I,F]),{suggestion:b,model:y,error:_,requestingState:g,request:I,stopSuggestion:F,reset:D,handleErrorQuotaExceededError:T,eventSource:j.current}}},7804(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(86087),s=n(27723),o=n(10067),i=n.n(o),a=n(57745);const __=s.__,l=i()("jetpack-ai-client:use-audio-transcription");function c({feature:e,onReady:t,onError:n}){const[s,o]=(0,r.useState)(""),[i,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(!1),p=(0,r.useRef)(null);return{transcriptionResult:s,isTranscribingAudio:u,transcriptionError:i,transcribeAudio:(0,r.useCallback)(r=>{l("Transcribing audio"),o(""),c(""),d(!0);const s=new AbortController;p.current=s,(0,a.A)(r,e,s.signal).then(e=>{o(e),t?.(e)}).catch(e=>{s.signal.aborted||(c(e.message),n?.((e=>{if("string"==typeof e)return e;if("code"in e)switch(e.code){case"error_quota_exceeded":return __("You exceeded your current quota, please check your plan details.","jetpack");case"jetpack_ai_missing_audio_param":return __("The audio_file is required to perform a transcription.","jetpack");case"jetpack_ai_service_unavailable":return __("The Jetpack AI service is temporarily unavailable.","jetpack");case"file_size_not_supported":return __("The provided audio file is too big.","jetpack");case"file_type_not_supported":return __("The provided audio file type is not supported.","jetpack");case"jetpack_ai_error":return __("There was an error processing the transcription request.","jetpack");default:return e.message}return"message"in e?e.message:__("There was an error processing the transcription request.","jetpack")})(e)))}).finally(()=>d(!1))},[a.A,o,c,d]),cancelTranscription:(0,r.useCallback)(()=>{p.current?.abort(),o(""),c(""),d(!1)},[p,o,c,d])}}},66859(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087),s=n(27723);const __=s.__,o=["audio/mpeg","audio/mp3","audio/ogg","audio/flac","audio/x-flac","audio/m4a","audio/x-m4a","audio/mp4","audio/wav","audio/wave","audio/x-wav","audio/webm"];function i(){const[e,t]=(0,r.useState)(!1);return{isValidatingAudio:e,validateAudio:(0,r.useCallback)((e,n,r)=>{if(t(!0),e?.size>25e6)return t(!1),r(__("The audio file is too large. The maximum file size is 25MB.","jetpack"));const s=e instanceof File;if(s&&!o.includes(e.type))return t(!1),r(__("The audio file type is not supported. Please use a supported audio file type.","jetpack"));const i=new AudioContext;e.arrayBuffer().then(o=>{i.decodeAudioData(o,function(o){const i=Math.ceil(o.duration);return i>1500?(t(!1),r(__("The audio file is too long. The maximum recording time is 25 minutes.","jetpack"))):(t(!1),n({duration:i,isFile:s,size:e?.size}))})})},[t])}}},66223(e,t,n){"use strict";n.d(t,{Hu:()=>s,Wp:()=>r});const r="auto",s="none"},62614(e,t,n){"use strict";n.d(t,{Ay:()=>u});var r=n(10067),s=n.n(r),o=n(31439),i=n(51391);const a=s()("ai-client:use-image-generator"),l=(e,t)=>{const n=4e3-t;return e.length>n?e.substring(0,n-6)+" [...]":e},c=async(e,t,n)=>{const r=((e,t)=>{if(t){const n=`I need a Stable Diffusion prompt to generate a featured image for a blog post based on this user-provided image description:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nThe image should be a photo. Make sure you highlight the main suject of the image description, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments.\n\nFor additional context, this is the post content:\n\n`;return n+l(e,n.length)}return"I need a Stable Diffusion prompt to generate a featured image for a blog post with the following content.\nThe image should be a photo. Make sure you highlight the main suject of the content, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments. The content is:\n\n"+l(e,412)})(e,t);return await(0,o.A)(r,{feature:n})},u=()=>{const e=async function(e){let t;try{t=(await(0,i.A)()).token}catch(e){return a("Error getting token: %o",e),Promise.reject(e)}try{const n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-image",r={Authorization:`Bearer ${t}`,"Content-Type":"application/json"},s=await fetch(n,{method:"POST",headers:r,body:JSON.stringify(e)}).then(e=>e.json());return s?.data?.status&&s?.data?.status>200?(a("Error generating image: %o",s),Promise.reject(s)):s}catch(e){return a("Error generating image: %o",e),Promise.reject(e)}};return{generateImage:async function({feature:t,postContent:n,responseFormat:r="url",userPrompt:s}){try{a("Generating image");const o=((e,t)=>{if(t){const n=`I need a cover image for a blog post based on this user prompt:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nBefore creating the image, identify the main topic of the user prompt and relate it to the post content.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nFor additional context, this is the post content:\n\n`;return n+l(e,n.length)}const n="I need a cover image for a blog post.\nBefore creating the image, identify the main topic of the content and only represent it.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nThis is the post content:\n\n";return n+l(e,838)})(n,s),i={prompt:o,response_format:r,feature:t,size:"1792x1024"};return await e(i)}catch(e){return a("Error generating image: %o",e),Promise.reject(e)}},generateImageWithStableDiffusion:async function({feature:t,postContent:n,userPrompt:r}){try{a("Generating image with Stable Diffusion");const s={prompt:await c(n,r,t),feature:t,model:"stable-diffusion"};return await e(s)}catch(e){return a("Error generating image: %o",e),Promise.reject(e)}},generateImageWithParameters:e}}},96657(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087);const s="audio/mp4;codecs=mp4a",o="audio/webm";function i({onDone:e}={}){const t=(0,r.useRef)(null),[n,i]=(0,r.useState)("inactive"),a=(0,r.useRef)(!1),l=(0,r.useRef)(0),[c,u]=(0,r.useState)(0),d=(0,r.useRef)(null),[p,h]=(0,r.useState)(null),m=(0,r.useRef)([]).current,[g,f]=(0,r.useState)(null),b=(0,r.useRef)(null);function v(){return MediaRecorder.isTypeSupported(s)?new Blob(m,{type:"audio/mp4"}):new Blob(m,{type:o})}const y=(0,r.useCallback)(e=>{if(w(),!e)return t?.current?.start();e<100&&(e=100),l.current=Date.now(),t?.current?.start(e)},[]),k=(0,r.useCallback)(()=>{a.current=!0,t?.current?.pause(),u(e=>e+Date.now()-l.current)},[]),x=(0,r.useCallback)(()=>{a.current=!1,t?.current?.resume(),l.current=Date.now()},[]),_=(0,r.useCallback)(()=>{t?.current?.stop(),"recording"===n&&u(e=>e+Date.now()-l.current)},[]),w=(0,r.useCallback)(()=>{m.length=0,h(null),f(null),u(0),a.current=!1,l.current=0},[]),j=(0,r.useCallback)(()=>{t?.current&&(t.current.removeEventListener("start",S),t.current.removeEventListener("stop",E),t.current.removeEventListener("pause",T),t.current.removeEventListener("resume",N),t.current.removeEventListener("dataavailable",P),t.current=null)},[]),C=(0,r.useCallback)(()=>{if(i("inactive"),w(),j(),!navigator.mediaDevices?.getUserMedia)return;const e=new AudioContext;b.current=e.createAnalyser();navigator.mediaDevices.getUserMedia({audio:!0}).then(n=>{d.current=n;e.createMediaStreamSource(n).connect(b.current),MediaRecorder.isTypeSupported(s)?t.current=new MediaRecorder(n,{mimeType:s}):t.current=new MediaRecorder(n,{mimeType:o}),t.current.addEventListener("start",S),t.current.addEventListener("stop",E),t.current.addEventListener("pause",T),t.current.addEventListener("resume",N),t.current.addEventListener("dataavailable",P)}).catch(e=>{throw e})},[]),A=(0,r.useCallback)(e=>{_(),f("string"==typeof e?e:e.message),i("error")},[]);function S(){i("recording")}function E(){const t=v();e?.(t),m.length=0}function T(){i("paused")}function N(){i("recording")}function P(e){const{data:t}=e;t?.size&&(m.push(t),h(v()),a.current||u(e=>{const t=Date.now(),n=t-l.current;return l.current=t,e+n}))}return(0,r.useEffect)(()=>(C(),()=>{d.current&&d.current.getTracks().forEach(e=>e.stop()),j()}),[]),{state:n,blob:p,error:g,duration:c,analyser:b.current,onError:A,controls:{start:y,pause:k,resume:x,stop:_,reset:C}}}},71508(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(74997),s=n(47143),o=n(43656),i=n(86087),a=n(55166);const l=()=>{const{getBlocks:e,isEditedPostEmpty:t}=(0,s.useSelect)(e=>{const t=e("core/block-editor"),n=e(o.store);return{getBlocks:t.getBlocks,isEditedPostEmpty:n.isEditedPostEmpty}},[]),n=(0,i.useCallback)(()=>{const t=e();return 0===t.length?"":(0,r.serialize)(t)},[e]);return{getPostContent:(0,i.useCallback)(e=>{let t=n();return t?(e&&"function"==typeof e&&(t=e(t)),t?(0,a.rh)({content:t}):""):""},[e]),isEditedPostEmpty:t,getSerializedPostContent:n}}},62038(e,t,n){"use strict";n(63162),n(47143),n(86087);var r=n(10067);n.n(r)()("jetpack-ai-client:save-to-media-library")},93869(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(63162),s=n(47143),o=n(86087),i=n(10067);const a=n.n(i)()("ai-client:save-to-media-library");function l(){const[e,t]=(0,o.useState)(!1),{getSettings:n}=(0,s.useSelect)(e=>e("core/block-editor"),[]);return{isLoading:e,saveToMediaLibrary:(e,s)=>{const o=n();return new Promise((n,i)=>{t(!0),a("Fetching image from URL"),fetch(e).then(e=>{a("Transforming response to blob"),e.blob().then(e=>{a("Uploading blob to media library");const l=Array();s?l.push(new File([e],s)):l.push(e),o.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,r.isBlobURL)(e?.url)||(e&&(a("Image uploaded to media library",e),n(e)),t(!1))},onError(e){a("Error uploading image to media library:",e),i(e),t(!1)}})}).catch(e=>{a("Error transforming response to blob:",e?.message),i(e?.message),t(!1)})}).catch(e=>{a("Error fetching image from URL:",e?.message),i(e?.message),t(!1)})})}}}},97784(e,t,n){"use strict";n.d(t,{A:()=>c,u:()=>l});var r=n(86087),s=n(10067),o=n.n(s),i=n(46219);const a=o()("jetpack-ai-client:use-transcription-post-processing"),l="voice-to-content-simple-draft";function c({feature:e,onReady:t,onError:n,onUpdate:s}){const[o,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[d,p]=(0,r.useState)(!1),h=(0,r.useCallback)(e=>{l(e),s?.(e)},[l,s]),m=(0,r.useCallback)(e=>{l(e),s?.(e),t?.(e)},[l,s,t]),g=(0,r.useCallback)(e=>{u(e.message),n?.(e.message)},[u,n]),{request:f,stopSuggestion:b}=(0,i.Ay)({onSuggestion:h,onDone:m,onError:g});return{postProcessingResult:o,isProcessingTranscription:d,postProcessingError:c,processTranscription:(0,r.useCallback)((t,n)=>{a("Post-processing transcription"),l(""),u(""),p(!0);f([{role:"jetpack-ai",context:{type:t,content:n}}],{feature:e})},[l,u,p,f,e]),cancelTranscriptionProcessing:(0,r.useCallback)(()=>{b(),p(!1)},[b,p])}}},30151(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=(0,s.jsxs)(r.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon",children:[(0,s.jsx)(r.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),(0,s.jsx)(r.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),(0,s.jsx)(r.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"})]})},42154(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=(0,s.jsxs)(r.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.95833C6.66328 3.95833 3.95833 6.66327 3.95833 9.99999C3.95833 13.3367 6.66328 16.0417 10 16.0417C13.3367 16.0417 16.0417 13.3367 16.0417 9.99999C16.0417 6.66327 13.3367 3.95833 10 3.95833ZM2.70833 9.99999C2.70833 5.97292 5.97292 2.70833 10 2.70833C14.0271 2.70833 17.2917 5.97292 17.2917 9.99999C17.2917 14.0271 14.0271 17.2917 10 17.2917C5.97292 17.2917 2.70833 14.0271 2.70833 9.99999Z"}),(0,s.jsx)(r.Path,{d:"M10.8333 5.83333H9.16667V10.8333H10.8333V5.83333Z"}),(0,s.jsx)(r.Path,{d:"M10.8333 12.5H9.16667V14.1667H10.8333V12.5Z"})]})},91396(e,t,n){"use strict";n.d(t,{Qr:()=>i.A,Vo:()=>s.A,cj:()=>r.A,ni:()=>o.A});var r=n(30151),s=n(81353),o=(n(95007),n(96626),n(4416),n(25680)),i=n(67205)},81353(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=(0,s.jsxs)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,s.jsx)(r.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),(0,s.jsx)(r.Rect,{x:"10.5",y:"8.25",width:"3",height:"4.875",rx:"1.5",fill:"#008710"}),(0,s.jsx)(r.Path,{d:"M15 11.25C15 11.644 14.9224 12.0341 14.7716 12.3981C14.6209 12.762 14.3999 13.0927 14.1213 13.3713C13.8427 13.6499 13.512 13.8709 13.1481 14.0216C12.7841 14.1724 12.394 14.25 12 14.25C11.606 14.25 11.2159 14.1724 10.8519 14.0216C10.488 13.8709 10.1573 13.6499 9.87868 13.3713C9.6001 13.0927 9.37913 12.762 9.22836 12.3981C9.0776 12.0341 9 11.644 9 11.25",stroke:"#008710",strokeWidth:"1.125",strokeLinecap:"round"}),(0,s.jsx)(r.Path,{d:"M11.4375 15.75C11.4375 16.0607 11.6893 16.3125 12 16.3125C12.3107 16.3125 12.5625 16.0607 12.5625 15.75L11.4375 15.75ZM11.4375 14.25L11.4375 15.75L12.5625 15.75L12.5625 14.25L11.4375 14.25Z",fill:"#008710"})]})},95007(e,t,n){"use strict";n(56427),n(10790)},25680(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=(0,s.jsxs)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,s.jsx)(r.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),(0,s.jsx)(r.Rect,{x:"12.75",y:"9",width:"2.25",height:"6",fill:"#008710"}),(0,s.jsx)(r.Rect,{x:"9",y:"9",width:"2.25",height:"6",fill:"#008710"})]})},96626(e,t,n){"use strict";n(56427),n(10790)},4416(e,t,n){"use strict";n(56427),n(10790)},67205(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=(0,s.jsxs)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 10C12.5 11.3807 11.3807 12.5 10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10ZM14 10C14 12.2091 12.2091 14 10 14C7.79086 14 6 12.2091 6 10C6 7.79086 7.79086 6 10 6C12.2091 6 14 7.79086 14 10ZM16.75 21V19C16.75 17.4812 15.5188 16.25 14 16.25L6 16.25C4.48122 16.25 3.25 17.4812 3.25 19V21H4.75L4.75 19C4.75 18.3096 5.30964 17.75 6 17.75L14 17.75C14.6904 17.75 15.25 18.3096 15.25 19V21H16.75Z",fill:"currentColor"}),(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.976 16.3599C21.2507 14.5642 22.0001 12.3695 22.0001 9.99969C22.0001 7.63128 21.2515 5.43769 19.9782 3.64258L18.754 4.50967C19.8537 6.05996 20.5001 7.95434 20.5001 9.99969C20.5001 12.0464 19.8528 13.9419 18.7519 15.4928L19.976 16.3599ZM17.3357 14.4897C18.2357 13.222 18.7648 11.6727 18.7648 9.99969C18.7648 8.32808 18.2365 6.77984 17.3379 5.51279L16.1137 6.37988C16.8387 7.4021 17.2648 8.65114 17.2648 9.99969C17.2648 11.3496 16.8378 12.5998 16.1116 13.6226L17.3357 14.4897Z",fill:"currentColor"})]})},96865(e,t,n){"use strict";n.d(t,{A4:()=>f.A4,AK:()=>h.AK,AZ:()=>m.AZ,DD:()=>f.DD,DT:()=>f.DT,E0:()=>l.A,FC:()=>h.FC,Fs:()=>g.Fs,Gm:()=>f.Gm,HM:()=>f.HM,Hb:()=>h.Hb,JR:()=>f.JR,K2:()=>f.K2,L9:()=>m.L9,MB:()=>g.MB,N0:()=>h.N0,ON:()=>s.A,OO:()=>g.OO,Or:()=>m.Or,QA:()=>h.QA,Qr:()=>p.Qr,R0:()=>r.A,Rq:()=>f.Rq,Tg:()=>b.T,UA:()=>f.UA,UD:()=>f.UD,Vo:()=>p.Vo,Zo:()=>g.Zo,_E:()=>g.Hh,_G:()=>g._G,be:()=>a.A,br:()=>f.br,cT:()=>m.cT,cj:()=>p.cj,d5:()=>f.d5,dh:()=>d.A,eJ:()=>f.eJ,fD:()=>f.fD,im:()=>f.im,in:()=>g.in,mA:()=>m.mA,mI:()=>f.mI,mT:()=>f.mT,ni:()=>p.ni,o2:()=>i.Ay,oZ:()=>f.oZ,pE:()=>f.pE,rh:()=>g.rh,rr:()=>u.A,sn:()=>f.sn,so:()=>f.so,u0:()=>f.u0,uH:()=>m.uH,uQ:()=>f.uQ,ud:()=>m.ud,vE:()=>f.vE,xA:()=>c.A,yM:()=>o.A,yQ:()=>f.yQ,yy:()=>f.yy,z3:()=>h.z3});n(51391),n(53664),n(87286);var r=n(31439),s=(n(57745),n(42694)),o=n(72448),i=n(46219),a=n(96657),l=n(7804),c=n(97784),u=n(66859),d=(n(62614),n(71508)),p=n(91396),h=n(27802),m=(n(13965),n(78836)),g=n(72586),f=n(43984),b=n(23101)},51391(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(97999),s=n(10067),o=n.n(s),i=n(48931);const a=o()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt";async function c({apiNonce:e,siteId:t,expirationTime:n}={}){e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,n=n||12e4;const s=localStorage.getItem(l);let o,c=null;if(s)try{c=JSON.parse(s)}catch(e){a("Error parsing token",e)}if(c&&c?.expire>Date.now())return a("Using cached token"),c;const u=(0,r.isSimpleSite)();o=u?await(0,i.A)({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await(0,i.A)({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const d={token:o.token,blogId:u?t:o.blog_id,expire:Date.now()+n};return a("Storing new token"),localStorage.setItem(l,JSON.stringify(d)),d}},20231(e,t,n){"use strict";n.d(t,{_:()=>s});var r=n(47143);const s=()=>{const e=(0,r.select)("core/block-editor").getBlocks(),t=[],n=e=>{t.push(e),e.innerBlocks?.length&&e.innerBlocks.forEach(n)};return e.forEach(n),t}},40464(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=async e=>{try{const t=await fetch(e),n=await t.arrayBuffer();return`data:image/png;base64,${btoa(new Uint8Array(n).reduce((e,t)=>e+String.fromCharCode(t),""))}`}catch{return e}}},72586(e,t,n){"use strict";n.d(t,{Fs:()=>i.F,Hh:()=>r.Hh,MB:()=>s.M,OO:()=>r.OO,Zo:()=>l.Z,_G:()=>a._,in:()=>o.i,rh:()=>r.rh});var r=n(55166),s=n(84861),o=n(61269),i=n(1811),a=n(20231),l=n(40464)},84861(e,t,n){"use strict";n.d(t,{M:()=>s});var r=n(43984);function s(e,t={}){const{language:n,tone:s}=t,o=n?.split(" (")[0];switch(e){case r.Gm:return`${r.u0}: ${r.so[o].label}`;case r.eJ:return`${r.uQ}: ${r.oZ[s].label}`;case r.yy:return r.DD;case r.A4:return r.HM;case r.UA:return r.JR;case r.br:return r.K2;case r.fD:return r.UD;case r.d5:return r.mI;case r.fv:return r.yQ;case r.vE:return r.mT;case r.im:return r.Rq;case r.sn:return r.DT;default:return null}}},68641(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(21147);const s={paragraph:e=>e.replaceAll("\n","<br />")},o={emDelimiter:"_",headingStyle:"atx"},i={strikethrough:{filter:["del","s"],replacement:function(e){return"~~"+e+"~~"}}};class a{turndownService;fixes;constructor({options:e={},rules:t={},keep:n=[],remove:s=[],fixes:a=[]}={}){this.fixes=a,this.turndownService=new r.A({...o,...e}),this.turndownService.keep(n),this.turndownService.remove(s);const l={...i,...t};for(const e in l)this.turndownService.addRule(e,l[e])}render({content:e}){const t=this.turndownService.turndown(e);return this.fixes.reduce((e,t)=>s[t](e),t)}}},55166(e,t,n){"use strict";n.d(t,{Hh:()=>i,OO:()=>r.A,rh:()=>a});var r=n(68641);const s=new(n(31737).A),o=new r.A,i=({content:e,rules:t,extension:n})=>s.render({content:e,rules:t,extension:n}),a=({content:e})=>o.render({content:e})},31737(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(97158);const s=e=>e.replaceAll("\x3c!-- wp:list-item --\x3e","").replaceAll("\x3c!-- /wp:list-item --\x3e","").replaceAll("\x3c!-- wp:list --\x3e","").replaceAll("\x3c!-- /wp:list --\x3e","").replaceAll("<li>","\x3c!-- wp:list-item --\x3e<li>").replaceAll("</li>","</li>\x3c!-- /wp:list-item --\x3e").replaceAll("<ol>",'\x3c!-- wp:list {"ordered":true} --\x3e<ol>').replaceAll("</ol>","</ol>\x3c!-- /wp:list --\x3e").replaceAll("<ul>","\x3c!-- wp:list --\x3e<ul>").replaceAll("</ul>","</ul>\x3c!-- /wp:list --\x3e"),o={list:(e,t=!1)=>{const n=e.replace(/<li>\s+<p>/g,"<li>").replace(/<\/p>\s+<\/li>/g,"</li>");return t?s(n):n},listItem:(e,t=!1)=>t?s(e.replace(/^<[ou]l>\s*/g,"").replace(/\s*<\/[ou]l>\s*$/g,"")):e,paragraph:(e,t=!1)=>t?e.split("<br />").map((e,t,n)=>(t<n.length-1&&(e=e.trimEnd()),t>0&&(e=e.trimStart()),e)).join("<br />"):e,table:(e,t=!1,{hasFixedLayout:n=!1})=>t?e.startsWith("\x3c!-- wp:table")?e:`\x3c!-- wp:table { "hasFixedLayout":${n?"true":"false"} } --\x3e${e}\x3c!-- /wp:table --\x3e`:e},i={breaks:!0},a=["list"];class l{markdownConverter;constructor(e=i){this.markdownConverter=new r.A(e)}render({content:e,rules:t=a,extension:n=!1}){const r=this.markdownConverter.render(e);return t.reduce((e,t)=>o[t](e,n),r)}}},61269(e,t,n){"use strict";n.d(t,{i:()=>o});var r=n(94715),s=n(47143);function o(e){if(!e)return;const{selectBlock:t}=(0,s.dispatch)(r.store),{enableComplementaryArea:n}=(0,s.dispatch)("core/interface");t(e),n("core/edit-post","edit-post/block")}},1811(e,t,n){"use strict";n.d(t,{F:()=>s});var r=n(47143);const s=async()=>{const{clearSelectedBlock:e}=(0,r.dispatch)("core/block-editor"),{enableComplementaryArea:t}=(0,r.dispatch)("core/interface");e(),await t("core/edit-post","jetpack-sidebar/jetpack");const n=document.querySelector(".jetpack-ai-assistant-panel"),s=n?.classList.contains("is-opened"),o=n?.querySelector("h2 button");s&&o?.click(),setTimeout(()=>{o?.click()},50)}},21902(e,t,n){"use strict";n.d(t,{A:()=>s});n(33829);var r=n(10790);const s=()=>(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:[(0,r.jsx)("path",{d:"M6.99976 3.99994L7.84828 6.15141L9.99976 6.99994L7.84828 7.84847L6.99976 9.99994L6.15123 7.84847L3.99976 6.99994L6.15123 6.15141L6.99976 3.99994Z"}),(0,r.jsx)("path",{d:"M16 4L17.1314 6.86863L20 8L17.1314 9.13137L16 12L14.8686 9.13137L12 8L14.8686 6.86863L16 4Z"}),(0,r.jsx)("path",{d:"M11 10L12.4142 13.5858L16 15L12.4142 16.4142L11 20L9.58579 16.4142L6 15L9.58579 13.5858L11 10Z"})]});n.dn(s)},11574(e,t,n){"use strict";n.d(t,{A:()=>s});n(33829);var r=n(10790);const s=()=>(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9291 7.96836L10.7308 17.6492L6.2145 14.2911L7.10952 13.0873L10.4221 15.5504L16.7253 7.07333L17.9291 7.96836Z"})});n.dn(s)},70002(e,t,n){"use strict";n.d(t,{A:()=>s});n(33829);var r=n(10790);const s=()=>(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.2927 13.7485C18.5014 17.0423 15.5366 19.4901 12 19.4901C8.92508 19.4901 6.28236 17.6396 5.12469 14.9915L8.79556 12.8139L12.2508 14.0309C12.482 14.1123 12.7383 14.0756 12.9374 13.9327L15.8243 11.8601L15.9039 11.8992C16.1998 12.0451 16.6072 12.249 17.0533 12.4807C17.8331 12.8857 18.6946 13.3572 19.2927 13.7485ZM19.499 12.1129C18.9341 11.7788 18.3001 11.4379 17.7447 11.1495C17.287 10.9118 16.8698 10.7031 16.5672 10.5539C16.4158 10.4792 16.2928 10.4193 16.2074 10.378L16.1085 10.3303L16.0824 10.3177L16.0729 10.3132C15.8261 10.1954 15.5347 10.2214 15.3126 10.3809L12.3802 12.4861L8.9634 11.2827C8.75395 11.2089 8.52258 11.2318 8.3316 11.3451L4.65716 13.5248C4.55414 13.0294 4.5 12.5161 4.5 11.9901C4.5 7.84798 7.85786 4.49011 12 4.49011C16.1421 4.49011 19.5 7.84798 19.5 11.9901C19.5 12.0311 19.4997 12.072 19.499 12.1129ZM21 11.9901C21 16.9607 16.9706 20.9901 12 20.9901C7.02944 20.9901 3 16.9607 3 11.9901C3 7.01955 7.02944 2.99011 12 2.99011C16.9706 2.99011 21 7.01955 21 11.9901Z"})});n.dn(s)},97034(e,t,n){"use strict";n.d(t,{A:()=>s});n(33829);var r=n(10790);const s=()=>(0,r.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:[(0,r.jsx)("path",{d:"M7 6.49011L11 8.99011L7 11.4901V6.49011Z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.99011C3.89543 2.99011 3 3.88554 3 4.99011V18.9901C3 20.0947 3.89543 20.9901 5 20.9901H19C20.1046 20.9901 21 20.0947 21 18.9901V4.99011C21 3.88554 20.1046 2.99011 19 2.99011H5ZM19 4.49011H5C4.72386 4.49011 4.5 4.71397 4.5 4.99011V15.6973L8.12953 13.0508C8.38061 12.8677 8.71858 12.8584 8.97934 13.0274L11.906 14.9243L15.4772 11.4524C15.7683 11.1694 16.2317 11.1694 16.5228 11.4524L19.5 14.3469V4.99011C19.5 4.71397 19.2761 4.49011 19 4.49011ZM4.5 18.9901V17.5537L8.59643 14.5667L11.5921 16.5084C11.8857 16.6987 12.2719 16.6607 12.5228 16.4167L16 13.0361L19.4772 16.4167L19.5 16.3933V18.9901C19.5 19.2663 19.2761 19.4901 19 19.4901H5C4.72386 19.4901 4.5 19.2663 4.5 18.9901Z"})]});n.dn(s)},6019(e,t,n){"use strict";n.d(t,{Q:()=>i});var r=n(56427),s=n(78867),o=n(10790);const i=({variant:e="error"})=>{const t=(0,s.A)();return"muted"===e?(0,o.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,o.jsx)(r.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null}},95933(e,t,n){"use strict";n.d(t,{x:()=>i});var r=n(56427),s=n(27723),o=n(10790);const __=s.__,i=({onCancel:e,onRetry:t})=>{const n=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, try again.","jetpack"),s=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, reload the page and try again.","jetpack");return(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper",children:[(0,o.jsx)("div",{className:"jetpack-ai-logo-generator-modal__notice-message",children:(0,o.jsx)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:t?n:s})}),(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,o.jsx)(r.Button,{variant:"tertiary",onClick:e,children:__("Cancel","jetpack")}),t&&(0,o.jsx)(r.Button,{variant:"primary",onClick:t,children:__("Try again","jetpack")})]})]})}},76194(e,t,n){"use strict";n.d(t,{N:()=>i});var r=n(27723),s=n(42669),o=(n(55307),n(10790));const __=r.__,i=({state:e="loadingFeature"})=>{const t=__("Loading…","jetpack"),n=__("Analyzing your site to create the perfect logo…","jetpack"),r=__("Generating logo…","jetpack");return(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__loading-wrapper",children:[(0,o.jsx)(s.$,{}),(0,o.jsxs)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:["loadingFeature"===e&&t,"analyzing"===e&&n,"generating"===e&&r]})]})}},64537(e,t,n){"use strict";n.d(t,{T:()=>S});var r=n(85985),s=n(56427),o=n(47143),i=n(27723),a=n(13022),l=n(10067),c=n.n(l),u=n(51609),d=n(46381),p=n(61356),h=n(60674),m=n(88725),g=n(44461),f=n(19362),b=n(74423),v=n(95933),y=n(76194),k=n(32623),x=n(34706),_=n(11114),w=n(35421),j=n(48204),C=(n(68294),n(10790));const __=i.__,A=c()("jetpack-ai-calypso:generator-modal"),S=({isOpen:e,onClose:t,onApplyLogo:n,onReload:i=null,siteDetails:l,context:c,placement:S})=>{const{tracks:E}=(0,r.st)(),{recordEvent:T}=E,{setSiteDetails:N,fetchAiAssistantFeature:P,loadLogoHistory:B,setIsLoadingHistory:R}=(0,o.useDispatch)(b.E),{getIsRequestingAiAssistantFeature:I}=(0,o.select)(b.E),[D,L]=(0,u.useState)(null),[F,M]=(0,u.useState)(),O=(0,u.useRef)(!0),U=(0,u.useRef)(!1),[z,$]=(0,u.useState)(!1),[q,H]=(0,u.useState)(!1),{selectedLogo:V,getAiAssistantFeature:G,generateFirstPrompt:W,generateLogo:Z,setContext:J,tierPlansEnabled:K,site:Y,requireUpgrade:Q}=(0,m.A)(),{featureFetchError:X,setFeatureFetchError:ee,firstLogoPromptFetchError:te,clearErrors:ne}=(0,g.A)(),re=l?.ID,[se,oe]=(0,u.useState)(!1),{nextTierCheckoutURL:ie}=(0,h.Q)(),ae=G(),le=(0,u.useCallback)(async()=>{try{L("analyzing"),T(p.vm,{context:c,tool:"first-prompt"});const e=await W();M(e),L("generating"),await Z({prompt:e,style:"none"}),L(null)}catch(e){A("Error generating first logo",e),L(null)}},[c,W,Z]),ce=(0,u.useCallback)(async()=>{try{if(!re)throw new Error("Site ID is missing");if(!ae?.featuresControl?.["logo-generator"]?.enabled)throw ee("Failed to fetch feature data"),new Error("Failed to fetch feature data");const e=!(0,f.NP)(String(re)),t=ae?.costs?.["jetpack-ai-logo-generator"]?.logo??p._S,n=1,r=ae?.currentTier?.limit||0,s=ae?.currentTier?.value||0,o=ae?.usagePeriod?.requestsCount||0,i=!(K?1===s:s>0)&&!!ae?.nextTier&&!e&&(K?r-o<t+n:r<o);if($(0===s),H(i),0===s||i)return void L(null);if(R(!0),await(0,f.Pv)(String(re)),B(re),e)return L(null),void R(!1);if(Q)return L(null),void R(!1);Y&&Y.name&&Y.description&&Y.name!==__("Site Title","jetpack")?le():(L(null),R(!1))}catch(e){A("Error fetching feature",e),L(null),R(!1)}},[ae,le,B,f.Pv,f.NP,re,Q,ee]),ue=(0,u.useCallback)(async()=>{J(c),T(p.iz,{context:c,placement:S}),ce()},[J,c,S,ce]),de=()=>{O.current=!0,t(),L(null),$(!1),H(!1),ne(),oe(!1),R(!1),T(p.ub,{context:c,placement:S})},pe=(0,u.useCallback)(()=>{i&&(de(),U.current=!1,i())},[i,de]),he=e=>{oe(!0),n?.(e)},me=()=>{T(p.$i,{context:c})};let ge;return(0,u.useEffect)(()=>{if(re&&N(l),!U.current){I()||(U.current=!0,P())}},[re,l,N,I]),(0,u.useEffect)(()=>{e&&O.current&&(O.current=!1,ue())},[e,ue]),ge=D?(0,C.jsx)(y.N,{state:D}):X||te?(0,C.jsx)(v.x,{onCancel:de,onRetry:i?pe:null}):z||q?(0,C.jsx)(w.R,{onCancel:de,upgradeURL:ie,reason:z?"feature":"requests"}):(0,C.jsxs)(C.Fragment,{children:[!se&&(0,C.jsx)(_.X,{initialPrompt:F}),(0,C.jsx)(x.s,{logo:V,onApplyLogo:he,logoAccepted:se,siteId:String(re)}),se?(0,C.jsxs)("div",{className:"jetpack-ai-logo-generator__accept",children:[(0,C.jsx)(j.H,{}),(0,C.jsx)("div",{className:"jetpack-ai-logo-generator__accept-actions",children:(0,C.jsx)(s.Button,{variant:"primary",onClick:de,children:__("Close","jetpack")})})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(k.N,{}),(0,C.jsx)("div",{className:"jetpack-ai-logo-generator__footer",children:(0,C.jsx)(d.A,{onFeedbackClick:me})})]})]}),(0,C.jsx)(C.Fragment,{children:e&&(0,C.jsx)(s.Modal,{className:"jetpack-ai-logo-generator-modal",onRequestClose:de,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,title:__("Jetpack AI Logo Generator","jetpack"),children:(0,C.jsx)("div",{className:(0,a.A)("jetpack-ai-logo-generator-modal__body",{"notice-modal":z||q||X||te}),children:ge})})})}},32623(e,t,n){"use strict";n.d(t,{N:()=>u});var r=n(85985),s=n(56427),o=n(13022),i=n(26076),a=n(61356),l=n(88725),c=(n(29900),n(10790));const u=()=>{const{tracks:e}=(0,r.st)(),{recordEvent:t}=e,{logos:n,selectedLogo:u,setSelectedLogoIndex:d,context:p,isLoadingHistory:h}=(0,l.A)(),m=e=>{const t=new URL(e);return t.searchParams.has("resize")||t.searchParams.append("resize","48,48"),t.toString()};return(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator__carousel",children:[!n.length&&h&&(0,c.jsx)(s.Button,{disabled:!0,className:(0,o.A)("jetpack-ai-logo-generator__carousel-logo"),children:(0,c.jsx)("img",{height:"48",width:"48",src:i,alt:"loading"})}),!n.length&&!h&&(0,c.jsx)("div",{children:" "}),n.map((e,r)=>(0,c.jsx)(s.Button,{className:(0,o.A)("jetpack-ai-logo-generator__carousel-logo",{"is-selected":e.url===u.url}),onClick:()=>(e=>{t(a.Nt,{context:p,logos_count:n.length,selected_logo:e+1}),d(e)})(r),children:(0,c.jsx)("img",{src:m(e.url),alt:e.description})},e.url))]})}},42669(e,t,n){"use strict";n.d(t,{$:()=>i});var r=n(13022),s=n(26076),o=n(10790);const i=({className:e=null})=>(0,o.jsx)("img",{src:s,alt:"Loading",className:(0,r.A)("jetpack-ai-logo-generator-modal__loader",e)})},34706(e,t,n){"use strict";n.d(t,{s:()=>T});var r=n(85985),s=n(56427),o=n(47143),i=n(27723),a=n(10067),l=n.n(a),c=n(11497),u=n(11574),d=n(70002),p=n(97034),h=n(61356),m=n(88725),g=n(44461),f=n(19362),b=n(74423),v=n(42669),y=(n(8243),n(10790));const __=i.__,_x=i._x,k=l()("jetpack-ai-calypso:logo-presenter"),x=({siteId:e})=>{const{tracks:t}=(0,r.st)(),{recordEvent:n}=t,{saveLogo:i,selectedLogo:a,isSavingLogoToLibrary:l,logos:c,selectedLogoIndex:d,context:g}=(0,m.A)(),v=!!a?.mediaId,{loadLogoHistory:x}=(0,o.useDispatch)(b.E),_=_x("Saving…","Logo save button","jetpack"),w=__("Saved","jetpack");return l||v?(0,y.jsxs)(s.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",children:[(0,y.jsx)(s.Icon,{icon:l?(0,y.jsx)(p.A,{}):(0,y.jsx)(u.A,{})}),(0,y.jsx)("span",{className:"action-text",children:l?_:w})]}):(0,y.jsxs)(s.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{if(!v&&!l){n(h.h4,{context:g,logos_count:c.length,selected_logo:d?d+1:0});try{const t=await i(a);(0,f.H)({siteId:e,url:a.url,newUrl:t.mediaURL,mediaId:t.mediaId}),x(e)}catch(e){k("Error saving logo",e)}}},children:[(0,y.jsx)(s.Icon,{icon:(0,y.jsx)(p.A,{})}),(0,y.jsx)("span",{className:"action-text",children:__("Save in Library","jetpack")})]})},_=({onApplyLogo:e})=>{const{tracks:t}=(0,r.st)(),{recordEvent:n}=t,{isSavingLogoToLibrary:o,selectedLogo:i,logos:a,selectedLogoIndex:l,context:c}=(0,m.A)();return(0,y.jsxs)(s.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{o||(n(h.Zb,{context:c,logos_count:a.length,selected_logo:null!=l?l+1:0}),e?.(i?.mediaId))},disabled:o||!i?.mediaId,variant:"secondary",children:[(0,y.jsx)(s.Icon,{icon:(0,y.jsx)(d.A,{})}),(0,y.jsx)("span",{className:"action-text",children:__("Use on block","jetpack")})]})},w=()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(v.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Generating new logo…","jetpack")})]}),j=()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(v.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Fetching previous logos…","jetpack")})]}),C=()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{style:{width:0,height:"229px"}}),(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Once you generate a logo, it will show up here","jetpack")})]}),A=({disabled:e,ratedItem:t,onRate:n})=>{const{logos:r,selectedLogo:s}=(0,m.A)(),o=r.filter(e=>e.rating).reduce((e,t)=>(e[t.url]=t.rating,e),{});return(0,y.jsx)(c.A,{disabled:e,ratedItem:t,feature:"logo-generator",savedRatings:o,options:{mediaLibraryId:s.mediaId,prompt:s.description},onRate:n})},S=({siteId:e,logo:t,onApplyLogo:n})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("img",{src:t.url,alt:t.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__action-wrapper",children:[(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__description",children:t.description}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__actions",children:[(0,y.jsx)(x,{siteId:e}),(0,y.jsx)(_,{onApplyLogo:n}),(0,y.jsx)(A,{ratedItem:t.url,disabled:!1,onRate:n=>{(0,f.H)({siteId:e,url:t.url,newUrl:t.url,mediaId:t.mediaId,rating:n})}})]})]})]}),E=({logo:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("img",{src:e.url,alt:e.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__success-wrapper",children:[(0,y.jsx)(s.Icon,{icon:(0,y.jsx)(u.A,{})}),(0,y.jsx)("span",{children:__("Your new logo was set to the block!","jetpack")})]})]}),T=({logo:e=null,loading:t=!1,onApplyLogo:n,logoAccepted:r=!1,siteId:s})=>{const{isRequestingImage:o}=(0,m.A)(),{saveToLibraryError:i,logoUpdateError:a}=(0,g.A)();let l;return e||o?e?l=t||o?(0,y.jsx)(w,{}):r?(0,y.jsx)(E,{logo:e}):(0,y.jsx)(S,{siteId:String(s),logo:e,onApplyLogo:n}):(k("No logo provided, history still loading or logo being generated"),l=(0,y.jsx)(j,{})):l=(0,y.jsx)(C,{}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__wrapper",children:[(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter",children:[(0,y.jsx)("div",{className:"jetpack-ai-logo-generator-modal-presenter__content",children:l}),!r&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator-modal-presenter__rectangle"})]}),i&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error saving the logo to your library. Please try again.","jetpack")}),a&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error applying the logo to your site. Please try again.","jetpack")})]})}},11114(e,t,n){"use strict";n.d(t,{X:()=>_});var r=n(85985),s=n(56427),o=n(27723),i=n(13109),a=n(28847),l=n(10067),c=n.n(l),u=n(51609),d=n(66223),p=n(21902),h=n(61356),m=n(60674),g=n(88725),f=n(44461),b=n(6019),v=n(64024),y=(n(76391),n(10790));const __=o.__,k=c()("jetpack-ai-calypso:prompt-box"),x=({prompt:e="",setPrompt:t=()=>{},disabled:n=!1,actionDisabled:r=!1,generateHandler:o=()=>{},placeholder:i="",buttonLabel:a=""})=>{const l=(0,u.useRef)(null);(0,u.useEffect)(()=>{l.current&&l.current.textContent!==e&&(l.current.textContent=e)},[e]);return(0,y.jsxs)("div",{className:"jetpack-ai-image-generator__prompt-query",children:[(0,y.jsx)("div",{role:"textbox",tabIndex:0,ref:l,contentEditable:!n,suppressContentEditableWarning:!0,className:"prompt-query__input",onInput:e=>{t(e.target.textContent||"")},onPaste:e=>{e.preventDefault();const n=e.currentTarget.ownerDocument.getSelection();if(!n||!n.rangeCount)return;const r=e.clipboardData.getData("text/plain");n.deleteFromDocument();n.getRangeAt(0).insertNode(document.createTextNode(r)),n.collapseToEnd(),t(l.current?.textContent||"")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),o()),e.stopPropagation()},onKeyUp:()=>{""===l.current?.textContent&&(l.current.innerHTML="")},"data-placeholder":i}),(0,y.jsx)(s.Button,{variant:"primary",className:"jetpack-ai-image-generator__prompt-submit",onClick:o,disabled:r,children:a||__("Generate","jetpack")})]})},_=({initialPrompt:e=""})=>{const{tracks:t}=(0,r.st)(),{recordEvent:n}=t,[l,c]=(0,u.useState)(e),[_,w]=(0,u.useState)(0),{enhancePromptFetchError:j,logoFetchError:C}=(0,f.A)(),{nextTierCheckoutURL:A,hasNextTier:S}=(0,m.Q)(),E=l?.length>=h.N3,[T,N]=(0,u.useState)(!1),[P,B]=(0,u.useState)(null),[R,I]=(0,u.useState)([]),{generateLogo:D,enhancePrompt:L,setIsEnhancingPrompt:F,isBusy:M,isEnhancingPrompt:O,site:U,getAiAssistantFeature:z,requireUpgrade:$,context:q,tierPlansEnabled:H,imageStyles:V,guessStyle:G}=(0,g.A)(),W=__("Enhancing…","jetpack"),Z=__("Enhance prompt","jetpack"),J=O?W:Z,K=(0,u.useRef)(null),Y=(0,u.useCallback)(async()=>{k("Enhancing prompt",l),F(!0),n(h.vm,{context:q,tool:"enhance-prompt"});try{const e=await L({prompt:l});c(e),F(!1)}catch(e){k("Error enhancing prompt",e),F(!1)}},[q,L,l,F]),Q=z(String(U?.id||"")),X=Q?.currentTier?.value||0,ee=Q?.usagePeriod?.requestsCount||0,te=1===X;(0,u.useEffect)(()=>{w(X-ee<=0?0:X-ee)},[X,ee]),(0,u.useEffect)(()=>{K.current&&K.current.textContent!==l&&(K.current.textContent=l)},[l]),(0,u.useEffect)(()=>{V&&V.length>0?(I([V.find(({value:e})=>e===d.Hu),V.find(({value:e})=>e===d.Wp),...V.filter(({value:e})=>![d.Hu,d.Wp].includes(e))].filter(e=>e)),N(!0),B(d.Hu)):(I([]),N(!1),B(null))},[V]);const ne=(0,u.useCallback)(async()=>{if(k(q),P===d.Wp){F(!0),n(h.Tk,{context:q,tool:"image"});const e=await G(l)||d.Hu;B(e),n(h.vm,{context:q,tool:"image",style:e}),F(!1),D({prompt:l,style:e})}else n(h.vm,{context:q,tool:"image",style:P}),D({prompt:l,style:P})},[q,D,l,P]),re=(0,u.useCallback)(e=>{k("change style",e),B(e),n(h.UO,{context:q,style:e})},[q,B,n]);return(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt",children:[(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-header",children:[(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-label",children:__("Describe your site:","jetpack")}),(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-actions",children:(0,y.jsxs)(s.Button,{variant:"link",disabled:M||$||!E,onClick:Y,children:[(0,y.jsx)(p.A,{}),J]})}),T&&(0,y.jsx)(s.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:P,options:R,onChange:re,disabled:M||$})]}),(0,y.jsx)(x,{prompt:l,setPrompt:c,generateHandler:ne,disabled:M||$,actionDisabled:M||$||!E,placeholder:__("Describe your site or simply ask for a logo specifying some details about it","jetpack")}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-footer",children:[!te&&!$&&(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-requests",children:[(0,y.jsx)("div",{children:(0,o.sprintf)(
// translators: %d is the number of requests
__("%d requests remaining.","jetpack"),_)}),S&&(0,y.jsxs)(y.Fragment,{children:[" ",(0,y.jsx)(s.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{n(h.AN,{context:q,placement:h.Cn})},children:(0,y.jsx)("span",{children:__("Upgrade","jetpack")})})]})," ",(0,y.jsx)(s.Tooltip,{text:__("Logo generation costs 10 requests; prompt enhancement costs 1 request each","jetpack"),placement:"bottom",children:(0,y.jsx)(i.A,{className:"prompt-footer__icon",icon:a.A})})]}),$&&H&&(0,y.jsx)(v.G,{}),$&&!H&&(0,y.jsx)(b.Q,{}),j&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error enhancing prompt. Please try again.","jetpack")}),C&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error generating logo. Please try again.","jetpack")})]})]})}},64024(e,t,n){"use strict";n.d(t,{G:()=>h});var r=n(85985),s=n(56427),o=n(86087),i=n(27723),a=n(13109),l=n(84699),c=n(61356),u=n(60674),d=n(88725),p=(n(94089),n(10790));const __=i.__,h=()=>{const{tracks:e}=(0,r.st)(),{recordEvent:t}=e,n=__("Upgrade","jetpack"),i=(0,o.createInterpolateElement)(__("Not enough requests left to generate a logo. <strong>Upgrade now to increase it.</strong>","jetpack"),{strong:(0,p.jsx)("strong",{})}),{nextTierCheckoutURL:h}=(0,u.Q)(),{context:m}=(0,d.A)();return(0,p.jsx)("div",{className:"jetpack-upgrade-plan-banner",children:(0,p.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(a.A,{className:"jetpack-upgrade-plan-banner__icon",icon:l.A}),(0,p.jsx)("span",{className:"jetpack-upgrade-plan-banner__banner-description",children:i})]}),(0,p.jsx)(s.Button,{href:h,target:"_blank",className:"is-primary",onClick:()=>{t(c.AN,{context:m,placement:c.tF})},children:(0,p.jsx)("span",{children:n})})]})})}},35421(e,t,n){"use strict";n.d(t,{R:()=>u});var r=n(3924),s=n(85985),o=n(56427),i=n(27723),a=n(61356),l=n(88725),c=n(10790);const __=i.__,u=({onCancel:e,upgradeURL:t,reason:n})=>{const{tracks:i}=(0,s.st)(),{recordEvent:u}=i,d=__("Upgrade your Jetpack AI for access to logo generation. This upgrade will also increase the amount of monthly requests you can use in for all AI-powered features.","jetpack"),p=__("Not enough requests left to generate a logo. Upgrade your Jetpack AI to increase the amount of requests you can use in all AI-powered features.","jetpack"),h=(0,r.A)("ai-logo-generator-fair-usage-policy",{anchor:"usage-limitations-and-upgrades"}),{context:m}=(0,l.A)();return(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper",children:[(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message",children:[(0,c.jsx)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:"feature"===n?d:p})," ",(0,c.jsx)(o.Button,{variant:"link",href:h,target:"_blank",children:(0,c.jsx)("span",{children:__("Learn more about Jetpack AI.","jetpack")})})]}),(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,c.jsx)(o.Button,{variant:"tertiary",onClick:e,children:(0,c.jsx)("span",{children:__("Cancel","jetpack")})}),(0,c.jsx)(o.Button,{variant:"primary",href:t,target:"_blank",onClick:()=>{u(a.AN,{context:m,placement:a.Tz}),e()},children:(0,c.jsx)("span",{children:__("Upgrade","jetpack")})})]})]})}},48204(e,t,n){"use strict";n.d(t,{H:()=>c});var r=n(56427),s=n(27723),o=n(1866),i=n(13022),a=n(36791),l=(n(39769),n(10790));const __=s.__,c=({className:e=null,onVisitBlankTarget:t})=>(0,l.jsxs)("div",{className:(0,i.A)("jetpack-ai-logo-generator-modal-visit-site-banner",e),children:[(0,l.jsx)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo",children:(0,l.jsx)("img",{src:a,alt:"Jetpack"})}),(0,l.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__content",children:[(0,l.jsx)("strong",{children:__("Do you want to know all the amazing things you can do with Jetpack AI?","jetpack")}),(0,l.jsx)("span",{children:__("Generate and tweak content, create forms, get feedback and much more.","jetpack")}),(0,l.jsx)("div",{children:(0,l.jsxs)(r.Button,{variant:"link",href:"https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai",target:"_blank",onClick:t||null,children:[(0,l.jsx)("span",{children:__("Learn more about Jetpack AI","jetpack")}),(0,l.jsx)(r.Icon,{icon:o.A,size:20})]})})]})]})},61356(e,t,n){"use strict";n.d(t,{$i:()=>c,AN:()=>u,Cn:()=>h,N3:()=>f,Nt:()=>l,Tk:()=>p,Tz:()=>m,UO:()=>d,Zb:()=>a,_S:()=>b,h4:()=>i,iz:()=>r,tF:()=>g,ub:()=>s,vm:()=>o});const r="jetpack_ai_logo_generator_modal_open",s="jetpack_ai_logo_generator_modal_close",o="jetpack_ai_logo_generator_generate",i="jetpack_ai_logo_generator_save",a="jetpack_ai_logo_generator_use",l="jetpack_ai_logo_generator_navigate",c="jetpack_ai_logo_generator_feedback",u="jetpack_ai_upgrade_button",d="jetpack_ai_logo_generator_switch_style",p="jetpack_ai_logo_generator_guess_style",h="input_footer",m="free_user_screen",g="upgrade_prompt",f=3,b=10},60674(e,t,n){"use strict";n.d(t,{Q:()=>a});var r=n(97999),s=n(85985),o=n(47143),i=n(74423);const a=()=>{const{nextTier:e,tierPlansEnabled:t}=(0,o.useSelect)(e=>{const t=e(i.E);return{nextTier:t.getAiAssistantFeature().nextTier,tierPlansEnabled:t.getAiAssistantFeature().tierPlansEnabled}},[]),n=!(0,r.isWpcomPlatformSite)(),a=n?"jetpack-ai-upgrade-url-for-jetpack-sites":"jetpack-ai-yearly-tier-upgrade-nudge",l=(0,s.GE)(),c=`https://wordpress.com/home/${l}`,u=new URL("https://jetpack.com/redirect/");u.searchParams.set("source",a),u.searchParams.set("site",l),u.searchParams.set("path",t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly"),n||u.searchParams.set("query",`redirect_to=${encodeURIComponent(c)}`);return{nextTierCheckoutURL:u.toString(),hasNextTier:!!e}}},78867(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(3924),s=n(47143),o=n(86087),i=n(27723),a=n(74423),l=n(10790);const __=i.__,c=()=>{const{usagePeriod:e}=(0,s.useSelect)(e=>({usagePeriod:e(a.E).getAiAssistantFeature().nextTier}),[]),t=(e=>{const t=__("You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.","jetpack");if(!e)return t;
// Translators: %s is the date when the requests will reset.
const n=__("Requests will reset on %s.","jetpack");return`${t} ${(0,i.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),n=(0,r.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,o.createInterpolateElement)(t,{link:(0,l.jsx)("a",{href:n,target:"_blank",rel:"noreferrer"}),span:(0,l.jsx)("span",{})})}},88725(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(47143),s=n(10067),o=n.n(s),i=n(51609),a=n(31439),l=n(62614),c=n(93869),u=n(51391),d=n(19362),p=n(28229),h=n(74423),m=n(44461);const g=o()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:n,setIsRequestingImage:s,setIsEnhancingPrompt:o,increaseAiAssistantRequestsCount:f,addLogoToHistory:b,setContext:v,setIsLoadingHistory:y}=(0,r.useDispatch)(h.E),{logos:k,selectedLogoIndex:x,selectedLogo:_,siteDetails:w,isSavingLogoToLibrary:j,isApplyingLogo:C,isEnhancingPrompt:A,isBusy:S,isRequestingImage:E,getAiAssistantFeature:T,requireUpgrade:N,context:P,tierPlansEnabled:B,isLoadingHistory:R}=(0,r.useSelect)(e=>{const t=e(h.E);return{logos:t.getLogos(),selectedLogoIndex:t.getSelectedLogoIndex(),selectedLogo:t.getSelectedLogo(),siteDetails:t.getSiteDetails(),isSavingLogoToLibrary:t.getIsSavingLogoToLibrary(),isApplyingLogo:t.getIsApplyingLogo(),isRequestingImage:t.getIsRequestingImage(),isEnhancingPrompt:t.getIsEnhancingPrompt(),isBusy:t.getIsBusy(),getAiAssistantFeature:t.getAiAssistantFeature,requireUpgrade:t.getRequireUpgrade(),context:t.getContext(),tierPlansEnabled:t.getTierPlansEnabled(),isLoadingHistory:t.getIsLoadingHistory()}},[]),{setFirstLogoPromptFetchError:I,setEnhancePromptFetchError:D,setLogoFetchError:L,setSaveToLibraryError:F,setLogoUpdateError:M}=(0,m.A)(),{generateImageWithParameters:O}=(0,l.Ay)(),{saveToMediaLibrary:U}=(0,c.A)(),{ID:z=null,name:$=null,description:q=null}=w||{},H=z?String(z):null,V=T(H),G=V?.costs?.["jetpack-ai-logo-generator"]?.logo,W=V?.featuresControl?.["logo-generator"],Z=W?.styles||[],J=(0,i.useCallback)(async function(){I(null),f();try{const e=await(0,u.A)();if(!e||!e.token)throw new Error("No token provided");g("Generating first prompt for site");const t={question:`Generate a simple and short prompt asking for a logo based on the site's name and description, keeping the same language.\nExample for a site named "The minimalist fashion blog", described as "Daily inspiration for all things fashion": A logo for a minimalist fashion site focused on daily sartorial inspiration with a clean and modern aesthetic that is sleek and sophisticated.\nAnother example, now for a site called "El observatorio de aves", described as "Un sitio dedicado a nuestros compañeros y compañeras entusiastas de la observación de aves.": Un logo para un sitio web dedicado a la observación de aves, capturando la esencia de la naturaleza y la pasión por la avifauna en un diseño elegante y representativo, reflejando una estética natural y apasionada por la vida silvestre.\n\nSite name: ${$}\nSite description: ${q}`,feature:"jetpack-ai-logo-generator",stream:!1},n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",r={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},s=await fetch(n,{method:"POST",headers:r,body:JSON.stringify(t)}).then(e=>e.json());return s?.choices?.[0]?.message?.content}catch(e){throw f(-1),I(e),e}},[I,f,$,q]),K=(0,i.useCallback)(async function(e){if(L(null),!Z||!Z.length)return null;const t=[{role:"jetpack-ai",context:{type:"ai-assistant-guess-logo-style",request:e,name:$,description:q}}];try{const e=await(0,a.A)(t,{feature:"jetpack-ai-logo-generator"});if(!e)return null;const n=Z.find(({value:t})=>t===e);return n?n.value:null}catch(e){g("Error guessing style",e),Promise.reject(e)}},[Z,$,q]),Y=(0,i.useCallback)(async function({prompt:e,style:t=null}){L(null);try{const n=await(0,u.A)();if(!n||!n.token)throw new Error("No token provided");if("auto"===t)throw new Error("Auto style is not supported");g("Generating image with prompt",e);const r={prompt:`I NEED to test how the tool works with extremely simple prompts. DO NOT add any detail, just use it AS-IS:\nCreate a single text-free iconic vector logo that symbolically represents the user request, using abstract or symbolic imagery.\nThe design should be modern, with either a vivid color scheme full of gradients or a color scheme that's monochromatic. Use any of those styles based on the user request mood.\nEnsure the logo is set against a clean solid background.\nEnsure the logo works in small sizes.\nThe imagery in the logo should subtly hint at the mood of the user request but DO NOT use any text, letters, or the name of the site on the imagery.\nThe image should contain a single icon, without variations, color palettes or different versions.\n\nUser request:${e}`,messages:t?[{role:"jetpack-ai",context:{type:"ai-assistant-generate-logo",request:e,name:$,description:q,style:t}}]:[],feature:"jetpack-ai-logo-generator",response_format:"b64_json",style:t||""};return await O(r)}catch(e){throw L(e),e}},[$,q]),Q=(0,i.useCallback)(async e=>{F(null);try{if(g("Saving logo for site"),e.mediaId)return{mediaId:e.mediaId,mediaURL:e.url};const n={mediaId:0,mediaURL:""};t(!0);const{id:r,url:s}=await U(e.url,"site-logo.png");return n.mediaId=parseInt(r),n.mediaURL=s,n}catch(e){throw F(e),e}finally{t(!1)}},[t,F]),X=(0,i.useCallback)(async()=>{M(null);try{if(!H||!_)throw new Error("Missing siteId or logo");g("Applying logo for site",H),n(!0);const{mediaId:e}=_;if(!e)throw new Error("Missing mediaId");await(0,p.Z)({siteId:H,imageId:String(e)})}catch(e){throw M(e),e}finally{n(!1)}},[_,n,M,H]),ee=(0,i.useCallback)(e=>{b(e),(0,d.hm)({...e,siteId:String(H)})},[H,b,d.hm]),te=(0,i.useCallback)(async function({prompt:e,style:t}){g("Generating logo for site"),s(!0);try{if(!G)throw new Error("Missing cost information");let n;f(G);try{if(n=await Y({prompt:e,style:t}),!n||!n.data.length)throw new Error("No image returned")}catch(e){throw f(-G),e}const r=n.data[0].revised_prompt||null,s={url:"data:image/png;base64,"+n.data[0].b64_json,description:e,revisedPrompt:r};try{const t=await Q(s);ee({url:t.mediaURL,description:e,mediaId:t.mediaId,revisedPrompt:r})}catch(e){throw ee(s),e}}finally{s(!1)}},[G,f,Q,ee,Y]);return{logos:k,selectedLogoIndex:x,selectedLogo:_,setSelectedLogoIndex:e,site:{id:H,name:$,description:q},generateFirstPrompt:J,saveLogo:Q,applyLogo:X,generateImage:Y,enhancePrompt:async function({prompt:e}){D(null),f();try{const t=await(0,u.A)();if(!t||!t.token)throw new Error("No token provided");g("Enhancing prompt",e);const n={messages:[{role:"system",content:"Enhance the prompt you receive.\nThe prompt is meant for generating a logo. Return the same prompt enhanced, and make each enhancement wrapped in brackets.\nDo not add any mention to text, letters, typography or the name of the site in the prompt.\nFor example: user's prompt: A logo for an ice cream shop. Returned prompt: A logo for an ice cream shop [that is pink] [and vibrant]."},{role:"user",content:e}],feature:"jetpack-ai-logo-generator",stream:!1},r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",s={Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},o=await fetch(r,{method:"POST",headers:s,body:JSON.stringify(n)}).then(e=>e.json());return o?.choices?.[0]?.message?.content}catch(e){throw f(-1),D(e),e}},storeLogo:ee,generateLogo:te,setIsEnhancingPrompt:o,setIsRequestingImage:s,setIsSavingLogoToLibrary:t,setIsApplyingLogo:n,setContext:v,isEnhancingPrompt:A,isRequestingImage:E,isSavingLogoToLibrary:j,isApplyingLogo:C,isBusy:S,getAiAssistantFeature:T,requireUpgrade:N,context:P,tierPlansEnabled:B,isLoadingHistory:R,setIsLoadingHistory:y,imageStyles:Z,guessStyle:K}}},44461(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(47143),s=n(74423);const o=()=>{const{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:n,setLogoFetchError:o,setSaveToLibraryError:i,setLogoUpdateError:a}=(0,r.useDispatch)(s.E),{featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}=(0,r.useSelect)(e=>{const t=e(s.E);return{featureFetchError:t.getFeatureFetchError(),firstLogoPromptFetchError:t.getFirstLogoPromptFetchError(),enhancePromptFetchError:t.getEnhancePromptFetchError(),logoFetchError:t.getLogoFetchError(),saveToLibraryError:t.getSaveToLibraryError(),logoUpdateError:t.getLogoUpdateError()}},[]);return{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:n,setLogoFetchError:o,setSaveToLibraryError:i,setLogoUpdateError:a,clearErrors:()=>{e(null),t(null),n(null),o(null),i(null),a(null)},featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}}},23101(e,t,n){"use strict";n.d(t,{T:()=>r.T});var r=n(64537);n(11114)},19362(e,t,n){"use strict";n.d(t,{$t:()=>i,H:()=>o,NP:()=>a,Pv:()=>l,hm:()=>s});var r=n(13858);function s({siteId:e,url:t,description:n,mediaId:r,revisedPrompt:s}){const o=i(e),a={url:t,description:n,mediaId:r,revisedPrompt:s};return o.push(a),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-10))),a}function o({siteId:e,url:t,newUrl:n,mediaId:r,rating:s}){const o=i(e),a=o.findIndex(e=>e.url===t);return a>-1&&(o[a].url=n,o[a].mediaId=r,o[a].rating=s),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-10))),o[a]}function i(e){const t=localStorage.getItem(`logo-history-${e}`);let n=t?JSON.parse(t):[];return Array.isArray(n)||(n=[]),n=n.slice(-10),n=n.filter(e=>"object"==typeof e&&"string"==typeof e.url&&"string"==typeof e.description).map(e=>({url:e.url,description:e.description,mediaId:e.mediaId,rating:e.rating})),n}function a(e){return 0===i(e).length}async function l(e){const t=i(e).filter(({mediaId:e})=>void 0!==e).map(({mediaId:t})=>new Promise((n,s)=>{(0,r.T)({siteId:e,mediaId:t}).then(e=>n({mediaId:t,exists:e})).catch(e=>s(e))}));try{(await Promise.all(t)).filter(({exists:e})=>!e).forEach(({mediaId:t})=>function({siteId:e,mediaId:t}){const n=i(e),r=n.findIndex(e=>e.mediaId===t);-1!==r&&(n.splice(r,1),localStorage.setItem(`logo-history-${e}`,JSON.stringify(n)))}({siteId:e,mediaId:t}))}catch{}}},13858(e,t,n){"use strict";n.d(t,{T:()=>s});var r=n(48931);async function s({mediaId:e}){const t=Number(e);if(Number.isNaN(t))return!1;try{return await(0,r.A)({path:`/wp/v2/media/${Number(e)}`,method:"GET"}),!0}catch(e){const t=e?.data?.status;if(404===t)return!1;throw e}}},28229(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(22746);async function s({siteId:e,imageId:t}){const n={site_logo:t,site_icon:t};return(0,r.A)({path:`/sites/${String(e)}/settings`,apiVersion:"v2",apiNamespace:"wp/v2",body:n,query:"source=jetpack-ai",method:"POST"})}},22746(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(48931);let s=0;async function o(e){if(s+=1,s>5)throw s-=1,new Error("Too many requests");return(0,r.A)(e).finally(()=>{s-=1})}},9624(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(19362),s=n(22746),o=n(9938);const i={storeAiAssistantFeature:e=>({type:o.UU,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:o.ql});try{const t=await(0,s.A)({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature",query:"force=wpcom"});if(t.data)throw new Error("Failed to fetch");e(i.storeAiAssistantFeature(function(e){return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:e["current-tier"],nextTier:e["next-tier"],tierPlansEnabled:!!e["tier-plans-enabled"],costs:e.costs,featuresControl:e["features-control"]}}(t)))}catch(t){e({type:o.Rx,error:t})}},increaseAiAssistantRequestsCount:(e=1)=>({dispatch:t})=>{t({type:o.Lg,count:e})},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:o.Kt,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:o.c1,tierPlansEnabled:e}),setSiteDetails:e=>({type:o.Bz,siteDetails:e}),setSelectedLogoIndex:e=>({type:o.BG,selectedLogoIndex:e}),addLogoToHistory:e=>({type:o.sG,logo:e}),setIsSavingLogoToLibrary:e=>({type:o.E6,isSavingLogoToLibrary:e}),setIsApplyingLogo:e=>({type:o.Ep,isApplyingLogo:e}),updateSelectedLogo:(e,t)=>({type:o.r_,mediaId:e,url:t}),setIsRequestingImage:e=>({type:o.vk,isRequestingImage:e}),setIsEnhancingPrompt:e=>({type:o.O5,isEnhancingPrompt:e}),loadLogoHistory(e){const t=(0,r.$t)(e);return{type:o.ZI,history:t}},setFeatureFetchError:e=>({type:o.Rx,error:e}),setFirstLogoPromptFetchError:e=>({type:o.MQ,error:e}),setEnhancePromptFetchError:e=>({type:o.gG,error:e}),setLogoFetchError:e=>({type:o.q_,error:e}),setSaveToLibraryError:e=>({type:o.x0,error:e}),setLogoUpdateError:e=>({type:o.FN,error:e}),setContext:e=>({type:o.kZ,context:e}),setIsLoadingHistory:e=>({type:o.hY,isLoadingHistory:e})},a=i},9938(e,t,n){"use strict";n.d(t,{BG:()=>h,Bz:()=>l,E6:()=>g,Ep:()=>f,FN:()=>S,GB:()=>c,Kt:()=>i,Lg:()=>o,MQ:()=>w,O5:()=>y,Rx:()=>_,UU:()=>r,ZI:()=>k,c1:()=>a,gG:()=>j,hY:()=>x,kZ:()=>p,mx:()=>d,nb:()=>u,q_:()=>C,ql:()=>s,r_:()=>b,sG:()=>m,vk:()=>v,x0:()=>A});const r="STORE_AI_ASSISTANT_FEATURE",s="REQUEST_AI_ASSISTANT_FEATURE",o="INCREASE_AI_ASSISTANT_REQUESTS_COUNT",i="SET_AI_ASSISTANT_FEATURE_REQUIRE_UPGRADE",a="SET_TIER_PLANS_ENABLED",l="SET_SITE_DETAILS",c=20,u=3e3,d=3,p="SET_CONTEXT",h="SET_SELECTED_LOGO_INDEX",m="ADD_LOGO_TO_HISTORY",g="SET_IS_SAVING_LOGO_TO_LIBRARY",f="SET_IS_APPLYING_LOGO",b="SAVE_SELECTED_LOGO",v="SET_IS_REQUESTING_IMAGE",y="SET_IS_ENHANCING_PROMPT",k="SET_SITE_HISTORY",x="SET_IS_LOADING_HISTORY",_="SET_FEATURE_FETCH_ERROR",w="SET_FIRST_LOGO_PROMPT_FETCH_ERROR",j="SET_ENHANCE_PROMPT_FETCH_ERROR",C="SET_LOGO_FETCH_ERROR",A="SET_SAVE_TO_LIBRARY_ERROR",S="SET_LOGO_UPDATE_ERROR"},74423(e,t,n){"use strict";n.d(t,{E:()=>a});var r=n(47143),s=n(9624),o=n(23695),i=n(80037);const a="jetpack-ai/logo-generator",l=(0,r.createReduxStore)(a,{__experimentalUseThunks:!0,actions:s.A,reducer:o.A,selectors:i.A});(0,r.register)(l)},94891(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(9938);const s={siteDetails:{},features:{aiAssistantFeature:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:r.GB,requireUpgrade:!1,errorMessage:"",errorCode:"",upgradeType:"default",currentTier:{slug:"ai-assistant-tier-free",value:0,limit:20},usagePeriod:{currentStart:"",nextStart:"",requestsCount:0},nextTier:null,tierPlansEnabled:!1,_meta:{isRequesting:!1,asyncRequestCountdown:r.mx,asyncRequestTimerId:0,isRequestingImage:!1},featuresControl:{"logo-generator":{enabled:!1,styles:[]}}}},history:[],selectedLogoIndex:0}},23695(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(61356),s=n(9938),o=n(94891);function i(e=o.A,t){switch(t.type){case s.ql:return{...e,_meta:{...e._meta??{},featureFetchError:null},features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!0,asyncRequestCountdown:s.mx,asyncRequestTimerId:0}}}};case s.UU:{const n={"jetpack-ai-logo-generator":{logo:r._S}};return{...e,features:{...e.features,aiAssistantFeature:{costs:n,...t.feature,requireUpgrade:t.feature?.requireUpgrade||0===t.feature?.currentTier?.value,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}}}}case s.Lg:{const n=e?.features?.aiAssistantFeature?.usagePeriod||{requestsCount:0},r=(e?.features?.aiAssistantFeature?.requestsCount||0)+(t.count??1);n.requestsCount+=t.count??1;const o=e?.features?.aiAssistantFeature?.currentTier?.value,i=void 0===o&&!e?.features?.aiAssistantFeature?.hasFeature||0===o,a=void 0===o&&e?.features?.aiAssistantFeature?.hasFeature||1===o;let l=e?.features?.aiAssistantFeature?.currentTier?.limit||s.GB;a?l=s.nb:i&&(l=e?.features?.aiAssistantFeature?.requestsLimit);const c=(a||i?r:e?.features?.aiAssistantFeature?.usagePeriod?.requestsCount||0)>=l,u=i||c&&null!==e?.features?.aiAssistantFeature?.nextTier;return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,isOverLimit:c,requestsCount:r,requireUpgrade:u,usagePeriod:{...n}}}}}case s.Kt:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case s.c1:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,tierPlansEnabled:t.tierPlansEnabled}}};case s.Bz:return{...e,siteDetails:t.siteDetails};case s.BG:return{...e,selectedLogoIndex:t.selectedLogoIndex};case s.sG:{const n=[...e.history,t.logo];return{...e,history:n,selectedLogoIndex:n.length-1}}case s.E6:return{...e,_meta:{...e._meta??{},isSavingLogoToLibrary:t.isSavingLogoToLibrary}};case s.Ep:return{...e,_meta:{...e._meta??{},isApplyingLogo:t.isApplyingLogo}};case s.r_:{const n=e.history?.[e.selectedLogoIndex];return{...e,history:[...e.history.slice(0,e.selectedLogoIndex),{...n,mediaId:t.mediaId,url:t.url},...e.history.slice(e.selectedLogoIndex+1)]}}case s.vk:return{...e,_meta:{...e._meta??{},isRequestingImage:t.isRequestingImage}};case s.O5:return{...e,_meta:{...e._meta??{},isEnhancingPrompt:t.isEnhancingPrompt}};case s.ZI:return{...e,history:t.history,selectedLogoIndex:t.history?.length?t.history.length-1:0};case s.Rx:return{...e,features:{...e.features,aiAssistantFeature:{...e?.features?.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}},_meta:{...e._meta??{},featureFetchError:t.error}};case s.MQ:return{...e,_meta:{...e._meta??{},firstLogoPromptFetchError:t.error}};case s.gG:return{...e,_meta:{...e._meta??{},enhancePromptFetchError:t.error}};case s.q_:return{...e,_meta:{...e._meta??{},logoFetchError:t.error}};case s.x0:return{...e,_meta:{...e._meta??{},saveToLibraryError:t.error}};case s.FN:return{...e,_meta:{...e._meta??{},logoUpdateError:t.error}};case s.kZ:return{...e,_meta:{...e._meta??{},context:t.context}};case s.hY:return{...e,_meta:{...e._meta??{},isLoadingHistory:t.isLoadingHistory}}}return e}},80037(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(61356);const s={getAiAssistantFeature(e){const t={...e.features.aiAssistantFeature};return delete t._meta,t},getSiteDetails:e=>e.siteDetails,getIsRequestingAiAssistantFeature:e=>e.features.aiAssistantFeature?._meta?.isRequesting??!1,getLogos:e=>e.history??[],getSelectedLogoIndex:e=>e.selectedLogoIndex??null,getSelectedLogo:e=>e.history?.[e.selectedLogoIndex]??null,getIsSavingLogoToLibrary:e=>e._meta?.isSavingLogoToLibrary??!1,getIsApplyingLogo:e=>e._meta?.isApplyingLogo??!1,getIsEnhancingPrompt:e=>e._meta?.isEnhancingPrompt??!1,getIsRequestingImage:e=>e._meta?.isRequestingImage??!1,getIsBusy:e=>s.getIsApplyingLogo(e)||s.getIsSavingLogoToLibrary(e)||s.getIsRequestingImage(e)||s.getIsEnhancingPrompt(e),getRequireUpgrade(e){const t=e.features.aiAssistantFeature;if(!t?.tierPlansEnabled)return t?.requireUpgrade;const n=t?.costs?.["jetpack-ai-logo-generator"]?.logo??r._S,s=t?.currentTier?.value||0,o=t?.usagePeriod?.requestsCount||0,i=1===s,a=!t?.nextTier;return e.features.aiAssistantFeature?.requireUpgrade||!i&&!a&&s-o<n},getFeatureFetchError:e=>e._meta?.featureFetchError??null,getFirstLogoPromptFetchError:e=>e._meta?.firstLogoPromptFetchError??null,getEnhancePromptFetchError:e=>e._meta?.enhancePromptFetchError??null,getLogoFetchError:e=>e._meta?.logoFetchError??null,getSaveToLibraryError:e=>e._meta?.saveToLibraryError??null,getLogoUpdateError:e=>e._meta?.logoUpdateError??null,getContext:e=>e._meta?.context??"",getTierPlansEnabled:e=>e.features.aiAssistantFeature?.tierPlansEnabled??!1,getIsLoadingHistory:e=>e._meta?.isLoadingHistory??!1},o=s},53664(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(7675),s=n(10067),o=n.n(s),i=n(46219),a=n(51391),l=n(78836);const c=o()("jetpack-ai-client:suggestions-event-source");class u extends EventTarget{fullMessage;fullFunctionCall;isPromptClear;controller;errorUnclearPromptTriggered;constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource({url:e,question:t,token:n,options:s={}}){if(!n)try{c("Token was not provided, requesting one..."),n=(await(0,a.A)()).token}catch(e){return void this.processErrorEvent(e)}const o={};if(Number.isInteger(parseInt(s.postId))&&(o.post_id=+s.postId),!e){const t=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");s?.fromCache&&t.searchParams.append("stream_cache","true"),e=t.toString(),c("URL not provided, using default: %o",e)}Array.isArray(t)?o.messages=t:o.question=t,s?.feature?.length&&(c("Feature: %o",s.feature),o.feature=s.feature),s?.functions?.length&&(c("Functions: %o",s.functions),o.functions=s.functions),s?.model?.length&&(c("Model: %o",s.model),o.model=s.model),s?.languageCode?.length&&(c("Language: %o",s.languageCode),o.language_code=s.languageCode),this.errorUnclearPromptTriggered=!1,await(0,r.y)(e,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify(o),onclose:()=>{c("Stream closed")},onerror:e=>{throw this.processErrorEvent(e),e},onmessage:e=>{this.processEvent(e)},onopen:async e=>{if(e.ok)return;let t;throw e.status>=400&&e.status<=500&&![413,422,429].includes(e.status)&&(c("Connection error: %o",e),t=l.mA,this.dispatchEvent(new CustomEvent(l.mA,{detail:e}))),503===e.status&&(t=l.AZ,this.dispatchEvent(new CustomEvent(l.AZ))),413===e.status&&(t=l.cT,this.dispatchEvent(new CustomEvent(l.cT))),422===e.status&&(t=l.ud,this.dispatchEvent(new CustomEvent(l.ud))),429===e.status&&(t=l.Or,this.dispatchEvent(new CustomEvent(l.Or))),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,i.fC)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");if(e.startsWith("JETPACK_AI_ERROR")){if(this.errorUnclearPromptTriggered)return;this.errorUnclearPromptTriggered=!0,this.dispatchEvent(new CustomEvent(l.L9)),c("Unclear error prompt dispatched"),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,i.fC)(l.L9)}))}else"JETPACK_AI_ERROR".startsWith(e)?c(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.errorUnclearPromptTriggered)return;if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void c("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void c("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void c("Error parsing JSON",e,t)}const{delta:n}=t?.choices?.[0]??{delta:{content:null,function_call:null}},r=n.content,s=n.function_call;r&&(this.fullMessage+=r,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:r})),c("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),s&&(null!=s.name&&(this.fullFunctionCall.name+=s.name),null!=s.arguments&&(this.fullFunctionCall.arguments+=s.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processErrorEvent(e){c("onerror: %o",e),this.dispatchEvent(new CustomEvent(l.mA,{detail:e})),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,i.fC)(l.mA)}))}}},78836(e,t,n){"use strict";n.d(t,{AZ:()=>s,L9:()=>c,Np:()=>d,Or:()=>o,cT:()=>a,mA:()=>l,uH:()=>r.u,ud:()=>i,zn:()=>u});var r=n(97784);const s="error_service_unavailable",o="error_quota_exceeded",i="error_moderation",a="error_context_too_large",l="error_network",c="error_unclear_prompt",u="error_response",d="default"},90372(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(10067);const s=n.n(r)()("dops:analytics");let o,i;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const a={initialize:function(e,t,n){a.setUser(e,t),a.setSuperProps(n),a.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){i={ID:e,username:t}},setSuperProps:function(e){o=e},assignSuperProps:function(e){o=Object.assign(o||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);s("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),s('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);a.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);s("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),s('Built stat "%s" in group "%s"',t,e);return n}(e,t);a.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){a.tracks.recordPageView(e),a.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,s,o,i){a.ga.recordPurchase(e,t,n,r,s,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(!t.blog_id&&"object"==typeof window.jpTracksContext&&window.jpTracksContext.blog_id&&(t.blog_id=window.jpTracksContext.blog_id),o&&(s("- Super Props: %o",o),t=Object.assign(t,o)),s('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):s('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};a.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){a.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){s("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};a.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),a.ga.initialized=!0)},recordPageView:function(e,t){a.ga.initialize(),s("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){a.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(o+=" [Option Label: "+n+"]"),void 0!==r&&(o+=" [Option Value: "+r+"]"),s(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,s,o,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:s,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){i&&window._tkq.push(["identifyUser",i.ID,i.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},l=a},5932(e,t,n){"use strict";n.d(t,{Ay:()=>d});var r=n(56439),s=n(93832);function o(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const i=o("JsonParseError"),a=o("JsonParseAfterRedirectError"),l=o("Api404Error"),c=o("Api404AfterRedirectError"),u=o("FetchNetworkError");const d=new function(e,t){let n=e,o=e,i={"X-WP-Nonce":t},a={credentials:"same-origin",headers:i},l={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})},c=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const u={setApiRoot(e){n=e},setWpcomOriginApiUrl(e){o=e},setApiNonce(e){i={"X-WP-Nonce":e},a={credentials:"same-origin",headers:i},l={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{c=e},registerSite:(e,t,s)=>{const o={};return(0,r.jetpackConfigHas)("consumer_slug")&&(o.plugin_slug=(0,r.jetpackConfigGet)("consumer_slug")),null!==t&&(o.redirect_uri=t),s&&(o.from=s),m(`${n}jetpack/v4/connection/register`,l,{body:JSON.stringify(o)}).then(p).then(h)},fetchAuthorizationUrl:e=>d((0,s.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),a).then(p).then(h),fetchSiteConnectionData:()=>d(`${n}jetpack/v4/connection/data`,a).then(h),fetchSiteConnectionStatus:()=>d(`${n}jetpack/v4/connection`,a).then(h),fetchSiteConnectionTest:()=>d(`${n}jetpack/v4/connection/test`,a).then(p).then(h),fetchUserConnectionData:()=>d(`${n}jetpack/v4/connection/data`,a).then(h),fetchUserTrackingSettings:()=>d(`${n}jetpack/v4/tracking/settings`,a).then(p).then(h),updateUserTrackingSettings:e=>m(`${n}jetpack/v4/tracking/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),disconnectSite:()=>m(`${n}jetpack/v4/connection`,l,{body:JSON.stringify({isActive:!1})}).then(p).then(h),fetchConnectUrl:()=>d(`${n}jetpack/v4/connection/url`,a).then(p).then(h),unlinkUser:(e=!1,t={})=>{const r={linked:!1,force:!!e};return t.disconnectAllUsers&&(r["disconnect-all-users"]=!0),m(`${n}jetpack/v4/connection/user`,l,{body:JSON.stringify(r)}).then(p).then(h)},reconnect:()=>m(`${n}jetpack/v4/connection/reconnect`,l).then(p).then(h),fetchConnectedPlugins:()=>d(`${n}jetpack/v4/connection/plugins`,a).then(p).then(h),setHasSeenWCConnectionModal:()=>m(`${n}jetpack/v4/seen-wc-connection-modal`,l).then(p).then(h),fetchModules:()=>d(`${n}jetpack/v4/module/all`,a).then(p).then(h),fetchModule:e=>d(`${n}jetpack/v4/module/${e}`,a).then(p).then(h),activateModule:e=>m(`${n}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!0})}).then(p).then(h),deactivateModule:e=>m(`${n}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>m(`${n}jetpack/v4/module/${e}`,l,{body:JSON.stringify(t)}).then(p).then(h),updateSettings:e=>m(`${n}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),getProtectCount:()=>d(`${n}jetpack/v4/module/protect/data`,a).then(p).then(h),resetOptions:e=>m(`${n}jetpack/v4/options/${e}`,l,{body:JSON.stringify({reset:!0})}).then(p).then(h),activateVaultPress:()=>m(`${n}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(h),getVaultPressData:()=>d(`${n}jetpack/v4/module/vaultpress/data`,a).then(p).then(h),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),m(`${n}jetpack/v4/plugins`,l,{body:JSON.stringify(r)}).then(p).then(h)},activateAkismet:()=>m(`${n}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(h),getAkismetData:()=>d(`${n}jetpack/v4/module/akismet/data`,a).then(p).then(h),checkAkismetKey:()=>d(`${n}jetpack/v4/module/akismet/key/check`,a).then(p).then(h),checkAkismetKeyTyped:e=>m(`${n}jetpack/v4/module/akismet/key/check`,l,{body:JSON.stringify({api_key:e})}).then(p).then(h),getFeatureTypeStatus:e=>d(`${n}jetpack/v4/feature/${e}`,a).then(p).then(h),fetchStatsData:e=>d(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),a).then(p).then(h).then(f),getPluginUpdates:()=>d(`${n}jetpack/v4/updates/plugins`,a).then(p).then(h),getPlans:()=>d(`${n}jetpack/v4/plans`,a).then(p).then(h),fetchSettings:()=>d(`${n}jetpack/v4/settings`,a).then(p).then(h),updateSetting:e=>m(`${n}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),fetchSiteData:()=>d(`${n}jetpack/v4/site`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteFeatures:()=>d(`${n}jetpack/v4/site/features`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteProducts:()=>d(`${n}jetpack/v4/site/products`,a).then(p).then(h),fetchSitePurchases:()=>d(`${n}jetpack/v4/site/purchases`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteBenefits:()=>d(`${n}jetpack/v4/site/benefits`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteDiscount:()=>d(`${n}jetpack/v4/site/discount`,a).then(p).then(h).then(e=>e.data),fetchSetupQuestionnaire:()=>d(`${n}jetpack/v4/setup/questionnaire`,a).then(p).then(h),fetchRecommendationsData:()=>d(`${n}jetpack/v4/recommendations/data`,a).then(p).then(h),fetchRecommendationsProductSuggestions:()=>d(`${n}jetpack/v4/recommendations/product-suggestions`,a).then(p).then(h),fetchRecommendationsUpsell:()=>d(`${n}jetpack/v4/recommendations/upsell`,a).then(p).then(h),fetchRecommendationsConditional:()=>d(`${n}jetpack/v4/recommendations/conditional`,a).then(p).then(h),saveRecommendationsData:e=>m(`${n}jetpack/v4/recommendations/data`,l,{body:JSON.stringify({data:e})}).then(p),fetchProducts:()=>d(`${n}jetpack/v4/products`,a).then(p).then(h),fetchRewindStatus:()=>d(`${n}jetpack/v4/rewind`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchScanStatus:()=>d(`${n}jetpack/v4/scan`,a).then(p).then(h).then(e=>JSON.parse(e.data)),dismissJetpackNotice:e=>m(`${n}jetpack/v4/notice/${e}`,l,{body:JSON.stringify({dismissed:!0})}).then(p).then(h),fetchPluginsData:()=>d(`${n}jetpack/v4/plugins`,a).then(p).then(h),fetchIntroOffers:()=>d(`${n}jetpack/v4/intro-offers`,a).then(p).then(h),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,a).then(p).then(h),verifySiteGoogle:e=>m(`${n}jetpack/v4/verify-site/google`,l,{body:JSON.stringify({keyring_id:e})}).then(p).then(h),submitSurvey:e=>m(`${n}jetpack/v4/marketing/survey`,l,{body:JSON.stringify(e)}).then(p).then(h),saveSetupQuestionnaire:e=>m(`${n}jetpack/v4/setup/questionnaire`,l,{body:JSON.stringify(e)}).then(p).then(h),updateLicensingError:e=>m(`${n}jetpack/v4/licensing/error`,l,{body:JSON.stringify(e)}).then(p).then(h),updateLicenseKey:e=>m(`${n}jetpack/v4/licensing/set-license`,l,{body:JSON.stringify({license:e})}).then(p).then(h),getUserLicensesCounts:()=>d(`${n}jetpack/v4/licensing/user/counts`,a).then(p).then(h),getUserLicenses:()=>d(`${n}jetpack/v4/licensing/user/licenses`,a).then(p).then(h),updateLicensingActivationNoticeDismiss:e=>m(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,l,{body:JSON.stringify({last_detached_count:e})}).then(p).then(h),updateRecommendationsStep:e=>m(`${n}jetpack/v4/recommendations/step`,l,{body:JSON.stringify({step:e})}).then(p),confirmIDCSafeMode:()=>m(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,l).then(p),startIDCFresh:e=>m(`${n}jetpack/v4/identity-crisis/start-fresh`,l,{body:JSON.stringify({redirect_uri:e})}).then(p).then(h),migrateIDC:()=>m(`${n}jetpack/v4/identity-crisis/migrate`,l).then(p),attachLicenses:e=>m(`${n}jetpack/v4/licensing/attach-licenses`,l,{body:JSON.stringify({licenses:e})}).then(p).then(h),fetchSearchPlanInfo:()=>d(`${o}jetpack/v4/search/plan`,a).then(p).then(h),fetchSearchSettings:()=>d(`${o}jetpack/v4/search/settings`,a).then(p).then(h),updateSearchSettings:e=>m(`${o}jetpack/v4/search/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),fetchSearchStats:()=>d(`${o}jetpack/v4/search/stats`,a).then(p).then(h),fetchWafSettings:()=>d(`${n}jetpack/v4/waf`,a).then(p).then(h),updateWafSettings:e=>m(`${n}jetpack/v4/waf`,l,{body:JSON.stringify(e)}).then(p).then(h),fetchWordAdsSettings:()=>d(`${n}jetpack/v4/wordads/settings`,a).then(p).then(h),updateWordAdsSettings:e=>m(`${n}jetpack/v4/wordads/settings`,l,{body:JSON.stringify(e)}),fetchSearchPricing:()=>d(`${o}jetpack/v4/search/pricing`,a).then(p).then(h),fetchMigrationStatus:()=>d(`${n}jetpack/v4/migration/status`,a).then(p).then(h),fetchBackupUndoEvent:()=>d(`${n}jetpack/v4/site/backup/undo-event`,a).then(p).then(h),fetchBackupPreflightStatus:()=>d(`${n}jetpack/v4/site/backup/preflight`,a).then(p).then(h)};function d(e,t){return fetch(c(e),t)}function m(e,t,n){return fetch(e,Object.assign({},t,n)).catch(g)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function p(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise(()=>{throw e.redirected?new c(e.redirected):new l}):e.json().catch(e=>m(e)).then(t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n})}function h(e){return e.json().catch(t=>m(t,e.redirected,e.url))}function m(e,t,n){throw t?new a(n):new i}function g(){throw new u}},11876(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(13022),s=n(87682),o=n(10790);const i=({children:e=null,width:t=null,height:n=null,className:i=""})=>(0,o.jsx)("div",{className:(0,r.A)(s.A.placeholder,i),style:{width:t,height:n},children:e})},50723(e,t,n){"use strict";n.d(t,{Ay:()=>p});var r=n(51609),s=n(8706),o=n(10790);const i={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},a={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-5":"var(--jp-gray)","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},l={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},c={"--spacing-base":"8px"},u={},d=(e,t,n)=>{const r={...i,...a,...l,...c};for(const t in r)e.style.setProperty(t,r[t]);n&&e.classList.add(s.A.global),t&&(u[t]={provided:!0,root:e})},p=({children:e=null,targetDom:t,id:n,withGlobalStyles:s=!0})=>{const i=(0,r.useRef)(),a=u?.[n]?.provided;return(0,r.useLayoutEffect)(()=>{if(!a)return t?d(t,n,s):void(i?.current&&d(i.current,n,s))},[t,i,a,n,s]),t?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)("div",{ref:i,children:e})}},3924(e,t,n){"use strict";function r(e,t={}){const n={};let r;if("undefined"!=typeof window&&(r=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);for(const e in t)n[e]=encodeURIComponent(t[e]);!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&Object.hasOwn(jetpack_redirects,"currentSiteRawUrl")&&(n.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);return"https://jetpack.com/redirect/?"+Object.keys(n).map(e=>e+"="+n[e]).join("&")}n.d(t,{A:()=>r})},56439(e,t,n){let r={};try{r=n(74277)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const s=e=>Object.hasOwn(r,e);e.exports={jetpackConfigHas:s,jetpackConfigGet:e=>{if(!s(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[e]}}},14882(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(5932),s=n(97999),o=n(47143),i=n(51609),a=n(34293);const l=window?.JP_CONNECTION_INITIAL_STATE||(0,s.getScriptData)()?.connection||{};function c({registrationNonce:e=l.registrationNonce,apiRoot:t=l.apiRoot,apiNonce:n=l.apiNonce,redirectUri:s,autoTrigger:c,from:u,skipUserConnection:d,skipPricingPage:p}={}){const{registerSite:h,connectUser:m,refreshConnectedPlugins:g}=(0,o.useDispatch)(a.a),f=(0,o.useSelect)(e=>e(a.a).getRegistrationError(),[]),{siteIsRegistering:b,userIsConnecting:v,userConnectionData:y,connectedPlugins:k,connectionErrors:x,isRegistered:_,isUserConnected:w,hasConnectedOwner:j,isOfflineMode:C}=(0,o.useSelect)(e=>{const t=e(a.a).getConnectionStatus();return{siteIsRegistering:e(a.a).getSiteIsRegistering(),userIsConnecting:e(a.a).getUserIsConnecting(),userConnectionData:e(a.a).getUserConnectionData()||{},connectedPlugins:e(a.a).getConnectedPlugins(),connectionErrors:e(a.a).getConnectionErrors(),isOfflineMode:e(a.a).getIsOfflineMode(),isRegistered:t.isRegistered??!1,isUserConnected:t.isUserConnected??!1,hasConnectedOwner:t.hasConnectedOwner??!1}},[]),A=()=>d?s?(window.location.href=s,Promise.resolve(s)):Promise.resolve():m({from:u,redirectUri:s,skipPricingPage:p}),S=t=>(t&&t.preventDefault(),_?A():h({registrationNonce:e,redirectUri:s,from:u}).then(()=>A()));return(0,i.useEffect)(()=>{r.Ay.setApiRoot(t),r.Ay.setApiNonce(n)},[t,n]),(0,i.useEffect)(()=>{!c||b||v||S()},[]),{handleRegisterSite:S,handleConnectUser:A,refreshConnectedPlugins:g,isRegistered:_,isUserConnected:w,siteIsRegistering:b,userIsConnecting:v,registrationError:f,userConnectionData:y,hasConnectedOwner:j,connectedPlugins:k,connectionErrors:x,isOfflineMode:C}}},33935(e,t,n){"use strict";n.d(t,{A1:()=>l,Ay:()=>_,DO:()=>a,Ij:()=>i,Kl:()=>h,LW:()=>c,MU:()=>m,XY:()=>u,ZO:()=>o,dz:()=>d,gH:()=>p,v_:()=>s});var r=n(5932);const s="SET_CONNECTION_STATUS",o="SET_CONNECTION_STATUS_IS_FETCHING",i="SET_SITE_IS_REGISTERING",a="SET_USER_IS_CONNECTING",l="SET_REGISTRATION_ERROR",c="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",d="DISCONNECT_USER_SUCCESS",p="SET_CONNECTED_PLUGINS",h="SET_CONNECTION_ERRORS",m="SET_IS_OFFLINE_MODE",g=e=>({type:s,connectionStatus:e}),f=e=>({type:i,isRegistering:e}),b=e=>({type:a,isConnecting:e}),v=e=>({type:l,registrationError:e}),y=()=>({type:c}),k=e=>({type:u,authorizationUrl:e}),x=e=>({type:p,connectedPlugins:e});const _={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:o,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:f,setUserIsConnecting:b,setRegistrationError:v,clearRegistrationError:y,setAuthorizationUrl:k,registerSite:function*({registrationNonce:e,redirectUri:t,from:n=""}){yield y(),yield f(!0);try{const r=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:t,from:n};return yield g({isRegistered:!0}),yield k(r.authorizeUrl),yield f(!1),Promise.resolve(r)}catch(e){return yield v(e),yield f(!1),Promise.reject(e)}},connectUser:function*({from:e,redirectFunc:t,redirectUri:n,skipPricingPage:r}={}){yield b(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:n,skipPricingPage:r}},disconnectUserSuccess:()=>({type:d}),setConnectedPlugins:x,refreshConnectedPlugins:()=>async({dispatch:e})=>await new Promise(t=>r.Ay.fetchConnectedPlugins().then(n=>{e(x(n)),t(n)})),setConnectionErrors:e=>({type:h,connectionErrors:e}),setIsOfflineMode:e=>({type:m,isOfflineMode:e})}},27938(e,t,n){"use strict";function r(e){return window.location.assign(e)}n.d(t,{d:()=>r})},22494(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(5932),s=n(47143),o=n(27938),i=n(32279);const a={FETCH_AUTHORIZATION_URL:({redirectUri:e})=>r.Ay.fetchAuthorizationUrl(e),REGISTER_SITE:({redirectUri:e,from:t})=>r.Ay.registerSite(null,e,t),CONNECT_USER:(0,s.createRegistryControl)(({resolveSelect:e})=>({from:t,redirectFunc:n,redirectUri:r,skipPricingPage:s}={})=>new Promise((a,l)=>{e(i.A).getAuthorizationUrl(r).then(e=>{const r=n||(e=>(0,o.d)(e)),i=new URL(e);s&&i.searchParams.set("skip_pricing","true"),t&&i.searchParams.set("from",encodeURIComponent(t));const l=i.toString();r(l),a(l)}).catch(e=>{l(e)})}))}},5051(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(47143),s=n(33935);const o=(0,r.combineReducers)({connectionStatus:(e={},t)=>{switch(t.type){case s.v_:return{...e,...t.connectionStatus};case s.dz:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:(e=!1,t)=>t.type===s.ZO?t.isFetching:e,siteIsRegistering:(e=!1,t)=>t.type===s.Ij?t.isRegistering:e,userIsConnecting:(e=!1,t)=>t.type===s.DO?t.isConnecting:e,registrationError:(e,t)=>{switch(t.type){case s.LW:return!1;case s.A1:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===s.XY?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:(e={},t)=>t.type===s.gH?t.connectedPlugins:e,connectionErrors:(e={},t)=>t.type===s.Kl?t.connectionErrors:e,isOfflineMode:(e=!1,t)=>t.type===s.MU?t.isConnecting:e})},58019(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(47143),s=n(33935),o=n(32279);const i={...{getAuthorizationUrl:{isFulfilled:(e,...t)=>{const n=Boolean(e.authorizationUrl),s=(0,r.select)(o.A).hasFinishedResolution("getAuthorizationUrl",t);return n&&!s&&(0,r.dispatch)(o.A).finishResolution("getAuthorizationUrl",t),n},*fulfill(e){const t=yield s.Ay.fetchAuthorizationUrl(e);yield s.Ay.setAuthorizationUrl(t.authorizeUrl)}}}}},52676(e,t,n){"use strict";n.d(t,{A:()=>r});const r={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionErrors:e=>e.connectionErrors||[],getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},18734(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(47143);class s{static store=null;static mayBeInit(e,t){null===s.store&&(s.store=(0,r.createReduxStore)(e,t),(0,r.register)(s.store))}}const o=s},32279(e,t,n){"use strict";n.d(t,{A:()=>r});const r="jetpack-connection"},34293(e,t,n){"use strict";n.d(t,{a:()=>u.A});var r=n(97999),s=n(33935),o=n(22494),i=n(5051),a=n(58019),l=n(52676),c=n(18734),u=n(32279);const d=window.JP_CONNECTION_INITIAL_STATE||(0,r.getScriptData)()?.connection;d||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),c.A.mayBeInit(u.A,{__experimentalUseThunks:!0,reducer:i.A,actions:s.Ay,selectors:l.A,resolvers:a.A,controls:o.A,initialState:d||{}})},63673(e,t,n){"use strict";n.d(t,{FALLBACK_CURRENCY:()=>s,FALLBACK_LOCALE:()=>r});n(38443);const r="en",s="USD"},11452(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(63673),s=n(49980),o=n(91167);const i=function(){let e,t,n;const i=()=>{const t="undefined"!=typeof window?window.wp?.date?.getSettings?.()?.l10n?.locale:void 0,n="undefined"!=typeof window?window?.navigator?.language:void 0;return(e??(t||n)??r.FALLBACK_LOCALE).split("_")[0]};return{setLocale:t=>{e=t},setGeoLocation:e=>{t=e},setCurrencyOverrides:e=>{n=e},formatNumber:(e,{decimals:t=0,forceLatin:n=!0,numberFormatOptions:r={}}={})=>{try{return(0,o.j)({browserSafeLocale:i(),decimals:t,forceLatin:n,numberFormatOptions:r}).format(e)}catch{return String(e)}},formatNumberCompact:(e,{decimals:t=0,forceLatin:n=!0,numberFormatOptions:r={}}={})=>{try{return(0,o.c)({browserSafeLocale:i(),decimals:t,forceLatin:n,numberFormatOptions:r}).format(e)}catch{return String(e)}},formatCurrency:(e,r,{stripZeros:o=!1,isSmallestUnit:a=!1,signForPositive:l=!1,forceLatin:c=!0}={})=>(0,s.u)({number:e,currency:r,browserSafeLocale:i(),stripZeros:o,isSmallestUnit:a,signForPositive:l,geoLocation:t,forceLatin:c,currencyOverrides:n}),getCurrencyObject:(e,r,{stripZeros:o=!1,isSmallestUnit:a=!1,signForPositive:l=!1,forceLatin:c=!0}={})=>(0,s.v)({number:e,currency:r,browserSafeLocale:i(),stripZeros:o,isSmallestUnit:a,signForPositive:l,geoLocation:t,forceLatin:c,currencyOverrides:n})}}},3328(e,t,n){"use strict";n.d(t,{J:()=>l});var r=n(10067),s=n.n(r),o=n(63673);const i=s()("number-formatters:get-cached-formatter"),a=new Map;function l({locale:e,fallbackLocale:t=o.FALLBACK_LOCALE,options:n,retries:r=1}){const s=JSON.stringify([e,n]);try{return a.get(s)??a.set(s,new Intl.NumberFormat(e,n)).get(s)}catch(s){if(i(`Intl.NumberFormat was called with a non-existent locale "${e}"; falling back to ${t}`),r)return l({locale:t,options:n,retries:r-1});throw s}}},54268(e,t,n){"use strict";n.d(t,{vv:()=>c});const r=(0,n(11452).A)(),{setLocale:s,setGeoLocation:o,setCurrencyOverrides:i,formatNumber:a,formatNumberCompact:l,formatCurrency:c,getCurrencyObject:u}=r},76673(e,t,n){"use strict";n.d(t,{a:()=>r});const r={AED:{symbol:"د.إ."},AFN:{symbol:"؋"},ALL:{symbol:"Lek"},AMD:{symbol:"֏"},ANG:{symbol:"ƒ"},AOA:{symbol:"Kz"},ARS:{symbol:"$"},AUD:{symbol:"A$"},AWG:{symbol:"ƒ"},AZN:{symbol:"₼"},BAM:{symbol:"КМ"},BBD:{symbol:"Bds$"},BDT:{symbol:"৳"},BGN:{symbol:"лв."},BHD:{symbol:"د.ب."},BIF:{symbol:"FBu"},BMD:{symbol:"$"},BND:{symbol:"$"},BOB:{symbol:"Bs"},BRL:{symbol:"R$"},BSD:{symbol:"$"},BTC:{symbol:"Ƀ"},BTN:{symbol:"Nu."},BWP:{symbol:"P"},BYR:{symbol:"р."},BZD:{symbol:"BZ$"},CAD:{symbol:"C$"},CDF:{symbol:"FC"},CHF:{symbol:"CHF"},CLP:{symbol:"$"},CNY:{symbol:"¥"},COP:{symbol:"$"},CRC:{symbol:"₡"},CUC:{symbol:"CUC"},CUP:{symbol:"$MN"},CVE:{symbol:"$"},CZK:{symbol:"Kč"},DJF:{symbol:"Fdj"},DKK:{symbol:"kr."},DOP:{symbol:"RD$"},DZD:{symbol:"د.ج."},EGP:{symbol:"ج.م."},ERN:{symbol:"Nfk"},ETB:{symbol:"ETB"},EUR:{symbol:"€"},FJD:{symbol:"FJ$"},FKP:{symbol:"£"},GBP:{symbol:"£"},GEL:{symbol:"Lari"},GHS:{symbol:"₵"},GIP:{symbol:"£"},GMD:{symbol:"D"},GNF:{symbol:"FG"},GTQ:{symbol:"Q"},GYD:{symbol:"G$"},HKD:{symbol:"HK$"},HNL:{symbol:"L."},HRK:{symbol:"kn"},HTG:{symbol:"G"},HUF:{symbol:"Ft"},IDR:{symbol:"Rp"},ILS:{symbol:"₪"},INR:{symbol:"₹"},IQD:{symbol:"د.ع."},IRR:{symbol:"﷼"},ISK:{symbol:"kr."},JMD:{symbol:"J$"},JOD:{symbol:"د.ا."},JPY:{symbol:"¥"},KES:{symbol:"S"},KGS:{symbol:"сом"},KHR:{symbol:"៛"},KMF:{symbol:"CF"},KPW:{symbol:"₩"},KRW:{symbol:"₩"},KWD:{symbol:"د.ك."},KYD:{symbol:"$"},KZT:{symbol:"₸"},LAK:{symbol:"₭"},LBP:{symbol:"ل.ل."},LKR:{symbol:"₨"},LRD:{symbol:"L$"},LSL:{symbol:"M"},LYD:{symbol:"د.ل."},MAD:{symbol:"د.م."},MDL:{symbol:"lei"},MGA:{symbol:"Ar"},MKD:{symbol:"ден."},MMK:{symbol:"K"},MNT:{symbol:"₮"},MOP:{symbol:"MOP$"},MRO:{symbol:"UM"},MTL:{symbol:"₤"},MUR:{symbol:"₨"},MVR:{symbol:"MVR"},MWK:{symbol:"MK"},MXN:{symbol:"MX$"},MYR:{symbol:"RM"},MZN:{symbol:"MT"},NAD:{symbol:"N$"},NGN:{symbol:"₦"},NIO:{symbol:"C$"},NOK:{symbol:"kr"},NPR:{symbol:"₨"},NZD:{symbol:"NZ$"},OMR:{symbol:"﷼"},PAB:{symbol:"B/."},PEN:{symbol:"S/."},PGK:{symbol:"K"},PHP:{symbol:"₱"},PKR:{symbol:"₨"},PLN:{symbol:"zł"},PYG:{symbol:"₲"},QAR:{symbol:"﷼"},RON:{symbol:"lei"},RSD:{symbol:"Дин."},RUB:{symbol:"₽"},RWF:{symbol:"RWF"},SAR:{symbol:"﷼"},SBD:{symbol:"S$"},SCR:{symbol:"₨"},SDD:{symbol:"LSd"},SDG:{symbol:"£"},SEK:{symbol:"kr"},SGD:{symbol:"S$"},SHP:{symbol:"£"},SLL:{symbol:"Le"},SOS:{symbol:"S"},SRD:{symbol:"$"},STD:{symbol:"Db"},SVC:{symbol:"₡"},SYP:{symbol:"£"},SZL:{symbol:"E"},THB:{symbol:"฿"},TJS:{symbol:"TJS"},TMT:{symbol:"m"},TND:{symbol:"د.ت."},TOP:{symbol:"T$"},TRY:{symbol:"TL"},TTD:{symbol:"TT$"},TVD:{symbol:"$T"},TWD:{symbol:"NT$"},TZS:{symbol:"TSh"},UAH:{symbol:"₴"},UGX:{symbol:"USh"},USD:{},UYU:{symbol:"$U"},UZS:{symbol:"сўм"},VEB:{symbol:"Bs."},VEF:{symbol:"Bs. F."},VND:{symbol:"₫"},VUV:{symbol:"VT"},WST:{symbol:"WS$"},XAF:{symbol:"F"},XCD:{symbol:"$"},XOF:{symbol:"F"},XPF:{symbol:"F"},YER:{symbol:"﷼"},ZAR:{symbol:"R"},ZMW:{symbol:"ZK"},WON:{symbol:"₩"}}},49980(e,t,n){"use strict";n.d(t,{u:()=>f,v:()=>b});var r=n(10067),s=n.n(r),o=n(63673),i=n(3328),a=n(76673);const l=s()("number-formatters:number-format-currency");function c(e,t,n){if("USD"===e&&t&&""!==t&&"US"!==t)return{symbol:"US$",...n?.USD};const r=a.a[e],s=n?.[e];return r||s?{...r,...s}:void 0}function u(e,t,n){return c(e,t,n)?e:(l(`getValidCurrency was called with a non-existent currency "${e}"; falling back to ${o.FALLBACK_CURRENCY}`),o.FALLBACK_CURRENCY)}function d({number:e,currency:t,browserSafeLocale:n,forceLatin:r=!0,stripZeros:s,signForPositive:o}){const a=`${n}${r?"-u-nu-latn":""}`,l={style:"currency",currency:t,...s&&Number.isInteger(e)&&{maximumFractionDigits:0,minimumFractionDigits:0},...o&&{signDisplay:"exceptZero"}};return(0,i.J)({locale:a,options:l})}const p={IDR:2,HUF:2};function h(e,t,n){return d({number:0,currency:t,browserSafeLocale:e,forceLatin:n}).resolvedOptions().maximumFractionDigits}function m(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}function g(e,t,n,r,s){if(isNaN(e))return l("formatCurrency was called with NaN"),0;if(r){Number.isInteger(e)||l("formatCurrency was called with isSmallestUnit and a float which will be rounded",e);const r=10**function(e,t,n){const r=n?.[e]?.decimal;return"number"==typeof r?r:p[e]??t}(n,t,s);return m(Math.round(e)/r,t)}return m(e,t)}const f=({number:e,browserSafeLocale:t,currency:n,stripZeros:r,isSmallestUnit:s,signForPositive:o,geoLocation:i,forceLatin:a,currencyOverrides:l})=>{const p=u(n,i,l),m=c(p,i,l),f=h(t,p,a);if(s&&void 0===f)throw new Error(`Could not determine currency precision for ${p} in ${t}`);const b=g(e,f??0,p,s,l);return d({number:b,currency:p,browserSafeLocale:t,forceLatin:a,stripZeros:r,signForPositive:o}).formatToParts(b).reduce((e,t)=>"currency"===t.type&&m?.symbol?e+m.symbol:e+t.value,"")},b=({number:e,browserSafeLocale:t,currency:n,stripZeros:r,isSmallestUnit:s,signForPositive:o,geoLocation:i,forceLatin:a,currencyOverrides:l})=>{const p=u(n,i,l),m=c(p,i,l),f=g(e,h(t,p,a)??0,p,s,l),b=d({number:f,currency:p,browserSafeLocale:t,forceLatin:a,stripZeros:r,signForPositive:o}).formatToParts(f);let v="",y="$",k="before",x=!1,_=!1,w="",j="";b.forEach(e=>{switch(e.type){case"currency":return y=m?.symbol??e.value,void(x&&(k="after"));case"group":case"integer":return w+=e.value,void(x=!0);case"decimal":case"fraction":return j+=e.value,x=!0,void(_=!0);case"minusSign":return void(v="-");case"plusSign":v="+"}});const C=!Number.isInteger(f)&&_;return{sign:v,symbol:y,symbolPosition:k,integer:w,fraction:j,hasNonZeroFraction:C,floatValue:f}}},91167(e,t,n){"use strict";n.d(t,{c:()=>o,j:()=>s});var r=n(3328);const s=({browserSafeLocale:e,decimals:t=0,forceLatin:n=!0,numberFormatOptions:s={}})=>{const o=`${e}${n?"-u-nu-latn":""}`,i={minimumFractionDigits:t,maximumFractionDigits:t,...s};return(0,r.J)({locale:o,options:i})},o=({numberFormatOptions:e={},...t})=>s({...t,numberFormatOptions:{notation:"compact",maximumFractionDigits:1,...e}})},85985(e,t,n){"use strict";n.d(t,{$i:()=>r.A,BT:()=>a.A,Bd:()=>p.Bd,CP:()=>b.C,Cq:()=>m.C,Dk:()=>l.Dk,FB:()=>i.A,GE:()=>s.A,GT:()=>l.GT,M_:()=>g.store,Mm:()=>f.A,Ti:()=>p.Ti,W4:()=>l.W4,ZR:()=>d.A,_6:()=>v.A,_X:()=>p._X,aq:()=>l.aq,ds:()=>p.ds,gB:()=>c.A,pP:()=>o.p,q7:()=>h.A,sH:()=>l.sH,sh:()=>m.s,st:()=>u.A,tu:()=>l.tu,xI:()=>b.x});var r=n(34972),s=n(54815),o=(n(41409),n(62634)),i=n(8573),a=(n(82034),n(65595)),l=n(53265),c=n(49354),u=n(73489),d=n(89581),p=n(20710),h=(n(58406),n(76923)),m=n(30335),g=n(87687),f=n(44360),b=n(9061),v=n(25929);n(5765)},5765(e,t,n){"use strict";n(98490)},82201(e,t,n){"use strict";n.d(t,{cb:()=>r.c});n(15877);var r=n(30984);n(82308)},15877(e,t,n){"use strict";n(97999),n(27723),n(48297),n(10790)},30984(e,t,n){"use strict";n.d(t,{c:()=>a});var r=n(56427),s=n(27723),o=n(13022),i=(n(75070),n(10790));const __=s.__,a=({className:e,description:t,align:n=null,title:s=null,buttonText:a=null,visible:l=!0,context:c=null,checkoutUrl:u=null,goToCheckoutPage:d=null,isRedirecting:p=!1,showButton:h=!0,target:m="_top"})=>{const g=(0,o.A)(e,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===c,"block-editor-block-list__block":"editor-canvas"===c,"jetpack-upgrade-plan__hidden":!l}),f=__("Redirecting…","jetpack");return(0,i.jsx)("div",{className:g,"data-align":n,children:(0,i.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[s&&(0,i.jsx)("strong",{className:(0,o.A)("banner-title",{[`${e}__title`]:e}),children:s}),t&&(0,i.jsx)("span",{className:`${e}__description banner-description`,children:t}),h&&(0,i.jsx)(r.Button,{href:p?null:u,onClick:d,target:m,className:(0,o.A)("is-primary",{"jetpack-upgrade-plan__hidden":!u}),isBusy:p,children:(0,i.jsx)("span",{children:p?f:a})})]})})}},82308(e,t,n){"use strict";n(47143),n(51609),n(10790)},30335(e,t,n){"use strict";n.d(t,{C:()=>o,s:()=>s});var r=n(86087);function s(e){const t={};let n="span",s=e.icon;const o=document.createElement("div");o.innerHTML=e.icon;const i=o.querySelector("svg");return i&&(n="svg",s=i.innerHTML,Array.from(i.attributes).forEach(({nodeName:e,nodeValue:n})=>t[e]=n)),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:s||""}})}function o(e){return{src:s(e)}}},34972(e,t,n){"use strict";n.d(t,{A:()=>r});function r(){return"object"==typeof window?window?.Jetpack_Editor_Initial_State??null:null}},8573(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(34972);function s(e){const t=(0,r.A)(),n=t?.available_blocks?.[e]?.available??!1,s=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??{},unavailableReason:s}}}},54815(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(97999);function s(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:(0,r.getScriptData)()?.site?.suffix??null}},73489(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(90372),s=n(14882),o=n(86087);const{tracks:i}=r.A,{recordEvent:a}=i,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,o.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:h={}}=(0,s.A)(),{wpcomUser:{login:m,ID:g}={},blogId:f}=h.currentUser||{},b=(0,o.useCallback)(async(e,t={})=>{d&&g&&m&&a(e,t)},[d,g,m]);return(0,o.useEffect)(()=>{d&&g&&m&&f&&r.A.initialize(g,m,{blog_id:f})},[f,g,m,d]),(0,o.useEffect)(()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(c||(b(r,l),u(!0)))},[c,t,e,n,p,l,b]),{recordEvent:b,tracks:i}}},89581(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(47143),s=n(86087);const o=()=>{};function i(e=null,t=o){const[n,i]=(0,s.useState)(!1),{isAutosaveablePost:a,isDirtyPost:l,currentPost:c}=(0,r.useSelect)(e=>{const t=e("core/editor");return{isAutosaveablePost:t.isEditedPostAutosaveable(),isDirtyPost:t.isEditedPostDirty(),currentPost:t.getCurrentPost()}},[]),u=Object.keys(c).length>0,d=(0,r.useSelect)(e=>!!window.wp?.customize||!!e("core/edit-widgets")),p=(0,r.dispatch)("core/editor").savePost,h=(0,r.useSelect)(e=>e("core").__experimentalGetDirtyEntityRecords()),m=async e=>{e?.preventDefault(),u?l&&a&&await p(e):await(async()=>{for(let e=0;e<h.length;e++)await(0,r.dispatch)("core").saveEditedEntityRecord(h[e].kind,h[e].name,h[e].key)})()};return{autosave:m,autosaveAndRedirect:async r=>{r?.preventDefault(),n||(i(!0),m(r).then(()=>{e&&function(e,t,n=!1){t&&t(e),n?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)}))},isRedirecting:n}}},76923(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(87687),s=n(47143),o=n(86087);const i=e=>{const{isModuleActive:t,isChangingStatus:n,isLoadingModules:i}=(0,s.useSelect)(t=>{const n=t(r.store);return{isModuleActive:n.isModuleActive(e),isChangingStatus:n.isModuleUpdating(e),isLoadingModules:n.areModulesLoading(e)}},[e]),{updateJetpackModuleStatus:a}=(0,s.useDispatch)(r.store),l=(0,o.useCallback)(t=>a({name:e,active:t}),[e,a]);return(0,o.useMemo)(()=>({isLoadingModules:i,isChangingStatus:n,isModuleActive:t,changeStatus:l}),[i,n,t,l])}},20710(e,t,n){"use strict";n.d(t,{Bd:()=>i,Ti:()=>o,_X:()=>r,ds:()=>s});const r="free",s="tiered",o="unlimited",i=e=>e?0===e?.value?r:1===e?.value?o:s:null},58406(e,t,n){"use strict";n(86087)},25929(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(47143),s=n(52619),o=n(53265),i=n(89581);const a=()=>{},l="a8c.wpcom-block-editor.openCheckoutModal";function c(e,t=a){const{checkoutUrl:n,planData:c}=(0,r.useSelect)(t=>{const n=t("core/editor"),r=t("wordpress-com/plans"),{id:s,type:i}=n.getCurrentPost(),a=r&&r.getPlan(e);return{checkoutUrl:(0,o.Q4)({plan:a,planSlug:e,postId:s,postType:i}),planData:a}},[e]),{autosave:u,autosaveAndRedirect:d,isRedirecting:p}=(0,i.A)(n,t);return[n,async e=>{if(e.preventDefault(),(0,s.hasAction)(l))return e.preventDefault(),u(e),void(0,s.doAction)(l,{products:[c]});d(e)},p,c]}},62410(e,t,n){"use strict";n.d(t,{KZ:()=>p,M4:()=>u,QB:()=>d,T3:()=>c,ik:()=>m,oW:()=>g,ud:()=>h,ux:()=>l});var r=n(38377),s=n(56427),o=n(13022),i=(n(47621),n(10790));const a=r.T["Jetpack Green 40"],l=({size:e=24,border:t=0,className:n="",color:r=a})=>{const l=t?-t/e*32:0;return(0,i.jsxs)(s.SVG,{className:(0,o.A)("jetpack-logo",n),width:e,height:e,viewBox:`${l} ${l} ${32-2*l} ${32-2*l}`,children:[(0,i.jsx)(s.Path,{className:"jetpack-logo__icon-circle",fill:r,stroke:t?"#fff":"transparent",strokeWidth:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,i.jsx)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*l},19 15,${3-l}`}),(0,i.jsx)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+l} 17,13 ${25+.5*l},13`})]})},c={src:(0,i.jsx)(s.SVG,{viewBox:"0 0 100 100",children:(0,i.jsx)(s.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"})})},u={src:(0,i.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve",children:(0,i.jsx)(s.Path,{d:"m20.7 12.9-.9-11c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5L1.9 0h-.1c-.2 0-.5 0-.7.1C.9.2.7.4.5.5.4.7.2.9.1 1.1c-.1.2-.1.5-.1.7v.1l.9 13.4c0 .5.2.9.5 1.3.3.2.8.4 1.3.4H3l16.1-2c.4 0 .9-.3 1.1-.6.3-.3.5-.8.5-1.2v-.3zm-3.1.8L4.2 15.3H4c-.4 0-.8-.1-1-.4-.3-.3-.4-.6-.5-1L1.7 3.2v-.1c0-.4.2-.8.5-1 .3-.3.7-.4 1-.4h.1l13.5.1c.4 0 .8.1 1 .4.3.3.4.6.5 1L19 12v.3c0 .4-.2.7-.4 1-.3.2-.6.4-1 .4z"})})},d={src:(0,i.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve",children:(0,i.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 31.908c0 1.376.893 2.268 2.27 2.268h6.63c3.956 0 7.192-1.337 9.392-3.68H12v1.412zM20.901 9H14.27C12.893 9 12 9.893 12 11.269v1.411h18.294C28.093 10.338 24.857 9 20.9 9zm5.787 16.176c0 1.113.726 1.835 1.845 1.835h3.973c.45-1.117.753-2.345.894-3.671h-4.867c-1.119 0-1.845.722-1.845 1.836zm-5.507-7.166c0 1.113.725 1.836 1.844 1.836H33.4a13.644 13.644 0 0 0-.894-3.672h-9.481c-1.119 0-1.844.723-1.844 1.836zm1.843 7.166c0-1.114-.726-1.836-1.845-1.836H12v3.671h9.18c1.118 0 1.843-.722 1.843-1.835zm-5.508-7.166c0-1.113-.726-1.836-1.844-1.836H12v3.672h3.672c1.118 0 1.844-.723 1.844-1.836zm41.151 3.199"})})},p=(0,i.jsx)(s.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79037 0.59375C4.0363 0.59375 5.13102 1.41658 5.47215 2.60947L8.8452 14.4044C8.8486 14.4164 8.85411 14.4273 8.86124 14.4368L12.8572 0.59375H15.0927H21.2721C25.6033 0.59375 28.5066 3.39892 28.5066 7.64565C28.5066 11.9411 25.5272 14.6196 21.0818 14.6196H18.1499H14.3719L13.6379 16.8813C12.9796 18.9095 11.0827 20.2839 8.94152 20.2839C6.80035 20.2839 4.90341 18.9095 4.24517 16.8813L0.137069 4.22276C-0.444671 2.43022 0.898038 0.59375 2.79037 0.59375ZM15.7374 10.4119H20.0156C21.8718 10.4119 22.9856 9.35018 22.9856 7.64565C22.9856 5.93137 21.8718 4.91839 20.0156 4.91839H17.5202L15.7374 10.4119Z",fill:"#000000"})}),h=(0,i.jsx)(s.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{d:"M4.75725 2.075C4.60279 1.97745 4.41041 1.97489 4.25365 2.06832C4.09689 2.16174 4 2.3367 4 2.52632V21.4737C4 21.6633 4.09689 21.8383 4.25365 21.9317C4.41041 22.0251 4.60279 22.0226 4.75725 21.925L19.7573 12.4513C19.9079 12.3562 20 12.1849 20 12C20 11.8151 19.9079 11.6438 19.7573 11.5487L4.75725 2.075Z",fill:"white"})}),m=(0,i.jsx)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})}),g=(0,i.jsx)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.G,{children:(0,i.jsx)(s.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})})},49354(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(34972);function s(){return!(!(0,r.A)()?.jetpack?.is_current_user_connected&&!window?.JP_CONNECTION_INITIAL_STATE?.connectionStatus?.isUserConnected)}},44360(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(34972);function s(){return!0===(0,r.A)()?.jetpack?.is_my_jetpack_available}},9520(e,t,n){"use strict";n.d(t,{C:()=>d,x:()=>u});var r=n(97999),s=n(10067),o=n.n(s);const i=window?.JP_CONNECTION_INITIAL_STATE,a=o()("shared-extension-utils:connection");let l=!1;const c=e=>{l||(a(e),l=!0)};function u(){return(0,r.isSimpleSite)()?(c("Simple site connected ✅"),!0):(0,r.isWoASite)()?(c("Atomic site connected ✅"),!0):i?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function d(){if((0,r.isSimpleSite)())return!0;return!1==!(i?.userConnectionData?.currentUser?.permissions??{}).manage_options}},9061(e,t,n){"use strict";n.d(t,{C:()=>r.C,x:()=>r.x});var r=n(9520)},53265(e,t,n){"use strict";n.d(t,{Dk:()=>m,GT:()=>f,Q4:()=>c,W4:()=>u,aq:()=>d,sH:()=>g,tu:()=>p});var r=n(97999),s=n(27723),o=n(93832),i=n(34972),a=n(8573),l=n(54815);const __=s.__;function c({planSlug:e,plan:t,postId:n,postType:s}){const i=e.startsWith("jetpack_")?e:t?.path_slug,a=(void 0===s?()=>{const e=new URLSearchParams(window.location.search);return(0,o.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(s)?"":"edit";return(0,r.isSimpleSite)()?(0,o.addQueryArgs)("/"+[e,s,(0,l.A)(),n].filter(Boolean).join("/"),{plan_upgraded:1}):(0,o.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,r.isWoASite)()?(0,o.addQueryArgs)(`https://wordpress.com/plans/${(0,l.A)()}`,{redirect_to:a,customerType:"business"}):i&&(0,o.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.A)()}/${i}`,{redirect_to:a})}function u(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,a.A)(t);return!n&&"missing_plan"===r}function d(e,t){return"missing_plan"===e&&t.required_plan}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,a.A)(t);return d(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function m(){return(0,i.A)()?.jetpack?.enable_upgrade_nudge??!1}const g=e=>h.some(t=>t.name===e),f=e=>h.filter(({name:t})=>t===e)[0]},82034(e,t,n){"use strict";n(92279)},41409(e,t,n){"use strict";n(97999)},62634(e,t,n){"use strict";n.d(t,{p:()=>s});var r=n(34972);function s(){const e=(0,r.A)();return e?.jetpack?.is_private_site??!1}},65595(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(29491),s=(n(13371),n(10790));const o=e=>(0,r.createHigherOrderComponent)(t=>n=>(0,s.jsx)(t,{...n,className:n.name===e?"has-warning is-interactive":n.className}),"withHasWarningIsInteractiveClassNames");n.dn(o)},52068(e,t,n){"use strict";n.d(t,{Ay:()=>_});var r=n(96865),s=n(56427),o=n(47143),i=n(27723),a=n(55565),l=n(73493),c=n(93761),u=n(90437),d=n(80224),p=n(27571),h=n(48499),m=n(2162),g=n(62402),f=(n(37209),n(10790));const __=i.__,b="correct-spelling",v="simplify",y="make-longer",k="make-shorter",x={default:[{name:r.DD,key:b,aiSuggestion:r.yy,icon:d.A}],"core/paragraph":[{name:r.HM,key:v,aiSuggestion:r.A4,icon:u.A},{name:r.JR,key:"summarize",aiSuggestion:r.UA,icon:c.A},{name:r.K2,key:y,aiSuggestion:r.br,icon:l.A},{name:r.UD,key:k,aiSuggestion:r.fD,icon:l.A}],"core/list-item":[{name:r.HM,key:v,aiSuggestion:r.A4,icon:u.A},{name:r.K2,key:y,aiSuggestion:r.br,icon:l.A},{name:r.UD,key:k,aiSuggestion:r.fD,icon:l.A}],"core/list":p.L.includes("core/list")?[{name:r.HM,key:v,aiSuggestion:r.A4,icon:u.A},{name:r.K2,key:y,aiSuggestion:r.br,icon:l.A},{name:r.UD,key:k,aiSuggestion:r.fD,icon:l.A},{name:r.mI,key:"turn-list-into-table",aiSuggestion:r.d5,icon:a.A,options:{alwaysTransformToAIAssistant:!0,rootParentOnly:!0}}]:[{name:r.yQ,key:"write-post-from-list",aiSuggestion:r.pE,icon:u.A,options:{userPrompt:"Write a post based on the list items. Include a title as first order heading and try to use secondary headings for each entry"}}]};function _({blockType:e,clientId:t,disabled:n=!1,onAskAiAssistant:i,onRequestSuggestion:a}){const l=(0,h.C)("ai-correct-spelling"),c=x[e]??[],{getBlockParents:u}=(0,o.select)("core/block-editor"),d=u(t);return(0,f.jsxs)(f.Fragment,{children:[n&&(0,f.jsx)(s.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info",children:__("Add content to activate the tools below","jetpack")}),(0,f.jsxs)(s.MenuGroup,{children:[(0,f.jsx)(s.MenuItem,{icon:r.cj,iconPosition:"left",onClick:i,disabled:n,children:(0,f.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:__("Ask AI Assistant","jetpack")})},"key-ai-assistant"),[...x.default,...c].filter(e=>!(e.options?.rootParentOnly&&d.length>0||e.key===b&&!l)).map(e=>(0,f.jsx)(s.MenuItem,{icon:e?.icon,iconPosition:"left",onClick:()=>{a(e.aiSuggestion,{...e.options??{}})},disabled:n,children:(0,f.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:e.name})},`key-${e.key}`)),(0,f.jsx)(g.hN,{onChange:e=>{a(r.eJ,{tone:e})},disabled:n}),(0,f.jsx)(m.HU,{onChange:e=>{a(r.Gm,{language:e})},disabled:n})]})]})}},32249(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(3924),s=n(56427),o=n(27723),i=n(79654),a=(n(49663),n(10790));const __=o.__;const l=function(){const e=(0,r.A)("jetpack-ai-feedback");return(0,a.jsx)("div",{className:"jetpack-ai-feedback-control",children:(0,a.jsxs)(s.BaseControl,{children:[(0,a.jsx)(s.BaseControl.VisualLabel,{children:__("Feedback","jetpack")}),(0,a.jsx)("p",{children:__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")}),(0,a.jsx)(i.N,{openInNewTab:!0,href:e,children:__("Share your feedback","jetpack")})]})})}},2162(e,t,n){"use strict";n.d(t,{Ay:()=>g,HU:()=>f});var r=n(96865),s=n(85985),o=n(56427),i=n(27723),a=n(13109),l=n(48329),c=n(41490),u=(n(97850),n(10790));const __=i.__,d=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],p=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,h=p?.split("-")[0]||"en",m=(p?.split("-"),({value:e,onChange:t})=>{const n=[...d.filter(e=>e!==h)];return d.includes(h)&&n.unshift(h),(0,u.jsx)(o.MenuGroup,{label:__("Select language","jetpack"),children:n.map(n=>(0,u.jsx)(o.MenuItem,{onClick:()=>t(n+" ("+r.so[n].label+")"),isSelected:e===n,children:r.so[n].label},`key-${n}`))})});function g({value:e=h,label:t=r.u0,onChange:n,disabled:i=!1}){const{tracks:l}=(0,s.st)();return i?(0,u.jsx)(o.Tooltip,{text:t,children:(0,u.jsx)(o.Button,{disabled:!0,children:(0,u.jsx)(a.A,{icon:c.A})})}):(0,u.jsx)(o.ToolbarDropdownMenu,{icon:c.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})},children:()=>(0,u.jsx)(m,{value:e,onChange:n})})}function f({value:e=h,label:t=r.u0,onChange:n,disabled:s=!1}){return(0,u.jsx)(o.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.A,label:t,toggleProps:{children:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"ai-assistant__i18n-dropdown__toggle-label",children:t}),(0,u.jsx)(a.A,{icon:l.A})]}),disabled:s},children:({onClose:t})=>(0,u.jsx)(m,{onChange:(...e)=>{n(...e),t()},value:e})})}},99050(e,t,n){"use strict";n.d(t,{Ay:()=>u});var r=n(96865),s=n(85985),o=n(56427),i=n(27723),a=n(33196),l=n(10790);const __=i.__,c=[{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:r.UA},{name:__("Make longer","jetpack"),key:"make-longer",aiSuggestion:r.br},{name:__("Make shorter","jetpack"),key:"make-shorter",aiSuggestion:r.fD}];function u({key:e,label:t=__("Improve","jetpack"),exclude:n=[],onChange:r,disabled:i=!1}){const{tracks:u}=(0,s.st)();return i?(0,l.jsx)(o.Tooltip,{text:t,children:(0,l.jsx)(o.Button,{disabled:!0,children:(0,l.jsx)(o.Icon,{icon:a.A})})}):(0,l.jsx)(o.ToolbarDropdownMenu,{icon:a.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&u.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})},children:()=>{const s=c.filter(e=>!n.includes(e.key));return(0,l.jsx)(o.MenuGroup,{label:t,children:s.map(t=>(0,l.jsx)(o.MenuItem,{onClick:()=>r(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key,children:t.name},`key-${t.key}`))})}})}},33468(e,t,n){"use strict";n.d(t,{Ay:()=>b});var r=n(96865),s=n(85985),o=n(56427),i=n(27723),a=n(33196),l=n(73493),c=n(93761),u=n(90437),d=n(80224),p=n(55507),h=n(48499),m=n(10790);const __=i.__,g=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about","jetpack")+" "}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining","jetpack")+" "}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on","jetpack")+" "}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on","jetpack")+" "}}],f=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that","jetpack")+" "}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about","jetpack")+" "}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about","jetpack")+" "}}];function b({hasContentBefore:e,hasContent:t,hasPostTitle:n,contentIsLoaded:i,onPromptSelect:b,onSuggestionSelect:v}){const y=__("Write with AI…","jetpack"),k=(0,h.C)("ai-correct-spelling"),{tracks:x}=(0,s.st)();return(0,m.jsx)(o.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:y,text:y,onToggle:e=>{e&&x.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})},children:({onClose:s})=>i?(0,m.jsx)(o.MenuGroup,{label:__("Write…","jetpack"),children:f.map((e,t)=>(0,m.jsx)(o.MenuItem,{icon:a.A,iconPosition:"left",onClick:()=>{s(),b(e.description)},children:e.label},`key-${t}`))}):(0,m.jsxs)(m.Fragment,{children:[e&&(0,m.jsxs)(o.MenuGroup,{label:__("Based on preceding content…","jetpack"),children:[(0,m.jsx)(o.MenuItem,{icon:l.A,iconPosition:"left",onClick:()=>v(r.sn),children:r.DT}),k&&(0,m.jsx)(o.MenuItem,{icon:d.A,iconPosition:"left",onClick:()=>v(r.yy),children:r.DD}),(0,m.jsx)(o.MenuItem,{icon:u.A,iconPosition:"left",onClick:()=>v(r.A4),children:r.HM})]}),t&&(0,m.jsxs)(o.MenuGroup,{label:__("Based on entire content…","jetpack"),children:[t&&(0,m.jsx)(o.MenuItem,{icon:c.A,iconPosition:"left",onClick:()=>v(r.UA),children:r.JR}),t&&(0,m.jsx)(o.MenuItem,{icon:p.A,iconPosition:"left",onClick:()=>v(r.vE),children:r.mT})]}),(0,m.jsxs)(o.MenuGroup,{label:__("Write…","jetpack"),children:[n&&(0,m.jsx)(o.MenuItem,{icon:a.A,iconPosition:"left",onClick:()=>v(r.im),children:r.Rq}),g.map((e,t)=>(0,m.jsx)(o.MenuItem,{icon:a.A,iconPosition:"left",onClick:()=>{s(),b(e.description)},children:e.label},`key-${t}`))]})]})})}},62402(e,t,n){"use strict";n.d(t,{Ay:()=>h,US:()=>u,hN:()=>p});var r=n(96865),s=n(85985),o=n(56427),i=n(27723),a=n(48329),l=(n(78518),n(10790));const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d=({value:e,onChange:t})=>(0,l.jsx)(o.MenuGroup,{label:__("Select tone","jetpack"),children:c.map(n=>(0,l.jsx)(o.MenuItem,{onClick:()=>t(n),isSelected:e===n,children:`${r.oZ[n].emoji} ${r.oZ[n].label}`},`key-${n}`))});function p({label:e=r.uQ,value:t=u,onChange:n,disabled:s=!1}){return(0,l.jsx)(o.DropdownMenu,{icon:r.Qr,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"ai-assistant__tone-dropdown__toggle-label",children:e}),(0,l.jsx)(o.Icon,{icon:a.A})]}),disabled:s},children:({onClose:e})=>(0,l.jsx)(d,{value:t,onChange:t=>{n(t),e()}})})}function h({value:e=u,onChange:t,disabled:n=!1}){const{tracks:i}=(0,s.st)();return n?(0,l.jsx)(o.Tooltip,{text:r.uQ,children:(0,l.jsx)(o.Button,{disabled:!0,children:(0,l.jsx)(o.Icon,{icon:r.Qr})})}):(0,l.jsx)(o.ToolbarDropdownMenu,{icon:r.Qr,label:r.uQ,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&i.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})},children:()=>(0,l.jsx)(d,{value:e,onChange:t})})}},51698(e,t,n){"use strict";n.d(t,{A:()=>m});var r=n(96865),s=n(94715),o=n(56427),i=n(27723),a=n(88901),l=n(60484),c=n(2162),u=n(99050),d=n(33468),p=n(62402),h=n(10790);const __=i.__,m=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:i,handleTryAgain:m,showRetry:g,contentBefore:f,hasPostTitle:b,wholeContent:v,setUserPrompt:y,recordEvent:k,isGeneratingTitle:x})=>(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(s.BlockControls,{children:[!g&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(o.ToolbarGroup,{children:(0,h.jsx)(d.Ay,{hasContentBefore:!!f?.length,hasContent:!!v?.length,hasPostTitle:b,contentIsLoaded:e,onPromptSelect:e=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})}),(0,h.jsxs)(s.BlockControls,{group:"block",children:[(0,h.jsx)(p.Ay,{value:"neutral",onChange:n=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:r.eJ}),t(r.eJ,{tone:n,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,h.jsx)(c.Ay,{value:"en",onChange:n=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:r.Gm}),t(r.Gm,{language:n,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,h.jsx)(u.Ay,{onChange:t,exclude:x?["summarize"]:[],disabled:!e})]})]}),(g||m)&&(0,h.jsxs)(o.ToolbarGroup,{children:[!g&&e&&m&&(0,h.jsx)(o.ToolbarButton,{onClick:m,children:__("Try Again","jetpack")}),g&&e&&(0,h.jsx)(o.ToolbarButton,{icon:a.A,onClick:i,children:__("Accept","jetpack")}),g&&(0,h.jsx)(o.ToolbarButton,{icon:l.A,onClick:n,children:__("Retry","jetpack")})]})]})})},3586(e,t,n){"use strict";n.d(t,{A:()=>j});var r=n(96865),s=n(85985),o=n(94715),i=n(74997),a=n(56427),l=n(29491),c=n(47143),u=n(86087),d=n(27723),p=n(79654),h=n(13022),m=n(27970),g=n(56199),f=n(2274),b=n(32249),v=n(51698),y=n(4393),k=n(44732),x=n(76695),_=(n(84368),n(10790));const __=d.__,w="post"===window?.Jetpack_Editor_Initial_State?.screenBase;function j({attributes:e,setAttributes:t,clientId:n,isSelected:d}){const[j,C]=(0,u.useState)(null),{tracks:A}=(0,s.st)(),{getBlock:S}=(0,c.useSelect)("core/block-editor"),E=(0,u.useRef)(null),T=(0,u.useRef)(null),{replaceBlocks:N,removeBlock:P}=(0,c.useDispatch)("core/block-editor"),{editPost:B}=(0,c.useDispatch)("core/editor"),[R,I]=(0,u.useState)((0,r.MB)(e.preTransformAction)),{isOverLimit:D,requireUpgrade:L,increaseRequestsCount:F,requestsCount:M,requestsLimit:O,currentTier:U,loading:z,tierPlansEnabled:$}=(0,r.yM)(),q=Math.max(O-M,0),{autosaveAndRedirect:H}=(0,r.ON)(),V=(0,s.Bd)(U),G=()=>{setTimeout(()=>{E.current?.focus?.()},100)},W=()=>{setTimeout(()=>{T.current?.focus?.()},100)},Z=(0,l.useViewportMatch)("medium","<"),J=(0,u.useRef)(null),{getSuggestionFromOpenAI:K,stopSuggestion:Y,showRetry:Q,contentBefore:X,postTitle:ee,retryRequest:te,wholeContent:ne,requestingState:re,error:se}=(0,y.A)({onSuggestionDone:(0,u.useCallback)(()=>{G(),F()},[F]),onUnclearPrompt:(0,u.useCallback)(()=>{W(),F()},[F]),onModeration:G,attributes:e,clientId:n,content:e.content,tracks:A,userPrompt:e.userPrompt,requireUpgrade:L,initialRequestingState:e.requestingState,contentRef:J,blockRef:T}),oe="requesting"===re,ie=["requesting","suggesting"].includes(re),ae=(0,s.xI)(),{productPageUrl:le}=(0,k.A)(),ce=(0,x.y)(n);(0,u.useEffect)(()=>{if(!ce)return;const e=JSON.parse(localStorage.getItem(ce));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(ce),K(t,n)},[ce,K]),(0,u.useEffect)(()=>{se&&C(!1)},[se]),(0,u.useEffect)(()=>{["init","done"].includes(re)&&t({requestingState:re})},[re,t]);const ue=!!e.content,de=e.promptType===r.vE,pe=__("Accept","jetpack"),he=__("Accept title","jetpack"),me=de?he:pe,ge=async()=>{let t=(0,r._E)({content:e.content||""});if(t?.split("\n").length>1&&t?.split("\n")?.[0]?.match(/^<h1>.*<\/h1>$/)&&!ee){const e=t.split("\n"),n=e.shift();t=e.join("\n"),B({title:n.replace(/<[^>]*>/g,"")})}const s=(0,i.rawHandler)({HTML:t});await N(n,s);const o=(e=>{let t=null;return e.forEach(e=>{const n=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!n)return;"true"===n.contentEditable&&(t=n);const r=n.querySelectorAll("[contenteditable=true]");t=r.length?r[r.length-1]:t}),t})(s);o&&(e=>{const t=e.ownerDocument.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(o)},fe=()=>{ge(),A.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},be=()=>{w?(B({title:e.content?e.content.trim():""}),P(n),A.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):fe()},ve=()=>{Y(),G(),A.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},ye=(0,o.useBlockProps)({ref:T,className:(0,h.A)({"is-waiting-response":oe})}),ke=__("Ask Jetpack AI…","jetpack"),xe=__("Write about… Make a table for…","jetpack"),_e=(0,_.jsxs)(_.Fragment,{children:[D&&d&&(0,_.jsx)(r.Hb,{placement:"ai-assistant-block"}),!ae&&(0,_.jsx)(f.A,{block:"AI Assistant"})]}),we=(0,_.jsx)(_.Fragment,{children:se?.message&&!j&&"error_quota_exceeded"!==se?.code&&(0,_.jsx)(a.Notice,{status:se.status,isDismissible:!1,className:"jetpack-ai-assistant__error",children:se.message})}),je=D&&V===s.Ti?(0,_.jsx)(r.QA,{variant:"muted"}):null,Ce=(0,u.useCallback)(e=>{e.preventDefault(),A.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:U?.slug,requests_count:M,placement:"jetpack_ai_assistant_block"}),H(e)},[A,U,M,H]);return(0,_.jsx)(a.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(re)&&ve()}},children:(0,_.jsxs)("div",{...ye,children:[ue&&(0,_.jsx)("div",{ref:J,className:"jetpack-ai-assistant__content",children:(0,_.jsx)(u.RawHTML,{children:(0,r._E)({content:e.content||""})})}),(0,_.jsxs)(o.InspectorControls,{children:[je&&(0,_.jsxs)("div",{className:"block-editor-block-card",style:{paddingTop:0},children:[(0,_.jsx)("span",{className:"block-editor-block-icon"}),je]}),(0,_.jsxs)("div",{className:"block-editor-block-card",style:{paddingTop:0},children:[(0,_.jsx)("span",{className:"block-editor-block-icon"}),(0,_.jsx)(p.N,{openInNewTab:!0,href:le,children:__("Discover all features","jetpack")})]}),(V===s._X||$&&V!==s.Ti)&&(0,_.jsx)(a.PanelBody,{initialOpen:!0,children:(0,_.jsx)(a.PanelRow,{children:(0,_.jsx)(m.A,{placement:g.k})})}),(0,_.jsx)(a.PanelBody,{initialOpen:!0,children:(0,_.jsx)(a.PanelRow,{children:(0,_.jsx)(b.A,{})})})]}),!ie&&ae&&!L&&(0,_.jsx)(v.A,{isWaitingState:ie,contentIsLoaded:ue,getSuggestionFromOpenAI:(e,t)=>{const n=(0,r.MB)(e,t);I(n),K(e,t)},retryRequest:te,handleAcceptContent:fe,handleAcceptTitle:be,handleTryAgain:null,showRetry:Q,contentBefore:X,hasPostTitle:!!ee?.length,wholeContent:ne,promptType:e.promptType,setUserPrompt:e=>{if(!E?.current)return;E.current.focus(),t({userPrompt:e})},recordEvent:A.recordEvent,isGeneratingTitle:de}),(0,_.jsx)(r.N0,{ref:E,disabled:L||!ae,value:e.userPrompt,placeholder:e?.content?ke:xe,onChange:e=>{C(!0),t({userPrompt:e})},onSend:()=>{I(e.userPrompt),((...e)=>{K(...e),W()})("userPrompt"),A.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:ve,onAccept:()=>{de?be():fe()},onDiscard:()=>{const r=e?.content===S(n).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),ge(),r?A.recordEvent("jetpack_ai_assistant_block_dismiss"):A.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:re,isTransparent:L||!ae,showButtonLabels:!Z,showAccept:"init"!==re&&ue&&!ie,acceptLabel:me,showGuideLine:ue,showRemove:e?.content?.length>0,banner:_e,error:we,customFooter:q%5!=0&&1!==M||z||V!==s._X?null:(0,_.jsx)(r.AK,{requestsRemaining:q,onUpgradeClick:Ce}),lastAction:R})]})})}},61351(e,t,n){"use strict";var r=n(94375),s=n(54681),o=n(3586),i=n(13802);n(84368),n(50797),n(78118);(0,r.M)(s,{edit:o.A,save:()=>null,transforms:i.Ay})},31124(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(96865),s=n(56427),o=n(27723),i=n(10790);const __=o.__;function a({label:e=__("AI Assistant","jetpack"),behavior:t,onAction:n,onDropdownToggle:o,renderContent:a,behaviorContext:l,disabled:c}){return(0,i.jsx)(s.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:o,onToggle:a})=>(0,i.jsx)(s.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:()=>{if("function"!=typeof t)switch(t){case"action":n?.();break;case"dropdown":a()}else t({context:l})},"aria-haspopup":"true","aria-expanded":o,label:e,icon:r.cj,disabled:c}),onToggle:o,renderContent:a})}},9731(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(96865),s=n(85985),o=n(56427),i=n(86087),a=n(27723),l=n(83147),c=n(28755),u=n(10067),d=n.n(u),p=n(31124),h=n(89872),m=(n(85808),n(10790));const __=a.__,g=d()("jetpack-ai:image-extension-toolbar-dropdown"),f=(0,i.forwardRef)(({onClose:e,onRequestAltText:t,onRequestCaption:n,loadingAltText:s,loadingCaption:a},u)=>{const{requireUpgrade:d}=(0,r.yM)(),p=(0,i.useCallback)(async r=>{try{r===h.X?await(t?.()):await(n?.()),e?.()}catch(e){g("Error generating %s",r,e)}},[t,n,e]);return(0,m.jsx)("div",{className:"jetpack-ai-assistant-image-toolbar-dropdown-wrapper",tabIndex:-1,ref:u,children:(0,m.jsxs)(o.MenuGroup,{children:[(0,m.jsx)(o.MenuItem,{icon:s?(0,m.jsx)(o.Spinner,{}):c.A,iconPosition:"left",onClick:()=>{p(h.X)},disabled:!!s||d,children:__("Generate alt text","jetpack")},"key-ai-assistant-alt-text"),(0,m.jsx)(o.MenuItem,{icon:a?(0,m.jsx)(o.Spinner,{}):l.A,iconPosition:"left",onClick:()=>{p(h.Q)},disabled:!!a||d,children:__("Generate caption","jetpack")},"key-ai-assistant-caption")]})})});function b({label:e=__("AI Assistant","jetpack"),onRequestAltText:t,onRequestCaption:n,loadingAltText:o=!1,loadingCaption:a=!1,disabled:l=!1,wrapperRef:c}){const{requireUpgrade:u}=(0,r.yM)(),{tracks:d}=(0,s.st)(),h=(0,i.useCallback)(e=>{e&&(d.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:"core/image"}),u&&(0,r.Fs)())},[u,d]),g=(0,i.useCallback)(()=>(d.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:"alt-text",block_type:"core/image"}),t?.()),[t,d]),b=(0,i.useCallback)(()=>(d.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:"caption",block_type:"core/image"}),n?.()),[n,d]);return(0,m.jsx)(p.A,{label:e,behavior:"dropdown",onDropdownToggle:h,disabled:l,renderContent:({onClose:e})=>(0,m.jsx)(f,{ref:c,onClose:e,onRequestAltText:g,onRequestCaption:b,loadingAltText:o,loadingCaption:a})})}},78118(e,t,n){"use strict";var r=n(96865),s=n(94715),o=n(29491),i=n(47143),a=n(43656),l=n(86087),c=n(52619),u=n(10067),d=n.n(u),p=n(16204),h=n(35317),m=n(48499),g=n(10821),f=n(4647),b=n(89872),v=n(9731),y=n(10790);const k=d()("jetpack-ai:image-extension"),x=(0,m.C)("ai-assistant-image-extension"),_={group:"block"};const w=(0,o.createHigherOrderComponent)(e=>{function t(t){const{increaseRequestsCount:n,dequeueAsyncRequest:o,requireUpgrade:c}=(0,r.yM)(),{getCurrentPostId:u,isImageBusy:d}=(0,i.useSelect)(e=>{const{getCurrentPostId:n}=e(a.store);return{getCurrentPostId:n,isImageBusy:e(p.M)?.isImageBusy(t.clientId)??!1}},[t.clientId]),{getPostContent:h}=(0,r.dh)(),[m,x]=(0,l.useState)(d),[w,j]=(0,l.useState)(!1),{updateBlockAttributes:C}=(0,i.useDispatch)(a.store),{createNotice:A}=(0,i.useDispatch)("core/notices"),S=(0,l.useRef)(null),E=!!t.attributes.url,T=m||w;(0,l.useEffect)(()=>{x(d)},[d]);const N=(e,t)=>{e===b.X?x(t):e===b.Q&&j(t)},P=(0,l.useCallback)(e=>{S.current&&(S.current.setAttribute("tabindex","0"),S.current.focus()),N(e,!0)},[]),B=(0,l.useCallback)(e=>{A("error",e,{isDismissible:!0})},[A]);(0,l.useEffect)(()=>{T||S.current&&S.current.setAttribute("tabindex","-1")},[T]);const R=(0,l.useCallback)(async(e,s=!1)=>{if(!c){P(e);try{const i={};e===b.X&&(0,r.in)(t.clientId),e===b.Q&&(i.positions=[t.clientId]),o();const a=await(0,r.R0)([{role:"jetpack-ai",context:{type:e,content:h(f.P),...i,images:[{url:s?await(0,r.Zo)(t.attributes.url):t.attributes.url}]}}],{postId:u(),feature:"jetpack-ai-image-extension"});n();const l=JSON.parse(a?.replace?.(/^```json\s*/,"")?.replace(/```$/,""));if(e===b.X){const e=l.texts?.[0];C(t.clientId,{alt:e})}else if(e===b.Q){const e=l.captions?.[0];C(t.clientId,{caption:e})}N(e,!1)}catch(t){if(t?.message.includes("The image URL is invalid")&&!s)return k("Retrying with base64 image"),R(e,!0);k(`Error generating ${e}`,t),t?.message&&B(`Image ${e===b.X?"alt text":"caption"} generation failed: ${t.message}`),N(e,!1)}}},[o,u,h,n,t.attributes.url,t.clientId,c,B,P,C]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(e,{...t}),!g.TL&&(0,y.jsx)(s.BlockControls,{..._,children:(0,y.jsx)(v.A,{onRequestAltText:()=>R(b.X),onRequestCaption:()=>R(b.Q),loadingAltText:m,loadingCaption:w,disabled:!E,wrapperRef:S})})]})}return n=>(0,h.A)(n.name)?(0,y.jsx)(t,{...n}):(0,y.jsx)(e,{...n})},"blockEditWithAiComponents");(0,c.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-image-extension",function(e,t){var n;return(n=t,!!(0,g.Bi)()&&!!x&&"core/image"===n)?{...e,edit:w(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e},100)},10821(e,t,n){"use strict";n.d(t,{Bi:()=>c,TL:()=>l});var r=n(85985),s=n(74997),o=n(47143),i=n(48499);const a=(0,i.C)("ai-assistant-support"),l=(0,i.C)("ai-sidebar-toolbar-button");function c(){if(!(0,s.getBlockType)("jetpack/ai-assistant"))return!1;if(!a)return!1;if(!(0,r.xI)())return!1;return!((0,o.select)("core/edit-post")?.getHiddenBlockTypes?.()??[]).includes("jetpack/ai-assistant")}},4647(e,t,n){"use strict";n.d(t,{P:()=>s});var r=n(96865);const s=e=>{const t=(0,r._G)().filter(e=>"core/image"===e.name);let n=0;return e=(e=e.replace(/<figcaption[^>]*>.*?<\/figcaption>/g,"")).replace(/<!-- wp:image[^>]*>.*?<img[^>]*>.*?<!-- \/wp:image -->/gs,()=>{const e=t[n];return n++,e?`<img src="${e.clientId}">`:""})}},52998(e,t,n){"use strict";n.d(t,{mt:()=>i});var r=n(96865),s=n(74997),o=n(47143);class i{clientId;renderRules=[];firstUpdate=!0;behavior="dropdown";isChildBlock=!1;feature="ai-assistant";adjustPosition=!0;startOpen=!1;hideOnBlockFocus=!0;supports={};constructor(e,t=[]){this.clientId=e,this.renderRules=t}getBlock(){const{getBlock:e}=(0,o.select)("core/block-editor");return e(this.clientId)}getContent(){const e=this.getBlock();return t=(0,s.getBlockContent)(e),(0,r.rh)({content:t});var t}renderContent(e){return function(e,t=[]){return(0,r._E)({content:e,rules:t,extension:!0})}(e,this.renderRules)}onSuggestion(e){if(!e)return;const t=this.renderContent(e);this.replaceBlockContent(t)}onDone(e){this.firstUpdate=!0}replaceBlockContent(e){const[t]=(0,s.rawHandler)({HTML:e});if(!t)return;const{updateBlockAttributes:n,replaceInnerBlocks:r,__unstableMarkNextChangeAsNotPersistent:i}=(0,o.dispatch)("core/block-editor");this.firstUpdate?this.firstUpdate=!1:i(),n(this.clientId,t.attributes),i(),r(this.clientId,t.innerBlocks)}getExtensionInputPlaceholder(){return null}}},96306(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(96865),s=n(85985),o=n(86087),i=n(27723),a=n(13022),l=(n(49882),n(10790));const __=i.__,c=(0,a.A)("jetpack-ai-assistant-extension-ai-input","wp-block");function u({customPlaceholder:e,className:t,requestingState:n,requestingError:i,inputRef:u,wrapperRef:d,action:p,blockType:h,feature:m,request:g,stopSuggestion:f,close:b,undo:v,tryAgain:y,lastAction:k}){const x=e||__("Ask Jetpack AI to edit…","jetpack"),[_,w]=(0,o.useState)(""),[j,C]=(0,o.useState)(x),{checkoutUrl:A}=(0,r.ON)(),{tracks:S}=(0,s.st)(),[E,T]=(0,o.useState)(0),[N,P]=(0,o.useState)(!1),{requireUpgrade:B,requestsCount:R,requestsLimit:I,loading:D,nextTier:L,currentTier:F}=(0,r.yM)(),M=(0,o.useMemo)(()=>B||["requesting","suggesting"].includes(n),[B,n]),O=(0,o.useMemo)(()=>B&&1===F?.value,[B,F]),U=(0,o.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_extension_generate",{block_type:h,feature:m}),g?.(_)},[h,m,g,S,_]),z=(0,o.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_extension_stop",{block_type:h}),C(x),f?.()},[h,x,f,S]);const $=(0,o.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_undo",{block_type:h,prompt:k||null}),v?.()},[h,k,S,v]),q=(0,o.useCallback)(()=>{S.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:F?.slug,requests_count:R,placement:"jetpack_ai_assistant_extension"})},[F?.slug,R,S]),H=(0,o.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_try_again",{block_type:h}),y?.()},[h,S,y]);return(0,o.useEffect)(()=>{["init","done"].includes(n)&&w("")},[n]),(0,o.useEffect)(()=>{C(p||x),p&&w("")},[p,x]),(0,o.useEffect)(()=>{P(!D&&!!L&&0===_.length)},[D,L,_]),(0,o.useEffect)(()=>{const e=Math.max(I-R,0);T(e)},[I,R]),(0,l.jsx)(r.FC,{className:(0,a.A)(c,t),placeholder:j,disabled:M,value:_,state:n,showGuideLine:!0,error:i,requestsRemaining:E,showUpgradeMessage:N,showFairUsageMessage:O,upgradeUrl:A,onChange:w,onSend:U,onStop:z,onClose:function(){b?.()},onUndo:$,onUpgrade:q,onTryAgain:H,wrapperRef:d,ref:u,lastAction:k,blockType:h})}},37931(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(85985),s=n(86087),o=n(27723),i=n(52068),a=n(76695),l=n(31124),c=n(21785),u=n(10790);const __=o.__;function d({blockType:e,onClose:t,onAskAiAssistant:n,onRequestSuggestion:r}){const{canTransformToAIAssistant:o,transformToAIAssistant:l,getSelectedBlockClientIds:c}=(0,a.A)(),d=(0,s.useCallback)(s=>{const i=c(),[a]=i,u=s?.options?.alwaysTransformToAIAssistant||!1;!(i.length<2)&&o({clientId:a,blockName:e})||u?l({request:s}):(s?r?.(s.promptType,s.options):n?.(),t?.())},[e,o,c,n,t,r,l]),[p]=c();return(0,u.jsx)(i.Ay,{blockType:e,clientId:p,onRequestSuggestion:(e,t)=>{d({promptType:e,options:t})},onAskAiAssistant:async()=>{d()},disabled:!1})}function p({behavior:e,blockType:t,label:n=__("AI Assistant","jetpack"),onAskAiAssistant:o,onRequestSuggestion:i}){const{tracks:a}=(0,r.st)(),p=(0,s.useContext)(c.B),h=(0,s.useCallback)(e=>{e&&a.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:t})},[t,a]),m=(0,s.useCallback)(()=>{a.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_prompt_show",{block_type:t}),o?.()},[t,o,a]),g=(0,s.useCallback)((e,n)=>{a.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:t}),i?.(e,n)},[t,i,a]);return(0,u.jsx)(l.A,{label:n,behavior:e,onAction:m,onDropdownToggle:h,renderContent:({onClose:e})=>(0,u.jsx)(d,{blockType:t,onClose:e,onAskAiAssistant:m,onRequestSuggestion:g}),behaviorContext:p})}},27571(e,t,n){"use strict";n.d(t,{L:()=>s,l:()=>r});const r=["jetpack/field-name","jetpack/field-number","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-time","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"],s=["core/heading","core/paragraph","core/list-item","core/list","jetpack/contact-form",...r]},21785(e,t,n){"use strict";n.d(t,{B:()=>g,Q:()=>f});var r=n(86087),s=n(10067),o=n.n(s),i=n(52998),a=n(27571),l=n(50161),c=n(22352),u=n(53269),d=n(94987),p=n(125);const h=o()("jetpack-ai-assistant:extensions:get-block-handler"),m={"core/heading":l.T,"core/paragraph":p.d,"core/list-item":d.g,"core/list":u.b,"jetpack/contact-form":c.p,...a.l.reduce((e,t)=>({...e,[t]:c.g}),{})},g=(0,r.createContext)({});function f(e,t){let n=m[e];n||(h(`No handler found for block type: ${e}. Using default handler.`),n=i.mt);const r=new n(t);return{onSuggestion:r.onSuggestion.bind(r),onDone:r.onDone.bind(r),getContent:r.getContent.bind(r),getExtensionInputPlaceholder:r.getExtensionInputPlaceholder.bind(r),behavior:r.behavior,isChildBlock:r.isChildBlock,feature:r.feature,adjustPosition:r.adjustPosition,startOpen:r.startOpen,hideOnBlockFocus:r.hideOnBlockFocus,supports:r.supports}}},50161(e,t,n){"use strict";n.d(t,{T:()=>s});var r=n(52998);class s extends r.mt{constructor(e){super(e,[])}onSuggestion(e){const t=this.getBlock();if(e.startsWith("#")||(e=`${"#".repeat(t?.attributes?.level||1)} ${e}`),e.match(/^#*\s*$/))return;const n=this.renderContent(e);this.replaceBlockContent(n)}}},8663(e,t,n){"use strict";n.d(t,{g:()=>o});var r=n(47143),s=n(52998);class o extends s.mt{jetpackFormBlockName="jetpack/contact-form";constructor(e){super(e,[]),this.behavior=this.handleBehavior,this.isChildBlock=!0,this.hideOnBlockFocus=!1}handleBehavior=({context:e})=>{const t=(0,r.dispatch)("core/block-editor"),{getBlockParentsByBlockName:n}=(0,r.select)("core/block-editor"),s=n(this.clientId,this.jetpackFormBlockName)?.[0];t.selectBlock(s),e?.[this.jetpackFormBlockName]?.handleAskAiAssistant?.()}}},22352(e,t,n){"use strict";n.d(t,{g:()=>c.g,p:()=>u});var r=n(74997),s=n(47143),o=n(27723),i=n(62514),a=n(96568),l=n(52998),c=n(8663);const __=o.__;class u extends l.mt{currentListOfValidBlocks=[];originalVariationName=null;constructor(e){super(e,[]),this.behavior="action",this.feature="jetpack-form-ai-extension",this.startOpen=!0,this.hideOnBlockFocus=!1,this.adjustPosition=!1,this.supports={file_upload_field:1}}setContent(e,t=!1){const{replaceInnerBlocks:n,updateBlockAttributes:o}=(0,s.dispatch)("core/block-editor"),l=(0,r.parse)(e).find(e=>"jetpack/contact-form"===e.name);l&&l.attributes?.variationName&&(this.originalVariationName=l.attributes.variationName);const c=e.replace(/<!-- (\/)*wp:jetpack\/(contact-)*form ({[^}]*} )*(\/)*-->/g,""),u=(0,a.d)(c),d=(0,r.parse)(u).filter(e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name));let p=!1;if(d.length<this.currentListOfValidBlocks.length)d.push(this.currentListOfValidBlocks[this.currentListOfValidBlocks.length-1]);else if(d.length===this.currentListOfValidBlocks.length&&d.length>0){const e=d[d.length-1],t=this.currentListOfValidBlocks[d.length-1];p=!(0,i.w)(e,t)}if(d.length>0&&(d.length!==this.currentListOfValidBlocks.length||p)&&(n(this.clientId,d),this.currentListOfValidBlocks=d),t){if(this.originalVariationName){const e=this.getBlock();e&&e.attributes.variationName!==this.originalVariationName&&o(this.clientId,{variationName:this.originalVariationName})}const e=e=>"jetpack/button"===e.name||"core/button"===e.name&&"button"===e.attributes?.tagName,t=d.filter(e),s=d.some(e=>"jetpack/form-step-navigation"===e.name);if(this.currentListOfValidBlocks=this.currentListOfValidBlocks||[],t.length>1){let r=0;this.currentListOfValidBlocks=this.currentListOfValidBlocks.filter(n=>!e(n)||(r++,r===t.length)),n(this.clientId,this.currentListOfValidBlocks)}else 0!==t.length||s||n(this.clientId,[...this.currentListOfValidBlocks,(0,r.createBlock)("core/button",{tagName:"button",type:"submit",text:__("Submit","jetpack"),lock:{remove:!0}})]);this.currentListOfValidBlocks=[]}}getExtensionInputPlaceholder(){if(!this.getContent()){const e=[__("Example: a contact form with name, email, and message fields","jetpack"),__("Example: a pizza ordering form with name, address, phone number and toppings","jetpack"),__("Example: a survey form with multiple choice questions","jetpack")];return e[Math.floor(Math.random()*e.length)]}const e=[__("Example: remove email field","jetpack"),__("Example: make email optional","jetpack"),__("Example: add message field and make it required","jetpack")];return e[Math.floor(Math.random()*e.length)]}getContent(){const e=this.getBlock();if(!e)return"";const{innerBlocks:t}=e;return t?.length?t.reduce((e,t)=>e+(0,r.serialize)(t)+"\n\n",""):""}onSuggestion(e){this.setContent(e)}onDone(e){this.setContent(e,!0)}}},71295(e,t,n){"use strict";n.d(t,{j:()=>o});var r=n(10821),s=n(27571);function o(e){return!!(0,r.Bi)()&&!!s.L.includes(e)}},94987(e,t,n){"use strict";n.d(t,{g:()=>s});var r=n(52998);class s extends r.mt{constructor(e){super(e,["listItem"]),this.isChildBlock=!0}}},53269(e,t,n){"use strict";n.d(t,{b:()=>s});var r=n(52998);class s extends r.mt{constructor(e){super(e,["list"])}}},125(e,t,n){"use strict";n.d(t,{d:()=>a});var r=n(96865),s=n(74997),o=n(52998);const i=new r.OO({fixes:["paragraph"]});class a extends o.mt{constructor(e){super(e,["paragraph"])}getContent(){const e=this.getBlock();return t=(0,s.getBlockContent)(e),i.render({content:t});var t}}},50797(e,t,n){"use strict";var r=n(96865),s=n(85985),o=n(94715),i=n(29491),a=n(47143),l=n(86087),c=n(52619),u=n(13022),d=n(10067),p=n.n(d),h=n(32735),m=n(35317),g=n(4e4),f=n(10821),b=n(96306),v=n(37931),y=n(21785),k=n(71295),x=n(10790);const _=p()("jetpack-ai-assistant:extensions:with-ai-extension"),w={"core/heading":"heading","core/paragraph":"paragraph","core/list-item":"list-item","core/list":"list","jetpack/contact-form":"form-ai"},j={group:"block"},C=(0,i.createHigherOrderComponent)(e=>{function t(t){const{clientId:n,isSelected:i,name:d,isSelectionEnabled:p}=t,m=(0,l.useRef)(null),k=(0,l.useRef)(0),C=(0,l.useRef)(null),A=(0,l.useRef)(""),S=(0,l.useRef)(null),E=(0,l.useRef)(document),T=(0,l.useRef)([]),[N,P]=(0,l.useState)(""),[B,R]=(0,l.useState)(null),I=(0,l.useRef)(null),D=(0,l.useRef)(null),L=(0,l.useRef)(null),F=(0,l.useRef)(null),{undo:M}=(0,a.useDispatch)("core/editor"),{postId:O}=(0,a.useSelect)(e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}},[]),{id:U,className:z}=(0,o.useBlockProps)({className:(0,u.A)({[d?.replace?.("/","-")]:!0})}),{increaseRequestsCount:$,dequeueAsyncRequest:q,requireUpgrade:H}=(0,r.yM)(),{snapToBottom:V,enableAutoScroll:G,disableAutoScroll:W}=(0,h.A)({current:E?.current?.getElementById(U)},void 0,!0),Z=(0,l.useCallback)(()=>{S.current?.focus()},[]),{tracks:J}=(0,s.st)(),{onSuggestion:K,onDone:Y,getContent:Q,getExtensionInputPlaceholder:X,behavior:ee,isChildBlock:te,feature:ne,adjustPosition:re,startOpen:se,hideOnBlockFocus:oe,supports:ie}=(0,l.useMemo)(()=>(0,y.Q)(d,n),[d,n]),ae=X(),[le,ce]=(0,l.useState)(se),ue=(0,l.useCallback)(()=>{ce(e=>!e)},[]),de=(0,l.useCallback)(({promptType:e,options:t})=>{const n=Q(),r=w[d];return[...T.current,{role:"jetpack-ai",context:{type:(0,g.p$)(e,r),content:n,request:t?.userPrompt,tone:t?.tone,language:t?.language,is_follow_up:T.current.length>0,supports:ie}}]},[d,Q,ie]),pe=(0,l.useCallback)(e=>{const t=e||E.current.getElementById(U);t&&m.current&&t.style.setProperty("padding-bottom",`calc(${k.current+16}px + ${A.current||"0px"} )`,"important")},[U]),he=(0,l.useCallback)(e=>{K(e),re&&pe(),V()},[K,re,V,pe]),me=(0,l.useCallback)((e,t)=>{if(W(),Y(e),$(),P(""),J.recordEvent("jetpack_ai_assistant_toolbar_extension_generate",{prompt_type:I.current,model:t,generation_time:null!==F.current?window?.performance?.now?.()-F.current:null}),D.current?.message){const e={role:"assistant",content:Q()};if(T.current.push(D.current.message,e),T.current.length>20){T.current.splice(0,T.current.length-20);const e=T.current.findIndex(e=>"jetpack-ai"===e.role);-1!==e&&(T.current=T.current.slice(e),T.current[0].context={...T.current[0].context,is_follow_up:!1})}}D.current=null,setTimeout(()=>{re&&pe(),Z()},100),(0,c.doAction)("jetpack_ai_assistant_generation_complete",n,d)},[W,Y,$,Q,re,Z,pe,J,I,n,d]),ge=(0,l.useCallback)(e=>{W(),P(""),_("Request error",e),e.code!==r.mA&&e.code!==r.Or&&$()},[W,$]),{request:fe,stopSuggestion:be,requestingState:ve,model:ye,error:ke,reset:xe}=(0,r.o2)({onSuggestion:he,onDone:me,onError:ge,askQuestionOptions:{postId:O,feature:ne}});(0,l.useEffect)(()=>{L.current=ve},[ve]);const _e=(0,l.useCallback)((e,t)=>{if(ce(!0),H)return;I.current=e;const n=(0,r.MB)(e,t);n&&(P(n),R(n));const s=de({promptType:e,options:t});_("Request suggestion",e,t);const o=s[s.length-1];D.current={promptType:e,options:t,humanText:n,message:o},q(),G(),F.current=window?.performance?.now?.()||null,fe(s)},[q,G,de,fe,H]),we=(0,l.useCallback)(e=>{const t={userPrompt:e};R(e),G(),_e("userPrompt",t)},[G,_e]),je=(0,l.useCallback)(()=>{W(),be(),Z()},[W,be,Z]),Ce=(0,l.useCallback)(()=>{D.current&&_e(D.current.promptType,D.current.options)},[D,_e]),Ae=(0,l.useCallback)(()=>{ce(!1),xe(),P(""),D.current=null,T.current=[]},[xe]),Se=(0,l.useCallback)(async()=>{J.recordEvent("jetpack_ai_assistant_toolbar_extension_undo",{prompt_type:I.current,model:ye}),await M(),Ae()},[M,Ae,J,ye,I]);(0,l.useEffect)(()=>{i||Ae()},[i,Ae]),(0,l.useEffect)(()=>{S.current&&p&&(E.current=S.current.ownerDocument,Z())},[le,Z,p]),(0,l.useEffect)(()=>{let e=E.current.getElementById(U);if(e&&re)return le&&!C.current&&m.current?(A.current=e.style.paddingBottom,C.current=new ResizeObserver(([t])=>{if(e=E.current.getElementById(U),k.current=t.contentRect.height,e&&m.current&&k.current>0){pe(e);const{marginBottom:t}=getComputedStyle(e),n=parseFloat(t);m.current.style.setProperty("margin-top",`-${k.current+n}px`,"important"),m.current.style.setProperty("margin-bottom",`${n+16}px`,"important")}}),C.current.observe(m.current)):C.current&&(e.style.paddingBottom=A.current,C.current.disconnect(),C.current=null,k.current=0),()=>{C.current&&C.current.disconnect()}},[pe,re,n,C,U,le]),(0,l.useEffect)(()=>{if(oe&&le){const e=E.current.getElementById(U),t=()=>{["requesting","suggesting"].includes(L.current)||(ce(!1),e?.removeEventListener("focusin",t))};return e?.addEventListener("focusin",t),()=>{e?.removeEventListener("focusin",t)}}},[oe,le,U]);const Ee=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(e,{...t}),le&&(0,x.jsx)(b.A,{customPlaceholder:ae||null,className:z,requestingState:ve,requestingError:ke,wrapperRef:m,inputRef:S,action:N,blockType:d,feature:ne,request:we,stopSuggestion:je,close:Ae,undo:Se,tryAgain:Ce,lastAction:B}),!f.TL&&(0,x.jsx)(o.BlockControls,{...j,children:(0,x.jsx)(v.A,{blockType:d,onAskAiAssistant:ue,onRequestSuggestion:_e,behavior:ee})})]});if(te)return Ee;const Te={value:{[d]:{handleAskAiAssistant:ue,handleRequestSuggestion:_e}}};return(0,x.jsx)(y.B.Provider,{...Te,children:Ee})}return n=>{const r=(0,m.A)(n.name);return n.clientId&&n.attributes&&r?(0,x.jsx)(t,{...n}):(0,x.jsx)(e,{...n})}},"blockEditWithAiComponents");(0,c.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-text-extension",function(e,t){return(0,k.j)(t)?{...e,edit:C(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e},100)},89872(e,t,n){"use strict";n.d(t,{Q:()=>s,X:()=>r});const r="images-alt-text",s="images-caption"},4393(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(96865),s=n(47143),o=n(86087),i=n(10067),a=n.n(i),l=n(62402),c=n(64425),u=n(16597),d=n(32735);const p=a()("jetpack-ai-assistant:error"),h=({attributes:e,clientId:t,content:n,tracks:i,userPrompt:a,onSuggestionDone:h,onUnclearPrompt:m,onModeration:g,requireUpgrade:f,initialRequestingState:b,contentRef:v,blockRef:y})=>{const[k,x]=(0,o.useState)(!1),[_,w]=(0,o.useState)(""),{updateBlockAttributes:j}=(0,s.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAsyncRequest:C,setAiAssistantFeatureRequireUpgrade:A}=(0,s.useDispatch)("wordpress-com/plans"),{snapToBottom:S,enableAutoScroll:E,disableAutoScroll:T}=(0,d.A)(y,v),N=(0,s.useSelect)(e=>e("core/editor").getEditedPostAttribute("title")),P=(0,s.useSelect)(e=>e("core/editor").getCurrentPostId()),B=(0,o.useRef)([]),R=(0,o.useRef)(void 0),{request:I,stopSuggestion:D,handleErrorQuotaExceededError:L,requestingState:F,error:M}=(0,r.o2)({onSuggestion:e=>{j(t,{content:e?.replaceAll(c.uV,"")}),S()},onDone:e=>{const n=e.replaceAll(c.uV,""),r={role:"assistant",content:n};B.current.push(R.current,r),B.current.length>20&&B.current.splice(0,B.current.length-20),j(t,{content:n,messages:B.current}),S(),T(),h?.()},onStop:()=>{S(),T(),h?.()},onError:e=>{switch(e?.code){case r.cT:x(!1);break;case r.ud:x(!1),g?.();break;case r.mA:case r.AZ:x(!0);break;case r.Or:x(!1),A(!0);break;case r.L9:m?.()}},onAllErrors:e=>{p(e)},initialRequestingState:b,askQuestionOptions:{postId:P,feature:"ai-assistant",functions:{}}}),O=["requesting","suggesting"].includes(F),U=async(s,o={})=>{if(C(),f)return L(),void x(!1);if(o={retryRequest:!1,tone:l.US,...o},O)return;x(!1);let d=_;if(i.recordEvent("jetpack_ai_chat_completion",{post_id:P}),B.current=[...e.messages],R.current={},o.retryRequest)R.current=d[d.length-1];else{const i=e?.isLayoutBuldingModeEnable?(0,u.rJ)(t):(0,u.aB)();d=(0,c.jf)({generatedContent:n,allPostContent:i,postContentAbove:(0,u.b$)(t),currentPostTitle:N,options:o,userPrompt:o?.userPrompt||a,type:s,isGeneratingTitle:e.promptType===r.vE}),R.current=d.pop(),d=[...d,...B.current],d.push(R.current),w(d),e.promptType!==r.vE&&j(t,{promptType:s})}try{E(),await I(d)}catch(e){p(e),x(!0),T()}};return{setShowRetry:x,showRetry:k,postTitle:N,contentBefore:(0,u.b$)(t),wholeContent:(0,u.aB)(),requestingState:F,error:M,getSuggestionFromOpenAI:U,stopSuggestion:D,retryRequest:()=>U("",{retryRequest:!0})}}},44732(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(3924),s=n(97999),o=n(85985);function i(){const e=(0,o.Mm)()&&!(0,s.isSimpleSite)(),t=e?(0,s.getMyJetpackUrl)("#/jetpack-ai"):(0,r.A)("org-ai"),{autosaveAndRedirect:n,isRedirecting:i}=(0,o.ZR)(t);return{productPageUrl:t,autosaveAndRedirect:n,isRedirecting:i,isMyJetpackAvailable:e}}},75956(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(90372),s=n(86087);const o=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,i=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,a=()=>((0,s.useEffect)(()=>{o&&r.A.initialize(o?.userid,o?.username,i?{blog_id:i}:{})},[]),r.A)},32735(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087),s=n(10067);const o=n.n(s)()("jetpack-ai-assistant:use-auto-scroll"),i=(e,t,n=!1)=>{const s=(0,r.useRef)(null),i=(0,r.useRef)(null),a=(0,r.useRef)(!1),l=(0,r.useRef)(!1),c=(0,r.useRef)(!1),u=(0,r.useRef)(!1),d=(0,r.useRef)({scrollPadding:"",scrollMargin:""}),p=(0,r.useCallback)(()=>{o("enabling ignore scroll"),l.current=!0},[]),h=(0,r.useCallback)(()=>{a.current&&c.current&&!l.current&&p()},[p]),m=(0,r.useCallback)(()=>{a.current=!0,l.current=!1,c.current=!1,u.current=!1,s.current?.addEventListener("scroll",h),o("enabling auto scroll")},[h]),g=(0,r.useCallback)(()=>{a.current=!1,l.current=!1,c.current=!1,u.current=!1,s.current?.removeEventListener("scroll",h),i.current?.style&&(i.current.style.scrollPadding=d.current.scrollPadding,i.current.style.scrollMargin=d.current.scrollMargin),s.current=null,o("disabling auto scroll")},[h]),f=(0,r.useCallback)(()=>{if(!a.current||l.current)return;const r=n?e?.current:t?.current?.firstElementChild?.lastElementChild;r&&!u.current&&(c.current=!0,u.current=!0,s?.current?.removeEventListener?.("scroll",h),r?.scrollIntoView({block:"end",inline:"end"}),setTimeout(()=>{u.current=!1,s?.current?.addEventListener?.("scroll",h)},200))},[e,t,n,h]),b=(0,r.useCallback)(e=>{if(null==e)return null;if("BODY"===e?.nodeName)return e;if(e?.ownerDocument!==document)return e.ownerDocument;const{overflow:t}=window.getComputedStyle(e);return t.split(" ").every(e=>"auto"===e||"scroll"===e)?e:e?.parentElement?b(e?.parentElement):e},[]);return(0,r.useEffect)(()=>{const t=b(e?.current?.parentElement);!s.current&&t&&(s.current=t,i.current=t instanceof HTMLElement?t:t.documentElement,d.current={scrollPadding:i.current.style.scrollPadding,scrollMargin:i.current.style.scrollMargin},a.current&&(i.current.style.scrollPadding="80px",i.current.style.scrollMargin="10px"))},[e,b]),{snapToBottom:f,enableAutoScroll:m,disableAutoScroll:g}}},35317(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(85985);const s={"jetpack/contact-form":"contact-form"};function o(e){const t=s[e],{isModuleActive:n}=(0,r.q7)(t);return!t||n}},76695(e,t,n){"use strict";n.d(t,{A:()=>c,y:()=>l});var r=n(85985),s=n(47143),o=n(51609),i=n(16597),a=n(13802);function l(e){return`ai-assistant-block-${e}`}const c=()=>{const{replaceBlock:e,removeBlocks:t}=(0,s.useDispatch)("core/block-editor"),n=(0,s.useSelect)(e=>e("core/block-editor"),[]),{getSelectedBlockClientIds:c,getBlocksByClientId:u,getBlock:d,getBlockParents:p}=n,{tracks:h}=(0,r.st)();return{canTransformToAIAssistant:(0,o.useCallback)(({clientId:e,blockName:t})=>{if(!d(e))return!1;if(!a.y7.includes(t))return!1;const n=p(e);if(0===n.length)return!0;const r=d(n[n.length-1]);return!["core/list","core/list-item"].includes(r.name)},[d,p]),transformToAIAssistant:(0,o.useCallback)(({request:n}={})=>{const r=c(),s=u(r),o=(0,i.Sb)(s),[d]=s,[p,...m]=r,g={...d?.attributes||{},content:o,preTransformAction:n?.promptType},f=(0,a.rr)(d.name,g);if(n?.promptType){h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:n.promptType,block_type:d.name});const e={clientId:p,type:n.promptType,options:{...n.options,contentType:"generated",fromExtension:!0}};localStorage.setItem(l(f.clientId),JSON.stringify(e))}else h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:d.name});e(p,f),t(m)},[u,c,t,e,h]),getSelectedBlockClientIds:c}}},4e4(e,t,n){"use strict";n.d(t,{J1:()=>s,K6:()=>o,p$:()=>a});var r=n(96865);function s(e){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:a(e)}}}function o({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:s,options:o,type:a,userPrompt:l,isGeneratingTitle:c}){const u=[],d="generated"===o?.contentType;let p=null;switch(a){case r.im:p=s;break;case r.sn:case r.A4:case r.yy:p=n;break;case r.vE:p=t;break;case r.br:case r.fD:p=e;break;case r.eJ:case r.UA:case r.Gm:p=d?e:t;break;case r.d5:p=n;break;case r.pE:p=e||t}const h=function(e,t){return!e&&t&&t.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(a===r.pE?!!e?.length:d,p);return h&&u.push(h),u.push({role:"jetpack-ai",context:i({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:s,options:o,type:a,userPrompt:l,isGeneratingTitle:c})}),u}function i({options:e,type:t,userPrompt:n,isGeneratingTitle:s}){const o=function(e,t,n){return e?"title":!t||n?"content":null}(s,"generated"===e?.contentType,e?.fromExtension||!1);return{type:a(t),...o?{subject:o}:{},...t===r.eJ&&e?.tone?{tone:e.tone}:{},...t===r.Gm&&e?.language?{language:e.language}:{},...t===r.pE&&n?{request:n}:{}}}function a(e,t){const n={[r.im]:"ai-assistant-summary-by-title",[r.sn]:"ai-assistant-continue-writing",[r.A4]:"ai-assistant-simplify",[r.yy]:"ai-assistant-correct-spelling",[r.vE]:"ai-assistant-generate-title",[r.br]:"ai-assistant-make-longer",[r.fD]:"ai-assistant-make-shorter",[r.eJ]:"ai-assistant-change-tone",[r.UA]:"ai-assistant-summarize",[r.Gm]:"ai-assistant-change-language",[r.pE]:"ai-assistant-user-prompt",[r.d5]:"ai-assistant-transform-list-to-table"};return"form-ai"===t?"form-ai-extension":t?`${n[e]}-${t}-extension`:n[e]}},64425(e,t,n){"use strict";n.d(t,{jf:()=>o,uV:()=>s});n(96865);var r=n(4e4);const s="````";function o({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:s,options:o,type:i,userPrompt:a,isGeneratingTitle:l}){return[(0,r.J1)(i),...(0,r.K6)({generatedContent:e,allPostContent:t,postContentAbove:n,currentPostTitle:s,options:o,type:i,userPrompt:a,isGeneratingTitle:l})]}},16597(e,t,n){"use strict";n.d(t,{Sb:()=>l,aB:()=>a,b$:()=>i,rJ:()=>c});var r=n(96865),s=n(74997),o=n(47143);function i(e){if(!e)return"";const t=(0,o.select)("core/block-editor"),n=t.getBlockIndex(e),i=t.getBlocks().slice(0,n)??[];return i?.length?(0,r.rh)({content:(0,s.serialize)(i)}):""}function a(){const e=(0,o.select)("core/block-editor").getBlocks();return e?.length?(0,r.rh)({content:(0,s.serialize)(e)}):""}function l(e){return e.filter(e=>null!=e).map(e=>(0,s.getBlockContent)(e)).join("\n\n")}function c(e){const t=(0,o.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?l(t.innerBlocks):""}},62514(e,t,n){"use strict";n.d(t,{w:()=>o});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},s=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function o(e,t){const n=s(e),r=s(t);return JSON.stringify(n)===JSON.stringify(r)}},96568(e,t,n){"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{d:()=>r})},48499(e,t,n){"use strict";n.d(t,{C:()=>s});var r=n(85985);function s(e){return!0===(0,r.FB)(e).available}},13802(e,t,n){"use strict";n.d(t,{Ay:()=>c,rr:()=>l,y7:()=>i});var r=n(96865),s=n(74997),o=n(54681);const i=["core/heading","core/paragraph","core/list"],a=[];function l(e,t){const{content:n,...i}=t;let a=n;"core/heading"===e&&t?.level&&(a=a.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const l=(0,r.rh)({content:a}),c=[];return c.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:l}}),(0,s.createBlock)(o.name,{...i,content:l,originalContent:l,messages:c,originalMessages:c})}for(const e of i)a.push({type:"block",blocks:[e],isMatch:()=>i.includes(e),transform:(t,n)=>{const r=(0,s.getSaveContent)(e,t,n);return l(e,{...t,content:r})}});const c={from:a}},60487(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(56427),s=n(86087),o=n(27723),i=n(13022),a=n(66087),l=n(10790);const __=o.__,c="09:00",u="17:00";class d extends s.Component{renderInterval=(e,t)=>{const{day:n}=this.props,{opening:o,closing:a}=e;return(0,l.jsxs)(s.Fragment,{children:[(0,l.jsxs)("div",{className:"business-hours__row",children:[(0,l.jsx)("div",{className:(0,i.A)(n.name,"business-hours__day"),children:0===t&&this.renderDayToggle()}),(0,l.jsxs)("div",{className:(0,i.A)(n.name,"business-hours__hours"),children:[(0,l.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Opening","jetpack"),value:o,className:"business-hours__open",placeholder:c,onChange:e=>{this.setHour(e,"opening",t)}}),(0,l.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:u,onChange:e=>{this.setHour(e,"closing",t)}})]}),(0,l.jsx)("div",{className:"business-hours__remove",children:n.hours.length>1&&(0,l.jsx)(r.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}})})]}),t===n.hours.length-1&&(0,l.jsxs)("div",{className:"business-hours__row business-hours-row__add",children:[(0,l.jsx)("div",{className:(0,i.A)(n.name,"business-hours__day"),children:" "}),(0,l.jsx)("div",{className:(0,i.A)(n.name,"business-hours__hours"),children:(0,l.jsx)(r.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval,children:__("Add Hours","jetpack")})}),(0,l.jsx)("div",{className:"business-hours__remove",children:" "})]})]},t)};setHour=(e,t,n)=>{const{day:r,attributes:s,setAttributes:o}=this.props,{days:i}=s;o({days:i.map(s=>s.name===r.name?{...s,hours:s.hours.map((r,s)=>s===n?{...r,[t]:e}:r)}:s)})};toggleClosed=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:s}=n;r({days:s.map(n=>{if(n.name===t.name){const t=e?[{opening:c,closing:u}]:[];return{...n,hours:t}}return n})})};addInterval=()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map(t=>t.name===e.name?{...t,hours:e.hours}:t)})};removeInterval=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:s}=n;r({days:s.map(n=>t.name===n.name?{...n,hours:n.hours.filter((t,n)=>e!==n)}:n)})};isClosed(){const{day:e}=this.props;return(0,a.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)("span",{className:"business-hours__day-name",children:t.days[e.name]}),(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed})]})}renderClosed(){const{day:e}=this.props;return(0,l.jsxs)("div",{className:"business-hours__row business-hours-row__closed",children:[(0,l.jsx)("div",{className:(0,i.A)(e.name,"business-hours__day"),children:this.renderDayToggle()}),(0,l.jsx)("div",{className:(0,i.A)(e.name,"closed","business-hours__hours"),children:" "}),(0,l.jsx)("div",{className:"business-hours__remove",children:" "})]})}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}const p=d},39943(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(86087),s=n(27723),o=n(66087),i=n(10790);const _x=s._x,a="undefined"!=typeof window&&window.navigator?.language||"en",l=Intl?.DateTimeFormat?new Intl.DateTimeFormat(a,{hour:"numeric",minute:"numeric",hour12:!0}):null;class c extends r.Component{formatTime(e){const[t,n]=e.split(":");if(!t||!n)return!1;const r=new Date;return r.setHours(t),r.setMinutes(n),l?l.format(r):e}renderInterval=(e,t)=>{const{day:n}=this.props,r=n.hours;return(0,i.jsxs)("span",{children:[(0,s.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,i.jsx)("span",{children:", "})]},t)};render(){const{day:e,localization:t}=this.props,n=e.hours.filter(e=>this.formatTime(e.opening)&&this.formatTime(e.closing));return(0,i.jsxs)("div",{className:"jetpack-business-hours__item",children:[(0,i.jsx)("dt",{className:e.name,children:t.days[e.name]}),(0,i.jsxs)("dd",{children:[(0,o.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,i.jsx)("br",{})]})]})}}const u=c},39155(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(85985),s=n(1455),o=n.n(s),i=n(94715),a=n(56427),l=n(38443),c=n(86087),u=n(27723),d=n(9050),p=n(60487),h=n(39943),m=n(10790);const __=u.__,g=(0,r.sh)(d),f={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0},b=e=>{const{attributes:t,isSelected:n}=e,r=(0,i.useBlockProps)(),[s,u]=(0,c.useState)(f),[d,b]=(0,c.useState)(!1),{days:v}=t,{startOfWeek:y}=s,k=v.concat(v.slice(0,y)).slice(y);let x;if((0,c.useEffect)(()=>{o()({path:"/wpcom/v2/business-hours/localized-week"}).then(e=>{u(e),b(!0)},()=>{u(f),b(!0)})},[]),d)if(n)x=(0,m.jsx)("div",{className:"is-edit",children:k.map((t,n)=>(0,m.jsx)(p.A,{day:t,localization:s,...e},n))});else{const e=(0,l.getSettings)(),{formats:{time:t}}=e;x=(0,m.jsx)("dl",{className:"jetpack-business-hours",children:k.map((e,n)=>(0,m.jsx)(h.A,{day:e,localization:s,timeFormat:t},n))})}else x=(0,m.jsx)(a.Placeholder,{icon:g,label:__("Loading business hours","jetpack")});return(0,m.jsx)("div",{...r,children:x})}},71410(e,t,n){"use strict";var r=n(94375),s=n(9050),o=n(39155),i=(n(18681),n(82805),n(10790));(0,r.M)(s,{edit:e=>(0,i.jsx)(o.A,{...e}),save:()=>null})},28310(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(98329);const s={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string",role:"content"},placeholder:{type:"string",role:"content"},url:{type:"string",role:"content"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.A},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"},customVariant:{type:"string"},metaName:{type:"string"}}},12365(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),s=n(86087),o=n(27723),i=n(8746),a=n(10790);const __=o.__;function l({borderRadius:e="",setAttributes:t}){const n=(0,s.useCallback)(e=>t({borderRadius:e}),[t]);return(0,a.jsx)(r.PanelBody,{title:__("Border Settings","jetpack"),children:(0,a.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,allowReset:!0,initialPosition:i.hc,label:__("Border radius","jetpack"),max:i.Bs,min:i.rG,onChange:n,value:e})})}},10179(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(27723),o=n(10790);const __=s.__;function i({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:s,gradientValue:i,setBackgroundColor:a,setGradient:l,setTextColor:c,textColor:u}){const d=(0,o.jsx)(r.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:n,fallbackTextColor:s,isLargeText:!1,textColor:u.color});return e?(0,o.jsx)(r.__experimentalPanelColorGradientSettings,{settings:[{colorValue:u.color,label:__("Text Color","jetpack"),onColorChange:c},{colorValue:t.color,gradientValue:i,label:__("Background","jetpack"),onColorChange:a,onGradientChange:l}],title:__("Background & Text Color","jetpack"),children:d}):(0,o.jsx)(r.PanelColorSettings,{colorSettings:[{value:u.color,onChange:c,label:__("Text Color","jetpack")},{value:t.color,onChange:a,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack"),children:d})}},8746(e,t,n){"use strict";n.d(t,{Bs:()=>i,Uc:()=>s,hc:()=>o,rG:()=>a});var r=n(94715);const s=!!r.__experimentalUseGradient,o=5,i=50,a=0},2761(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(47143),s=n(38062),o=n(12365),i=n(10179),a=n(10790);function l({attributes:e,backgroundColor:t,clientId:n,context:l,fallbackBackgroundColor:c,fallbackTextColor:u,setAttributes:d,setBackgroundColor:p,setTextColor:h,textColor:m,gradientValue:g,setGradient:f,isGradientAvailable:b}){const{align:v,borderRadius:y}=e,k="jetpack/parentBlockWidth"in l,x=k?l["jetpack/parentBlockWidth"]:e.width,_=(0,r.useSelect)(e=>{const{getBlock:t,getBlockRootClientId:r}=e("core/block-editor");return t(r(n))}),{updateBlockAttributes:w}=(0,r.useDispatch)("core/block-editor");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{backgroundColor:t,fallbackBackgroundColor:c,fallbackTextColor:u,gradientValue:g,setBackgroundColor:p,setGradient:f,setTextColor:h,textColor:m,isGradientAvailable:b}),(0,a.jsx)(o.A,{borderRadius:y,setAttributes:d}),(0,a.jsx)(s.D,{align:v,width:x,onChange:e=>{k?w(_.clientId,{width:e}):d({width:e})}})]})}},55903(e,t,n){"use strict";n.d(t,{A:()=>m});var r=n(94715),s=n(29491),o=n(47143),i=n(86087),a=n(27723),l=n(13022),c=n(8746),u=n(2761),d=n(7528),p=n(81177),h=(n(28769),n(10790));const __=a.__;const m=(0,s.compose)((0,r.withColors)({backgroundColor:"background-color"},{textColor:"color"}))(function(e){const{attributes:t,backgroundColor:n,className:s,clientId:a,setAttributes:m,textColor:g}=e,{borderRadius:f,element:b,placeholder:v,text:y,width:k,fontSize:x,customVariant:_,metaName:w}=t;(0,p.A)({attributes:t,clientId:a,setAttributes:m});const{metadata:j}=(0,o.useSelect)(e=>{const{getBlockAttributes:t}=e(r.store);return{metadata:t(a)?.metadata}},[a]),{updateBlockAttributes:C,__unstableMarkNextChangeAsNotPersistent:A}=(0,o.useDispatch)("core/block-editor"),{gradientClass:S,gradientValue:E,setGradient:T}=c.Uc?(0,r.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},N=(0,r.useBlockProps)({className:(0,l.A)("wp-block-button",s),style:{width:k}}),[P,B]=(0,d.A)(),R=(0,r.__experimentalUseBorderProps)(t),I=(0,l.A)("wp-block-button__link",R.className,{"has-background":n.color||E,[n.class]:!E&&n.class,"has-text-color":g.color,[g.class]:g.class,[S]:S,"no-border-radius":0===f,[`has-${x}-font-size`]:!!x,"has-custom-font-size":!!x,[`is-${_}`]:!!_});(0,i.useEffect)(()=>{a&&w&&j?.name!==w&&(A(),C(a,{metadata:{...j,name:w}}))},[w,j,C,a,A]);const D={...!n.color&&E?{background:E}:{backgroundColor:n.color},fontSize:t.style?.typography?.fontSize,color:g.color,borderRadius:f?f+"px":void 0,...R.style};return(0,h.jsxs)("div",{...N,children:[(0,h.jsx)(r.RichText,{allowedFormats:"input"===b?[]:void 0,className:I,disableLineBreaks:"input"===b,onChange:e=>m({text:e}),placeholder:v||__("Add text…","jetpack"),ref:B,style:D,value:y,withoutInteractiveFormatting:!0}),(0,h.jsx)(r.InspectorControls,{children:(0,h.jsx)(u.A,{gradientValue:E,setGradient:T,isGradientAvailable:c.Uc,...P,...e})})]})})},45878(e,t,n){"use strict";var r=n(94375),s=n(5383);(0,r.A)(s.U,s.W)},36270(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=(0,s.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.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"})})},5383(e,t,n){"use strict";n.d(t,{U:()=>c,W:()=>u});var r=n(27723),s=n(97969),o=n(28310),i=n(55903),a=n(36270),l=n(85154);const __=r.__,c="button",u={apiVersion:3,title:__("Button","jetpack"),icon:a.A,category:(0,s.A)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],selectors:{border:".wp-block-jetpack-button .wp-block-button__link"},attributes:o.A,edit:i.A,save:l.A,usesContext:["jetpack/parentBlockWidth"]}},85154(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(13022),o=n(8746),i=n(10790);function a({attributes:e,blockName:t,uniqueId:n}){const{backgroundColor:a,borderRadius:l,className:c,customBackgroundColor:u,customGradient:d,customTextColor:p,gradient:h,saveInPostContent:m,text:g,textColor:f,url:b,width:v,fontSize:y}=e;if(!m)return null;const k=r.useBlockProps.save(),x=(0,r.__experimentalGetBorderClassesAndStyles)(e),_=(0,r.getColorClassName)("background-color",a),w=o.Uc?(0,r.__experimentalGetGradientClass)(h):void 0,j=(0,r.getColorClassName)("color",f),C=(0,s.A)("wp-block-button","jetpack-submit-button",c,k?.className,x.className,{[`wp-block-jetpack-${t}`]:t}),A=(0,s.A)("wp-block-button__link",{"has-text-color":f||p,[j]:j,"has-background":a||h||u||d,[_]:_,[w]:w,"no-border-radius":0===l,"has-custom-width":!!v,[`has-${y}-font-size`]:!!y,"has-custom-font-size":!!y}),S={background:d||void 0,backgroundColor:_||d||h?void 0:u,fontSize:e.style?.typography?.fontSize,color:j?void 0:p,borderRadius:l?l+"px":void 0,width:v,...x.style};return(0,i.jsx)("div",{...k,className:C,children:(0,i.jsx)(r.RichText.Content,{className:A,"data-id-attr":n||"placeholder",href:b,id:n,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g})})}},7528(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(29491),s=n(86087);function o(){const[e,t]=(0,s.useState)(),n=(0,r.useRefEffect)(n=>{const r=()=>{const r=getComputedStyle(n),s=r.backgroundColor,o=r.color;s===e?.fallbackBackgroundColor&&o===e?.fallbackTextColor||t({fallbackBackgroundColor:s,fallbackTextColor:o})},s=new MutationObserver(r);return s.observe(n,{attributeFilter:["style","class"]}),r(),()=>{s.disconnect()}},[]);return[e,n]}},81177(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(47143),s=n(86087),o=n(66087);function i({attributes:e,clientId:t,setAttributes:n}){const{passthroughAttributes:i}=e,a=(0,r.useSelect)(n=>{const r=n("core/block-editor"),s=r.getBlockRootClientId(t),o=r.getBlockAttributes(s)||{};if(!s||!i)return{};let a=!1;const l={};return Object.entries(i).forEach(([t,n])=>{const r=o[n];r!==e[t]&&(a=!0,l[t]=r)}),a?l:{}},[t,i,e]);(0,s.useEffect)(()=>{(0,o.isEmpty)(a)||n(a)},[a,n])}},95816(e,t,n){"use strict";n.d(t,{a:()=>r});const r="https://calendly.com/wpcom/jetpack-block-example"},99723(e,t,n){"use strict";n.d(t,{Ay:()=>p});var r=n(97999),s=n(94715),o=n(56427),i=n(27723),a=n(79654),l=n(5873),c=n(10790);const __=i.__,_x=i._x,u=({onEditClick:e})=>(0,c.jsx)(o.ToolbarGroup,{children:(0,c.jsx)(o.ToolbarButton,{onClick:()=>e(!0),children:__("Edit","jetpack")})}),d=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:s,embedCode:i,parseEmbedCode:l,setAttributes:u,setEmbedCode:d}=e;let p=null;return n&&(p=(0,r.isWpcomPlatformSite)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1,children:[(0,c.jsxs)("form",{onSubmit:l,className:`${s}-embed-form-sidebar`,children:[(0,c.jsx)("input",{type:"text",id:"embedCode",onChange:e=>d(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,c.jsx)("div",{children:(0,c.jsx)(o.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})})]}),(0,c.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Hide event type details","jetpack"),checked:t,onChange:()=>u({hideEventTypeDetails:!t})})]}),p&&(0,c.jsx)(o.Notice,{className:`${s}-color-notice`,isDismissible:!1,children:(0,c.jsx)(a.N,{openInNewTab:!0,href:p,children:__("Explore more customization options.","jetpack")})})]})},p=e=>{const{attributes:t,clientId:n,isEditingUrl:r,setAttributes:o,setIsEditingUrl:i}=e,{style:a,url:p}=t,h=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,c.jsxs)(c.Fragment,{children:[p&&!r&&(0,c.jsx)(s.BlockControls,{children:(0,c.jsx)(u,{onEditClick:i})}),p&&(0,c.jsx)(l.A,{clientId:n,styleOptions:h,onSelectStyle:o,activeStyle:a,attributes:t,viewportWidth:500}),(0,c.jsx)(s.InspectorControls,{children:(0,c.jsx)(d,{...e})})]})}},19493(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(74997),s=n(27723),o=n(98329),i=n(10790);const __=s.__,a={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:o.A},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:o.A},textColor:{type:"string",default:"4D5055",validator:o.A},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:o.A},customTextButtonColor:{type:"string",validator:o.A}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:s,submitButtonClasses:o,backgroundButtonColor:i,textButtonColor:a,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,d={text:(p=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:p.submitButtonTextColor||p.textButtonColor,customTextColor:p.customTextButtonColor,backgroundColor:p.submitButtonBackgroundColor||p.backgroundButtonColor,customBackgroundColor:p.customBackgroundButtonColor,url:p.url};var p;return[u,[(0,r.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...d})]]},save:({attributes:{url:e}})=>(0,i.jsx)("a",{href:e,children:e})}},52385(e,t,n){"use strict";n.d(t,{A:()=>w});var r=n(85985),s=n(94715),o=n(74997),i=n(56427),a=n(47143),l=n(86087),c=n(27723),u=n(79654),d=n(13022),p=n(66087),h=n(78218),m=n(56145),g=n(13248),f=n(95816),b=n(99723),v=n(38028),y=(n(78215),n(61095),n(10790));const __=c.__,_x=c._x,k="jetpack/button",x={element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:f.a},_=(0,r.sh)(g);const w=(0,i.withNotices)(function(e){const{attributes:t,clientId:n,name:r,noticeOperations:c,noticeUI:w,setAttributes:j}=e,C=(0,o.getBlockDefaultClassName)(r),A=(0,h.y)(g.attributes,t);(0,p.isEqual)(A,t)||j(A);const{backgroundColor:S,hideEventTypeDetails:E,primaryColor:T,textColor:N,style:P,url:B}=A,[R,I]=(0,l.useState)(B),[D,L]=(0,l.useState)(!1),[F,M]=(0,l.useState)(!1),[O,U]=(0,l.useState)({}),z=(0,s.useBlockProps)(),$=()=>{c.removeAllNotices(),c.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,l.useEffect)(()=>{B&&f.a!==B&&"link"!==P&&(0,m.A)(B,M).catch(()=>{j({url:void 0}),$()})},[]);const q=e=>{if(!e)return void $();e.preventDefault();const t=(0,v.a9)(R);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,a.select)("core/editor").getBlocksByClientId(n);e.length&&e[0].innerBlocks.forEach(e=>{(0,a.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)}),U(t.buttonAttributes)}(0,m.A)(t.url,M).then(()=>{const e=(0,h.y)(g.attributes,t);j(e),L(!1),c.removeAllNotices()}).catch(()=>{j({url:void 0}),$()})}else $()},H=(0,y.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,y.jsx)(i.Spinner,{}),(0,y.jsx)("p",{children:__("Embedding…","jetpack")})]}),V=(0,y.jsxs)(i.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:_,notices:w,children:[(0,y.jsxs)("form",{onSubmit:q,children:[(0,y.jsx)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:R||"",className:"components-placeholder__input"}),(0,y.jsx)("div",{children:(0,y.jsx)(i.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})})]}),(0,y.jsx)("div",{className:`${C}-learn-more`,children:(0,y.jsx)(u.N,{openInNewTab:!0,href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview",children:__("Need help finding your embed code?","jetpack")})})]}),G=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{className:`${C}-overlay`}),(0,y.jsx)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:E?1:0,background_color:S,primary_color:T,text_color:N});return`${B}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})]}),W=(0,y.jsx)(s.InnerBlocks,{template:[[k,{...x,...O,passthroughAttributes:{url:"url"}}]],templateLock:"all"});return F?H:(0,y.jsxs)("div",{...z,className:(0,d.A)(z.className,{[`calendly-style-${P}`]:B&&!D}),children:[(0,y.jsx)(b.Ay,{...e,defaultClassName:C,embedCode:R,isEditingUrl:D,parseEmbedCode:q,setEmbedCode:I,setIsEditingUrl:L}),B&&!D?(Z=P,"inline"===Z?G:W):V]});var Z})},60312(e,t,n){"use strict";var r=n(74997),s=n(94375),o=n(13248),i=n(19493),a=n(52385),l=n(2668),c=n(38028);n(78215);(0,s.M)(o,{edit:a.A,save:l.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&c.QL.test(e.textContent),transform:e=>{const t=(0,c.a9)(e.textContent);return(0,r.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.A]})},2668(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);function o(){const e=r.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(r.InnerBlocks.Content,{})})}},38028(e,t,n){"use strict";n.d(t,{QL:()=>r,a9:()=>s});const r=/(^|\/\/)(calendly\.com[^"']*)/i,s=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),s=r.get("background_color"),o=r.get("primary_color"),i=r.get("text_color"),a=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),s&&s.match(a)&&(t.backgroundColor=s),o&&o.match(a)&&(t.primaryColor=o),i&&i.match(a)&&(t.textColor=i),t})(t),s=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(s&&(n.style=s),"link"===s){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const s=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);s&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=s)}return n}},98091(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(13022),l=n(81942),c=n(10790);const __=i.__,u=e=>{const{attributes:{address:t,addressLine2:n,addressLine3:i,city:u,region:d,postal:p,country:h,linkToGoogleMaps:m},isSelected:g,setAttributes:f}=e,b=[t,n,i,u,d,p,h].some(e=>""!==e),v=(0,a.A)({"jetpack-address-block":!0,"is-selected":g}),y=(0,o.useCallback)(e=>{"Enter"===e.key&&e.preventDefault()},[]),k=(0,r.useBlockProps)({className:v}),x=(0,c.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>f({linkToGoogleMaps:e})});return(0,c.jsxs)("div",{...k,children:[!g&&b&&(0,l.A)(e),(g||!b)&&(0,c.jsxs)(o.Fragment,{children:[(0,c.jsx)(r.PlainText,{value:t,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>f({address:e}),onKeyDown:y}),(0,c.jsx)(r.PlainText,{value:n,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>f({addressLine2:e}),onKeyDown:y}),(0,c.jsx)(r.PlainText,{value:i,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>f({addressLine3:e}),onKeyDown:y}),(0,c.jsx)(r.PlainText,{value:u,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>f({city:e}),onKeyDown:y}),(0,c.jsx)(r.PlainText,{value:d,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>f({region:e}),onKeyDown:y}),(0,c.jsx)(r.PlainText,{value:p,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>f({postal:e}),onKeyDown:y}),(0,c.jsx)(r.PlainText,{value:h,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>f({country:e}),onKeyDown:y}),x]})]})}},39563(e,t,n){"use strict";n.d(t,{U:()=>l,W:()=>c});var r=n(27723),s=n(5573),o=n(98091),i=n(81942),a=n(10790);const __=r.__,_x=r._x,l="address",c={apiVersion:3,title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,a.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(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.jsx)(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:o.A,save:i.A}},81942(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(94715),s=n(86087),o=n(27723),i=n(10790);const __=o.__,a=({attributes:{address:e,addressLine2:t,addressLine3:n,city:r,region:o,postal:a,country:l}})=>(0,i.jsxs)(s.Fragment,{children:[e&&(0,i.jsx)("div",{className:"jetpack-address__address jetpack-address__address1",children:e}),t&&(0,i.jsx)("div",{className:"jetpack-address__address jetpack-address__address2",children:t}),n&&(0,i.jsx)("div",{className:"jetpack-address__address jetpack-address__address3",children:n}),r&&!(o||a)&&(0,i.jsx)("div",{className:"jetpack-address__city",children:r}),r&&(o||a)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{className:"jetpack-address__city",children:r}),", ",(0,i.jsx)("span",{className:"jetpack-address__region",children:o})," ",(0,i.jsx)("span",{className:"jetpack-address__postal",children:a})]}),!r&&(o||a)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{className:"jetpack-address__region",children:o})," ",(0,i.jsx)("span",{className:"jetpack-address__postal",children:a})]}),l&&(0,i.jsx)("div",{className:"jetpack-address__country",children:l})]}),l=({attributes:{address:e,addressLine2:t,addressLine3:n,city:r,region:s,postal:o,country:i}})=>{let a=s?`+${s},`:"";a=o?`${a}+${o}`:a;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${n?`${n},`:""}${r?`+${r},`:""}${a}${i?`+${i}`:""}`.replace(" ","+")},c=e=>{if(!(({address:e,addressLine2:t,addressLine3:n,city:r,region:s,postal:o,country:i})=>[e,t,n,r,s,o,i].some(e=>""!==e))(e.attributes))return null;const t=r.useBlockProps.save();return(0,i.jsxs)("div",{...t,children:[e.attributes.linkToGoogleMaps&&(0,i.jsx)("a",{href:l(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack"),children:(0,i.jsx)(a,{...e})}),!e.attributes.linkToGoogleMaps&&(0,i.jsx)(a,{...e})]})}},44246(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(94715),s=n(13022),o=n(10790);const i=["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"],a=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]],l=e=>{const{className:t,isSelected:n}=e,l=(0,r.useBlockProps)({className:(0,s.A)(t,{"jetpack-contact-info-block":!0,"is-selected":n})});return(0,o.jsx)("div",{...l,children:(0,o.jsx)(r.InnerBlocks,{allowedBlocks:i,templateLock:!1,template:a})})}},25907(e,t,n){"use strict";var r=n(74997),s=n(94375),o=n(39563),i=n(75173),a=n(44246),l=n(90951),c=n(70063),u=n(36611);n(75360),n(25378);(0,s.M)(i,{edit:a.A,save:u.A,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"widget_contact_info"===e,transform:({instance:e})=>{let t=[(0,r.createBlock)("core/heading",{content:e.raw.title}),(0,r.createBlock)("jetpack/email",{email:e.raw.email}),(0,r.createBlock)("jetpack/phone",{phone:e.raw.phone}),(0,r.createBlock)("jetpack/address",{address:e.raw.address})];return e.raw.hours&&(t=[...t,(0,r.createBlock)("core/paragraph",{content:e.raw.hours})]),e.raw.showmap&&e.raw.address&&(t=[...t,(0,r.createBlock)("jetpack/map",{address:e.raw.address})]),(0,r.createBlock)("jetpack/contact-info",{},t)}}]}},[{name:o.U,settings:o.W},{name:l.U,settings:l.W},{name:c.U,settings:c.W}])},43167(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(27723),o=n(64882),i=n(27266);const __=s.__,a=e=>{const t=(0,r.useBlockProps)(),{setAttributes:n}=e;return(0,o.A)("email",e,__("Email","jetpack"),i.A,e=>n({email:e}),t)}},90951(e,t,n){"use strict";n.d(t,{U:()=>l,W:()=>c});var r=n(27723),s=n(5573),o=n(43167),i=n(27266),a=n(10790);const __=r.__,_x=r._x,l="email",c={apiVersion:3,title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,a.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(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:o.A,save:i.A,parent:["jetpack/contact-info"]}},27266(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(86087),o=n(39904),i=n(10790);const a=({attributes:{email:e}})=>{if(!e)return null;const t=r.useBlockProps.save();return(0,i.jsx)("div",{...t,children:(n=e,n.split(/(\s+)/).map((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&(0,o.t)(n)?e===n?(0,i.jsx)("a",{href:`mailto:${e}`,children:e},t):(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)("a",{href:`mailto:${e}`,children:n},t),(0,i.jsx)(s.Fragment,{children:e.slice(-(e.length-n.length))})]},t):(0,i.jsx)(s.Fragment,{children:e},t)}))});var n}},42711(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(27723),o=n(64882),i=n(84330);const __=s.__,a=e=>{const t=(0,r.useBlockProps)(),{setAttributes:n}=e;return(0,o.A)("phone",e,__("Phone number","jetpack"),i.A,e=>n({phone:e}),t)}},70063(e,t,n){"use strict";n.d(t,{U:()=>l,W:()=>c});var r=n(27723),s=n(5573),o=n(42711),i=n(84330),a=n(10790);const __=r.__,_x=r._x,l="phone",c={apiVersion:3,title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,a.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(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:o.A,save:i.A}},84330(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(10790);function o(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let r=n?e.substring(n-1):e,o=n?e.substring(0,n):"",i=r.replace(/\D/g,"");/[0-9/+/(]/.test(r[0])?(o=o.slice(0,-1),"+"===r[0]&&(i="+"+i)):r=r.substring(1);return[o.trim()?(0,s.jsx)("span",{className:"phone-prefix",children:o},"phonePrefix"):null,(0,s.jsx)("a",{href:`tel:${i}`,children:r},"phoneNumber")]}const i=({attributes:{phone:e}})=>{if(!e)return null;const t=r.useBlockProps.save();return(0,s.jsx)("div",{...t,children:o(e)})}},36611(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);const o=()=>{const e=r.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(r.InnerBlocks.Content,{})})};n.dn(o)},75800(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(4567),s=n(3975),o=n(94715),i=n(86087),a=n(13022),l=n(72730),c=n(10790);const u=({className:e=null,currency:t=null,defaultValue:n=null,disabled:u=!1,label:d="",onChange:p=null,value:h=""})=>{const[m,g]=(0,i.useState)((0,r.Ay)(h,t,{symbol:""})),[f,b]=(0,i.useState)(!1),[v,y]=(0,i.useState)(!1),k=(0,i.useRef)(null),x=(0,i.useCallback)((e,n)=>{g(r=>{if(e!==r){const r=(0,l.C_)(e,t);r&&r>=(0,l.dv)(t)?(y(!1),n&&p?.(r)):y(!0)}return e})},[t,p]),_=()=>{k.current&&(k.current.focus(),b(!0))};return(0,i.useEffect)(()=>{if(!k.current)return;const e=k.current,s=()=>{b(!1),m||x((0,r.Ay)(n,t,{symbol:""}))};return e.addEventListener("blur",s),()=>{e.removeEventListener("blur",s)}},[t,n,m,k,x]),(0,i.useEffect)(()=>{f||v||g((0,r.Ay)(h,t,{symbol:""}))},[t,f,v,h]),(0,i.useEffect)(()=>{x((0,r.Ay)(h,t,{symbol:""}))},[t,h]),(0,c.jsxs)("div",{className:(0,a.A)("donations__amount",e,{"has-focus":f,"has-error":v}),role:"button",tabIndex:0,onClick:_,onKeyDown:_,children:[s.y[t].symbol,u?(0,c.jsx)("div",{className:"donations__amount-value",children:(0,r.Ay)(h||n,t,{symbol:""})}):(0,c.jsx)(o.RichText,{allowedFormats:[],"aria-label":d,onChange:e=>x(e,!0),placeholder:(0,r.Ay)(n,t,{symbol:""}),ref:k,value:m,withoutInteractiveFormatting:!0})]})}},22883(e,t,n){"use strict";n.d(t,{A:()=>i});const r=["left","center","right","full"],s=(e,t="border")=>{if(!e||"object"!=typeof e)return[];const n=[],r=["top","right","bottom","left"];return r.some(t=>e[t])?r.forEach(r=>{const s=e[r];s&&(s.color&&n.push(`${t}-${r}-color:${s.color}`),s.style&&n.push(`${t}-${r}-style:${s.style}`),s.width&&n.push(`${t}-${r}-width:${s.width}`))}):(e.color&&n.push(`${t}-color:${e.color}`),e.style&&n.push(`${t}-style:${e.style}`),e.width&&n.push(`${t}-width:${e.width}`)),n},o=e=>{if(!e)return[];if("string"==typeof e)return[`border-radius:${e}`];if("object"==typeof e){const t={topLeft:"border-top-left-radius",topRight:"border-top-right-radius",bottomRight:"border-bottom-right-radius",bottomLeft:"border-bottom-left-radius"};return Object.entries(t).filter(([t])=>e[t]).map(([t,n])=>`${n}:${e[t]}`)}return[]},i=(e,t)=>{const{activeTabBackgroundColor:n,activeTabTextColor:i,inactiveTabBackgroundColor:a,inactiveTabTextColor:l,selectedAmountBackgroundColor:c,selectedAmountTextColor:u,selectedAmountOutlineColor:d,tabBorderColor:p,tabFontSize:h,tabPadding:m,amountFontSize:g,amountBorder:f,amountBorderRadius:b,buttonFontSize:v,buttonPadding:y,buttonAlignment:k,buttonBorderRadius:x,contentAlignment:_,blockBorder:w,blockBorderRadius:j,displayMode:C}=e,A=[];if(["left","center","right"].includes(_)){A.push(`${t} .donations__content{text-align:${_}}`);const e={left:"flex-start",center:"center",right:"flex-end"};A.push(`${t} .donations__amounts{justify-content:${e[_]}}`)}if(p&&A.push(`${t} .donations__nav,${t} .donations__nav-item,${t} .donations__nav-item.is-active{border-color:${p}}`),x){const e=o(x);e.length&&A.push(`${t} .donations__donate-button{${e.join(";")}}`)}const S=[];g&&S.push(`font-size:${g}`),S.push(...s(f)),S.push(...o(b)),S.length&&A.push(`${t} .donations__amount{${S.join(";")}}`);const E=[];h&&E.push(`font-size:${h}`),m&&["top","right","bottom","left"].forEach(e=>{m[e]&&E.push(`padding-${e}:${m[e]}`)}),E.length&&A.push(`${t} .donations__nav-item{${E.join(";")}}`);const T=[];n&&T.push(`background:${n}`),i&&T.push(`color:${i}`),T.length&&A.push(`${t} .donations__nav-item.is-active{${T.join(";")}}`);const N=[];a&&N.push(`background:${a}`),l&&N.push(`color:${l}`),N.length&&A.push(`${t} .donations__nav-item:not(.is-active){${N.join(";")}}`);const P=[];c&&P.push(`background-color:${c}`),u&&P.push(`color:${u}`),d&&P.push(`box-shadow:0 0 0 1px #fff,0 0 0 3px ${d}`),P.length&&A.push(`${t} .donations__amount.is-selected{${P.join(";")}}`);const B=[];if(v&&B.push(`font-size:${v}`),y&&["top","right","bottom","left"].forEach(e=>{y[e]&&B.push(`padding-${e}:${y[e]}`)}),B.length&&A.push(`${t} .donations__donate-button{${B.join(";")}}`),r.includes(k)&&("full"===k?A.push(`${t} .donations__donate-button-wrapper{display:block;width:100%}${t} .donations__donate-button{display:block;width:100%;box-sizing:border-box;text-align:center}`):A.push(`${t} .donations__donate-button-wrapper{text-align:${k}}`)),"modal"!==C){const e=[...s(w),...o(j)];e.length&&A.push(`.wp-block-jetpack-donations${t}{${e.join(";")}}`)}return"modal"===C&&["left","center","right"].includes(_)&&A.push(`${t}{text-align:${_}}`),A.join("")}},57018(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(4567),s=n(3975),o=n(85985),i=n(94715),a=n(56427),l=n(47143),c=n(86087),u=n(27723),d=n(48558),p=n(72730),h=n(16521),m=n(2556),g=n(75703),f=n(10790);const __=u.__,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>{const{attributes:t,setAttributes:n,clientId:v}=e,{tracks:y}=(0,o.st)(),k=(0,c.useRef)({}),x=!(0,l.useSelect)(e=>e(h.M).getConnectUrl()||"",[]),_=(0,c.useCallback)((e,t)=>{y.recordEvent("jetpack_donations_setting_changed",{feature:"donations",surface:"block_editor",setting_name:e,setting_value:t,stripe_connected:x})},[y,x]),w=(0,c.useCallback)((e,t)=>{k.current[e]&&clearTimeout(k.current[e]),k.current[e]=setTimeout(()=>{_(e,t),delete k.current[e]},800)},[_]),{currency:j,oneTimeDonation:C,monthlyDonation:A,annualDonation:S,showCustomAmount:E,contentAlignment:T,defaultInterval:N,customAmountPlaceholder:P,minimumAmount:B,maximumAmount:R,displayMode:I,triggerButtonText:D,triggerIcon:L,triggerSticky:F,blockBorder:M,blockBorderRadius:O}=t,U=(0,p.dv)(j),z=P??100*U,$=!1!==C.show,q=!!A.show,H=!!S.show,V=($?1:0)+(q?1:0)+(H?1:0),G=__("At least one frequency must be enabled.","jetpack"),W=(0,g.fq)($,q,H)??"one-time",Z="one-time"===N&&$||"1 month"===N&&q||"1 year"===N&&H?N:W,J={"one-time":"show_one_time","1 month":"show_monthly","1 year":"show_yearly"},K=(e,r)=>{const s=b[e],o=t[s],i={[s]:{...o,show:r}};if(!r&&Z===e){const t={oneTime:"one-time"!==e&&$,monthly:"1 month"!==e&&q,annual:"1 year"!==e&&H},n=(0,g.fq)(t.oneTime,t.monthly,t.annual);n&&(i.defaultInterval=n)}n(i),_(J[e],r)},Y={"one-time":__("One-Time","jetpack"),"1 month":__("Monthly","jetpack"),"1 year":__("Yearly","jetpack")},Q=[...$?[{value:"one-time",label:Y["one-time"]}]:[],...q?[{value:"1 month",label:Y["1 month"]}]:[],...H?[{value:"1 year",label:Y["1 year"]}]:[]],X=e=>[{value:"",label:__("None","jetpack")},...(e||[]).map((e,t)=>({value:String(t),label:(0,r.Ay)(e,j)}))],ee=e=>void 0!==e.defaultAmountIndex?String(e.defaultAmountIndex):"",te={"one-time":"default_amount_one_time","1 month":"default_amount_monthly","1 year":"default_amount_yearly"},ne=e=>r=>{const s=""===r?void 0:parseInt(r,10);((e,r,s)=>{const o=b[e];n({[o]:{...t[o],[r]:s}})})(e,"defaultAmountIndex",s),_(te[e],s??null)},re=(0,c.useCallback)(e=>n({contentAlignment:e||""}),[n]);let se;void 0!==B&&void 0!==R&&R<B?se=__("Maximum must be greater than the minimum amount.","jetpack"):void 0!==R&&R<U&&(se=(0,u.sprintf)(/* translators: %s: minimum donation amount formatted with currency symbol */
__("Maximum must be at least %s, the minimum amount Stripe can process.","jetpack"),(0,r.Ay)(U,j)));return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(i.BlockControls,{children:[(0,f.jsx)(i.AlignmentControl,{value:T,onChange:re}),(0,f.jsx)(a.ToolbarGroup,{children:(0,f.jsx)(a.ToolbarItem,{children:()=>(0,f.jsx)(a.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:({onToggle:e,isOpen:t})=>(0,f.jsx)(a.ToolbarButton,{className:"jetpack-donations__currency-toggle",icon:(0,f.jsxs)(f.Fragment,{children:[j+" - "+s.y[j].symbol,(0,f.jsx)(a.Dashicon,{icon:"arrow-down"})]}),label:__("Change currency","jetpack"),onClick:e,onKeyDown:n=>{t||n.keyCode!==d.DOWN||(n.preventDefault(),n.stopPropagation(),e())}}),renderContent:({onClose:e})=>(0,f.jsx)(a.MenuGroup,{children:Object.keys(p.VK).map(t=>(0,f.jsx)(a.MenuItem,{isSelected:t===j,icon:t===j?"yes":"",onClick:()=>{(e=>{const t=(0,p.Xj)(e);n({currency:e,oneTimeDonation:{...C,amounts:t},monthlyDonation:{...A,amounts:t},annualDonation:{...S,amounts:t},customAmountPlaceholder:void 0}),_("currency",e)})(t),e()},children:t+" - "+s.y[t].symbol},`jetpack-donations-currency-${t}`))})})})})]}),(0,f.jsxs)(i.InspectorControls,{children:[(0,f.jsxs)(a.PanelBody,{title:__("Display","jetpack"),children:[(0,f.jsxs)(a.__experimentalToggleGroupControl,{label:__("Display mode","jetpack"),value:I,onChange:e=>n({displayMode:e}),isBlock:!0,__nextHasNoMarginBottom:!0,children:[(0,f.jsx)(a.__experimentalToggleGroupControlOption,{value:"inline",label:__("In-page","jetpack")}),(0,f.jsx)(a.__experimentalToggleGroupControlOption,{value:"modal",label:__("Pop-up","jetpack")})]}),"modal"===I&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.ToggleControl,{label:__("Sticky","jetpack"),help:__("Fix the button to the bottom right corner of the page.","jetpack"),checked:!!F,onChange:e=>n({triggerSticky:e}),style:{marginTop:16},__nextHasNoMarginBottom:!0}),(0,f.jsx)(a.TextControl,{label:__("Button text","jetpack"),value:D??"",placeholder:__("Donate","jetpack"),onChange:e=>n({triggerButtonText:e||void 0}),__nextHasNoMarginBottom:!0}),(0,f.jsx)(a.ToggleControl,{label:__("Show icon","jetpack"),checked:"none"!==L,onChange:e=>n({triggerIcon:e?"heart":"none"}),style:{marginTop:16},__nextHasNoMarginBottom:!0}),"none"!==L&&(0,f.jsx)("div",{className:"jetpack-donations__icon-picker",children:m.Sh.map(({key:e,label:t,icon:r})=>(0,f.jsx)(a.Tooltip,{text:t,children:(0,f.jsx)(a.Button,{className:"jetpack-donations__icon-option",onClick:()=>n({triggerIcon:e}),"aria-label":t,isPressed:L===e,children:(0,f.jsx)(a.Icon,{icon:r,size:20})})},e))})]})]}),(0,f.jsxs)(a.PanelBody,{title:__("Settings","jetpack"),children:[(0,f.jsx)(a.ToggleControl,{checked:$,onChange:e=>K("one-time",e),disabled:$&&1===V,help:$&&1===V?G:void 0,label:__("Show one-time donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,f.jsx)(a.ToggleControl,{checked:q,onChange:e=>K("1 month",e),disabled:q&&1===V,help:q&&1===V?G:void 0,label:__("Show monthly donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,f.jsx)(a.ToggleControl,{checked:H,onChange:e=>K("1 year",e),disabled:H&&1===V,help:H&&1===V?G:void 0,label:__("Show annual donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,f.jsx)(a.ToggleControl,{checked:E,onChange:e=>{n({showCustomAmount:e}),_("show_custom_amount",e)},label:__("Show custom amount option","jetpack"),__nextHasNoMarginBottom:!0}),(0,f.jsx)("h3",{className:"jp-donations-defaults-heading",style:{margin:"24px 0 8px",fontSize:13,fontWeight:600,textTransform:"none"},children:__("Defaults","jetpack")}),(0,f.jsx)(a.SelectControl,{label:__("Frequency","jetpack"),value:Z,options:Q,onChange:e=>{n({defaultInterval:e}),_("default_frequency",e)},__nextHasNoMarginBottom:!0}),(0,f.jsx)("h4",{className:"jp-donations-defaults-subheading",style:{margin:"16px 0 8px",fontSize:11,fontWeight:500,textTransform:"uppercase"},children:__("Amounts","jetpack")}),$&&(0,f.jsxs)(a.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,f.jsx)(a.FlexItem,{style:{minWidth:80},children:__("One-Time","jetpack")}),(0,f.jsx)(a.FlexBlock,{children:(0,f.jsx)(a.SelectControl,{hideLabelFromVision:!0,label:__("Default amount for One-Time","jetpack"),value:ee(C),options:X(C.amounts),onChange:ne("one-time"),__nextHasNoMarginBottom:!0})})]}),q&&(0,f.jsxs)(a.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,f.jsx)(a.FlexItem,{style:{minWidth:80},children:__("Monthly","jetpack")}),(0,f.jsx)(a.FlexBlock,{children:(0,f.jsx)(a.SelectControl,{hideLabelFromVision:!0,label:__("Default amount for Monthly","jetpack"),value:ee(A),options:X(A.amounts),onChange:ne("1 month"),__nextHasNoMarginBottom:!0})})]}),H&&(0,f.jsxs)(a.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,f.jsx)(a.FlexItem,{style:{minWidth:80},children:__("Annual","jetpack")}),(0,f.jsx)(a.FlexBlock,{children:(0,f.jsx)(a.SelectControl,{hideLabelFromVision:!0,label:__("Default amount for Annual","jetpack"),value:ee(S),options:X(S.amounts),onChange:ne("1 year"),__nextHasNoMarginBottom:!0})})]}),E&&(0,f.jsxs)(a.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,f.jsx)(a.FlexItem,{style:{minWidth:80},children:__("Custom","jetpack")}),(0,f.jsx)(a.FlexBlock,{children:(0,f.jsx)(a.TextControl,{type:"number",hideLabelFromVision:!0,label:__("Suggested custom amount","jetpack"),value:z,onChange:e=>{const t=""===e||void 0===e?void 0:Number(e);n({customAmountPlaceholder:t}),w("custom_amount_placeholder",t??null)},min:(0,p.dv)(j),step:.01,__nextHasNoMarginBottom:!0})})]}),(0,f.jsx)("p",{style:{marginTop:24},children:(0,f.jsx)(a.ExternalLink,{href:`https://wordpress.com/earn/${(0,o.GE)()}`,children:__("View donation earnings","jetpack")})})]}),(0,f.jsxs)(a.PanelBody,{title:__("Security","jetpack"),initialOpen:!1,children:[(0,f.jsx)("p",{style:{marginTop:0,marginBottom:16,fontSize:13},children:__("Setting minimum and maximum donation amounts can help prevent fraudulent transactions.","jetpack")}),(0,f.jsx)(a.TextControl,{type:"number",label:__("Minimum amount","jetpack"),value:B??"",onChange:e=>{const t=""===e?void 0:Number(e);n({minimumAmount:t}),w("minimum_amount",t??null)},min:U,step:.01,__nextHasNoMarginBottom:!0}),(0,f.jsx)(a.TextControl,{type:"number",label:__("Maximum amount","jetpack"),value:R??"",onChange:e=>{const t=""===e?void 0:Number(e);n({maximumAmount:t}),w("maximum_amount",t??null)},min:B??U,step:.01,help:se,__nextHasNoMarginBottom:!0})]})]}),"modal"!==I&&(0,f.jsx)(i.InspectorControls,{group:"border",children:(0,f.jsxs)(a.__experimentalToolsPanel,{label:__("Border","jetpack"),resetAll:()=>n({blockBorder:void 0,blockBorderRadius:void 0}),panelId:v,children:[(0,f.jsx)(a.__experimentalToolsPanelItem,{label:__("Border","jetpack"),hasValue:()=>!!M,onDeselect:()=>n({blockBorder:void 0}),isShownByDefault:!0,panelId:v,children:(0,f.jsx)(a.BorderBoxControl,{label:__("Border","jetpack"),value:M,onChange:e=>n({blockBorder:e}),enableAlpha:!0,enableStyle:!0,__next40pxDefaultSize:!0})}),(0,f.jsx)(a.__experimentalToolsPanelItem,{label:__("Radius","jetpack"),hasValue:()=>!!O,onDeselect:()=>n({blockBorderRadius:void 0}),isShownByDefault:!0,panelId:v,children:(0,f.jsx)(i.__experimentalBorderRadiusControl,{values:O,onChange:e=>n({blockBorderRadius:e})})})]})})]})}},27718(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(4567),s=n(3975),o=n(94715),i=n(27723),a=n(72730),l=n(10790);const __=i.__,c={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:({attributes:e})=>{const{currency:t,oneTimeDonation:n,monthlyDonation:i,annualDonation:c,showCustomAmount:u,chooseAmountText:d,customAmountText:p}=e;if(!n||!n.show||-1===n.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...i.show&&{"1 month":{title:__("Monthly","jetpack")}},...c.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"donations__container",children:[Object.keys(h).length>1&&(0,l.jsx)("div",{className:"donations__nav",children:Object.entries(h).map(([e,{title:t}])=>(0,l.jsx)("div",{role:"button",tabIndex:0,className:"donations__nav-item","data-interval":e,children:t},`jetpack-donations-nav-item-${e} `))}),(0,l.jsx)("div",{className:"donations__content",children:(0,l.jsxs)("div",{className:"donations__tab",children:[(0,l.jsx)(o.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:n.heading}),i.show&&(0,l.jsx)(o.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:i.heading}),c.show&&(0,l.jsx)(o.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:c.heading}),(0,l.jsx)(o.RichText.Content,{tagName:"p",value:d}),(0,l.jsx)("div",{className:"donations__amounts donations__one-time-item",children:n.amounts.map(e=>(0,l.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,r.Ay)(e,t)},e))}),i.show&&(0,l.jsx)("div",{className:"donations__amounts donations__monthly-item",children:i.amounts.map(e=>(0,l.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,r.Ay)(e,t)},e))}),c.show&&(0,l.jsx)("div",{className:"donations__amounts donations__annual-item",children:c.amounts.map(e=>(0,l.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,r.Ay)(e,t)},e))}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.RichText.Content,{tagName:"p",value:p}),(0,l.jsxs)("div",{className:"donations__amount donations__custom-amount",children:[s.y[t].symbol,(0,l.jsx)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,r.Ay)(100*(0,a.dv)(t),t,{symbol:""})})]})]}),(0,l.jsx)("div",{className:"donations__separator",children:"——"}),(0,l.jsx)(o.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:n.extraText}),i.show&&(0,l.jsx)(o.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:i.extraText}),c.show&&(0,l.jsx)(o.RichText.Content,{tagName:"p",className:"donations__annual-item",value:c.extraText}),(0,l.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item",children:(0,l.jsx)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:n.buttonText})}),i.show&&(0,l.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item",children:(0,l.jsx)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:i.buttonText})}),c.show&&(0,l.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item",children:(0,l.jsx)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:c.buttonText})})]})})]})})}}},31152(e,t,n){"use strict";n.d(t,{A:()=>T});var r=n(85985),s=n(94715),o=n(56427),i=n(29491),a=n(47143),l=n(86087),c=n(27723),u=n(2274),d=n(53796),p=n(72730),h=n(27574),m=n(26247),g=n(16521),f=n(3696),b=n(22883),v=n(57018),y=n(70975),k=n(93033),x=n(56848),_=n(2556),w=(n(16279),n(79085)),j=n(77794),C=n(36580),A=n(10790);const __=c.__,S=new Set,E=e=>{const{attributes:t,setAttributes:n,clientId:c}=e,{currency:T,tabsAppearance:N,className:P,displayMode:B,triggerButtonText:R,triggerIcon:I,triggerSticky:D}=t,{tracks:L}=(0,r.st)();(0,l.useEffect)(()=>{if("string"==typeof P&&P.split(" ").includes("is-style-buttons")){const e=P.split(" ").filter(e=>"is-style-buttons"!==e).join(" ").trim();n({tabsAppearance:"buttons",className:e||void 0})}},[P,n]);const F=(0,i.useInstanceId)(E,"jp-donations"),M=(0,b.A)(t,`.${F}`),O=[F,"buttons"===N&&"is-style-buttons","modal"===B&&"is-display-modal","modal"===B&&D&&"is-sticky"].filter(Boolean).join(" "),U=(0,s.useBlockProps)({className:O}),[z,$]=(0,l.useState)(""),[q,H]=(0,l.useState)([]),[V,G]=(0,l.useState)(!1),W=(0,m.A)(),Z=(0,a.useSelect)(e=>e(s.store).getSettings().isPreviewMode,[]),{lockPostSaving:J,unlockPostSaving:K}=(0,a.useDispatch)("core/editor"),{getEntityRecord:Y,getCurrentUser:Q}=(0,a.useSelect)("core"),{editEntityRecord:X,saveEditedEntityRecord:ee}=(0,a.useDispatch)("core"),te=(0,a.useSelect)(e=>e("core/editor").getCurrentPost(),[]),ne=(0,a.useSelect)(e=>e("core/editor").isPostSavingLocked(),[]),re=(0,a.useSelect)(e=>e(g.M).getConnectUrl()||"",[]),{setConnectUrl:se,setConnectedAccountDefaultCurrency:oe}=(0,a.useDispatch)(f.EF),ie=(0,a.useSelect)(e=>e(f.EF).getConnectedAccountDefaultCurrency());(0,l.useEffect)(()=>{if(Z||!c||S.has(c))return;W&&!re&&!ie||(S.add(c),L.recordEvent("jetpack_donations_block_loaded",{feature:"donations",surface:"block_editor",is_user_connected:!!W,stripe_connected:W?!re:null}))},[c,W,re,ie,L,Z]),(0,l.useEffect)(()=>{if(!T&&ie&&!ne){const e=ie.toUpperCase(),t=!!p.VK[e];n(t?{currency:e}:{currency:"USD"})}},[T,ie,ne,n]);const ae=e=>{$(e)},le=Q();(0,l.useEffect)(()=>{le?.id&&Y("root","user",le.id)},[le?.id,Y]);const ce=le?.meta?.jetpack_donation_warning_dismissed||!1;(0,l.useEffect)(()=>{Z||le?.id&&!1===ce&&G(!0)},[le,ce,Z]),(0,l.useEffect)(()=>{if(Z)return;J("donations");const e=e=>e.reduce((e,{id:t,currency:n,type:r,interval:s})=>(n===T&&"donation"===r&&(e[s]=t),e),{});(0,k.A)("donation").then(t=>{if(!t&&"object"!=typeof t||t.errors)return K("donations"),void $(__("Could not load data from WordPress.com.","jetpack"));se((0,h.A)(te.id,t.connect_url)),oe(t?.connected_account_default_currency?.toUpperCase());const n=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(n)?(H(n),void K("donations")):t.connect_url?(H({"one-time":-1,"1 month":-1,"1 year":-1}),void K("donations")):(T&&(0,y.A)(T).then(t=>{H(e(t)),K("donations")},ae),void K("donations"))},ae)},[J,T,te.id,se,oe,K,Z]);const ue=Z?{"one-time":-1,"1 month":-1,"1 year":-1}:q,de=Z&&!T?{...e,attributes:{...t,currency:"USD"}}:e;let pe;if(Z||W)if(!Z&&z)pe=(0,A.jsx)(w.A,{error:z});else if(!Z&&re)pe=(0,A.jsx)(d.V,{blockName:"donations"});else if(Z||T)if("modal"===B){const t=_.Sh.find(({key:e})=>e===I),n=R||__("Donate","jetpack");pe=(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(v.A,{...e}),(0,A.jsxs)("button",{className:"donations__trigger-button wp-block-button__link",tabIndex:-1,"aria-hidden":"true",children:[t&&"none"!==I&&(0,A.jsx)(o.Icon,{className:"donations__trigger-icon",icon:t.icon,size:20}),n]})]})}else pe=(0,A.jsx)(C.A,{...de,products:ue});else pe=(0,A.jsx)(o.Spinner,{});else pe=(0,A.jsx)(u.A,{block:"Donations Form",explanation:__("Connect your WordPress.com account to enable donations.","jetpack")});const he=(0,l.useCallback)(async()=>{if(G(!1),le?.id)try{await X("root","user",le.id,{meta:{jetpack_donation_warning_dismissed:!0}}),await ee("root","user",le.id)}catch(e){console.error("Failed to update user meta:",e)}else console.error("Cannot update user meta: User not loaded")},[le,X,ee]);return(0,A.jsxs)("div",{...U,children:[(0,A.jsx)(j.A,{attributes:t,setAttributes:n}),M&&(0,A.jsx)("style",{children:M}),pe,V&&(0,A.jsx)(x.A,{onClose:he})]})},T=E},46197(e,t,n){"use strict";var r=n(74997),s=n(94375),o=n(87325),i=n(27718),a=n(31152),l=n(47693),c=n(30746);n(45318);(0,s.M)(o,{edit:a.A,save:l.A,deprecated:[i.A]}),(0,r.registerBlockVariation)("jetpack/donations",c.Ay)},70975(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(1455),s=n.n(r);const o=async e=>{try{return await s()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},93033(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1455),s=n.n(r),o=n(93832);const i=async(e=null)=>{const t=new URLSearchParams(window.location.search),n=(0,o.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await s()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},56848(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(3924),s=n(97999),o=n(56427),i=n(86087),a=n(27723),l=n(79654),c=n(10790);const __=a.__,u=({onClose:e})=>{const t=(0,s.isWpcomPlatformSite)()?"wpcom-support-donation-block":"jetpack-support-donation-block";return(0,c.jsx)(o.Modal,{className:"jetpack-donations-first-time-modal",onRequestClose:e,title:__("Accept Donations with Stripe","jetpack"),children:(0,c.jsxs)("div",{className:"jetpack-donations-first-time-modal__content",children:[(0,c.jsx)("p",{children:(0,i.createInterpolateElement)(__("To accept donations on your site, you'll need to connect your Stripe account. Here's what you need to do: <docLink>Learn more about donations</docLink>.","jetpack"),{docLink:(0,c.jsx)(l.N,{openInNewTab:!0,href:(0,r.A)(t)})})}),(0,c.jsxs)("ol",{children:[(0,c.jsx)("li",{children:__("Connect your Stripe account to your WordPress.com account","jetpack")}),(0,c.jsx)("li",{children:__("Set up your business information in Stripe","jetpack")}),(0,c.jsx)("li",{children:__("Configure your payment settings and supported currencies","jetpack")})]}),(0,c.jsx)("p",{children:__("Once connected, you can customize your donation form and start accepting payments.","jetpack")}),(0,c.jsx)("p",{children:(0,i.createInterpolateElement)(__("Please note that accepting donations has additional requirements from Stripe. Learn more about <requirementsLink>requirements for accepting donations</requirementsLink>.","jetpack"),{requirementsLink:(0,c.jsx)(l.N,{openInNewTab:!0,href:(0,r.A)("jetpack-support-donation-block-stripe-reqs")})})}),(0,c.jsx)("div",{className:"jetpack-donations-first-time-modal__actions",children:(0,c.jsx)(o.Button,{variant:"primary",onClick:e,children:__("Got it","jetpack")})})]})})}},2556(e,t,n){"use strict";n.d(t,{$f:()=>c,Sh:()=>u});var r=n(27723),s=n(42005),o=n(5573),i=n(10790);const __=r.__,a=(0,i.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.Path,{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})}),l=(0,i.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5 14.67 11 15.5 11zm-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.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"})}),c=(0,i.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.Path,{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4zM9 1v2M12 1v2M15 1v2"})}),u=[{key:"heart",label:__("Heart","jetpack"),icon:a},{key:"gift",label:__("Gift","jetpack"),icon:s.A},{key:"smiley",label:__("Smiley","jetpack"),icon:l},{key:"coffee",label:__("Cup","jetpack"),icon:c}]},79085(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(56427),s=n(27723),o=n(10790);const __=s.__,i=({error:e})=>(0,o.jsx)(r.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:e})},47693(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(75703),o=n(10790);const i=(0,s.OI)(),a=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:n,monthlyDonation:s,annualDonation:a}=e;if(!n||!n.show||!n.planId||-1===n.planId)return null;const l=r.useBlockProps.save();return(0,o.jsxs)("div",{...l,children:[(0,o.jsx)(r.RichText.Content,{tagName:"h4",value:i.oneTimeDonation?.heading}),(0,o.jsx)(r.RichText.Content,{tagName:"p",value:n.extraText??i.extraText}),(0,o.jsx)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.oneTimeDonation?.buttonText}),s.show&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("hr",{className:"donations__separator"}),(0,o.jsx)(r.RichText.Content,{tagName:"h4",value:i.monthlyDonation?.heading}),(0,o.jsx)(r.RichText.Content,{tagName:"p",value:s.extraText??i.extraText}),(0,o.jsx)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.monthlyDonation?.buttonText})]}),a.show&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("hr",{className:"donations__separator"}),(0,o.jsx)(r.RichText.Content,{tagName:"h4",value:i.annualDonation?.heading}),(0,o.jsx)(r.RichText.Content,{tagName:"p",value:a.extraText??i.extraText}),(0,o.jsx)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.annualDonation?.buttonText})]})]})}},77794(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(10790);const __=i.__,l={placement:"left-start",offset:36},c=({label:e,settings:t})=>{const n=(0,o.useCallback)(()=>t.some(e=>!!e.value),[t]),i=(0,o.useCallback)(()=>t.forEach(e=>e.onChange()),[t]),c=(0,o.useCallback)(({isOpen:n,onToggle:r})=>(0,a.jsx)(s.Button,{onClick:r,"aria-expanded":n,"aria-label":e,__next40pxDefaultSize:!0,children:(0,a.jsxs)(s.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(s.__experimentalZStack,{isLayered:!1,offset:-8,children:t.map((e,t)=>(0,a.jsx)(s.Flex,{expanded:!1,children:(0,a.jsx)(s.ColorIndicator,{colorValue:e.value})},t))}),(0,a.jsx)(s.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:e})]})}),[e,t]),u=(0,o.useCallback)(()=>{if(1===t.length)return(0,a.jsx)(s.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,a.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,a.jsx)(r.__experimentalColorGradientControl,{label:t[0].label,colorValue:t[0].value,onColorChange:t[0].onChange})})});const e=t.map(e=>({name:e.label.toLowerCase().replace(/\s+/g,"-"),title:e.label}));return(0,a.jsx)(s.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,a.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,a.jsx)(s.TabPanel,{tabs:e,children:e=>{const n=t.find(t=>t.label.toLowerCase().replace(/\s+/g,"-")===e.name);return(0,a.jsx)(r.__experimentalColorGradientControl,{label:n.label,colorValue:n.value,onColorChange:n.onChange,showTitle:!1})}})})})},[t]);return(0,a.jsx)(s.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",label:e,hasValue:n,onDeselect:i,isShownByDefault:!0,children:(0,a.jsx)(s.Dropdown,{popoverProps:l,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:c,renderContent:u})})},u=({attributes:e,setAttributes:t})=>{const{activeTabBackgroundColor:n,activeTabTextColor:i,inactiveTabBackgroundColor:l,inactiveTabTextColor:u,selectedAmountBackgroundColor:d,selectedAmountTextColor:p,selectedAmountOutlineColor:h,tabsAppearance:m,tabBorderColor:g,tabFontSize:f,tabPadding:b,buttonFontSize:v,buttonPadding:y,buttonAlignment:k,buttonBorderRadius:x,amountFontSize:_,amountBorder:w,amountBorderRadius:j}=e,C=(0,o.useMemo)(()=>{const e=e=>n=>t({[e]:n});return{tabsAppearance:e("tabsAppearance"),activeTabBackgroundColor:e("activeTabBackgroundColor"),activeTabTextColor:e("activeTabTextColor"),inactiveTabBackgroundColor:e("inactiveTabBackgroundColor"),inactiveTabTextColor:e("inactiveTabTextColor"),tabBorderColor:e("tabBorderColor"),tabFontSize:e("tabFontSize"),tabPadding:e("tabPadding"),selectedAmountBackgroundColor:e("selectedAmountBackgroundColor"),selectedAmountTextColor:e("selectedAmountTextColor"),selectedAmountOutlineColor:e("selectedAmountOutlineColor"),amountFontSize:e("amountFontSize"),amountBorder:e("amountBorder"),amountBorderRadius:e("amountBorderRadius"),buttonFontSize:e("buttonFontSize"),buttonPadding:e("buttonPadding"),buttonAlignment:e=>t({buttonAlignment:e||""}),buttonBorderRadius:e("buttonBorderRadius")}},[t]),A=(0,o.useMemo)(()=>[{label:__("Text","jetpack"),value:i,onChange:C.activeTabTextColor},{label:__("Background","jetpack"),value:n,onChange:C.activeTabBackgroundColor}],[n,i,C]),S=(0,o.useMemo)(()=>[{label:__("Text","jetpack"),value:u,onChange:C.inactiveTabTextColor},{label:__("Background","jetpack"),value:l,onChange:C.inactiveTabBackgroundColor}],[l,u,C]),E=(0,o.useMemo)(()=>[{label:__("Tab border","jetpack"),value:g,onChange:C.tabBorderColor}],[g,C]),T=(0,o.useMemo)(()=>[{label:__("Text","jetpack"),value:p,onChange:C.selectedAmountTextColor},{label:__("Background","jetpack"),value:d,onChange:C.selectedAmountBackgroundColor},{label:__("Outline","jetpack"),value:h,onChange:C.selectedAmountOutlineColor}],[d,p,h,C]),N=(0,o.useCallback)(()=>{},[]),P=(0,o.useCallback)(()=>{C.tabsAppearance("tabs"),C.activeTabBackgroundColor(),C.activeTabTextColor(),C.inactiveTabBackgroundColor(),C.inactiveTabTextColor(),C.tabBorderColor(),C.tabFontSize(),C.tabPadding()},[C]),B=(0,o.useCallback)(()=>{C.selectedAmountBackgroundColor(),C.selectedAmountTextColor(),C.selectedAmountOutlineColor(),C.amountFontSize(),C.amountBorder(),C.amountBorderRadius()},[C]),R=(0,o.useCallback)(()=>{C.buttonFontSize(),C.buttonPadding(),C.buttonBorderRadius(),C.buttonAlignment("")},[C]),I=(0,o.useMemo)(()=>({tabsAppearance:()=>"buttons"===m,tabFontSize:()=>!!f,tabPadding:()=>!!b,amountFontSize:()=>!!_,amountBorder:()=>!!w,amountBorderRadius:()=>!!j,buttonFontSize:()=>!!v,buttonPadding:()=>!!y,buttonAlignment:()=>!!k,buttonBorderRadius:()=>!!x}),[m,f,b,_,w,j,v,y,k,x]),D=(0,o.useMemo)(()=>({tabsAppearance:()=>C.tabsAppearance("tabs"),buttonAlignment:()=>C.buttonAlignment("")}),[C]);return(0,a.jsxs)(r.InspectorControls,{group:"styles",children:[(0,a.jsxs)(s.PanelBody,{title:__("Tabs","jetpack"),initialOpen:!1,className:"jp-donations-style-panel",children:[(0,a.jsx)(s.__experimentalToolsPanel,{label:__("Tab appearance","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Appearance","jetpack"),hasValue:I.tabsAppearance,onDeselect:D.tabsAppearance,isShownByDefault:!0,children:(0,a.jsxs)(s.__experimentalToggleGroupControl,{label:__("Appearance","jetpack"),value:m||"tabs",onChange:C.tabsAppearance,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[(0,a.jsx)(s.__experimentalToggleGroupControlOption,{value:"tabs",label:__("Tabs","jetpack")}),(0,a.jsx)(s.__experimentalToggleGroupControlOption,{value:"buttons",label:__("Buttons","jetpack")})]})})}),(0,a.jsx)(s.__experimentalToolsPanel,{className:"color-block-support-panel",label:__("Colors","jetpack"),resetAll:N,hasInnerWrapper:!0,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,a.jsxs)("div",{className:"color-block-support-panel__inner-wrapper",children:[(0,a.jsx)(c,{label:__("Active Tab","jetpack"),settings:A}),(0,a.jsx)(c,{label:__("Inactive Tab","jetpack"),settings:S}),(0,a.jsx)(c,{label:__("Tab Border","jetpack"),settings:E})]})}),(0,a.jsx)(r.ContrastChecker,{backgroundColor:n,textColor:i}),(0,a.jsx)(r.ContrastChecker,{backgroundColor:l,textColor:u}),(0,a.jsxs)(s.__experimentalToolsPanel,{label:__("Tab dimensions","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Font size","jetpack"),hasValue:I.tabFontSize,onDeselect:C.tabFontSize,isShownByDefault:!0,children:(0,a.jsx)(r.FontSizePicker,{value:f,onChange:C.tabFontSize,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Padding","jetpack"),hasValue:I.tabPadding,onDeselect:C.tabPadding,isShownByDefault:!0,children:(0,a.jsx)(s.BoxControl,{label:__("Padding","jetpack"),values:b,onChange:C.tabPadding,allowReset:!1,__next40pxDefaultSize:!0})})]}),(0,a.jsx)(s.PanelRow,{children:(0,a.jsx)(s.Button,{variant:"secondary",onClick:P,children:__("Reset","jetpack")})})]}),(0,a.jsxs)(s.PanelBody,{title:__("Amounts","jetpack"),initialOpen:!1,className:"jp-donations-style-panel",children:[(0,a.jsx)(s.__experimentalToolsPanel,{className:"color-block-support-panel",label:__("Colors","jetpack"),resetAll:N,hasInnerWrapper:!0,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,a.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:(0,a.jsx)(c,{label:__("Selected Amount","jetpack"),settings:T})})}),(0,a.jsx)(r.ContrastChecker,{backgroundColor:d,textColor:p}),(0,a.jsxs)(s.__experimentalToolsPanel,{label:__("Amount settings","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Font size","jetpack"),hasValue:I.amountFontSize,onDeselect:C.amountFontSize,isShownByDefault:!0,children:(0,a.jsx)(r.FontSizePicker,{value:_,onChange:C.amountFontSize,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Border","jetpack"),hasValue:I.amountBorder,onDeselect:C.amountBorder,isShownByDefault:!0,children:(0,a.jsx)(s.BorderBoxControl,{label:__("Border","jetpack"),value:w,onChange:C.amountBorder,enableAlpha:!0,enableStyle:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Border radius","jetpack"),hasValue:I.amountBorderRadius,onDeselect:C.amountBorderRadius,isShownByDefault:!0,children:(0,a.jsx)(r.__experimentalBorderRadiusControl,{values:j,onChange:C.amountBorderRadius})})]}),(0,a.jsx)(s.PanelRow,{children:(0,a.jsx)(s.Button,{variant:"secondary",onClick:B,children:__("Reset","jetpack")})})]}),(0,a.jsxs)(s.PanelBody,{title:__("Donate button","jetpack"),initialOpen:!1,className:"jp-donations-style-panel",children:[(0,a.jsxs)(s.__experimentalToolsPanel,{label:__("Button settings","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Font size","jetpack"),hasValue:I.buttonFontSize,onDeselect:C.buttonFontSize,isShownByDefault:!0,children:(0,a.jsx)(r.FontSizePicker,{value:v,onChange:C.buttonFontSize,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Padding","jetpack"),hasValue:I.buttonPadding,onDeselect:C.buttonPadding,isShownByDefault:!0,children:(0,a.jsx)(s.BoxControl,{label:__("Padding","jetpack"),values:y,onChange:C.buttonPadding,allowReset:!1,__next40pxDefaultSize:!0})}),(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Radius","jetpack"),hasValue:I.buttonBorderRadius,onDeselect:C.buttonBorderRadius,isShownByDefault:!0,children:(0,a.jsx)(r.__experimentalBorderRadiusControl,{values:x,onChange:C.buttonBorderRadius})}),(0,a.jsx)(s.__experimentalToolsPanelItem,{label:__("Alignment","jetpack"),hasValue:I.buttonAlignment,onDeselect:D.buttonAlignment,isShownByDefault:!0,children:(0,a.jsxs)(s.__experimentalToggleGroupControl,{label:__("Alignment","jetpack"),value:k||"",onChange:C.buttonAlignment,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[(0,a.jsx)(s.__experimentalToggleGroupControlOption,{value:"left",label:__("Left","jetpack")}),(0,a.jsx)(s.__experimentalToggleGroupControlOption,{value:"center",label:__("Center","jetpack")}),(0,a.jsx)(s.__experimentalToggleGroupControlOption,{value:"right",label:__("Right","jetpack")}),(0,a.jsx)(s.__experimentalToggleGroupControlOption,{value:"full",label:__("Full width","jetpack")})]})})]}),(0,a.jsx)(s.PanelRow,{children:(0,a.jsx)(s.Button,{variant:"secondary",onClick:R,children:__("Reset","jetpack")})})]})]})}},62225(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(94715),s=n(47143),o=n(27723),i=n(72730),a=n(75800),l=n(75703),c=n(10790);const __=o.__,u=(0,l.OI)(),d=({activeTab:e,attributes:t,setAttributes:n})=>{const{currency:l,oneTimeDonation:d,monthlyDonation:p,annualDonation:h,showCustomAmount:m,customAmountPlaceholder:g,chooseAmountText:f=u.chooseAmountText,customAmountText:b=u.customAmountText}=t,v={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"}[e],y=e=>t[v][e],k=(e,r)=>{const s=t[v];n({[v]:{...s,[e]:r}})},x=(0,i.Xj)(l),_=y("amounts"),w=(0,s.useSelect)(e=>e("core/rich-text").getFormatTypes(),[]).map(e=>e.name).filter(e=>"core/link"!==e);return(0,c.jsxs)("div",{className:"donations__tab",children:[(0,c.jsx)(r.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:y("heading")??u[v]?.heading,onChange:e=>k("heading",e)}),(0,c.jsx)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>n({chooseAmountText:e})}),(0,c.jsx)("div",{className:"donations__amounts",children:_.map((e,t)=>(0,c.jsx)(a.A,{currency:l,defaultValue:x[t],label:(0,o.sprintf)(
// translators: %d: Tier level e.g: "1", "2", "3"
__("Tier %d","jetpack"),t+1),onChange:e=>((e,t)=>{const n=[..._];n[t]=e,k("amounts",n)})(e,t),value:e},`jetpack-donations-amount-${t}`))}),m&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:b,onChange:e=>n({customAmountText:e})}),(0,c.jsx)(a.A,{currency:l,label:__("Custom amount","jetpack"),defaultValue:g??100*(0,i.dv)(l),className:"donations__custom-amount",disabled:!0})]}),(0,c.jsx)("hr",{className:"donations__separator"}),(0,c.jsx)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:y("extraText")??u.extraText,onChange:e=>k("extraText",e)}),(0,c.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper",children:(0,c.jsx)(r.RichText,{className:"wp-block-button__link wp-element-button donations__donate-button",placeholder:__("Write a message…","jetpack"),value:y("buttonText")??u[v]?.buttonText,onChange:e=>{return t=e,void n({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...h,buttonText:t}});var t},allowedFormats:w})})]})}},36580(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(86087),s=n(27723),o=n(13022),i=n(57018),a=n(62225),l=n(75703),c=n(10790);const __=s.__,u=e=>{const{attributes:t,products:n,setAttributes:s}=e,{oneTimeDonation:u,monthlyDonation:d,annualDonation:p,defaultInterval:h}=t,m=!1!==u.show,g=(0,l.fq)(m,d.show,p.show)??"one-time",f="one-time"===h&&m||"1 month"===h&&d.show||"1 year"===h&&p.show?h:g,[b,v]=(0,r.useState)(f),y=(0,r.useCallback)(e=>b===e,[b]),k={...m&&{"one-time":{title:__("One-Time","jetpack")}},...d.show&&{"1 month":{title:__("Monthly","jetpack")}},...p.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.useEffect)(()=>{u.planId===n["one-time"]&&d.planId===n["1 month"]&&p.planId===n["1 year"]||s({...n["one-time"]&&{oneTimeDonation:{...u,planId:n["one-time"]}},...n["1 month"]&&{monthlyDonation:{...d,planId:n["1 month"]}},...n["1 year"]&&{annualDonation:{...p,planId:n["1 year"]}}})},[u,d,p,s,n]),(0,r.useEffect)(()=>{const e=(0,l.fq)(m,d.show,p.show);null!==e&&(!m&&y("one-time")&&v(e),!d.show&&y("1 month")&&v(e),!p.show&&y("1 year")&&v(e))},[m,d,p,v,y]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"donations__container",children:[Object.keys(k).length>1&&(0,c.jsx)("div",{className:"donations__nav",children:Object.entries(k).map(([e,{title:t}])=>(0,c.jsx)("div",{role:"button",tabIndex:0,className:(0,o.A)("donations__nav-item",{"is-active":y(e)}),onClick:()=>v(e),onKeyDown:()=>v(e),children:t},`jetpack-donations-nav-item-${e} `))}),(0,c.jsx)("div",{className:"donations__content",children:(0,c.jsx)(a.A,{activeTab:b,attributes:t,setAttributes:s})})]}),(0,c.jsx)(i.A,{...e})]})}},30746(e,t,n){"use strict";n.d(t,{Ay:()=>a});var r=n(27723),s=n(2556);const __=r.__,o="tips",i={variationName:o,displayMode:"modal",triggerSticky:!1,triggerButtonText:"Buy me a coffee",triggerIcon:"coffee",contentAlignment:"center",buttonAlignment:"full",tabsAppearance:"buttons",showCustomAmount:!1,chooseAmountText:"",annualDonation:{show:!1,planId:null,amounts:[3,5,8]},oneTimeDonation:{show:!0,planId:null,amounts:[3,5,8],defaultAmountIndex:0,heading:"",buttonText:"Buy coffee",extraText:"Thanks for your generosity!"},monthlyDonation:{show:!0,planId:null,amounts:[3,5,8],defaultAmountIndex:0,heading:"",buttonText:"Buy coffee",extraText:"Thanks for your generosity!"}},a={name:o,title:__("Tips","jetpack"),description:__("Get financial support from friends and followers.","jetpack"),icon:s.$f,isDefault:!1,attributes:i,scope:["inserter"],isActive:e=>e.variationName===o,keywords:[__("tips","jetpack"),__("coffee","jetpack"),__("support","jetpack"),__("buy me a coffee","jetpack")]}},75703(e,t,n){"use strict";function r(e,t,n){return e?"one-time":t?"1 month":n?"1 year":null}function s(){if("undefined"==typeof window)return{};const e=window.Jetpack_DonationsBlock?.defaultTexts;return"object"!=typeof e?{}:e}n.d(t,{OI:()=>s,fq:()=>r})},36850(e,t,n){"use strict";n.d(t,{GY:()=>s,_t:()=>r,gQ:()=>o});const r=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,s=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,o="https://www.eventbrite.com/e/test-event-tickets-123456789"},38449(e,t,n){"use strict";n.d(t,{o:()=>c,s:()=>u});var r=n(56427),s=n(27723),o=n(5873),i=n(72660),a=n(10790);const __=s.__,_x=s._x,l=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,a.jsx)("div",{className:"block-editor-block-preview__container",children:(0,a.jsx)("img",{src:i,alt:__("In page Eventbrite checkout example","jetpack")})})},{value:"modal",label:__("Button & Modal","jetpack")}],c=({setEditingUrl:e})=>(0,a.jsx)(r.ToolbarGroup,{children:(0,a.jsx)(r.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})}),u=({attributes:e,clientId:t,setAttributes:n})=>(0,a.jsx)(o.A,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:t,styleOptions:l,onSelectStyle:n,activeStyle:e.style,attributes:e,viewportWidth:130})},77629(e,t,n){"use strict";n.d(t,{A:()=>r});const r=[n(87879).A]},87879(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(74997),o=n(27723),i=n(13022),a=n(66087),l=n(10790);const _x=o._x,c=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];const u={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const o={...Object.fromEntries(Object.entries(e).filter(([e])=>"useModal"!==e&&!c.includes(e))),className:t&&t.replace("is-style-outline",""),style:r},i=(0,a.pick)(e,c);return[o,[(0,s.createBlock)("jetpack/button",{element:"a",text:i.text||_x("Register","verb: e.g. register for an event.","jetpack"),...i,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function({attributes:e}){const{eventId:t,useModal:n,url:s,style:o}=e;if(t)return n||"modal"===o?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:s,customTextColor:o,eventId:a,text:c,textColor:u,url:d}=e,p=(0,r.getColorClassName)("color",u),h=(0,r.getColorClassName)("background-color",t),m=(0,i.A)("wp-block-button__link",{"has-text-color":u||o,[p]:p,"has-background":t||s,[h]:h,"no-border-radius":0===n}),g={backgroundColor:h?void 0:s,color:p?void 0:o,borderRadius:n?n+"px":void 0};return(0,l.jsx)("div",{className:"wp-block-button",children:(0,l.jsx)(r.RichText.Content,{className:m,href:d,id:`eventbrite-widget-${a}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:c})})}(e):s&&(0,l.jsx)("a",{className:"eventbrite__direct-link",href:s,children:s})},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,a.isEmpty)(t)||Object.entries(e).some(([e,t])=>t&&c.includes(e)))}},56311(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(78218),l=n(56145),c=n(82306),u=n(36850),d=n(38449),p=n(50013),h=n(68332),m=n(72055),g=n(12074),f=(n(59357),n(10790));const __=i.__,_x=i._x,b={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},v=(0,s.withNotices)(e=>{const{attributes:t,noticeOperations:n,onReplace:i,setAttributes:v}=e,{url:y,style:k}=t,x=(0,r.useBlockProps)(),[_,w]=(0,o.useState)(!1),[j,C]=(0,o.useState)(t.url||""),[A,S]=(0,o.useState)(!1),E=!A&&y&&!u._t.test(y),T=(0,o.useCallback)(()=>{n.removeAllNotices(),n.createErrorNotice((0,f.jsxs)(f.Fragment,{children:[__("Sorry, this content could not be embedded.","jetpack")," ",(0,f.jsx)(s.Button,{variant:"link",onClick:()=>(0,g.pG)(j,i),children:_x("Convert block to link","button label","jetpack")})]}))},[n,i,j]),N=(0,o.useCallback)(e=>{if(!e||u.gQ===e||"modal"===k)return;const t=(0,g.HE)(e);if(t){const r={eventId:t,url:e};(0,l.A)(r.url,S).then(e=>{const t=(0,a.y)(c.attributes,{...r,url:e});v(t),C(e),n.removeAllNotices()}).catch(()=>{v({eventId:void 0,url:void 0}),T()})}else T()},[k,n,T,v,C,S]);let P;return(0,o.useEffect)(()=>{N(y)},[y,N]),P=A?(0,f.jsx)(h.A,{}):_||!y||E?(0,f.jsx)(p.A,{...e,editedUrl:j,onChange:e=>C(e.target.value),onSubmit:e=>{e&&e.preventDefault(),N((0,g.pJ)(j)),w(!1)}}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.s,{...e}),(0,f.jsx)(r.BlockControls,{children:(0,f.jsx)(d.o,{setEditingUrl:w})}),"modal"===k?(0,f.jsx)(r.InnerBlocks,{template:[[b.name,b.attributes]],templateLock:"all"}):(0,f.jsx)(m.A,{...e})]}),(0,f.jsx)("div",{...x,children:P})})},34590(e,t,n){"use strict";var r=n(74997),s=n(94375),o=n(82306),i=n(36850),a=n(77629),l=n(56311),c=n(52074);(0,s.M)(o,{edit:l.A,save:c.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(i._t.test(e.textContent)||i.GY.test(e.textContent)),transform:e=>(0,r.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},deprecated:a.A})},50013(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(97999),s=n(85985),o=n(56427),i=n(27723),a=n(79654),l=n(82306),c=(n(12074),n(10790));const __=i.__,_x=i._x,u=(0,s.sh)(l),d=({className:e,noticeUI:t,editedUrl:n,onChange:s,onSubmit:i})=>{const l=(0,r.isWpcomPlatformSite)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,c.jsx)("div",{className:e,children:(0,c.jsxs)(o.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:u,notices:t,children:[(0,c.jsxs)("form",{onSubmit:i,children:[(0,c.jsx)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:s}),(0,c.jsx)(o.Button,{variant:"secondary",type:"submit",children:_x("Embed","submit button label","jetpack")})]}),(0,c.jsx)("div",{className:"components-placeholder__learn-more",children:(0,c.jsx)(a.N,{openInNewTab:!0,href:l,children:__("Learn more about Eventbrite embeds","jetpack")})})]})})}},68332(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(56427),s=n(27723),o=n(10790);const __=s.__,i=()=>(0,o.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,o.jsx)(r.Spinner,{}),(0,o.jsx)("p",{children:__("Embedding…","jetpack")})]})},72055(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=({className:e,attributes:t})=>{const{eventId:n}=t;if(!n)return;const o=`eventbrite-widget-${n}`,i=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${n},\n\t\t\t\t\tiframeContainerId: '${o}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${o}"></div>\n\t\t`;return(0,s.jsxs)("div",{className:e,children:[(0,s.jsx)(r.SandBox,{html:i}),(0,s.jsx)("div",{className:"block-library-embed__interactive-overlay"})]})}},52074(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);function o({attributes:e}){const{eventId:t,style:n,url:o}=e;if(!t)return;let i;"modal"===n?i=(0,s.jsx)(r.InnerBlocks.Content,{}):o&&(i=(0,s.jsx)("a",{className:"eventbrite__direct-link",href:o,children:o}));const a=r.useBlockProps.save();return(0,s.jsx)("div",{...a,children:i})}},12074(e,t,n){"use strict";n.d(t,{HE:()=>a,pG:()=>i,pJ:()=>l});var r=n(74997),s=n(86087),o=n(10790);function i(e,t){const n=(0,o.jsx)("a",{href:e,children:e});t((0,r.createBlock)("core/paragraph",{content:(0,s.renderToString)(n)}))}function a(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function l(e=""){return e&&"string"==typeof e?e.trim():null}},26053(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(56427),s=n(86087),o=n(27723),i=n(10790);const __=o.__;const a=(0,s.forwardRef)(function({onSubmit:e,onChange:t,value:n=""},s){return(0,i.jsxs)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:e,children:[(0,i.jsx)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:n,onChange:t,ref:s,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,i.jsx)(r.Button,{id:"wp-block-jetpack-gif_search-button",variant:"secondary",type:"submit",children:__("Search","jetpack")})]})})},83690(e,t,n){"use strict";n.d(t,{T:()=>r});const r="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},86121(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(56427),o=n(10790);function i(){return(0,o.jsx)(r.InspectorControls,{children:(0,o.jsx)(s.PanelBody,{className:"components-panel__body-gif-branding",children:(0,o.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22",children:[(0,o.jsx)(s.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,o.jsx)(s.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"})]})})})}},9695(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(85985),s=n(94715),o=n(56427),i=n(86087),a=n(27723),l=n(13022),c=n(5564),u=n(26053),d=n(86121),p=n(65465),h=n(38770),m=n(10790);const __=a.__,g=(0,r.sh)(c);const f=function({attributes:e,setAttributes:t,isSelected:n}){const{align:r,caption:a,giphyUrl:f,searchText:b,paddingTop:v}=e,[y,k]=(0,i.useState)(!1),x=(0,i.createRef)(),{isFetching:_,giphyData:w,fetchGiphyData:j}=(0,p.A)(),C=(0,s.useBlockProps)(),A=()=>{x.current.focus(),k(!1)};(0,i.useEffect)(()=>{!f&&w&&w[0]&&t((0,h.Er)(w[0]))},[f,w,t]);const S=async t=>{if(t.preventDefault(),!e.searchText||_)return;const n=await(0,h.ID)(e.searchText);n&&j(n)},E=e=>t({searchText:e.target.value});return(0,m.jsxs)("div",{...C,className:(0,l.A)(C.className,`align${r}`),children:[(0,m.jsx)(d.A,{}),f?(0,m.jsxs)("figure",{children:[n&&(0,m.jsx)(u.A,{onSubmit:S,onChange:E,value:b,ref:x}),n&&w&&w.length>1&&(0,m.jsx)("div",{className:"wp-block-jetpack-gif_thumbnails-container",children:w.map(e=>{const n={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,m.jsx)("button",{className:"wp-block-jetpack-gif_thumbnail-container",onClick:n=>{n.preventDefault(),(e=>{t((0,h.Er)(e))})(e)},style:n},e.id)})}),(0,m.jsxs)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:v},children:[(0,m.jsx)("div",{className:"wp-block-jetpack-gif_cover",onClick:A,onKeyDown:A,role:"button",tabIndex:"0"}),(0,m.jsx)("iframe",{src:f,title:b})]}),(!s.RichText.isEmpty(a)||n)&&!!f&&(0,m.jsx)(s.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:y,onFocus:()=>k(!1),onChange:e=>t({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:a})]}):(0,m.jsx)(o.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:g,label:c.title,instructions:__("Search for a term or paste a Giphy URL","jetpack"),children:(0,m.jsx)(u.A,{onSubmit:S,onChange:E,value:b,ref:x})})]})}},55734(e,t,n){"use strict";var r=n(94375),s=n(5564),o=n(9695);n(27453),n(88561);(0,r.M)(s,{edit:o.A,save:()=>null})},65465(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(86087);const s=(e=[])=>{const[t,n]=(0,r.useState)(!1),[s,o]=(0,r.useState)(e),[i,a]=(0,r.useState)("");return(0,r.useEffect)(()=>{if(!i)return;(async()=>{n(!0);const e=await fetch(i).then(e=>!!e.ok&&e).catch(()=>!1);if(e){const t=await e.json(),n=void 0!==t.data.images?[t.data]:t.data;n[0].images&&o(n)}n(!1)})()},[i]),{isFetching:t,giphyData:s,fetchGiphyData:a}}},38770(e,t,n){"use strict";n.d(t,{Er:()=>d,ID:()=>l});var r=n(56145),s=n(83690);const o=e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(s.T)}&limit=10`,i=e=>`https://api.giphy.com/v1/gifs/${encodeURIComponent(e)}?api_key=${encodeURIComponent(s.T)}`,a=(e="",t)=>{const n=e.split(t);return n[n.length-1]},l=(e="")=>new Promise(t=>{let n=null;if((e=e.trim()).match(/^https:\/\/gph\.is\/(?:[a-zA-Z0-9]+\/)?[a-zA-Z0-9]+$/i))(0,r.A)(e).then(r=>{r.startsWith("https://giphy.com/gifs/")?(n=a(r,"-"),t(i(n))):t(o(e))});else{const r=/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/,s=e.match(r);s&&s[3]&&(n=a(s[3],"-")),n&&t(i(n)),t(o(e))}}),c=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,u=e=>e?.embed_url,d=e=>({giphyUrl:u(e),paddingTop:c(e)})},43123(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(56427),s=n(27723),o=n(10790);const __=s.__,_x=s._x,i=e=>{const{className:t,embedValue:n,onChange:s,onSubmit:i}=e;return(0,o.jsx)(r.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1,children:(0,o.jsxs)("form",{onSubmit:i,className:t,children:[(0,o.jsx)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:s}),(0,o.jsx)(r.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})]})})}},70777(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(97999),s=n(85985),o=n(94715),i=n(74997),a=n(56427),l=n(29491),c=n(86087),u=n(27723),d=n(79654),p=n(26873),h=n(76862),m=n(43123),g=n(23972),f=n(10790);const __=u.__,_x=u._x,b=(0,s.sh)(h);const v=(0,l.compose)(a.withNotices,(0,p.withViewportMatch)({isMobile:"< small"}))(function(e){const{attributes:{url:t,height:n},isMobile:s,isSelected:l,name:u,noticeOperations:p,noticeUI:h,setAttributes:v}=e,y=(0,o.useBlockProps)(),[k,x]=(0,c.useState)(t||""),[_,w]=(0,c.useState)(!1),[j,C]=(0,c.useState)(!1);(0,c.useEffect)(()=>{!l&&j&&C(!1)},[l,j]);const A=()=>{C(!0)},S=e=>{e&&e.preventDefault();const t=(0,g.tW)(k.trim());if(!g._t.test(t.url))return p.removeAllNotices(),void p.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));v(t),w(!1),p.removeAllNotices()},E=(0,i.getBlockDefaultClassName)(u),T=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${s?"300":n}"></iframe>`,N=(0,f.jsx)(d.N,{openInNewTab:!0,href:"https://en.support.wordpress.com/google-calendar/",children:__("Enable Permissions for the calendar you want to share","jetpack")}),P=(0,f.jsx)(o.InspectorControls,{children:(0,f.jsx)(m.A,{className:`${E}-embed-form-sidebar`,embedValue:k,onChange:e=>x(e.target.value),onSubmit:S})});let B;if(_||!t){const e=(0,r.isWpcomPlatformSite)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";B=(0,f.jsxs)(f.Fragment,{children:[P,(0,f.jsxs)(a.Placeholder,{label:__("Google Calendar","jetpack"),icon:b,notices:h,children:[(0,f.jsxs)("ol",{className:`${E}-placeholder-instructions`,children:[(0,f.jsx)("li",{children:N}),(0,f.jsx)("li",{children:__("Paste the embed code you copied from your Google Calendar below","jetpack")})]}),(R=`${E}-embed-form-editor`,(0,f.jsxs)("form",{onSubmit:S,className:R,children:[(0,f.jsx)("textarea",{type:"text",value:k,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>x(e.target.value)}),(0,f.jsx)(a.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})]})),(0,f.jsx)("div",{className:`${E}-placeholder-links`,children:(0,f.jsx)(d.N,{openInNewTab:!0,href:e,children:__("Learn more","jetpack")})})]})]})}else B=(0,f.jsxs)(f.Fragment,{children:[P,(0,f.jsxs)("div",{children:[(0,f.jsx)(a.SandBox,{html:T,onFocus:A}),!j&&(0,f.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:A})]})]});var R;return(0,f.jsx)("div",{...y,children:B})})},29280(e,t,n){"use strict";var r=n(74997),s=n(94375),o=n(76862),i=n(70777),a=n(23636),l=n(23972);n(14647);(0,s.M)(o,{edit:i.A,save:a.A,transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:({named:{domain:e,dir:t,query:n}})=>`https://${e}.google.com/${t}?${n}`}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&l._t.test(e.textContent),transform:e=>(0,r.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&l.fF.test(e.innerHTML),transform:e=>{const{url:t,height:n}=(0,l.HW)(e.innerHTML.trim());return(0,r.createBlock)("jetpack/google-calendar",{url:t,height:n})}}]}})},23636(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);const o=({attributes:{url:e}})=>{const t=r.useBlockProps.save();return(0,s.jsx)("a",{...t,href:e,children:e})};n.dn(o)},23972(e,t,n){"use strict";n.d(t,{HW:()=>c,_t:()=>s,fF:()=>o,tW:()=>u});const r="https?://calendar\\.google\\.com/calendar",s=new RegExp(`^${r}`,"i"),o=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${r}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${r}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),a=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=o.exec(e);if(!t)return;const n={};return t.forEach((e,t)=>{if(0===t)return;if(s.test(e))return void(n.url=e);let r;for(;null!==(r=a.exec(e));)n[r[1]]=r[3]}),{url:n.url,width:n.width,height:n.height}}function u(e){return o.test(e)?c(e):i.test(e)?{url:l(e)}:{url:e}}},80427(e,t,n){"use strict";n.d(t,{B:()=>s,V:()=>r});const r=30,s="jetpack-new-instagram-connection"},57926(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),s=n(27723),o=n(79654),i=n(80427),a=n(10790);const __=s.__,_n=s._n;function l({accountImageTotal:e,attributes:t,currentUserConnected:n,disconnectFromService:l,shouldRenderSidebarNotice:c,setAttributes:u}){const{accessToken:d,columns:p,count:h,instagramUser:m,isStackedOnMobile:g,spacing:f}=t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.PanelBody,{title:__("Account Settings","jetpack"),children:[(0,a.jsxs)(r.PanelRow,{children:[(0,a.jsx)("span",{children:__("Account","jetpack")}),(0,a.jsxs)(o.N,{openInNewTab:!0,href:`https://www.instagram.com/${m}/`,children:["@",m]})]}),n&&(0,a.jsx)(r.PanelRow,{children:(0,a.jsx)(r.Button,{isDestructive:!0,variant:"link",onClick:()=>l(d),children:__("Disconnect your account","jetpack")})})]}),(0,a.jsxs)(r.PanelBody,{title:__("Display Settings","jetpack"),children:[c?(()=>{const t=e?(0,s.sprintf)(/* translators: %s: the number of posts. */
_n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",e,"jetpack"),e):__("There are currently no posts in your Instagram account.","jetpack");return(0,a.jsx)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice",children:(0,a.jsx)(r.Notice,{isDismissible:!1,status:"info",children:t})})})():null,(0,a.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Posts","jetpack"),value:h,onChange:e=>u({count:e}),min:1,max:i.V}),(0,a.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Columns","jetpack"),value:p,onChange:e=>u({columns:e}),min:1,max:6}),(0,a.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Image Spacing (px)","jetpack"),value:f,onChange:e=>u({spacing:e}),min:0,max:50}),(0,a.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Stack on mobile","jetpack"),checked:g,onChange:()=>u({isStackedOnMobile:!g})})]})]})}},11148(e,t,n){"use strict";n.d(t,{A:()=>y});var r=n(85985),s=n(94715),o=n(56427),i=n(86087),a=n(27723),l=n(13022),c=n(66087),u=n(78218),d=n(89525),p=n(80427),h=n(57926),m=n(86975),g=n(49783),f=n(53495),b=n(80619),v=(n(93726),n(10790));const __=a.__,y=(0,o.withNotices)(e=>{const t=(0,s.useBlockProps)(),{attributes:n,isSelected:a,noticeOperations:y,noticeUI:k,setAttributes:x}=e,{accessToken:_,align:w,columns:j,count:C,isStackedOnMobile:A,spacing:S}=n;(0,i.useEffect)(()=>{const e=(0,u.y)(d.attributes,n);(0,c.isEqual)(e,n)||x(e)},[n,x]);const[E,T]=(0,i.useState)(_),{isRequestingWpcomConnectUrl:N,wpcomConnectUrl:P}=(0,f.A)(),{images:B,isLoadingGallery:R,setImages:I}=(0,b.A)({accessToken:_,noticeOperations:y,setAttributes:x,setSelectedAccount:T}),{connectToService:D,disconnectFromService:L,isConnecting:F,isRequestingUserConnections:M,userConnections:O}=(0,g.A)({accessToken:_,noticeOperations:y,selectedAccount:E,setAttributes:x,setImages:I,setSelectedAccount:T}),U=(0,r.gB)(),z=C>B.length?B.length:C,$=!R&&(!_||(0,c.isEmpty)(B)),q=!$,H=_&&R&&(0,c.isEmpty)(B),V=!$&&!H,G=(0,l.A)(t.className,{[`align${w}`]:w}),W=(0,l.A)("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${j}`,{"is-stacked-on-mobile":A}),Z={gridGap:S,"--latest-instagram-posts-spacing":S?`${S}px`:void 0},J={padding:S},K=e=>{if(B[e]){const t=B[e];return(0,v.jsx)(m.A,{alt:t.title||t.url,src:t.url,attributes:n,spacing:S})}return(0,v.jsx)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})},Y=()=>{E&&p.B!==E?x({accessToken:E,instagramUser:O.find(e=>e.token===E).username}):D()};return(0,v.jsxs)("div",{...t,className:G,children:[$&&(0,v.jsx)(o.Placeholder,{icon:"instagram",instructions:U?M||O.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:k,children:U?(()=>{const e=O.length>0,t=[...O.map(e=>({label:`@${e.username}`,value:e.token})),{label:__("Add a new account","jetpack"),value:p.B}],n=F||M||e&&!E;return(0,v.jsxs)("div",{children:[e&&(0,v.jsx)(o.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>T(e),options:t,selected:E}),p.B===E&&(0,v.jsx)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions",children:__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")}),(0,v.jsxs)(o.Button,{disabled:n,variant:"primary",onClick:Y,children:[F&&__("Connecting…","jetpack"),M&&__("Loading your connections…","jetpack"),!F&&!M&&__("Connect to Instagram","jetpack")]})]})})():(0,v.jsx)(o.Button,{disabled:N||!P,href:P,variant:"secondary",children:__("Connect to WordPress.com","jetpack")})}),H&&(0,v.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,v.jsx)(o.Spinner,{}),(0,v.jsx)("p",{children:__("Embedding…","jetpack")})]}),V&&(0,v.jsx)("div",{className:W,style:Z,children:Array.from(Array(a?C:z),(e,t)=>(0,v.jsx)("span",{className:(0,l.A)("wp-block-jetpack-instagram-gallery__grid-post"),style:J,children:K(t)},t))}),q&&(0,v.jsx)(s.InspectorControls,{children:(0,v.jsx)(h.A,{accountImageTotal:B.length,attributes:n,currentUserConnected:U,disconnectFromService:L,shouldRenderSidebarNotice:q&&!H&&B.length<C,setAttributes:x})})]})})},92585(e,t,n){"use strict";var r=n(74997),s=n(94375),o=n(89525),i=n(11148),a=n(85793);(0,s.M)(o,{edit:i.A,save:a.A,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"wpcom_instagram_widget"===e,transform:({instance:e})=>(0,r.createBlock)("jetpack/instagram-gallery",{columns:e.raw.columns,count:e.raw.count,accessToken:e.raw.token_id})}]}})},86975(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087),s=n(13022),o=n(10790);function i({src:e,alt:t,spacing:n}){const[i,a]=(0,r.useState)(!1),[l,c]=(0,r.useState)("auto"),u=(0,r.useRef)(void 0),d=()=>{a(!0),c("auto")};(0,r.useEffect)(()=>{const t=e;if(t){const e=new window.Image;e.src=t,e.onload=d}u.current&&c(u.current.parentNode.getBoundingClientRect().width)},[e]);const p=-1*n,h=(0,s.A)("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),m=i?{margin:p}:{margin:p,height:l},g=(0,s.A)({"is-loaded":i});return(0,o.jsx)("span",{style:m,className:h,children:(0,o.jsx)("img",{alt:t,className:g,ref:u,src:e})})}},85793(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);const o=({attributes:{instagramUser:e}})=>{const t=r.useBlockProps.save();return e&&(0,s.jsx)("div",{...t,children:(0,s.jsx)("a",{href:`https://www.instagram.com/${e}/`,rel:"noopener noreferrer",target:"_blank",children:`https://www.instagram.com/${e}/`})})};n.dn(o)},49783(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(85985),s=n(51119),o=n(1455),i=n.n(o),a=n(86087),l=n(27723),c=n(80427);const __=l.__;function u({accessToken:e,noticeOperations:t,selectedAccount:n,setAttributes:o,setImages:l,setSelectedAccount:u}){const[d,p]=(0,a.useState)(!1),[h,m]=(0,a.useState)(!1),[g,f]=(0,a.useState)([]),b=(0,r.gB)();(0,a.useEffect)(()=>{!e&&b&&(m(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then(e=>{m(!1),f(e)}).catch(()=>{m(!1),f([])}))},[e,b]),(0,a.useEffect)(()=>{c.B===n||g.find(e=>e.token===n)||u(void 0)},[n,u,g]);return{connectToService:()=>{t.removeAllNotices(),p(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then(e=>{const t=new s.A;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",({keyring_id:e})=>{if(p(!1),e){const t=e.toString();o({accessToken:t}),u(t)}}),t.on("close",e=>{"connect-to-instagram-popup"===e&&p(!1)})}).catch(()=>{t.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p(!1)})},disconnectFromService:()=>{t.removeAllNotices(),o({accessToken:void 0,instagramUser:void 0}),l([])},isConnecting:d,isRequestingUserConnections:h,userConnections:g}}},53495(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(85985),s=n(1455),o=n.n(s),i=n(47143),a=n(86087),l=n(93832);function c(){const{isAutoDraft:e}=(0,i.useSelect)(e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}}),{savePost:t}=(0,i.useDispatch)("core/editor"),[n,s]=(0,a.useState)(),[c,u]=(0,a.useState)(!1),d=(0,r.gB)();return(0,a.useEffect)(()=>{d||n||c||(e?t():(u(!0),o()({path:(0,l.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then(e=>{s(e),u(!1)})))},[d,e,c,t,n]),{isRequestingWpcomConnectUrl:c,wpcomConnectUrl:n}}},80619(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(1455),s=n.n(r),o=n(86087),i=n(27723),a=n(93832),l=n(66087),c=n(80427);const __=i.__;function u({accessToken:e,noticeOperations:t,setAttributes:n,setSelectedAccount:r}){const[i,u]=(0,o.useState)([]),[d,p]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{e&&(t.removeAllNotices(),p(!0),s()({path:(0,a.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:e,count:c.V})}).then(({external_name:e,images:s})=>{if(p(!1),!s||!Array.isArray(s))return t.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),u([]),n({accessToken:void 0,instagramUser:void 0}),void r(void 0);(0,l.isEmpty)(s)&&t.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),n({instagramUser:e}),u(s)}).catch(()=>{p(!1),u([]),n({accessToken:void 0,instagramUser:void 0}),r(void 0)}))},[e,n,r]),{images:i,isLoadingGallery:d,setImages:u}}},40483(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(56427),o=n(27723),i=n(13022),a=n(54790),l=n(10790);const __=o.__,c={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},u=({attributes:e,setAttributes:t,audition:n})=>{const{emailPlaceholder:o=a.Bd,consentText:u=a.Do,processingLabel:d=a.HD,successLabel:p=a.XO,errorLabel:h=a.Ys}=e,m={[a.k1]:d,[a.EM]:p,[a.Dc]:h}[n];return(0,l.jsxs)("div",{className:(0,i.A)({[`${a.j7}_notication-audition`]:n}),children:[(0,l.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-label":o,className:`${a.j7}_text-input`,disabled:!0,onChange:()=>!1,placeholder:o,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,l.jsx)(r.InnerBlocks,{template:[[c.name,c.attributes]],templateLock:"all"}),(0,l.jsx)(r.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:u,onChange:e=>t({consentText:e}),inlineToolbar:!0}),n&&(0,l.jsx)("div",{className:`${a.j7}_notification ${a.j7}_${n}`,role:n===a.Dc?"alert":"status",children:m})]})}},54790(e,t,n){"use strict";n.d(t,{Bd:()=>d,Dc:()=>i,Do:()=>p,EM:()=>o,HD:()=>h,JA:()=>c,XO:()=>m,Ys:()=>g,an:()=>l,gI:()=>u,j7:()=>a,k1:()=>s});var r=n(27723);const __=r.__,s="processing",o="success",i="error",a="wp-block-jetpack-mailchimp",l=0,c=1,u=2,d=__("Enter your email","jetpack"),p=__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack"),h=__("Processing…","jetpack"),m=__("Success! You're on the list.","jetpack"),g=__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},20093(e,t,n){"use strict";n.d(t,{o:()=>p});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(79654),l=n(54790),c=n(60462),u=n(10790);const __=i.__,d=({auditionNotification:e,clearAudition:t,setAttributes:n,emailPlaceholder:r=l.Bd,processingLabel:o=l.HD,successLabel:i=l.XO,errorLabel:d=l.Ys,interests:p,signupFieldTag:h,signupFieldValue:m,connectURL:g})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.PanelBody,{title:__("Text Elements","jetpack"),children:(0,u.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Email Placeholder","jetpack"),value:r,onChange:e=>{n({emailPlaceholder:e}),t()}})}),(0,u.jsxs)(s.PanelBody,{title:__("Notifications","jetpack"),children:[(0,u.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Processing text","jetpack"),value:o,onChange:t=>{n({processingLabel:t}),e(l.k1)}}),(0,u.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Success text","jetpack"),value:i,onChange:t=>{n({successLabel:t}),e(l.EM)}}),(0,u.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Error text","jetpack"),value:d,onChange:t=>{n({errorLabel:t}),e(l.Dc)}})]}),(0,u.jsxs)(s.PanelBody,{title:__("Mailchimp Groups","jetpack"),children:[(0,u.jsx)(c.A,{interests:p,onChange:(e,t)=>{const r=[...new Set([...p,e])].filter(n=>!(n===e&&!t)&&n);n({interests:r})}}),(0,u.jsx)(a.N,{openInNewTab:!0,href:"https://mailchimp.com/help/send-groups-audience/",children:__("Learn about groups","jetpack")})]}),(0,u.jsxs)(s.PanelBody,{title:__("Signup Location Tracking","jetpack"),children:[(0,u.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:h,onChange:e=>n({signupFieldTag:e})}),(0,u.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:m,onChange:e=>n({signupFieldValue:e})}),(0,u.jsx)(a.N,{openInNewTab:!0,href:"https://mailchimp.com/help/determine-webpage-signup-location/",children:__("Learn about signup location tracking","jetpack")})]}),(0,u.jsx)(s.PanelBody,{title:__("Mailchimp Connection","jetpack"),children:(0,u.jsx)(a.N,{openInNewTab:!0,href:g,children:__("Manage Connection","jetpack")})})]}),p=({connectURL:e,attributes:t,setAttributes:n,setAudition:s})=>{const{emailPlaceholder:i=l.Bd,processingLabel:a=l.HD,successLabel:c=l.XO,errorLabel:p=l.Ys,interests:h,signupFieldTag:m,signupFieldValue:g}=t,f=(0,o.useRef)(null),b=()=>s(null);return(0,u.jsx)(r.InspectorControls,{children:(0,u.jsx)(d,{auditionNotification:e=>{s(e),f.current&&clearTimeout(f.current),f.current=setTimeout(b,3e3)},clearAudition:b,emailPlaceholder:i,processingLabel:a,successLabel:c,errorLabel:p,interests:h,setAttributes:n,signupFieldTag:m,signupFieldValue:g,connectURL:e})})}},31491(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(74997),s=n(27723),o=n(66087);const __=s.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"],a={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=Object.fromEntries(Object.entries(e).filter(([e])=>!i.includes(e))),n={text:(s=e).submitButtonText||__("Join my email list","jetpack"),textColor:s.textButtonColor,customTextColor:s.customTextButtonColor,backgroundColor:s.backgroundButtonColor,customBackgroundColor:s.customBackgroundButtonColor};var s;return[t,[(0,r.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,o.isEmpty)(t)||Object.entries(e).some(([e,t])=>t&&i.includes(e)),save:()=>null}},52243(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(85985),s=n(1455),o=n.n(s),i=n(94715),a=n(56427),l=n(86087),c=n(93832),u=n(37120),d=n(40483),p=n(54790),h=n(20093),m=n(88368),g=n(36837),f=n(10790);const b=(0,r.sh)(u),v=(0,a.withNotices)(({attributes:e,setAttributes:t,notices:n,noticeUI:s,noticeOperations:a})=>{const u=(0,i.useBlockProps)(),[v,y]=(0,l.useState)(null),[k,x]=(0,l.useState)(p.an),[_,w]=(0,l.useState)(null),[j,C]=(0,l.useState)(null),A=(0,l.useCallback)(()=>{const e=(0,r.gB)();e?o()({path:"/wpcom/v2/mailchimp",method:"GET"}).then(({connect_url:t,code:n})=>{w(t),x("connected"===n?p.JA:p.gI),C(e)},({message:t})=>{w(null),x(p.gI),C(e),a.removeAllNotices(),a.createErrorNotice(t)}):o()({path:(0,c.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then(t=>{w(t),x(p.gI),C(e)})},[w,x,C,a]);let S;return(0,l.useEffect)(()=>{A()},[A]),e.preview?S=(0,f.jsx)(d.A,{attributes:e,setAttributes:t,audition:v}):k===p.an?S=(0,f.jsx)(m.A,{icon:b,notices:n}):k===p.gI?S=j?(0,f.jsx)(g.W,{icon:b,notices:n,connectURL:_,apiCall:A}):(0,f.jsx)(g.V,{icon:b,notices:n,connectURL:_}):k===p.JA&&(S=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.o,{connectURL:_,attributes:e,setAttributes:t,setAudition:y}),(0,f.jsx)(d.A,{attributes:e,setAttributes:t,audition:v})]})),(0,f.jsxs)("div",{...u,children:[s,S]})})},97618(e,t,n){"use strict";var r=n(94375),s=n(37120),o=n(31491),i=n(52243),a=n(96014),l=n(47638);n(31369);(0,r.M)(s,{edit:i.A,save:a.A,deprecated:[o.A],transforms:l.A})},88368(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(56427),s=n(27723),o=n(54790),i=n(10790);const __=s.__,a=({icon:e,notices:t})=>(0,i.jsx)(r.Placeholder,{icon:e,notices:t,className:o.j7,label:__("Mailchimp","jetpack"),children:(0,i.jsx)("div",{className:"align-center",children:(0,i.jsx)(r.Spinner,{})})})},60462(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(1455),s=n.n(r),o=n(56427),i=n(86087),a=n(10790);class l extends i.Component{state={interest_categories:[]};componentDidMount(){this.retrieveGroups()}retrieveGroups=()=>{s()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then(e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})})};render=()=>{const{interest_categories:e}=this.state,{interests:t,onChange:n}=this.props;return(0,a.jsx)(i.Fragment,{children:e&&(e||[]).map(e=>e.interests.map(e=>(0,a.jsx)(o.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>n(e.id,t)},e.id)))})}}const c=l;l.defaultProps={interests:[],onChange:()=>null}},36837(e,t,n){"use strict";n.d(t,{V:()=>l,W:()=>a});var r=n(56427),s=n(27723),o=n(54790),i=n(10790);const __=s.__,a=({icon:e,notices:t,connectURL:n,apiCall:s})=>(0,i.jsxs)(r.Placeholder,{className:o.j7,icon:e,label:__("Mailchimp","jetpack"),notices:t,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack"),children:[(0,i.jsx)(r.Button,{variant:"secondary",href:n,target:"_blank",children:(0,i.jsx)("span",{children:__("Set up Mailchimp form","jetpack")})}),(0,i.jsx)("div",{className:`${o.j7}-recheck`,children:(0,i.jsx)(r.Button,{variant:"link",onClick:s,children:(0,i.jsx)("span",{children:__("Re-check Connection","jetpack")})})})]}),l=({icon:e,notices:t,connectURL:n})=>(0,i.jsx)(r.Placeholder,{className:o.j7,icon:e,label:__("Mailchimp","jetpack"),notices:t,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack"),children:(0,i.jsx)(r.Button,{variant:"secondary",href:n,children:__("Connect to WordPress.com","jetpack")})})},96014(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);const o=()=>{const e=r.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(r.InnerBlocks.Content,{})})};n.dn(o)},47638(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(74997);const s={to:[{type:"block",blocks:["jetpack/subscriptions"],transform:()=>(0,r.createBlock)("jetpack/subscriptions")}]}},98144(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(56427),s=n(86087),o=n(27723),i=n(67670),a=(n(30938),n(10790));const __=o.__;class l extends s.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:s,mapProvider:o}=this.props;return(0,a.jsxs)(r.Button,{className:"component__add-point",children:[__("Add marker","jetpack"),(0,a.jsxs)(r.Popover,{className:"component__add-point__popover",position:"bottom center",children:[(0,a.jsx)(r.Button,{className:"component__add-point__close",onClick:e,children:(0,a.jsx)(r.Dashicon,{icon:"no"})}),(0,a.jsx)(i.A,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:s,onError:n,mapProvider:o})]})]})}}l.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{},mapProvider:"mapbox"};const c=l},6199(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(86087),s=n(57500),o=n(14561),i=n(10790);const a=(0,r.forwardRef)((e,t)=>{if("mapkit"===e.mapProvider){const n={...e,ref:null};return(0,i.jsx)(o.A,{...n,ref:t})}return(0,i.jsx)(s.A,{...e,ref:t})})},19931(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(9216),s=n(15109),o=n(10790);const i=e=>"mapkit"===e.mapProvider?(0,o.jsx)(s.A,{...e}):(0,o.jsx)(r.A,{...e})},9216(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087),s=n(16815);class o extends r.Component{componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=(0,s.BY)(e),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,r.createPortal)(this.props.children,this.el):null}closeClick=()=>{this.props.unsetActiveMarker()};openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}o.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null};const i=o},15109(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),s=n(86087),o=n(27723),i=n(5389),a=n(10790);const __=o.__,l=()=>{const{activeMarker:e,setActiveMarker:t,calloutReference:n,admin:o,points:l,setPoints:c}=(0,i.ST)(),[u,d]=(0,s.useState)(l),[p,h]=(0,s.useState)(!1),{title:m,caption:g}=u.find(t=>t.id===e?.id)||{},f=t=>{const n=l.map(n=>n.id===e.id?{...n,...t}:n);d(n),h(!0)};return(0,s.useEffect)(()=>{!e&&p&&c(u)},[e,p,u,c]),(0,s.useEffect)(()=>{d(l),h(!1)},[l]),e&&n?(0,s.createPortal)((0,a.jsxs)(s.Fragment,{children:[o&&(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)(r.TextControl,{label:__("Marker Title","jetpack"),value:m,onChange:e=>f({title:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(r.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:g,rows:"2",tag:"textarea",onChange:e=>f({caption:e}),__nextHasNoMarginBottom:!0}),(0,a.jsxs)(r.Button,{onClick:()=>{const n=l.filter(t=>t.id!==e.id);d(n),h(!0),t(null)},className:"wp-block-jetpack-map__delete-btn",children:[(0,a.jsx)(r.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack")]})]}),!o&&(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)("h3",{children:m}),(0,a.jsx)("p",{children:g})]})]}),n):null}},56099(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(86087),s=n(34377),o=n(16815);n(50221);class i extends r.Component{componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&(this.marker.remove(),this.marker=null)}componentDidUpdate(){this.renderMarker()}handleClick=()=>{const{onClick:e}=this.props;e(this)};getPoint=()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]};renderMarker(){const{map:e,point:t,mapboxgl:n,markerColor:r,mapRef:i}=this.props,{handleClick:a}=this,l=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:c}=(0,s.sG)(i.current),u=this.marker?this.marker.getElement():c.createElement("div");this.marker?this.marker.setLngLat(l):(u.className="wp-block-jetpack-map-marker",this.marker=new n.Marker(u).setLngLat(l).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",a)),(0,o.iU)(u,r)}render(){return null}}i.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}};const a=i},57500(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(56427),s=n(86087),o=n(27723),i=n(66087),a=n(34377),l=n(55740),c=n(82063),u=n(16815),d=n(91844),p=n(19931),h=n(56099),m=n(10790);const __=o.__;class g extends s.Component{constructor(){super(...arguments),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,s.createRef)(),this.debouncedSizeMap=(0,i.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:n,markerColor:o}=this.props,{map:i,activeMarker:a,mapboxgl:l}=this.state,{onMarkerClick:c,deleteActiveMarker:u,updateActiveMarker:d}=this,g=a?.props?.point||{},{title:f,caption:b}=g,v=s.Children.map(n,e=>{const t=e?.props?.tagName;if("AddPoint"===t)return e}),y=i&&l&&e.map((e,t)=>(0,m.jsx)(h.A,{mapRef:this.mapRef,point:e,index:t,map:i,mapboxgl:l,markerColor:o,onClick:c},t)),k=l&&(0,m.jsxs)(p.A,{activeMarker:a,map:i,mapboxgl:l,unsetActiveMarker:()=>this.setState({activeMarker:null}),children:[a&&t&&(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)(r.TextControl,{label:__("Marker Title","jetpack"),value:f,onChange:e=>d({title:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,m.jsx)(r.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:e=>d({caption:e}),__nextHasNoMarginBottom:!0}),(0,m.jsxs)(r.Button,{onClick:u,className:"wp-block-jetpack-map__delete-btn",children:[(0,m.jsx)(r.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack")]})]}),a&&!t&&(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)("h3",{children:f}),(0,m.jsx)("p",{children:b})]})]});return(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef,children:y}),k,v]})}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:n,children:r,points:s,mapStyle:o,mapDetails:i,scrollToZoom:a,showFullscreenButton:l}=this.props,{map:c,fullscreenControl:u}=this.state;n&&n.length>0&&n!==e.apiKey&&this.loadMapLibraries(),r!==e.children&&!1!==r&&this.clearCurrentMarker(),s!==e.points&&this.setBoundsByMarkers(),s.length!==e.points.length&&this.clearCurrentMarker(),o===e.mapStyle&&i===e.mapDetails||c.setStyle(this.getMapStyle()),a!==e.scrollToZoom&&(a?c.scrollZoom.enable():c.scrollZoom.disable()),l!==e.showFullscreenButton&&(l?(c.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):c.removeControl(u))}onMarkerClick=e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()};onMapClick=()=>{this.setState({activeMarker:null})};clearCurrentMarker=()=>{this.setState({activeMarker:null})};updateActiveMarker=e=>{const{points:t}=this.props,{activeMarker:n}=this.state,{index:r}=n.props,s=t.slice(0);Object.assign(s[r],e),this.props.onSetPoints(s)};deleteActiveMarker=()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:n}=t.props,r=e.slice(0);r.splice(n,1),this.props.onSetPoints(r),this.setState({activeMarker:null})};sizeMap=()=>{const{mapHeight:e}=this.props,{map:t}=this.state,n=this.mapRef.current;(0,d.A)(n,e),t.resize(),this.setBoundsByMarkers()};updateZoom=()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e)};setBoundsByMarkers=()=>{const{admin:e,onSetMapCenter:t,onSetZoom:n,points:r,zoom:s}=this.props,{map:o,activeMarker:i,mapboxgl:a,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!o)return;if(r.length&&e?o.dragPan.disable():o.dragPan.enable(),!r.length)return;if(i)return;const d=(0,u.ES)(a,r);if(t(d.getCenter()),r.length>1){(0,u._t)(o,d),this.setState({boundsSetProgrammatically:!0});try{o.removeControl(l)}catch{}}else{if(o.setCenter(d.getCenter()),c){const e=12;o.setZoom(e),n(e)}else o.setZoom(parseInt(s,10));o.addControl(l),this.setState({boundsSetProgrammatically:!1})}};getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,c.o)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}scriptsLoaded=()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)};loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,a.sG)(this.mapRef.current),n={"mapbox-gl-js":()=>{(0,a.Cu)(t,"mapboxgl").then(t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)})}};(0,a.a$)(l,n,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:n,onMapLoaded:r,onError:s,scrollToZoom:o,showFullscreenButton:i,admin:a}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:(0,u.jF)(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void s("mapbox_error",e.message)}o||l.scrollZoom.disable();const c=new t.FullscreenControl;l.on("error",e=>{s("mapbox_error",e.error.message)});const d=new t.NavigationControl({showCompass:!1,showZoom:!0});l.on("zoomend",()=>{this.props.onSetZoom(l.getZoom())}),l.on("moveend",()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(l.getCenter())}),l.getCanvas().addEventListener("click",this.onMapClick),this.setState(({map:e})=>{try{e?.remove()}catch{}return{map:l,zoomControl:d,fullscreenControl:c}},()=>{this.debouncedSizeMap(),l.addControl(d),i&&(l.addControl(c),a&&c._fullscreenButton&&(c._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),l.resize(),r(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)})}}g.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{},address:null};const f=g},14561(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),s=n(27534),o=n(5389),i=n(42470),a=n(19931),l=n(10790);const c=(0,r.forwardRef)(({admin:e,points:t=[],mapStyle:n="default",zoom:i=13,onSetZoom:c=()=>{},onSetMapCenter:d=()=>{},onMapLoaded:p=()=>{},onMarkerClick:h=()=>{},onError:m=()=>{},markerColor:g="red",mapCenter:f={},mapHeight:b=400,address:v=null,onSetPoints:y,children:k},x)=>{const{loaded:_,error:w,mapkit:j,currentDoc:C,currentWindow:A}=(0,o.PC)(x),{map:S}=(0,o.I3)(j,_,x),E=r.Children.map(k,e=>{const t=e?.props?.tagName;if("AddPoint"===t)return e}),[T,N]=(0,r.useState)(!1);(0,r.useEffect)(()=>{w&&m("mapkit_error",w)},[w,m]);return(0,r.useEffect)(()=>{const e=e=>{x.current.contains(e.target)||N(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[x]),(0,l.jsxs)(s.u,{value:{mapkit:j,map:S,loaded:_,currentDoc:C,currentWindow:A,admin:e,points:t,setPoints:y},children:[_&&j&&S?(0,l.jsx)(u,{address:v,mapCenter:f,mapStyle:n,zoom:i,onSetMapCenter:d,onSetZoom:c,onSetPoints:y,points:t,markerColor:g,onMarkerClick:h,onMapLoaded:p}):null,(0,l.jsxs)("div",{style:{height:b?`${b}px`:"400px",position:"relative"},className:"wp-block-jetpack-map__mapkit-wrapper",ref:x,onClick:()=>{N(!0)},children:[!T&&(0,l.jsx)("div",{className:"wp-block-jetpack-map__select-overlay"}),(0,l.jsx)("div",{className:"wp-block-jetpack-map__gm-container",style:{height:`${b}px`,position:"absolute",pointerEvents:T?"auto":"none"}})]}),E,(0,l.jsx)(a.A,{mapProvider:"mapkit"})]})}),u=(0,r.memo)(({address:e=null,mapCenter:t={},mapStyle:n="default",zoom:s=13,onSetMapCenter:a=()=>{},onSetZoom:l=()=>{},onSetPoints:c=()=>{},points:u=[],markerColor:d="red",onMarkerClick:p=()=>{},onMapLoaded:h=()=>{}})=>{const{map:m,mapkit:g,setActiveMarker:f,setPreviousCenter:b,setCalloutReference:v,currentDoc:y}=(0,o.ST)(),k=(0,r.useRef)(p),x=(0,r.useRef)(c),_=(0,r.useCallback)(e=>{f(e),b(m.center),k.current&&k.current(e),m.setCenterAnimated(new g.Coordinate(e.coordinates.latitude,e.coordinates.longitude))},[m,g,f,b,k]);return(0,o.FN)(t,a),(0,o.y7)(n),(0,o.LR)(s,l),(0,o.$H)(u,d,(0,i.K5)(y,v),_),(0,o.bY)(h),(0,o.wB)(e=>{f(null),e&&m.setCenterAnimated(e)}),(0,o.mA)(e,x),null}),d=c},19673(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(56427),o=n(27723),i=n(79654),a=n(16016),l=n(10790);const __=o.__,c=(0,l.jsx)(s.SVG,{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)(s.G,{id:"Page-1",fill:"none",fillRule:"evenodd",children:(0,l.jsxs)(s.G,{id:"outline-add_location-24px",transform:"translate(-5 -2)",children:[(0,l.jsx)(s.Polygon,{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,l.jsx)(s.Path,{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})]})})}),u=({attributes:e,setAttributes:t,apiKey:n,apiKeySource:o,apiKeyControl:u,onKeyChange:d,context:p,mapRef:h,minHeight:m,removeAPIKey:g,updateAPIKey:f,setPointVisibility:b,mapProvider:v})=>{const y=e=>{t({align:e}),h.current?.sizeMap&&setTimeout(h.current.sizeMap,0)};return"toolbar"===p?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.BlockAlignmentToolbar,{value:e.align,onChange:y,controls:["center","wide","full"]}),(0,l.jsx)(s.ToolbarGroup,{children:(0,l.jsx)(s.ToolbarButton,{icon:c,label:__("Add a marker","jetpack"),onClick:b})})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:e.markerColor,onChange:e=>t({markerColor:e}),label:__("Marker","jetpack")}]}),(0,l.jsxs)(s.PanelBody,{title:__("Settings","jetpack"),children:[(0,l.jsx)(s.__experimentalNumberControl,{label:__("Height in pixels","jetpack"),value:e.mapHeight||"",min:m,onChange:e=>{t({mapHeight:e})},size:"__unstable-large",step:10}),(0,l.jsx)(s.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Zoom level","jetpack"),help:e.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:e.points.length>1,value:Math.round(e.zoom),onChange:e=>{t({zoom:e}),h.current&&h.current.updateZoom&&setTimeout(h.current.updateZoom,0)},min:0,max:22}),"mapbox"===v?(0,l.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Show labels","jetpack"),checked:e.mapDetails,onChange:e=>t({mapDetails:e})}):null,(0,l.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:e.scrollToZoom,onChange:e=>t({scrollToZoom:e})}),"mapbox"===v?(0,l.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:e.showFullscreenButton,onChange:e=>t({showFullscreenButton:e})}):null]}),e.points.length?(0,l.jsx)(s.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1,children:(0,l.jsx)(a.A,{points:e.points,onChange:e=>{t({points:e})}})}):null,"mapbox"===v?(0,l.jsxs)(s.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1,children:[(0,l.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:"wpcom"===o&&(0,l.jsxs)(l.Fragment,{children:[__("You can optionally enter your own access token.","jetpack")," ",(0,l.jsx)(i.N,{openInNewTab:!0,href:"https://account.mapbox.com/access-tokens/",children:__("Find it on Mapbox","jetpack")})]}),label:__("Mapbox Access Token","jetpack"),value:u,onChange:d}),(0,l.jsx)("div",{className:"jetpack-map-token-settings",children:(0,l.jsxs)(s.__experimentalToggleGroupControl,{isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[(0,l.jsx)(s.__experimentalToggleGroupControlOption,{className:"components-button jetpack-update-token-button",label:__("Update Token","jetpack"),value:"update",onClick:f,disabled:!u||u===n}),(0,l.jsx)(s.__experimentalToggleGroupControlOption,{className:"components-button is-secondary",label:__("Remove Token","jetpack"),value:"remove",onClick:g,disabled:"wpcom"===o})]})})]}):null]})};n.dn(u)},1807(e,t,n){"use strict";n.d(t,{A:()=>r});const r={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,showFullscreenButton:!0,className:t}},save:n(66730).A}},66730(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087),s=n(10790);class o extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:r,points:o,zoom:i,mapCenter:a,markerColor:l,scrollToZoom:c,mapHeight:u}=e,d=o.map((e,t)=>{const{longitude:n,latitude:r}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+r+","+n;return(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:o,children:e.title})},t)}),p=t?`align${t}`:null;return(0,s.jsx)("div",{className:p,"data-map-style":n,"data-map-details":r,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(a),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,children:o.length>0&&(0,s.jsx)("ul",{children:d})})}}const i=o},43402(e,t,n){"use strict";n.d(t,{A:()=>r});const r={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,className:t}},save:n(34161).A}},34161(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087),s=n(10790);class o extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:r,points:o,zoom:i,mapCenter:a,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:d}=e,p=o.map((e,t)=>{const{longitude:n,latitude:r}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+r+","+n;return(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:o,children:e.title})},t)}),h=t?`align${t}`:null;return(0,s.jsx)("div",{className:h,"data-map-style":n,"data-map-details":r,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(a),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,"data-show-fullscreen-button":d||null,children:o.length>0&&(0,s.jsx)("ul",{children:p})})}}const i=o},61647(e,t,n){"use strict";n.d(t,{A:()=>C});var r=n(85985),s=n(1455),o=n.n(s),i=n(94715),a=n(56427),l=n(29491),c=n(47143),u=n(86087),d=n(27723),p=n(79654),h=n(90907),m=n(98144),g=n(6852),f=n(6199),b=n(19673),v=n(2905),y=n(25836),k=n(62393),x=n(44950),_=n(10790);const __=d.__,w=(0,r.sh)(g),j={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},C=(0,l.compose)(a.withNotices)(({setAttributes:e,attributes:t,noticeUI:n,notices:r,isSelected:s,noticeOperations:l})=>{const{address:d,mapDetails:g,points:C,zoom:A,mapCenter:S,markerColor:E,mapHeight:T,showFullscreenButton:N}=t,{toggleSelection:P}=(0,c.useDispatch)("core/block-editor"),{isPreviewMode:B}=(0,c.useSelect)(e=>{const{getSettings:t}=e(i.store);return{isPreviewMode:t().isPreviewMode}},[]),[R,I]=(0,u.useState)(!1),[D,L]=(0,u.useState)(0),[F,M]=(0,u.useState)(null),[O,U]=(0,u.useState)(null),[z,$]=(0,u.useState)(null),[q,H]=(0,u.useState)(null),V=(0,u.useRef)(null),G=(0,i.useBlockProps)(),{className:W}=G,Z=(0,h.D)(k.A,W),J=(0,x.A)({mapStyle:Z}),K=()=>{d&&F&&"mapkit"!==J&&(0,v.I)(d,F).then(t=>{if(t.features?.length){const n=t.features[0],r=[{title:n.text,placeTitle:n.text,caption:n.place_name,id:n.id,coordinates:{latitude:n.center[1],longitude:n.center[0]}}];e({points:r})}else te(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))}).catch(e=>te(null,e.message))},Y=(e=null,t="GET")=>new Promise((n,r)=>{const s="/wpcom/v2/service-api-keys/mapbox",i=e?{path:s,method:t,data:{service_api_key:e}}:{path:s,method:t};H(!0),o()(i).then(({service_api_key:e,service_api_key_source:t})=>{l.removeAllNotices(),L(e?2:1),M(e),U("wpcom"===t?"":e),$(t),H(!1),n()},({message:e})=>{te(null,e),L(1),H(!1),r()})}),Q=t=>{if(C.some(e=>e.id===t.id))return;const n=C.slice(0);n.push(t),e({points:n}),I(!1)},X=()=>{l.removeAllNotices(),O&&Y(O,"POST")},ee=()=>Y(null,"DELETE"),te=(e,t)=>{l.removeAllNotices(),l.createErrorNotice(t)},ne=(t,n,r,s)=>{P(!0);const o=V?.current?.mapRef??V;if(o){const t=parseInt(o.current.offsetHeight+s.height,10);e({mapHeight:t}),o.current.sizeMap&&setTimeout(o.current.sizeMap,0)}};let re;if((0,u.useEffect)(()=>{"mapbox"===J?Y().then(K):L(2)},[]),(0,u.useEffect)(K,[d]),(0,u.useEffect)(()=>{W&&!F&&(L(0),Y())},[W]),B){const e=k.A.find(e=>e.name===Z);re=(0,_.jsx)("div",{children:(0,_.jsx)("img",{alt:__("Map Preview","jetpack"),src:e?e.preview:y,style:{width:"100%",height:T||"400px",objectFit:"cover"}})})}else if(0===D)re=(0,_.jsx)(a.Placeholder,{icon:w,children:(0,_.jsx)(a.Spinner,{})});else if(1===D)re=(0,_.jsx)(a.Placeholder,{icon:w,label:__("Map","jetpack"),notices:r,children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("p",{className:"components-placeholder__instructions",children:[__("To use the map block, you need an Access Token.","jetpack"),(0,_.jsx)("br",{}),(0,_.jsx)(p.N,{openInNewTab:!0,href:"https://www.mapbox.com",children:__("Create an account or log in to Mapbox.","jetpack")}),(0,_.jsx)("br",{}),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")]}),(0,_.jsxs)("form",{children:[(0,_.jsx)("input",{type:"text",className:"components-placeholder__input",disabled:q,placeholder:__("Paste Token Here","jetpack"),value:O,onChange:e=>U(e.target.value)}),(0,_.jsx)(a.Button,{variant:"secondary",disabled:q||!O||O.length<1,onClick:X,children:__("Set Token","jetpack")})]})]})});else if(2===D){const n=e=>U(e),r=s&&C.length<=1;re=(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(i.BlockControls,{children:(0,_.jsx)(b.A,{attributes:t,setAttributes:e,apiKey:F,apiKeySource:z,apiKeyControl:O,onKeyChange:n,setPointVisibility:()=>I(!0),context:"toolbar",mapRef:V,mapProvider:J})}),(0,_.jsx)(i.InspectorControls,{children:(0,_.jsx)(b.A,{attributes:t,setAttributes:e,apiKey:F,apiKeySource:z,apiKeyControl:O,onKeyChange:n,mapRef:V,minHeight:400,removeAPIKey:ee,updateAPIKey:X,mapProvider:J})}),(0,_.jsx)(a.ResizableBox,{size:{height:T||"auto",width:"100%"},grid:[10,10],showHandle:s,minHeight:400,enable:j,onResizeStart:()=>P(!1),onResizeStop:ne,children:(0,_.jsx)("div",{className:"wp-block-jetpack-map__map_wrapper",children:(0,_.jsx)(f.A,{ref:V,address:d,scrollToZoom:r,showFullscreenButton:N,mapStyle:Z||"default",mapDetails:g,mapHeight:T,points:C,zoom:A,mapCenter:S,markerColor:E,onSetZoom:t=>{e({zoom:t})},admin:!0,apiKey:F,onSetPoints:t=>e({points:t}),onSetMapCenter:t=>e({mapCenter:t}),onMapLoaded:()=>I(!C.length),onMarkerClick:()=>I(!1),onError:te,mapProvider:J,children:s&&R&&(0,_.jsx)(m.A,{onAddPoint:Q,onClose:()=>I(!1),apiKey:F,onError:te,tagName:"AddPoint",mapProvider:J})})})})]})}return(0,_.jsxs)("div",{...G,children:[n,re]})})},12742(e,t,n){"use strict";var r=n(94375),s=n(6852),o=n(1807),i=n(43402),a=n(61647),l=n(2194),c=n(62393);n(64525),n(2753);(0,r.M)(s,{edit:a.A,save:l.A,styles:c.A,deprecated:[i.A,o.A]})},2905(e,t,n){"use strict";function r(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then(e=>e.json())}n.d(t,{I:()=>r})},67670(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(96687),s=n(25786),o=n(10790);const i=e=>{const t="mapbox"===e.mapProvider?r.A:s.A;return(0,o.jsx)(t,{...e})}},96687(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(56427),s=n(86087),o=n(27723),i=n(97566),a=n(10790);const l=(0,o.__)("Add a marker…","jetpack");class c extends s.Component{constructor(){super(...arguments),this.textRef=(0,s.createRef)(),this.containerRef=(0,s.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,a.jsx)("span",{children:e.place_name}),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout(()=>{this.containerRef.current.querySelector("input").focus()},50)}getOptionCompletion=e=>{const{value:t}=e,n={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(n),t.text};search=e=>{const{apiKey:t,onError:n}=this.props,r="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise(function(e,t){const s=new XMLHttpRequest;s.open("GET",r),s.onload=function(){if(200===s.status){const t=JSON.parse(s.responseText);e(t.features)}else{const e=JSON.parse(s.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},s.send()})};onReset=()=>{this.textRef.current.value=null};render(){const{label:e}=this.props;return(0,a.jsx)("div",{ref:this.containerRef,children:(0,a.jsx)("div",{className:"components-location-search",children:(0,a.jsx)(i.A,{completer:this.autocompleter,onReset:this.onReset,children:({isExpanded:t,listBoxId:n,activeId:s,onChange:o,onKeyDown:i})=>(0,a.jsx)(r.TextControl,{label:e,placeholder:l,ref:this.textRef,onChange:o,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":s,onKeyDown:i,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})})})}}c.defaultProps={onError:()=>{}};const u=c},25786(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(56427),s=n(86087),o=n(27723),i=n(97566),a=n(5389),l=n(10790);const c=(0,o.__)("Add a marker…","jetpack"),u=({label:e,onAddPoint:t})=>{const n=(0,s.useRef)(void 0),o=(0,s.useRef)(void 0),{mapkit:u}=(0,a.ST)(),d=new u.Search({includePointsOfInterest:!1}),p={name:"placeSearch",options:async e=>new Promise(function(t,n){d.autocomplete(e,(e,r)=>{if(e)return void n(e);const s=(r?.results.filter(e=>e.coordinate)??[]).map(e=>({...e,placeName:e.displayLines?.join(", "),original:e}));t(s)})}),isDebounced:!0,getOptionLabel:e=>(0,l.jsx)("span",{children:e.placeName}),getOptionKeywords:e=>[e.placeName],getOptionCompletion:e=>{const{value:n}=e,r={placeTitle:n.placeName,title:n.placeName,caption:n.placeName,coordinates:{longitude:n.coordinate.longitude,latitude:n.coordinate.latitude},id:`${n.placeName} ${Number(n.coordinate.latitude).toFixed(2)} ${Number(n.coordinate.longitude).toFixed(2)}`};return d.search(n.original,(e,n)=>{if(!e){const{places:e}=n;if(e.length>0){const t=e[0];r.coordinates={longitude:t.coordinate.longitude,latitude:t.coordinate.latitude}}}t(r)}),n.placeName}};return(0,s.useEffect)(()=>{setTimeout(()=>{n.current.querySelector("input").focus()},50)},[]),(0,l.jsx)("div",{ref:n,children:(0,l.jsx)("div",{className:"components-location-search",children:(0,l.jsx)(i.A,{completer:p,onReset:()=>{o.current.value=""},children:({isExpanded:t,listBoxId:n,activeId:s,onChange:i,onKeyDown:a})=>(0,l.jsx)(r.TextControl,{label:e,placeholder:c,ref:o,onChange:i,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":s,onKeyDown:a,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})})})}},16016(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(56427),s=n(86087),o=(n(52918),n(10790));class i extends s.Component{constructor(){super(...arguments),this.state={selectedCell:null}}onDeletePoint=e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,s=n.slice(0);s.splice(t,1),r(s)};setMarkerField(e,t,n){const{points:r,onChange:s}=this.props,o=r.slice(0);o[n][e]=t,s(o)}render(){const{points:e}=this.props,t=e.map((e,t)=>(0,o.jsxs)(r.PanelBody,{title:e.placeTitle,initialOpen:!1,children:[(0,o.jsx)(r.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,o.jsx)(r.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t),__nextHasNoMarginBottom:!0}),(0,o.jsxs)(r.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn",children:[(0,o.jsx)(r.Dashicon,{icon:"trash",size:"15"})," Delete Marker"]})]},e.id));return(0,o.jsx)("div",{className:"component__locations",children:(0,o.jsx)(r.Panel,{className:"component__locations__panel",children:t})})}}i.defaultProps={points:Object.freeze([]),onChange:()=>{}};const a=i},97566(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(56427),s=n(29491),o=n(86087),i=n(27723),a=n(48558),l=n(13022),c=n(66087),u=n(10790);const __=i.__,_n=i._n;function d(e=[],t=10){const n=[];for(let r=0;r<e.length;r++){const s=e[r];if(n.push(s),n.length===t)break}return n}class p extends o.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),this.debouncedLoadOptions=(0,c.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}select=e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()};reset=()=>{this.setState(this.constructor.getInitialState())};handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:n}=e,r=this.activePromise=Promise.resolve("function"==typeof n?n(t):n).then(t=>{if(r!==this.activePromise)return;const n=t.map((t,n)=>({key:`${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]})),s=d(n),o=s.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:s,selectedIndex:o,isOpen:s.length>0}),this.announce(s)})}onChange=e=>{const{completer:t}=this.props,{options:n}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const r=t?d(n):[];t&&this.setState({selectedIndex:0,filteredOptions:r,query:e})};onKeyDown=e=>{const{isOpen:t,selectedIndex:n,filteredOptions:r}=this.state;if(!t)return;let s;switch(e.keyCode){case a.UP:s=(0===n?r.length:n)-1,this.setState({selectedIndex:s});break;case a.DOWN:s=(n+1)%r.length,this.setState({selectedIndex:s});break;case a.ENTER:this.select(r[n]);break;case a.LEFT:case a.RIGHT:case a.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()};announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,i.sprintf)(/* translators: %d: the number of results. */
_n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:n,instanceId:s,completer:o}=this.props,{selectedIndex:i,filteredOptions:a}=this.state,{key:c=""}=a[i]||{},{className:d}=o,p=a.length>0,h=p?`components-autocomplete-listbox-${s}`:null,m=p?`components-autocomplete-item-${s}-${c}`:null;return(0,u.jsxs)("div",{className:"components-autocomplete",children:[n({isExpanded:p,listBoxId:h,activeId:m,onChange:e,onKeyDown:t}),p&&(0,u.jsx)(r.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0,children:(0,u.jsx)("div",{id:h,role:"listbox",className:"components-autocomplete__results",children:a.map((e,t)=>(0,u.jsx)(r.Button,{id:`components-autocomplete-item-${s}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:(0,l.A)("components-autocomplete__result",d,{"is-selected":t===i}),onClick:()=>this.select(e),children:e.label},e.key))})})]})}}const h=(0,s.compose)([r.withSpokenMessages,s.withInstanceId,r.withFocusOutside])(p)},82063(e,t,n){"use strict";function r(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}n.d(t,{o:()=>r})},16815(e,t,n){"use strict";n.d(t,{BY:()=>a,ES:()=>s,_t:()=>o,iU:()=>i,jF:()=>r});const r=e=>Object.hasOwn(e,"lat")&&Object.hasOwn(e,"lng")?e:{lat:e.latitude||0,lng:e.longitude||0};function s(e,t){const n=new e.LngLatBounds;return t.forEach(e=>{n.extend([e.coordinates.longitude,e.coordinates.latitude])}),n}function o(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}function i(e,t){e.innerHTML=`\n\t\t<?xml version="1.0" encoding="UTF-8"?>\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t<g fill-rule="evenodd">\n\t\t\t\t<path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="${t}"/>\n\t\t\t</g>\n\t\t</svg>\n\t`}function a(e){return new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},42470(e,t,n){"use strict";n.d(t,{IR:()=>u,K5:()=>l,Sm:()=>i,Yc:()=>c,c6:()=>o,nQ:()=>a});var r=n(34377);function s(e){return Math.abs(6371e3*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function o(e,t){return 512/Math.pow(2,e)*.5*s(t)}function i(e,t){const n=e/s(t);return Math.log2(512/(n/.5))}function a(e,t){if(0===t.length)return null;const n=new e.Coordinate(-90,180),r=new e.Coordinate(90,-180);t.forEach(e=>{n.latitude=Math.max(n.latitude,e.coordinates.latitude),n.longitude=Math.min(n.longitude,e.coordinates.longitude),r.latitude=Math.min(r.latitude,e.coordinates.latitude),r.longitude=Math.max(r.longitude,e.coordinates.longitude)});const s=new e.Coordinate(n.latitude-.5*(n.latitude-r.latitude),n.longitude+.5*(r.longitude-n.longitude)),o=new e.CoordinateSpan(1.3*Math.abs(n.latitude-r.latitude),1.3*Math.abs(r.longitude-n.longitude));return new e.CoordinateRegion(s,o)}function l(e,t){return()=>{const n=e.createElement("div");return n.classList.add("mapkit-popup-content"),t(n),n}}function c(e,t){return new Promise(n=>{if(t.mapkitScriptIsLoading)(0,r.Cu)(t,"mapkit").then(e=>{n(e)});else{t.mapkitScriptIsLoading=!0;const s=e.createElement("script");s.addEventListener("load",async()=>{const e=await(0,r.Cu)(t,"mapkit");t.mapkitScriptIsLoading=!1,n(e)},{once:!0}),s.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",s.crossOrigin="anonymous",e.head.appendChild(s)}})}function u(e,t,n){return new Promise((t,r)=>{n.mapkitIsInitialized?t():n.mapkitIsInitializing?function(e){return new Promise((t,n)=>{const r=()=>{void 0===e.mapkitIsInitializing?n():!1===e.mapkitIsInitializing?t():e.requestAnimationFrame(r)};r()})}(n).then(()=>{t()}):(n.mapkitIsInitializing=!0,n.mapkitIsInitialized=!1,e.init({authorizationCallback:async e=>{try{const s=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===s.status){e((await s.json()).wpcom_mapkit_access_token)}else r();n.mapkitIsInitializing=!1,n.mapkitIsInitialized=!0,t()}catch{r()}}}))})}},27534(e,t,n){"use strict";n.d(t,{C:()=>o,u:()=>i});var r=n(86087),s=n(10790);const o=(0,r.createContext)({map:null,mapkit:null,loaded:!1,activeMarker:null,calloutReference:null,currentDoc:null,currentWindow:null,admin:!1,setPoints:()=>{},points:[],previousCenter:null}),i=({value:e,children:t})=>{const[n,i]=(0,r.useState)(null),[a,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(null);return(0,s.jsx)(o.Provider,{value:{...e,activeMarker:n,setActiveMarker:i,calloutReference:a,setCalloutReference:l,previousCenter:c,setPreviousCenter:u},children:t})}},5389(e,t,n){"use strict";n.d(t,{$H:()=>b,FN:()=>m,I3:()=>h,LR:()=>f,PC:()=>p,ST:()=>d,bY:()=>v,mA:()=>k,wB:()=>y,y7:()=>g});var r=n(39384),s=n(47143),o=n(86087),i=n(27723),a=n(66087),l=n(34377),c=n(42470),u=n(27534);const __=i.__,d=()=>(0,o.useContext)(u.C),p=e=>{const[t,n]=(0,o.useState)(!1),[i,a]=(0,o.useState)(!1),[u,d]=(0,o.useState)(null),[p,h]=(0,o.useState)(null),[m,g]=(0,o.useState)(null);return(0,o.useEffect)(()=>{const t=(0,s.select)(r.CONNECTION_STORE_ID).getBlogId(),{currentDoc:o,currentWindow:i}=(0,l.sG)(e.current);if(e.current){h(i),g(o);const e=__("Failed to retrieve a Mapkit API token. Please try refreshing.","jetpack");i.mapkit?(d(i.mapkit),(0,c.IR)(i.mapkit,t,i).then(()=>{n(!0)},()=>{a(e)})):(0,c.Yc)(o,i).then(r=>{d(r),(0,c.IR)(r,t,i).then(()=>{n(!0)},()=>{a(e)})})}},[e]),{loaded:t,error:i,mapkit:u,currentDoc:m,currentWindow:p}},h=(e,t,n)=>{const[r,s]=(0,o.useState)(null);return(0,o.useEffect)(()=>{e&&t&&s(new e.Map(n.current,{showsMapTypeControl:!1}))},[e,t,n]),{map:r}},m=(e,t)=>{const{mapkit:n,map:r}=d(),s=(0,o.useRef)(e),i=(0,o.useRef)(t);(0,o.useEffect)(()=>{if(!n||!r||!s.current)return;const e=s.current?.lat??s.current?.latitude,t=s.current?.lng??s.current?.longitude;"number"==typeof e&&"number"==typeof t&&(r.center=new n.Coordinate(e,t))},[n,r,s]),(0,o.useEffect)(()=>{if(!n||!r)return;const e=()=>{if(r.center){const{latitude:e,longitude:t}=r.center;i.current({lat:e,lng:t})}};return r.addEventListener("region-change-end",(0,a.debounce)(e,1e3)),()=>{r.removeEventListener("region-change-end",e)}},[n,r,i])},g=e=>{const{mapkit:t,map:n}=d();(0,o.useEffect)(()=>{t&&n&&(n.mapType=(()=>{switch(e){case"satellite":return t.Map.MapTypes.Satellite;case"black_and_white":return t.Map.MapTypes.MutedStandard;case"hybrid":return t.Map.MapTypes.Hybrid;default:return t.Map.MapTypes.Standard}})())},[t,n,e])},f=(e,t)=>{const{mapkit:n,map:r,points:s}=d();(0,o.useEffect)(()=>{if(n&&r)if(s&&s.length<=1){const t=(0,c.c6)(13,r.center.latitude);if(e){const t=(0,c.c6)(e,r.center.latitude);t!==r.cameraDistance&&(r.cameraDistance=t)}else t!==r.cameraDistance&&(r.cameraDistance=t);r.isZoomEnabled=!0,r.isScrollEnabled=!0}else r.region=(0,c.nQ)(n,s),r.isZoomEnabled=!1,r.isScrollEnabled=!1},[n,r,e,s]),(0,o.useEffect)(()=>{const e=()=>{t((0,c.Sm)(r.cameraDistance,r.center.latitude))};return r.addEventListener("zoom-end",e),()=>{r.removeEventListener("zoom-end",e)}},[n,r,t])},b=(e,t,n=null,r=null)=>{const{mapkit:s,map:i,loaded:a,currentWindow:l}=d(),c=(0,o.useRef)(n),u=(0,o.useRef)(r);(0,o.useEffect)(()=>{if(a){i.annotations.filter(t=>!e.find(e=>e.id===t.data.id)).forEach(e=>i.removeAnnotation(e));const n=e.map(e=>{const n=i.annotations.find(t=>t.data.id===e.id);if(n)return n.title=e.title,n.color=t,n;const r=new s.MarkerAnnotation(new s.Coordinate(e.coordinates.latitude,e.coordinates.longitude),{color:t,data:{id:e.id}});return r.calloutEnabled=!0,r.title=e.title,c.current&&(r.callout={calloutElementForAnnotation:c.current}),u.current&&r.addEventListener("select",()=>u.current(e,i)),r});i.annotations.length!==n.length&&i.showItems(new l.Array(...n))}},[e,a,i,s,t,c,u,l])},v=e=>{const{map:t,loaded:n}=d(),r=(0,o.useRef)(e);(0,o.useEffect)(()=>{n&&r.current(t)},[n,t,r])},y=e=>{const{map:t,previousCenter:n,loaded:r}=d(),s=(0,o.useRef)(e);(0,o.useEffect)(()=>{r&&t.addEventListener("single-tap",()=>{s.current(n)})},[r,t,n,s])},k=(e,t)=>{const{mapkit:n,map:r}=d();(0,o.useEffect)(()=>{if(n&&r&&e?.length){(new n.Geocoder).lookup(e,(e,n)=>{if(n?.results?.length){const e=n.results[0],r=e.formattedAddress,s={placeTitle:r,title:r,caption:r,coordinates:{longitude:e.coordinate.longitude,latitude:e.coordinate.latitude},id:`${r} ${Number(e.coordinate.latitude).toFixed(2)} ${Number(e.coordinate.longitude).toFixed(2)}`};t.current([s])}})}},[n,r,e,t])}},2194(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(94715),s=n(13022),o=n(90907),i=n(62393),a=n(10790);const l=({attributes:e})=>{const{align:t,mapDetails:n,points:l,zoom:c,mapCenter:u,markerColor:d,scrollToZoom:p,mapHeight:h,showFullscreenButton:m}=e,g=r.useBlockProps.save(),{className:f}=g,b=(0,o.D)(i.A,f),v=l.map((e,t)=>{const{longitude:n,latitude:r}=e.coordinates,s="https://www.google.com/maps/search/?api=1&query="+r+","+n;return(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:s,children:e.title})},t)});return(0,a.jsx)("div",{...g,className:(0,s.A)(f,t?`align${t}`:null),"data-map-style":b,"data-map-details":n,"data-points":JSON.stringify(l),"data-zoom":c,"data-map-center":JSON.stringify(u),"data-marker-color":d,"data-scroll-to-zoom":p||null,"data-map-height":h||null,"data-show-fullscreen-button":m||null,children:l.length>0&&(0,a.jsx)("ul",{children:v})})}},62393(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(27723),s=n(93797),o=n(49364),i=n(77971),a=n(98430),l=n(27415),c=n(72386),u=n(92747),d=n(44950);const __=r.__,p=(0,d.A)(),h=[{name:"default",label:__("Basic","jetpack"),preview:"mapkit"===p?a:i,isDefault:!0},{name:"black_and_white",label:"mapkit"===p?__("Muted","jetpack",0):__("Black & White","jetpack"),preview:"mapkit"===p?o:s},{name:"satellite",label:__("Satellite","jetpack"),preview:"mapkit"===p?c:l},{name:"terrain",label:__("Terrain","jetpack"),preview:u}]},44950(e,t,n){"use strict";n.d(t,{A:()=>r});const r=e=>{if(e?.mapStyle&&["terrain"].includes(e.mapStyle))return"mapbox";const t=function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}("map_provider");return t||(window&&"string"==typeof window.Jetpack_Maps?.provider&&["mapbox","mapkit"].includes(window.Jetpack_Maps?.provider)?window.Jetpack_Maps?.provider:"mapbox")}},91844(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(e,t=null)=>{if(t)e.style.height=t+"px";else{const t=e.offsetWidth,n=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,r=Math.min(t*(3/4),n);e.style.height=r+"px"}}},79534(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(13022),s=n(10790);const o=({className:e,label:t,isPressed:n,onClick:o})=>{const i=(0,r.A)(e,"components-button components-tab-button",{"is-pressed":n});return(0,s.jsx)("button",{className:i,onClick:o,children:(0,s.jsx)("span",{children:t})})}},12580(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(94715),s=n(29491),o=n(47143),i=n(86087),a=n(27723),l=n(79534),c=n(78715),u=n(10790);const __=a.__,d="editor",p="preview",h=(0,s.compose)([(0,o.withSelect)(e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()})),(0,o.withDispatch)((e,{currentBlockId:t})=>({removeBlock:()=>e("core/block-editor").removeBlocks(t)}))])(({attributes:e,setAttributes:t,isSelected:n,removeBlock:s})=>{const{source:o}=e,a=!o||""===o.trim(),h=(0,r.useBlockProps)(),{className:m}=h,[g,f]=(0,i.useState)(d),b=(0,i.useRef)(null),v=e=>t({source:e}),y=e=>{8===e.keyCode&&""===o&&(s(),e.preventDefault())};let k;return(0,i.useEffect)(()=>{n?g===d&&b?.current.focus():g===p&&f(d)},[n,g,f]),k=!n&&a?(0,u.jsx)("p",{className:`${m}__placeholder`,children:__("Write your _Markdown_ **here**…","jetpack")}):(0,u.jsxs)("div",{className:m,children:[(0,u.jsx)(r.BlockControls,{children:(0,u.jsxs)("div",{className:"components-toolbar",children:[(0,u.jsx)(l.A,{className:m,label:__("Markdown","jetpack"),isPressed:g===d,onClick:()=>f(d)}),(0,u.jsx)(l.A,{className:m,label:__("Preview","jetpack"),isPressed:g===p,onClick:()=>f(p)})]})}),g!==p&&n?(0,u.jsx)(r.PlainText,{className:`${m}__editor`,onChange:v,onKeyDown:y,"aria-label":__("Markdown","jetpack"),ref:b,value:o}):(0,u.jsx)(c.A,{className:`${m}__preview`,source:o})]}),(0,u.jsx)("div",{...h,children:k})})},57809(e,t,n){"use strict";var r=n(94375),s=n(73431),o=n(12580),i=n(76425);n(1982);(0,r.M)(s,{edit:o.A,save:i.A})},78715(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(94715),s=n(86087),o=n(27723),i=n(97158),a=n(20305),l=n.n(a),c=n(10790);const __=o.__,u=new i.A({typographer:!0}).use(l()),d=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},p=(e={})=>{const t=(0,r.__experimentalGetSpacingClassesAndStyles)?.(e);return t?.style?t.style:{}},h=({className:e,source:t="",attributes:n})=>(0,c.jsx)(s.RawHTML,{className:e,onClick:d,style:p(n),children:t.length?u.render(t):""});n.dn(h)},76425(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(78715),o=n(10790);const i=({attributes:e})=>{const t=r.useBlockProps.save();return(0,o.jsx)(s.A,{...t,source:e.source,attributes:e})};n.dn(i)},34157(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(79018),s=n(10790);const o={attributes:r.attributes,supports:{align:!0,html:!1},save:({attributes:{rid:e}})=>(0,s.jsx)(s.Fragment,{children:e.map(e=>(0,s.jsx)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,children:`https://www.opentable.com/restref/client/?rid=${e}`},e))})}},8100(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(79018),s=n(10790);const o={attributes:r.attributes,migrate:e=>{const{style:t,className:n}=e,r="standard"===t?"":`is-style-${t}`;return{...e,className:n?`${n} ${r}`:r}},isEligible:({style:e,className:t})=>!(!e||"standard"===e)&&(!t||-1===t.indexOf("is-style-")),save:({attributes:{rid:e}})=>(0,s.jsx)("div",{children:e.map(e=>(0,s.jsx)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,children:`https://www.opentable.com/restref/client/?rid=${e}`},e))})}},71833(e,t,n){"use strict";n.d(t,{A:()=>w});var r=n(97999),s=n(85985),o=n(94715),i=n(74997),a=n(56427),l=n(86087),c=n(27723),u=n(79654),d=n(13022),p=n(66087),h=n(90907),m=n(78218),g=n(79018),f=n(82101),b=n(98233),v=n(50387),y=n(59038),k=n(84260),x=(n(79935),n(10790));const __=c.__,_=(0,s.sh)(g);const w=(0,a.withNotices)(function({attributes:e,clientId:t,isSelected:n,name:s,noticeOperations:w,noticeUI:j,setAttributes:C}){const A=(0,o.useBlockProps)(),S=(0,i.getBlockDefaultClassName)(s),E=(0,m.y)(g.attributes,e);(0,p.isEqual)(E,e)||C(E);const{align:T,rid:N,iframe:P,domain:B,lang:R,newtab:I,negativeMargin:D}=e,L=(0,p.isEmpty)(N),F=(0,h.D)((0,v.Iy)(),e.className),M=(0,h.D)((0,v.Iy)(N),e.className),O=(0,y.A)(M),U=(0,p.isEqual)(N,["1"]);(0,l.useEffect)(()=>{if(w.removeAllNotices(),!L&&!U&&"wide"===M&&"wide"!==T&&"full"!==T){const e=(0,x.jsx)(x.Fragment,{children:__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack")});w.createNotice({status:"warning",content:e})}},[U,T,L,N,M]),(0,l.useEffect)(()=>{"button"===F&&Array.isArray(N)&&N?.length>1&&C({className:"",style:""})},[N,F,C]),(0,l.useEffect)(()=>{n&&(Array.isArray(N)&&N?.length>1?(0,i.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,i.registerBlockStyle)("jetpack/opentable",v.i9))},[n,N]),(0,l.useEffect)(()=>{"wide"===O&&"wide"===T&&C({align:""}),"wide"===M&&O&&M!==O&&C({align:"wide"}),C({style:M})},[T,M,O,C]);const z=(0,v.K5)(N),$=e=>N?.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],q=e=>{Array.isArray(e)?C({rid:e,style:e.length>1&&"button"===M?"standard":M}):(e=>{const t=(0,k.a9)(e);t||(w.removeAllNotices(),w.createErrorNotice((0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("strong",{children:__("We ran into an issue","jetpack")}),(0,x.jsx)("br",{}),__("Please ensure this embed matches the one from your OpenTable account","jetpack")]})));const n=(0,m.y)(g.attributes,t);C(n),w.removeAllNotices()})(e)},H=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(o.InspectorAdvancedControls,{children:[(0,x.jsx)(a.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>C({iframe:!P}),className:"is-opentable",__nextHasNoMarginBottom:!0}),"button"===M&&(0,x.jsx)(a.ToggleControl,{label:__("Remove button margin","jetpack"),checked:D,onChange:()=>C({negativeMargin:!D}),__nextHasNoMarginBottom:!0})]}),(0,x.jsx)(o.InspectorControls,{children:(0,x.jsxs)(a.PanelBody,{title:__("Settings","jetpack"),children:[(0,x.jsx)(b.A,{rids:N,onChange:q}),(0,x.jsx)(a.SelectControl,{label:__("Language","jetpack"),value:R,onChange:e=>C({lang:e}),options:f.P,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,x.jsx)(a.ToggleControl,{label:__("Open in a new window","jetpack"),checked:I,onChange:()=>C({newtab:!I}),__nextHasNoMarginBottom:!0})]})})]}),V=(0,r.isWpcomPlatformSite)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",G=(0,x.jsxs)(a.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:_,instructions:__("Enter your restaurants IDs, separated by comma, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:j,children:[(0,x.jsx)(b.A,{rids:N,onSubmit:q}),(0,x.jsxs)("div",{className:`${S}-placeholder-links`,children:[(0,x.jsx)(u.N,{openInNewTab:!0,href:"https://restaurant.opentable.com/get-started/",children:__("Sign up for OpenTable","jetpack")}),(0,x.jsx)(u.N,{openInNewTab:!0,href:V,children:__("Learn more","jetpack")})]})]}),W=(0,d.A)({[`is-style-${M}`]:!L&&z.includes(M),"is-placeholder":L,"is-multi":"multi"===$(M)[0],[`align${T}`]:T,"has-no-margin":D});return(0,x.jsxs)("div",{...A,children:[j,(0,x.jsxs)("div",{className:W,children:[!L&&H,L?G:(e=>{const[n,r]=$(e||M);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:`${S}-overlay`}),(0,x.jsx)("iframe",{title:(0,c.sprintf)(/* translators: %s: a unique ID. */
__("Open Table Preview %s","jetpack"),t),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${Array.isArray(N)?N.join("%2C"):""}&type=${n}&theme=${r}&overlay=false&domain=${B}&lang=${R&&f.L.includes(R)?R:"en-US"}&newtab=${I}&disablega=true`})]})})()]})]})})},82144(e,t,n){"use strict";var r=n(94715),s=n(74997),o=n(94375),i=n(79018),a=n(34157),l=n(8100),c=n(71833),u=n(50387),d=n(84260),p=(n(79935),n(45199),n(10790));(0,o.M)(i,{edit:c.A,save:({attributes:{rid:e}})=>{const t=r.useBlockProps.save();return(0,p.jsx)("div",{...t,children:e?.map((e,t)=>(0,p.jsx)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,children:`https://www.opentable.com/restref/client/?rid=${e}`},`${e}-${t}`))})},attributes:i.attributes,styles:(0,u.Iy)(),transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(d.XA.test(e.textContent)||d.JJ.test(e.textContent)),transform:e=>{const t=(0,d.a9)(e.textContent);return(0,s.createBlock)("jetpack/opentable",t)}}]},deprecated:[a.A,l.A]})},82101(e,t,n){"use strict";n.d(t,{L:()=>s,P:()=>r});const r=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],s=r.map(e=>e.value)},98233(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(56427),s=n(86087),o=n(27723),i=n(66087),a=n(10790);const __=o.__,_n=o._n,l=/^\s*(http[s]?:\/\/|<script)/;function c(e){const[t,n]=(0,s.useState)(""),[o,c]=(0,s.useState)(e.rids||[]),u=/^(\d+)$|\(#(\d+)\)$/,d=(0,a.jsx)(r.FormTokenField,{value:o,saveTransform:e=>l.test(e)?"":e.trim(),onInputChange:n,label:_n("Restaurant ID","Restaurant IDs",o.length,"jetpack"),...e,onChange:t=>{const n=t.map(e=>{const t=u.exec(e);if(t){return t[1]||t[2]}return e});c(n),e.onChange&&e.onChange(n)},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0});return(0,a.jsx)("div",{className:"wp-block-jetpack-opentable-restaurant-picker",children:e.onSubmit?(0,a.jsxs)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,i.isEmpty)(o)?t:o)},children:[d,(0,a.jsx)(r.Button,{variant:"secondary",type:"submit",children:__("Embed","jetpack")})]}):d})}},50387(e,t,n){"use strict";n.d(t,{Iy:()=>o,K5:()=>i,i9:()=>s});var r=n(27723);const __=r.__,s={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},o=e=>[{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&s].filter(Boolean),i=e=>o(e).map(e=>e.name)},59038(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(86087);function s(e){const t=(0,r.useRef)(void 0);return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}},84260(e,t,n){"use strict";n.d(t,{JJ:()=>s,XA:()=>o,a9:()=>i});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,s=/restref=([0-9]+)&/,o=/rid=([0-9]+)&/,i=e=>{if(e)return(e=>{if(!e)return;let t;if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let s=n.getAll("rid");if(s&&0!==s.length||(s=n.getAll("restref")),!s||0===s.length)return;const o={};s&&(o.rid=s);const i=n.get("domain");i&&(o.domain=i);const a=n.get("iframe");a&&(o.iframe=a);const l=n.get("lang");l&&(o.lang=l);const c=n.get("newtab");return c&&(o.newtab=c),r&&(o.style=r),o})((e=>{const t=e.match(r);return t&&t[1]?t[1]:s.test(e)||o.test(e)?e:void 0})(e))}},6149(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(85985),s=n(56427),o=n(27723),i=n(73800),a=n(10790);const __=o.__,_x=o._x,l=(0,r.sh)(i);function c({className:e,onSubmit:t,noticeUI:n,url:r,setUrl:o}){return(0,a.jsx)("div",{className:e,children:(0,a.jsx)(s.Placeholder,{label:__("Pinterest","jetpack"),icon:l,notices:n,children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),t()},children:[(0,a.jsx)("input",{type:"url",value:r,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>o(e.target.value)}),(0,a.jsx)(s.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})]})})})}},62595(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(74997),s=n(56427),o=n(86087),i=n(27723),a=n(10790);const __=i.__,_x=i._x;function l({fallbackUrl:e,onClick:t}){return(0,a.jsxs)(a.Fragment,{children:[__("Sorry, this content could not be embedded.","jetpack")," ",(0,a.jsx)(s.Button,{variant:"link",onClick:()=>{const n=(0,a.jsx)("a",{href:e,children:e});t((0,r.createBlock)("core/paragraph",{content:(0,o.renderToString)(n)}))},children:_x("Convert block to link","button label","jetpack")})]})}},37602(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(56427),s=n(27723),o=n(10790);const __=s.__;function i(){return(0,o.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,o.jsx)(r.Spinner,{}),(0,o.jsx)("p",{children:__("Embedding…","jetpack")})]})}},76910(e,t,n){"use strict";n.d(t,{_:()=>s,e:()=>r});const r="https://pinterest.com/anapinskywalker/",s=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i},5163(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(57462),s=n(10790);const o={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:({attributes:e,className:t})=>{const{url:n}=e;return(0,r.C)(n)?(0,s.jsx)("div",{className:t,children:(0,s.jsx)("a",{"data-pin-do":(0,r.C)(n),href:n})}):null}}},18379(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(94715),s=n(56427),o=n(86087),i=n(6149),a=n(62595),l=n(37602),c=n(67627),u=n(57462),d=n(10790);const p=(0,s.withNotices)(function({attributes:e,isSelected:t,noticeOperations:n,noticeUI:p,setAttributes:h,onReplace:m}){const{url:g}=e,f=(0,r.useBlockProps)(),{isFetching:b,pinterestUrl:v,testUrl:y,hasTestUrlError:k}=(0,c.A)(),[x,_]=(0,o.useState)(!1),[w,j]=(0,o.useState)(""),[C,A]=(0,o.useState)(!1),S=(0,o.useCallback)(()=>(0,d.jsx)(a.A,{fallbackUrl:w,onClick:m}),[k]),E=()=>{b||(y(w),A(!1))},T=()=>{_(!0)};if((0,o.useEffect)(()=>{g&&y(g)},[]),(0,o.useEffect)(()=>{!t&&x&&_(!1)},[t,x]),(0,o.useEffect)(()=>{h({url:v}),n.removeAllNotices(),v&&j(v),k&&n.createErrorNotice(S())},[v,k,h,S]),b)return(0,d.jsx)(l.A,{});const N=(0,u.C)(g);let P;if(C||!g||g&&!N)P=(0,d.jsx)(i.A,{onSubmit:E,noticeUI:p,url:w,setUrl:j});else{const e=`<a data-pin-do='${N}' href='${g}'></a>`;P=(0,d.jsx)("div",{...f,children:(0,d.jsxs)("div",{children:[(0,d.jsx)(s.SandBox,{html:e,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:T}),!x&&(0,d.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:T})]})})}return(0,d.jsx)("div",{...f,children:P})})},46010(e,t,n){"use strict";var r=n(94375),s=n(73800),o=n(5163),i=n(18379),a=n(2230);(0,r.M)(s,{edit:i.A,save:a.A,deprecated:[o.A]})},67627(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(86087),s=n(56145),o=n(76910);const i=(e="")=>{const[t,n]=(0,r.useState)(!1),[i,a]=(0,r.useState)(e),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{i&&i!==o.e&&(n(!0),(0,s.A)(i).then(e=>{n(!1),a(e),c(!1)}).catch(()=>{n(!1),a(i||void 0),c(!0)}))},[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:l,testUrl:a}}},2230(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);function o({attributes:e}){const t=r.useBlockProps.save(),{url:n}=e;return(0,s.jsx)("a",{...t,href:n,children:n})}},57462(e,t,n){"use strict";n.d(t,{C:()=>o});var r=n(93832),s=n(76910);function o(e){if(!s._.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},80513(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(94715),s=n(56427),o=n(27723),i=n(10790);const __=o.__,a=({id:e,setRating:t,children:n})=>{return(0,i.jsx)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(r=e,({code:e})=>"Enter"===e?t(r):null),onClick:(e=>()=>t(e))(e),children:n});var r},l=e=>function({setAttributes:t,attributes:{align:n,color:o,rating:l,maxRating:c}}){const u=(0,r.useBlockProps)(),d=e=>{e===l?Math.ceil(l)===l&&(e-=.5):.5===l&&1===e&&(e=0),t({rating:e})};return(0,i.jsxs)("div",{...u,children:[(0,i.jsx)(r.BlockControls,{children:(0,i.jsx)(r.AlignmentToolbar,{value:n,onChange:e=>t({align:e})})}),(0,i.jsx)("div",{style:{textAlign:n},children:Array.from(Array(Math.ceil(c)),(e,t)=>t+1).map(t=>(0,i.jsxs)(a,{id:t,setRating:d,children:[(0,i.jsx)("span",{children:(0,i.jsx)(e,{className:l>=t-.5?null:"is-rating-unfilled",color:o})}),(0,i.jsx)("span",{children:(0,i.jsx)(e,{className:l>=t?null:"is-rating-unfilled",color:o})})]},t))}),(0,i.jsxs)(r.InspectorControls,{children:[(0,i.jsx)(s.PanelBody,{title:__("Settings","jetpack"),children:(0,i.jsx)(s.RangeControl,{label:__("Highest rating","jetpack"),value:c,onChange:e=>t({maxRating:e}),min:2,max:10,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,i.jsx)(r.PanelColorSettings,{title:__("Color","jetpack"),initialOpen:!0,colorSettings:[{value:o,onChange:e=>t({color:e}),label:__("Color","jetpack")}]})]})]})};n.dn(l)},8171(e,t,n){"use strict";var r=n(94375),s=n(8206),o=n(80513),i=n(28268),a=n(32876);n(73163),n(89399);(0,r.M)(s,{edit:(0,o.A)(i.G),save:(0,a.A)("★")})},28268(e,t,n){"use strict";n.d(t,{G:()=>o});var r=n(56427),s=n(10790);const o=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),n=(e=>e&&e.className?e.className:"")(e);return(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t,children:(0,s.jsx)(r.Path,{className:n,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"})})}},32876(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);const o=e=>function({attributes:{align:t,rating:n,color:o}}){const i=r.useBlockProps.save();return(0,s.jsx)("figure",{...i,style:{textAlign:t},children:Array.from(Array(Math.ceil(n)),(e,t)=>t+1).map(t=>(0,s.jsx)("span",{style:{color:o},children:e},t))})};n.dn(o)},77212(e,t,n){"use strict";n.d(t,{WB:()=>a,_f:()=>i});var r=n(56427),s=n(27723),o=n(10790);const __=s.__;function i({attributes:e,setAttributes:t}){const{displayAuthor:n,displayContext:s,displayDate:i,displayThumbnails:a,postsToShow:l}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.PanelBody,{title:__("Layout settings","jetpack"),children:(0,o.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of posts","jetpack"),value:l,onChange:e=>t({postsToShow:Math.min(e,6)}),min:1,max:6})}),(0,o.jsxs)(r.PanelBody,{title:__("Metadata settings","jetpack"),children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display date","jetpack"),checked:i,onChange:e=>t({displayDate:e})}),(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display author","jetpack"),checked:n,onChange:e=>t({displayAuthor:e})}),(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display context (category or tag)","jetpack"),checked:s,onChange:e=>t({displayContext:e})}),(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display thumbnail","jetpack"),checked:a,onChange:e=>t({displayThumbnails:e})})]})]})}function a({attributes:e,setAttributes:t}){const{postLayout:n}=e,s=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>t({postLayout:"grid"}),isActive:"grid"===n},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>t({postLayout:"list"}),isActive:"list"===n}];return(0,o.jsx)(r.ToolbarGroup,{controls:s})}},49108(e,t,n){"use strict";n.d(t,{A:()=>r});const r=[n(82228)]},50783(e,t,n){"use strict";n.d(t,{A:()=>r});const r={postLayout:{type:"string",default:"grid"},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!0},displayHeadline:{type:"boolean",default:!1},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},headline:{type:"string",default:""},postsToShow:{type:"number",default:3}}},82228(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>s.A,migrate:()=>i,save:()=>a,supports:()=>o.A});var r=n(74997),s=n(50783),o=n(90526);const i=(e,t)=>[e,e.headline?[(0,r.createBlock)("core/heading",{content:e.headline,level:3}),...t]:t],a=()=>null},90526(e,t,n){"use strict";n.d(t,{A:()=>r});const r={html:!1,multiple:!1,reusable:!1,color:{gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{__experimentalFontFamily:!0,fontSize:!0,lineHeight:!0},align:["wide","full"]}},89218(e,t,n){"use strict";n.d(t,{A:()=>k});var r=n(85985),s=n(94715),o=n(56427),i=n(29491),a=n(27723),l=n(9522),c=n(59340),u=n(88795),d=n(77212),p=n(80108),h=n(21144),m=n(22131),g=(n(63036),n(10790));const __=a.__,f=u.name.replace("jetpack/","");function b(e){return(0,g.jsxs)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading",children:[(0,g.jsx)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link",children:e.isInSiteEditor?__("Preview unavailable in site editor. The post title will appear normally on your site.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")}),e.displayThumbnails&&(0,g.jsxs)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack"),children:[(0,g.jsxs)(o.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200",children:[(0,g.jsx)("title",{children:__("Grey square","jetpack")}),(0,g.jsx)(o.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96",fillOpacity:".1"})]}),(0,g.jsxs)(o.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,g.jsx)("title",{children:__("Icon for image","jetpack")}),(0,g.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,g.jsx)(o.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"})]})]}),e.displayDate&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-date has-small-font-size",children:__("August 3, 2025","jetpack")}),e.displayAuthor&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-author has-small-font-size",children:__("by John Doe","jetpack")}),e.displayContext&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-context has-small-font-size",children:__("In “Uncategorized”","jetpack")})]})}function v(e){const t=e.post?.block_context?.text||"",n=e.post?.block_context?.link||"",r=""!==t,s=""!==n;return(0,g.jsxs)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading",children:[(0,g.jsx)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank",children:e.post.title}),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,g.jsx)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url,target:"_blank",rel:"nofollow noopener noreferrer",children:(0,g.jsx)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title})}),e.displayDate&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-date has-small-font-size",children:e.post.date}),e.displayAuthor&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-author has-small-font-size",children:e.post.author}),e.displayContext&&r&&(0,g.jsxs)("div",{className:"jp-related-posts-i2__post-context has-small-font-size",children:[s&&(0,g.jsx)("a",{href:n,children:t}),!1===s&&t]})]})}function y(e){const t="jp-related-posts-i2__row";let n;const r=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:n=2;break;default:n=3}return(0,g.jsxs)("div",{children:[(0,g.jsx)("div",{className:t,"data-post-count":e.posts.slice(0,n).length,children:e.posts.slice(0,n)}),r&&(0,g.jsx)("div",{className:t,"data-post-count":e.posts.slice(n).length,children:e.posts.slice(n)})]})}function k({attributes:e,setAttributes:t}){const{displayAuthor:n,displayContext:o,displayDate:a,displayThumbnails:u,postLayout:x,postsToShow:_}=e,w=(0,s.useBlockProps)(),{isLoadingModules:j,isChangingStatus:C,isModuleActive:A,changeStatus:S}=(0,r.q7)(f),{isEnabled:E,enable:T,isFetchingStatus:N,isUpdatingStatus:P}=(0,h.M)(),B=C||P,{posts:R,isLoading:I}=(0,p.Y)(E),D=c.O3===(0,c.AU)(),{instanceId:L}=(0,i.useInstanceId)(k);let F;if(j||N||I)F=(0,g.jsx)(l.G,{});else if(A&&E){const r="jp-relatedposts-i2",i=[];for(let e=0;e<_;e++)R[e]?i.push((0,g.jsx)(v,{id:`related-posts-${L}-post-${e}`,post:R[e],displayThumbnails:u,displayDate:a,displayContext:o,displayAuthor:n},r+"-"+e)):i.push((0,g.jsx)(b,{id:`related-posts-${L}-post-${e}`,displayThumbnails:u,displayDate:a,displayContext:o,isInSiteEditor:D,displayAuthor:n},"related-post-placeholder-"+e));F=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(s.InspectorControls,{children:(0,g.jsx)(d._f,{attributes:e,setAttributes:t})}),(0,g.jsx)(s.BlockControls,{children:(0,g.jsx)(d.WB,{attributes:e,setAttributes:t})}),(0,g.jsxs)("div",{id:`related-posts-${L}`,children:[(0,g.jsx)(s.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{placeholder:__("Add a headline","jetpack")}]]}),(0,g.jsx)("div",{className:r,"data-layout":x,children:(0,g.jsx)(y,{posts:i})})]})]})}else F=(0,g.jsx)(m.L,{changeStatus:S,isLoading:B,enable:T});return(0,g.jsx)("div",{...w,children:F})}},1063(e,t,n){"use strict";var r=n(94715),s=n(94375),o=n(88795),i=n(49108),a=n(89218),l=(n(88894),n(10790));(0,s.M)(o,{edit:a.A,save:()=>{const e=r.useBlockProps.save();return(0,l.jsx)("div",{...e,children:(0,l.jsx)(r.InnerBlocks.Content,{})})},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},deprecated:i.A})},80108(e,t,n){"use strict";n.d(t,{Y:()=>c});var r=n(1455),s=n.n(r),o=n(29491),i=n(47143),a=n(43656),l=n(86087);const c=e=>{const t=(0,o.usePrevious)(e),[n,r]=(0,l.useState)(!1),[c,u]=(0,l.useState)(null),{currentPostId:d,currentPostRelatedPosts:p}=(0,i.useSelect)(e=>{const t=e(a.store).getCurrentPost();return{currentPostId:t.id,currentPostRelatedPosts:t?.["jetpack-related-posts"]??[]}}),h=0===p.length&&!t&&e;return(0,l.useEffect)(()=>{h&&(r(!0),async function(e){try{return await s()({path:`/wpcom/v2/related-posts/${e}`})}catch{return[]}}(d).then(e=>{u(e)}).catch(()=>{}).then(()=>{r(!1)}))},[h,d]),(0,l.useMemo)(()=>({posts:c??p,isLoading:n}),[n,c,p])}},21144(e,t,n){"use strict";n.d(t,{M:()=>i});var r=n(1455),s=n.n(r),o=n(86087);const i=()=>{const[e,t]=(0,o.useState)(!1),[n,r]=(0,o.useState)(!1),[i,a]=(0,o.useState)(!1);(0,o.useEffect)(()=>{t(!0),async function(){try{const e=await s()({path:"/wpcom/v2/related-posts"});return e?.enabled??!1}catch{return!1}}().then(e=>{a(e),t(!1)}).catch(()=>{t(!1)})},[]);const l=(0,o.useCallback)(()=>{r(!0),async function(){try{return await s()({path:"/wpcom/v2/related-posts/enable",method:"POST"})}catch{return!1}}().then(e=>{a(e),r(!1)}).catch(()=>{r(!1)})},[]);return(0,o.useMemo)(()=>({isEnabled:i,enable:l,isFetchingStatus:e,isUpdatingStatus:n}),[i,l,e,n])}},22131(e,t,n){"use strict";n.d(t,{L:()=>h});var r=n(3924),s=n(97999),o=n(85985),i=n(56427),a=n(86087),l=n(27723),c=n(79654),u=n(88795),d=n(10790);const __=l.__,p=(0,o.sh)(u),h=({className:e,changeStatus:t,isLoading:n,enable:l})=>{const{tracks:h}=(0,o.st)();(0,a.useEffect)(()=>{h.recordEvent("jetpack_editor_related_posts_placeholder_view")},[h]);const m=(0,s.isWpcomPlatformSite)()?"https://wordpress.com/support/related-posts/":(0,r.A)("jetpack-support-related-posts");return(0,d.jsx)("div",{className:e,children:(0,d.jsxs)(i.Placeholder,{icon:p,instructions:__("You'll need to activate the Related Posts feature to use this block.","jetpack"),label:u.title,children:[(0,d.jsx)(i.Button,{disabled:n,isBusy:n,onClick:()=>(h.recordEvent("jetpack_editor_related_posts_enable"),(0,s.isSimpleSite)()||t(!0),l()),variant:"secondary",children:n?__("Activating Related Posts","jetpack"):__("Activate Related Posts","jetpack",0)}),(0,d.jsx)("div",{className:"components-placeholder__learn-more",children:(0,d.jsx)(c.N,{openInNewTab:!0,href:m,children:__("Learn more about the Related Posts feature.","jetpack")})})]})})}},34570(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(85985),s=n(94715),o=n(56427),i=n(47143),a=n(86087),l=n(27723),c=n(13022),u=n(20242),d=n(84730),p=n(10790);const __=l.__,_n=l._n,h=[{value:d.DF,label:__("Show after threshold","jetpack")},{value:d.et,label:__("Show before threshold","jetpack")}],m=(0,r.sh)(u),g=(0,i.withSelect)((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}})(({isSelected:e,attributes:t,setAttributes:n})=>{const{criteria:r,threshold:i}=t,u=(0,s.useBlockProps)(),[g,f]=(0,a.useState)(!0);return(0,p.jsxs)("div",{...u,className:(0,c.A)(u.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!e}),children:[(0,p.jsxs)(o.Placeholder,{icon:m,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder",children:[(0,p.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:i,help:g?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:e=>{/^\d+$/.test(e)&&+e>0?(n({threshold:+e}),f(!0)):f(!1)},pattern:"[0-9]",type:"number"}),(0,p.jsx)(o.RadioControl,{label:__("Visibility","jetpack"),selected:r,options:h,onChange:e=>n({criteria:e})})]}),(0,p.jsx)(o.Notice,{status:"info",isDismissible:!1,children:r===d.DF?1===i?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,l.sprintf)(/* translators: %d: the number of people. */
_n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+i,"jetpack"),i):1===i?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,l.sprintf)(/* translators: %d: the number of people. */
_n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+i,"jetpack"),i)}),(0,p.jsx)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container",children:(0,p.jsx)(s.InnerBlocks,{})})]})})},53183(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);const o=()=>{const e=r.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container",children:(0,s.jsx)(r.InnerBlocks.Content,{})})})};n.dn(o)},84730(e,t,n){"use strict";n.d(t,{DF:()=>r,aV:()=>o,et:()=>s});const r="after-visits",s="before-visits",o=3},31566(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(84730),o=n(10790);const i={attributes:{criteria:{type:"string",default:s.DF},threshold:{type:"number",default:s.aV}},supports:{html:!1},save:({className:e})=>(0,o.jsx)("div",{className:e,children:(0,o.jsx)(r.InnerBlocks.Content,{})})}},79238(e,t,n){"use strict";var r=n(94375),s=n(20242),o=n(34570),i=n(53183),a=n(31566);n(75646);(0,r.M)(s,{edit:o.A,save:i.A,deprecated:[a.A]})},94247(e,t,n){"use strict";n.d(t,{H:()=>c,o:()=>u});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(66087),l=n(10790);const __=i.__,_x=i._x;function c({attributes:{autoplay:e,delay:t,effect:n,images:r,sizeSlug:i},imageSizeOptions:c,onChangeImageSize:u,setAttributes:d}){const p="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,l.jsxs)(o.Fragment,{children:[(0,l.jsxs)(s.PanelBody,{title:__("Autoplay","jetpack"),children:[(0,l.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:e,onChange:e=>{d({autoplay:e})}}),e&&(0,l.jsx)(s.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Delay between transitions (in seconds)","jetpack"),value:t,onChange:e=>{d({delay:e})},min:1,max:5}),e&&p&&(0,l.jsx)("span",{children:__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack")})]}),(0,l.jsx)(s.PanelBody,{title:__("Effects","jetpack"),children:(0,l.jsx)(s.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Transition","jetpack"),value:n,onChange:e=>{d({effect:e})},options:h})}),!(0,a.isEmpty)(r)&&!(0,a.isEmpty)(c)&&(0,l.jsx)(s.PanelBody,{title:__("Image Settings","jetpack"),children:(0,l.jsx)(s.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Size","jetpack"),value:i,options:c,onChange:e=>u(e)})})]})}function u({allowedMediaTypes:e,attributes:{images:t},onSelectImages:n}){return(0,l.jsx)(o.Fragment,{children:!!t.length&&(0,l.jsx)(s.ToolbarGroup,{children:(0,l.jsx)(s.ToolbarItem,{children:()=>(0,l.jsx)(r.MediaUpload,{onSelect:n,allowedTypes:e,multiple:!0,gallery:!0,value:t.map(e=>e.id),render:({open:e})=>(0,l.jsx)(s.Button,{label:__("Edit Slideshow","jetpack"),onClick:e,children:__("Edit","jetpack")})})})})})}},33170(e,t,n){"use strict";n.d(t,{A:()=>r});n(58203);async function r(e=".wp-block-jetpack-slideshow_container",t={},n={}){const r={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(n||{}).map(([e,t])=>[e,function(){t(this)}]))};let s;if(window.JetpackSwiper)s=window.JetpackSwiper;else{const e=window.Jetpack_Block_Assets_Base_Url+"swiper.css";if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}if(await import(window.Jetpack_Block_Assets_Base_Url+"swiper.js"),!window.JetpackSwiper)throw new Error("Failed to load Jetpack Swiper bundle");s=window.JetpackSwiper}return new s(e,{...r,...t})}},88075(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(26497),s=n(57544);const o=[n(9455),s,r]},84972(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}}},39126(e,t,n){"use strict";n.d(t,{A:()=>r});n(89275);async function r(e=".swiper-container",t={},n={}){const r={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(n||{}).map(([e,t])=>[e,function(){t(this)}]))};let s;if(window.JetpackSwiper)s=window.JetpackSwiper;else{const e=window.Jetpack_Block_Assets_Base_Url+"swiper.css";if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}if(await import(window.Jetpack_Block_Assets_Base_Url+"swiper.js"),!window.JetpackSwiper)throw new Error("Failed to load Jetpack Swiper bundle");s=window.JetpackSwiper}return new s(e,{...r,...t})}},26497(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>o.A,save:()=>a,supports:()=>i.A});var r=n(16445),s=n(10790),o=n(84972),i=n(82233);const a=({attributes:{align:e,autoplay:t,delay:n,effect:o,images:i},className:a})=>(0,s.jsx)(r.A,{align:e,autoplay:t,className:a,delay:n,effect:o,images:i})},31837(e,t,n){"use strict";n.d(t,{y:()=>s});var r=n(27723);const __=r.__;function s(e,t,n){let s="";if(n<=5)for(let e=1;e<=n;e++){s+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,r.sprintf)(/* translators: %s: the slide number to navigate to */
__("Go to slide %s","jetpack"),e)+'"></button>'}else s+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;return s}},16445(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(63162),s=n(94715),o=n(56427),i=n(86087),a=n(27723),l=n(13022),c=n(66087),u=n(94107),d=n(39126),p=n(31837),h=n(57464),m=n(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:s,images:o,onError:i}=this.props;if(t===e.align&&(0,c.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),s!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:n,effect:i,images:a}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":i,children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:a.map(({alt:e,caption:t,id:n,url:i})=>(0,m.jsx)("li",{className:(0,l.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,r.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,src:i}),(0,r.isBlobURL)(i)&&(0,m.jsx)(o.Spinner,{}),t&&(0,m.jsx)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},n||i))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:p.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},82233(e,t,n){"use strict";n.d(t,{A:()=>r});const r={html:!1,align:["center","wide","full"]}},57464(e,t,n){"use strict";n.d(t,{WF:()=>l,bz:()=>a,n7:()=>c,rQ:()=>i});var r=n(89877);const s=16/9,o="wp-block-jetpack-slideshow_autoplay-paused";function i(e){a(e),l(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){e.el&&(e.el.classList.contains(o)?(e.el.classList.remove(o),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(o),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function a(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const n=t.clientWidth/t.clientHeight,r=Math.max(Math.min(n,s),1),o="undefined"!=typeof window?.8*window.innerHeight:600,i=Math.min(e.width/r,o),a=`${Math.floor(i)}px`,l=`${Math.floor(i/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=a,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=l,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=l}function l(e){(e.slides||[]).forEach((t,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],s=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(s.alt))}(e)}function c(e){(e.pagination.bullets||[]).forEach(t=>{t.addEventListener("click",()=>{const t=e.slides[e.realIndex];setTimeout(()=>{t.focus()},500)})})}},57544(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>i.A,save:()=>l,supports:()=>a.A});var r=n(94715),s=n(71576),o=n(10790),i=n(84972),a=n(82233);const l=({attributes:{align:e,autoplay:t,delay:n,effect:i,images:a}})=>{const l=r.useBlockProps.save();return(0,o.jsx)("div",{...l,children:(0,o.jsx)(s.A,{align:e,autoplay:t,delay:n,effect:i,images:a})})}},71576(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(63162),s=n(94715),o=n(56427),i=n(86087),a=n(27723),l=n(13022),c=n(66087),u=n(94107),d=n(39126),p=n(31837),h=n(57464),m=n(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:s,images:o,onError:i}=this.props;if(t===e.align&&(0,c.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),s!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,delay:t,effect:n,images:i}=this.props;return(0,m.jsx)("div",{"data-autoplay":e||null,"data-delay":e?t:null,"data-effect":n,children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:i.map(({alt:e,caption:t,id:n,url:i})=>(0,m.jsx)("li",{className:(0,l.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,r.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,src:i}),(0,r.isBlobURL)(i)&&(0,m.jsx)(o.Spinner,{}),t&&(0,m.jsx)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},n||i))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:p.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},77294(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"},aspectRatio:{source:"attribute",selector:"img",attribute:"data-aspect-ratio"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}}},51012(e,t,n){"use strict";n.d(t,{A:()=>r});n(17309);async function r(e=".swiper-container",t={},n={}){const r={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(n||{}).map(([e,t])=>[e,function(){t(this)}]))};let s;if(window.JetpackSwiper)s=window.JetpackSwiper;else{const e=window.Jetpack_Block_Assets_Base_Url+"swiper.css";if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}if(await import(window.Jetpack_Block_Assets_Base_Url+"swiper.js"),!window.JetpackSwiper)throw new Error("Failed to load Jetpack Swiper bundle");s=window.JetpackSwiper}return new s(e,{...r,...t})}},9455(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>i.A,save:()=>l,supports:()=>a.A});var r=n(94715),s=n(71071),o=n(10790),i=n(77294),a=n(82233);const l=({attributes:{align:e,autoplay:t,delay:n,effect:i,images:a},className:l})=>{const c=r.useBlockProps.save({className:l});return(0,o.jsx)(s.A,{align:e,autoplay:t,className:c.className,delay:n,effect:i,images:a})}},71071(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(63162),s=n(94715),o=n(56427),i=n(86087),a=n(27723),l=n(13022),c=n(66087),u=n(94107),d=n(31837),p=n(51012),h=n(72182),m=n(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:s,images:o,onError:i}=this.props;if(t===e.align&&(0,c.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),s!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:n,effect:i,images:a}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":i,style:{"--aspect-ratio":a[0]?.aspectRatio?`calc(${a[0].aspectRatio})`:void 0},children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:a.map(({alt:e,caption:t,id:n,url:i,aspectRatio:a},c)=>(0,m.jsx)("li",{className:(0,l.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,r.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,"data-aspect-ratio":a,src:i}),(0,r.isBlobURL)(i)&&(0,m.jsx)(o.Spinner,{}),t&&(0,m.jsx)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},n?`${n}-${c}`:`${i}-${c}`))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,p.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,followFinger:!1,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:d.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},72182(e,t,n){"use strict";n.d(t,{WF:()=>l,bz:()=>a,n7:()=>c,rQ:()=>i});var r=n(89877);const s=16/9,o="wp-block-jetpack-slideshow_autoplay-paused";function i(e){a(e),l(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){e.el&&(e.el.classList.contains(o)?(e.el.classList.remove(o),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(o),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function a(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const n=t.naturalWidth/t.naturalHeight,r=Math.max(Math.min(n,s),1),o="undefined"!=typeof window?.8*window.innerHeight:600,i=Math.min(e.width/r,o),a=`${Math.floor(i)}px`,l=`${Math.floor(i/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=a,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=l,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=l}function l(e){(e.slides||[]).forEach((t,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],s=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(s.alt))}(e)}function c(e){(e.pagination.bullets||[]).forEach(t=>{t.addEventListener("click",()=>{const t=e.slides[e.realIndex];setTimeout(()=>{t.focus()},500)})})}},61725(e,t,n){"use strict";n.d(t,{Ay:()=>_});var r=n(85985),s=n(63162),o=n(94715),i=n(56427),a=n(29491),l=n(47143),c=n(98490),u=n.n(c),d=n(43656),p=n(86087),h=n(27723),m=n(66087),g=n(87762),f=n(94247),b=n(241),v=n(63728),y=(n(17319),n(10790));const __=h.__,k=["image"],x=(e,t)=>{const n=(0,m.pick)(e,["alt","id","link","caption"]),r=e?.sizes?.[t]||e?.media_details?.sizes?.[t]||e?.sizes?.full||e?.media_details?.sizes?.full||e;return n.url=r?.url||r?.source_url||e.url,n.width=r?.width||null,n.height=r?.height||null,n.aspectRatio=r?.width&&r?.height?`${r.width} / ${r.height}`:null,n},_=(0,a.compose)((0,l.withSelect)((e,t)=>{const{ids:n}=t.attributes,{getEntityRecord:r}=e("core");return{imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:n.map(e=>{const t=r("postType","attachment",e);return{id:e,sizes:t?.media_details?.sizes}})}}),(0,l.withDispatch)(e=>{const{lockPostSaving:t,unlockPostSaving:n}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:n}}),i.withNotices)(({attributes:e,setAttributes:t,className:n,isSelected:a,noticeOperations:l,noticeUI:c,lockPostSaving:h,unlockPostSaving:m,imageSizes:_,resizedImages:w})=>{const{align:j,autoplay:C,delay:A,effect:S,images:E,sizeSlug:T,ids:N}=e,P=(0,o.useBlockProps)({className:n}),B=e=>{t({images:e,ids:e.map(({id:e})=>parseInt(e,10))})};(0,p.useEffect)(()=>{"undefined"!=typeof window&&u()(function(){(0,v.A)()})},[]);const R=e=>B(e.map(e=>x(e,T))),I=e=>{const t="slideshowBlockLock";h(t),(0,d.mediaUpload)({allowedTypes:k,filesList:e,onFileChange:e=>{const n=e.map(e=>x(e,T));B([...E||[],...n]),n.every(e=>(0,s.isBlobURL)(e.url))||m(t)},onError:l.createErrorNotice})},D=e=>I(e.target.files);let L;return(0,p.useEffect)(()=>{T||t({sizeSlug:N.length?"full":"large"})},[]),L=0===E.length?(0,y.jsx)(o.MediaPlaceholder,{icon:(0,r.sh)(g),labels:{title:__("Slideshow","jetpack"),instructions:__("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:R,accept:"image/*",allowedTypes:k,multiple:!0,notices:c,onError:l.createErrorNotice}):(0,y.jsxs)(y.Fragment,{children:[c,(0,y.jsx)(b.A,{align:j,autoplay:C,delay:A,effect:S,images:E,onError:l.createErrorNotice}),(0,y.jsx)(i.DropZone,{onFilesDrop:I}),a&&(0,y.jsx)("div",{className:"wp-block-jetpack-slideshow__add-item",children:(0,y.jsx)(i.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:D,accept:"image/*",icon:"insert",__next40pxDefaultSize:!0,children:__("Upload an image","jetpack")})})]}),(0,y.jsxs)("div",{...P,children:[(0,y.jsx)(o.InspectorControls,{children:(0,y.jsx)(f.H,{attributes:e,imageSizeOptions:_?.map(({name:e,slug:t})=>({value:t,label:e}))??[],onChangeImageSize:e=>{const n=E.map(t=>{const n=w.find(({id:e})=>parseInt(e,10)===parseInt(t.id,10)),r=n?.sizes?.[e]||n?.media_details?.sizes?.[e]||n?.sizes?.full||n?.media_details?.sizes?.full,s=r?.source_url||r?.url||t.url;return{...t,...s&&{url:s}}});B(n),t({sizeSlug:e})},setAttributes:t})}),(0,y.jsx)(o.BlockControls,{children:(0,y.jsx)(f.o,{allowedMediaTypes:k,attributes:e,onSelectImages:R})}),L]})})},96764(e,t,n){"use strict";var r=n(94375),s=n(87762),o=n(88075),i=n(61725),a=n(41952),l=n(96374),c=n(88513),u=n(98564),d=n(37332);(0,r.M)(s,{edit:i.Ay,save:a.A,transforms:d.A,example:{attributes:{align:"center",autoplay:!0,images:[{alt:"",caption:"",url:l},{alt:"",caption:"",url:c},{alt:"",caption:"",url:u}],effect:"slide"}},deprecated:o.A})},30889(e,t,n){"use strict";n.d(t,{y:()=>s});var r=n(27723);const __=r.__;function s(e,t,n){let s="";if(n<=5)for(let e=1;e<=n;e++){s+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,r.sprintf)(/* translators: %s: the slide number to navigate to */
__("Go to slide %s","jetpack"),e)+'"></button>'}else s+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;return s}},41952(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(241),o=n(10790);const i=({attributes:{align:e,autoplay:t,delay:n,effect:i,images:a},className:l})=>{const c=r.useBlockProps.save({className:l});return(0,o.jsx)(s.A,{align:e,autoplay:t,className:c.className,delay:n,effect:i,images:a})};n.dn(i)},241(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(63162),s=n(94715),o=n(56427),i=n(86087),a=n(27723),l=n(13022),c=n(66087),u=n(94107),d=n(33170),p=n(30889),h=n(34308),m=n(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:s,images:o,onError:i}=this.props;if(t===e.align&&(0,c.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),s!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:n,effect:i,images:a}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":i,style:{"--aspect-ratio":a[0]?.aspectRatio?`calc(${a[0].aspectRatio})`:void 0},children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:a.map(({alt:e,caption:t,id:n,url:i,aspectRatio:a},c)=>(0,m.jsx)("li",{className:(0,l.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,r.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,"data-aspect-ratio":a,src:i}),(0,r.isBlobURL)(i)&&(0,m.jsx)(o.Spinner,{}),t&&(0,m.jsx)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},n?`${n}-${c}`:`${i}-${c}`))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!1,initialSlide:e,followFinger:!1,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:p.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},34308(e,t,n){"use strict";n.d(t,{WF:()=>l,bz:()=>a,n7:()=>c,rQ:()=>i});var r=n(89877);const s=16/9,o="wp-block-jetpack-slideshow_autoplay-paused";function i(e){e.slides.length>1&&(e.loopDestroy(),e.params.loop=!0,e.loopCreate(),e.update()),a(e),l(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){e.el&&(e.el.classList.contains(o)?(e.el.classList.remove(o),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(o),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function a(e){if(!e||!e.el)return;const t=e.params.loop?e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img'):e.el.querySelector(".swiper-slide img");if(!t)return;let n;if(t.naturalWidth>0&&t.naturalHeight>0)n=t.naturalWidth/t.naturalHeight;else if(t.dataset.aspectRatio){const e=t.dataset.aspectRatio.match(/(\d+) \/ (\d+)/);e&&e[1]&&e[2]&&(n=parseInt(e[1],10)/parseInt(e[2],10))}else t.getAttribute("width")&&t.getAttribute("height")&&(n=parseInt(t.getAttribute("width"),10)/parseInt(t.getAttribute("height"),10));n||(n=s,t.complete||t.addEventListener("load",()=>a(e),{once:!0}));const r=Math.max(Math.min(n,s),1),o="undefined"!=typeof window?.8*window.innerHeight:600,i=Math.min(e.width/r,o),l=`${Math.floor(i)}px`,c=`${Math.floor(i/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=l,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=c}function l(e){(e.slides||[]).forEach((t,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],s=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(s.alt))}(e)}function c(e){(e.pagination.bullets||[]).forEach(t=>{t.addEventListener("click",()=>{const t=e.slides[e.realIndex];setTimeout(()=>{t.focus()},500)})})}},37332(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(74997);function s(e=[]){return e.filter(({id:e,url:t})=>e&&t)}const o={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>s(e).length>0,transform:e=>{const t=s(e);return(0,r.createBlock)("jetpack/slideshow",{images:t.map(({alt:e,caption:t,id:n,url:r})=>({alt:e,caption:t,id:n,url:r})),ids:t.map(({id:e})=>e)})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:({images:e=[]},t)=>{!e.length&&t?.length&&(e=t.filter(e=>"core/image"===e.name&&e.attributes?.url).map(({attributes:e})=>({id:e.id,url:e.url,link:e.href,alt:e.alt,caption:e.caption})));const n=s(e);return n.length>0?(0,r.createBlock)("jetpack/slideshow",{images:n.map(({alt:e,caption:t,id:n,url:r})=>({alt:e,caption:t,id:n,url:r})),ids:n.map(({id:e})=>e)}):(0,r.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:({images:e,ids:t})=>(0,r.createBlock)("core/gallery",{images:e,ids:t})},{type:"block",blocks:["core/image"],transform:({images:e})=>e.length>0?e.map(({id:e,url:t,alt:n,caption:s})=>(0,r.createBlock)("core/image",{id:e,url:t,alt:n,caption:s})):(0,r.createBlock)("core/image")}]}},63728(e,t,n){"use strict";function r(){const e=(e,t)=>{const n=e.querySelector(".wp-site-blocks");if(!n)return;const{paddingLeft:r,paddingRight:s}=window.getComputedStyle(n),o=parseFloat(r)+parseFloat(s);e.querySelectorAll(t?".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow":".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow:not(.entry-content .wp-block-jetpack-slideshow)").forEach(e=>{e.style.maxWidth=`calc(100vw - ${o}px)`})};e(document,!1);document.querySelectorAll("iframe").forEach(t=>{const n=t.contentDocument,r=t.closest("#editor");if(n&&r){n.querySelectorAll(".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow").forEach(e=>{e.style.maxWidth="inherit"})}else n&&e(n,!0)})}n.d(t,{A:()=>r})},35463(e,t,n){"use strict";n.d(t,{WN:()=>i,ZS:()=>o,aQ:()=>l,eN:()=>r,hE:()=>s,kc:()=>c,rK:()=>a});const r=["image"],s=4,o=20,i=20,a=2e3,l="circle",c=[{isDefault:!0,name:"rectangular"},{name:l},{name:"square"},{name:"columns"}]},77530(e,t,n){"use strict";n.d(t,{M:()=>m,c:()=>h});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(74490),l=n(35463),c=n(2164),u=n(9888),d=n(10790);const __=i.__,p=[{value:"attachment",label:__("Attachment Page","jetpack")},{value:"media",label:__("Media File","jetpack")},{value:"none",label:__("None","jetpack")},{value:"custom",label:__("Custom","jetpack")}],h=({images:e,onSelectImages:t,imageFilter:n,onFilterChange:i})=>(0,d.jsx)(r.BlockControls,{children:!!e.length&&(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)(s.ToolbarGroup,{children:(0,d.jsx)(s.ToolbarItem,{children:()=>(0,d.jsx)(r.MediaUpload,{onSelect:t,allowedTypes:l.eN,multiple:!0,gallery:!0,value:e.map(e=>e.id),render:({open:e})=>(0,d.jsx)(a.A,{label:__("Edit Gallery","jetpack"),onClick:e})})})}),(0,d.jsx)(c.A,{value:n,onChange:i})]})}),m=({layoutStyle:e,images:t,columns:n,onColumnsChange:o,roundedCorners:i,onRoundedCornersChange:a,linkTo:c,onLinkToChange:h,selectedImage:m,setImageAttributes:g})=>(0,d.jsxs)(r.InspectorControls,{children:[(0,d.jsxs)(s.PanelBody,{title:__("Tiled Gallery settings","jetpack"),children:[(0,u.o)(e)&&t.length>1&&(0,d.jsx)(s.RangeControl,{label:__("Columns","jetpack"),value:n,onChange:o,min:1,max:Math.min(l.ZS,t.length),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),e!==l.aQ&&(0,d.jsx)(s.RangeControl,{label:__("Rounded corners","jetpack"),value:i,onChange:a,min:0,max:l.WN,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(s.SelectControl,{label:__("Link To","jetpack"),value:c,onChange:h,options:p,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),null!==m&&"custom"===c&&(0,d.jsx)(s.PanelBody,{title:__("Image Link Settings","jetpack"),children:(0,d.jsx)(s.TextControl,{label:__("Link URL","jetpack"),value:t[m]?.customLink||"",onChange:e=>{"custom"===c&&g(m)({customLink:e})},placeholder:__("Enter URL","jetpack"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})]})},10602(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(9190),s=n(72203),o=n(52516),i=n(24753),a=n(62554),l=n(59679),c=n(75e3);const u=[n(20837),c,l,a,i,o,s,r]},70263(e,t,n){"use strict";n.d(t,{T$:()=>i,ZS:()=>s,hE:()=>r,kc:()=>a,rK:()=>o});const r=4,s=20,o=2e3,i="rectangular",a=[{isDefault:!0,name:i},{name:"circle"},{name:"square"},{name:"columns"}]},69291(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(63162),s=n(10790);function o(e){const{"aria-label":t,alt:n,height:o,id:i,link:a,linkTo:l,origUrl:c,url:u,width:d}=e;if((0,r.isBlobURL)(c))return null;let p;switch(l){case"media":p=u;break;case"attachment":p=a}const h=(0,s.jsx)("img",{alt:n,"aria-label":t,"data-height":o,"data-id":i,"data-link":a,"data-url":c,"data-width":d,src:u});return(0,s.jsx)("figure",{className:"tiled-gallery__item",children:p?(0,s.jsx)("a",{href:p,children:h}):h})}},9190(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>s,save:()=>r.A,support:()=>o});var r=n(39805);const s={align:{default:"center",type:"string"},className:{default:`is-style-${n(70263).T$}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},caption:{selector:"figcaption",source:"html",type:"string"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"}},o={align:["center","wide","full"],customClassName:!1,html:!1}},29971(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e}){return(0,r.jsx)("div",{className:"tiled-gallery__col",children:e})}},75303(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,galleryRef:t}){return(0,r.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},5525(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(63162),s=n(86087),o=n(27723),i=n(14936),a=n(70263),l=n(69291),c=n(58070),u=n(45726),d=n(10790);const __=o.__;class p extends s.Component{photonize({height:e,width:t,url:n}){if(!n)return;if((0,r.isBlobURL)(n)||/^https?:\/\/localhost/.test(n))return n;const s=n.split("?",1)[0],o=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)?m:i.A,{layoutStyle:l}=this.props;if(h(l)&&t&&e){const n=Math.min(a.rK,t,e);return o(s,{resize:`${n},${n}`})}return o(s)}renderImage(e,t){const{images:n,linkTo:r,selectedImage:s}=this.props,i=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,n.length);return(0,d.jsx)(l.A,{alt:e.alt,"aria-label":i,height:e.height,id:e.id,origUrl:e.url,isSelected:s===t,link:e.link,linkTo:r,url:this.photonize(e),width:e.width},t)}render(){const{align:e,children:t,className:n,columns:r,images:s,layoutStyle:o}=this.props,i=h(o)?u.A:c.A,a=this.props.images.map(this.renderImage,this);return(0,d.jsxs)("div",{className:n,children:[(0,d.jsx)(i,{align:e,columns:r,images:s,layoutStyle:o,renderedImages:a}),t]})}}function h(e){return["circle","square"].includes(e)}function m(e,t={}){const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,s]of Object.entries(t))r.searchParams.set(Object.hasOwn(n,e)?n[e]:e,s);return r.toString()}},58070(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),s=n(94107),o=n(29971),i=n(75303),a=n(56237),l=n(34896),c=n(5236),u=n(10790);class d extends r.Component{gallery=(0,r.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame(()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t;(0,c.S)(n).forEach(t=>(0,c.r)(t,e))}})};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.A(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:s}=this.props,c=(0,l.mJ)(n),d="columns"===r?(0,l.FL)(c,t):(0,l.VU)(c,{isWide:["full","wide"].includes(e)});let p=0;return(0,u.jsx)(i.A,{galleryRef:this.gallery,children:d.map((e,t)=>(0,u.jsx)(a.A,{children:e.map((e,t)=>{const n=s.slice(p,p+e);return p+=e,(0,u.jsx)(o.A,{children:n},t)})},t))})}}},34896(e,t,n){"use strict";n.d(t,{FL:()=>i,VU:()=>C,mJ:()=>s});var r=n(66087);function s(e){return e.map(o)}function o({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,s=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,t=>{const r=i<=(e+1)*n;return r&&(i+=t),r}).length;s.push(t),o=o.slice(t)}return s.push(o.length),[s]}const a=A([2,1,2],5),l=S([E,E,T,E,E]),c=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),x=A([1,1,1],3),_=S([(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2)),P(1.6)]),w=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const n=(e,s)=>{if(!s.length)return e;let o;o=s.length>15&&l(s)&&a(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&y(e)&&(0,r.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)(t.slice(0,4));return k(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,n){const s=(0,r.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||n)}(e,s,t)?[1,1,1]:_(s)&&w(e)?[2,1]:j(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);const i=e.concat([o]),C=(0,r.sum)(o),A=s.slice(C);return n(i,A)};return n([],e)}function A(e,t){return n=>!n.slice(-t).some(t=>(0,r.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,r.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},5236(e,t,n){"use strict";n.d(t,{S:()=>i,r:()=>o});var r=n(70263);function s(e,t){const n=(t-e.reduce((e,t)=>e+t,0))/e.length;return e.map(e=>e+n)}function o(e,t){!function(e,[t,n],o){const i=1/t*(o-r.hE*(e.childElementCount-1)-n);!function(e,{rawHeight:t,rowWidth:n}){const o=a(e),i=o.map(e=>(t-r.hE*(e.childElementCount-1))*c(e)[0]),d=s(i,n);o.forEach((e,n)=>{const o=i[n],a=d[n];!function(e,{colHeight:t,width:n,rawWidth:r}){const o=l(e).map(e=>r/u(e)),i=s(o,t);Array.from(e.children).forEach((e,t)=>{const r=i[t];e.setAttribute("style",`height:${r}px;width:${n}px;`)})}(e,{colHeight:t-r.hE*(e.childElementCount-1),width:a,rawWidth:o})})}(e,{rawHeight:i,rowWidth:o-r.hE*(e.childElementCount-1)})}(e,function(e){const t=a(e).map(c).reduce(([e,t],[n,r])=>[e+n,t+r],[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function a(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce((e,t)=>e+1/t,0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},56237(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(13022),s=n(10790);function o({children:e,className:t}){return(0,s.jsx)("div",{className:(0,r.A)("tiled-gallery__row",t),children:e})}},45726(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(66087),s=n(70263),o=n(29971),i=n(75303),a=n(56237),l=n(10790);function c({columns:e,renderedImages:t}){const n=Math.min(s.ZS,e),c=t.length%n;return(0,l.jsx)(i.A,{children:[...c?[t.slice(0,c)]:[],...(0,r.chunk)(t.slice(c),n)].map((e,t)=>(0,l.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,l.jsx)(o.A,{children:e},t))},t))})}},39805(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(90907),s=n(70263),o=n(5525),i=n(10790);function a(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{images:t}=e;if(!t.length)return null;const{align:n,className:l,columns:c=a(e),linkTo:u}=e;return(0,i.jsx)(o.A,{align:n,className:l,columns:c,images:t,layoutStyle:(0,r.D)(s.kc,l),linkTo:u})}},43566(e,t,n){"use strict";n.d(t,{T$:()=>a,WN:()=>s,ZS:()=>r,aQ:()=>i,kc:()=>l,rK:()=>o});const r=20,s=20,o=2e3,i="circle",a="rectangular",l=[{isDefault:!0,name:a},{name:i},{name:"square"},{name:"columns"}]},13913(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(63162),s=n(13022),o=n(10790);function i(e){const{alt:t,imageFilter:n,height:i,id:a,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,r.isBlobURL)(u))return null;let h;switch(c){case"media":h=d;break;case"attachment":h=l}const m=(0,o.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":l,"data-url":u,"data-width":p,src:d});return(0,o.jsx)("figure",{className:(0,s.A)("tiled-gallery__item",{[`filter__${n}`]:!!n}),children:h?(0,o.jsx)("a",{href:h,children:m}):m})}},72203(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>o,save:()=>s.A,supports:()=>i});var r=n(43566),s=n(14294);const o={align:{default:"center",type:"string"},className:{default:`is-style-${r.T$}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1}},84394(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e}){return(0,r.jsx)("div",{className:"tiled-gallery__col",children:e})}},38548(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,galleryRef:t}){return(0,r.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},65378(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(86087),s=n(27723),o=n(13022),i=n(43566),a=n(13913),l=n(24549),c=n(84255),u=n(51475),d=n(10790);const __=s.__;class p extends r.Component{renderImage(e,t){const{columns:n,imageFilter:r,images:o,linkTo:i,layoutStyle:c,selectedImage:u}=this.props,p=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:h,srcSet:m}=(0,l.A)(e,{layoutStyle:c});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":p,columns:n,height:e.height,id:e.id,imageFilter:r,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:u===t,link:e.link,linkTo:i,origUrl:e.url,showMovers:o.length>1,srcSet:m,url:h,width:e.width},t)}render(){const{align:e,children:t,className:n,columns:r,images:s,layoutStyle:a,roundedCorners:p}=this.props,h=(0,l.s)(a)?u.A:c.A,m=this.props.images.map(this.renderImage,this),g=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{className:(0,o.A)(n,{[`has-rounded-corners-${g}`]:g>0}),children:[(0,d.jsx)(h,{align:e,columns:r,images:s,layoutStyle:a,renderedImages:m}),t]})}}},84255(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(86087),s=n(84394),o=n(38548),i=n(70954),a=n(89195),l=n(10790);class c extends r.Component{gallery=(0,r.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:c}=this.props,u=(0,a.mJ)(n),d="columns"===r?(0,a.FL)(u,t):(0,a.VU)(u,{isWide:["full","wide"].includes(e)});let p=0;return(0,l.jsx)(o.A,{galleryRef:this.gallery,children:d.map((e,t)=>(0,l.jsx)(i.A,{children:e.map((e,t)=>{const n=c.slice(p,p+e);return p+=e,(0,l.jsx)(s.A,{children:n},t)})},t))})}}},89195(e,t,n){"use strict";n.d(t,{FL:()=>i,VU:()=>C,mJ:()=>s});var r=n(66087);function s(e){return e.map(o)}function o({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,s=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,t=>{const r=i<=(e+1)*n;return r&&(i+=t),r}).length;s.push(t),o=o.slice(t)}return s.push(o.length),[s]}const a=A([2,1,2],5),l=S([E,E,T,E,E]),c=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),x=A([1,1,1],3),_=S([(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2)),P(1.6)]),w=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const n=(e,s)=>{if(!s.length)return e;let o;o=s.length>15&&l(s)&&a(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&y(e)&&(0,r.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)(t.slice(0,4));return k(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,n){const s=(0,r.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||n)}(e,s,t)?[1,1,1]:_(s)&&w(e)?[2,1]:j(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);const i=e.concat([o]),C=(0,r.sum)(o),A=s.slice(C);return n(i,A)};return n([],e)}function A(e,t){return n=>!n.slice(-t).some(t=>(0,r.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,r.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},70954(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(13022),s=n(10790);function o({children:e,className:t}){return(0,s.jsx)("div",{className:(0,r.A)("tiled-gallery__row",t),children:e})}},51475(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(66087),s=n(43566),o=n(84394),i=n(38548),a=n(70954),l=n(10790);function c({columns:e,renderedImages:t}){const n=Math.min(s.ZS,e),c=t.length%n;return(0,l.jsx)(i.A,{children:[...c?[t.slice(0,c)]:[],...(0,r.chunk)(t.slice(c),n)].map((e,t)=>(0,l.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,l.jsx)(o.A,{children:e},t))},t))})}},14294(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(90907),s=n(43566),o=n(65378),i=n(10790);function a(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:l,className:c,columns:u=a(e),linkTo:d,roundedCorners:p}=e;return(0,i.jsx)(o.A,{align:l,className:c,columns:u,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,r.D)(s.kc,c),linkTo:d,roundedCorners:p})}},24549(e,t,n){"use strict";n.d(t,{A:()=>a,s:()=>i});var r=n(63162),s=n(14936),o=n(43566);function i(e){return["circle","square"].includes(e)}function a(e,t={}){if(!e.height||!e.url||!e.width)return{};if((0,r.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:a,width:c}=e,{layoutStyle:u}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?l:s.A;let p;if(i(u)&&c&&a){const e=Math.min(o.rK,c,a);p=d(n,{resize:`${e},${e}`})}else p=d(n);let h=[];if(i(u)){const e=Math.min(600,c,a),t=Math.min(o.rK,c,a);for(let r=e;r<t;r+=300){const e=d(n,{resize:`${r},${r}`,strip:"info"});e&&h.push(`${e} ${r}w`)}}else{const e=Math.min(600,c),t=Math.min(o.rK,c);for(let r=e;r<t;r+=300){const e=d(n,{strip:"info",width:r});e&&h.push(`${e} ${r}w`)}}return h=h.join(","),Object.assign({src:p},h&&{srcSet:h})}function l(e,t={}){const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,s]of Object.entries(t))r.searchParams.set(Object.hasOwn(n,e)?n[e]:e,s);return r.toString()}},60041(e,t,n){"use strict";n.d(t,{T$:()=>a,WN:()=>s,ZS:()=>r,aQ:()=>i,kc:()=>l,rK:()=>o});const r=20,s=20,o=2e3,i="circle",a="rectangular",l=[{isDefault:!0,name:a},{name:i},{name:"square"},{name:"columns"}]},64300(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(63162),s=n(13022),o=n(10790);function i(e){const{alt:t,imageFilter:n,height:i,id:a,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,r.isBlobURL)(u))return null;let h;switch(c){case"media":h=d;break;case"attachment":h=l}const m=(0,o.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":l,"data-url":u,"data-width":p,src:d});return(0,o.jsx)("figure",{className:(0,s.A)("tiled-gallery__item",{[`filter__${n}`]:!!n}),children:h?(0,o.jsx)("a",{href:h,children:m}):m})}},52516(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>o,migrate:()=>a,save:()=>s.A,supports:()=>i});var r=n(60041),s=n(28635);const o={align:{default:"center",type:"string"},className:{default:`is-style-${r.T$}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1},a=e=>{const t=Math.pow(10,5);return{...e,columnWidths:e.columnWidths.map(e=>e.map(e=>Math.round(e*t)/t))}}},54001(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,width:t}){const n=Math.pow(10,12),s=Math.round(t*n)/n,o=t?{flexBasis:`${s}%`}:void 0;return(0,r.jsx)("div",{className:"tiled-gallery__col",style:o,children:e})}},99309(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,galleryRef:t}){return(0,r.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},77511(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(86087),s=n(27723),o=n(13022),i=n(60041),a=n(64300),l=n(13014),c=n(56420),u=n(65216),d=n(10790);const __=s.__;class p extends r.Component{renderImage(e,t){const{columns:n,imageFilter:r,images:o,isSave:i,linkTo:c,layoutStyle:u,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:y,srcSet:k}=(0,l.A)(e,{layoutStyle:u});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:r,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:c,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:o.length>1,srcSet:k,url:y,width:e.width},t)}render(){const{align:e,children:t,className:n,columns:r,images:s,layoutStyle:a,roundedCorners:p,onResize:h,isSave:m,columnWidths:g}=this.props,f=(0,l.s)(a)?u.A:c.A,b=this.props.images.map(this.renderImage,this),v=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{className:(0,o.A)(n,{[`has-rounded-corners-${v}`]:v>0}),children:[(0,d.jsx)(f,{align:e,columns:r,columnWidths:m?g:void 0,images:s,layoutStyle:a,renderedImages:b,onResize:m?void 0:h}),t]})}}},56420(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(86087),s=n(54001),o=n(99309),i=n(46479),a=n(70394),l=n(10790);class c extends r.Component{gallery=(0,r.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:c,columnWidths:u}=this.props,d=(0,a.mJ)(n),p="columns"===r?(0,a.FL)(d,t):(0,a.VU)(d,{isWide:["full","wide"].includes(e)});let h=0;return(0,l.jsx)(o.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,l.jsx)(i.A,{children:e.map((e,n)=>{const r=c.slice(h,h+e);return h+=e,(0,l.jsx)(s.A,{width:u?.[t]?.[n],children:r},n)})},t))})}}},70394(e,t,n){"use strict";n.d(t,{FL:()=>i,VU:()=>C,mJ:()=>s});var r=n(66087);function s(e){return e.map(o)}function o({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,s=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,t=>{const r=i<=(e+1)*n;return r&&(i+=t),r}).length;s.push(t),o=o.slice(t)}return s.push(o.length),[s]}const a=A([2,1,2],5),l=S([E,E,T,E,E]),c=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),x=A([1,1,1],3),_=S([(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2)),P(1.6)]),w=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const n=(e,s)=>{if(!s.length)return e;let o;o=s.length>15&&l(s)&&a(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&y(e)&&(0,r.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)(t.slice(0,4));return k(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,n){const s=(0,r.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||n)}(e,s,t)?[1,1,1]:_(s)&&w(e)?[2,1]:j(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);const i=e.concat([o]),C=(0,r.sum)(o),A=s.slice(C);return n(i,A)};return n([],e)}function A(e,t){return n=>!n.slice(-t).some(t=>(0,r.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,r.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},46479(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(13022),s=n(10790);function o({children:e,className:t}){return(0,s.jsx)("div",{className:(0,r.A)("tiled-gallery__row",t),children:e})}},65216(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(66087),s=n(60041),o=n(54001),i=n(99309),a=n(46479),l=n(10790);function c({columns:e,renderedImages:t}){const n=Math.min(s.ZS,e),c=t.length%n;return(0,l.jsx)(i.A,{children:[...c?[t.slice(0,c)]:[],...(0,r.chunk)(t.slice(c),n)].map((e,t)=>(0,l.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,l.jsx)(o.A,{children:e},t))},t))})}},28635(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(90907),s=n(60041),o=n(77511),i=n(10790);function a(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:l,className:c,columns:u=a(e),linkTo:d,roundedCorners:p,columnWidths:h}=e;return(0,i.jsx)(o.A,{align:l,className:c,columns:u,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,r.D)(s.kc,c),linkTo:d,roundedCorners:p,columnWidths:h})}},13014(e,t,n){"use strict";n.d(t,{A:()=>a,s:()=>i});var r=n(63162),s=n(14936),o=n(60041);function i(e){return["circle","square"].includes(e)}function a(e,t={}){if(!e.height||!e.url||!e.width)return{};if((0,r.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:a,width:c}=e,{layoutStyle:u}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?l:s.A;let p;if(i(u)&&c&&a){const e=Math.min(o.rK,c,a);p=d(n,{resize:`${e},${e}`})}else p=d(n);let h=[];if(i(u)){const e=Math.min(600,c,a),t=Math.min(o.rK,c,a);for(let r=e;r<t;r+=300){const e=d(n,{resize:`${r},${r}`,strip:"info"});e&&h.push(`${e} ${r}w`)}}else{const e=Math.min(600,c),t=Math.min(o.rK,c);for(let r=e;r<t;r+=300){const e=d(n,{strip:"info",width:r});e&&h.push(`${e} ${r}w`)}}return h=h.join(","),Object.assign({src:p},h&&{srcSet:h})}function l(e,t={}){const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,s]of Object.entries(t))r.searchParams.set(Object.hasOwn(n,e)?n[e]:e,s);return r.toString()}},86136(e,t,n){"use strict";n.d(t,{T$:()=>l,WN:()=>o,ZS:()=>s,aQ:()=>a,hE:()=>r,kc:()=>c,rK:()=>i});const r=4,s=20,o=20,i=2e3,a="circle",l="rectangular",c=[{isDefault:!0,name:l},{name:a},{name:"square"},{name:"columns"}]},92431(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(63162),s=n(13022),o=n(10790);function i(e){const{alt:t,imageFilter:n,height:i,id:a,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,r.isBlobURL)(u))return null;let h;switch(c){case"media":h=d;break;case"attachment":h=l}const m=(0,o.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":l,"data-url":u,"data-width":p,src:d,"data-amp-layout":"responsive"});return(0,o.jsx)("figure",{className:(0,s.A)("tiled-gallery__item",{[`filter__${n}`]:!!n}),children:h?(0,o.jsx)("a",{href:h,children:m}):m})}},24753(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>o,save:()=>s.A,supports:()=>i});var r=n(86136),s=n(21180);const o={align:{default:"center",type:"string"},className:{default:`is-style-${r.T$}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},78608(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,width:t}){const n=t?{flexBasis:`${t}%`}:void 0;return(0,r.jsx)("div",{className:"tiled-gallery__col",style:n,children:e})}},52042(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,galleryRef:t}){return(0,r.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},26092(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(86087),s=n(27723),o=n(13022),i=n(86136),a=n(92431),l=n(32083),c=n(91341),u=n(67325),d=n(10790);const __=s.__;class p extends r.Component{renderImage(e,t){const{columns:n,imageFilter:r,images:o,isSave:i,linkTo:c,layoutStyle:u,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:y,srcSet:k}=(0,l.A)(e,{layoutStyle:u});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:r,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:c,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:o.length>1,srcSet:k,url:y,width:e.width},t)}render(){const{align:e,children:t,className:n,columns:r,images:s,layoutStyle:a,roundedCorners:p,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,l.s)(a)?u.A:c.A,v=this.props.images.map(this.renderImage,this),y=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{style:m,className:(0,o.A)(n,{[`has-rounded-corners-${y}`]:y>0}),children:[(0,d.jsx)(b,{align:e,columns:r,columnWidths:g?f:void 0,images:s,layoutStyle:a,renderedImages:v,onResize:g?void 0:h}),t]})}}},91341(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),s=n(94107),o=n(78608),i=n(52042),a=n(9276),l=n(71245),c=n(86461),u=n(10790);class d extends r.Component{gallery=(0,r.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame(()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t,r=[];(0,c.S)(n).forEach(t=>{r.push((0,c.r)(t,e))}),void 0!==this.props.onResize&&this.props.onResize(r)}})};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.A(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map(e=>e.map(e=>{const n=t.slice(r,r+e);return r+=e,n})).map(e=>(0,c.r)(e,n))}render(){const{align:e,columns:t,images:n,layoutStyle:s,renderedImages:c}=this.props,d=(0,l.mJ)(n),p="columns"===s?(0,l.FL)(d,t):(0,l.VU)(d,{isWide:["full","wide"].includes(e)}),h=r.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,c,1e3)})();let m=0;return(0,u.jsx)(i.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,u.jsx)(a.A,{children:e.map((e,n)=>{const r=c.slice(m,m+e);return m+=e,(0,u.jsx)(o.A,{width:h?.[t]?.[n],children:r},n)})},t))})}}},71245(e,t,n){"use strict";n.d(t,{FL:()=>i,VU:()=>C,mJ:()=>s});var r=n(66087);function s(e){return e.map(o)}function o({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,s=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,t=>{const r=i<=(e+1)*n;return r&&(i+=t),r}).length;s.push(t),o=o.slice(t)}return s.push(o.length),[s]}const a=A([2,1,2],5),l=S([E,E,T,E,E]),c=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),x=A([1,1,1],3),_=S([(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2)),P(1.6)]),w=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const n=(e,s)=>{if(!s.length)return e;let o;o=s.length>15&&l(s)&&a(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&y(e)&&(0,r.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)(t.slice(0,4));return k(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,n){const s=(0,r.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||n)}(e,s,t)?[1,1,1]:_(s)&&w(e)?[2,1]:j(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);const i=e.concat([o]),C=(0,r.sum)(o),A=s.slice(C);return n(i,A)};return n([],e)}function A(e,t){return n=>!n.slice(-t).some(t=>(0,r.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,r.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},86461(e,t,n){"use strict";n.d(t,{S:()=>i,r:()=>o});var r=n(86136);function s(e,t){const n=(t-e.reduce((e,t)=>e+t,0))/e.length;return e.map(e=>e+n)}function o(e,t){return function(e,[t,n],o){const i=1/t*(o-r.hE*(e.childElementCount-1)-n);return function(e,{rawHeight:t,rowWidth:n}){const o=a(e),i=o.map(e=>(t-r.hE*(e.childElementCount-1))*c(e)[0]),d=s(i,n);o.forEach((e,n)=>{const o=i[n],a=d[n];!function(e,{colHeight:t,width:n,rawWidth:r}){const o=l(e).map(e=>r/u(e)),i=s(o,t);Array.from(e.children).forEach((e,t)=>{const r=i[t];e.setAttribute("style",`height:${r}px;width:${n}px;`)})}(e,{colHeight:t-r.hE*(e.childElementCount-1),width:a,rawWidth:o})});return d.map(e=>parseFloat(e/n*100).toFixed(5))}(e,{rawHeight:i,rowWidth:o-r.hE*(e.childElementCount-1)})}(e,function(e){const t=a(e).map(c).reduce(([e,t],[n,r])=>[e+n,t+r],[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function a(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce((e,t)=>e+1/t,0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},9276(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(13022),s=n(10790);function o({children:e,className:t}){return(0,s.jsx)("div",{className:(0,r.A)("tiled-gallery__row",t),children:e})}},67325(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(66087),s=n(86136),o=n(78608),i=n(52042),a=n(9276),l=n(10790);function c({columns:e,renderedImages:t}){const n=Math.min(s.ZS,e),c=t.length%n;return(0,l.jsx)(i.A,{children:[...c?[t.slice(0,c)]:[],...(0,r.chunk)(t.slice(c),n)].map((e,t)=>(0,l.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,l.jsx)(o.A,{children:e},t))},t))})}},21180(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(90907),s=n(86136),o=n(26092),i=n(10790);function a(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:l,className:c,columns:u=a(e),linkTo:d,roundedCorners:p,columnWidths:h}=e;return(0,i.jsx)(o.A,{align:l,className:c,columns:u,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,r.D)(s.kc,c),linkTo:d,roundedCorners:p,columnWidths:h})}},32083(e,t,n){"use strict";n.d(t,{A:()=>u,s:()=>c});var r=n(97999),s=n(85985),o=n(63162),i=n(14936),a=n(13087),l=n(86136);function c(e){return["circle","square"].includes(e)}function u(e,t={}){if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,a.A)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,r.isWoASite)()&&(0,s.pP)())return{src:e.url};const n=e.url.split("?",1)[0],{height:u,width:p}=e,{layoutStyle:h}=t,m=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?d:i.A;let g;if(c(h)&&p&&u){const e=Math.min(l.rK,p,u);g=m(n,{resize:`${e},${e}`})}else g=m(n);let f=[];if(c(h)){const e=Math.min(600,p,u),t=Math.min(l.rK,p,u);for(let r=e;r<t;r+=300){const e=m(n,{resize:`${r},${r}`,strip:"info"});e&&f.push(`${e} ${r}w`)}}else{const e=Math.min(600,p),t=Math.min(l.rK,p);for(let r=e;r<t;r+=300){const e=m(n,{strip:"info",width:r});e&&f.push(`${e} ${r}w`)}}return f=f.join(","),Object.assign({src:g},f&&{srcSet:f})}function d(e,t={}){const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,s]of Object.entries(t))r.searchParams.set(Object.hasOwn(n,e)?n[e]:e,s);return r.toString()}},60601(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:{type:"string",default:"center"},className:{type:"string",default:"is-style-rectangular"},columns:{type:"number"},columnWidths:{type:"array",default:[]},ids:{type:"array",default:[]},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",type:"number",selector:"img",source:"attribute"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}}},62554(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>r.A,save:()=>o.A,supports:()=>s.A});var r=n(60601),s=n(2500),o=n(64129)},64129(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(94715),s=n(90907),o=n(35463),i=n(29520),a=n(10309),l=n(10790);function c({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:c,className:u,columns:d=(0,i.EB)(e),linkTo:p,roundedCorners:h,columnWidths:m}=e,g=r.useBlockProps.save();return(0,l.jsx)("div",{...g,children:(0,l.jsx)(a.A,{align:c,className:u,columns:d,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,s.D)(o.kc,u),linkTo:p,roundedCorners:h,columnWidths:m})})}},2500(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},92990(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:{type:"string",default:"center"},className:{type:"string",default:"is-style-rectangular"},columns:{type:"number"},columnWidths:{type:"array",default:[]},ids:{type:"array",default:[]},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",type:"number",selector:"img",source:"attribute"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}}},41314(e,t,n){"use strict";n.d(t,{WN:()=>s,ZS:()=>r,aQ:()=>i,rK:()=>o});const r=20,s=20,o=2e3,i="circle"},7957(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(63162),s=n(13022),o=n(10790);function i(e){const{alt:t,imageFilter:n,height:i,id:a,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,r.isBlobURL)(u))return null;let h;switch(c){case"media":h=u;break;case"attachment":h=l}const m=(0,o.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":l,"data-url":u,"data-width":p,src:d,"data-amp-layout":"responsive"});return(0,o.jsx)("figure",{className:(0,s.A)("tiled-gallery__item",{[`filter__${n}`]:!!n}),children:h?(0,o.jsx)("a",{href:h,children:m}):m})}},59679(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>r.A,save:()=>o.A,supports:()=>s.A});var r=n(92990),s=n(93951),o=n(91162)},89798(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,width:t}){const n=Math.pow(10,12),s=Math.round(t*n)/n,o=t?{flexBasis:`${s}%`}:void 0;return(0,r.jsx)("div",{className:"tiled-gallery__col",style:o,children:e})}},38448(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,galleryRef:t}){return(0,r.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},6454(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(86087),s=n(27723),o=n(13022),i=n(41314),a=n(7957),l=n(52537),c=n(62579),u=n(58711),d=n(10790);const __=s.__;class p extends r.Component{renderImage(e,t){const{columns:n,imageFilter:r,images:o,isSave:i,linkTo:c,layoutStyle:u,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:y,srcSet:k}=(0,l.A)(e,{layoutStyle:u});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:r,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:c,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:o.length>1,srcSet:k,url:y,width:e.width},t)}render(){const{align:e,children:t,className:n,columns:r,images:s,layoutStyle:a,roundedCorners:p,onResize:h,isSave:m,columnWidths:g}=this.props,f=(0,l.s)(a)?u.A:c.A,b=this.props.images.map(this.renderImage,this),v=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{className:(0,o.A)(n,{[`has-rounded-corners-${v}`]:v>0}),children:[(0,d.jsx)(f,{align:e,columns:r,columnWidths:m?g:void 0,images:s,layoutStyle:a,renderedImages:b,onResize:m?void 0:h}),t]})}}},62579(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(86087),s=n(89798),o=n(38448),i=n(26054),a=n(79167),l=n(10790);class c extends r.Component{gallery=(0,r.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:r,renderedImages:c,columnWidths:u}=this.props,d=(0,a.mJ)(n),p="columns"===r?(0,a.FL)(d,t):(0,a.VU)(d,{isWide:["full","wide"].includes(e)});let h=0;return(0,l.jsx)(o.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,l.jsx)(i.A,{children:e.map((e,n)=>{const r=c.slice(h,h+e);return h+=e,(0,l.jsx)(s.A,{width:u?.[t]?.[n],children:r},n)})},t))})}}},79167(e,t,n){"use strict";n.d(t,{FL:()=>i,VU:()=>C,mJ:()=>s});var r=n(66087);function s(e){return e.map(o)}function o({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,s=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,t=>{const r=i<=(e+1)*n;return r&&(i+=t),r}).length;s.push(t),o=o.slice(t)}return s.push(o.length),[s]}const a=A([2,1,2],5),l=S([E,E,T,E,E]),c=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),x=A([1,1,1],3),_=S([(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2)),P(1.6)]),w=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const n=(e,s)=>{if(!s.length)return e;let o;o=s.length>15&&l(s)&&a(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&y(e)&&(0,r.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)(t.slice(0,4));return k(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,n){const s=(0,r.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||n)}(e,s,t)?[1,1,1]:_(s)&&w(e)?[2,1]:j(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);const i=e.concat([o]),C=(0,r.sum)(o),A=s.slice(C);return n(i,A)};return n([],e)}function A(e,t){return n=>!n.slice(-t).some(t=>(0,r.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,r.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},26054(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(13022),s=n(10790);function o({children:e,className:t}){return(0,s.jsx)("div",{className:(0,r.A)("tiled-gallery__row",t),children:e})}},58711(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(66087),s=n(41314),o=n(89798),i=n(38448),a=n(26054),l=n(10790);function c({columns:e,renderedImages:t}){const n=Math.min(s.ZS,e),c=t.length%n;return(0,l.jsx)(i.A,{children:[...c?[t.slice(0,c)]:[],...(0,r.chunk)(t.slice(c),n)].map((e,t)=>(0,l.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,l.jsx)(o.A,{children:e},t))},t))})}},91162(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(13022),o=n(90907),i=n(35463),a=n(29520),l=n(6454),c=n(10790);function u({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=r.useBlockProps.save();return(0,c.jsxs)("div",{...f,className:(0,s.A)(f.className,d),children:[" ",(0,c.jsx)(l.A,{align:u,columns:p,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,o.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})]})}},93951(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},52537(e,t,n){"use strict";n.d(t,{A:()=>u,s:()=>c});var r=n(97999),s=n(85985),o=n(63162),i=n(14936),a=n(13087),l=n(41314);function c(e){return["circle","square"].includes(e)}function u(e,t={}){if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,a.A)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,r.isWoASite)()&&(0,s.pP)())return{src:e.url};const n=e.url.split("?",1)[0],{height:u,width:p}=e,{layoutStyle:h}=t,m=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?d:i.A;let g;if(c(h)&&p&&u){const e=Math.min(l.rK,p,u);g=m(n,{resize:`${e},${e}`})}else g=m(n);let f=[];if(c(h)){const e=Math.min(600,p,u),t=Math.min(l.rK,p,u);for(let r=e;r<t;r+=300){const e=m(n,{resize:`${r},${r}`,strip:"info"});e&&f.push(`${e} ${r}w`)}}else{const e=Math.min(600,p),t=Math.min(l.rK,p);for(let r=e;r<t;r+=300){const e=m(n,{strip:"info",width:r});e&&f.push(`${e} ${r}w`)}}return f=f.join(","),Object.assign({src:g},f&&{srcSet:f})}function d(e,t={}){const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,s]of Object.entries(t))r.searchParams.set(Object.hasOwn(n,e)?n[e]:e,s);return r.toString()}},75e3(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>r.A,save:()=>o.A,supports:()=>s.A});var r=n(37336),s=n(69813),o=n(52767)},52767(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(13022),o=n(90907),i=n(35463),a=n(29520),l=n(1456),c=n(10790);function u({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=r.useBlockProps.save();return(0,c.jsxs)("div",{...f,className:(0,s.A)(f.className,d),children:[" ",(0,c.jsx)(l.A,{align:u,columns:p,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,o.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})]})}},37336(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:{type:"string",default:"center"},className:{type:"string",default:"is-style-rectangular"},columns:{type:"number"},columnWidths:{type:"array",default:[]},ids:{type:"array",default:[]},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",type:"number",selector:"img",source:"attribute"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},customLink:{attribute:"data-custom-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}}},88139(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(97999),s=n(63162),o=n(13022),i=n(10790);function a(e){const{alt:t,imageFilter:n,height:a,id:l,link:c,linkTo:u,customLink:d,origUrl:p,url:h,width:m,"aria-label":g}=e;if((0,s.isBlobURL)(p))return null;let f;switch(u){case"media":f=p;break;case"attachment":f=c;break;case"custom":f=d||"";break;default:f=""}const b=(0,i.jsx)("img",{alt:t,"data-height":a,"data-id":l,"data-link":c,"data-url":p,"data-custom-link":d,"data-width":m,src:h,...!(0,r.isSimpleSite)()&&{"data-amp-layout":"responsive"},tabIndex:0,role:"button","aria-label":g});return(0,i.jsx)("figure",{className:(0,o.A)("tiled-gallery__item",{[`filter__${n}`]:!!n}),children:f?(0,i.jsx)("a",{href:f,children:b}):b})}},20837(e,t,n){"use strict";n.r(t),n.d(t,{attributes:()=>r.A,save:()=>o.A,supports:()=>s.A});var r=n(37336),s=n(69813),o=n(80720)},1456(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(86087),s=n(27723),o=n(13022),i=n(35463),a=n(31238),l=n(56366),c=n(90256),u=n(88139),d=n(10790);const __=s.__;class p extends r.Component{renderImage(e,t){const{columns:n,imageFilter:r,images:o,isSave:i,linkTo:a,layoutStyle:l,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("Open image %1$d of %2$d in full-screen","jetpack"),t+1,o.length),y=u.A,{src:k,srcSet:x}=(0,c.A)(e,{layoutStyle:l});return(0,d.jsx)(y,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:r,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,link:e.link,linkTo:a,customLink:e.customLink,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:o.length>1,srcSet:x,url:k,width:e.width},t)}render(){const{align:e,children:t,className:n,columns:r,images:s,layoutStyle:u,roundedCorners:p,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,c.s)(u)?l.A:a.A,v=this.props.images.map(this.renderImage,this),y=u!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{style:m,className:(0,o.A)(n,{[`has-rounded-corners-${y}`]:y>0}),children:[(0,d.jsx)(b,{align:e,columns:r,columnWidths:g?f:void 0,images:s,layoutStyle:u,renderedImages:v,onResize:g?void 0:h}),t]})}}},80720(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(13022),o=n(90907),i=n(35463),a=n(29520),l=n(1456),c=n(10790);function u({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=r.useBlockProps.save();return(0,c.jsxs)("div",{...f,className:(0,s.A)(f.className,d),children:[" ",(0,c.jsx)(l.A,{align:u,columns:p,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,o.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})]})}},69813(e,t,n){"use strict";n.d(t,{A:()=>r});const r={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},29520(e,t,n){"use strict";n.d(t,{Ay:()=>v,EB:()=>f});var r=n(85985),s=n(94715),o=n(56427),i=n(43656),a=n(86087),l=n(27723),c=n(66087),u=n(90907),d=n(76585),p=n(35463),h=n(77530),m=n(10309),g=n(10790);const __=l.__;function f(e){return e.images.length>0?Math.min(3,e.images.length):3}const b=e=>{const t=(0,c.pick)(e,[["alt"],["id"],["link"]]);return t.url=e?.sizes?.large?.url||e?.media_details?.sizes?.large?.source_url||e.url,t},v=(0,o.withNotices)(({attributes:e,isSelected:t,noticeOperations:n,noticeUI:l,setAttributes:c})=>{const{align:v,columns:y=f(e),imageFilter:k,images:x,linkTo:_,roundedCorners:w,columnWidths:j}=e,C=(0,u.D)(p.kc,e.className),A=(0,s.useBlockProps)(),[S,E]=(0,a.useState)(null),[T,N]=(0,a.useState)(void 0===j||0===j?.length),P=e=>{c({images:e,ids:e.map(({id:e})=>parseInt(e,10))})},B=e=>{(0,i.mediaUpload)({allowedTypes:p.eN,filesList:e,onFileChange:e=>P((x||[]).concat(e.map(b))),onError:n.createErrorNotice}),N(!0)},R=e=>()=>{const t=x.filter((t,n)=>e!==n);E(null),N(!0),P(t),c({columns:y?Math.min(t.length,y):y})},I=e=>()=>{S!==e&&E(e)},D=e=>{const t=e.map(e=>{const t=x.find(t=>parseInt(t.id,10)===parseInt(e.id,10));return t?.customLink?{...b(e),customLink:t.customLink}:b(e)});P(t),c({columns:y?Math.min(e.length,y):y}),N(!0)},L=(e,t)=>{const n=[...x];n.splice(t,1,x[e]),n.splice(e,1,x[t]),E(t),N(!0),P(n)},F=e=>()=>{e!==x.length-1&&L(e,e+1)},M=e=>()=>{0!==e&&L(e,e-1)},O=e=>{T&&c({columnWidths:e})},U=e=>B(e.target.files),z=e=>t=>{x[e]&&P([...x.slice(0,e),{...x[e],...t},...x.slice(e+1)])};let $;return(0,a.useEffect)(()=>{t||null===S||E(null)},[t,S,E]),$=0===x.length?(0,g.jsx)(s.MediaPlaceholder,{icon:(0,r.sh)(d),labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:D,accept:"image/*",allowedTypes:p.eN,multiple:!0,notices:l,onError:n.createErrorNotice}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h.M,{layoutStyle:C,images:x,columns:y,selectedImage:S,setImageAttributes:z,onColumnsChange:e=>c({columns:e}),roundedCorners:w,onRoundedCornersChange:e=>c({roundedCorners:e}),linkTo:_,onLinkToChange:e=>c({linkTo:e})}),l,(0,g.jsxs)(m.A,{className:"tiled-gallery__wrapper",align:v,columns:y,imageFilter:k,images:x,layoutStyle:C,linkTo:_,onMoveBackward:M,onMoveForward:F,onRemoveImage:R,onSelectImage:I,onResize:O,roundedCorners:w,selectedImage:t?S:null,setImageAttributes:z,children:[(0,g.jsx)(o.DropZone,{onFilesDrop:B}),t&&(0,g.jsx)("div",{className:"tiled-gallery__add-item",children:(0,g.jsx)(o.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:U,accept:"image/*",icon:"insert",__next40pxDefaultSize:!0,children:__("Upload an image","jetpack")})})]})]}),(0,g.jsxs)("div",{...A,children:[(0,g.jsx)(h.c,{images:x,onSelectImages:D,imageFilter:k,onFilterChange:e=>{c({imageFilter:e}),E(null)}}),$]})})},25589(e,t,n){"use strict";var r=n(74997),s=n(94375),o=n(76585),i=n(10602),a=n(29520),l=n(96589),c=n(32022),u=n(2369),d=n(24324),p=n(49263),h=n(76882),m=n(86781);n(80490);const g={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:c,width:160,height:95},{alt:"",link:"",url:u,width:160,height:107},{alt:"",link:"",url:d,width:304,height:203},{alt:"",link:"",url:p,width:312,height:207},{alt:"",link:"",url:h,width:152,height:101},{alt:"",link:"",url:m,width:152,height:105}],linkTo:"none"};function f(e=[]){return e.filter(({id:e,url:t})=>e&&t)}(0,s.M)(o,{edit:a.Ay,save:l.A,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>f(e).length>0,transform:e=>{const t=f(e);return(0,r.createBlock)(o.name,{images:t.map(({id:e,url:t,link:n,alt:r})=>({id:e,url:t,link:n,alt:r})),ids:t.map(({id:e})=>e)})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:({images:e=[]},t)=>{!e.length&&t?.length&&(e=t.filter(e=>"core/image"===e.name&&e.attributes?.url).map(({attributes:e})=>({id:e.id,url:e.url,link:e.href,alt:e.alt})));const n=f(e);return n.length>0?(0,r.createBlock)(o.name,{images:n.map(({id:e,url:t,link:n,alt:r})=>({id:e,url:t,link:n,alt:r})),ids:n.map(({id:e})=>e)}):(0,r.createBlock)(o.name)}}],to:[{type:"block",blocks:["core/gallery"],transform:({images:e,ids:t,columns:n,linkTo:s})=>(0,r.createBlock)("core/gallery",{images:e,ids:t,columns:n,imageCrop:!0,linkTo:s})},{type:"block",blocks:["core/image"],transform:({align:e,images:t})=>t.length>0?t.map(({id:t,url:n,alt:s})=>(0,r.createBlock)("core/image",{align:e,id:t,url:n,alt:s})):(0,r.createBlock)("core/image")}]},providesContext:{imageCrop:"imageCrop"},deprecated:i.A,example:{attributes:g}})},2164(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(56427),o=n(27723),i=n(10790);const __=o.__,_x=o._x,a=[{icon:(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(s.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})]}),title:_x("Original","image style","jetpack"),value:void 0},{icon:(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(s.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})]}),title:_x("Black and White","image style","jetpack"),value:"black-and-white"},{icon:(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(s.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})]}),title:_x("Sepia","image style","jetpack"),value:"sepia"},{icon:(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(s.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})]}),title:"1977",value:"1977"},{icon:(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(s.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})]}),title:_x("Clarendon","image style","jetpack"),value:"clarendon"},{icon:(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,i.jsx)(s.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})]}),title:_x("Gingham","image style","jetpack"),value:"gingham"}],l=__("Pick an image filter","jetpack"),c=(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(s.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"})]});function u({value:e,onChange:t}){return(0,i.jsx)(s.Dropdown,{placement:"bottom-start",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:({onToggle:e,isOpen:t})=>(0,i.jsx)(r.BlockControls,{children:(0,i.jsx)(s.Toolbar,{label:l,children:(0,i.jsx)(s.ToolbarButton,{onClick:e,"aria-expanded":t,"aria-haspopup":"true",label:l,showTooltip:!0,icon:c})})}),renderContent:({onClose:n})=>(0,i.jsx)(s.NavigableMenu,{className:"tiled-gallery__filter-picker-menu",children:a.map(({icon:r,title:o,value:a})=>{return(0,i.jsx)(s.MenuItem,{className:e===a?"is-active":void 0,icon:r,isSelected:e===a,onClick:(l=a,()=>{t(e===l?void 0:l),n()}),role:"menuitemcheckbox",children:o},a||"original");var l})})})}},26539(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(63162),s=n(56427),o=n(47143),i=n(86087),a=n(27723),l=n(48558),c=n(13022),u=n(18076),d=n(10790);const __=a.__;class p extends i.Component{img=(0,i.createRef)();state={isLoading:!1};onImageClick=()=>{this.props.isSelected||this.props.onSelect()};onImageKeyDown=e=>{const{isSelected:t,onRemove:n}=this.props;t&&[l.BACKSPACE,l.DELETE].includes(e.keyCode)&&(e.preventDefault(),n())};onImageLoadComplete=()=>{this.setState({isLoading:!1}),this.removeImageEventListeners()};addImageEventListeners=()=>{if(this.removeImageEventListeners(),this.img.current&&!(0,r.isBlobURL)(this.props.origUrl)){const e=this.img.current.complete;this.setState({isLoading:!e}),e||(this.img.current.addEventListener("load",this.onImageLoadComplete,{once:!0}),this.img.current.addEventListener("error",this.onImageLoadComplete,{once:!0}))}};removeImageEventListeners=()=>{this.img.current&&(this.img.current.removeEventListener("load",this.onImageLoadComplete),this.img.current.removeEventListener("error",this.onImageLoadComplete))};componentDidMount(){(0,r.isBlobURL)(this.props.origUrl)||this.img.current?.complete||(this.setState({isLoading:!0}),this.addImageEventListeners())}componentWillUnmount(){this.removeImageEventListeners()}componentDidUpdate(e){const{alt:t,height:n,image:s,link:o,url:i,width:a,origUrl:l}=this.props,c=(0,r.isBlobURL)(e.origUrl);if((0,r.isBlobURL)(l)||this.img.current?.complete||!c&&e.url===i||(this.setState({isLoading:!0}),this.addImageEventListeners()),s){const e={};!t&&s.alt_text&&(e.alt=s.alt_text),!n&&s.media_details&&s.media_details.height&&(e.height=+s.media_details.height),!o&&s.link&&(e.link=s.link),!i&&s.source_url&&(e.url=s.source_url),!a&&s.media_details&&s.media_details.width&&(e.width=+s.media_details.width),Object.keys(e).length&&this.props.setAttributes(e)}}render(){const{"aria-label":e,alt:t,columns:n,height:o,id:a,imageFilter:l,isFirstItem:p,isLastItem:h,isSelected:m,link:g,linkTo:f,customLink:b,onMoveBackward:v,onMoveForward:y,onRemove:k,origUrl:x,showMovers:_,srcSet:w,url:j,width:C}=this.props,{isLoading:A}=this.state;let S;switch(f){case"media":S=x;break;case"attachment":S=g;break;case"custom":S=b||"";break;default:S=""}const E=(0,r.isBlobURL)(x),T=(0,d.jsxs)(i.Fragment,{children:[(0,d.jsx)("img",{alt:t,"data-height":o,"data-id":a,"data-link":g,"data-url":x,"data-width":C,ref:this.img,src:E?void 0:j,srcSet:E?void 0:w,style:E?{backgroundImage:`url(${x})`}:void 0}),E&&(0,d.jsx)(s.Spinner,{})]});return(0,d.jsxs)("div",{className:(0,c.A)("tiled-gallery__item",{"is-selected":m,"is-transient":E,"is-loading":!E&&A,[`filter__${l}`]:!!l}),tabIndex:"0",role:"button",onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,"aria-label":e,children:[_&&(0,d.jsxs)("div",{className:"tiled-gallery__item__move-menu",children:[(0,d.jsx)(s.Button,{icon:1===n?u.Lo:u.Nd,onClick:p?void 0:v,className:"tiled-gallery__item__move-backward",label:__("Move image backward","jetpack"),"aria-disabled":p,disabled:!m}),(0,d.jsx)(s.Button,{icon:1===n?u.W4:u.Gy,onClick:h?void 0:y,className:"tiled-gallery__item__move-forward",label:__("Move image forward","jetpack"),"aria-disabled":h,disabled:!m})]}),(0,d.jsx)("div",{className:"tiled-gallery__item__inline-menu",children:(0,d.jsx)(s.Button,{icon:u.VN,onClick:k,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!m})}),S?(0,d.jsx)("a",{"aria-hidden":"true",children:T}):T]})}}const h=(0,o.withSelect)((e,t)=>{const{getEntityRecord:n}=e("core"),{id:r}=t;return{image:r?n("postType","attachment",r):null}})(p)},60918(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(97999),s=n(63162),o=n(13022),i=n(10790);function a(e){const{alt:t,imageFilter:n,height:a,id:l,link:c,linkTo:u,customLink:d,origUrl:p,url:h,width:m}=e;if((0,s.isBlobURL)(p))return null;let g;switch(u){case"media":g=p;break;case"attachment":g=c;break;case"custom":g=d||"";break;default:g=""}const f=(0,r.isSimpleSite)()?{}:{"data-amp-layout":"responsive"},b=(0,i.jsx)("img",{alt:t,"data-height":a,"data-id":l,"data-link":c,"data-url":p,"data-width":m,src:h,...f});return(0,i.jsx)("figure",{className:(0,o.A)("tiled-gallery__item",{[`filter__${n}`]:!!n}),children:g?(0,i.jsx)("a",{href:g,children:b}):b})}},18076(e,t,n){"use strict";n.d(t,{Gy:()=>i,Lo:()=>l,Nd:()=>o,VN:()=>c,W4:()=>a});var r=n(56427),s=n(10790);const o=(0,s.jsx)(r.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})}),i=(0,s.jsx)(r.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})}),a=(0,s.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})}),l=(0,s.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})}),c=(0,s.jsx)(r.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"})})},98627(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,width:t}){const n=t?{flexBasis:`${t}%`}:void 0;return(0,r.jsx)("div",{className:"tiled-gallery__col",style:n,children:e})}},54359(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(10790);function s({children:e,galleryRef:t}){return(0,r.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},10309(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(86087),s=n(27723),o=n(13022),i=n(35463),a=n(26539),l=n(60918),c=n(90256),u=n(31238),d=n(56366),p=n(10790);const __=s.__;class h extends r.Component{renderImage(e,t){const{columns:n,imageFilter:r,images:o,isSave:i,linkTo:u,layoutStyle:d,onMoveBackward:h,onMoveForward:m,onRemoveImage:g,onSelectImage:f,selectedImage:b,setImageAttributes:v}=this.props,y=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),k=i?l.A:a.A,{src:x,srcSet:_}=(0,c.A)(e,{layoutStyle:d});return(0,p.jsx)(k,{alt:e.alt,"aria-label":y,columns:n,height:e.height,id:e.id,imageFilter:r,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:b===t,link:e.link,linkTo:u,customLink:e.customLink,onMoveBackward:i?void 0:h(t),onMoveForward:i?void 0:m(t),onRemove:i?void 0:g(t),onSelect:i?void 0:f(t),origUrl:e.url,setAttributes:i?void 0:v(t),showMovers:o.length>1,srcSet:_,url:x,width:e.width},t)}render(){const{align:e,children:t,className:n,columns:r,images:s,layoutStyle:a,roundedCorners:l,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,c.s)(a)?d.A:u.A,v=this.props.images.map(this.renderImage,this),y=a!==i.aQ?Math.min(l,i.WN):0;return(0,p.jsxs)("div",{style:m,className:(0,o.A)(n,{[`has-rounded-corners-${y}`]:y>0}),children:[(0,p.jsx)(b,{align:e,columns:r,columnWidths:g?f:void 0,images:s,layoutStyle:a,renderedImages:v,onResize:g?void 0:h}),t]})}}},31238(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),s=n(94107),o=n(98627),i=n(54359),a=n(43645),l=n(74176),c=n(18980),u=n(10790);class d extends r.Component{gallery=(0,r.createRef)();pendingRaf=null;lastWidth=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}getFlexContainer(){const e=this.gallery.current;if(!e)return null;const t=e.ownerDocument?.defaultView||window;let n=e.parentElement;for(;n&&n.parentElement;){const e=n.parentElement,r=t.getComputedStyle(e).display;if("flex"===r||"inline-flex"===r)return e;n=e}return null}getLayoutWidth(){const e=this.getFlexContainer();if(!e)return this.gallery.current?this.gallery.current.clientWidth:0;const t=e.children.length;if(t<=1)return e.clientWidth;const n=e.ownerDocument?.defaultView||window,r=parseFloat(n.getComputedStyle(e).columnGap)||0;return(e.clientWidth-r*(t-1))/t}handleGalleryResize=()=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame(()=>{const e=this.gallery.current;if(!e)return;const t=this.getLayoutWidth();if(null!==this.lastWidth&&Math.abs(t-this.lastWidth)<1)return;this.lastWidth=t;const n=[];(0,c.S)(e).forEach(e=>{n.push((0,c.r)(e,t))}),void 0!==this.props.onResize&&this.props.onResize(n)})};triggerResize(){this.gallery.current&&(this.lastWidth=null,this.handleGalleryResize())}observeResize(){if(this.triggerResize(),this.ro=new s.A(this.handleGalleryResize),this.gallery.current){this.ro.observe(this.gallery.current);const e=this.getFlexContainer();e&&this.ro.observe(e)}}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map(e=>e.map(e=>{const n=t.slice(r,r+e);return r+=e,n})).map(e=>(0,c.r)(e,n))}render(){const{align:e,columns:t,images:n,layoutStyle:s,renderedImages:c}=this.props,d=(0,l.mJ)(n),p="columns"===s?(0,l.FL)(d,t):(0,l.VU)(d,{isWide:["full","wide"].includes(e)}),h=r.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,c,1e3)})();let m=0;return(0,u.jsx)(i.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,u.jsx)(a.A,{children:e.map((e,n)=>{const r=c.slice(m,m+e);return m+=e,(0,u.jsx)(o.A,{width:h?.[t]?.[n],children:r},n)})},t))})}}},74176(e,t,n){"use strict";n.d(t,{FL:()=>i,VU:()=>C,mJ:()=>s});var r=n(66087);function s(e){return e.map(o)}function o({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,s=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,t=>{const r=i<=(e+1)*n;return r&&(i+=t),r}).length;s.push(t),o=o.slice(t)}return s.push(o.length),[s]}const a=A([2,1,2],5),l=S([E,E,T,E,E]),c=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),x=A([1,1,1],3),_=S([(0,r.overEvery)(N(.9),P(2)),(0,r.overEvery)(N(.9),P(2)),P(1.6)]),w=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const n=(e,s)=>{if(!s.length)return e;let o;o=s.length>15&&l(s)&&a(e)?[2,1,2]:s.length>15&&c(s)&&u(e)?[3,1,3]:5!==s.length&&d(s)&&p(e)?[1,2,1]:h(s)&&m(e)?[1,3]:g(s)&&f(e)?[3,1]:b(s)&&v(e)?[1,2]:t&&(5===s.length||10!==s.length&&s.length>6)&&y(e)&&(0,r.sum)(s.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)(t.slice(0,4));return k(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,s)?[1,1,1,1]:function(e,t,n){const s=(0,r.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&x(e)&&(s<2.5||s<5&&t.length>=3&&t[0]===t[2]||n)}(e,s,t)?[1,1,1]:_(s)&&w(e)?[2,1]:j(s)?[1]:s.length>3?[1,1]:Array(s.length).fill(1);const i=e.concat([o]),C=(0,r.sum)(o),A=s.slice(C);return n(i,A)};return n([],e)}function A(e,t){return n=>!n.slice(-t).some(t=>(0,r.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,r.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},18980(e,t,n){"use strict";n.d(t,{S:()=>i,r:()=>o});var r=n(35463);function s(e,t){const n=(t-e.reduce((e,t)=>e+t,0))/e.length;return e.map(e=>e+n)}function o(e,t){return function(e,[t,n],o){const i=r.hE*(e.childElementCount-1),d=o-i;return function(e,{rawHeight:t,rowWidth:n}){const o=a(e),i=o.map(e=>(t-r.hE*(e.childElementCount-1))*c(e)[0]),d=s(i,n);o.forEach((e,n)=>{const o=i[n],a=d[n];!function(e,{colHeight:t,width:n,rawWidth:r}){const o=l(e).map(e=>r/u(e)),i=s(o,t);Array.from(e.children).forEach((e,t)=>{const r=i[t];e.setAttribute("style",`height:${r}px;width:${n}px;`)})}(e,{colHeight:t-r.hE*(e.childElementCount-1),width:a,rawWidth:o})});return d.map(e=>parseFloat(e/n*100).toFixed(5))}(e,{rawHeight:1/t*(d-n),rowWidth:d})}(e,function(e){const t=a(e).map(c).reduce(([e,t],[n,r])=>[e+n,t+r],[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function a(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce((e,t)=>e+1/t,0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},43645(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(13022),s=n(10790);function o({children:e,className:t}){return(0,s.jsx)("div",{className:(0,r.A)("tiled-gallery__row",t),children:e})}},56366(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(66087),s=n(35463),o=n(98627),i=n(54359),a=n(43645),l=n(10790);function c({columns:e,renderedImages:t}){const n=Math.min(s.ZS,e),c=t.length%n;return(0,l.jsx)(i.A,{children:[...c?[t.slice(0,c)]:[],...(0,r.chunk)(t.slice(c),n)].map((e,t)=>(0,l.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,l.jsx)(o.A,{children:e},t))},t))})}},9888(e,t,n){"use strict";function r(e){return["columns","circle","square"].includes(e)}n.d(t,{o:()=>r})},96589(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(94715),s=n(13022),o=n(90907),i=n(35463),a=n(29520),l=n(10309),c=n(10790);function u({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=r.useBlockProps.save();return(0,c.jsx)("div",{...f,className:(0,s.A)(f.className,d),children:(0,c.jsx)(l.A,{align:u,columns:p,imageFilter:t,images:n,isSave:!0,layoutStyle:(0,o.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})})}},90256(e,t,n){"use strict";n.d(t,{A:()=>p,s:()=>d});var r=n(97999),s=n(85985),o=n(63162),i=n(47143),a=n(14936),l=n(13087),c=n(35463);let u;function d(e){return["circle","square"].includes(e)}function p(e,t={}){if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,l.A)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,r.isWoASite)()&&(0,s.pP)())return{src:e.url};const n=e.url.split("?",1)[0],{height:i,width:p}=e,{layoutStyle:m}=t,g=!0===function(){let e;void 0!==u?e=u:"undefined"!=typeof jetpack_plan&&(e=jetpack_plan);return e&&"vip"===e?.data}()||(0,r.isSimpleSite)()?h:a.A;let f;if(d(m)&&p&&i){const e=Math.min(c.rK,p,i);f=g(n,{resize:`${e},${e}`})}else f=g(n);let b=[];if(d(m)){const e=Math.min(600,p,i),t=Math.min(c.rK,p,i);for(let r=e;r<t;r+=300){const e=g(n,{resize:`${r},${r}`,strip:"info"});e&&b.push(`${e} ${r}w`)}}else{const e=Math.min(600,p),t=Math.min(c.rK,p);for(let r=e;r<t;r+=300){const e=g(n,{strip:"info",width:r});e&&b.push(`${e} ${r}w`)}}return b=b.join(","),Object.assign({src:f},b&&{srcSet:b})}function h(e,t={}){const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,s]of Object.entries(t))r.searchParams.set(Object.hasOwn(n,e)?n[e]:e,s);return r.toString()}window.addEventListener("load",function(){(0,i.select)("core/block-editor").getBlocks().some(e=>"jetpack/image-compare"===e.name)&&!u&&(u=window?.Jetpack_Editor_Initial_State?.jetpack?.jetpack_plan)})},40118(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(375),l=n(48558),c=(n(20744),n(10790));const __=i.__,u=({tockUrl:e,setEditedUrl:t,setUrl:n,cancel:r})=>{const i=(0,o.useRef)(!0),u=(0,o.useRef)(!1),d=e=>{n(),u.current=!0,e()};return(0,c.jsx)(s.ToolbarGroup,{children:(0,c.jsx)(s.Dropdown,{popoverProps:{variant:"toolbar"},onClose:()=>u.current?u.current=!1:r(),placement:"bottom-start",renderToggle:({isOpen:t,onToggle:n})=>(!i.current||t||e||(i.current=!1,n()),(0,c.jsx)(s.ToolbarButton,{className:"components-toolbar__control",label:__("Edit Tock business name","jetpack"),onClick:()=>{n(),t&&r()},children:__("Edit","jetpack")})),renderContent:({onClose:n})=>(0,c.jsx)(s.BaseControl,{className:"jetpack-tock-url-settings",help:(0,o.createInterpolateElement)(__("The Tock business can be found in the URL of your public Tock page. For example: www.exploretock.com/<b>myname</b>","jetpack"),{b:(0,c.jsx)("strong",{})}),__nextHasNoMarginBottom:!0,children:(0,c.jsxs)("div",{className:"jetpack-tock-url-input-wrapper",children:[(0,c.jsx)(s.TextControl,{placeholder:__("Add Tock business name","jetpack"),onChange:t,value:e,onKeyDownCapture:t=>((t,n)=>{const{keyCode:s}=t;s===l.ENTER&&""!==e&&(t.preventDefault(),d(n)),s===l.ESCAPE&&(t.preventDefault(),r(),n())})(t,n),className:"jetpack-tock-url-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,c.jsx)("div",{className:"jetpack-tock-url-input-action",children:(0,c.jsx)(s.Button,{type:"submit",label:__("Submit","jetpack"),icon:a.A,className:"jetpack-tock-url-input-submit",onClick:()=>d(n)})})]})})})})},d=({url:e,popoverAnchor:t})=>{const n=`\n\t\t<div id="Tock_widget_container" data-tock-display-mode="Button" data-tock-color-mode="Blue" data-tock-locale="en-us" data-tock-timezone="America/New_York" style="display:inline-block;"></div>\n\t\t<script src="https://www.exploretock.com/tock.js" async><\/script>\n\t\t<script>\n\t\t\t!function(t,o){if(!t.tock){var e=t.tock=function(){e.callMethod?\n\t\t\t e.callMethod.apply(e,arguments):e.queue.push(arguments)};t._tock||(t._tock=e),\n\t\t\t e.push=e,e.loaded=!0,e.version='1.0',e.queue=[];}}(window,document);\n\t\t\ttock('init', '${e}');\n\t\t<\/script>\n\t`;return(0,c.jsxs)("div",{ref:t,children:[(0,c.jsx)(s.SandBox,{html:n},`tock-${e}`),(0,c.jsx)("div",{className:"block-library-embed__interactive-overlay"})]})};function p({attributes:e,setAttributes:t,isSelected:n}){const s=e.url??"",[i,a]=(0,o.useState)(s),l=(0,o.useCallback)(()=>{a(s)},[s]);return(0,o.useEffect)(()=>{n||l()},[n,l]),(0,c.jsxs)("div",{...(0,r.useBlockProps)(),children:[(0,c.jsx)(r.BlockControls,{children:(0,c.jsx)(u,{tockUrl:i,setEditedUrl:a,setUrl:()=>{const e=i.replace(/.*exploretock.com\//,"");a(e),t({url:e})},cancel:l})}),(0,c.jsx)(d,{url:s})]})}},4595(e,t,n){"use strict";var r=n(94375),s=n(86525),o=n(40118),i=n(10790);(0,r.M)(s,{edit:o.A,save:()=>(0,i.jsx)("div",{id:"Tock_widget_container","data-tock-display-mode":"Button","data-tock-color-mode":"Blue","data-tock-locale":"en-us","data-tock-timezone":"America/New_York"})})},81837(e,t,n){"use strict";n.d(t,{Z:()=>o,f:()=>i});var r=n(86087),s=n(10790);const o=(0,r.createContext)(),i=({onFilesSelected:e,onMediaItemSelected:t,onUploadFinished:n,children:r})=>(0,s.jsx)(o.Provider,{value:{onFilesSelected:e,onMediaItemSelected:t,onUploadFinished:n},children:r})},74628(e,t,n){"use strict";n.d(t,{C1:()=>r,NF:()=>s});const r=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],s={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},59257(e,t,n){"use strict";n.d(t,{A:()=>r});const r={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"}},support:{reusable:!1},save:n(12804).A,isDeprecation:!0}},12804(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(10790);function o({attributes:e}){const{caption:t,guid:n}=e;if(!n)return null;const o=`https://videopress.com/v/${n}`;return(0,s.jsxs)("figure",{className:"wp-block-embed is-type-video is-provider-videopress",children:[(0,s.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${o}\n`}),!r.RichText.isEmpty(t)&&(0,s.jsx)(r.RichText.Content,{tagName:"figcaption",value:t})]})}},21440(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(69479),s=n(31481);const o={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:({videoPressClassNames:e,guid:t})=>t&&void 0===e,migrate:e=>{const{className:t,videoPressClassNames:n}=e;return{...e,...(0,s.j)(t,n)}},save:r.A,isDeprecation:!0}},69479(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(77473),o=n(10790);function i(e){const{attributes:{autoplay:t,caption:n,controls:i,guid:a,loop:l,muted:c,poster:u,preload:d,videoPressClassNames:p}={}}=e;if(!a)return null;const h=(0,s.e)(a,{autoplay:t,controls:i,loop:l,muted:c,poster:u,preload:d});return(0,o.jsxs)("figure",{className:p,children:[(0,o.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${h}\n`}),!r.RichText.isEmpty(n)&&(0,o.jsx)(r.RichText.Content,{tagName:"figcaption",value:n})]})}},77473(e,t,n){"use strict";n.d(t,{e:()=>s});var r=n(93832);const s=(e,{autoplay:t,controls:n,loop:s,muted:o,poster:i,preload:a})=>{if(!e)return null;const l={...t&&{autoPlay:!0},...!n&&{controls:!1},...s&&{loop:!0},...o&&{muted:!0,persistVolume:!1},...i&&{posterUrl:i},..."none"!==a&&{preloadContent:a}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,l)}},31481(e,t,n){"use strict";n.d(t,{j:()=>i});var r=n(36536),s=n.n(r);const o=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],i=(e,t)=>{const n=o.map(e=>e.className),r=new(s())(e);r.remove(...n,"wp-block-embed","is-type-video","is-provider-videopress");const i=new(s())(e);return i.add(t),i.remove(...r),{className:r.value,videoPressClassNames:i.value}}},54727(e,t,n){"use strict";n.d(t,{A:()=>r});const r={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,save:n(31618).A,isDeprecation:!0}},31618(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(13022),o=n(70222),i=n(10790);function a(e){const{attributes:{autoplay:t,caption:n,controls:a,guid:l,loop:c,muted:u,playsinline:d,poster:p,preload:h,videoPressClassNames:m,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y}={}}=e,k=r.useBlockProps.save({className:(0,s.A)("wp-block-video",g,m,{[`align${f}`]:f})}),x=(0,o.e)(l,{autoplay:t,controls:a,loop:c,muted:u,playsinline:d,poster:p,preload:h,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y});return(0,i.jsxs)("figure",{...k,children:[(0,i.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${x}\n`}),!r.RichText.isEmpty(n)&&(0,i.jsx)(r.RichText.Content,{tagName:"figcaption",value:n})]})}},70222(e,t,n){"use strict";n.d(t,{e:()=>s});var r=n(93832);const s=(e,{autoplay:t,controls:n,loop:s,muted:o,playsinline:i,poster:a,preload:l,seekbarColor:c,seekbarPlayedColor:u,seekbarLoadingColor:d})=>{if(!e)return null;const p={resizeToParent:!0,...t&&{autoPlay:!0},...!n&&{controls:!1},...s&&{loop:!0},...o&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...a&&{posterUrl:a},..."none"!==l&&{preloadContent:l},...""!==c&&{sbc:c},...""!==u&&{sbpc:u},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,p)}},65390(e,t,n){"use strict";n.d(t,{A:()=>r});const r={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,migrate:e=>({...e,useAverageColor:!1}),save:n(84229).A,isDeprecation:!0}},84229(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(94715),s=n(13022),o=n(9847),i=n(10790);function a(e){const{attributes:{autoplay:t,caption:n,controls:a,guid:l,loop:c,muted:u,playsinline:d,poster:p,preload:h,videoPressClassNames:m,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y,maxWidth:k}={}}=e,x=r.useBlockProps.save({className:(0,s.A)("wp-block-video",g,m,{[`align${f}`]:f})}),_=(0,o.e)(l,{autoplay:t,controls:a,loop:c,muted:u,playsinline:d,poster:p,preload:h,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y});let w={};return k&&k.length>0&&"100%"!==k&&(w={maxWidth:k,margin:"auto"}),(0,i.jsxs)("figure",{...x,children:[(0,i.jsx)("div",{className:"wp-block-embed__wrapper",style:w,children:`\n${_}\n`}),!r.RichText.isEmpty(n)&&(0,i.jsx)(r.RichText.Content,{tagName:"figcaption",value:n})]})}},9847(e,t,n){"use strict";n.d(t,{e:()=>s});var r=n(93832);const s=(e,{autoplay:t,controls:n,loop:s,muted:o,playsinline:i,poster:a,preload:l,seekbarColor:c,seekbarPlayedColor:u,seekbarLoadingColor:d})=>{if(!e)return null;const p={resizeToParent:!0,cover:!0,...t&&{autoPlay:!0},...!n&&{controls:!1},...s&&{loop:!0},...o&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...a&&{posterUrl:a},..."none"!==l&&{preloadContent:l},...""!==c&&{sbc:c},...""!==u&&{sbpc:u},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,p)}},77189(e,t,n){"use strict";n.d(t,{A:()=>N});var r=n(62410),s=n(1455),o=n.n(s),i=n(63162),a=n(94715),l=n(56427),c=n(29491),u=n(47143),d=n(86087),p=n(89877),h=n(27723),m=n(13109),g=n(79654),f=n(13022),b=n(81837),v=n(74628),y=n(90781),k=n(76212),x=n(57954),_=n(96247),w=n(22857),j=n(17900),C=n(47960),A=n(10790);const __=h.__,_x=h._x,S=["image"],E=e=>{const t=(0,a.useBlockProps)({className:"resumable-upload"}),{onChangeTitle:n,title:s,filename:o,onSelectPoster:i,onRemovePoster:p,videoPosterImageData:h,fileForUpload:g,isUploadComplete:f,onDismissEditor:v,onSave:y,onVideoFrameSelected:x}=e,_=(0,u.useSelect)(e=>e("core/editor").isSavingPost(),[]),j=(0,c.usePrevious)(_);return(0,d.useEffect)(()=>{_&&!j&&y()},[_,j,y]),(0,A.jsx)(b.f,{onUploadFinished:e.uploadFinished,children:(0,A.jsxs)(d.Fragment,{children:[e.blockSettings,(0,A.jsxs)("div",{...t,children:[(0,A.jsxs)("div",{className:"uploader-block__logo",children:[(0,A.jsx)(m.A,{icon:r.KZ}),(0,A.jsx)("div",{className:"uploader-block__logo-text",children:__("VideoPress","jetpack")})]}),(0,A.jsx)(w.d,{file:g,filename:o,title:s,onChangeTitle:n,onSelectPoster:i,onRemovePoster:p,videoPosterImageData:h,onVideoFrameSelected:x}),!f&&(0,A.jsx)(k.A,{file:g}),f&&(0,A.jsxs)("div",{className:"uploader-block__upload-complete",children:[(0,A.jsxs)("span",{children:[__("Upload Complete!","jetpack")," 🎉"]}),(0,A.jsx)(l.Button,{variant:"primary",onClick:v,children:__("Done","jetpack")})]})]})]})})},T=e=>{const{scripts:t}=e,{html:n,interactive:r,caption:s,isSelected:o,hideOverlay:i,attributes:c,setAttributes:u,shouldRenderLoadingBlock:p}=e,{align:h,className:m,videoPressClassNames:g,maxWidth:b}=c,v=(0,a.useBlockProps)({className:(0,f.A)("wp-block-video",m,g,{[`align${h}`]:h})}),k=(0,d.useCallback)(()=>{const e=Array.isArray(t)?t:[];if(window.videopressAjax){const t=new Blob([`var videopressAjax = ${JSON.stringify(window.videopressAjax)};`],{type:"text/javascript"});return[...e,URL.createObjectURL(t),window.videopressAjax.bridgeUrl]}return e},[t]);if(p)return(0,A.jsx)("figure",{...v,children:(0,A.jsx)(y.A,{text:__("Generating preview…","jetpack")})});return(0,A.jsxs)("figure",{...v,children:[(0,A.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,A.jsx)(l.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:b},style:{margin:"auto"},onResizeStop:(e,t,n)=>{let r=getComputedStyle(n).width;if(null!==n.parentElement){r===getComputedStyle(n.parentElement).width&&(r="100%")}u({maxWidth:r})},children:(0,A.jsx)(l.SandBox,{html:n,scripts:k(),type:g})})}),!r&&(0,A.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:i}),(!a.RichText.isEmpty(s)||o)&&(0,A.jsx)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:s,onChange:e=>u({caption:e}),inlineToolbar:!0})]})},N=(0,c.createHigherOrderComponent)((0,c.compose)([(0,u.withSelect)((e,t)=>{const{autoplay:n,controls:r,fileForImmediateUpload:s,guid:o,loop:a,muted:l,playsinline:c,poster:u,preload:d,seekbarColor:p,seekbarLoadingColor:h,seekbarPlayedColor:m,src:g,useAverageColor:f}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),y=(0,j.e)(o,{autoplay:n,controls:r,loop:a,muted:l,playsinline:c,poster:u,preload:d,seekbarColor:p,seekbarLoadingColor:h,seekbarPlayedColor:m,useAverageColor:f}),k=!!y&&b(y),x=!!y&&v(y),_=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:s,isFetchingPreview:x,isUploading:!_&&(0,i.isBlobURL)(g),preview:k,resumableUploadEnabled:_,url:y}}),(0,u.withDispatch)(e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}})),c.withInstanceId,e=>class extends d.Component{constructor(e){super(...arguments),this.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1,allowDownload:null,privacySetting:v.NF.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1,isEditingWhileUploading:!1,isUploadComplete:!1,lastPosterValueSource:"",pendingVideoAttributes:null},this.posterImageButton=(0,d.createRef)(),this.previewCacheReloadTimer=null,this.previewFailuresCount=0}static getDerivedStateFromProps(e,t){const n={};if(!e.isSelected&&t.interactive&&(n.interactive=!1),t.fileForUpload&&!t.isEditingWhileUploading){null!==t.fileForUpload&&t.fileForUpload instanceof File&&(n.isEditingWhileUploading=!0)}else t.pendingVideoAttributes&&(n.isEditingWhileUploading=!0);return Object.keys(n).length?n:null}hideOverlay=()=>{this.setState({interactive:!0})};async componentDidMount(){const{guid:e}=this.props.attributes;e?this.setTracks(e):await this.setGuid(),this.setRatingAndAllowDownload()}setRatingAndAllowDownload=async()=>{const e=this.props?.attributes?.id,t=await this.requestMedia(e);let n=t?.jetpack_videopress?.rating;const r=t?.jetpack_videopress?.allow_download,s=t?.jetpack_videopress?.privacy_setting??v.NF.SITE_DEFAULT;n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==s&&this.setState({privacySetting:s})};async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:n,preview:r,setAttributes:s,url:o,isFetchingPreview:i}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let a=!1;if(o&&o!==e.url&&(n(o),a=!0),r){const e=(0,C.Zz)(r.html,(0,f.A)("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,s({videoPressClassNames:e})}else i||a||!this.props.attributes.guid||this.schedulePreviewCacheReload()}schedulePreviewCacheReload=()=>{const{invalidateCachedEmbedPreview:e,url:t}=this.props;null===this.previewCacheReloadTimer&&this.previewFailuresCount<5&&(this.previewFailuresCount++,this.previewCacheReloadTimer=setTimeout(()=>{e(t),this.previewCacheReloadTimer=null},2e3*this.previewFailuresCount))};fallbackToCore=()=>{this.props.setAttributes({guid:void 0}),this.setState({fallback:!0})};setGuid=async()=>{const{attributes:e,setAttributes:t}=this.props,{id:n}=e;if(n)try{const e=await this.requestMedia(n);if(null===e)return;const r=e?.jetpack_videopress?.guid;r?(t({guid:r}),this.setTracks(r)):this.fallbackToCore()}catch{this.setState({isFetchingMedia:!1}),this.fallbackToCore()}else t({guid:void 0})};requestMedia=async e=>{if(!e)return null;if(null!==this.state.media&&this.state.lastRequestedMediaId===e)return this.state.media;this.setState({isFetchingMedia:!0});const t=await o()({path:`/wp/v2/media/${e}`}).catch(()=>(this.setState({fallback:!0}),null)).finally(()=>{this.setState({isFetchingMedia:!1})}),{id:n}=this.props.attributes;return e!==n?null:(this.setState({media:t,lastRequestedMediaId:e}),t)};setTracks=e=>{const{setAttributes:t}=this.props;e&&o()({url:`https://public-api.wordpress.com/rest/v1.1/videos/${e}`,credentials:"omit",global:!0}).then(e=>{const n=[];Object.keys(e.tracks).forEach(t=>{for(const r in e.tracks[t]){const s=e.tracks[t][r];n.push({src:s.src,kind:t,srcLang:r,label:s.label})}}),t({videoPressTracks:n})})};switchToEditing=()=>{this.props.setAttributes({id:void 0,guid:void 0,src:void 0})};onSelectPoster=e=>{const{setAttributes:t}=this.props;t({poster:e.url}),this.setState({videoPosterImageData:e})};onRemovePoster=()=>{const{setAttributes:e}=this.props;e({poster:""}),this.setState({videoPosterImageData:null}),this.posterImageButton.current.focus()};toggleAttribute=e=>t=>{this.props.setAttributes({[e]:t})};getAutoplayHelp=e=>e?__("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null;getPreloadHelp(){const{attributes:e}=this.props;return"auto"===e.preload?__("Note: Automatically downloading videos may cause issues if there are many videos displayed on the same page.","jetpack"):null}getPrivacySettingHelp=e=>{const t=parseInt(e,10);return v.NF.PRIVATE===t?__("Restrict views to members of this site","jetpack"):v.NF.PUBLIC===t?__("Video can be viewed by anyone","jetpack"):__("Follow the site privacy setting","jetpack")};renderControlLabelWithTooltip(e,t){return(0,A.jsx)(l.Tooltip,{text:t,position:"top",children:(0,A.jsx)("span",{children:e})})}onChangeRating=e=>{const t=this.state.rating;"X-18"===e&&(e="R-17"),-1!==["G","PG-13","R-17"].indexOf(e)&&this.updateMetaApiCall({rating:e},()=>this.setState({isUpdatingRating:!0,rating:e}),()=>this.setState({rating:t}),()=>this.setState({isUpdatingRating:!1}))};onChangeAllowDownload=e=>{const t=this.state.allowDownload;this.updateMetaApiCall({allow_download:e?1:0},()=>this.setState({isUpdatingAllowDownload:!0,allowDownload:e}),()=>this.setState({allowDownload:t}),()=>this.setState({isUpdatingAllowDownload:!1}))};onChangePrivacySetting=e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e}),()=>this.setState({privacySetting:t}),()=>this.setState({isUpdatingPrivacySetting:!1}))};updateMetaApiCall=(e,t,n,r)=>{const{invalidateCachedEmbedPreview:s,url:i}=this.props,{id:a}=this.props.attributes;if(!a)return;t();const l={id:a};Object.assign(l,e),o()({path:"/wpcom/v2/videopress/meta",method:"POST",data:l}).then(e=>{status in e&&200!==e.status&&n()}).catch(()=>n()).finally(()=>{r(),s(i)})};render(){const{attributes:t,instanceId:n,isFetchingPreview:r,isUploading:s,preview:i,resumableUploadEnabled:c,setAttributes:u}=this.props,{fallback:m,fileForUpload:f,isFetchingMedia:k,isUpdatingRating:w,interactive:j,rating:N,allowDownload:P,privacySetting:B,isUpdatingAllowDownload:R,isUpdatingPrivacySetting:I,videoPosterImageData:D}=this.state,{autoplay:L,caption:F,controls:M,guid:O,loop:U,muted:z,playsinline:$,poster:q,preload:H,useAverageColor:V,videoPressTracks:G,isVideoPressExample:W,src:Z}=t;if(W&&Z)return(0,A.jsx)("img",{src:Z,alt:F});const J=`video-block__poster-image-description-${n}`,K=!(!q&&!D),Y=(0,A.jsxs)(d.Fragment,{children:[(0,A.jsx)(a.BlockControls,{group:"block",children:(0,A.jsx)(_.A,{tracks:G,onChange:e=>{u({videoPressTracks:e})},guid:O})}),(0,A.jsx)(a.BlockControls,{children:(0,A.jsx)(l.ToolbarGroup,{children:(0,A.jsx)(l.ToolbarButton,{className:"components-icon-button components-toolbar__control",text:__("Replace","jetpack"),onClick:this.switchToEditing})})}),(0,A.jsxs)(a.InspectorControls,{children:[(0,A.jsxs)(l.PanelBody,{title:__("Video Settings","jetpack"),children:[(0,A.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Autoplay","jetpack"),/* translators: Tooltip describing the "autoplay" option for the VideoPress player */
__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:L,help:this.getAutoplayHelp,__nextHasNoMarginBottom:!0}),(0,A.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),/* translators: Tooltip describing the "loop" option for the VideoPress player */
__("Restarts the video when it reaches the end","jetpack")),onChange:this.toggleAttribute("loop"),checked:U,__nextHasNoMarginBottom:!0}),(0,A.jsx)(l.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:z,__nextHasNoMarginBottom:!0}),(0,A.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Playback Controls","jetpack"),/* translators: Tooltip describing the "controls" option for the VideoPress player */
__("Display the video playback controls","jetpack")),onChange:this.toggleAttribute("controls"),checked:M,__nextHasNoMarginBottom:!0}),(0,A.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Play Inline","jetpack"),/* translators: Tooltip describing the "playsinline" option for the VideoPress player */
__("Play the video inline instead of full-screen on mobile devices","jetpack")),onChange:this.toggleAttribute("playsinline"),checked:$,__nextHasNoMarginBottom:!0}),(0,A.jsx)(l.SelectControl,{label:this.renderControlLabelWithTooltip(__("Preload","jetpack"),/* translators: Tooltip describing the "preload" option for the VideoPress player */
__("Content to dowload before the video is played","jetpack")),value:H??"",onChange:e=>u({preload:e}),options:[{value:"auto",label:_x("Auto","VideoPress preload setting","jetpack")},{value:"metadata",label:_x("Metadata","VideoPress preload setting","jetpack")},{value:"none",label:_x("None","VideoPress preload setting","jetpack")}],help:this.getPreloadHelp(),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,A.jsx)(a.MediaUploadCheck,{children:(0,A.jsxs)(l.BaseControl,{className:"editor-video-poster-control",children:[(0,A.jsx)(l.BaseControl.VisualLabel,{children:__("Poster Image","jetpack")}),(0,A.jsx)(a.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:S,render:({open:e})=>(0,A.jsx)(l.Button,{variant:"secondary",onClick:e,ref:this.posterImageButton,"aria-describedby":J,children:K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack")})}),(0,A.jsx)("p",{id:J,hidden:!0,children:K?(0,h.sprintf)(/* translators: %s: an image URL. */
__("The current poster image url is %s","jetpack"),q??D):__("There is no poster image currently selected","jetpack")}),K&&(0,A.jsx)(l.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0,children:__("Remove Poster Image","jetpack")})]})}),(0,d.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,A.jsx)(g.N,{openInNewTab:!0,href:"https://automattic.survey.fm/videopress-feedback"})})]}),(0,A.jsx)(x.A,{attributes:t,setAttributes:u,useAverageColor:V,toggleAttribute:this.toggleAttribute}),(0,A.jsxs)(l.PanelBody,{title:__("Video File Settings","jetpack"),children:[(0,A.jsx)(l.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:N??"",disabled:k||w,options:[{label:_x("G",'Video rating for "General Audiences".',"jetpack"),value:"G"},{label:_x("PG-13",'Video rating for "Parental Guidance", unsuitable for children under 13.',"jetpack"),value:"PG-13"},{label:_x("R",'Video rating for "Restricted", not recommended for children under 17.',"jetpack"),value:"R-17"}],onChange:this.onChangeRating,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,A.jsx)(l.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Allow download","jetpack"),/* translators: Tooltip describing the "allow download" option for the VideoPress player */
__("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:P,disabled:k||R,__nextHasNoMarginBottom:!0}),(0,A.jsx)(l.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(B),onChange:this.onChangePrivacySetting,value:B??"",options:[{value:v.NF.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:v.NF.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:v.NF.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:k||I,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]}),Q=e=>{this.setState({fileForUpload:e[0]})},X=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):u({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,p.escapeHTML)(f?(0,C.T3)(f.name):""),ne=({mediaId:e,guid:t,src:n})=>{this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!e,isEditingWhileUploading:!!e&&this.state.isEditingWhileUploading,pendingVideoAttributes:e&&t&&n?{id:e,guid:t,src:n}:null})},re=e=>{this.setState({title:e})},se=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},oe=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},()=>this.setState({isUpdatingTitle:!0,title:e}),()=>this.setState({title:e}),()=>this.setState({isUpdatingTitle:!1}))},ie=()=>de({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),ae=()=>de({poster_attachment_id:this.state.videoPosterImageData.id}),le=e=>{e.generating?ce():ue(e.poster)},ce=()=>{setTimeout(()=>{(ee()?window.videoPressGetPoster(O):o()({path:`/videos/${O}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then(e=>le(e))},2e3)},ue=e=>{e&&u({poster:e})},de=e=>{if(ee())return window.videoPressUploadPoster(O,e).then(e=>le(e));o()({path:`/videos/${O}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch(e=>e)},pe=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&oe(),D?ae():null!=t&&ie()},he=()=>{this.state.pendingVideoAttributes&&u(this.state.pendingVideoAttributes),this.setState({isEditingWhileUploading:!1,pendingVideoAttributes:null}),pe()};if(null!=f&&f.name||this.state.isEditingWhileUploading){const e=this.state.title??te;return(0,A.jsx)(E,{fileForUpload:f,filename:te,uploadFinished:ne,blockSettings:Y,onDismissEditor:he,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:se,onSave:pe})}const me=k||r,ge=m||s||!O,fe=ge&&!s&&!me,be=(0,A.jsxs)(d.Fragment,{children:[(0,A.jsx)("div",{className:s||me?"":"videopress-block-hide",children:(0,A.jsx)(y.A,{text:s?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})}),(0,A.jsx)("div",{className:fe?"":"videopress-block-hide",children:(0,A.jsx)(e,{...this.props})})]});if(ge)return c?(0,A.jsx)(b.f,{onFilesSelected:Q,onMediaItemSelected:X,children:be}):(0,A.jsx)(d.Fragment,{children:be});const{html:ve,scripts:ye}=i||{html:null,scripts:null},ke=me||!i;return(0,A.jsxs)(d.Fragment,{children:[Y,(0,A.jsx)(T,{...this.props,hideOverlay:this.hideOverlay,html:ve,scripts:ye,interactive:j,caption:F,shouldRenderLoadingBlock:ke})]})}}]),"withVideoPressEdit")},27156(e,t,n){"use strict";var r=n(90372),s=n(97999),o=n(85985),i=n(63162),a=n(94715),l=n(75994),c=n(74997),u=n(56427),d=n(29491),p=n(47143),h=n(43656),m=n(86087),g=n(52619),f=n(27723),b=n(81837),v=n(59257),y=n(21440),k=n(54727),x=n(65390),_=n(77189),w=n(41560),j=n(47960),C=n(51983),A=n(7345),S=n(40932),E=(n(591),n(10790));const __=f.__,T=(0,d.createHigherOrderComponent)(e=>t=>{const{name:n}=(0,a.useBlockEditContext)();return"core/video"!==n&&"videopress/video"!==n?(0,E.jsx)(e,{...t}):(0,E.jsxs)(e,{...t,disableDropZone:!0,className:"no-videopress-media-placeholder",children:[(0,E.jsx)(u.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary",children:__("Media Library","jetpack")}),(0,E.jsx)(u.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary",children:__("Upload","jetpack")})]})},"videoPressNoPlanMediaPlaceholder"),N=(0,d.createHigherOrderComponent)(e=>t=>{const{name:n}=(0,a.useBlockEditContext)();if("core/video"!==n)return(0,E.jsx)(e,{...t});const{onFilesSelected:r,onMediaItemSelected:s}=(0,m.useContext)(b.Z),o={...t,handleUpload:!1,disableDropZone:!0,onSelect:e=>{void 0!==e.length?r(e):s(e)}};return(0,E.jsx)(e,{...o,className:"videopress-media-placeholder"})},"videoPressMediaPlaceholder"),P=(e,t,n)=>("core/video"!==t.name||!n.guid||n.className?.indexOf("wp-block-video")>=0||n.videoPressClassNames||(e.className=e.className.replace("wp-block-video","").trim()),e);(0,g.addFilter)("blocks.registerBlockType","jetpack/videopress",(e,t)=>{if("core/embed"===t)return(e=>{if(!("variations"in e)||"object"!=typeof e.variations)return;const{available:t}=(0,o.FB)("videopress");e.variations.some(e=>"videopress"===e.name&&(t&&(e.scope=[]),e.patterns.push(/^https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?$/i),!0))})(e),e;if("core/video"!==t||e.isDeprecation)return e;const{deprecated:n,edit:r,save:a,supports:l,transforms:u}=e,{available:d,unavailableReason:p}=(0,o.FB)("videopress"),m=(0,s.isWpcomPlatformSite)()&&["missing_plan","unknown"].includes(p),f=!!window.videoPressResumableEnabled;if(m?((0,g.addFilter)("editor.MediaPlaceholder","jetpack/videopress",T),(0,g.addFilter)("editor.BlockListBlock","jetpack/videopress-with-has-warning-is-interactive-class-names",(0,o.BT)("core/video"))):d&&(f&&(0,g.addFilter)("editor.MediaPlaceholder","jetpack/videopress",N),e.description=__("Embed a video from your media library or upload a new one with VideoPress.","jetpack"),e.example.attributes={caption:"",isVideoPressExample:!0,src:S}),(0,g.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",P,20),d||["missing_plan","missing_module","unknown"].includes(p)){const t={autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string",source:"attribute",selector:"video",attribute:"src"},useAverageColor:{type:"boolean",default:!0},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"},fileForImmediateUpload:{type:"object",default:null}},s=/https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?/i;return{...e,attributes:{...e.attributes,...t},transforms:{...u,from:[{type:"files",isMatch:e=>e.every(e=>0===e.type.indexOf("video/")),priority:9,transform:(e,t)=>{const n=[];return e.forEach(e=>{if(d&&f){const t=(0,c.createBlock)("core/video",{fileForImmediateUpload:e});n.push(t)}else{const r=(0,c.createBlock)("core/video",{src:(0,i.createBlobURL)(e)});(0,h.mediaUpload)({filesList:[e],onFileChange:([{id:e,url:n}])=>{t(r.clientId,{id:e,src:n})},allowedTypes:["video"]}),n.push(r)}}),n}},{type:"raw",isMatch:e=>"P"===e.nodeName&&s.test(e.innerHTML),transform:e=>{const t=s.exec(e.innerHTML);return(0,c.createBlock)("core/embed",{url:"https://videopress.com/v/"+t[1].trim()})}}]},supports:{...l,reusable:!1},edit:(0,_.A)(r),save:(0,w.A)(a),deprecated:[...n||[],x.A,k.A,{attributes:t,isEligible:e=>!e.guid,save:a,supports:l,isDeprecation:!0},y.A,v.A]}}return e},5),(0,g.addFilter)("blocks.registerBlockType","videopress/add-wp-chapters-support",A.A),(0,g.addFilter)("blocks.registerBlockType","videopress/add-v6-transform-support",C.A),(0,g.addFilter)("blocks.registerBlockType","videopress/handle-unavailability",function(e,t){if("videopress/video"!==t)return e;const{available:n,unavailableReason:r}=(0,o.FB)("videopress/video");return n?e:(0,s.isWpcomPlatformSite)()&&["missing_plan","unknown"].includes(r)?((0,g.addFilter)("editor.MediaPlaceholder","jetpack/videopress-video-no-plan",T),(0,g.addFilter)("editor.BlockListBlock","jetpack/videopress-video-with-has-warning-is-interactive-class-names",(0,o.BT)("videopress/video")),e):e},20),(0,g.addFilter)("blocks.registerBlockType","videopress/add-core-video-transform",function(e,t){if("videopress/video"!==t)return e;const n=(0,c.getBlockType)("videopress/video"),{available:s}=(0,o.FB)("videopress/video");return n&&s?{...e,transforms:{from:[...e.transforms?.from||[],{type:"block",blocks:["core/video"],isMatch:e=>{const{src:t,guid:n}=e,r=(0,j.QW)(t);return n||r},transform:e=>{const t=(0,p.select)(h.store).getCurrentPostId();return r.A?.tracks?.recordEvent("jetpack_editor_videopress_block_manual_transform_click",{post_id:t}),(0,c.createBlock)("videopress/video",e)}}],to:[...e.transforms?.to||[],{type:"block",blocks:["core/video"],transform:e=>(0,c.createBlock)("core/video",e)}]}}:e});const B=(0,d.createHigherOrderComponent)(e=>t=>{const{block:n}=t,{name:r,attributes:i,clientId:l,__unstableBlockSource:u}=n,{replaceBlock:d}=(0,p.useDispatch)(a.store),{url:h,guid:g,providerNameSlug:f}=i,{available:b}=((0,j.x1)(i),(0,c.getBlockType)("videopress/video"),(0,o.FB)("videopress/video")),v="core/embed"===r,y=(0,j.QW)(h),k=v&&y?y:g,x=((0,s.isSimpleSite)(),!1),_=x;return(0,m.useEffect)(()=>{},[l,_,i,u,d,k]),(0,E.jsx)(e,{...t})},"convertVideoBlockToVideoPressVideoBlock");function R({BlockListBlock:e,...t}){const{block:n}=t,{name:r,attributes:s,clientId:o}=n,{replaceBlock:i}=(0,p.useDispatch)(a.store);return(0,m.useEffect)(()=>{try{const e=(0,l.parse)(s.originalContent),t=e?.[0];if(!t)return;const{attrs:n}=t;i(o,(0,c.createBlock)("core/video",function(e){const t={...e};return e?.tracks&&(t.videoPressTracks=e.tracks,delete t.tracks),e?.isExample&&(t.isVideoPressExample=e.isExample,delete t.isExample),e?.classNames&&(t.videoPressClassNames=e.classNames,delete t.classNames),delete t.title,delete t.description,delete t.cacheHtml,delete t.videoRatio,delete t.privacySetting,delete t.allowDownload,delete t.displayEmbed,delete t.rating,delete t.isPrivate,t}(n)))}catch(e){console.error("Error converting VideoPress block to core/video",e)}},[r,o,s,i]),(0,E.jsx)(e,{...t})}(0,g.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-to-videopress-video-block",B);const I=(0,d.createHigherOrderComponent)(e=>t=>{const{block:n}=t,{name:r,attributes:s}=n;return"core/missing"!==r||"videopress/video"!==s?.originalName?(0,E.jsx)(e,{...t}):(0,E.jsx)(R,{...t,BlockListBlock:e})},"convertV6toV5");(0,g.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-from-v6-to-v5",I)},90781(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=({text:e})=>(0,s.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,s.jsx)(r.Spinner,{}),(0,s.jsx)("p",{children:e})]})},76212(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(56427),s=n(86087),o=n(27723),i=n(79654),a=n(37578),l=n(81837),c=n(80534),u=(n(86154),n(10790));const __=o.__;function d({file:e}){const[t,n]=(0,s.useState)(0),[d,p]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),[g,f]=(0,s.useState)(null),[b,v]=(0,s.useState)(null),{onUploadFinished:y}=(0,s.useContext)(l.Z),k=(0,s.useRef)(null);k.current=h;const x=(0,s.useCallback)(()=>{const t=(0,c.l)({onError:e=>{f(e)},onProgress:(e,t)=>{n(e/t*100)},onSuccess:e=>{y(e)},onUploadUuidRetrieved:e=>{null===b&&v(e)}});(0,c.Q)().then(n=>{const r=t(e,n);m(r)}).catch(e=>{f(e)})},[e,y,b]);(0,s.useEffect)(()=>(x(),()=>{null!==k.current&&k.current.abort()}),[]);const _=Math.round(t),w={width:`${_}%`},j=(0,a.O)(e.size);return(0,u.jsx)(u.Fragment,{children:null!==g?(0,u.jsxs)("div",{className:"resumable-upload__error",children:[(0,u.jsx)("div",{className:"resumable-upload__error-text",children:(()=>{let e=__("An error was encountered during the upload. Check your network connection.","jetpack");if("object"==typeof g){const t=g.toString().match(/message":"([^"]+)"/);if(t&&"object"==typeof t&&2===t.length){const n=t[1];if("Invalid Mime"!==n)return n;e=(0,u.jsxs)(u.Fragment,{children:[__("The format of the video you uploaded is not supported.","jetpack")," ",(0,u.jsx)(i.N,{openInNewTab:!0,href:"https://wordpress.com/support/videopress/recommended-video-settings/",target:"_blank",rel:"noreferrer",children:__("Check the recommended video settings.","jetpack")})]})}}return e})()}),(0,u.jsx)(r.Button,{variant:"primary",onClick:()=>(f(null),void x()),children:__("Try again","jetpack")}),(0,u.jsx)(r.Button,{variant:"secondary",onClick:()=>y({mediaId:null}),className:"resumable-upload__error-cancel",children:__("Cancel","jetpack")})]}):(0,u.jsxs)("div",{className:"resumable-upload__status",children:[(0,u.jsx)("div",{className:"resumable-upload__progress",children:(0,u.jsx)("div",{className:"resumable-upload__progress-loaded",style:w})}),(0,u.jsxs)("div",{className:"resumable-upload__file-info",children:[(0,u.jsx)("div",{children:d?(0,o.sprintf)(/* translators: %s: an upload progress percentage number, from 0-100. */
__("Paused (%s%%)","jetpack"),_):(0,o.sprintf)(/* translators: %s: an upload progress percentage number, from 0-100. */
__("Uploading (%s%%)","jetpack"),_)}),(0,u.jsx)("div",{className:"resumable-upload__file-size",children:j})]}),(0,u.jsx)("div",{className:"resumable-upload__actions",children:(0,u.jsx)(r.Button,{variant:"link",onClick:()=>{h&&(d?h.start():h.abort(),p(!d))},children:d?"Resume":"Pause"})})]})})}},80534(e,t,n){"use strict";n.d(t,{Q:()=>s,l:()=>i});var r=n(10781);const s=function(e){return new Promise(function(t,n){const r=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...r}).done(function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})}).fail(function(e){n(e)})})},o={},i=({onUploadUuidRetrieved:e,onError:t,onProgress:n,onSuccess:i})=>(a,l)=>{const c=new r._O(a,{onError:t,onProgress:n,endpoint:l.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:a.name,filetype:a.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(t,n){if(n.getStatus()>=400)return;const r=n.getHeader("x-videopress-upload-guid"),s=n.getHeader("x-videopress-upload-media-id"),a=n.getHeader("x-videopress-upload-src-url");if(r&&s&&a)return void(i&&i({mediaId:Number(s),guid:r,src:a}));const l={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},c={};Object.keys(l).forEach(function(e){const t=n.getHeader(e);t&&(c[l[e]]=t)}),c.key&&c.token&&(o[c.key]=c.token),c.key&&e(c.key)},onBeforeRequest:function(e){const t=e._method;["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0);for(const t of Object.keys(e._headers))e.setHeader(t,e._headers[t]);if("POST"===t){if(!!!l.token)throw"should never happen";e.setHeader("x-videopress-upload-token",l.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const n=new URL(e._url).pathname.split("/"),r=n[n.length-1];if(o[r])e.setHeader("x-videopress-upload-token",o[r]);else if("HEAD"===t)return s(r).then(t=>(o[r]=t.token,e.setHeader("x-videopress-upload-token",t.token),e))}return Promise.resolve(e)}});return c.findPreviousUploads().then(function(e){e.length&&c.resumeFromPreviousUpload(e[0]),c.start()}),c}},41560(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(94715),s=n(29491),o=n(13022),i=n(17900),a=n(10790);const l=(0,s.createHigherOrderComponent)(e=>t=>{const{attributes:{autoplay:n,caption:s,controls:l,guid:c,loop:u,muted:d,playsinline:p,poster:h,preload:m,videoPressClassNames:g,className:f,align:b,seekbarColor:v,seekbarPlayedColor:y,seekbarLoadingColor:k,useAverageColor:x,maxWidth:_}={}}=t;if(!c)return e(t);const w=r.useBlockProps.save({className:(0,o.A)("wp-block-video",f,g,{[`align${b}`]:b})}),j=(0,i.e)(c,{autoplay:n,controls:l,loop:u,muted:d,playsinline:p,poster:h,preload:m,seekbarColor:v,seekbarPlayedColor:y,seekbarLoadingColor:k,useAverageColor:x});let C={};return _&&_.length>0&&"100%"!==_&&(C={maxWidth:_,margin:"auto"}),(0,a.jsxs)("figure",{...w,children:[(0,a.jsx)("div",{className:"wp-block-embed__wrapper",style:C,children:`\n${j}\n`}),!r.RichText.isEmpty(s)&&(0,a.jsx)(r.RichText.Content,{tagName:"figcaption",value:s})]})},"withVideoPressSave")},57954(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(94715),s=n(56427),o=n(86087),i=n(27723),a=n(10790);const __=i.__;class l extends o.Component{constructor(){super(...arguments);const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}}handleChangeSeekbarColor=e=>{this.setState({seekbarColor:e})};handleChangeSeekbarLoadingColor=e=>{this.setState({seekbarLoadingColor:e})};handleChangeSeekbarPlayedColor=e=>{this.setState({seekbarPlayedColor:e})};saveColors=()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n}=this.state,{setAttributes:r}=this.props;r({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n})};render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.state,{toggleAttribute:o,useAverageColor:i}=this.props,l=!0;return(0,a.jsxs)(s.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1,children:[(0,a.jsx)(s.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:o("useAverageColor"),checked:i,__nextHasNoMarginBottom:!0}),(0,a.jsx)(r.PanelColorSettings,{opened:!i,showTitle:!1,colorSettings:[{value:e,onChange:this.handleChangeSeekbarColor,label:__("Main","jetpack"),showTitle:l},{value:n,onChange:this.handleChangeSeekbarLoadingColor,label:__("Loaded","jetpack"),showTitle:l},{value:t,onChange:this.handleChangeSeekbarPlayedColor,label:__("Progress","jetpack"),showTitle:l}],children:(0,a.jsx)(s.Button,{variant:"secondary",onClick:this.saveColors,children:__("Save colors","jetpack")})})]})}}const c=l},96247(e,t,n){"use strict";n.d(t,{A:()=>k,n:()=>b});var r=n(1455),s=n.n(r),o=n(94715),i=n(56427),a=n(47143),l=n(86087),c=n(27723),u=n(58384),d=n(10790);const __=c.__,p="subtitles",h={".vtt":"text/vtt",".srt":"application/x-subrip"},m=[{label:__("Subtitles","jetpack"),value:"subtitles"},{label:__("Captions","jetpack"),value:"captions"},{label:__("Descriptions","jetpack"),value:"descriptions"},{label:__("Chapters","jetpack"),value:"chapters"},{label:__("Metadata","jetpack"),value:"metadata"}],g=(0,d.jsxs)(i.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none",children:[(0,d.jsx)(i.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,d.jsx)(i.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,d.jsx)(i.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"})]}),f=()=>"videoPressUploadTrack"in window,b=(e,t)=>{if(f())return window.videoPressUploadTrack(t,e.kind,e.srcLang,e.label,e.tmpFile);const n={method:"POST",path:`/videos/${t}/tracks`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang],["label",e.label],["vtt",e.tmpFile]]};return s()(n)};function v({tracks:e,onChange:t,guid:n}){const[r=-1,o]=(0,l.useState)(),a=r=>{const i=e[r];o(r),((e,t)=>{if(f())return window.videoPressDeleteTrack(t,e.kind,e.srcLang);const n={method:"POST",path:`/videos/${t}/tracks/delete`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang]]};return s()(n)})(i,n).finally(()=>{t(e.filter((e,t)=>t!==r)),o(-1)})};let u;return u=0===e.length?(0,d.jsx)("p",{className:"videopress-block-tracks-editor__tracks-informative-message",children:__("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.","jetpack")}):e.map((e,t)=>(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__track-list-track",children:[(0,d.jsx)("span",{children:e.label}),(0,d.jsx)("div",{className:"videopress-block-tracks-editor__track-list-track-delete",children:(0,d.jsx)(i.Button,{variant:"link",isDestructive:!0,onClick:()=>{a(t)},"aria-label":(0,c.sprintf)(/* translators: %s: Label of the video text track e.g: "French subtitles" */
__("Delete %s","jetpack"),e.label),disabled:r===t,children:r===t?__("Deleting","jetpack"):__("Delete","jetpack",0)})})]},t)),(0,d.jsx)(i.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list",children:u})}function y({track:e,guid:t,onChange:n,onClose:r,onCancel:s,trackExists:u}){const[g,f]=(0,l.useState)(),[v=!1,y]=(0,l.useState)(),{label:k="",srcLang:x="",kind:_=p}=e,w=e.tmpFile?e.tmpFile.name:"";if(!(0,a.useSelect)(e=>e(o.store).getSettings().mediaUpload,[]))return null;return(0,d.jsx)(i.NavigableMenu,{children:(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor",children:[(0,d.jsx)("span",{className:"videopress-block-tracks-editor__single-track-editor-label",children:__("Edit track","jetpack")}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file",children:[(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label",children:[(0,d.jsxs)("span",{children:[__("File","jetpack"),":"]}),""!==w&&(0,d.jsx)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name",children:(0,d.jsx)("strong",{children:w})}),(0,d.jsx)(o.MediaUploadCheck,{children:(0,d.jsx)(i.FormFileUpload,{onChange:t=>{const r=t.target.files;!r.length>0||(e.tmpFile=r[0],n(e))},accept:Object.entries(h).join(),render:({openFileDialog:e})=>(0,d.jsx)(i.Button,{variant:"link",onClick:()=>{e()},children:""===w?__("Select track","jetpack"):__("Change track","jetpack",0)}),disabled:v})})]}),(0,d.jsx)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help",children:(0,c.sprintf)(/* translators: %s: The allowed file types to be uploaded as a video text track." */
__("Allowed formats: %s","jetpack"),Object.keys(h).join(", "))})]}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language",children:[(0,d.jsx)(i.TextControl,{onChange:t=>n({...e,label:t}),label:__("Label","jetpack"),value:k,help:__("Title of track","jetpack"),disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(i.TextControl,{onChange:t=>n({...e,srcLang:t}),label:__("Source language","jetpack"),value:x,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsx)(i.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:m,value:_,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
__("Kind","jetpack"),onChange:t=>{n({...e,kind:t})},disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container",children:[v?(0,d.jsx)(i.Spinner,{}):(0,d.jsx)(i.Button,{variant:"secondary",disabled:!e.tmpFile,onClick:()=>{f(null),""===k&&(e.label=__("English","jetpack")),""===x&&(e.srcLang="en"),void 0===e.kind&&(e.kind=p),u(e)?f(__("A track already exists for that language and kind.","jetpack")):(y(!0),b(e,t).then(()=>{n(e),f(null),r()}).catch(e=>{e.message&&f(e.message)}).finally(()=>{y(!1)}))},children:__("Save","jetpack")}),(0,d.jsx)(i.Button,{variant:"link",onClick:s,children:__("Close","jetpack")})]}),g&&(0,d.jsx)("div",{className:"videopress-block-tracks-editor__single-track-editor-error",children:/* translators: %s: An error message returned after a failed video track file upload." */ /* translators: %s: An error message returned after a failed video track file upload." */
(0,c.sprintf)(__("Error: %s","jetpack"),g)})]})})}function k({tracks:e=[],onChange:t,guid:n}){const[r,s]=(0,l.useState)(null);return(0,d.jsx)(i.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:({isOpen:e,onToggle:t})=>(0,d.jsx)(i.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":e,"aria-haspopup":"true",onClick:t,icon:g}),renderContent:()=>null!==r?(0,d.jsx)(y,{track:e[r],guid:n,onChange:n=>{const s=[...e];s[r]=n,t(s)},onClose:()=>s(null),onCancel:()=>{t(e.filter((e,t)=>t!==r)),s(null)},trackExists:t=>-1!==e.filter((e,t)=>t!==r).findIndex(e=>e.kind===t.kind&&e.srcLang===t.srcLang),__next40pxDefaultSize:!0}):(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(i.NavigableMenu,{children:[(0,d.jsx)(v,{tracks:e,onChange:t,guid:n}),(0,d.jsx)(i.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack"),children:(0,d.jsx)(i.MenuItem,{icon:u.A,onClick:()=>{(()=>{const n=e.length,r=[...e];r[n]||(r[n]={}),r[n]={...e[n]},t(r),s(n)})()},children:__("Upload track","jetpack")})})]})})})}},22857(e,t,n){"use strict";n.d(t,{d:()=>m});var r=n(62410),s=n(94715),o=n(56427),i=n(86087),a=n(27723),l=n(13109),c=n(13022),u=(n(58227),n(10790));const __=a.__,d=["image"],p=e=>{const{videoPosterImageUrl:t}=e;return(0,u.jsx)("div",{className:"resumable-upload__editor-thumb-placeholder",children:t?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("img",{src:t,alt:"Poster"}),(0,u.jsx)(l.A,{className:"uploading-editor__play-icon",icon:r.ud})]}):(0,u.jsx)("span",{children:"No Poster Selected"})})},h=e=>{const{onSelectPoster:t,onRemovePoster:n}=e;return(0,u.jsxs)(o.BaseControl,{className:(0,c.A)(e.className,"editor-video-poster-control"),children:[(0,u.jsx)(p,{...e}),(0,u.jsx)(s.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:d,render:({open:e})=>(0,u.jsxs)("div",{className:"poster-selector__buttons",children:[(0,u.jsx)(o.Button,{onClick:n,variant:"link",isDestructive:!0,children:__("Remove Poster Image","jetpack")}),(0,u.jsx)(o.Button,{variant:"secondary",onClick:e,children:__("Select Poster Image","jetpack")})]})})]})},m=e=>{const{file:t,onSelectPoster:n,onRemovePoster:a,videoPosterImageData:c,title:p,onChangeTitle:m,onVideoFrameSelected:g}=e,[f,b]=(0,i.useState)(0),[v,y]=(0,i.useState)(!0),k=(0,i.useRef)(null),x=(0,i.useRef)(null),_=()=>{y(!1)};(0,i.useEffect)(()=>{null!==t&&k&&(k.current.src=URL.createObjectURL(t))},[t,k]);const w={};return c&&(w.display="none"),(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"uploading-editor",children:[(0,u.jsx)("div",{className:"uploading-editor__summary"}),(0,u.jsxs)("div",{className:"uploading-editor__fields",children:[(0,u.jsx)(o.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:p,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)("div",{className:"uploading-editor__content",children:(0,u.jsxs)(o.BaseControl,{__nextHasNoMarginBottom:!0,children:[(0,u.jsx)(o.BaseControl.VisualLabel,{children:__("Video poster (optional)","jetpack")}),v?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"uploading-editor__video-container",children:[(0,u.jsxs)("div",{className:"uploading-editor__video-poster-wrapper",children:[c&&(0,u.jsx)(h,{onSelectPoster:n,onRemovePoster:a,videoPosterImageUrl:c.url}),(0,u.jsx)("video",{ref:k,muted:!0,className:"uploading-editor__video",onDurationChange:e=>{const t=e.target.duration;b(t),k.current&&(k.current.currentTime=t/2)},onError:_,onLoadedMetadata:e=>{e.target.videoHeight||_()},style:w})]}),!c&&(0,u.jsx)(l.A,{className:"uploading-editor__play-icon",icon:r.ud})]}),(0,u.jsx)("span",{style:w,children:(0,u.jsx)(o.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:f,showTooltip:!1,withInputField:!1,onChange:e=>{g(1e3*e),k.current&&(k.current.currentTime=e)},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,u.jsx)("span",{className:"uploading-editor__scrubber-help",style:w,children:(0,i.createInterpolateElement)(__("This is how the video will look. Use the slider to choose a poster or <a>select a custom one</a>.","jetpack"),{a:(0,u.jsx)(s.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:n,allowedTypes:d,render:({open:e})=>(0,u.jsx)("a",{className:"uploading-editor__upload-link",onClick:e,onKeyDown:e,ref:x,role:"button",tabIndex:0,children:__("select a custom one","jetpack")})})})})]}):(0,u.jsx)(h,{onSelectPoster:n,videoPosterImageUrl:c?c.url:null})]})})]})]})})}},17900(e,t,n){"use strict";n.d(t,{e:()=>s});var r=n(93832);const s=(e,{autoplay:t,controls:n,loop:s,muted:o,playsinline:i,poster:a,preload:l,seekbarColor:c,seekbarPlayedColor:u,seekbarLoadingColor:d,useAverageColor:p})=>{if(!e)return null;const h={resizeToParent:!0,cover:!0,...t&&{autoPlay:!0},...!n&&{controls:!1},...s&&{loop:!0},...o&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...a&&{posterUrl:a},...""!==l&&{preloadContent:l},...""!==c&&{sbc:c},...""!==u&&{sbpc:u},...""!==d&&{sblc:d},...p&&{useAverageColor:!0}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,h)}},47960(e,t,n){"use strict";n.d(t,{QW:()=>l,T3:()=>a,Zz:()=>i,x1:()=>c});n(74997);var r=n(13022),s=n(74628);const o=e=>{const t=s.C1.reduce((e,{className:t})=>(e[t]=!1,e),{"wp-has-aspect-ratio":!1});return(0,r.A)(e,t)};function i(e,t="",n=!0){if(!n)return o(t);const i=document.implementation.createHTMLDocument("");i.body.innerHTML=e;const a=i.body.querySelector("iframe");if(a&&a.height&&a.width){const e=(a.width/a.height).toFixed(2);for(let n=0;n<s.C1.length;n++){const i=s.C1[n];if(e>=i.ratio)return(0,r.A)(o(t),i.className,"wp-has-aspect-ratio")}}return t}const a=e=>e.replace(/\.[^/.]+$/,""),l=e=>{if(!e||"string"!=typeof e)return null;const t=e.match(/^https?:\/\/(?<host>video(?:\.word|s\.files\.word)?press\.com)(?:\/v|\/embed)?\/(?<guid>[a-zA-Z\d]{8})/);return t?.groups?.guid?t.groups.guid:null},c=e=>{const{guid:t,videoPressTracks:n,isVideoPressExample:r}=e;if(!t?.length)return!1;if(!Array.isArray(n))return!1;return!(!Object.keys(e).includes("isVideoPressExample")||"boolean"!=typeof r)}},58731(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(85985),s=n(94715),o=n(74997),i=n(56427),a=n(47143),l=n(43656),c=n(27723),u=n(47960),d=n(89732),p=n(10790);const __=c.__,h={instances:[]},m=(e=[],t=!1,n=0)=>{if(t&&(h.instances=[]),e.forEach(e=>{if(e.innerBlocks.length)return void m(e.innerBlocks,!1,n+1);const{clientId:t,name:r,attributes:s}=e;"core/video"===r&&(0,u.x1)(s)&&h.instances.push({clientId:t,name:r,attributes:s})}),0===n)return h.instances};function g({clientId:e,attributes:t}){const n=(0,a.useSelect)(e=>e(l.store).getCurrentPostId()),{getBlocks:c}=(0,a.useSelect)(s.store),{replaceBlock:h}=(0,a.useDispatch)(s.store),{tracks:g}=(0,r.st)();return(0,p.jsxs)("div",{className:d.A.wrapper,children:[(0,p.jsx)(i.Notice,{status:"info",isDismissible:!1,className:d.A["conversion-notice"],children:__("You can transform this post's video blocks to the new VideoPress block to take advantage of new features, such as adding chapters directly in the description or hiding the video's share menu.","jetpack")}),(0,p.jsx)(i.Button,{variant:"primary",onClick:()=>{const r=m(c(),!0);r?.length&&(r.find(t=>t.clientId===e)||r.push({clientId:e,name:"core/video",currentBlockAttributes:t}),r.forEach(e=>{const{clientId:t,name:r,attributes:s}=e;"core/video"===r&&(0,u.x1)(s)&&(h(t,(0,o.createBlock)("videopress/video",s)),g.recordEvent("jetpack_editor_videopress_block_manual_conversion_click",{post_id:n}))}))},children:__("Transform blocks to VideoPress","jetpack")})]})}},55159(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(94715),s=n(29491),o=n(47960),i=n(58731),a=n(10790);const l=(0,s.createHigherOrderComponent)(e=>t=>(0,o.x1)(t.attributes)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.InspectorControls,{children:(0,a.jsx)(i.A,{clientId:t.clientId,attributes:t.attributes})}),(0,a.jsx)(e,{...t})]}):(0,a.jsx)(e,{...t}))},51983(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(85985),s=n(55159);function o(e,t){if("core/video"!==t)return e;const{available:n}=(0,r.FB)("videopress/video");return n?{...e,edit:(0,s.A)(e.edit)}:e}},5146(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(56427),s=n(27723),o=n(67858),i=n(84605),a=(n(60333),n(10790));const __=s.__,l="videopress/video-chapters",c=!!window?.Jetpack_Editor_Initial_State?.available_blocks[l];function u({isRequestingVideoItem:e}){const{attributes:t,setAttributes:n}=(0,i.A)();if(!c)return null;const{title:s,description:u}=t,d=(0,o.m)(l),p=u?.length?u.split("\n").map(e=>Math.ceil(e.length/31)||1).reduce((e,t)=>e+t,0):4,h=Math.min(12,Math.max(p,4));return(0,a.jsxs)(r.PanelBody,{title:__("Details","jetpack"),className:d?"is-beta":"",children:[(0,a.jsx)(r.TextControl,{label:__("Title","jetpack"),value:s,placeholder:__("Video title","jetpack"),onChange:e=>{n({title:e})},disabled:e,__next40pxDefaultSize:!0}),(0,a.jsx)(r.TextareaControl,{label:__("Description","jetpack"),value:u,placeholder:__("Video description","jetpack"),onChange:e=>{n({description:e})},disabled:e,rows:h})]})}},83112(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(94715),s=n(29491),o=n(86087),i=n(5146),a=n(52753),l=n(95501),c=n(7345),u=n(10790);const d=(0,s.createHigherOrderComponent)(e=>t=>{const{attributes:n,setAttributes:s}=t,[d,p]=(0,a.A)(n?.id),[h]=(0,l.n)(n);return(0,o.useEffect)(()=>{if(!d)return;const e={};d?.title&&(e.title=d.title),d?.description&&(e.description=d.description),Object.keys(e).length&&(s(e),h(e))},[d,s,h]),c.j&&"core/video"!==!t.name&&t.attributes?.guid?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.InspectorControls,{children:(0,u.jsx)(i.A,{isRequestingVideoItem:p})}),(0,u.jsx)(e,{...t})]}):(0,u.jsx)(e,{...t})})},84605(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(94715),s=n(47143);function o(){const{clientId:e,attributes:t}=(0,s.useSelect)(e=>{const t=e(r.store).getSelectedBlockClientId();return{clientId:t,attributes:t?e("core/block-editor").getBlockAttributes(t):void 0}}),{updateBlockAttributes:n}=(0,s.useDispatch)(r.store);return{clientId:e,attributes:t,setAttributes:t=>n(e,t)}}},95501(e,t,n){"use strict";n.d(t,{n:()=>g});var r=n(1455),s=n.n(r),o=n(29491),i=n(3582),a=n(47143),l=n(43656),c=n(86087),u=n(27723),d=n(96247),p=n(17900),h=n(17204),m=n(97393);const __=u.__;function g(e){const{id:t,title:n,description:r,guid:u}=e,g=(0,a.useSelect)(e=>e(l.store).isSavingPost(),[]),f=(0,o.usePrevious)(g),b=(0,a.useDispatch)(i.store).invalidateResolution,[v,y]=(0,c.useState)(),k=(0,c.useCallback)(e=>{y(t=>({...t,...e}))},[]);(0,c.useEffect)(()=>{y({title:n,description:r})},[]);const x=function(e){return t=>new Promise((n,r)=>{s()({path:"/wpcom/v2/videopress/meta",method:"POST",data:{id:e,...t}}).then(e=>{if(200!==e?.data)return r(e);n(e)}).catch(r)})}(t);return(0,c.useEffect)(()=>{if(!g||f)return;if(!t)return;const s={};if(v?.title!==n&&(s.title=n),v?.description!==r&&(s.description=r),!Object.keys(s).length)return;if(x(s).then(()=>k({title:n,description:r})),!s?.description?.length)return;const o=(0,h.Ay)(s.description);if(!o?.length)return;const i={label:__("English","jetpack"),srcLang:"en",kind:"chapters",tmpFile:(0,m.Ay)(s.description)};(0,d.n)(i,u).then(()=>{const t=(0,p.e)(u,e);b("getEmbedPreview",[t])})},[g,f,n,v?.title,v?.description,r,x,k,e,b,t,u]),[k]}},52753(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1455),s=n.n(r),o=n(86087);function i(e){const[t,n]=(0,o.useState)({}),[r,i]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{e&&(i(!0),async function(){try{const t=await s()({path:`/wp/v2/media/${e}`});n(t?.jetpack_videopress||{}),i(!1)}catch(e){throw i(!1),new Error(e,{cause:e})}}())},[e]),[t,r]}},7345(e,t,n){"use strict";n.d(t,{A:()=>o,j:()=>s});var r=n(83112);const s=!!window?.Jetpack_Editor_Initial_State?.available_blocks["videopress/video-chapters"];function o(e,t){if(!s)return e;if("core/video"!==t)return e;const n={...e.attributes,title:{type:"string"},description:{type:"string"}};return{...e,attributes:n,edit:(0,r.A)(e.edit)}}},17204(e,t,n){"use strict";function r(e){return e.split("\n").map(e=>function(e){const t=/(?<timeBlock>\(?(?<time>\d{1,2}:\d{2}:\d{2}|\d{1,2}:\d{2})\)?)/.exec(e);if(null==t||null==t.groups)return null;const{groups:{timeBlock:n,time:r}}=t,s=e.indexOf(n),o=(s<(e.length-n.length)/2?e.substring(s+n.length,e.length):e.substring(0,s)).trim().replace(/(\s-$)|(^-\s)/,""),i=r.split(":");return 1===i[0].length&&(i[0]=`0${i[0]}`),2===i.length&&i.unshift("00"),{startAt:i.join(":"),title:o}}(e)).filter(e=>null!==e).sort((e,t)=>e.startAt.localeCompare(t.startAt))}n.d(t,{$k:()=>r,Ay:()=>r})},97393(e,t,n){"use strict";n.d(t,{Ay:()=>o});var r=n(17204);function s(e){const t=Math.floor(e/36e5);let n=e-36e5*t;const r=Math.floor(n/6e4);n-=6e4*r;return[t,r,Math.floor(n/1e3)].map(e=>e<10?`0${e}`:e).join(":")}function o(e,t){const n=function(e,t=359999e3){const n=(0,r.$k)(e);if(0===n.length)return null;let o="WEBVTT\n",i=1;for(const[e,r]of n.entries()){const a=0===e?"000":"001",l=e<n.length-1?n[e+1].startAt:s(t);o+=`\n${i++}\n${r.startAt}.${a} --\x3e ${l}.000\n${r.title}\n`}return o}(e,t);return n?new File([n],"chapters.vtt",{type:"text/vtt"}):null}},84854(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(96865),s=n(56427),o=n(27723),i=n(10790);const __=o.__;function a({state:e,onUpload:t,onCancel:n,onRecord:o,onPause:a,onResume:l,onDone:c}){return(0,i.jsxs)("div",{className:"jetpack-ai-voice-to-content__action-buttons",children:[["inactive","error","validating"].includes(e)&&(0,i.jsx)(s.Button,{className:"jetpack-ai-voice-to-content__button",icon:r.Vo,variant:"secondary",onClick:o,children:__("Begin recording","jetpack")}),["recording"].includes(e)&&(0,i.jsx)(s.Button,{className:"jetpack-ai-voice-to-content__button",icon:r.ni,variant:"secondary",onClick:a,children:__("Pause recording","jetpack")}),["paused"].includes(e)&&(0,i.jsx)(s.Button,{className:"jetpack-ai-voice-to-content__button",icon:r.Vo,variant:"secondary",onClick:l,children:__("Resume recording","jetpack")}),["inactive","error","validating"].includes(e)&&(0,i.jsx)(s.FormFileUpload,{accept:".mp3,.mpeg,.mpga,.ogg,.flac,.m4a,.mp4,.wav,.wave,.webm",onChange:t,className:"jetpack-ai-voice-to-content__button is-secondary",children:__("Upload audio","jetpack")}),["recording","paused"].includes(e)&&(0,i.jsx)(s.Button,{className:"jetpack-ai-voice-to-content__button",variant:"primary",onClick:c,children:__("Done","jetpack")}),["recording","paused","processing"].includes(e)&&(0,i.jsx)(s.Button,{className:"jetpack-ai-voice-to-content__button",variant:"secondary",onClick:n,children:__("Cancel","jetpack")})]})}},41004(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(96865),s=n(27723),o=n(73723),i=n(10790);const __=s.__;function a({state:e,error:t=null,analyser:n,duration:s=0}){return"inactive"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information",children:__("File size limit: 25MB. Recording time limit: 25 minutes.","jetpack")}):"recording"===e?(0,i.jsxs)("div",{className:"jetpack-ai-voice-to-content__audio",children:[(0,i.jsx)(r.z3,{className:"jetpack-ai-voice-to-content__audio--duration",duration:s}),(0,i.jsx)(o.A,{analyser:n,paused:!1}),(0,i.jsx)("span",{className:"jetpack-ai-voice-to-content__information",children:__("Recording…","jetpack")})]}):"paused"===e?(0,i.jsxs)("div",{className:"jetpack-ai-voice-to-content__audio",children:[(0,i.jsx)(r.z3,{className:"jetpack-ai-voice-to-content__audio--duration",duration:s}),(0,i.jsx)(o.A,{analyser:n,paused:!0}),(0,i.jsx)("span",{className:"jetpack-ai-voice-to-content__information",children:__("Paused","jetpack")})]}):"processing"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information",children:__("Uploading and transcribing audio…","jetpack")}):"validating"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information",children:__("Validating audio…","jetpack")}):"error"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information--error",children:t}):null}},73723(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(86087),s=n(10790);function o({analyser:e,paused:t=!1}){const n=(0,r.useRef)(null),o=(0,r.useRef)(t),i=(0,r.useRef)(null);return(0,r.useEffect)(()=>{o.current=t},[t]),(0,r.useEffect)(()=>{e&&n.current&&(i.current&&i.current(),i.current=function(e,t,n){const r=t.getContext("2d");let s=!1;if(!r)return;e.fftSize=Math.pow(2,13);const o=e.fftSize,i=new Float32Array(o),a=o/10,{width:l,height:c}=t,u=c/2;r.lineWidth=4,r.lineCap="round",r.strokeStyle=getComputedStyle(t).getPropertyValue("--jp-green-50")||"#008710";const d=()=>{r.clearRect(0,0,l,c),e.getFloatTimeDomainData(i);for(let e=1;e<=10;e++){let t=0;n.current||(t=i.slice(e*a,(e+1)*a).reduce((e,t)=>e+t,0)/a,t*=2048,t=Math.abs(t),t=Math.min(16,Math.max(0,t))),r.beginPath(),r.moveTo(2+6*e,u-t),r.lineTo(2+6*e,u+t),r.stroke()}setTimeout(()=>{s||requestAnimationFrame(d)},50)};return d(),()=>{s=!0}}(e,n.current,o))},[e,n,o]),(0,r.useEffect)(()=>()=>{i.current&&i.current()},[]),(0,s.jsx)("canvas",{className:"jetpack-ai-voice-to-content__oscilloscope",width:70,height:38,ref:n})}},42279(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(96865),s=n(50723),o=n(85985),i=n(94715),a=n(56427),l=n(47143),c=n(86087),u=n(27723),d=n(1866),p=n(84854),h=n(41004),m=n(59926),g=n(22228),f=n(10790);const __=u.__;function b({clientId:e}){const[t,n]=(0,c.useState)(null),{removeBlock:u}=(0,l.useDispatch)(i.store),{getBlocks:b}=(0,l.useSelect)(i.store,[]),v=(0,c.useCallback)(()=>{setTimeout(()=>{u(e)},100)},[u,e]),{tracks:y}=(0,o.st)(),{isValidatingAudio:k,validateAudio:x}=(0,r.rr)(),{upsertTranscription:_}=(0,g.A)(),{isCreatingTranscription:w,createTranscription:j,cancelTranscription:C}=(0,m.A)({onReady:e=>{_(e);const t=b();for(let e=0;e<2;e++)"core/paragraph"===t[e].name&&""===t[e].attributes?.content&&u(String(t[e].clientId));A()},onUpdate:e=>{_(e)},onError:e=>{N(e)}}),A=()=>{C(),v()},{state:S,controls:E,error:T,onError:N,duration:P,analyser:B}=(0,r.be)({onDone:e=>{R(e)}}),R=(0,c.useCallback)(e=>{e&&n(e)},[n]);(0,c.useEffect)(()=>{t&&x(t,e=>{y.recordEvent("jetpack_ai_voice_to_content_transcription_started",{post_processing_action:r.uH,type:e.isFile?"upload":"record",audio_duration:e.duration,audio_file_size:e.size}),j(t,r.uH)},N)},[t,y,x,j,N]);const{start:I,pause:D,resume:L,stop:F,reset:M}=E,O=(0,c.useCallback)(e=>{if(e.currentTarget.files.length>0){const t=e.currentTarget.files[0];R(t)}},[R]),U=(0,c.useCallback)(()=>{C(),M()},[C,M]),z=(0,c.useCallback)(()=>{I(1e3)},[I]),$=(0,c.useCallback)(()=>{D()},[D]),q=(0,c.useCallback)(()=>{L()},[L]),H=(0,c.useCallback)(()=>{F()},[F]),V=((e,t,n)=>t?"validating":e?"processing":n)(w,k,S);return(0,f.jsx)(a.Modal,{onRequestClose:A,title:__("Jetpack AI Voice to content","jetpack"),className:"jetpack-ai-voice-to-content__modal",shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1,children:(0,f.jsx)(s.Ay,{children:(0,f.jsxs)("div",{className:"jetpack-ai-voice-to-content__wrapper",children:[(0,f.jsxs)("div",{className:"jetpack-ai-voice-to-content__body",children:[(0,f.jsx)("span",{className:"jetpack-ai-voice-to-content__description",children:__("Transform your spoken words into a post ready to publish with AI.","jetpack")}),(0,f.jsx)("div",{className:"jetpack-ai-voice-to-content__contextual-row",children:(0,f.jsx)(h.A,{state:V,error:T,duration:P,analyser:B})}),(0,f.jsx)(p.A,{state:V,onUpload:O,onCancel:U,onRecord:z,onPause:$,onResume:q,onDone:H})]}),(0,f.jsx)("div",{className:"jetpack-ai-voice-to-content__footer",children:(0,f.jsxs)(a.Button,{variant:"link",className:"jetpack-ai-voice-to-content__feedback-button",href:"https://a8c.slack.com/archives/C054LN8RNVA",target:"_blank",children:[(0,f.jsx)("span",{children:__("Provide feedback","jetpack")}),(0,f.jsx)(a.Icon,{icon:d.A,className:"icon"})]})})]})})})}},72718(e,t,n){"use strict";var r=n(94375),s=n(15210),o=n(42279);n(94533);(0,r.M)(s,{edit:o.A,save:()=>null})},59926(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(96865),s=n(86087),o=n(10067);const i=n.n(o)()("voice-to-content:use-transcription-creator"),a="voice-to-content";function l({onReady:e,onUpdate:t,onError:n}){const o=(0,s.useRef)(null),l=(0,s.useRef)(null),{processTranscription:c,cancelTranscriptionProcessing:u,isProcessingTranscription:d}=(0,r.xA)({feature:a,onReady:e,onUpdate:t,onError:t=>{if(o.current)return e(o.current);i("Transcription post-processing error: ",t)}}),p=(0,s.useCallback)(e=>{o.current=e,l.current&&c(l.current,e)},[c]),{transcribeAudio:h,cancelTranscription:m,isTranscribingAudio:g}=(0,r.E0)({feature:a,onReady:p,onError:n});return{isCreatingTranscription:g||d,createTranscription:(0,s.useCallback)((e,t)=>{if(e&&t)return l.current=t,h(e)},[h]),cancelTranscription:(0,s.useCallback)(()=>{m(),u()},[m,u])}}},22228(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(96865),s=n(74997),o=n(47143),i=n(86087),a=n(10067);const l=n.n(a)()("voice-to-content:use-transcription-inserter");function c(){const{updateBlockAttributes:e,insertBlocks:t,replaceInnerBlocks:n}=(0,o.useDispatch)("core/block-editor"),a=(0,i.useRef)([]);return{upsertTranscription:(0,i.useCallback)(o=>{l("Upserting transcription");const i=(0,r._E)({content:o||""}),c=(0,s.rawHandler)({HTML:i});for(let r=0;r<c.length;r++)if(r<a.current.length){const t=a.current[r].clientId,s=a.current[r].attributes?.content;c[r].attributes?.content&&s!==c[r].attributes?.content&&e(t,{content:c[r].attributes.content}),c[r].innerBlocks.length>0&&n(t,c[r].innerBlocks)}else t([c[r]],void 0,void 0,!0,null),a.current.push(c[r])},[a,t,e,n])}}},91725(e,t,n){"use strict";n.d(t,{e:()=>u});var r=n(85985),s=n(56427),o=n(27723),i=n(79654),a=n(16344),l=n(10790);const __=o.__,c=(0,r.sh)(a),u=({changeStatus:e,isLoading:t,isModuleActive:n})=>(0,l.jsxs)(s.Placeholder,{icon:c,instructions:__("You'll need to activate the WordAds feature to use this block.","jetpack"),label:a.title,children:[(0,l.jsx)(s.Button,{disabled:n||t,isBusy:t,onClick:()=>e(!0),variant:"secondary",children:t?__("Activating WordAds","jetpack"):__("Activate WordAds","jetpack",0)}),(0,l.jsx)("div",{className:"membership-button__disclaimer",children:(0,l.jsx)(i.N,{openInNewTab:!0,href:"https://jetpack.com/support/ads/",children:__("Learn more about the WordAds feature.","jetpack")})})]})},78473(e,t,n){"use strict";n.d(t,{B:()=>i});var r=n(11876),s=n(56427),o=n(10790);const i=()=>(0,o.jsx)(s.Placeholder,{children:(0,o.jsxs)(s.Flex,{gap:2,direction:"column",style:{width:"100%"},children:[(0,o.jsxs)(s.Flex,{gap:4,children:[(0,o.jsx)(s.FlexItem,{children:(0,o.jsx)(r.A,{width:30,height:30})}),(0,o.jsx)(s.FlexBlock,{children:(0,o.jsx)(r.A,{width:"90%",height:30})})]}),(0,o.jsx)(s.Flex,{style:{marginTop:12},children:(0,o.jsx)(s.FlexBlock,{children:(0,o.jsx)(r.A,{height:30,width:"60%"})})}),(0,o.jsx)(s.Flex,{style:{marginTop:12},children:(0,o.jsx)(s.FlexBlock,{children:(0,o.jsx)(r.A,{width:150,height:50})})}),(0,o.jsx)(s.Flex,{style:{marginTop:18},children:(0,o.jsx)(s.FlexBlock,{children:(0,o.jsx)(r.A,{width:"90%",height:16})})})]})})},78458(e,t,n){"use strict";n.d(t,{H:()=>i});var r=n(56427),s=n(27723),o=n(10790);const __=s.__,i=[{height:250,icon:(0,o.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,o.jsx)(r.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,o.jsx)(r.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})]}),name:__("Rectangle 300x250","jetpack"),tag:"mrec",width:300,editorPadding:30},{height:90,icon:(0,o.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,o.jsx)(r.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,o.jsx)(r.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})]}),name:__("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:(0,o.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,o.jsx)(r.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,o.jsx)(r.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})]}),name:__("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:(0,o.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,o.jsx)(r.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,o.jsx)(r.Path,{d:"M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})]}),name:__("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}]},79577(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(94715),s=n(56427),o=n(27723),i=n(78971),a=n(10790);const __=o.__,l=({value:e,onChange:t})=>(0,a.jsx)(s.PanelBody,{title:__("Visibility","jetpack"),children:(0,a.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,className:"jetpack-wordads__mobile-visibility",checked:!!e,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:t})}),c=({attributes:{format:e,hideMobile:t},setAttributes:n})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.BlockControls,{children:(0,a.jsx)(i.A,{value:e,onChange:e=>n({format:e})})}),(0,a.jsx)(r.InspectorControls,{children:(0,a.jsx)(l,{value:t,onChange:e=>n({hideMobile:!!e})})})]})},27695(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(50723),s=n(85985),o=n(94715),i=n(91725),a=n(78473),l=n(78458),c=n(79577),u=n(60651),d=n(26408),p=n(68364),h=n(90244),m=(n(42265),n(10790));const g=({attributes:e,setAttributes:t})=>{const n=(0,o.useBlockProps)(),{format:g}=e,{isLoadingModules:f,isChangingStatus:b,isModuleActive:v,changeStatus:y}=(0,s.q7)("wordads"),k=l.H.find(({tag:e})=>e===g),x=e=>{switch(e){case"leaderboard":return h;case"mobile_leaderboard":return p;case"wideskyscraper":return u;default:return d}};let _;return _=v?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(c.A,{attributes:e,setAttributes:t}),(0,m.jsx)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${g}`,children:(0,m.jsx)("div",{className:"jetpack-wordads__ad",style:{width:k.width,height:k.height,backgroundImage:`url( ${x(g)} )`,backgroundSize:"cover"}})})]}):f?(0,m.jsx)(r.Ay,{children:(0,m.jsx)(a.B,{})}):(0,m.jsx)(i.e,{changeStatus:y,isModuleActive:v,isLoading:b}),(0,m.jsx)("div",{...n,children:_})}},99398(e,t,n){"use strict";var r=n(94375),s=n(16344),o=n(27695);(0,r.M)(s,{edit:o.A,save:()=>null})},78971(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),s=n(27723),o=n(78458),i=n(10790);const a=(0,s.__)("Pick an ad format","jetpack");function l({value:e,onChange:t}){return(0,i.jsx)(r.Dropdown,{placement:"bottom-start",renderToggle:({onToggle:e,isOpen:t})=>(0,i.jsx)(r.ToolbarGroup,{controls:[{icon:(0,i.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,i.jsx)(r.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(r.Path,{d:"M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"})]}),title:a,onClick:e,extraProps:{"aria-expanded":t},className:"wp-block-jetpack-wordads__format-picker-icon"}]}),renderContent:({onClose:n})=>(0,i.jsx)(r.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker",children:o.H.map(({tag:s,name:o,icon:a})=>(0,i.jsx)(r.MenuItem,{className:s===e?"is-active":void 0,icon:a,isSelected:s===e,onClick:()=>{t(s),n()},role:"menuitemcheckbox",children:o},s))})})}},67858(e,t,n){"use strict";n.d(t,{m:()=>c});var r=n(1455),s=n.n(r),o=n(29491),i=n(52619),a=(n(87687),n(79366),n(75181),n(14435),n(59740),n(21929),n(80076),n(15946),n(34180),n(56414),n(51521),n(12088),n(16521),n(73391)),l=(n(24920),n(10790));function c(e){if(!a)return!1;const t=a.beta||[],n=e.replace(/jetpack\//,"");return t.includes(e)||t.includes(n)}s().use((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const n=new URL(e.url,location.href);if(n.protocol!==location.protocol||n.hostname!==location.hostname||n.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-wp-api-fetch-from-editor"]="true",t(e)}),(0,i.addFilter)("blocks.registerBlockType","jetpack/label-beta-blocks-title",function(e,t){if(!c(t))return e;const{title:n,keywords:r}=e,s="(beta)",o="beta",i={...e};return n&&(i.title=n.toLowerCase().endsWith(s)?n:`${e.title} ${s}`),Array.isArray(r)&&(i.keywords=r.includes(o)?r:[...r,o]),i});const u=(0,o.createHigherOrderComponent)(e=>t=>{if(t?.clientRootId)return(0,l.jsx)(e,{...t});const{name:n}=t;return c(n)?(0,l.jsx)(e,{...t,className:"is-beta-extension"}):(0,l.jsx)(e,{...t})},"withBetaClassName");(0,i.addFilter)("editor.BlockListBlock","jetpack/label-beta-extensions",u)},24430(e,t,n){"use strict";var r=n(62410),s=n(74997),o=n(27723);const __=o.__,i={name:"descript",title:"Descript",icon:r.QB,keywords:[__("descript","jetpack")],description:__("Embed a Descript Item.","jetpack"),patterns:[/^https:\/\/share.descript.com\/(view|embed)\/\w+/i],attributes:{providerNameSlug:"descript",responsive:!0}};(0,s.registerBlockVariation)("core/embed",i)},30710(e,t,n){"use strict";var r=n(62410),s=n(52619),o=n(27723);const __=o.__,_x=o._x,i={name:"facebook",title:__("Facebook Embed","jetpack"),icon:{src:r.ik},keywords:[_x("social","block search term","jetpack")],description:__("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};(0,s.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",function(e,t){if("core/embed"!==t||!e.variations)return e;const n=e.variations.filter(e=>e.name!==i.name);return e.variations=[...n,i],e})},80076(e,t,n){"use strict";n(30710),n(65052),n(43887),n(60068),n(24430),n(3348)},65052(e,t,n){"use strict";var r=n(62410),s=n(52619),o=n(27723),i=n(21604);const __=o.__,_x=o._x,a={name:"instagram",title:__("Instagram Embed","jetpack"),icon:{src:r.oW},keywords:[_x("image","block search term","jetpack"),_x("social","block search term","jetpack")],description:__("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};(0,s.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",function(e,t){if("core/embed"!==t||!e.variations||!(0,i.A)())return e;const n=e.variations.filter(e=>e.name!==a.name);return e.variations=[...n,a],e})},43887(e,t,n){"use strict";var r=n(62410),s=n(74997),o=n(27723);const __=o.__,i={name:"loom",title:"Loom",icon:r.T3,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,s.registerBlockVariation)("core/embed",i)},60068(e,t,n){"use strict";var r=n(62410),s=n(74997),o=n(27723);const __=o.__,i={name:"smartframe",title:"SmartFrame",icon:r.M4,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,s.registerBlockVariation)("core/embed",i)},3348(e,t,n){"use strict";var r=n(94715),s=n(74997),o=n(29491),i=n(47143),a=n(52619),l=n(27723),c=n(74628),u=n(17900),d=n(47960),p=n(10790);const __=l.__,h=(0,o.createHigherOrderComponent)(e=>t=>{const{name:n,attributes:o,isSelected:a}=t;if("core/embed"!==n)return(0,p.jsx)(e,{...t});if(!(o?.url?.match(/^https?:\/\/(?:video\.wordpress\.com\/[ve]\/|videopress\.com\/[ve]\/)[a-zA-Z\d]{8}/)||"videopress"===o?.providerNameSlug))return(0,p.jsx)(e,{...t});const{replaceBlock:l}=(0,i.dispatch)("core/block-editor");return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(e,{...t}),a&&(0,p.jsx)(r.InspectorControls,{children:(0,p.jsxs)("div",{className:"wp-block-videopress-video-transform",style:{padding:"16px"},children:[(0,p.jsx)("div",{className:"components-notice is-info",children:(0,p.jsx)("div",{className:"components-notice__content",children:__("You can transform this post's video blocks to the new VideoPress block to take advantage of new features.","jetpack")})}),(0,p.jsx)("div",{style:{marginTop:"8px"},children:(0,p.jsx)("button",{className:"components-button is-primary",onClick:()=>{const e=o.url,n=o.guid||(0,d.QW)(e),r=(0,s.createBlock)("videopress/video",{src:e,id:o.id||null,guid:n,title:o.title||"",caption:o.caption||"",isVideoPressExample:!1,autoplay:!1,controls:!0,muted:!1,playsinline:!0,preload:"metadata",useAverageColor:!0,poster:o.poster||"",loop:!1,videoPressTracks:[],className:o.className||"",align:o.align||"",rating:"",allowDownload:!1,privacySetting:c.NF.SITE_DEFAULT,url:(0,u.e)(n,{autoplay:!1,controls:!0,loop:!1,muted:!1,playsinline:!0,poster:o.poster||"",preload:"metadata",useAverageColor:!0})});l(t.clientId,r)},children:__("Transform to VideoPress block","jetpack")})})]})})]})},"withVideoPressSettings");(0,a.addFilter)("editor.BlockEdit","jetpack/videopress-embed-settings",h)},26760(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(96865),s=n(56427),o=n(86087),i=n(27723),a=n(10790);const __=i.__;function l({clickHandler:e,showButtonText:t=!1}){const n=(0,o.useCallback)(()=>{e?.()},[e]),i=t?__("Generate","jetpack"):"";return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(s.ToolbarButton,{showTooltip:!0,onClick:n,label:__("Generate with AI","jetpack"),icon:r.cj,children:i})})}},24255(e,t,n){"use strict";n.d(t,{Mb:()=>s,TC:()=>o,tF:()=>r});const r="site-logo-block-extension",s="block-editor",o="ai-assistant-site-logo-support"},15946(e,t,n){"use strict";var r=n(96865),s=n(94715),o=n(74997),i=n(29491),a=n(47143),l=n(86087),c=n(52619),u=n(48499),d=n(26760),p=n(24255),h=n(10790);const m=(0,i.createHigherOrderComponent)(e=>t=>{const[n,o]=(0,l.useState)(!1),{setLogo:i}=(()=>{const e=(0,a.useDispatch)("core").editEntityRecord,t=(0,l.useCallback)(t=>{e("root","site",void 0,{site_logo:t})},[e]),n=(0,l.useCallback)(t=>{e("root","site",void 0,{site_icon:t})},[e]);return{setLogo:(0,l.useCallback)((e,r)=>{t(e),r&&n(e)},[t,n])}})(),c=t?.attributes?.shouldSyncIcon||!1,u=(0,l.useCallback)(()=>{o(!0)},[]),m=(0,l.useCallback)(()=>{o(!1)},[]),g=(0,l.useCallback)(e=>{e&&i(e,c)},[i,c]);(0,l.useEffect)(()=>()=>{m()},[m]);const f=(()=>{const e=(0,a.useSelect)(e=>e("core").getEntityRecord("root","site"),[]);return{ID:parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId),URL:e?.url,domain:window?.Jetpack_Editor_Initial_State?.siteFragment,name:e?.title,description:e?.description,siteLogo:e?.site_logo||0}})();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(e,{...t}),(0,h.jsx)(s.BlockControls,{group:"block",children:(0,h.jsx)(d.A,{showButtonText:!f?.siteLogo,clickHandler:u})}),(0,h.jsx)(r.Tg,{isOpen:n,onClose:m,onApplyLogo:g,context:p.Mb,placement:p.tF,siteDetails:f})]})},"SiteLogoEditWithAiComponents");function g(e){if("core/site-logo"!==e)return!1;if(!(0,o.getBlockType)("jetpack/ai-assistant"))return!1;if(!(0,u.C)(p.TC))return!1;return!((0,a.select)("core/edit-post")?.getHiddenBlockTypes?.()??[]).includes("jetpack/ai-assistant")}(0,c.addFilter)("blocks.registerBlockType","jetpack/site-logo-with-ai-support",function(e,t){return g(t)?{...e,edit:m(e.edit)}:e},100)},34180(e,t,n){"use strict";var r=n(74997),s=n(52619),o=n(94250);const i={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"jetpack_widget_social_icons"===e,transform:({instance:e})=>{let t=[];return e.raw.icons.forEach(e=>{const n=new URL(e.url.includes(":")?e.url:"https://"+e.url),s=n.hostname?n.hostname:n.protocol,i=o.A.find(e=>s.includes(e.url)||e.url.includes(s)),a=(0,r.createBlock)("core/social-link",{service:i?i.name:"chain",url:e.url});t=[...t,a]}),(0,r.createBlock)("core/social-links",{},t)}}]};(0,s.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",function(e,t){return"core/social-links"!==t||(e.transforms=i),e})},94250(e,t,n){"use strict";n.d(t,{A:()=>r});const r=[{name:"wordpress",url:["wordpress."]},{name:"fivehundredpx",url:["500px.com"]},{name:"amazon",url:["amazon."]},{name:"bandcamp",url:["bandcamp.com"]},{name:"behance",url:["behance.net"]},{name:"codepen",url:["codepen.io"]},{name:"deviantart",url:["deviantart.com"]},{name:"dribbble",url:["dribbble.com"]},{name:"dropbox",url:["dropbox.com"]},{name:"etsy",url:["etsy.com"]},{name:"facebook",url:["facebook.com"]},{name:"flickr",url:["flickr.com"]},{name:"foursquare",url:["foursquare.com"]},{name:"goodreads",url:["goodreads.com"]},{name:"google",url:["google."]},{name:"github",url:["github.com"]},{name:"instagram",url:["instagram.com"]},{name:"lastfm",url:["last.fm"]},{name:"linkedin",url:["linkedin.com"]},{name:"mail",url:["mailto:"]},{name:"linkedin",url:["linkedin.com"]},{name:"mastodon",url:["mastodon.social"]},{name:"meetup",url:["meetup.com"]},{name:"medium",url:["medium.com"]},{name:"patreon",url:["patreon.com"]},{name:"pinterest",url:["pinterest."]},{name:"reddit",url:["reddit.com"]},{name:"snapchat",url:["snapchat.com"]},{name:"soundcloud",url:["soundcloud.com"]},{name:"spotify",url:["spotify.com"]},{name:"telegram",url:["telegram.me","t.me"]},{name:"tiktok",url:["tiktok.com"]},{name:"tumblr",url:["tumblr.com"]},{name:"twitch",url:["twitch.tv"]},{name:"twitter",url:["twitter.com"]},{name:"vimeo",url:["vimeo.com"]},{name:"vk",url:["vk.com"]},{name:"yelp",url:["yelp.com"]},{name:"youtube",url:["youtube.com"]}]},95104(e,t,n){"use strict";n.d(t,{b:()=>i,j:()=>o});var r=n(86087),s=n(10790);const o=(0,r.createContext)(),i=({onBannerVisibilityChange:e,hasParentBanner:t,children:n})=>(0,s.jsx)(o.Provider,{value:{onBannerVisibilityChange:e,hasParentBanner:t},children:n})},56414(e,t,n){"use strict";var r=n(85985),s=n(98490),o=n.n(s),i=n(52619),a=n(27723),l=n(6650),c=n(26356),u=n(19785),d=n(3120);n(22734);const __=a.__,p=[];(0,i.addFilter)("blocks.registerBlockType","jetpack/paid-block",(e,t)=>((0,r.W4)(t)&&(p.includes(t)||p.push(t),e.keywords=[...new Set([...e.keywords,"premium",__("premium","jetpack")])],(0,r.sH)(t)||(e.icon=(0,u.A)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0}),"core/cover"!==t&&(e.supports={...e.supports,__experimentalExposeControlsToChildren:!0})),e)),(0,i.addFilter)("blocks.registerBlockType","jetpack/paid-block-with-upgrade-banner",d.e),(0,i.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",l.A),(0,i.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",c.A),o()(function(){(0,r.Dk)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")})},6650(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(85985),s=n(94715),o=n(29491),i=n(86087),a=n(333),l=n(95104),c=n(10790);const u=(0,o.createHigherOrderComponent)(e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),o=(0,r.GT)(n);if(!o?.mediaPlaceholder||!(0,r.W4)(n))return(0,c.jsx)(e,{...t});const{fileType:u}=o,{onError:d}=t,{onBannerVisibilityChange:p}=(0,i.useContext)(l.j),h=(0,i.useCallback)(e=>p(e?.length&&(0,a.wc)(e[0],u)),[u,p]),m=(0,i.useCallback)(e=>{const t=e?.[0]?.props?.children;return(0,a.wc)(t,u)?h([t]):d(e)},[h,u,d]);return(0,c.jsx)("div",{className:"paid-block-media-placeholder",children:(0,c.jsx)(e,{...t,onFilesPreUpload:h,onError:m})})},"withMediaPlaceholderUpgradable")},26356(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(85985),s=n(94715),o=n(29491),i=n(86087),a=n(333),l=n(95104),c=n(10790);const u=(0,o.createHigherOrderComponent)(e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),o=(0,r.GT)(n),u=(0,i.useRef)(void 0);if(!o?.mediaReplaceFlow||!(0,r.W4)(n))return(0,c.jsx)(e,{...t});const{fileType:d}=o,{onBannerVisibilityChange:p}=(0,i.useContext)(l.j);return(0,c.jsx)(e,{...t,onFilesUpload:e=>{u.current=e?.length?e[0]:null,p(e?.length&&(0,a.wc)(e[0],d))},createNotice:(e,n,r)=>{if((0,a.wc)(u.current,d))return u.current=null,null;t.createNotice(e,n,r)}})},"withMediaReplaceFlowUpgradable")},46367(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=({cx:e=0,cy:t=0,r:n=4,fill:o="#e34c84",stroke:i="#ffffff",strokeWidth:a="2"})=>(0,s.jsx)(r.SVG,{className:"jetpack-paid-block-symbol",children:(0,s.jsx)(r.Circle,{cx:e,cy:t,r:n,fill:o,stroke:i,strokeWidth:a})});n.dn(o)},19785(e,t,n){"use strict";n.d(t,{A:()=>i});n(85985);var r=n(46367),s=n(10790);const o=e=>{const t=(0,s.jsx)(r.A,{},"paid-symbol");return e?.src?{...e,src:(0,s.jsxs)(s.Fragment,{children:[e.src,t]})}:(0,s.jsxs)(s.Fragment,{children:[e,t]})},i=o},26845(e,t,n){"use strict";n.d(t,{Ay:()=>d});var r=n(85985),s=n(82201),o=n(47143),i=n(27723),a=n(10790);const __=i.__,_x=i._x,l=__("Premium Block","jetpack"),/** translators: %s: name of the plan. */
c=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),_x("Upgrade","Call to action to buy a new plan","jetpack")),d=({onRedirect:e,align:t,className:n,title:d=l,description:p=null,buttonText:h=u,visible:m=!0,requiredPlan:g,context:f})=>{const[b,v,y]=(0,r._6)(g,e),k=(0,o.useSelect)(e=>{if(p)return p;const t=e("wordpress-com/plans"),n=t&&t.getPlan(g);return n?(0,i.sprintf)(c,n.product_name_short):null},[p,g]);return k&&(0,a.jsx)(s.cb,{align:t,buttonText:h,checkoutUrl:b,className:n,context:f,description:k,goToCheckoutPage:v,isRedirecting:y,title:d,visible:m})}},23887(e,t,n){"use strict";n.d(t,{W:()=>r,r:()=>s});const r=({plan:e,blockName:t,context:n,tracks:r})=>{r.recordEvent("jetpack_editor_block_upgrade_click",{plan:e,block:t,context:n})},s=({plan:e,blockName:t,context:n,tracks:r})=>{r.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:e,block:t,context:n})}},3120(e,t,n){"use strict";n.d(t,{e:()=>h});var r=n(85985),s=n(94715),o=n(29491),i=n(47143),a=n(86087),l=n(95104),c=n(26845),u=n(23887),d=n(10790);const p=(0,o.createHigherOrderComponent)(e=>t=>{const{name:n,clientId:o,isSelected:p,attributes:h,setAttributes:m}=t||{},g=(0,r.tu)(n);if(!g)return(0,d.jsx)(e,{...t});const f=(0,r.sH)(n),b=(0,r.GT)(n),[v,y]=(0,a.useState)(!f),[k,x]=(0,a.useState)(!1),_="editor-canvas",w=(0,i.useSelect)(e=>e("core/block-editor").hasSelectedInnerBlock(o,!0),[o]),{hasParentBanner:j}=(0,a.useContext)(l.j)||{},C=(p||w)&&v&&!j,{tracks:A}=(0,r.st)(),S=(0,a.useMemo)(()=>({plan:g,blockName:n,context:_,tracks:A}),[g,n,A]);(0,a.useEffect)(()=>{C&&x(!0)},[C,x]),(0,a.useEffect)(()=>{!k&&C&&(0,u.r)(S)},[k,S,C]),(0,a.useEffect)(()=>y(!f),[h,y,f]),(0,a.useEffect)(()=>{m({shouldDisplayFrontendBanner:!j})},[m,j]);const E=(0,s.useBlockProps)();return(0,d.jsx)(l.b,{onBannerVisibilityChange:y,hasParentBanner:C,children:(0,d.jsxs)("div",{ref:E.ref,style:{maxWidth:"unset"},children:[(0,d.jsx)(c.Ay,{className:`is-${n.replace(/\//,"-")}-paid-block`,title:null,align:h?.align,visible:C,description:b?.description,requiredPlan:g,context:_,onRedirect:()=>(0,u.W)(S)}),(0,d.jsx)(e,{...t})]})})},"withUpgradeBanner");function h(e,t){return(0,r.tu)(t)?{...e,edit:p(e.edit)}:e}},4167(e,t,n){"use strict";n.d(t,{G:()=>s});var r=n(27723);const __=r.__,s=["seo-title","seo-meta-description","images-alt-text"];__("SEO title","jetpack"),__("SEO description","jetpack"),__("Image alt text","jetpack")},6363(e,t,n){"use strict";function r(e){return{type:"SET_BUSY",isBusy:e}}function s(e){return{type:"SET_TITLE_BUSY",isBusy:e}}function o(e){return{type:"SET_DESCRIPTION_BUSY",isBusy:e}}function i(e){return{type:"SET_IS_TOGGLING_AUTO_ENHANCE",isToggling:e}}function a(e){return{type:"SET_IS_AUTO_ENHANCE_ENABLED",isEnabled:e}}function l(e,t){return{type:"SET_IMAGE_BUSY",clientId:e,isBusy:t}}function c(e,t){return{type:"SET_IMAGE_FAILED",clientId:e,failed:t}}function u(e,t){return{type:"SET_FEATURE_ENABLED",feature:e,enabled:t}}n.r(t),n.d(t,{setBusy:()=>r,setDescriptionBusy:()=>o,setFeatureEnabled:()=>u,setImageBusy:()=>l,setImageFailed:()=>c,setIsAutoEnhanceEnabled:()=>a,setIsTogglingAutoEnhance:()=>i,setTitleBusy:()=>s})},16204(e,t,n){"use strict";n.d(t,{M:()=>d});var r=n(97999),s=n(85985),o=n(47143),i=n(4167),a=n(6363),l=n(49824),c=n(16886);let u=!1;try{if(!(0,r.isSimpleSite)()){const e=(0,o.select)(s.M_).getJetpackModules()["seo-tools"],t=e&&"ai_seo_enhancer_enabled"in e.options;u=t&&e.options?.ai_seo_enhancer_enabled?.current_value}}catch{u=!1}const d=(0,o.createReduxStore)("jetpack/seo-enhancer",{reducer:l.A,selectors:c,actions:a,initialState:function(){const e=i.G.reduce((e,t)=>(e[t]=!0,e),{});try{const t=localStorage.getItem("jetpack-seo-enhancer-features"),n=t?JSON.parse(t):{};for(const t of i.G)e[t]=n[t]??!0}catch{}return{isBusy:!1,isTogglingAutoEnhance:!1,isAutoEnhanceEnabled:u,busyImages:{},failedImages:{},features:e}}()});(0,o.register)(d)},49824(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){let n;switch(t.type){case"SET_BUSY":return{...e,isBusy:t.isBusy};case"SET_TITLE_BUSY":return{...e,isTitleBusy:t.isBusy};case"SET_DESCRIPTION_BUSY":return{...e,isDescriptionBusy:t.isBusy};case"SET_IS_TOGGLING_AUTO_ENHANCE":return{...e,isTogglingAutoEnhance:t.isToggling};case"SET_IS_AUTO_ENHANCE_ENABLED":return{...e,isAutoEnhanceEnabled:t.isEnabled};case"SET_IMAGE_BUSY":return{...e,busyImages:{...e.busyImages,[t.clientId]:t.isBusy}};case"SET_IMAGE_FAILED":return{...e,failedImages:{...e.failedImages,[t.clientId]:t.failed}};case"SET_FEATURE_ENABLED":return n={...e,features:{...e.features,[t.feature]:t.enabled}},r=n.features,localStorage.setItem("jetpack-seo-enhancer-features",JSON.stringify(r)),n;default:return e}var r}},16886(e,t,n){"use strict";n.r(t),n.d(t,{getEnabledFeatures:()=>p,hasImageFailed:()=>d,isAnyImageBusy:()=>u,isAutoEnhanceEnabled:()=>l,isBusy:()=>s,isDescriptionBusy:()=>i,isImageAltTextFeatureEnabled:()=>h,isImageBusy:()=>c,isTitleBusy:()=>o,isTogglingAutoEnhance:()=>a});var r=n(47143);function s(e){return e.isBusy}function o(e){return e.isTitleBusy}function i(e){return e.isDescriptionBusy}function a(e){return e.isTogglingAutoEnhance}function l(e){return e.isAutoEnhanceEnabled}function c(e,t){return e.busyImages[t]??!1}function u(e){return Object.values(e.busyImages).some(e=>e)}function d(e,t){return e.failedImages[t]??!1}const p=(0,r.createSelector)(e=>Object.keys(e.features).filter(t=>e.features[t]),e=>[e.features]);function h(e){return p(e).includes("images-alt-text")}},93471(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(11876),s=n(85985),o=n(56427),i=n(86087),a=n(27723),l=n(13022),c=(n(72613),n(10790));const __=a.__,u=({usage:e})=>{if(null==e)return null;const t=100-100*Math.max(Math.min(e,1),0),n={width:`${t}%`};return(0,c.jsx)("div",{className:"ai-assistant-usage-bar-wrapper",children:(0,c.jsx)("div",{className:(0,l.A)("ai-assistant-usage-bar-usage",{warning:t<60&&t>20,danger:t<=20}),style:n})})};const d=function({isOverLimit:e,planType:t,requestsCount:n,requestsLimit:l,nextResetDate:d=null,loading:p=!1}){const h=e||n>=l;let m=null;const g=Array(),f=Math.max(0,l-n);h&&t===s._X&&g.push(__("You've reached your free requests limit.","jetpack")),h&&t===s.ds&&g.push(__("You've reached your plan requests limit.","jetpack")),d&&t===s.ds&&(m=(0,i.createInterpolateElement)((0,a.sprintf)(
// translators: %1$d: number of days until the next usage count reset, %2$s: date of next reset
__("Requests will reset to <strong>%1$d</strong> on %2$s.","jetpack"),l,d),{strong:(0,c.jsx)("strong",{})}));const b=n/l,v=(0,c.jsxs)(c.Fragment,{children:[t===s.Ti&&(0,c.jsx)("p",{children:__("Unlimited requests.","jetpack")}),(t===s._X||t===s.ds)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{className:"jetpack-ai-usage-panel__available-requests",children:f}),(0,c.jsx)(u,{usage:b})]})]}),y=(0,c.jsx)(r.A,{height:100,className:"jetpack-ai-usage-panel__loading-placeholder"}),k=(0,c.jsxs)(c.Fragment,{children:[!p&&g.length?g.join(" ").concat(" "):null,!p&&m]});return(0,c.jsxs)(o.BaseControl,{__nextHasNoMarginBottom:!0,help:k,children:[(0,c.jsx)(o.BaseControl.VisualLabel,{children:__("Available Requests","jetpack")}),!p&&v,p&&y]})}},27970(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(96865),s=n(3924),o=n(97999),i=n(85985),a=n(56427),l=n(38443),c=n(86087),u=n(27723),d=n(75956),p=n(93471),h=(n(90698),n(10790));const __=u.__;function m({isOverLimit:e,requestsCount:t,requestsLimit:n,nextStart:r,planType:s,loading:o,canUpgrade:c,showContactUsCallToAction:d,nextLimit:m,contactUsURL:g,handleContactUsClick:f,checkoutUrl:b,handleUpgradeClick:v}){const y=((e,t)=>e===i._X?__("Upgrade","jetpack"):t?(0,u.sprintf)(
// translators: %1$d: an integer, the number of requests to upgrade to on the next tier
__("Get %1$d requests","jetpack"),t):__("Get more requests","jetpack"))(s,m),k=(x=r)?(0,l.gmdateI18n)("F j",x):null;var x;return(0,h.jsx)("div",{className:"jetpack-ai-usage-panel",children:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(p.A,{isOverLimit:e,requestsCount:t,requestsLimit:n,nextResetDate:k,planType:s,loading:o}),!o&&(s===i._X||s===i.ds)&&c&&(0,h.jsxs)("div",{className:"jetpack-ai-usage-panel-upgrade-button",children:[d&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("p",{children:__("Need more requests?","jetpack")}),(0,h.jsx)(a.Button,{target:"_blank",variant:"primary",label:__("Contact us for more requests","jetpack"),href:g,onClick:f,children:(0,h.jsx)("span",{children:__("Contact Us","jetpack")})})]}),!d&&(0,h.jsx)(a.Button,{target:"_blank",variant:"primary",label:__("Upgrade your Jetpack AI plan","jetpack"),href:b,onClick:v,children:(0,h.jsx)("span",{children:y})})]})]})})}function g({placement:e=null}){const{checkoutUrl:t}=(0,r.ON)(),{contactUsURL:n}=(()=>{const e=(0,s.A)("jetpack-ai-tiers-more-requests-contact"),{autosaveAndRedirect:t,isRedirecting:n}=(0,i.ZR)(e);return{contactUsURL:e,autosaveAndRedirectContactUs:t,isRedirectingContactUs:n}})(),{tracks:a}=(0,d.A)(),l=(0,i.CP)(),{requestsCount:u,requestsLimit:p,isOverLimit:g,usagePeriod:f,currentTier:b,nextTier:v,loading:y}=(0,r.yM)(),k=(0,i.Bd)(b),x=(0,c.useCallback)(()=>{a.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:u,...e?{placement:e}:{}})},[a,b,u,e]),_=(0,c.useCallback)(()=>{a.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:u,...e?{placement:e}:{}})},[a,b,u,e]),w=(0,o.isWpcomPlatformSite)()&&k===i.ds&&!v;return(0,h.jsx)(m,{isOverLimit:g,requestsCount:u,requestsLimit:p,nextStart:f?.nextStart,nextLimit:v?.limit,planType:k,loading:y,canUpgrade:l,showContactUsCallToAction:w,contactUsURL:n,handleContactUsClick:_,checkoutUrl:t,handleUpgradeClick:x})}},56199(e,t,n){"use strict";n.d(t,{k:()=>r});const r="block_settings_sidebar"},75181(e,t,n){"use strict";var r=n(62410),s=n(74997),o=n(27723),i=n(10790);const __=o.__;(0,s.setCategories)([...(0,s.getCategories)().filter(({slug:e})=>"contact-form"!==e),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,i.jsx)(r.ux,{})}]),(0,s.setCategories)([...(0,s.getCategories)().filter(({slug:e})=>"monetize"!==e),{slug:"monetize",title:__("Monetize","jetpack"),icon:(0,i.jsx)(r.ux,{})}]),(0,s.setCategories)([...(0,s.getCategories)().filter(({slug:e})=>"grow"!==e),{slug:"grow",title:__("Grow","jetpack"),icon:(0,i.jsx)(r.ux,{})}])},34377(e,t,n){"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function s(e,t,s){let o;try{o=new URL("editor-assets",n.p)}catch{return}const i=o.href,{currentDoc:a}=r(s),l=a.getElementsByTagName("head")[0];e.forEach(e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(a.getElementById(e.id))return;const t=a.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${i}/${n}-${e.version}.${r}`,l.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(a.getElementById(e.id))return s();const o=a.createElement("script");o.id=e.id,o.type="text/javascript",o.src=`${i}/${n}-${e.version}.${r}`,o.onload=s,l.appendChild(o)}})}function o(e,t){return new Promise(n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()})}n.d(t,{Cu:()=>o,a$:()=>s,sG:()=>r})},90907(e,t,n){"use strict";n.d(t,{D:()=>o});var r=n(36536),s=n.n(r);function o(e,t){const n=function(e,t){for(const n of new(s())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=e.find(e=>e.name===t);if(r)return r}return e.find(e=>e.isDefault)}(e,t);return n?n.name:null}},98329(e,t,n){"use strict";n.d(t,{A:()=>s});const r=/^#?[A-Fa-f0-9]{6}$/;function s(e){return r.test(e)}},11998(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(85985),s=n(94715),o=n(56427),i=n(27723),a=n(79654),l=n(13022),c=(n(42036),n(10790));const __=i.__;function u({blockName:e,buttonLabel:t,className:n,href:i,icon:u,onClick:d,readMoreUrl:p,subtitle:h,title:m}){const{autosaveAndRedirect:g}=(0,r.ZR)(i);return(0,c.jsx)(s.Warning,{actions:i&&[(0,c.jsx)(o.Button,{href:i,onClick:t=>{t.preventDefault(),d(e),g(t)},target:"_top",variant:"secondary",className:"jetpack-stripe-nudge__link",children:t},"nudge")],className:(0,l.A)(n,"jetpack-block-nudge wp-block"),children:(0,c.jsxs)("span",{className:"jetpack-block-nudge__info",children:[u,(0,c.jsxs)("span",{className:"jetpack-block-nudge__text-container",children:[(0,c.jsx)("span",{className:"jetpack-block-nudge__title",children:m}),h&&(0,c.jsxs)("span",{className:"jetpack-block-nudge__message",children:[h,p&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("br",{}),(0,c.jsx)(a.N,{openInNewTab:!0,href:p,children:__("Learn more about the block and fees","jetpack")})]})]})]})]})})}},5873(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(94715),s=n(74997),o=n(56427),i=n(47143),a=n(86087),l=n(27723),c=n(48558),u=n(13022),d=n(66087),p=(n(93571),n(10790));const __=l.__,h=({attributes:e,styleOption:t,viewportWidth:n,blockName:o})=>{const i=(0,s.getBlockType)(o);return(0,p.jsx)(r.BlockPreview,{viewportWidth:n,blocks:(a=i.example?(0,s.getBlockFromExample)(o,{attributes:{...i.example.attributes,style:t.value},innerBlocks:i.example.innerBlocks}):(0,s.createBlock)(o,e),{...a,attributes:{...a.attributes,__isBlockPreview:!0}})});var a},m=a.memo?(0,a.memo)(h,(e,t)=>(0,d.isEqual)(e,t)):h;function g({attributes:e,clientId:t,styleOptions:n,onSelectStyle:s,activeStyle:a,viewportWidth:l,title:d}){const h=(0,i.useSelect)(e=>{const{getBlock:n}=e("core/block-editor");return n(t)});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r.BlockControls,{children:(0,p.jsx)(o.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:n.map(e=>({title:e.label,isActive:e.value===a,onClick:()=>s({style:e.value})})),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})}),(0,p.jsx)(r.InspectorControls,{children:(0,p.jsx)(o.PanelBody,{title:d||__("Styles","jetpack"),children:(0,p.jsx)("div",{className:"block-editor-block-styles jetpack-block-styles-selector",children:n.map(t=>{const n={...e,style:t.value};return(0,p.jsxs)("div",{className:(0,u.A)("block-editor-block-styles__item",{"is-active":t.value===a}),onClick:()=>{s({style:t.value})},onKeyDown:e=>{c.ENTER!==e.keyCode&&c.SPACE!==e.keyCode||(e.preventDefault(),s({style:t.value}))},role:"button",tabIndex:"0","aria-label":t.label,children:[(0,p.jsx)("div",{className:"block-editor-block-styles__item-preview",children:t.preview?t.preview:h&&(0,p.jsx)(m,{blockName:h.name,styleOption:t,attributes:n,viewportWidth:l})}),(0,p.jsx)("div",{className:"block-editor-block-styles__item-label",children:t.label})]},t.value)})})})})]})}},2274(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(39384),s=n(85985),o=n(82201),i=n(27723),a=n(51609),l=(n(94378),n(10790));const __=i.__,c=()=>{const e=window?.location?.pathname.replace(/.*?wp-admin\//,""),t=window?.location?.search;return`${e}${t}`},u=({block:e,explanation:t=null})=>{const[n,i]=(0,a.useState)(!1),[u,d]=(0,a.useState)(!1),{handleConnectUser:p}=(0,r.useConnection)({from:"editor",redirectUri:c(),autoTrigger:!1,skipPricingPage:!0}),{autosave:h}=(0,s.ZR)(),{tracks:m}=(0,s.st)();return(0,a.useEffect)(()=>{n&&p()},[n,p]),(0,l.jsxs)("div",{children:[(0,l.jsx)(o.cb,{buttonText:__("Connect Jetpack","jetpack"),className:"jetpack-connect-banner-nudge",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:t=>{d(!0),h(t).then(()=>{m.recordEvent("jetpack_editor_connect_banner_click",{block:e}),i(!0),d(!1)})},checkoutUrl:"#",isRedirecting:n||u}),(0,l.jsx)("div",{className:"jetpack-connect-banner",children:t&&(0,l.jsx)("div",{className:"jetpack-connect-banner__explanation",children:(0,l.jsx)("p",{children:t})})})]})}},9522(e,t,n){"use strict";n.d(t,{G:()=>a});var r=n(50723),s=n(11876),o=n(56427),i=n(10790);const a=()=>(0,i.jsx)(r.Ay,{children:(0,i.jsxs)(o.Placeholder,{children:[(0,i.jsxs)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"},children:[(0,i.jsx)(o.FlexItem,{children:(0,i.jsx)(s.A,{width:"100%",height:30})}),(0,i.jsx)(o.FlexItem,{children:(0,i.jsx)(s.A,{width:"100%",height:90})})]}),(0,i.jsxs)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"},children:[(0,i.jsx)(o.FlexItem,{children:(0,i.jsx)(s.A,{width:"100%",height:30})}),(0,i.jsx)(o.FlexItem,{children:(0,i.jsx)(s.A,{width:"100%",height:90})})]}),(0,i.jsxs)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"},children:[(0,i.jsx)(o.FlexItem,{children:(0,i.jsx)(s.A,{width:"100%",height:30})}),(0,i.jsx)(o.FlexItem,{children:(0,i.jsx)(s.A,{width:"100%",height:90})})]})]})})},29726(e,t,n){"use strict";n.d(t,{_$:()=>r,h5:()=>s});const r="payment-plan",s="subscription"},1990(e,t,n){"use strict";n.d(t,{W:()=>i});var r=n(27723),s=n(29726);const __=r.__,o={"add a new product":{[s._$]:__("Add a new payment plan","jetpack"),[s.h5]:__("Add a new subscription","jetpack")},"product not found":{[s._$]:__("Payment plan not found","jetpack"),[s.h5]:__("Subscription not found","jetpack")},"select a product":{[s._$]:__("Select a payment plan","jetpack"),[s.h5]:__("Select a subscription","jetpack")},"default new product title":{[s._$]:__("Monthly Subscription","jetpack"),[s.h5]:__("Monthly Subscription","jetpack")},"manage your products":{[s._$]:__("Manage your payment plans.","jetpack"),[s.h5]:__("Manage your subscriptions.","jetpack")},"saving product":{[s._$]:__("Saving payment plan…","jetpack"),[s.h5]:__("Saving subscription…","jetpack")},"add product":{[s._$]:__("Add payment plan","jetpack"),[s.h5]:__("Add subscription","jetpack")},"product requires a name":{[s._$]:__("Payment plan requires a name","jetpack"),[s.h5]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[s._$]:__("Payment plan requires a valid price","jetpack"),[s.h5]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[s._$]:__("Successfully created payment plan","jetpack"),[s.h5]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[s._$]:__("There was an error when adding the payment plan.","jetpack"),[s.h5]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[s._$]:__("Invalid payment plan configured for this block.","jetpack"),[s.h5]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[s._$]:__("The button will be hidden from your visitors until you select a valid payment plan.","jetpack"),[s.h5]:__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")},"mark this product as a donation":{[s._$]:__("Mark this payment plan as a donation","jetpack"),[s.h5]:__("Mark this subscription as a donation","jetpack")}};function i(e,t=s._$){return o?.[e]?.[t]||null}__("Monthly Subscription","jetpack"),__("Yearly Subscription","jetpack"),__("Subscription","jetpack")},53796(e,t,n){"use strict";n.d(t,{V:()=>p});var r=n(3924),s=n(97999),o=n(85985),i=n(47143),a=n(27723),l=n(71218),c=n(16521),u=n(11998),d=(n(51082),n(10790));const __=a.__,p=({blockName:e})=>{const t=(0,i.select)(c.M).getConnectUrl(),{tracks:n}=(0,o.st)();if(!t)return null;let a;const p=(0,s.isWpcomPlatformSite)();switch(e){case"payment-buttons":a=p?(0,r.A)("wpcom-support-wordpress-editor-blocks-payments-block"):(0,r.A)("jetpack-support-jetpack-blocks-payments-block");break;case"donations":a=p?(0,r.A)("wpcom-support-wordpress-editor-blocks-donations-block"):(0,r.A)("jetpack-support-jetpack-blocks-donations-block");break;case"premium-content":a=p?(0,r.A)("wpcom-support-wordpress-editor-blocks-premium-content-block"):(0,r.A)("jetpack-support-jetpack-blocks-premium-content-block");break;default:a=p?(0,r.A)("wpcom-support-payments-button-block"):(0,r.A)("jetpack-support-jetpack-blocks-payments-block")}return(0,d.jsx)(u.A,{className:"jetpack-stripe-nudge__banner",buttonLabel:__("Connect","jetpack"),icon:(0,d.jsx)(l.A,{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:t,readMoreUrl:a,onClick:()=>n.recordEvent("jetpack_editor_block_stripe_connect_click",{block:e}),title:__("Connect to Stripe to use this block on your site","jetpack"),subtitle:__("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})}},72730(e,t,n){"use strict";n.d(t,{C_:()=>l,VK:()=>s,Xj:()=>i,dv:()=>o,kF:()=>a});var r=n(3975);const s={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5};Object.keys(s).map(e=>{const{symbol:t}=(n=e,r.y[n]||{symbol:"$",decimal:".",grouping:",",precision:2});var n;var s;return{value:e,label:t===e?e:`${e} ${s=t,String(s||"").replace(/\.+$/,"")}`}});function o(e){return s[e]}function i(e){const t=o(e);return[10*t,30*t,200*t]}function a(e,t){return!isNaN(t)&&t>=o(e)}function l(e,t){if(!e)return null;if("number"==typeof e)return e;let n=e;return r.y[t].grouping&&(n=e.replace(new RegExp("\\"+r.y[t].grouping,"g"),"")),e=parseFloat(n.replace(new RegExp("\\"+r.y[t].decimal,"g"),".")),isNaN(e)?null:e}},74490(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),s=n(10790);const o=({label:e,onClick:t})=>(0,s.jsx)(r.ToolbarButton,{className:"components-toolbar__control",onClick:t,icon:"edit",title:e,showTooltip:!0});n.dn(o)},56539(e,t,n){"use strict";n.d(t,{A:()=>o});const r=new Map,s=e=>r.has(e),o={acquire:e=>{if(s(e))return null;const t=Math.random();return r.set(e,t),[e,t]},blockExecution:async(e,t=10)=>{for(;s(e);)await new Promise(e=>setTimeout(e,t))},clearAll:()=>r.clear(),isLocked:s,release:e=>{const[t,n]=e;return!(!s(t)||r.get(t)!==n)&&(r.delete(t),!0)}}},333(e,t,n){"use strict";n.d(t,{wc:()=>i});var r=n(85985),s=n(66087);function o(){return(0,r.$i)()?.allowedMimeTypes??[]}function i(e,t){if(!e||!t)return!1;if(!o())return!1;const n=(r=t)?(0,s.pickBy)(o(),e=>e.startsWith(`${r}/`)):{};var r;const i=(a=n)?Object.keys(a).map(e=>e.split("|")).flat():[];var a;if("string"==typeof e){const t=e.split(".").pop();return t&&i.includes(t)}return"object"==typeof e&&(e.type&&Object.values(n).includes(e.type))}},97969(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(74997);function s(...e){const t=(0,r.getCategories)();for(const n of e)if(t.some(({slug:e})=>e===n))return n;throw new Error(`Could not find a category from the provided list: ${e.join(",")}`)}},27574(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(93832);function s(e,t){if(!(0,r.isURL)(t))return null;let n=t;try{const s=(0,r.getQueryArg)(t,"state"),o=JSON.parse(atob(s));if(e)o.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);o.from_site_editor_post_id=e.get("postId"),o.from_site_editor_post_type=e.get("postType")}n=(0,r.addQueryArgs)(t,{state:btoa(JSON.stringify(o))})}catch(e){0}return n}},59340(e,t,n){"use strict";n.d(t,{AU:()=>o,O3:()=>s});var r=n(47143);const s="site",o=()=>(0,r.select)("core/edit-site")?s:(0,r.select)("core/edit-widgets")?"widget":(0,r.select)("core/customize-widgets")?"customizer":(0,r.select)("core/edit-navigation")?"navigation":(0,r.select)("core/edit-post")?"post":"unknown"},78218(e,t,n){"use strict";n.d(t,{y:()=>r});const r=(e,t)=>Object.entries(t).reduce((t,[n,r])=>{if(void 0===e[n])return t;const{type:s,validator:o,validValues:i,default:a}=e[n];return t[n]="boolean"===s?"false"!==r&&!!r:o?o(r)?r:a:i?i.includes(r)?r:a:r,t},{})},21604(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(85985);function s(){return(0,r.$i)()?.jetpack?.is_active??!1}},13087(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(85985);function s(){return(0,r.$i)()?.jetpack?.is_offline_mode??!1}},14435(e,t,n){"use strict";var r=n(97999),s=n(85985),o=n(1455),i=n.n(o),a=n(47143),l=n(27723);n(692);const __=l.__;function c(){const e=(0,s.GE)();return window?.location&&e?(0,r.isWpcomPlatformSite)()?`https://wordpress.com/plans/my-plan/${e}`:`${window.location.protocol}//${e.replace("::","/")}/wp-admin/admin.php?page=jetpack#/my-plan`:null}(async()=>{if(window?.location){if(new URLSearchParams(window.location.search).get("plan_upgraded")){let e=null;try{if((0,r.isSimpleSite)()){const t=await i()({path:`/sites/${parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0}`,apiNamespace:"rest/v1.1"});t?.plan&&(e=t.plan.product_name_short)}else{const t=await i()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}}finally{const t=c();(0,a.dispatch)("core/notices").createNotice("success",e?(0,l.sprintf)(/* translators: %s is the plan name, such as Jetpack Premium. */
__("Congratulations! Your site is now on the %s plan.","jetpack"),e):__("Congratulations! Your site is now on a paid plan.","jetpack"),{isDismissible:!0,...t&&{actions:[{url:c(),label:__("View my plan","jetpack")}]}})}}}})()},79366(e,t,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(n.p=window.Jetpack_Block_Assets_Base_Url)},59740(e,t,n){"use strict";var r=n(74997),s=n(47143),o=n(93832),i=n(30552);const{url:a,title:l,text:c,comment_content:u,comment_author:d}=(0,o.getQueryArgs)(window.location.href);a&&(async()=>{await(0,i.O)();const e=[];if(c&&c!==l){const t=`<a href="${a}">${l}</a>`;e.push((0,r.createBlock)("core/quote",{value:`<p>${c}</p>`,citation:t}))}u&&e.push((0,r.createBlock)("core/quote",{value:u,citation:d})),e.push((0,r.createBlock)("core/embed",{url:a,type:"wp-embed"})),(0,s.dispatch)("core/editor").resetEditorBlocks(e)})()},94375(e,t,n){"use strict";n.d(t,{A:()=>a,M:()=>l});var r=n(85985),s=n(74997),o=n(52619);const i="jetpack/";function a(e,t,n=[],a=!0){const l="string"==typeof e?e:e.name,c=l.startsWith(i),u=c?l.slice(8):l,{available:d,details:p,unavailableReason:h}=(0,r.FB)(u),m=(0,r.aq)(h,p),g=a||c?i:"";if(!d&&!m)return!1;const f=g+u,b=(0,s.registerBlockType)("object"==typeof e?e:f,t);return m&&(0,o.addFilter)("editor.BlockListBlock",`${f}-with-has-warning-is-interactive-class-names`,(0,r.BT)(f)),n.forEach(e=>(0,s.registerBlockType)(g+e.name,e.settings)),b}function l(e,t,n,s){return a(e,{...t,icon:(0,r.Cq)(e),attributes:e.attributes||{}},n,s)}},64882(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(94715),s=n(13022),o=n(10790);const i=(e,t,n,i,a,l={})=>{const{isSelected:c}=t,u=t.attributes[e];return l.className=(0,s.A)(l.className,`jetpack-${e}-block`,{"is-selected":c}),(0,o.jsxs)("div",{...l,children:[!c&&""!==u&&i(t),(c||""===u)&&(0,o.jsx)(r.PlainText,{value:u,placeholder:n,"aria-label":n,onChange:a})]})}},21929(e,t,n){"use strict";var r=n(47143),s=n(27723);n(692);const __=s.__;if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search);e.get("stripe_connect_success")?(0,r.dispatch)("core/notices").createNotice("success",__("Congrats! Your site is now connected to Stripe. You can now start accepting funds!","jetpack")):e.get("stripe_connect_cancelled")&&(0,r.dispatch)("core/notices").createNotice("error",__("You cancelled connecting your site to Stripe.","jetpack"))}},56145(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(1455),s=n.n(r);const o=()=>{};function i(e,t=o){return t(!0),new Promise((n,r)=>{s()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then(s=>{t(!1);const o=s.status?parseInt(s.status,10):null;o&&o>=400?r():n(s.url||e)},()=>{t(!1),r()})})}},26247(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(39384),s=n(97999);const o=()=>{const{isUserConnected:e}=(0,r.useConnection)();return(0,s.isSimpleSite)()||e}},30552(e,t,n){"use strict";n.d(t,{O:()=>s});var r=n(47143);function s(){return new Promise((e,t)=>{if(o())return void e();const n=(0,r.subscribe)(()=>{o()&&(clearTimeout(s),n(),e())}),s=setTimeout(()=>{n(),t(new Error("Timeout: Waiting for the editor to be ready has timed out."))},7e3)})}function o(){const e=(0,r.select)("core/editor"),t=(0,r.select)("core/block-editor");return!(!e||!t)&&(e.isCleanNewPost()||e.getCurrentPostId()||t.getBlocks().length>0)}},38062(e,t,n){"use strict";n.d(t,{D:()=>d});var r=n(56427),s=n(86087),o=n(27723),i=n(13022),a=(n(62653),n(10790));const __=o.__,l=[{value:"%",label:"%",default:100},{value:"px",label:"px",default:150},{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 d(e){return(0,a.jsx)(r.PanelBody,{title:__("Width settings","jetpack"),children:(0,a.jsx)(p,{showLabel:!1,...e})})}function p({align:e,width:t,onChange:n,showLabel:o=!0}){const[d,p]=(0,s.useState)("%");(0,s.useEffect)(()=>{void 0===t&&p("px")},[t]);const h="left"===e||"right"===e;return(0,a.jsxs)(r.BaseControl,{__nextHasNoMarginBottom:!0,children:[o&&(0,a.jsx)(r.BaseControl.VisualLabel,{children:__("Width","jetpack")}),(0,a.jsxs)("div",{className:(0,i.A)("jetpack-block-width-controls",{"is-aligned":h}),children:[!h&&(0,a.jsx)(r.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,"aria-label":__("Percentage width","jetpack"),isBlock:!0,value:t,onChange:function(e){const r=t===e?void 0:e;p("%"),n(r)},children:u.map(e=>(0,a.jsx)(r.__experimentalToggleGroupControlOption,{label:e,value:e},e))}),(0,a.jsx)(r.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isResetValueOnUnitChange:!0,max:"%"===d||t?.includes("%")?100:void 0,min:0,onChange:e=>n(e),onUnitChange:e=>p(e),units:h?c:l,value:t})]})]})}},23117(e,t,n){"use strict";n.d(t,{ax:()=>r,pF:()=>o,v8:()=>s,vh:()=>i});const r="jetpack/media-source",s="is-playing",o="is-error",i="is-paused"},12088(e,t,n){"use strict";var r=n(47143),s=n(23117),o=n(11267);if(void 0!==r.createReduxStore){const e=(0,r.createReduxStore)(s.ax,o.A);(0,r.register)(e)}else(0,r.registerStore)(s.ax,o.A)},11267(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(23117);const s={sources:{},default:null},o={registerMediaSource:(e,t)=>({type:"REGISTER_MEDIA_SOURCE",id:e,mediaSourceState:t}),updateMediaSourceData:(e,t)=>({type:"UPDATE_MEDIA_SOURCE_DATA",id:e,data:t}),unregisterMediaSource:e=>({type:"UNREGISTER_MEDIA_SOURCE",id:e}),setDefaultMediaSource:e=>({type:"SET_DEFAULT_MEDIA_SOURCE",id:e}),playMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r.v8}),toggleMediaSource:e=>({type:"TOGGLE_MEDIA_PLAYER_STATE",id:e}),pauseMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r.vh}),errorMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r.pF}),setMediaSourceCurrentTime:(e,t)=>({type:"SET_MEDIA_PLAYER_CURRENT_TIME",id:e,currentTime:t})},i={getDefaultMediaSource(e){let t=null;const n=Object.keys(e.sources);if(e.default?t=e.default:n?.length&&(t=e.sources[n[0]].id),t)return e.sources[t]},getMediaPlayerState(e,t){const n=t?e.sources?.[t]:i.getDefaultMediaSource(e);return n?.state},getMediaSourceCurrentTime(e,t){const n=t?e.sources?.[t]:i.getDefaultMediaSource(e);return n?.currentTime},getMediaSourceDuration(e,t){if(!t){const t=i.getDefaultMediaSource(e);return t?.duration}return e.sources?.[t]?.duration},getMediaSourceDomReference(e,t){const n=t?e.sources?.[t]:i.getDefaultMediaSource(e);if(!n)return;const r=n?.domId;return r?document.getElementById(r):void 0}},a={reducer(e=s,t){const n=t.id||e.default||Object.keys(e.sources)?.[0];switch(t.type){case"REGISTER_MEDIA_SOURCE":return{...e,sources:{...e.sources,[t.id]:{id:t.id,...t.mediaSourceState}}};case"UPDATE_MEDIA_SOURCE_DATA":return{...e,sources:{...e.sources,[t.id]:{...e.sources[t.id],...t.data}}};case"UNREGISTER_MEDIA_SOURCE":{const n=Object.assign({},e);return n.sources[t.id]&&delete n.sources[t.id],t.id===e.default&&(n.default=Object.keys(e.sources)?.[0]),n}case"SET_DEFAULT_MEDIA_SOURCE":return{...e,default:t.id};case"SET_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[n]:{...e.sources[n],state:t.state}}};case"TOGGLE_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[n]:{...e.sources[n],state:e.sources[n].state===r.v8?r.vh:r.v8}}};case"SET_MEDIA_PLAYER_CURRENT_TIME":return{...e,sources:{...e.sources,[n]:{...e.sources[n],currentTime:t.currentTime}}}}return e},actions:o,selectors:i}},66314(e,t,n){"use strict";n.r(t),n.d(t,{saveProduct:()=>b,setAlreadySentPostModifiedInSession:()=>_,setApiState:()=>g,setConnectUrl:()=>h,setConnectedAccountDefaultCurrency:()=>m,setNewsletterCategories:()=>k,setPostEmailSentState:()=>x,setProducts:()=>p,setPublishedWithEmailEnabledInSession:()=>w,setSiteSlug:()=>f,setSubscriberCounts:()=>v,setTotalEmailsSentCount:()=>y});var r=n(54268),s=n(1455),o=n.n(s),i=n(27723),a=n(29726),l=n(1990),c=n(72730),u=n(3696),d=n(34884);const __=i.__,p=e=>({type:"SET_PRODUCTS",products:e}),h=e=>({type:"SET_CONNECT_URL",connectUrl:e}),m=e=>({type:"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY",connectedAccountDefaultCurrency:e}),g=e=>({type:"SET_API_STATE",apiState:e}),f=e=>({type:"SET_SITE_SLUG",siteSlug:e}),b=(e,t=a._$,n=()=>{},s=()=>{},h=!0)=>async({dispatch:a,registry:m})=>{const{title:g,price:f,currency:b}=e;if(!g||0===g.length)return(0,d.S)((0,l.W)("product requires a name",t),m),void s(!1);const v=parseFloat(f),y=(0,c.dv)(b);if(v<y)return(0,d.S)((0,i.sprintf)(
// translators: %s: Price
__("Minimum allowed price is %s.","jetpack"),(0,r.vv)(y,b)),m),void s(!1);if(!(0,c.kF)(b,v))return(0,d.S)((0,l.W)("product requires a valid price",t),m),void s(!1);try{const r=await o()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),i={id:r.id,title:r.title,interval:r.interval,price:r.price,currency:r.currency},c=m.select(u.EF).getProducts();a(p(c.concat([i]))),n([i.id]),h&&(0,d.L)((0,l.W)("successfully created product",t),m),s(!0)}catch{(0,d.S)((0,l.W)("there was an error when adding the product",t),m),s(!1)}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e}),y=e=>({type:"SET_TOTAL_EMAILS_SENT_COUNT",totalEmailsSentCount:e}),k=e=>({type:"SET_NEWSLETTER_CATEGORIES",newsletterCategories:e}),x=(e,{email_sent_at:t,stats_on_send:n})=>({type:"SET_POST_EMAIL_SENT_STATE",postId:e,payload:{email_sent_at:t,stats_on_send:n}}),_=e=>({type:"SET_ALREADY_SENT_POST_MODIFIED_IN_SESSION",postId:e}),w=e=>({type:"SET_PUBLISHED_WITH_EMAIL_ENABLED_IN_SESSION",postId:e})},3696(e,t,n){"use strict";n.d(t,{EF:()=>r,JA:()=>o,an:()=>s,gI:()=>i,ky:()=>a});const r="jetpack/membership-products",s=0,o=1,i=2,a="tier"},16521(e,t,n){"use strict";n.d(t,{M:()=>c});var r=n(47143),s=n(66314),o=n(3696),i=n(91497),a=n(18410),l=n(92955);const c=(0,r.createReduxStore)(o.EF,{actions:s,reducer:i.A,resolvers:a,selectors:l,__experimentalUseThunks:!0});(0,r.register)(c)},91497(e,t,n){"use strict";n.d(t,{A:()=>s});const r={products:[],apiState:n(3696).an,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{totalSubscribers:null,socialFollowers:null,emailSubscribers:null,paidSubscribers:null},newsletterCategories:{enabled:!1,categories:[]},postEmailSentState:{},alreadySentPostModifiedInSession:{},publishedWithEmailEnabledInSession:{}};function s(e=r,t){switch(t.type){case"SET_PRODUCTS":return{...e,products:t.products};case"SET_CONNECT_URL":return{...e,connectUrl:t.connectUrl};case"SET_API_STATE":return{...e,apiState:t.apiState};case"SET_SITE_SLUG":return{...e,siteSlug:t.siteSlug};case"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY":return{...e,connectedAccountDefaultCurrency:t.connectedAccountDefaultCurrency};case"SET_SUBSCRIBER_COUNTS":return{...e,subscriberCounts:t.subscriberCounts};case"SET_TOTAL_EMAILS_SENT_COUNT":return{...e,totalEmailsSentCount:t.totalEmailsSentCount};case"SET_NEWSLETTER_CATEGORIES":return{...e,newsletterCategories:t.newsletterCategories};case"SET_POST_EMAIL_SENT_STATE":return{...e,postEmailSentState:{...e.postEmailSentState,[t.postId]:{email_sent_at:t.payload.email_sent_at??null,stats_on_send:t.payload.stats_on_send??null}}};case"SET_ALREADY_SENT_POST_MODIFIED_IN_SESSION":return{...e,alreadySentPostModifiedInSession:{...e.alreadySentPostModifiedInSession,[t.postId]:!0}};case"SET_PUBLISHED_WITH_EMAIL_ENABLED_IN_SESSION":return{...e,publishedWithEmailEnabledInSession:{...e.publishedWithEmailEnabledInSession,[t.postId]:!0}}}return e}},18410(e,t,n){"use strict";n.r(t),n.d(t,{getNewsletterCategories:()=>A,getNewsletterTierProducts:()=>_,getPostEmailSentState:()=>S,getProducts:()=>w,getSubscriberCounts:()=>j,getTotalEmailsSentCount:()=>C});var r=n(97999),s=n(1455),o=n.n(s),i=n(43656),a=n(93832),l=n(29726),c=n(1990),u=n(56539),d=n(27574),p=n(66314),h=n(3696),m=n(34884);const g="membership-products-resolver-getProducts",f="membership-products-resolver-getSubscriberCounts",b="membership-products-resolver-getTotalEmailsSentCount",v="membership-products-resolver-getNewsletterCategories",y="membership-products-resolver-getPostEmailSentState";let k=!1;const x=(e,t,n)=>{if(e.length>0)return;const r=n.getProductsNoResolver()[0]?.id;r&&t([r])},_=(e=l._$,t=[],n=()=>{})=>w(e,t,n,!1),w=(e=l._$,t=[],n=()=>{},r=!0)=>async({dispatch:s,registry:l,select:f})=>{if(await u.A.blockExecution(g),k)return void x(t,n,f);const b=u.A.acquire(g);try{const u=await(async()=>{const e=(0,a.getQueryArg)(window.location.href,"origin"),t=(0,a.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),n=await o()({path:t,method:"GET"});if(!n&&"object"!=typeof n)throw new Error("Unexpected API response");const r=n?.errors&&Object.values(n.errors)?.[0]?.[0];if(r)throw new Error(r);return n})();((e,t,n)=>{const r=t.select(i.store).getCurrentPostId();n((0,p.setConnectUrl)((0,d.A)(r,e.connect_url))),n((0,p.setSiteSlug)(e.site_slug)),n((0,p.setProducts)(e.products)),n((0,p.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),n((0,p.setApiState)(e.connected_account_id?h.JA:h.gI))})(u,l,s),(e=>!e.products.length&&e.connected_account_id)(u)&&await(async(e,t,n,r)=>{await n((0,p.saveProduct)({title:(0,c.W)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,()=>{},r))})(e,n,s,r),x(t,n,f),k=!0}catch(e){s((0,p.setConnectUrl)(null)),s((0,p.setApiState)(h.gI)),(0,m.S)(e.message,l)}finally{u.A.release(b)}},j=()=>async({dispatch:e,registry:t})=>{await u.A.blockExecution(f);const n=u.A.acquire(f);try{const t=await(async()=>{const e=await o()({path:(0,a.addQueryArgs)("/wpcom/v2/subscribers/counts",{subscriber_status:"active",subscription_status:"active"})});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();e((0,p.setSubscriberCounts)({totalSubscribers:t.counts.total_subscribers,socialFollowers:t.counts.social_followers,emailSubscribers:t.counts.email_subscribers,paidSubscribers:t.counts.paid_subscribers}))}catch(n){e((0,p.setApiState)(h.gI)),(0,m.S)(n.message,t)}finally{u.A.release(n)}},C=(e,t)=>async({dispatch:n})=>{await u.A.blockExecution(b);const s=u.A.acquire(b);try{const s=await(async(e,t)=>{if(!e||!t)return;const n=(0,r.isSimpleSite)()?"/rest/v1.1/sites":"/jetpack/v4/stats-app/sites",s=await o()({path:n+`/${e}/stats/opens/emails/${t}/rate`});if(!s||"object"!=typeof s)throw new Error("Unexpected API response");const i=s?.errors&&Object.values(s.errors)?.[0]?.[0];if(i)throw new Error(i);return s})(e,t);n((0,p.setTotalEmailsSentCount)(s?.total_sends))}catch(e){console.warn("Failed to fetch total emails sent count:",e?.message)}finally{u.A.release(s)}},A=()=>async({dispatch:e,registry:t})=>{await u.A.blockExecution(v);const n=u.A.acquire(v);try{const t=await(async()=>{const e=await o()({path:"/wpcom/v2/newsletter-categories"});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();e((0,p.setNewsletterCategories)({enabled:t.enabled,categories:t.newsletter_categories}))}catch(n){e((0,p.setApiState)(h.gI)),(0,m.S)(n.message,t)}finally{u.A.release(n)}},S=e=>async({dispatch:t,registry:n})=>{if(!e)return;await u.A.blockExecution(y);const r=u.A.acquire(y);try{const n=await(async e=>{if(!e)return{email_sent_at:null,stats_on_send:null};const t=await o()({path:(0,a.addQueryArgs)("/wpcom/v2/newsletter-email-sent-status",{post_id:e}),method:"GET"});if(!t||"object"!=typeof t)throw new Error("Unexpected API response");const n=t?.errors&&Object.values(t.errors)?.[0]?.[0];if(n)throw new Error(n);return t})(e);t((0,p.setPostEmailSentState)(e,{email_sent_at:n.email_sent_at??null,stats_on_send:n.stats_on_send??null}))}catch(e){(0,m.S)(e.message,n)}finally{u.A.release(r)}}},92955(e,t,n){"use strict";n.r(t),n.d(t,{getAlreadySentPostModifiedInSession:()=>_,getApiState:()=>s,getConnectUrl:()=>o,getConnectedAccountDefaultCurrency:()=>i,getNewsletterCategories:()=>v,getNewsletterCategoriesEnabled:()=>y,getNewsletterTierProducts:()=>d,getPostEmailSentState:()=>x,getProduct:()=>c,getProducts:()=>a,getProductsNoResolver:()=>l,getPublishedWithEmailEnabledInSession:()=>w,getSelectedProducts:()=>u,getSiteSlug:()=>p,getSubscriberCounts:()=>f,getTotalEmailsSentCount:()=>b,hasInvalidProducts:()=>j,isApiStateConnected:()=>h,isApiStateLoading:()=>m,isInvalidProduct:()=>g});var r=n(3696);const s=e=>e.apiState,o=e=>e.connectUrl,i=e=>e.connectedAccountDefaultCurrency,a=e=>e.products,l=e=>a(e),c=(e,t)=>a(e).find(e=>e.id===t),u=(e,t)=>a(e).filter(e=>t.includes(e.id)),d=e=>e.products.filter(e=>e.type===r.ky),p=e=>e.siteSlug,h=e=>e.apiState===r.JA,m=e=>e.apiState===r.an,g=(e,t)=>!!t&&!c(e,t),f=e=>e.subscriberCounts,b=e=>e.totalEmailsSentCount,v=e=>e.newsletterCategories.categories,y=e=>e.newsletterCategories.enabled,k={email_sent_at:null,stats_on_send:null},x=(e,t)=>t?e.postEmailSentState?.[t]??k:k,_=(e,t)=>!(!e.alreadySentPostModifiedInSession||!e.alreadySentPostModifiedInSession[t]),w=(e,t)=>!(!e.publishedWithEmailEnabledInSession||!e.publishedWithEmailEnabledInSession[t]),j=(e,t)=>!!t&&t.some(t=>g(e,t))},34884(e,t,n){"use strict";n.d(t,{L:()=>o,S:()=>s});var r=n(692);const s=(e,t)=>t.dispatch(r.store).createErrorNotice(e,{type:"snackbar"}),o=(e,t)=>t.dispatch(r.store).createSuccessNotice(e,{type:"snackbar"})},3975(e,t,n){"use strict";n.d(t,{i:()=>s,y:()=>r});const r={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function s(e){return r[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},4567(e,t,n){"use strict";n.d(t,{Ay:()=>o});var r=n(3975),s=n(18360);function o(e,t,n={}){const o=(0,r.i)(t);if(!o||isNaN(e))return null;const{decimal:i,grouping:a,precision:l,symbol:c}={...o,...n},u=e<0?"-":"";let d=(0,s.A)(Math.abs(e),l,i,a);return n.stripZeros&&(d=function(e,t){const n=new RegExp(`\\${t}0+$`);return e.replace(n,"")}(d,i)),`${u}${c}${d}`}},18360(e,t,n){"use strict";function r(e,t=0,n=".",r=","){const s=(e+"").replace(/[^0-9+\-Ee.]/g,""),o=isFinite(+s)?+s:0,i=isFinite(+t)?Math.abs(t):0,a=(i?function(e,t){const n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(o,i):""+Math.round(o)).split(".");return a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(a[1]||"").length<i&&(a[1]=a[1]||"",a[1]+=new Array(i-a[1].length+1).join("0")),a.join(n)}n.d(t,{A:()=>r})},51119(e,t,n){"use strict";n.d(t,{A:()=>i});var r,s=n(2467);function o(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}r=o.prototype,Object.assign(r,s.EventEmitter.prototype),r.emitChange=function(){this.emit("change")},r.off=r.removeListener,o.prototype.open=function(e,t,n){return t=t||Date.now(),this.windowInstance=window.open(e,t,n),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},o.prototype.getScreenCenterSpecs=function(e,t){const n=void 0!==window.screenTop?window.screenTop:window.screenY,r=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(n+window.innerHeight/2-t/2),"left="+(r+window.innerWidth/2-e/2)].join()},o.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},o.prototype.checkStatus=function(){for(const 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))},o.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};const i=o},10067(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))}),t.splice(s,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(78926)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},78926(e,t,n){e.exports=function(e){function t(e){let n,s,o,i=null;function a(...e){if(!a.enabled)return;const r=a,s=Number(new Date),o=s-(n||s);r.diff=o,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,s)=>{if("%%"===n)return"%";i++;const o=t.formatters[s];if("function"==typeof o){const t=e[i];n=o.call(r,t),e.splice(i,1),i--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function s(e,t){let n=0,r=0,s=-1,o=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(s=r,o=n,r++):(n++,r++);else{if(-1===s)return!1;r=s+1,o++,n=o}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(s(e,n))return!1;for(const n of t.names)if(s(e,n))return!0;return!1},t.humanize=n(44997),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},71218(e,t,n){"use strict";t.A=function(e){var t=e.size,n=void 0===t?24:t,r=e.onClick,a=(e.icon,e.className),l=function(e,t){if(null==e)return{};var n,r,s=function(e,t){if(null==e)return{};var n,r,s={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}(e,o),c=["gridicon","gridicons-star",a,!!function(e){return 0==e%18}(n)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return s.default.createElement("svg",i({className:c,height:n,width:n,onClick:r},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),s.default.createElement("g",null,s.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.891 5.82 21l2.002-7.141L2 9.257l7.418-.304z"})))};var r,s=(r=n(51609))&&r.__esModule?r:{default:r},o=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)}},21147(e,t,n){"use strict";function r(e,t){return Array(t+1).join(e)}n.d(t,{A:()=>R});var s=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function o(e){return c(e,s)}var i=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function a(e){return c(e,i)}var l=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function c(e,t){return t.indexOf(e.nodeName)>=0}function u(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var d={};function p(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function h(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function m(e,t,n){for(var r=0;r<e.length;r++){var s=e[r];if(g(s,t,n))return s}}function g(e,t,n){var r=e.filter;if("string"==typeof r){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof r)throw new TypeError("`filter` needs to be a string, array, or function");if(r.call(e,t,n))return!0}}function f(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function b(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}d.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},d.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+"\n"}},d.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,n){var s=Number(t.nodeName.charAt(1));return"setext"===n.headingStyle&&s<3?"\n\n"+e+"\n"+r(1===s?"=":"-",e.length)+"\n\n":"\n\n"+r("#",s)+" "+e+"\n\n"}},d.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},d.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return"LI"===n.nodeName&&n.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},d.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var r=n.bulletListMarker+" ",s=t.parentNode;if("OL"===s.nodeName){var o=s.getAttribute("start"),i=Array.prototype.indexOf.call(s.children,t);r=(o?Number(o)+i:i+1)+". "}return r+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},d.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},d.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){for(var s,o=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,a=n.fence.charAt(0),l=3,c=new RegExp("^"+a+"{3,}","gm");s=c.exec(i);)s[0].length>=l&&(l=s[0].length+1);var u=r(a,l);return"\n\n"+u+o+"\n"+i.replace(/\n$/,"")+"\n"+u+"\n\n"}},d.horizontalRule={filter:"hr",replacement:function(e,t,n){return"\n\n"+n.hr+"\n\n"}},d.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href"),r=p(t.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+e+"]("+n+r+")"}},d.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,n){var r,s,o=t.getAttribute("href"),i=p(t.getAttribute("title"));switch(i&&(i=' "'+i+'"'),n.linkReferenceStyle){case"collapsed":r="["+e+"][]",s="["+e+"]: "+o+i;break;case"shortcut":r="["+e+"]",s="["+e+"]: "+o+i;break;default:var a=this.references.length+1;r="["+e+"]["+a+"]",s="["+a+"]: "+o+i}return this.references.push(s),r},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},d.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}},d.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}},d.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",n="`",r=e.match(/`+/gm)||[];-1!==r.indexOf(n);)n+="`";return n+t+e+t+n}},d.image={filter:"img",replacement:function(e,t){var n=p(t.getAttribute("alt")),r=t.getAttribute("src")||"",s=p(t.getAttribute("title"));return r?"+")":""}},h.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=m(this.array,e,this.options))||(t=m(this._keep,e,this.options))||(t=m(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var v="undefined"!=typeof window?window:{};var y,k,x=function(){var e=v.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?v.DOMParser:(y=function(){},function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){window.ActiveXObject&&(e=!0)}return e}()?y.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t}:y.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t},y);function _(e,t){var n;"string"==typeof e?n=(k=k||new x).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):n=e.cloneNode(!0);return function(e){var t=e.element,n=e.isBlock,r=e.isVoid,s=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!s(t)){for(var o=null,i=!1,a=null,l=b(a,t,s);l!==t;){if(3===l.nodeType||4===l.nodeType){var c=l.data.replace(/[ \r\n\t]+/g," ");if(o&&!/ $/.test(o.data)||i||" "!==c[0]||(c=c.substr(1)),!c){l=f(l);continue}l.data=c,o=l}else{if(1!==l.nodeType){l=f(l);continue}n(l)||"BR"===l.nodeName?(o&&(o.data=o.data.replace(/ $/,"")),o=null,i=!1):r(l)||s(l)?(o=null,i=!0):o&&(i=!1)}var u=b(a,l,s);a=l,l=u}o&&(o.data=o.data.replace(/ $/,""),o.data||f(o))}}({element:n,isBlock:o,isVoid:a,isPre:t.preformattedCode?w:null}),n}function w(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function j(e,t){return e.isBlock=o(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!a(e)&&!function(e){return c(e,l)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return u(e,i)}(e)&&!function(e){return u(e,l)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var n=(r=e.textContent,s=r.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:s[1],leadingAscii:s[2],leadingNonAscii:s[3],trailing:s[4],trailingNonAscii:s[5],trailingAscii:s[6]});var r,s;n.leadingAscii&&C("left",e,t)&&(n.leading=n.leadingNonAscii);n.trailingAscii&&C("right",e,t)&&(n.trailing=n.trailingNonAscii);return{leading:n.leading,trailing:n.trailing}}(e,t),e}function C(e,t,n){var r,s,i;return"left"===e?(r=t.previousSibling,s=/ $/):(r=t.nextSibling,s=/^ /),r&&(3===r.nodeType?i=s.test(r.nodeValue):n.preformattedCode&&"CODE"===r.nodeName?i=!1:1!==r.nodeType||o(r)||(i=s.test(r.textContent))),i}var A=Array.prototype.reduce,S=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function E(e){if(!(this instanceof E))return new E(e);var t={rules:d,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},t,e),this.rules=new h(this.options)}function T(e){var t=this;return A.call(e.childNodes,function(e,n){var r="";return 3===(n=new j(n,t.options)).nodeType?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(r=P.call(t,n)),B(e,r)},"")}function N(e){var t=this;return this.rules.forEach(function(n){"function"==typeof n.append&&(e=B(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function P(e){var t=this.rules.forNode(e),n=T.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function B(e,t){var n=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),r=t.replace(/^\n*/,""),s=Math.max(e.length-n.length,t.length-r.length);return n+"\n\n".substring(0,s)+r}E.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=T.call(this,new _(e,this.options));return N.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return S.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};const R=E},91016(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(74085),s=n(55217),o=n(33569),i=n(30615);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(){l=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new B(r||[]);return s(i,"_invoke",{value:E(e,n,a)}),i}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var m="suspendedStart",g="suspendedYield",f="executing",b="completed",v={};function y(){}function k(){}function x(){}var _={};d(_,i,function(){return this});var w=Object.getPrototypeOf,j=w&&w(w(R([])));j&&j!==n&&r.call(j,i)&&(_=j);var C=x.prototype=y.prototype=Object.create(_);function A(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function n(s,o,i,l){var c=h(e[s],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==a(d)&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,i,l)},function(e){n("throw",e,i,l)}):t.resolve(d).then(function(e){u.value=e,i(u)},function(e){return n("throw",e,i,l)})}l(c.arg)}var o;s(this,"_invoke",{value:function(e,r){function s(){return new t(function(t,s){n(e,r,t,s)})}return o=o?o.then(s,s):s()}})}function E(t,n,r){var s=m;return function(o,i){if(s===f)throw Error("Generator is already running");if(s===b){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=T(a,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(s===m)throw s=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);s=f;var c=h(t,n,r);if("normal"===c.type){if(s=r.done?b:g,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(s=b,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,s=t.iterator[r];if(s===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(s,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,o=function n(){for(;++s<t.length;)if(r.call(t,s))return n.value=t[s],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return k.prototype=x,s(C,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:k,configurable:!0}),k.displayName=d(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,u,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},A(S.prototype),d(S.prototype,c,function(){return this}),t.AsyncIterator=S,t.async=function(e,n,r,s,o){void 0===o&&(o=Promise);var i=new S(p(e,n,r,s),o);return t.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},A(C),d(C,u,"Generator"),d(C,i,function(){return this}),d(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function s(r,s){return a.type="throw",a.arg=t,n.next=r,s&&(n.method="next",n.arg=e),!!s}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return s("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return s(i.catchLoc,!0);if(this.prev<i.finallyLoc)return s(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return s(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return s(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&r.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var o=s;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var s=r.arg;P(n)}return s}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function c(e,t,n,r,s,o,i){try{var a=e[o](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,s)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var p=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"openFile",value:(a=l().mark(function e(t,n){var a;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,r.A)()||!t||void 0===t.uri){e.next=11;break}return e.prev=1,e.next=4,(0,s.A)(t.uri);case 4:return a=e.sent,e.abrupt("return",new o.A(a));case 8:throw e.prev=8,e.t0=e.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(e.t0));case 11:if("function"!=typeof t.slice||void 0===t.size){e.next=13;break}return e.abrupt("return",Promise.resolve(new o.A(t)));case 13:if("function"!=typeof t.read){e.next=18;break}if(n=Number(n),Number.isFinite(n)){e.next=17;break}return e.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return e.abrupt("return",Promise.resolve(new i.A(t,n)));case 18:return e.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return e.stop()}},e,null,[[1,8]])}),d=function(){var e=this,t=arguments;return new Promise(function(n,r){var s=a.apply(e,t);function o(e){c(s,n,r,o,i,"next",e)}function i(e){c(s,n,r,o,i,"throw",e)}o(void 0)})},function(_x,e){return d.apply(this,arguments)})}],t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,a,d}()},33765(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(74085);function s(e,t){return(0,r.A)()?Promise.resolve(function(e,t){var n=e.exif?function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",n,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}},45369(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{A:()=>l});var l=function(){return i(function e(){s(this,e)},[{key:"createRequest",value:function(e,t){return new c(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}])}(),c=function(){return i(function e(t,n){s(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,n,!0),this._method=t,this._url=n,this._headers={}},[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise(function(n,r){e._xhr.onload=function(){n(new u(e._xhr))},e._xhr.onerror=function(e){r(e)},e._xhr.send(t)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}(),u=function(){return i(function e(t){s(this,e),this._xhr=t},[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}()},10781(e,t,n){"use strict";n.d(t,{_O:()=>k});var r=n(52494),s=n(82701),o=n(91016),i=n(33765),a=n(45369),l=n(10851);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function d(e,t,n){return t=h(t),function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var y=f(f({},s.A.defaultOptions),{},{httpStack:new a.A,fileReader:new o.A,urlStorage:l.o?new l.Y:new r.A,fingerprint:i.A}),k=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),d(this,t,[e,n=f(f({},y),n)])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,o=[{key:"terminate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t=f(f({},y),t),s.A.terminate(e,t)}}],(r=null)&&u(n.prototype,r),o&&u(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(s.A);"function"==typeof XMLHttpRequest&&"function"==typeof Blob&&Blob.prototype.slice},74085(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()}},33569(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(73716),s=n(79427);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var l=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._file=t,this.size=t.size},(t=[{key:"slice",value:function(e,t){if((0,r.A)())return(0,s.A)(this._file.slice(e,t));var n=this._file.slice(e,t),o=t>=this.size;return Promise.resolve({value:n,done:o})}},{key:"close",value:function(){}}])&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}()},30615(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function i(e){return void 0===e?0:void 0!==e.size?e.size:e.length}n.d(t,{A:()=>a});var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1},(t=[{key:"slice",value:function(e,t){return e<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(e,t)}},{key:"_readUntilEnoughDataOrDone",value:function(e,t){var n=this,r=t<=this._bufferOffset+i(this._buffer);if(this._done||r){var s=this._getDataFromBuffer(e,t),o=null==s&&this._done;return Promise.resolve({value:s,done:o})}return this._reader.read().then(function(r){var s=r.value;return r.done?n._done=!0:void 0===n._buffer?n._buffer=s:n._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}throw new Error("Unknown data type")}(n._buffer,s),n._readUntilEnoughDataOrDone(e,t)})}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var n=0===i(this._buffer);return this._done&&n?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}()},73716(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)}},79427(e,t,n){"use strict";function r(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){var e=new Uint8Array(r.result);t({value:e})},r.onerror=function(e){n(e)},r.readAsArrayBuffer(e)})}n.d(t,{A:()=>r})},55217(e,t,n){"use strict";function r(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var e=r.response;t(e)},r.onerror=function(e){n(e)},r.open("GET",e),r.send()})}n.d(t,{A:()=>r})},10851(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{Y:()=>u,o:()=>c});var i=!1;try{i="localStorage"in window;var a="tusSupport",l=localStorage.getItem(a);localStorage.setItem(a,l),null===l&&localStorage.removeItem(a)}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;i=!1}var c=i,u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"findAllUploads",value:function(){var e=this._findEntries("tus::");return Promise.resolve(e)}},{key:"findUploadsByFingerprint",value:function(e){var t=this._findEntries("tus::".concat(e,"::"));return Promise.resolve(t)}},{key:"removeUpload",value:function(e){return localStorage.removeItem(e),Promise.resolve()}},{key:"addUpload",value:function(e,t){var n=Math.round(1e12*Math.random()),r="tus::".concat(e,"::").concat(n);return localStorage.setItem(r,JSON.stringify(t)),Promise.resolve(r)}},{key:"_findEntries",value:function(e){for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(0===r.indexOf(e))try{var s=JSON.parse(localStorage.getItem(r));s.urlStorageKey=r,t.push(s)}catch(e){}}return t}}],t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}()},33004(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function i(e,t,n){return t=u(t),function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var s=new(e.bind.apply(e,r));return n&&c(s,n.prototype),s}(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},a(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}n.d(t,{A:()=>p});var d=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=i(this,t,[e])).originalRequest=s,n.originalResponse=o,n.causingError=r,null!=r&&(e+=", caused by ".concat(r.toString())),null!=s){var a=s.getHeader("X-Request-ID")||"n/a",l=s.getMethod(),c=s.getURL(),u=o?o.getStatus():"n/a",d=o?o.getBody()||"":"n/a";e+=", originated from request (method: ".concat(l,", url: ").concat(c,", response code: ").concat(u,", response text: ").concat(d,", request id: ").concat(a,")")}return n.message=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),n=t,r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(a(Error));const p=d},12380(e,t,n){"use strict";n.d(t,{R:()=>s});var r=!1;function s(e){r&&console.log(e)}},52494(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{A:()=>i});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(e){return Promise.resolve([])}},{key:"removeUpload",value:function(e){return Promise.resolve()}},{key:"addUpload",value:function(e,t){return Promise.resolve(null)}}])&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}()},82701(e,t,n){"use strict";n.d(t,{A:()=>B});var r=n(59535),s=n(76580),o=n.n(s),i=n(33004),a=n(12380),l=n(17291);function c(){c=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new B(r||[]);return s(i,"_invoke",{value:E(e,n,a)}),i}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",g="suspendedYield",f="executing",b="completed",v={};function y(){}function k(){}function x(){}var _={};u(_,i,function(){return this});var w=Object.getPrototypeOf,j=w&&w(w(R([])));j&&j!==n&&r.call(j,i)&&(_=j);var C=x.prototype=y.prototype=Object.create(_);function A(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function n(s,o,i,a){var l=h(e[s],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==p(u)&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,i,a)},function(e){n("throw",e,i,a)}):t.resolve(u).then(function(e){c.value=e,i(c)},function(e){return n("throw",e,i,a)})}a(l.arg)}var o;s(this,"_invoke",{value:function(e,r){function s(){return new t(function(t,s){n(e,r,t,s)})}return o=o?o.then(s,s):s()}})}function E(t,n,r){var s=m;return function(o,i){if(s===f)throw Error("Generator is already running");if(s===b){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=T(a,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(s===m)throw s=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);s=f;var c=h(t,n,r);if("normal"===c.type){if(s=r.done?b:g,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(s=b,r.method="throw",r.arg=c.arg)}}}function T(t,n){var r=n.method,s=t.iterator[r];if(s===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(s,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,o=function n(){for(;++s<t.length;)if(r.call(t,s))return n.value=t[s],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(p(t)+" is not iterable")}return k.prototype=x,s(C,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:k,configurable:!0}),k.displayName=u(x,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,l,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},A(S.prototype),u(S.prototype,a,function(){return this}),t.AsyncIterator=S,t.async=function(e,n,r,s,o){void 0===o&&(o=Promise);var i=new S(d(e,n,r,s),o);return t.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},A(C),u(C,l,"Generator"),u(C,i,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function s(r,s){return a.type="throw",a.arg=t,n.next=r,s&&(n.method="next",n.arg=e),!!s}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return s("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return s(i.catchLoc,!0);if(this.prev<i.finallyLoc)return s(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return s(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return s(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&r.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var o=s;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var s=r.arg;P(n)}return s}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function u(e,t,n,r,s,o,i){try{var a=e[o](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,s)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function y(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}var k="tus-v1",x="ietf-draft-03",_={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:N,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:k},w=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return t=e,n=[{key:"findPreviousUploads",value:function(){var e=this;return this.options.fingerprint(this.file,this.options).then(function(t){return e._urlStorage.findUploadsByFingerprint(t)})}},{key:"resumeFromPreviousUpload",value:function(e){this.url=e.uploadUrl||null,this._parallelUploadUrls=e.parallelUploadUrls||null,this._urlStorageKey=e.urlStorageKey}},{key:"start",value:function(){var e=this,t=this.file;if(t)if([k,x].includes(this.options.protocol))if(this.options.endpoint||this.options.uploadUrl||this.url){var n=this.options.retryDelays;if(null==n||"[object Array]"===Object.prototype.toString.call(n)){if(this.options.parallelUploads>1)for(var r=0,s=["uploadUrl","uploadSize","uploadLengthDeferred"];r<s.length;r++){var o=s[r];if(this.options[o])return void this._emitError(new Error("tus: cannot use the ".concat(o," option when parallelUploads is enabled")))}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1)return void this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length)return void this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"))}this.options.fingerprint(t,this.options).then(function(n){return null==n?(0,a.R)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):(0,a.R)("Calculated fingerprint: ".concat(n)),e._fingerprint=n,e._source?e._source:e.options.fileReader.openFile(t,e.options.chunkSize)}).then(function(t){if(e._source=t,e.options.uploadLengthDeferred)e._size=null;else if(null!=e.options.uploadSize){if(e._size=Number(e.options.uploadSize),Number.isNaN(e._size))return void e._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(e._size=e._source.size,null==e._size)return void e._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));e.options.parallelUploads>1||null!=e._parallelUploadUrls?e._startParallelUpload():e._startSingleUpload()}).catch(function(t){e._emitError(t)})}else this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t,n=this,r=this._size,s=0;this._parallelUploads=[];var o=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,i=null!==(t=this.options.parallelUploadBoundaries)&&void 0!==t?t:function(e,t){for(var n=Math.floor(e/t),r=[],s=0;s<t;s++)r.push({start:n*s,end:n*(s+1)});return r[t-1].end=e,r}(this._source.size,o);this._parallelUploadUrls&&i.forEach(function(e,t){e.uploadUrl=n._parallelUploadUrls[t]||null}),this._parallelUploadUrls=new Array(i.length);var l,c=i.map(function(t,o){var a=0;return n._source.slice(t.start,t.end).then(function(l){var c=l.value;return new Promise(function(l,u){var d=f(f({},n.options),{},{uploadUrl:t.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:n.options.metadataForPartialUploads,headers:f(f({},n.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:l,onError:u,onProgress:function(e){s=s-a+e,a=e,n._emitProgress(s,r)},onUploadUrlAvailable:function(){n._parallelUploadUrls[o]=p.url,n._parallelUploadUrls.filter(function(e){return Boolean(e)}).length===i.length&&n._saveUploadInUrlStorage()}}),p=new e(c,d);p.start(),n._parallelUploads.push(p)})})});Promise.all(c).then(function(){(l=n._openRequest("POST",n.options.endpoint)).setHeader("Upload-Concat","final;".concat(n._parallelUploadUrls.join(" ")));var e=j(n.options.metadata);return""!==e&&l.setHeader("Upload-Metadata",e),n._sendRequest(l,null)}).then(function(e){if(C(e.getStatus(),200)){var t=e.getHeader("Location");null!=t?(n.url=P(n.options.endpoint,t),(0,a.R)("Created upload at ".concat(n.url)),n._emitSuccess(e)):n._emitHttpError(l,e,"tus: invalid or missing Location header")}else n._emitHttpError(l,e,"tus: unexpected response while creating upload")}).catch(function(e){n._emitError(e)})}},{key:"_startSingleUpload",value:function(){return this._aborted=!1,null!=this.url?((0,a.R)("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?((0,a.R)("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,void this._resumeUpload()):((0,a.R)("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var n=this;if(null!=this._parallelUploads){var r,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(this._parallelUploads);try{for(s.s();!(r=s.n()).done;)r.value.abort(t)}catch(e){s.e(e)}finally{s.f()}}return null!==this._req&&this._req.abort(),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?e.terminate(this.url,this.options).then(function(){return n._removeFromUrlStorage()}):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,n,r){this._emitError(new i.A(n,r,e,t))}},{key:"_emitError",value:function(e){var t=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),T(e,this._retryAttempt,this.options))){var n=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout(function(){t.start()},n))}if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}}},{key:"_emitSuccess",value:function(e){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess({lastResponse:e})}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,n){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,n)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?t.setHeader("Upload-Defer-Length","1"):t.setHeader("Upload-Length","".concat(this._size));var n,r=j(this.options.metadata);""!==r&&t.setHeader("Upload-Metadata",r),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,n=this._addChunkToRequest(t)):(this.options.protocol===x&&t.setHeader("Upload-Complete","?0"),n=this._sendRequest(t,null)),n.then(function(n){if(C(n.getStatus(),200)){var r=n.getHeader("Location");if(null!=r){if(e.url=P(e.options.endpoint,r),(0,a.R)("Created upload at ".concat(e.url)),"function"==typeof e.options.onUploadUrlAvailable&&e.options.onUploadUrlAvailable(),0===e._size)return e._emitSuccess(n),void e._source.close();e._saveUploadInUrlStorage().then(function(){e.options.uploadDataDuringCreation?e._handleUploadResponse(t,n):(e._offset=0,e._performUpload())})}else e._emitHttpError(t,n,"tus: invalid or missing Location header")}else e._emitHttpError(t,n,"tus: unexpected response while creating upload")}).catch(function(n){e._emitHttpError(t,null,"tus: failed to create upload",n)})}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=this._openRequest("HEAD",this.url);this._sendRequest(t,null).then(function(n){var r=n.getStatus();if(!C(r,200))return 423===r?void e._emitHttpError(t,n,"tus: upload is currently locked; retry later"):(C(r,400)&&e._removeFromUrlStorage(),e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,n,"tus: unable to resume upload (new upload cannot be created without an endpoint)"));var s=Number.parseInt(n.getHeader("Upload-Offset"),10);if(Number.isNaN(s))e._emitHttpError(t,n,"tus: invalid or missing offset value");else{var o=Number.parseInt(n.getHeader("Upload-Length"),10);!Number.isNaN(o)||e.options.uploadLengthDeferred||e.options.protocol!==k?("function"==typeof e.options.onUploadUrlAvailable&&e.options.onUploadUrlAvailable(),e._saveUploadInUrlStorage().then(function(){if(s===o)return e._emitProgress(o,o),void e._emitSuccess(n);e._offset=s,e._performUpload()})):e._emitHttpError(t,n,"tus: invalid or missing length value")}}).catch(function(n){e._emitHttpError(t,null,"tus: failed to resume upload",n)})}},{key:"_performUpload",value:function(){var e,t=this;this._aborted||(this.options.overridePatchMethod?(e=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):e=this._openRequest("PATCH",this.url),e.setHeader("Upload-Offset","".concat(this._offset)),this._addChunkToRequest(e).then(function(n){C(n.getStatus(),200)?t._handleUploadResponse(e,n):t._emitHttpError(e,n,"tus: unexpected response while uploading chunk")}).catch(function(n){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset ".concat(t._offset),n)}))}},{key:"_addChunkToRequest",value:function(e){var t=this,n=this._offset,r=this._offset+this.options.chunkSize;return e.setProgressHandler(function(e){t._emitProgress(n+e,t._size)}),e.setHeader("Content-Type","application/offset+octet-stream"),(r===Number.POSITIVE_INFINITY||r>this._size)&&!this.options.uploadLengthDeferred&&(r=this._size),this._source.slice(n,r).then(function(n){var r=n.value,s=n.done,o=null!=r&&r.size?r.size:0;t.options.uploadLengthDeferred&&s&&(t._size=t._offset+o,e.setHeader("Upload-Length","".concat(t._size)));var i=t._offset+o;return!t.options.uploadLengthDeferred&&s&&i!==t._size?Promise.reject(new Error("upload was configured with a size of ".concat(t._size," bytes, but the source is done after ").concat(i," bytes"))):null===r?t._sendRequest(e):(t.options.protocol===x&&e.setHeader("Upload-Complete",s?"?1":"?0"),t._emitProgress(t._offset,t._size),t._sendRequest(e,r))})}},{key:"_handleUploadResponse",value:function(e,t){var n=Number.parseInt(t.getHeader("Upload-Offset"),10);if(Number.isNaN(n))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(n,this._size),this._emitChunkComplete(n-this._offset,n,this._size),this._offset=n,n===this._size)return this._emitSuccess(t),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var n=A(e,t,this.options);return this._req=n,n}},{key:"_removeFromUrlStorage",value:function(){var e=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(t){e._emitError(t)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var e=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||null!==this._urlStorageKey)return Promise.resolve();var t={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};return this._parallelUploads?t.parallelUploadUrls=this._parallelUploadUrls:t.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,t).then(function(t){e._urlStorageKey=t})}},{key:"_sendRequest",value:function(e){return S(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],r=[{key:"terminate",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=A("DELETE",t,n);return S(r,null,n).then(function(e){if(204!==e.getStatus())throw new i.A("tus: unexpected response while terminating upload",null,r,e)}).catch(function(s){if(s instanceof i.A||(s=new i.A("tus: failed to terminate upload",s,r,null)),!T(s,0,n))throw s;var o=n.retryDelays[0],a=n.retryDelays.slice(1),l=f(f({},n),{},{retryDelays:a});return new Promise(function(e){return setTimeout(e,o)}).then(function(){return e.terminate(t,l)})})}}],n&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function j(e){return Object.entries(e).map(function(e){var t=d(e,2),n=t[0],s=t[1];return"".concat(n," ").concat(r.o4.encode(String(s)))}).join(",")}function C(e,t){return e>=t&&e<t+100}function A(e,t,n){var r=n.httpStack.createRequest(e,t);n.protocol===x?r.setHeader("Upload-Draft-Interop-Version","5"):r.setHeader("Tus-Resumable","1.0.0");for(var s=n.headers||{},o=0,i=Object.entries(s);o<i.length;o++){var a=d(i[o],2),c=a[0],u=a[1];r.setHeader(c,u)}if(n.addRequestId){var p=(0,l.A)();r.setHeader("X-Request-ID",p)}return r}function S(_x,e,t){return E.apply(this,arguments)}function E(){var e;return e=c().mark(function e(t,n,r){var s;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof r.onBeforeRequest){e.next=3;break}return e.next=3,r.onBeforeRequest(t);case 3:return e.next=5,t.send(n);case 5:if(s=e.sent,"function"!=typeof r.onAfterResponse){e.next=9;break}return e.next=9,r.onAfterResponse(t,s);case 9:return e.abrupt("return",s);case 10:case"end":return e.stop()}},e)}),E=function(){var t=this,n=arguments;return new Promise(function(r,s){var o=e.apply(t,n);function i(e){u(o,r,s,i,a,"next",e)}function a(e){u(o,r,s,i,a,"throw",e)}i(void 0)})},E.apply(this,arguments)}function T(e,t,n){return!(null==n.retryDelays||t>=n.retryDelays.length||null==e.originalRequest)&&(n&&"function"==typeof n.onShouldRetry?n.onShouldRetry(e,t,n):N(e))}function N(e){var t,n=e.originalResponse?e.originalResponse.getStatus():0;return(!C(n,400)||409===n||423===n)&&(t=!0,"undefined"!=typeof navigator&&!1===navigator.onLine&&(t=!1),t)}function P(e,t){return new(o())(t,e).toString()}w.defaultOptions=_;const B=w},17291(e,t,n){"use strict";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}n.d(t,{A:()=>r})},76580(e,t,n){"use strict";var r=n(96811),s=n(24588),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function m(e){var t,n=("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).location||{},r={},s=typeof(e=e||n);if("blob:"===e.protocol)r=new b(unescape(e.pathname),{});else if("string"===s)for(t in r=new b(e,{}),h)delete r[t];else if("object"===s){for(t in e)t in h||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=a.test(e.href))}return r}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function f(e,t){e=(e=d(e)).replace(i,""),t=t||{};var n,r=c.exec(e),s=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],l=0;return o?a?(n=r[2]+r[3]+r[4],l=r[2].length+r[3].length):(n=r[2]+r[4],l=r[2].length):a?(n=r[3]+r[4],l=r[3].length):n=r[4],"file:"===s?l>=2&&(n=n.slice(2)):g(s)?n=r[4]:s?o&&(n=n.slice(2)):l>=2&&g(t.protocol)&&(n=r[4]),{protocol:s,slashes:o||g(s),slashesCount:l,rest:n}}function b(e,t,n){if(e=(e=d(e)).replace(i,""),!(this instanceof b))return new b(e,t,n);var o,a,l,c,h,v,y=p.slice(),k=typeof t,x=this,_=0;for("object"!==k&&"string"!==k&&(n=t,t=null),n&&"function"!=typeof n&&(n=s.parse),o=!(a=f(e||"",t=m(t))).protocol&&!a.slashes,x.slashes=a.slashes||o&&t.slashes,x.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||u.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(x.protocol)))&&(y[3]=[/(.*)/,"pathname"]);_<y.length;_++)"function"!=typeof(c=y[_])?(l=c[0],v=c[1],l!=l?x[v]=e:"string"==typeof l?~(h="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(x[v]=e.slice(0,h),e=e.slice(h+c[2])):(x[v]=e.slice(h),e=e.slice(0,h))):(h=l.exec(e))&&(x[v]=h[1],e=e.slice(0,h.index)),x[v]=x[v]||o&&c[3]&&t[v]||"",c[4]&&(x[v]=x[v].toLowerCase())):e=c(e,x);n&&(x.query=n(x.query)),o&&t.slashes&&"/"!==x.pathname.charAt(0)&&(""!==x.pathname||""!==t.pathname)&&(x.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,s=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(x.pathname,t.pathname)),"/"!==x.pathname.charAt(0)&&g(x.protocol)&&(x.pathname="/"+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=""),x.username=x.password="",x.auth&&(~(h=x.auth.indexOf(":"))?(x.username=x.auth.slice(0,h),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(h+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(x.auth)),x.auth=x.password?x.username+":"+x.password:x.username),x.origin="file:"!==x.protocol&&g(x.protocol)&&x.host?x.protocol+"//"+x.host:"null",x.href=x.toString()}b.prototype={set:function(e,t,n){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||s.parse)(t)),o[e]=t;break;case"port":o[e]=t,r(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,l.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";o[e]=t.charAt(0)!==i?i+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(o.username=t.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<p.length;c++){var u=p[c];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=s.stringify);var t,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||l.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},b.extractProtocol=f,b.location=m,b.trimLeft=d,b.qs=s,e.exports=b},36791(e,t,n){"use strict";e.exports=n.p+"images/jetpack-logo-0869ca6c8490d0aaecca.svg"},26076(e,t,n){"use strict";e.exports=n.p+"images/loader-0855308317756931a4f5.gif"},72660(e,t,n){"use strict";e.exports=n.p+"images/eventbrite-in-page-example-47588367313e644097c9.png"},25836(e,t,n){"use strict";e.exports=n.p+"images/map-preview-4b508c1a0f8ed700cb1e.jpg"},93797(e,t,n){"use strict";e.exports=n.p+"images/map-theme_black_and_white-a33452734cf5f59eb2f9.jpg"},49364(e,t,n){"use strict";e.exports=n.p+"images/map-theme_black_and_white_mapkit-50e9383d59f6ad6a44ed.jpg"},77971(e,t,n){"use strict";e.exports=n.p+"images/map-theme_default-d3a324cdc6ff2f461574.jpg"},98430(e,t,n){"use strict";e.exports=n.p+"images/map-theme_default_mapkit-0ed10cab18f62edff74e.jpg"},27415(e,t,n){"use strict";e.exports=n.p+"images/map-theme_satellite-58322e843e983f7397b5.jpg"},72386(e,t,n){"use strict";e.exports=n.p+"images/map-theme_satellite_mapkit-6062205f7c3804fae12c.jpg"},92747(e,t,n){"use strict";e.exports=n.p+"images/map-theme_terrain-a408b936442d6d33df07.jpg"},96374(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-1-8da367b68ecf24bac625.jpg"},88513(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-2-a24860116d0db2f2e068.jpg"},98564(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-3-521847023ffca361cfde.jpg"},32022(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-1-8bfc86de615a17d80737.jpg"},2369(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-2-a7b4b2a7613c2e8ba929.jpg"},24324(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-3-8da367b68ecf24bac625.jpg"},49263(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-4-a24860116d0db2f2e068.jpg"},76882(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-5-e1e133942be4c7fa65d6.jpg"},86781(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-6-235b99214c5a0dc1bd2b.jpg"},40932(e,t,n){"use strict";e.exports=n.p+"images/videopress-block-example-image-d7dd9fae6ff49181bfca.jpg"},60651(e,t,n){"use strict";e.exports=n.p+"images/example_160x600-4df685f9bf14f11d9012.png"},26408(e,t,n){"use strict";e.exports=n.p+"images/example_300x250-9e27534cd219e940abaf.png"},68364(e,t,n){"use strict";e.exports=n.p+"images/example_320x50-34c171b9cf96506c8fc4.png"},90244(e,t,n){"use strict";e.exports=n.p+"images/example_728x90-1a8de274d08ab4d07f48.png"},74277(e){"use strict";e.exports={consumer_slug:"jetpack"}},39384(e){"use strict";e.exports=window.JetpackConnection},97999(e){"use strict";e.exports=window.JetpackScriptDataModule},87687(e){"use strict";e.exports=window.JetpackSharedStores},51609(e){"use strict";e.exports=window.React},10790(e){"use strict";e.exports=window.ReactJSXRuntime},66087(e){"use strict";e.exports=window.lodash},1455(e){"use strict";e.exports=window.wp.apiFetch},63162(e){"use strict";e.exports=window.wp.blob},94715(e){"use strict";e.exports=window.wp.blockEditor},75994(e){"use strict";e.exports=window.wp.blockSerializationDefaultParser},74997(e){"use strict";e.exports=window.wp.blocks},56427(e){"use strict";e.exports=window.wp.components},29491(e){"use strict";e.exports=window.wp.compose},3582(e){"use strict";e.exports=window.wp.coreData},47143(e){"use strict";e.exports=window.wp.data},38443(e){"use strict";e.exports=window.wp.date},98490(e){"use strict";e.exports=window.wp.domReady},43656(e){"use strict";e.exports=window.wp.editor},86087(e){"use strict";e.exports=window.wp.element},89877(e){"use strict";e.exports=window.wp.escapeHtml},52619(e){"use strict";e.exports=window.wp.hooks},27723(e){"use strict";e.exports=window.wp.i18n},48558(e){"use strict";e.exports=window.wp.keycodes},692(e){"use strict";e.exports=window.wp.notices},92279(e){"use strict";e.exports=window.wp.plugins},5573(e){"use strict";e.exports=window.wp.primitives},36536(e){"use strict";e.exports=window.wp.tokenList},93832(e){"use strict";e.exports=window.wp.url},26873(e){"use strict";e.exports=window.wp.viewport},98651(e,t,n){"use strict";function r(e,t){const n={};for(const r in e){const s=e[r];if(t?.hasOwnProperty(r)){const e=t[r](s);null!=e&&Object.assign(n,e);continue}!0===s?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}n.d(t,{v:()=>r})},59516(e,t,n){"use strict";n.d(t,{o:()=>h});var r=n(80334),s=n(51609),o=n(6211),i=n(99742),a=n(66504),l=n(22147),c=n(98651),u=n(31835),d=n(93057),p=n(49300);function h(e,t,n={}){const h=t.render,g=function(e,t={}){const{className:n,style:r,render:s}=e,{state:h=l.t0,ref:m,props:g,stateAttributesMapping:f,enabled:b=!0}=t,v=b?(0,u.S)(n,h):void 0,y=b?(0,d.m)(r,h):void 0,k=b?(0,c.v)(h,f):l.t0,x=b&&g?function(e){if(Array.isArray(e))return(0,p.lZ)(e);return(0,p.v6)(void 0,e)}(g):void 0,_=b?(0,a.r)(k,x)??{}:l.t0;"undefined"!=typeof document&&(b?Array.isArray(m)?_.ref=(0,o.U)([_.ref,(0,i.v)(s),...m]):_.ref=(0,o.a)(_.ref,(0,i.v)(s),m):(0,o.a)(null,null));if(!b)return l.t0;void 0!==v&&(_.className=(0,p.VN)(_.className,v));void 0!==y&&(_.style=(0,a.r)(_.style,y));return _}(t,n);if(!1===n.enabled)return null;return function(e,t,n,o){if(t){if("function"==typeof t)return t(n,o);const e=(0,p.v6)(n,t.props);e.ref=n.ref;let r=t;if(r?.$$typeof===m){r=s.Children.toArray(t)[0]}return s.cloneElement(r,e)}if(e&&"string"==typeof e)return function(e,t){if("button"===e)return(0,s.createElement)("button",{type:"button",...t,key:t.key});if("img"===e)return(0,s.createElement)("img",{alt:"",...t,key:t.key});return s.createElement(e,t)}(e,n);throw new Error((0,r.A)(8))}(e,h,g,n.state??l.t0)}const m=Symbol.for("react.lazy")},49300(e,t,n){"use strict";n.d(t,{VN:()=>g,lZ:()=>i,v6:()=>o});var r=n(66504);const s={};function o(e,t,n,r,s){if(!(n||r||s||e))return a(t);let o=a(e);return t&&(o=l(o,t)),n&&(o=l(o,n)),r&&(o=l(o,r)),s&&(o=l(o,s)),o}function i(e){if(0===e.length)return s;if(1===e.length)return a(e[0]);let t=a(e[0]);for(let n=1;n<e.length;n+=1)t=l(t,e[n]);return t}function a(e){return u(e)?{...d(e,s)}:function(e){const t={...e};for(const e in t){const n=t[e];c(e,n)&&(t[e]=h(n))}return t}(e)}function l(e,t){return u(t)?d(t,e):function(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":e[n]=(0,r.r)(e.style,s);break;case"className":e[n]=g(e.className,s);break;default:c(n,s)?e[n]=p(e[n],s):e[n]=s}}return e}(e,t)}function c(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return 111===n&&110===r&&s>=65&&s<=90&&("function"==typeof t||void 0===t)}function u(e){return"function"==typeof e}function d(e,t){return u(e)?e(t):e??s}function p(e,t){return t?e?(...n)=>{const r=n[0];if(f(r)){const s=r;m(s);const o=t(...n);return s.baseUIHandlerPrevented||e?.(...n),o}const s=t(...n);return e?.(...n),s}:h(t):e}function h(e){return e?(...t)=>{const n=t[0];return f(n)&&m(n),e(...t)}:e}function m(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function g(e,t){return t?e?t+" "+e:t:e}function f(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}},93196(e,t,n){"use strict";n.d(t,{C:()=>s});var r=n(59516);function s(e){return(0,r.o)(e.defaultTagName??"div",e,e)}},31835(e,t,n){"use strict";function r(e,t){return"function"==typeof e?e(t):e}n.d(t,{S:()=>r})},93057(e,t,n){"use strict";function r(e,t){return"function"==typeof e?e(t):e}n.d(t,{m:()=>r})},22147(e,t,n){"use strict";n.d(t,{t0:()=>r});Object.freeze([]);const r=Object.freeze({})},80334(e,t,n){"use strict";n.d(t,{A:()=>o});var r,s;const o=(r="https://base-ui.com/production-error",s="Base UI",function(e,...t){const n=new URL(r);return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`${s} error #${e}; visit ${n} for the full message.`})},99742(e,t,n){"use strict";n.d(t,{v:()=>o});var r=n(51609),s=n(28521);function o(e){if(!r.isValidElement(e))return null;const t=e,n=t.props;return((0,s._)(19)?n?.ref:t.ref)??null}},66504(e,t,n){"use strict";function r(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}n.d(t,{r:()=>r})},28521(e,t,n){"use strict";n.d(t,{_:()=>o});var r=n(51609);const s=parseInt(r.version,10);function o(e){return s>=e}},6211(e,t,n){"use strict";n.d(t,{U:()=>o,a:()=>s});var r=n(43074);function s(e,t,n,s){const o=(0,r.j)(i).current;return function(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}(o,e,t,n,s)&&a(o,[e,t,n,s]),o.callback}function o(e){const t=(0,r.j)(i).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&a(t,e),t.callback}function i(){return{callback:null,cleanup:null,refs:[]}}function a(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const s=t[e];if(null!=s)switch(typeof s){case"function":{const t=s(n);"function"==typeof t&&(r[e]=t);break}case"object":s.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}},43074(e,t,n){"use strict";n.d(t,{j:()=>o});var r=n(51609);const s={};function o(e,t){const n=r.useRef(s);return n.current===s&&(n.current=e(t)),n}},13109(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(86087),s=(0,r.forwardRef)(({icon:e,size:t=24,...n},s)=>(0,r.cloneElement)(e,{width:t,height:t,...n,ref:s}))},87756(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})})},55565(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})})},83147(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})})},84699(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.75 8V13H11.25V8H12.75ZM12.75 14.5V16H11.25V14.5H12.75Z"})})},88901(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})})},48329(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})})},65995(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})},1866(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})},42005(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M15.333 4C16.6677 4 17.75 5.0823 17.75 6.41699V6.75C17.75 7.20058 17.6394 7.62468 17.4473 8H18.5C19.2767 8 19.9154 8.59028 19.9922 9.34668L20 9.5V18.5C20 19.3284 19.3284 20 18.5 20H5.5C4.72334 20 4.08461 19.4097 4.00781 18.6533L4 18.5V9.5L4.00781 9.34668C4.07949 8.64069 4.64069 8.07949 5.34668 8.00781L5.5 8H6.55273C6.36065 7.62468 6.25 7.20058 6.25 6.75V6.41699C6.25 5.0823 7.3323 4 8.66699 4C10.0436 4.00011 11.2604 4.68183 12 5.72559C12.7396 4.68183 13.9564 4.00011 15.333 4ZM5.5 18.5H11.25V9.5H5.5V18.5ZM12.75 18.5H18.5V9.5H12.75V18.5ZM8.66699 5.5C8.16073 5.5 7.75 5.91073 7.75 6.41699V6.75C7.75 7.44036 8.30964 8 9 8H11.2461C11.2021 6.61198 10.0657 5.50017 8.66699 5.5ZM15.333 5.5C13.9343 5.50017 12.7979 6.61198 12.7539 8H15C15.6904 8 16.25 7.44036 16.25 6.75V6.41699C16.25 5.91073 15.8393 5.5 15.333 5.5Z"})})},41490(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})})},28847(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})})},375(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})})},33196(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})},73493(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})})},93761(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})})},90437(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})})},48568(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})})},80224(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})})},57577(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M19.8 4h-1.5l1 8h1.5l-1-8ZM17 5.8c-.1-1-1-1.8-2-1.8H6.8c-.9 0-1.7.6-1.9 1.4l-1.8 6C2.7 12.7 3.7 14 5 14h4.4l-.8 3.6c-.3 1.3.7 2.4 1.9 2.4h.2c.6 0 1.2-.3 1.6-.8l5-6.6c.3-.4.5-.9.4-1.5L17 5.7Zm-.9 5.9-5 6.6c0 .1-.2.2-.4.2h-.2c-.3 0-.6-.3-.5-.6l.8-3.6c.1-.4 0-.9-.3-1.3s-.7-.6-1.2-.6H4.9c-.3 0-.6-.3-.5-.6l1.8-6c0-.2.3-.4.5-.4h8.2c.3 0 .5.2.5.4l.7 5.4v.4Z"})})},22201(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"m3 12 1 8h1.5l-1-8H3Zm15.8-2h-4.4l.8-3.6c.3-1.3-.7-2.4-1.9-2.4h-.2c-.6 0-1.2.3-1.6.8l-5 6.6c-.3.4-.4.8-.4 1.2v.2l.7 5.4v.2c.2.9 1 1.5 1.9 1.5h8.2c.9 0 1.7-.6 1.9-1.4l1.8-6c.4-1.3-.6-2.6-1.9-2.6Zm.5 2.1-1.8 6c0 .2-.3.4-.5.4H8.8c-.3 0-.5-.2-.5-.4l-.7-5.4v-.4l5-6.6c0-.1.2-.2.4-.2h.2c.3 0 .6.3.5.6l-.8 3.6c-.1.4 0 .9.3 1.3s.7.6 1.2.6h4.4c.3 0 .6.3.5.6Z"})})},55507(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})})},57839(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})})},84701(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})})},28755(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})})},60484(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"})})},58384(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(5573),s=n(10790),o=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})})},13022(e,t,n){"use strict";function r(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}n.d(t,{A:()=>s});const s=function(){for(var e,t,n=0,s="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(s&&(s+=" "),s+=t);return s}},3175(e,t,n){"use strict";n.d(t,{Gz:()=>b,hl:()=>v});var r,s=n(25006),o=n(82826),i=n(72485);!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(r||(r={}));var a,l,c;function u(e){return e>=r.ZERO&&e<=r.NINE}function d(e){return e>=r.UPPER_A&&e<=r.UPPER_F||e>=r.LOWER_A&&e<=r.LOWER_F}function p(e){return e===r.EQUALS||function(e){return e>=r.UPPER_A&&e<=r.UPPER_Z||e>=r.LOWER_A&&e<=r.LOWER_Z||u(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(a||(a={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(l||(l={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(c||(c={}));class h{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=l.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=c.Strict}startEntity(e){this.decodeMode=e,this.state=l.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case l.EntityStart:return e.charCodeAt(t)===r.NUM?(this.state=l.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=l.NamedEntity,this.stateNamedEntity(e,t));case l.NumericStart:return this.stateNumericStart(e,t);case l.NumericDecimal:return this.stateNumericDecimal(e,t);case l.NumericHex:return this.stateNumericHex(e,t);case l.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===r.LOWER_X?(this.state=l.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=l.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const s=n-t;this.result=this.result*Math.pow(r,s)+parseInt(e.substr(t,s),r),this.consumed+=s}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!u(r)&&!d(r))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!u(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===r.SEMI)this.consumed+=1;else if(this.decodeMode===c.Strict)return 0;return this.emitCodePoint((0,i.y6)(this.result),this.consumed),this.errors&&(e!==r.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let s=n[this.treeIndex],o=(s&a.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const i=e.charCodeAt(t);if(this.treeIndex=g(n,s,this.treeIndex+Math.max(1,o),i),this.treeIndex<0)return 0===this.result||this.decodeMode===c.Attribute&&(0===o||p(i))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],o=(s&a.VALUE_LENGTH)>>14,0!==o){if(i===r.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==c.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&a.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~a.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case l.NamedEntity:return 0===this.result||this.decodeMode===c.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case l.NumericDecimal:return this.emitNumericEntity(0,2);case l.NumericHex:return this.emitNumericEntity(0,3);case l.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case l.EntityStart:return 0}}}function m(e){let t="";const n=new h(e,e=>t+=(0,i.MK)(e));return function(e,r){let s=0,o=0;for(;(o=e.indexOf("&",o))>=0;){t+=e.slice(s,o),n.startEntity(r);const i=n.write(e,o+1);if(i<0){s=o+n.end();break}s=o+i,o=0===i?s+1:s}const i=t+e.slice(s);return t="",i}}function g(e,t,n,r){const s=(t&a.BRANCH_LENGTH)>>7,o=t&a.JUMP_TABLE;if(0===s)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=s?-1:e[n+t]-1}let i=n,l=i+s-1;for(;i<=l;){const t=i+l>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+s];l=t-1}}return-1}const f=m(s.A);m(o.A);function b(e,t=c.Legacy){return f(e,t)}function v(e){return f(e,c.Strict)}},72485(e,t,n){"use strict";var r;n.d(t,{MK:()=>o,y6:()=>i});const s=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),o=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=s.get(e))&&void 0!==t?t:e}},97187(e,t,n){"use strict";n(47431),n(26834)},26834(){"use strict";const e=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);String.prototype.codePointAt;function t(e,t){return function(n){let r,s=0,o="";for(;r=e.exec(n);)s!==r.index&&(o+=n.substring(s,r.index)),o+=t.get(r[0].charCodeAt(0)),s=r.index+1;return o+n.substring(s)}}t(/[&<>'"]/g,e),t(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},25006(e,t,n){"use strict";n.d(t,{A:()=>r});const r=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0)))},82826(e,t,n){"use strict";n.d(t,{A:()=>r});const r=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)))},47431(){"use strict";function e(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}new Map(e([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(e([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(e([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(e([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]))},9405(e,t,n){"use strict";n.d(t,{Gz:()=>o.Gz,hl:()=>o.hl});var r,s,o=n(3175);n(97187),n(26834);!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(r||(r={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(s||(s={}))},37578(e,t,n){"use strict";n.d(t,{O:()=>u});const r="bits",s="bytes",o="",i="jedec",a="round",l="string",c={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function u(e,{bits:t=!1,pad:n=!1,base:u=-1,round:d=2,locale:p="",localeOptions:h={},separator:m="",spacer:g=" ",symbols:f={},standard:b="",output:v=l,fullform:y=!1,fullforms:k=[],exponent:x=-1,roundingMethod:_=a,precision:w=0}={}){let j=x,C=Number(e),A=[],S=0,E=o;"si"===b?(u=10,b=i):"iec"===b||b===i?u=2:2===u?b="iec":(u=10,b=i);const T=10===u?1e3:1024,N=!0===y,P=C<0,B=Math[_];if("bigint"!=typeof e&&isNaN(e))throw new TypeError("Invalid number");if("function"!=typeof B)throw new TypeError("Invalid rounding method");if(P&&(C=-C),(-1===j||isNaN(j))&&(j=Math.floor(Math.log(C)/Math.log(T)),j<0&&(j=0)),j>8&&(w>0&&(w+=8-j),j=8),"exponent"===v)return j;if(0===C)A[0]=0,E=A[1]=c.symbol[b][t?r:s][j];else{S=C/(2===u?Math.pow(2,10*j):Math.pow(1e3,j)),t&&(S*=8,S>=T&&j<8&&(S/=T,j++));const e=Math.pow(10,j>0?d:0);A[0]=B(S*e)/e,A[0]===T&&j<8&&-1===x&&(A[0]=1,j++),E=A[1]=10===u&&1===j?t?"kbit":"kB":c.symbol[b][t?r:s][j]}if(P&&(A[0]=-A[0]),w>0&&(A[0]=A[0].toPrecision(w)),A[1]=f[A[1]]||A[1],!0===p?A[0]=A[0].toLocaleString():p.length>0?A[0]=A[0].toLocaleString(p,h):m.length>0&&(A[0]=A[0].toString().replace(".",m)),n&&d>0){const e=A[0].toString(),t=m||(e.match(/(\D)/g)||[]).pop()||".",n=e.toString().split(t),r=n[1]||o,s=r.length,i=d-s;A[0]=`${n[0]}${t}${r.padEnd(s+i,"0")}`}return N&&(A[1]=k[j]?k[j]:c.fullform[b][j]+(t?"bit":"byte")+(1===A[0]?o:"s")),"array"===v?A:"object"===v?{value:A[0],symbol:A[1],exponent:j,unit:E}:A.join(g)}},59535(e,t,n){"use strict";n.d(t,{o4:()=>M});const r="3.7.8",s=r,o="function"==typeof Buffer,i="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,l=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),c=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(l),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,d=String.fromCharCode.bind(String),p="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),h=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),m=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),g=e=>{let t,n,r,s,o="";const i=e.length%3;for(let i=0;i<e.length;){if((n=e.charCodeAt(i++))>255||(r=e.charCodeAt(i++))>255||(s=e.charCodeAt(i++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|s,o+=l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return i?o.slice(0,i-3)+"===".substring(i):o},f="function"==typeof btoa?e=>btoa(e):o?e=>Buffer.from(e,"binary").toString("base64"):g,b=o?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(d.apply(null,e.subarray(n,n+4096)));return f(t.join(""))},v=(e,t=!1)=>t?h(b(e)):b(e),y=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},k=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=e=>e.replace(k,y),_=o?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>b(a.encode(e)):e=>f(x(e)),w=(e,t=!1)=>t?h(_(e)):_(e),j=e=>w(e,!0),C=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,A=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return d((t>>>10)+55296)+d(56320+(1023&t));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},S=e=>e.replace(C,A),E=e=>{if(e=e.replace(/\s+/g,""),!u.test(e))throw new TypeError("malformed base64.");let t,n,r;e+="==".slice(2-(3&e.length));let s=[];for(let o=0;o<e.length;)t=c[e.charAt(o++)]<<18|c[e.charAt(o++)]<<12|(n=c[e.charAt(o++)])<<6|(r=c[e.charAt(o++)]),64===n?s.push(d(t>>16&255)):64===r?s.push(d(t>>16&255,t>>8&255)):s.push(d(t>>16&255,t>>8&255,255&t));return s.join("")},T="function"==typeof atob?e=>atob(m(e)):o?e=>Buffer.from(e,"base64").toString("binary"):E,N=o?e=>p(Buffer.from(e,"base64")):e=>p(T(e).split("").map(e=>e.charCodeAt(0))),P=e=>N(R(e)),B=o?e=>Buffer.from(e,"base64").toString("utf8"):i?e=>i.decode(N(e)):e=>S(T(e)),R=e=>m(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),I=e=>B(R(e)),D=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),L=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,D(t));e("fromBase64",function(){return I(this)}),e("toBase64",function(e){return w(this,e)}),e("toBase64URI",function(){return w(this,!0)}),e("toBase64URL",function(){return w(this,!0)}),e("toUint8Array",function(){return P(this)})},F=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,D(t));e("toBase64",function(e){return v(this,e)}),e("toBase64URI",function(){return v(this,!0)}),e("toBase64URL",function(){return v(this,!0)})},M={version:r,VERSION:s,atob:T,atobPolyfill:E,btoa:f,btoaPolyfill:g,fromBase64:I,toBase64:w,encode:w,encodeURI:j,encodeURL:j,utob:x,btou:S,decode:I,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:v,toUint8Array:P,extendString:L,extendUint8Array:F,extendBuiltins:()=>{L(),F()}}},7237(e,t,n){"use strict";n.d(t,{A:()=>m});var r=n(30724);function s(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function o(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===o(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const c={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function d(e){const t=e.re=(0,r.A)(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.email_fuzzy_global=RegExp(s(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(s(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(s(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");const l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===o(n))return!function(e){return"[object RegExp]"===o(e)}(n.validate)?i(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===o(e)}(n)?c(t,n):l.push(t)}),l.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};const u=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function p(e,t,n,r){const s=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=s,this.text=s,this.url=s}function h(e,t){if(!(this instanceof h))return new h(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=s({},l,t),this.__schemas__=s({},c,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},d(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},h.prototype.set=function(e){return this.__opts__=s(this.__opts__,e),this},h.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e))for(n=this.re.schema_search,n.lastIndex=0;null!==(t=n.exec(e));)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&e.search(this.re.host_fuzzy_test)>=0&&null!==e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))||!!(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==e.match(this.re.email_fuzzy))},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},h.prototype.match=function(e){const t=[],n=[],r=[],s=[];let o,i,a;function l(e,t){return e?t?e.index!==t.index?e.index<t.index?e:t:e.lastIndex>=t.lastIndex?e:t:e:t}if(!e.length)return null;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(o=a.exec(e));)i=this.testSchemaAt(e,o[2],a.lastIndex),i&&n.push({schema:o[2],index:o.index+o[1].length,lastIndex:o.index+o[0].length+i});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(a=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,a.lastIndex=0;null!==(o=a.exec(e));)r.push({schema:"",index:o.index+o[1].length,lastIndex:o.index+o[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(a=this.re.email_fuzzy_global,a.lastIndex=0;null!==(o=a.exec(e));)s.push({schema:"mailto:",index:o.index+o[1].length,lastIndex:o.index+o[0].length});const c=[0,0,0];let u=0;for(;;){const o=[n[c[0]],s[c[1]],r[c[2]]],i=l(l(o[0],o[1]),o[2]);if(!i)break;if(i===o[0]?c[0]++:i===o[1]?c[1]++:c[2]++,i.index<u)continue;const a=new p(e,i.schema,i.index,i.lastIndex);this.__compiled__[a.schema].normalize(a,this),t.push(a),u=i.lastIndex}return t.length?t:null},h.prototype.matchAtStart=function(e){if(!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const r=new p(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__compiled__[r.schema].normalize(r,this),r},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){};const m=h},30724(e,t,n){"use strict";n.d(t,{A:()=>a}),n.dn(a);var r=n(60905),s=n(80786),o=n(60804),i=n(3506);function a(e){const t={};e=e||{},t.src_Any=r.A.source,t.src_Cc=s.A.source,t.src_Z=i.A.source,t.src_P=o.A.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";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+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+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["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},97158(e,t,n){"use strict";n.d(t,{A:()=>r.A});var r=n(56838)},84384(e,t,n){"use strict";n.d(t,{A:()=>r});const r=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},58105(e,t,n){"use strict";n.d(t,{l:()=>o,p:()=>i});const r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",s="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+s+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),i=new RegExp("^(?:"+r+"|"+s+")")},54439(e,t,n){"use strict";n.r(t),n.d(t,{arrayReplaceAt:()=>p,asciiTrim:()=>I,assign:()=>d,escapeHtml:()=>j,escapeRE:()=>A,fromCodePoint:()=>m,has:()=>u,isMdAsciiPunct:()=>P,isPunctChar:()=>T,isPunctCharCode:()=>N,isSpace:()=>S,isString:()=>l,isValidEntityCode:()=>h,isWhiteSpace:()=>E,lib:()=>D,normalizeReference:()=>B,unescapeAll:()=>y,unescapeMd:()=>v});var r=n(25315),s=n(68407),o=n(60804),i=n(47795),a=n(9405);function l(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}const c=Object.prototype.hasOwnProperty;function u(e,t){return c.call(e,t)}function d(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function p(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function h(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(!!(65535&~e&&65534!=(65535&e))&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function m(e){if(e>65535){const t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const g=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,f=new RegExp(g.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),b=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function v(e){return e.indexOf("\\")<0?e:e.replace(g,"$1")}function y(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(f,function(e,t,n){return t||function(e,t){if(35===t.charCodeAt(0)&&b.test(t)){const n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return h(n)?m(n):e}const n=(0,a.Gz)(e);return n!==e?n:e}(e,n)})}const k=/[&<>"]/,x=/[&<>"]/g,_={"&":"&","<":"<",">":">",'"':"""};function w(e){return _[e]}function j(e){return k.test(e)?e.replace(x,w):e}const C=/[.?*+^$[\]\\(){}|-]/g;function A(e){return e.replace(C,"\\$&")}function S(e){switch(e){case 9:case 32:return!0}return!1}function E(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}function T(e){return o.A.test(e)||i.A.test(e)}function N(e){return T(m(e))}function P(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}}function B(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function R(e){return 32===e||9===e||10===e||13===e}function I(e){let t=0;for(;t<e.length&&R(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&R(e.charCodeAt(n));n--);return e.slice(t,n+1)}const D={mdurl:r,ucmicro:s}},80016(e,t,n){"use strict";n.r(t),n.d(t,{parseLinkDestination:()=>s.A,parseLinkLabel:()=>r.A,parseLinkTitle:()=>o.A});var r=n(65739),s=n(39945),o=n(8859)},39945(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n){let s,o=t;const i={ok:!1,pos:0,str:""};if(60===e.charCodeAt(o)){for(o++;o<n;){if(s=e.charCodeAt(o),10===s)return i;if(60===s)return i;if(62===s)return i.pos=o+1,i.str=(0,r.unescapeAll)(e.slice(t+1,o)),i.ok=!0,i;92===s&&o+1<n?o+=2:o++}return i}let a=0;for(;o<n&&(s=e.charCodeAt(o),32!==s)&&!(s<32||127===s);)if(92===s&&o+1<n){if(32===e.charCodeAt(o+1))break;o+=2}else{if(40===s&&(a++,a>32))return i;if(41===s){if(0===a)break;a--}o++}return t===o||0!==a||(i.str=(0,r.unescapeAll)(e.slice(t,o)),i.pos=o,i.ok=!0),i}},65739(e,t,n){"use strict";function r(e,t,n){let r,s,o,i;const a=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),93===o&&(r--,0===r)){s=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=l,-1}let c=-1;return s&&(c=e.pos),e.pos=l,c}n.d(t,{A:()=>r})},8859(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n,s){let o,i=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(s)a.str=s.str,a.marker=s.marker;else{if(i>=n)return a;let r=e.charCodeAt(i);if(34!==r&&39!==r&&40!==r)return a;t++,i++,40===r&&(r=41),a.marker=r}for(;i<n;){if(o=e.charCodeAt(i),o===a.marker)return a.pos=i+1,a.str+=(0,r.unescapeAll)(e.slice(t,i)),a.ok=!0,a;if(40===o&&41===a.marker)return a;92===o&&i+1<n&&i++,i++}return a.can_continue=!0,a.str+=(0,r.unescapeAll)(e.slice(t,i)),a}},56838(e,t,n){"use strict";n.d(t,{A:()=>w});var r=n(54439),s=n(80016),o=n(71455),i=n(55439),a=n(60737),l=n(42813),c=n(7237),u=n(25315),d=n(87072),p=n(69404),h=n(8079),m=n(26881);const g={default:p.A,zero:h.A,commonmark:m.A},f=/^(vbscript|javascript|file|data):/,b=/^data:image\/(gif|png|jpeg|webp);/;function v(e){const t=e.trim().toLowerCase();return!f.test(t)||b.test(t)}const y=["http:","https:","mailto:"];function k(e){const t=u.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=d.Ay.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function x(e){const t=u.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=d.Ay.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function _(e,t){if(!(this instanceof _))return new _(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l.A,this.block=new a.A,this.core=new i.A,this.renderer=new o.A,this.linkify=new c.A,this.validateLink=v,this.normalizeLink=k,this.normalizeLinkText=x,this.utils=r,this.helpers=r.assign({},s),this.options={},this.configure(e),t&&this.set(t)}_.prototype.set=function(e){return r.assign(this.options,e),this},_.prototype.configure=function(e){const t=this;if(r.isString(e)){const t=e;if(!(e=g[t]))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&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},_.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},_.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},_.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},_.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},_.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},_.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},_.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const w=_},60737(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(79358),s=n(52961),o=n(20712),i=n(47103),a=n(36283),l=n(97537),c=n(79062),u=n(25792),d=n(43863),p=n(72577),h=n(13318),m=n(94206),g=n(94970);const f=[["table",o.A,["paragraph","reference"]],["code",i.A],["fence",a.A,["paragraph","reference","blockquote","list"]],["blockquote",l.A,["paragraph","reference","blockquote","list"]],["hr",c.A,["paragraph","reference","blockquote","list"]],["list",u.A,["paragraph","reference","blockquote"]],["reference",d.A],["html_block",p.A,["paragraph","reference","blockquote"]],["heading",h.A,["paragraph","reference","blockquote"]],["lheading",m.A],["paragraph",g.A]];function b(){this.ruler=new r.A;for(let e=0;e<f.length;e++)this.ruler.push(f[e][0],f[e][1],{alt:(f[e][2]||[]).slice()})}b.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),s=r.length,o=e.md.options.maxNesting;let i=t,a=!1;for(;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=o){e.line=n;break}const t=e.line;let l=!1;for(let o=0;o<s;o++)if(l=r[o](e,i,n,!1),l){if(t>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),i=e.line,i<n&&e.isEmpty(i)&&(a=!0,i++,e.line=i)}},b.prototype.parse=function(e,t,n,r){if(!e)return;const s=new this.State(e,t,n,r);this.tokenize(s,s.line,s.lineMax)},b.prototype.State=s.A;const v=b},55439(e,t,n){"use strict";n.d(t,{A:()=>m});var r=n(79358),s=n(37569),o=n(2699),i=n(79417),a=n(85189),l=n(96084),c=n(48541),u=n(55834),d=n(11242);const p=[["normalize",o.A],["block",i.A],["inline",a.A],["linkify",l.A],["replacements",c.A],["smartquotes",u.A],["text_join",d.A]];function h(){this.ruler=new r.A;for(let e=0;e<p.length;e++)this.ruler.push(p[e][0],p[e][1])}h.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},h.prototype.State=s.A;const m=h},42813(e,t,n){"use strict";n.d(t,{A:()=>_});var r=n(79358),s=n(60057),o=n(68597),i=n(44938),a=n(94076),l=n(17785),c=n(38797),u=n(50925),d=n(62206),p=n(22128),h=n(74427),m=n(85469),g=n(7105),f=n(41517),b=n(76014),v=n(70322);const y=[["text",o.A],["linkify",i.A],["newline",a.A],["escape",l.A],["backticks",c.A],["strikethrough",u.A.tokenize],["emphasis",d.A.tokenize],["link",p.A],["image",h.A],["autolink",m.A],["html_inline",g.A],["entity",f.A]],k=[["balance_pairs",b.A],["strikethrough",u.A.postProcess],["emphasis",d.A.postProcess],["fragments_join",v.A]];function x(){this.ruler=new r.A;for(let e=0;e<y.length;e++)this.ruler.push(y[e][0],y[e][1]);this.ruler2=new r.A;for(let e=0;e<k.length;e++)this.ruler2.push(k[e][0],k[e][1])}x.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,s=e.md.options.maxNesting,o=e.cache;if(void 0!==o[t])return void(e.pos=o[t]);let i=!1;if(e.level<s){for(let s=0;s<r;s++)if(e.level++,i=n[s](e,!0),e.level--,i){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,o[t]=e.pos},x.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,s=e.md.options.maxNesting;for(;e.pos<r;){const o=e.pos;let i=!1;if(e.level<s)for(let r=0;r<n;r++)if(i=t[r](e,!1),i){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(i){if(e.pos>=r)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},x.prototype.parse=function(e,t,n,r){const s=new this.State(e,t,n,r);this.tokenize(s);const o=this.ruler2.getRules(""),i=o.length;for(let e=0;e<i;e++)o[e](s)},x.prototype.State=s.A;const _=x},26881(e,t,n){"use strict";n.d(t,{A:()=>r});const r={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},69404(e,t,n){"use strict";n.d(t,{A:()=>r});const r={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},8079(e,t,n){"use strict";n.d(t,{A:()=>r});const r={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}}},71455(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(54439);const s={};function o(){this.rules=(0,r.assign)({},s)}s.code_inline=function(e,t,n,s,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+(0,r.escapeHtml)(i.content)+"</code>"},s.code_block=function(e,t,n,s,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+(0,r.escapeHtml)(e[t].content)+"</code></pre>\n"},s.fence=function(e,t,n,s,o){const i=e[t],a=i.info?(0,r.unescapeAll)(i.info).trim():"";let l,c="",u="";if(a){const e=a.split(/(\s+)/g);c=e[0],u=e.slice(2).join("")}if(l=n.highlight&&n.highlight(i.content,c,u)||(0,r.escapeHtml)(i.content),0===l.indexOf("<pre"))return l+"\n";if(a){const e=i.attrIndex("class"),t=i.attrs?i.attrs.slice():[];e<0?t.push(["class",n.langPrefix+c]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+c);const r={attrs:t};return`<pre><code${o.renderAttrs(r)}>${l}</code></pre>\n`}return`<pre><code${o.renderAttrs(i)}>${l}</code></pre>\n`},s.image=function(e,t,n,r,s){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,n,r),s.renderToken(e,t,n)},s.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},s.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},s.text=function(e,t){return(0,r.escapeHtml)(e[t].content)},s.html_block=function(e,t){return e[t].content},s.html_inline=function(e,t){return e[t].content},o.prototype.renderAttrs=function(e){let t,n,s;if(!e.attrs)return"";for(s="",t=0,n=e.attrs.length;t<n;t++)s+=" "+(0,r.escapeHtml)(e.attrs[t][0])+'="'+(0,r.escapeHtml)(e.attrs[t][1])+'"';return s},o.prototype.renderToken=function(e,t,n){const r=e[t];let s="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(s+="\n"),s+=(-1===r.nesting?"</":"<")+r.tag,s+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(s+=" /");let o=!1;if(r.block&&(o=!0,1===r.nesting&&t+1<e.length)){const n=e[t+1];("inline"===n.type||n.hidden||-1===n.nesting&&n.tag===r.tag)&&(o=!1)}return s+=o?">\n":">",s},o.prototype.renderInline=function(e,t,n){let r="";const s=this.rules;for(let o=0,i=e.length;o<i;o++){const i=e[o].type;void 0!==s[i]?r+=s[i](e,o,t,n,this):r+=this.renderToken(e,o,t)}return r},o.prototype.renderInlineAsText=function(e,t,n){let r="";for(let s=0,o=e.length;s<o;s++)switch(e[s].type){case"text":case"html_inline":case"html_block":r+=e[s].content;break;case"image":r+=this.renderInlineAsText(e[s].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},o.prototype.render=function(e,t,n){let r="";const s=this.rules;for(let o=0,i=e.length;o<i;o++){const i=e[o].type;"inline"===i?r+=this.renderInline(e[o].children,t,n):void 0!==s[i]?r+=s[i](e,o,t,n,this):r+=this.renderToken(e,o,t,n)}return r};const i=o},79358(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}n.d(t,{A:()=>s}),r.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},r.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},r.prototype.at=function(e,t,n){const r=this.__find__(e),s=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=s.alt||[],this.__cache__=null},r.prototype.before=function(e,t,n,r){const s=this.__find__(e),o=r||{};if(-1===s)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},r.prototype.after=function(e,t,n,r){const s=this.__find__(e),o=r||{};if(-1===s)throw new Error("Parser rule not found: "+e);this.__rules__.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},r.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},r.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},r.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},r.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},r.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]};const s=r},97537(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n,s){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(o))return!1;if(s)return!0;const l=[],c=[],u=[],d=[],p=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let m,g=!1;for(m=t;m<n;m++){const t=e.sCount[m]<e.blkIndent;if(o=e.bMarks[m]+e.tShift[m],i=e.eMarks[m],o>=i)break;if(62===e.src.charCodeAt(o++)&&!t){let t,n,s=e.sCount[m]+1;32===e.src.charCodeAt(o)?(o++,s++,n=!1,t=!0):9===e.src.charCodeAt(o)?(t=!0,(e.bsCount[m]+s)%4==3?(o++,s++,n=!1):n=!0):t=!1;let a=s;for(l.push(e.bMarks[m]),e.bMarks[m]=o;o<i;){const t=e.src.charCodeAt(o);if(!(0,r.isSpace)(t))break;9===t?a+=4-(a+e.bsCount[m]+(n?1:0))%4:a++,o++}g=o>=i,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(t?1:0),u.push(e.sCount[m]),e.sCount[m]=a-s,d.push(e.tShift[m]),e.tShift[m]=o-e.bMarks[m];continue}if(g)break;let s=!1;for(let t=0,r=p.length;t<r;t++)if(p[t](e,m,n,!0)){s=!0;break}if(s){e.lineMax=m,0!==e.blkIndent&&(l.push(e.bMarks[m]),c.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}l.push(e.bMarks[m]),c.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]=-1}const f=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const v=[t,0];b.map=v,e.md.block.tokenize(e,t,m);e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=a,e.parentType=h,v[1]=e.line;for(let n=0;n<d.length;n++)e.bMarks[n+t]=l[n],e.tShift[n+t]=d[n],e.sCount[n+t]=u[n],e.bsCount[n+t]=c[n];return e.blkIndent=f,!0}},47103(e,t,n){"use strict";function r(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,s=r;for(;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;r++,s=r}e.line=s;const o=e.push("code_block","code",0);return o.content=e.getLines(t,s,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}n.d(t,{A:()=>r})},36283(e,t,n){"use strict";function r(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(s+3>o)return!1;const i=e.src.charCodeAt(s);if(126!==i&&96!==i)return!1;let a=s;s=e.skipChars(s,i);let l=s-a;if(l<3)return!1;const c=e.src.slice(a,s),u=e.src.slice(s,o);if(96===i&&u.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let d=t,p=!1;for(;(d++,!(d>=n))&&(s=a=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],!(s<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(s)===i&&!(e.sCount[d]-e.blkIndent>=4||(s=e.skipChars(s,i),s-a<l||(s=e.skipSpaces(s),s<o)))){p=!0;break}l=e.sCount[t],e.line=d+(p?1:0);const h=e.push("fence","code",0);return h.info=u,h.content=e.getLines(t+1,d,l,!0),h.markup=c,h.map=[t,e.line],!0}n.d(t,{A:()=>r})},13318(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n,s){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(o);if(35!==a||o>=i)return!1;let l=1;for(a=e.src.charCodeAt(++o);35===a&&o<i&&l<=6;)l++,a=e.src.charCodeAt(++o);if(l>6||o<i&&!(0,r.isSpace)(a))return!1;if(s)return!0;i=e.skipSpacesBack(i,o);const c=e.skipCharsBack(i,35,o);c>o&&(0,r.isSpace)(e.src.charCodeAt(c-1))&&(i=c),e.line=t+1;const u=e.push("heading_open","h"+String(l),1);u.markup="########".slice(0,l),u.map=[t,e.line];const d=e.push("inline","",0);d.content=(0,r.asciiTrim)(e.src.slice(o,i)),d.map=[t,e.line],d.children=[];return e.push("heading_close","h"+String(l),-1).markup="########".slice(0,l),!0}},79062(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n,s){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(i++);if(42!==a&&45!==a&&95!==a)return!1;let l=1;for(;i<o;){const t=e.src.charCodeAt(i++);if(t!==a&&!(0,r.isSpace)(t))return!1;t===a&&l++}if(l<3)return!1;if(s)return!0;e.line=t+1;const c=e.push("hr","hr",0);return c.map=[t,e.line],c.markup=Array(l+1).join(String.fromCharCode(a)),!0}},72577(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(84384),s=n(58105);const o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.A.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(s.p.source+"\\s*$"),/^$/,!1]];function i(e,t,n,r){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(s))return!1;let a=e.src.slice(s,i),l=0;for(;l<o.length&&!o[l][0].test(a);l++);if(l===o.length)return!1;if(r)return o[l][2];let c=t+1;const u=o[l][1].test("");if(!o[l][1].test(a))for(;c<n&&(!(e.sCount[c]<e.blkIndent)||!u&&e.isEmpty(c));c++)if(s=e.bMarks[c]+e.tShift[c],i=e.eMarks[c],a=e.src.slice(s,i),o[l][1].test(a)){0!==a.length&&c++;break}e.line=c;const d=e.push("html_block","",0);return d.map=[t,c],d.content=e.getLines(t,c,e.blkIndent,!0),!0}},94206(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n){const s=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i,a=0,l=t+1;for(;l<n&&!e.isEmpty(l);l++){if(e.sCount[l]-e.blkIndent>3)continue;if(e.sCount[l]>=e.blkIndent){let t=e.bMarks[l]+e.tShift[l];const n=e.eMarks[l];if(t<n&&(i=e.src.charCodeAt(t),(45===i||61===i)&&(t=e.skipChars(t,i),t=e.skipSpaces(t),t>=n))){a=61===i?1:2;break}}if(e.sCount[l]<0)continue;let t=!1;for(let r=0,o=s.length;r<o;r++)if(s[r](e,l,n,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=o,!1;const c=(0,r.asciiTrim)(e.getLines(t,l,e.blkIndent,!1));e.line=l+1;const u=e.push("heading_open","h"+String(a),1);u.markup=String.fromCharCode(i),u.map=[t,e.line];const d=e.push("inline","",0);d.content=c,d.map=[t,e.line-1],d.children=[];return e.push("heading_close","h"+String(a),-1).markup=String.fromCharCode(i),e.parentType=o,!0}},25792(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(54439);function s(e,t){const n=e.eMarks[t];let s=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(s++);if(42!==o&&45!==o&&43!==o)return-1;if(s<n){const t=e.src.charCodeAt(s);if(!(0,r.isSpace)(t))return-1}return s}function o(e,t){const n=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];let o=n;if(o+1>=s)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=s)return-1;if(i=e.src.charCodeAt(o++),!(i>=48&&i<=57)){if(41===i||46===i)break;return-1}if(o-n>=10)return-1}return o<s&&(i=e.src.charCodeAt(o),!(0,r.isSpace)(i))?-1:o}function i(e,t,n,r){let i,a,l,c,u=t,d=!0;if(e.sCount[u]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let p,h,m,g=!1;if(r&&"paragraph"===e.parentType&&e.sCount[u]>=e.blkIndent&&(g=!0),(m=o(e,u))>=0){if(p=!0,l=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(l,m-1)),g&&1!==h)return!1}else{if(!((m=s(e,u))>=0))return!1;p=!1}if(g&&e.skipSpaces(m)>=e.eMarks[u])return!1;if(r)return!0;const f=e.src.charCodeAt(m-1),b=e.tokens.length;p?(c=e.push("ordered_list_open","ol",1),1!==h&&(c.attrs=[["start",h]])):c=e.push("bullet_list_open","ul",1);const v=[u,0];c.map=v,c.markup=String.fromCharCode(f);let y=!1;const k=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){a=m,i=e.eMarks[u];const t=e.sCount[u]+m-(e.bMarks[u]+e.tShift[u]);let r=t;for(;a<i;){const t=e.src.charCodeAt(a);if(9===t)r+=4-(r+e.bsCount[u])%4;else{if(32!==t)break;r++}a++}const h=a;let g;g=h>=i?1:r-t,g>4&&(g=1);const b=t+g;c=e.push("list_item_open","li",1),c.markup=String.fromCharCode(f);const v=[u,0];c.map=v,p&&(c.info=e.src.slice(l,m-1));const x=e.tight,_=e.tShift[u],w=e.sCount[u],j=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=b,e.tight=!0,e.tShift[u]=h-e.bMarks[u],e.sCount[u]=r,h>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),e.tight&&!y||(d=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=j,e.tShift[u]=_,e.sCount[u]=w,e.tight=x,c=e.push("list_item_close","li",-1),c.markup=String.fromCharCode(f),u=e.line,v[1]=u,u>=n)break;if(e.sCount[u]<e.blkIndent)break;if(e.sCount[u]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=k.length;t<r;t++)if(k[t](e,u,n,!0)){C=!0;break}if(C)break;if(p){if(m=o(e,u),m<0)break;l=e.bMarks[u]+e.tShift[u]}else if(m=s(e,u),m<0)break;if(f!==e.src.charCodeAt(m-1))break}return c=p?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),c.markup=String.fromCharCode(f),v[1]=u,e.line=u,e.parentType=x,d&&function(e,t){const n=e.level+2;for(let r=t+2,s=e.tokens.length-2;r<s;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,b),!0}},94970(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n){const s=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]<0)continue;let t=!1;for(let r=0,o=s.length;r<o;r++)if(s[r](e,i,n,!0)){t=!0;break}if(t)break}const a=(0,r.asciiTrim)(e.getLines(t,i,e.blkIndent,!1));e.line=i;e.push("paragraph_open","p",1).map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}},43863(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t,n,s){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(o))return!1;function l(t){const n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){const r=e.md.block.ruler.getRules("reference"),s=e.parentType;e.parentType="reference";let o=!1;for(let s=0,i=r.length;s<i;s++)if(r[s](e,t,n,!0)){o=!0;break}if(e.parentType=s,o)return null}const s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(s,o+1)}let c=e.src.slice(o,i+1);i=c.length;let u=-1;for(o=1;o<i;o++){const e=c.charCodeAt(o);if(91===e)return!1;if(93===e){u=o;break}if(10===e){const e=l(a);null!==e&&(c+=e,i=c.length,a++)}else if(92===e&&(o++,o<i&&10===c.charCodeAt(o))){const e=l(a);null!==e&&(c+=e,i=c.length,a++)}}if(u<0||58!==c.charCodeAt(u+1))return!1;for(o=u+2;o<i;o++){const e=c.charCodeAt(o);if(10===e){const e=l(a);null!==e&&(c+=e,i=c.length,a++)}else if(!(0,r.isSpace)(e))break}const d=e.md.helpers.parseLinkDestination(c,o,i);if(!d.ok)return!1;const p=e.md.normalizeLink(d.str);if(!e.md.validateLink(p))return!1;o=d.pos;const h=o,m=a,g=o;for(;o<i;o++){const e=c.charCodeAt(o);if(10===e){const e=l(a);null!==e&&(c+=e,i=c.length,a++)}else if(!(0,r.isSpace)(e))break}let f,b=e.md.helpers.parseLinkTitle(c,o,i);for(;b.can_continue;){const t=l(a);if(null===t)break;c+=t,o=i,i=c.length,a++,b=e.md.helpers.parseLinkTitle(c,o,i,b)}for(o<i&&g!==o&&b.ok?(f=b.str,o=b.pos):(f="",o=h,a=m);o<i;){const e=c.charCodeAt(o);if(!(0,r.isSpace)(e))break;o++}if(o<i&&10!==c.charCodeAt(o)&&f)for(f="",o=h,a=m;o<i;){const e=c.charCodeAt(o);if(!(0,r.isSpace)(e))break;o++}if(o<i&&10!==c.charCodeAt(o))return!1;const v=(0,r.normalizeReference)(c.slice(1,u));return!!v&&(s||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[v]&&(e.env.references[v]={title:f,href:p}),e.line=a),!0)}},52961(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(57997),s=n(54439);function o(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let e=0,t=0,n=0,r=0,i=o.length,a=!1;t<i;t++){const l=o.charCodeAt(t);if(!a){if((0,s.isSpace)(l)){n++,9===l?r+=4-r%4:r++;continue}a=!0}10!==l&&t!==i-1||(10!==l&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),a=!1,n=0,r=0,e=t+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){const s=new r.A(e,t,n);return s.block=!0,n<0&&this.level--,s.level=this.level,n>0&&this.level++,this.tokens.push(s),s},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const t=this.src.charCodeAt(e);if(!(0,s.isSpace)(t))break}return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!(0,s.isSpace)(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const o=new Array(t-e);for(let i=0,a=e;a<t;a++,i++){let e=0;const l=this.bMarks[a];let c,u=l;for(c=a+1<t||r?this.eMarks[a]+1:this.eMarks[a];u<c&&e<n;){const t=this.src.charCodeAt(u);if((0,s.isSpace)(t))9===t?e+=4-(e+this.bsCount[a])%4:e++;else{if(!(u-l<this.tShift[a]))break;e++}u++}o[i]=e>n?new Array(e-n+1).join(" ")+this.src.slice(u,c):this.src.slice(u,c)}return o.join("")},o.prototype.Token=r.A;const i=o},20712(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(54439);function s(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function o(e){const t=[],n=e.length;let r=0,s=e.charCodeAt(r),o=!1,i=0,a="";for(;r<n;)124===s&&(o?(a+=e.substring(i,r-1),i=r):(t.push(a+e.substring(i,r)),a="",i=r+1)),o=92===s,r++,s=e.charCodeAt(r);return t.push(a+e.substring(i)),t}function i(e,t,n,i){if(t+2>n)return!1;let a=t+1;if(e.sCount[a]<e.blkIndent)return!1;if(e.sCount[a]-e.blkIndent>=4)return!1;let l=e.bMarks[a]+e.tShift[a];if(l>=e.eMarks[a])return!1;const c=e.src.charCodeAt(l++);if(124!==c&&45!==c&&58!==c)return!1;if(l>=e.eMarks[a])return!1;const u=e.src.charCodeAt(l++);if(124!==u&&45!==u&&58!==u&&!(0,r.isSpace)(u))return!1;if(45===c&&(0,r.isSpace)(u))return!1;for(;l<e.eMarks[a];){const t=e.src.charCodeAt(l);if(124!==t&&45!==t&&58!==t&&!(0,r.isSpace)(t))return!1;l++}let d=s(e,t+1),p=d.split("|");const h=[];for(let e=0;e<p.length;e++){const t=p[e].trim();if(!t){if(0===e||e===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?h.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?h.push("left"):h.push("")}if(d=s(e,t).trim(),-1===d.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;p=o(d),p.length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop();const m=p.length;if(0===m||m!==h.length)return!1;if(i)return!0;const g=e.parentType;e.parentType="table";const f=e.md.block.ruler.getRules("blockquote"),b=[t,0];e.push("table_open","table",1).map=b;e.push("thead_open","thead",1).map=[t,t+1];e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<p.length;t++){const n=e.push("th_open","th",1);h[t]&&(n.attrs=[["style","text-align:"+h[t]]]);const r=e.push("inline","",0);r.content=p[t].trim(),r.children=[],e.push("th_close","th",-1)}let v;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y=0;for(a=t+2;a<n&&!(e.sCount[a]<e.blkIndent);a++){let r=!1;for(let t=0,s=f.length;t<s;t++)if(f[t](e,a,n,!0)){r=!0;break}if(r)break;if(d=s(e,a).trim(),!d)break;if(e.sCount[a]-e.blkIndent>=4)break;if(p=o(d),p.length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),y+=m-p.length,y>65536)break;if(a===t+2){e.push("tbody_open","tbody",1).map=v=[t+2,0]}e.push("tr_open","tr",1).map=[a,a+1];for(let t=0;t<m;t++){const n=e.push("td_open","td",1);h[t]&&(n.attrs=[["style","text-align:"+h[t]]]);const r=e.push("inline","",0);r.content=p[t]?p[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=a),e.push("table_close","table",-1),b[1]=a,e.parentType=g,e.line=a,!0}},79417(e,t,n){"use strict";function r(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}n.d(t,{A:()=>r})},85189(e,t,n){"use strict";function r(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}n.d(t,{A:()=>r})},96084(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(54439);function s(e){return/^<a[>\s]/i.test(e)}function o(e){return/^<\/a\s*>/i.test(e)}function i(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n<i;n++){if("inline"!==t[n].type||!e.md.linkify.pretest(t[n].content))continue;let i=t[n].children,a=0;for(let l=i.length-1;l>=0;l--){const c=i[l];if("link_close"!==c.type){if("html_inline"===c.type&&(s(c.content)&&a>0&&a--,o(c.content)&&a++),!(a>0)&&"text"===c.type&&e.md.linkify.test(c.content)){const s=c.content;let o=e.md.linkify.match(s);const a=[];let u=c.level,d=0;o.length>0&&0===o[0].index&&l>0&&"text_special"===i[l-1].type&&(o=o.slice(1));for(let t=0;t<o.length;t++){const n=o[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let i=o[t].text;i=o[t].schema?"mailto:"!==o[t].schema||/^mailto:/i.test(i)?e.md.normalizeLinkText(i):e.md.normalizeLinkText("mailto:"+i).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+i).replace(/^http:\/\//,"");const l=o[t].index;if(l>d){const t=new e.Token("text","",0);t.content=s.slice(d,l),t.level=u,a.push(t)}const c=new e.Token("link_open","a",1);c.attrs=[["href",r]],c.level=u++,c.markup="linkify",c.info="auto",a.push(c);const p=new e.Token("text","",0);p.content=i,p.level=u,a.push(p);const h=new e.Token("link_close","a",-1);h.level=--u,h.markup="linkify",h.info="auto",a.push(h),d=o[t].lastIndex}if(d<s.length){const t=new e.Token("text","",0);t.content=s.slice(d),t.level=u,a.push(t)}t[n].children=i=(0,r.arrayReplaceAt)(i,l,a)}}else for(l--;i[l].level!==c.level&&"link_open"!==i[l].type;)l--}}}},2699(e,t,n){"use strict";n.d(t,{A:()=>o});const r=/\r\n?|\n/g,s=/\0/g;function o(e){let t;t=e.src.replace(r,"\n"),t=t.replace(s,"�"),e.src=t}},48541(e,t,n){"use strict";n.d(t,{A:()=>u});const r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,s=/\((c|tm|r)\)/i,o=/\((c|tm|r)\)/gi,i={c:"©",r:"®",tm:"™"};function a(e,t){return i[t.toLowerCase()]}function l(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||(r.content=r.content.replace(o,a)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}function c(e){let t=0;for(let n=e.length-1;n>=0;n--){const s=e[n];"text"!==s.type||t||r.test(s.content)&&(s.content=s.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"===s.type&&"auto"===s.info&&t--,"link_close"===s.type&&"auto"===s.info&&t++}}function u(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(s.test(e.tokens[t].content)&&l(e.tokens[t].children),r.test(e.tokens[t].content)&&c(e.tokens[t].children))}},55834(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(54439);const s=/['"]/,o=/['"]/g;function i(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function a(e,t){let n;const s=[],a={};for(let l=0;l<e.length;l++){const c=e[l],u=e[l].level;for(n=s.length-1;n>=0&&!(s[n].level<=u);n--);if(s.length=n+1,"text"!==c.type)continue;const d=c.content;let p=0;const h=d.length;e:for(;p<h;){o.lastIndex=p;const c=o.exec(d);if(!c)break;let m=!0,g=!0;p=c.index+1;const f="'"===c[0];let b=32;if(c.index-1>=0)b=d.charCodeAt(c.index-1);else for(n=l-1;n>=0&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n--)if(e[n].content){b=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(p<h)v=d.charCodeAt(p);else for(n=l+1;n<e.length&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n++)if(e[n].content){v=e[n].content.charCodeAt(0);break}const y=(0,r.isMdAsciiPunct)(b)||(0,r.isPunctCharCode)(b),k=(0,r.isMdAsciiPunct)(v)||(0,r.isPunctCharCode)(v),x=(0,r.isWhiteSpace)(b),_=(0,r.isWhiteSpace)(v);if(_?m=!1:k&&(x||y||(m=!1)),x?g=!1:y&&(_||k||(g=!1)),34===v&&'"'===c[0]&&b>=48&&b<=57&&(g=m=!1),m&&g&&(m=y,g=k),m||g){if(g)for(n=s.length-1;n>=0;n--){let e=s[n];if(s[n].level<u)break;if(e.single===f&&s[n].level===u){let r,o;e=s[n],f?(r=t.md.options.quotes[2],o=t.md.options.quotes[3]):(r=t.md.options.quotes[0],o=t.md.options.quotes[1]),i(a,l,c.index,o),i(a,e.token,e.pos,r),s.length=n;continue e}}m?s.push({token:l,pos:c.index,single:f,level:u}):g&&f&&i(a,l,c.index,"’")}else f&&i(a,l,c.index,"’")}}Object.keys(a).forEach(function(t){e[t].content=function(e,t){let n="",r=0;t.sort((e,t)=>e.pos-t.pos);for(let s=0;s<t.length;s++){const o=t[s];n+=e.slice(r,o.pos)+o.ch,r=o.pos+1}return n+e.slice(r)}(e[t].content,a[t])})}function l(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&s.test(e.tokens[t].content)&&a(e.tokens[t].children,e)}},37569(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(57997);function s(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}s.prototype.Token=r.A;const o=s},11242(e,t,n){"use strict";function r(e){let t,n;const r=e.tokens,s=r.length;for(let e=0;e<s;e++){if("inline"!==r[e].type)continue;const s=r[e].children,o=s.length;for(t=0;t<o;t++)"text_special"===s[t].type&&(s[t].type="text");for(t=n=0;t<o;t++)"text"===s[t].type&&t+1<o&&"text"===s[t+1].type?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}n.d(t,{A:()=>r})},85469(e,t,n){"use strict";n.d(t,{A:()=>o});const r=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,s=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function o(e,t){let n=e.pos;if(60!==e.src.charCodeAt(n))return!1;const o=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}const a=e.src.slice(o+1,n);if(s.test(a)){const n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=a.length+2,!0}if(r.test(a)){const n=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=a.length+2,!0}return!1}},38797(e,t,n){"use strict";function r(e,t){let n=e.pos;if(96!==e.src.charCodeAt(n))return!1;const r=n;n++;const s=e.posMax;for(;n<s&&96===e.src.charCodeAt(n);)n++;const o=e.src.slice(r,n),i=o.length;if(e.backticksScanned&&(e.backticks[i]||0)<=r)return t||(e.pending+=o),e.pos+=i,!0;let a,l=n;for(;-1!==(a=e.src.indexOf("`",l));){for(l=a+1;l<s&&96===e.src.charCodeAt(l);)l++;const r=l-a;if(r===i){if(!t){const t=e.push("code_inline","code",0);t.markup=o,t.content=e.src.slice(n,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[r]=a}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=i,!0}n.d(t,{A:()=>r})},76014(e,t,n){"use strict";function r(e){const t={},n=e.length;if(!n)return;let r=0,s=-2;const o=[];for(let i=0;i<n;i++){const n=e[i];if(o.push(0),e[r].marker===n.marker&&s===n.token-1||(r=i),s=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[n.marker][(n.open?3:0)+n.length%3];let l=r-o[r]-1,c=l;for(;l>a;l-=o[l]+1){const t=e[l];if(t.marker===n.marker&&(t.open&&t.end<0)){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3==0&&n.length%3==0||(r=!0)),!r){const r=l>0&&!e[l-1].open?o[l-1]+1:0;o[i]=i-l+r,o[l]=r,n.open=!1,t.end=i,t.close=!1,c=-1,s=-2;break}}}-1!==c&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}function s(e){const t=e.tokens_meta,n=e.tokens_meta.length;r(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&r(t[e].delimiters)}n.d(t,{A:()=>s})},62206(e,t,n){"use strict";function r(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(95!==r.marker&&42!==r.marker)continue;if(-1===r.end)continue;const s=t[r.end],o=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===s.token+1,i=String.fromCharCode(r.marker),a=e.tokens[r.token];a.type=o?"strong_open":"em_open",a.tag=o?"strong":"em",a.nesting=1,a.markup=o?i+i:i,a.content="";const l=e.tokens[s.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?i+i:i,l.content="",o&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--)}}n.d(t,{A:()=>s});const s={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(95!==r&&42!==r)return!1;const s=e.scanDelims(e.pos,42===r);for(let t=0;t<s.length;t++){e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:s.length,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;r(e,e.delimiters);for(let s=0;s<n;s++)t[s]&&t[s].delimiters&&r(e,t[s].delimiters)}}},41517(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(9405),s=n(54439);const o=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,i=/^&([a-z][a-z0-9]{1,31});/i;function a(e,t){const n=e.pos,a=e.posMax;if(38!==e.src.charCodeAt(n))return!1;if(n+1>=a)return!1;if(35===e.src.charCodeAt(n+1)){const r=e.src.slice(n).match(o);if(r){if(!t){const t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=(0,s.isValidEntityCode)(t)?(0,s.fromCodePoint)(t):(0,s.fromCodePoint)(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{const s=e.src.slice(n).match(i);if(s){const n=(0,r.hl)(s[0]);if(n!==s[0]){if(!t){const t=e.push("text_special","",0);t.content=n,t.markup=s[0],t.info="entity"}return e.pos+=s[0].length,!0}}}return!1}},17785(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(54439);const s=[];for(let e=0;e<256;e++)s.push(0);function o(e,t){let n=e.pos;const o=e.posMax;if(92!==e.src.charCodeAt(n))return!1;if(n++,n>=o)return!1;let i=e.src.charCodeAt(n);if(10===i){for(t||e.push("hardbreak","br",0),n++;n<o&&(i=e.src.charCodeAt(n),(0,r.isSpace)(i));)n++;return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<o){const t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}const l="\\"+a;if(!t){const t=e.push("text_special","",0);i<256&&0!==s[i]?t.content=a:t.content=l,t.markup=l,t.info="escape"}return e.pos=n+1,!0}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){s[e.charCodeAt(0)]=1})},70322(e,t,n){"use strict";function r(e){let t,n,r=0;const s=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)s[t].nesting<0&&r--,s[t].level=r,s[t].nesting>0&&r++,"text"===s[t].type&&t+1<o&&"text"===s[t+1].type?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}n.d(t,{A:()=>r})},7105(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(58105);function s(e,t){if(!e.md.options.html)return!1;const n=e.posMax,s=e.pos;if(60!==e.src.charCodeAt(s)||s+2>=n)return!1;const o=e.src.charCodeAt(s+1);if(33!==o&&63!==o&&47!==o&&!function(e){const t=32|e;return t>=97&&t<=122}(o))return!1;const i=e.src.slice(s).match(r.l);if(!i)return!1;if(!t){const t=e.push("html_inline","",0);t.content=i[0],a=t.content,/^<a[>\s]/i.test(a)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(t.content)&&e.linkLevel--}var a;return e.pos+=i[0].length,!0}},74427(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t){let n,s,o,i,a,l,c,u,d="";const p=e.pos,h=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const m=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i<h&&40===e.src.charCodeAt(i)){for(i++;i<h&&(n=e.src.charCodeAt(i),(0,r.isSpace)(n)||10===n);i++);if(i>=h)return!1;for(u=i,l=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),l.ok&&(d=e.md.normalizeLink(l.str),e.md.validateLink(d)?i=l.pos:d=""),u=i;i<h&&(n=e.src.charCodeAt(i),(0,r.isSpace)(n)||10===n);i++);if(l=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<h&&u!==i&&l.ok)for(c=l.str,i=l.pos;i<h&&(n=e.src.charCodeAt(i),(0,r.isSpace)(n)||10===n);i++);else c="";if(i>=h||41!==e.src.charCodeAt(i))return e.pos=p,!1;i++}else{if(void 0===e.env.references)return!1;if(i<h&&91===e.src.charCodeAt(i)?(u=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(u,i++):i=g+1):i=g+1,o||(o=e.src.slice(m,g)),a=e.env.references[(0,r.normalizeReference)(o)],!a)return e.pos=p,!1;d=a.href,c=a.title}if(!t){s=e.src.slice(m,g);const t=[];e.md.inline.parse(s,e.md,e.env,t);const n=e.push("image","img",0),r=[["src",d],["alt",""]];n.attrs=r,n.children=t,n.content=s,c&&r.push(["title",c])}return e.pos=i,e.posMax=h,!0}},22128(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t){let n,s,o,i,a="",l="",c=e.pos,u=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const d=e.pos,p=e.posMax,h=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let g=m+1;if(g<p&&40===e.src.charCodeAt(g)){for(u=!1,g++;g<p&&(n=e.src.charCodeAt(g),(0,r.isSpace)(n)||10===n);g++);if(g>=p)return!1;if(c=g,o=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),o.ok){for(a=e.md.normalizeLink(o.str),e.md.validateLink(a)?g=o.pos:a="",c=g;g<p&&(n=e.src.charCodeAt(g),(0,r.isSpace)(n)||10===n);g++);if(o=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<p&&c!==g&&o.ok)for(l=o.str,g=o.pos;g<p&&(n=e.src.charCodeAt(g),(0,r.isSpace)(n)||10===n);g++);}(g>=p||41!==e.src.charCodeAt(g))&&(u=!0),g++}if(u){if(void 0===e.env.references)return!1;if(g<p&&91===e.src.charCodeAt(g)?(c=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?s=e.src.slice(c,g++):g=m+1):g=m+1,s||(s=e.src.slice(h,m)),i=e.env.references[(0,r.normalizeReference)(s)],!i)return e.pos=d,!1;a=i.href,l=i.title}if(!t){e.pos=h,e.posMax=m;const t=[["href",a]];e.push("link_open","a",1).attrs=t,l&&t.push(["title",l]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=p,!0}},44938(e,t,n){"use strict";n.d(t,{A:()=>s});const r=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function s(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const n=e.pos;if(n+3>e.posMax)return!1;if(58!==e.src.charCodeAt(n))return!1;if(47!==e.src.charCodeAt(n+1))return!1;if(47!==e.src.charCodeAt(n+2))return!1;const s=e.pending.match(r);if(!s)return!1;const o=s[1],i=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!i)return!1;let a=i.url;if(a.length<=o.length)return!1;let l=a.length;for(;l>0&&42===a.charCodeAt(l-1);)l--;l!==a.length&&(a=a.slice(0,l));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const t=e.push("link_open","a",1);t.attrs=[["href",c]],t.markup="linkify",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=a.length-o.length,!0}},94076(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(54439);function s(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;const s=e.pending.length-1,o=e.posMax;if(!t)if(s>=0&&32===e.pending.charCodeAt(s))if(s>=1&&32===e.pending.charCodeAt(s-1)){let t=s-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&(0,r.isSpace)(e.src.charCodeAt(n));)n++;return e.pos=n,!0}},60057(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(57997),s=n(54439);function o(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}o.prototype.pushPending=function(){const e=new r.A("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},o.prototype.push=function(e,t,n){this.pending&&this.pushPending();const s=new r.A(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(o),s},o.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(0===e)o=32;else if(1===e)o=this.src.charCodeAt(0),55296==(63488&o)&&(o=65533);else if(o=this.src.charCodeAt(e-1),56320==(64512&o)){const t=this.src.charCodeAt(e-2);o=55296==(64512&t)?65536+(t-55296<<10)+(o-56320):65533}else 55296==(64512&o)&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const a=i-e;let l=i<n?this.src.charCodeAt(i):32;if(55296==(64512&l)){const e=this.src.charCodeAt(i+1);l=56320==(64512&e)?65536+(l-55296<<10)+(e-56320):65533}else 56320==(64512&l)&&(l=65533);const c=(0,s.isMdAsciiPunct)(o)||(0,s.isPunctCharCode)(o),u=(0,s.isMdAsciiPunct)(l)||(0,s.isPunctCharCode)(l),d=(0,s.isWhiteSpace)(o),p=(0,s.isWhiteSpace)(l),h=!p&&(!u||d||c),m=!d&&(!c||p||u);return{can_open:h&&(t||!m||c),can_close:m&&(t||!h||u),length:a}},o.prototype.Token=r.A;const i=o},50925(e,t,n){"use strict";function r(e,t){let n;const r=[],s=t.length;for(let o=0;o<s;o++){const s=t[o];if(126!==s.marker)continue;if(-1===s.end)continue;const i=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[i.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[i.token-1].type&&"~"===e.tokens[i.token-1].content&&r.push(i.token-1)}for(;r.length;){const t=r.pop();let s=t+1;for(;s<e.tokens.length&&"s_close"===e.tokens[s].type;)s++;s--,t!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[t],e.tokens[t]=n)}}n.d(t,{A:()=>s});const s={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(126!==r)return!1;const s=e.scanDelims(e.pos,!0);let o=s.length;const i=String.fromCharCode(r);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=i,o--);for(let t=0;t<o;t+=2)a=e.push("text","",0),a.content=i+i,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;r(e,e.delimiters);for(let s=0;s<n;s++)t[s]&&t[s].delimiters&&r(e,t[s].delimiters)}}},68597(e,t,n){"use strict";function r(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function s(e,t){let n=e.pos;for(;n<e.posMax&&!r(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}n.d(t,{A:()=>s})},57997(e,t,n){"use strict";function r(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}n.d(t,{A:()=>s}),r.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},r.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},r.prototype.attrSet=function(e,t){const n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},r.prototype.attrGet=function(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};const s=r},25315(e,t,n){"use strict";n.r(t),n.d(t,{decode:()=>r.A,encode:()=>s.A,format:()=>o.A,parse:()=>i.A});var r=n(51227),s=n(10963),o=n(5840),i=n(26786)},51227(e,t,n){"use strict";n.d(t,{A:()=>o});const r={};function s(e,t){"string"!=typeof t&&(t=s.defaultChars);const n=function(e){let t=r[e];if(t)return t;t=r[e]=[];for(let e=0;e<128;e++){const n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t="";for(let r=0,s=e.length;r<s;r+=3){const o=parseInt(e.slice(r+1,r+3),16);if(o<128)t+=n[o];else{if(192==(224&o)&&r+3<s){const n=parseInt(e.slice(r+4,r+6),16);if(128==(192&n)){const e=o<<6&1984|63&n;t+=e<128?"��":String.fromCharCode(e),r+=3;continue}}if(224==(240&o)&&r+6<s){const n=parseInt(e.slice(r+4,r+6),16),s=parseInt(e.slice(r+7,r+9),16);if(128==(192&n)&&128==(192&s)){const e=o<<12&61440|n<<6&4032|63&s;t+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),r+=6;continue}}if(240==(248&o)&&r+9<s){const n=parseInt(e.slice(r+4,r+6),16),s=parseInt(e.slice(r+7,r+9),16),i=parseInt(e.slice(r+10,r+12),16);if(128==(192&n)&&128==(192&s)&&128==(192&i)){let e=o<<18&1835008|n<<12&258048|s<<6&4032|63&i;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="�"}}return t})}s.defaultChars=";/?:@&=+$,#",s.componentChars="";const o=s},10963(e,t,n){"use strict";n.d(t,{A:()=>o});const r={};function s(e,t,n){"string"!=typeof t&&(n=t,t=s.defaultChars),void 0===n&&(n=!0);const o=function(e){let t=r[e];if(t)return t;t=r[e]=[];for(let e=0;e<128;e++){const n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}(t);let i="";for(let t=0,r=e.length;t<r;t++){const s=e.charCodeAt(t);if(n&&37===s&&t+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3)))i+=e.slice(t,t+3),t+=2;else if(s<128)i+=o[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&t+1<r){const n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(e[t])}return i}s.defaultChars=";/?:@&=+$,-_.!~*'()#",s.componentChars="-_.!~*'()";const o=s},5840(e,t,n){"use strict";function r(e){let 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||"",t}n.d(t,{A:()=>r})},26786(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}n.d(t,{A:()=>g});const s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(a),c=["%","/","?",";","#"].concat(l),u=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(e,t){let n,r,o,a=e;if(a=a.trim(),!t&&1===e.split("#").length){const e=i.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let l=s.exec(a);if(l&&(l=l[0],n=l.toLowerCase(),this.protocol=l,a=a.substr(l.length)),(t||l||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o="//"===a.substr(0,2),!o||l&&h[l]||(a=a.substr(2),this.slashes=!0)),!h[l]&&(o||l&&!m[l])){let e,t,n=-1;for(let e=0;e<u.length;e++)r=a.indexOf(u[e]),-1!==r&&(-1===n||r<n)&&(n=r);t=-1===n?a.lastIndexOf("@"):a.lastIndexOf("@",n),-1!==t&&(e=a.slice(0,t),a=a.slice(t+1),this.auth=e),n=-1;for(let e=0;e<c.length;e++)r=a.indexOf(c[e]),-1!==r&&(-1===n||r<n)&&(n=r);-1===n&&(n=a.length),":"===a[n-1]&&n--;const s=a.slice(0,n);a=a.slice(n),this.parseHost(s),this.hostname=this.hostname||"";const o="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!o){const e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){const n=e[t];if(n&&!n.match(d)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(d)){const r=e.slice(0,t),s=e.slice(t+1),o=n.match(p);o&&(r.push(o[1]),s.unshift(o[2])),s.length&&(a=s.join(".")+a),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const g=a.indexOf("#");-1!==g&&(this.hash=a.substr(g),a=a.slice(0,g));const f=a.indexOf("?");return-1!==f&&(this.search=a.substr(f),a=a.slice(0,f)),a&&(this.pathname=a),m[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(e){let t=o.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const g=function(e,t){if(e&&e instanceof r)return e;const n=new r;return n.parse(e,t),n}},79654(e,t,n){"use strict";n.d(t,{N:()=>b});var r=n(93196),s=n(49300),o=n(13022),i=n(86087),a=n(27723),l=n(10790),c="data-wp-hash";function u(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=u();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[n,r]of t.styles)d(e,n,r)}(document)),e.__wpStyleRuntime}function d(e,t,n){if(!e.head)return;const r=u();let s=r.injectedStyles.get(e);if(s||(s=new Set,r.injectedStyles.set(e,s)),s.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${c}]`))if(n.getAttribute(c)===t)return!0;return!1}(e,t))return void s.add(t);const o=e.createElement("style");o.setAttribute(c,t),o.appendChild(e.createTextNode(n)),e.head.appendChild(o),s.add(t)}function p(e,t){const n=u();n.styles.set(e,t);for(const r of n.documents.keys())d(r,e,t)}p("e3ae230cea","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}");var h="_336cd3e4e743482f__box-sizing";p("2a5ab8f3a7","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9))}}");var m="_08e8a2e44959f892__outset-ring--focus";p("90a23568f8",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-fg-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-regular,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}');var g={link:"d4250949359b05ce__link","is-brand":"c6055659b8e2cd2c__is-brand","is-neutral":"_92e0dfcaeee15b88__is-neutral","is-unstyled":"cf122a9bf1035d42__is-unstyled","link-icon":"_0cb411afac4c86c7__link-icon"};p("1fb29d3a3c","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");var f="_2c0831b0499dbd6e__a",b=(0,i.forwardRef)(function({children:e,variant:t="default",tone:n="brand",openInNewTab:i=!1,render:c,className:u,...d},p){return(0,r.C)({render:c,defaultTagName:"a",ref:p,props:(0,s.v6)(d,{className:(0,o.A)(f,h,m,"unstyled"!==t&&g.link,"unstyled"!==t&&g[`is-${n}`],"unstyled"===t&&g["is-unstyled"],u),target:i?"_blank":void 0,children:(0,l.jsxs)(l.Fragment,{children:[e,i&&(0,l.jsx)("span",{className:g["link-icon"],role:"img","aria-label":/* translators: accessibility text appended to link text */ /* translators: accessibility text appended to link text */(0,a.__)("(opens in a new tab)","jetpack")})]})})})})},80786(e,t,n){"use strict";n.d(t,{A:()=>r});const r=/[\0-\x1F\x7F-\x9F]/},14935(e,t,n){"use strict";n.d(t,{A:()=>r});const r=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},60804(e,t,n){"use strict";n.d(t,{A:()=>r});const r=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},47795(e,t,n){"use strict";n.d(t,{A:()=>r});const r=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/},3506(e,t,n){"use strict";n.d(t,{A:()=>r});const r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},68407(e,t,n){"use strict";n.r(t),n.d(t,{Any:()=>r.A,Cc:()=>s.A,Cf:()=>o.A,P:()=>i.A,S:()=>a.A,Z:()=>l.A});var r=n(60905),s=n(80786),o=n(14935),i=n(60804),a=n(47795),l=n(3506)},60905(e,t,n){"use strict";n.d(t,{A:()=>r});const r=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},38377(e){"use strict";e.exports=JSON.parse('{"T":{"White":"#fff","Black":"#000","Gray 0":"#f6f7f7","Gray 5":"#dcdcde","Gray 10":"#c3c4c7","Gray 20":"#a7aaad","Gray 30":"#8c8f94","Gray 40":"#787c82","Gray 50":"#646970","Gray 60":"#50575e","Gray 70":"#3c434a","Gray 80":"#2c3338","Gray 90":"#1d2327","Gray 100":"#101517","Gray":"#646970","Blue 0":"#fbfcfe","Blue 5":"#f7f8fe","Blue 10":"#d6ddf9","Blue 20":"#adbaf3","Blue 30":"#7b90ff","Blue 40":"#546ff3","Blue 50":"#3858e9","Blue 60":"#2a46ce","Blue 70":"#1d35b4","Blue 80":"#1f3286","Blue 90":"#14215a","Blue 100":"#0a112d","Blue":"#3858e9","WordPress Blue 0":"#fbfcfe","WordPress Blue 5":"#f7f8fe","WordPress Blue 10":"#d6ddf9","WordPress Blue 20":"#adbaf3","WordPress Blue 30":"#7b90ff","WordPress Blue 40":"#546ff3","WordPress Blue 50":"#3858e9","WordPress Blue 60":"#2a46ce","WordPress Blue 70":"#1d35b4","WordPress Blue 80":"#1f3286","WordPress Blue 90":"#14215a","WordPress Blue 100":"#0a112d","WordPress Blue":"#3858e9","Purple 0":"#f2e9ed","Purple 5":"#ebcee0","Purple 10":"#e3afd5","Purple 20":"#d48fc8","Purple 30":"#c475bd","Purple 40":"#b35eb1","Purple 50":"#984a9c","Purple 60":"#7c3982","Purple 70":"#662c6e","Purple 80":"#4d2054","Purple 90":"#35163b","Purple 100":"#1e0c21","Purple":"#984a9c","Pink 0":"#f5e9ed","Pink 5":"#f2ceda","Pink 10":"#f7a8c3","Pink 20":"#f283aa","Pink 30":"#eb6594","Pink 40":"#e34c84","Pink 50":"#c9356e","Pink 60":"#ab235a","Pink 70":"#8c1749","Pink 80":"#700f3b","Pink 90":"#4f092a","Pink 100":"#260415","Pink":"#c9356e","Red 0":"#f7ebec","Red 5":"#facfd2","Red 10":"#ffabaf","Red 20":"#ff8085","Red 30":"#f86368","Red 40":"#e65054","Red 50":"#d63638","Red 60":"#b32d2e","Red 70":"#8a2424","Red 80":"#691c1c","Red 90":"#451313","Red 100":"#240a0a","Red":"#d63638","Orange 0":"#f5ece6","Orange 5":"#f7dcc6","Orange 10":"#ffbf86","Orange 20":"#faa754","Orange 30":"#e68b28","Orange 40":"#d67709","Orange 50":"#b26200","Orange 60":"#8a4d00","Orange 70":"#704000","Orange 80":"#543100","Orange 90":"#361f00","Orange 100":"#1f1200","Orange":"#b26200","Yellow 0":"#f5f1e1","Yellow 5":"#f5e6b3","Yellow 10":"#f2d76b","Yellow 20":"#f0c930","Yellow 30":"#deb100","Yellow 40":"#c08c00","Yellow 50":"#9d6e00","Yellow 60":"#7d5600","Yellow 70":"#674600","Yellow 80":"#4f3500","Yellow 90":"#320","Yellow 100":"#1c1300","Yellow":"#9d6e00","Green 0":"#e6f2e8","Green 5":"#b8e6bf","Green 10":"#68de86","Green 20":"#1ed15a","Green 30":"#00ba37","Green 40":"#00a32a","Green 50":"#008a20","Green 60":"#007017","Green 70":"#005c12","Green 80":"#00450c","Green 90":"#003008","Green 100":"#001c05","Green":"#008a20","Celadon 0":"#e4f2ed","Celadon 5":"#a7e8d3","Celadon 10":"#66deb9","Celadon 20":"#31cc9f","Celadon 30":"#09b585","Celadon 40":"#009e73","Celadon 50":"#008763","Celadon 60":"#007053","Celadon 70":"#005c44","Celadon 80":"#004533","Celadon 90":"#003024","Celadon 100":"#001c15","Celadon":"#008763","Automattic Blue 0":"#ebf4fa","Automattic Blue 5":"#c4e2f5","Automattic Blue 10":"#88ccf2","Automattic Blue 20":"#5ab7e8","Automattic Blue 30":"#24a3e0","Automattic Blue 40":"#1490c7","Automattic Blue 50":"#0277a8","Automattic Blue 60":"#036085","Automattic Blue 70":"#02506e","Automattic Blue 80":"#02384d","Automattic Blue 90":"#022836","Automattic Blue 100":"#021b24","Automattic Blue":"#24a3e0","Simplenote Blue 0":"#e9ecf5","Simplenote Blue 5":"#ced9f2","Simplenote Blue 10":"#abc1f5","Simplenote Blue 20":"#84a4f0","Simplenote Blue 30":"#618df2","Simplenote Blue 40":"#4678eb","Simplenote Blue 50":"#3361cc","Simplenote Blue 60":"#1d4fc4","Simplenote Blue 70":"#113ead","Simplenote Blue 80":"#0d2f85","Simplenote Blue 90":"#09205c","Simplenote Blue 100":"#05102e","Simplenote Blue":"#3361cc","WooCommerce Purple 0":"#f2edff","WooCommerce Purple 5":"#e1d7ff","WooCommerce Purple 10":"#d1c1ff","WooCommerce Purple 20":"#b999ff","WooCommerce Purple 30":"#a77eff","WooCommerce Purple 40":"#873eff","WooCommerce Purple 50":"#720eec","WooCommerce Purple 60":"#6108ce","WooCommerce Purple 70":"#5007aa","WooCommerce Purple 80":"#3c087e","WooCommerce Purple 90":"#2c045d","WooCommerce Purple 100":"#1f0342","WooCommerce Purple":"#720eec","Jetpack Green 0":"#f0f2eb","Jetpack Green 5":"#d0e6b8","Jetpack Green 10":"#9dd977","Jetpack Green 20":"#64ca43","Jetpack Green 30":"#2fb41f","Jetpack Green 40":"#069e08","Jetpack Green 50":"#008710","Jetpack Green 60":"#007117","Jetpack Green 70":"#005b18","Jetpack Green 80":"#004515","Jetpack Green 90":"#003010","Jetpack Green 100":"#001c09","Jetpack Green":"#069e08"}}')},54681(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/ai-assistant","title":"AI Assistant","description":"Elevate your content creation with our AI-powered Gutenberg Block, offering seamless customization and generation. Bear in mind that, as an evolving tool, occasional imprecision may occur.","keywords":["AI","GPT","AL","Magic","help","assistant"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 32 32\' width=\'32\' height=\'32\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z\'/><path d=\'M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z\'/><path d=\'M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z\'/></svg>","supports":{"html":false,"multiple":true,"reusable":false},"attributes":{"content":{"type":"string"},"originalContent":{"type":"string"},"promptType":{"type":"string"},"originalMessages":{"type":"array","default":[]},"messages":{"type":"array","default":[]},"userPrompt":{"type":"string","default":""},"requestingState":{"type":"string","default":"init"},"preTransformAction":{"type":"string","default":null}},"example":{"attributes":{"content":"With **Jetpack AI Assistant**, you can provide a prompt, and it will generate high-quality blog posts, informative pages, well-organized lists, and thorough tables that meet your specific requirements.\\n\\nTo start using the **Jetpack AI Assistant**, type `/AI` in the block editor."}}}')},9050(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/business-hours","title":"Business Hours","description":"Display opening hours for your business.","keywords":["opening hours","closing time","schedule","working day"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"html":true,"color":{"gradients":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"days":{"type":"array","default":[{"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":[]}]}},"example":{"attributes":{"days":[{"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":[]}]}}}')},13248(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/calendly","title":"Calendly","description":"Embed a calendar for customers to schedule appointments.","keywords":["calendar","schedule","appointments","events","dates"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 23 24\' width=\'23\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"align":true,"alignWide":false,"html":false},"attributes":{"backgroundColor":{"type":"string","default":"ffffff"},"hideEventTypeDetails":{"type":"boolean","default":false},"primaryColor":{"type":"string","default":"00A2FF"},"textColor":{"type":"string","default":"4D5055"},"style":{"type":"string","default":"inline","enum":["inline","link"]},"url":{"type":"string"}},"example":{"attributes":{"hideEventTypeDetails":false,"style":"inline","url":"https://calendly.com/wpcom/jetpack-block-example"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Schedule time with me","uniqueId":"calendly-widget-id","url":"https://calendly.com/wpcom/jetpack-block-example"}}]}}')},75173(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/contact-info","title":"Contact Info","description":"Add an email address, phone number, and physical address with improved markup for better SEO results.","keywords":["email","phone","address"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"align":["wide","full"],"html":false,"color":{"link":true,"gradients":true},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true}},"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"}}]}}')},87325(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/donations","title":"Donations Form","description":"Collect one-time, monthly, or annually recurring donations.","keywords":["charity","contribution","credit card","debit card","donate","earn","monetize","ecommerce","fundraising","fundraiser","gofundme","money","nonprofit","non-profit","paid","patreon","pay","payments","recurring","stripe","sponsor","square","tipping","venmo"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z\' /></svg>","supports":{"html":false,"color":{"background":true,"text":true,"button":true,"link":true,"gradients":false},"typography":{"fontSize":true,"fontFamily":true,"fontStyle":true,"fontWeight":true,"lineHeight":true,"letterSpacing":true}},"attributes":{"currency":{"type":"string","default":""},"oneTimeDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100]}},"monthlyDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100]}},"annualDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100]}},"showCustomAmount":{"type":"boolean","default":true},"defaultInterval":{"type":"string"},"customAmountPlaceholder":{"type":"number"},"chooseAmountText":{"type":"string"},"customAmountText":{"type":"string"},"fallbackLinkUrl":{"type":"string"},"activeTabBackgroundColor":{"type":"string"},"activeTabTextColor":{"type":"string"},"inactiveTabBackgroundColor":{"type":"string"},"inactiveTabTextColor":{"type":"string"},"selectedAmountBackgroundColor":{"type":"string"},"selectedAmountTextColor":{"type":"string"},"selectedAmountOutlineColor":{"type":"string"},"tabsAppearance":{"type":"string","enum":["tabs","buttons"],"default":"tabs"},"tabBorderColor":{"type":"string"},"tabFontSize":{"type":"string"},"tabPadding":{"type":"object"},"buttonFontSize":{"type":"string"},"buttonPadding":{"type":"object"},"buttonAlignment":{"type":"string","enum":["","left","center","right","full"],"default":""},"amountFontSize":{"type":"string"},"amountBorder":{"type":"object"},"amountBorderRadius":{"type":["string","object"]},"buttonBorderRadius":{"type":["string","object"]},"contentAlignment":{"type":"string","enum":["","left","center","right"],"default":""},"minimumAmount":{"type":"number"},"maximumAmount":{"type":"number"},"displayMode":{"type":"string","enum":["inline","modal"],"default":"inline"},"triggerButtonText":{"type":"string"},"triggerIcon":{"type":"string","default":"heart"},"triggerSticky":{"type":"boolean","default":false},"blockBorder":{"type":"object"},"blockBorderRadius":{"type":["string","object"]},"variationName":{"type":"string","default":""}},"example":{}}')},82306(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/eventbrite","title":"Eventbrite Checkout","description":"Embed Eventbrite event details and ticket checkout.","keywords":["events","tickets"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z\'/></svg>","supports":{"html":false,"align":true},"attributes":{"url":{"type":"string"},"eventId":{"type":"number"},"style":{"type":"string","default":"inline"}},"example":{"attributes":{"url":"https://www.eventbrite.com/e/test-event-tickets-123456789","eventId":123456789,"style":"modal"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Register","uniqueId":"eventbrite-widget-id"}}]}}')},5564(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/gif","title":"GIF","description":"Search for and insert an animated image.","keywords":["animated","giphy","image"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'none\' d=\'M0 0h24v24H0V0z\'/><path d=\'M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z\'/></svg>","supports":{"html":false,"align":true},"attributes":{"align":{"type":"string","default":"center"},"caption":{"type":"string"},"giphyUrl":{"type":"string"},"searchText":{"type":"string"},"paddingTop":{"type":"string","default":"56.2%"}},"example":{"attributes":{"align":"center","giphyUrl":"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc","paddingTop":"100%","searchText":"WordPress"}}}')},76862(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/google-calendar","title":"Google Calendar","description":"Embed a Google Calendar.","keywords":["events","dates","schedule","appointments"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 23\' width=\'24\' height=\'23\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z\'/></svg>","supports":{"align":true,"alignWide":true,"html":false},"attributes":{"url":{"type":"string"},"height":{"type":"integer","default":600}},"example":{"attributes":{"url":"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}')},89525(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/instagram-gallery","title":"Latest Instagram Posts","description":"Display an automatically updating list of the latest posts from your Instagram feed.","keywords":["images","photos","pictures"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg width=\'24\' height=\'24\' viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z\'></path></svg>","supports":{"align":true,"html":false},"attributes":{"accessToken":{"type":"string"},"instagramUser":{"type":"string"},"columns":{"type":"number","default":3,"min":1,"max":6},"count":{"type":"number","default":9,"min":1,"max":30},"spacing":{"type":"number","default":10,"min":0,"max":50},"isStackedOnMobile":{"type":"boolean","default":true}}}')},37120(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/mailchimp","title":"Mailchimp","description":"Allow readers to join a Mailchimp audience.","keywords":["email","subscription","newsletter"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m16.88,11.25c.17-.02.34-.02.49,0,.09-.2.1-.55.02-.93-.12-.57-.28-.91-.61-.86-.33.05-.34.46-.22,1.03.07.32.19.59.32.76\'/><path d=\'m14.03,11.7c.24.1.38.17.44.11.04-.04.03-.11-.03-.2-.12-.19-.36-.38-.61-.49-.52-.22-1.14-.15-1.62.19-.16.12-.31.28-.29.37,0,.03.03.06.09.06.13.01.59-.22,1.11-.25.37-.02.68.09.92.2\'/><path d=\'m13.56,11.97c-.31.05-.48.15-.59.25-.09.08-.15.17-.15.23,0,.03.01.05.02.06.01.01.03.02.05.02.07,0,.23-.06.23-.06.43-.15.71-.13.99-.1.16.02.23.03.26-.03.01-.02.02-.05,0-.1-.07-.12-.38-.32-.81-.26\'/><path d=\'m15.92,12.97c.21.1.44.06.52-.09s-.03-.36-.24-.46c-.21-.1-.44-.06-.52.09-.08.15.03.36.24.46\'/><path d=\'m17.26,11.79c-.17,0-.31.18-.32.42s.13.42.3.43.31-.18.32-.42c0-.23-.13-.42-.3-.43\'/><path d=\'m5.83,16c-.04-.05-.11-.04-.18-.02-.05.01-.1.02-.16.02-.13,0-.23-.06-.29-.15-.08-.12-.07-.3.01-.5l.04-.09c.14-.31.36-.82.11-1.31-.19-.37-.51-.6-.89-.64-.36-.05-.74.09-.98.35-.38.42-.44.98-.36,1.18.03.07.07.09.1.1.06,0,.16-.04.22-.2l.02-.05c.03-.08.08-.24.16-.37.1-.15.25-.26.43-.29.18-.04.37,0,.52.1.26.17.37.5.25.8-.06.16-.15.46-.13.72.04.51.35.71.63.73.27.01.46-.14.51-.25.03-.07,0-.11-.01-.12\'/><path d=\'m8.42,6.69c.89-1.03,1.98-1.92,2.96-2.42.03-.02.07.02.05.05-.08.14-.23.44-.28.67,0,.04.03.06.06.04.61-.42,1.67-.86,2.6-.92.04,0,.06.05.03.07-.14.11-.3.26-.41.41-.02.03,0,.06.03.06.65,0,1.57.23,2.17.57.04.02.01.1-.03.09-.91-.21-2.4-.37-3.94.01-1.38.34-2.43.86-3.2,1.41-.04.03-.09-.02-.05-.06h0Zm4.43,9.95h0s0,0,0,0h0Zm3.67.43s.04-.04.04-.07c0-.04-.04-.06-.07-.06,0,0-1.9.28-3.69-.38.2-.63.71-.41,1.5-.34,1.41.08,2.68-.12,3.62-.39.81-.23,1.88-.69,2.71-1.35.28.61.38,1.29.38,1.29,0,0,.22-.04.4.07.17.11.3.32.21.89-.17,1.05-.62,1.91-1.38,2.7-.46.49-1.02.92-1.65,1.24-.34.18-.7.33-1.08.46-2.84.93-5.75-.09-6.69-2.28-.07-.16-.14-.34-.19-.52-.4-1.44-.06-3.17,1-4.27h0c.07-.07.13-.15.13-.25,0-.09-.05-.18-.1-.24-.37-.54-1.66-1.45-1.4-3.23.19-1.27,1.3-2.17,2.34-2.12l.26.02c.45.03.84.08,1.21.1.62.03,1.18-.06,1.84-.61.22-.19.4-.35.7-.4.03,0,.11-.03.27-.03.16,0,.31.05.45.14.53.35.6,1.21.63,1.83.02.36.06,1.22.07,1.47.03.57.18.65.48.75.17.06.33.1.56.16.7.2,1.12.4,1.38.65.16.16.23.33.25.49.08.6-.47,1.35-1.93,2.03-1.59.74-3.53.93-4.87.78l-.47-.05c-1.07-.14-1.68,1.24-1.04,2.18.41.61,1.54,1.01,2.67,1.01,2.58,0,4.57-1.1,5.31-2.06l.06-.08c.04-.05,0-.08-.04-.05-.6.41-3.28,2.05-6.15,1.56,0,0-.35-.06-.67-.18-.25-.1-.78-.34-.85-.88,2.31.72,3.77.04,3.77.04h0ZM3.8,11.57c-.8.16-1.51.61-1.95,1.24-.26-.22-.74-.63-.83-.8-.69-1.31.76-3.87,1.77-5.32C5.3,3.13,9.21.43,11.02.92c.29.08,1.27,1.21,1.27,1.21,0,0-1.81,1.01-3.49,2.41-2.26,1.74-3.97,4.28-5,7.03h0Zm1.35,6.03c-.12.02-.25.03-.37.03-1.21-.03-2.52-1.12-2.65-2.42-.14-1.43.59-2.53,1.88-2.79.15-.03.34-.05.54-.04.72.04,1.79.6,2.04,2.17.22,1.4-.13,2.82-1.44,3.04h0Zm16.4-2.53s-.08-.28-.17-.58c-.09-.3-.19-.51-.19-.51.37-.56.38-1.06.33-1.34-.05-.35-.2-.65-.49-.96-.29-.31-.89-.62-1.74-.86l-.44-.12s-.02-1.04-.04-1.48c-.01-.32-.04-.82-.2-1.31-.18-.66-.5-1.24-.9-1.61,1.1-1.14,1.79-2.4,1.79-3.48,0-2.08-2.56-2.71-5.7-1.4l-.67.28s-1.2-1.18-1.22-1.2C8.33-2.63-2.89,9.84.7,12.86l.78.66c-.2.53-.28,1.13-.22,1.78.08.83.51,1.63,1.21,2.25.66.59,1.53.96,2.37.96,1.4,3.21,4.58,5.19,8.32,5.3,4.01.12,7.37-1.76,8.78-5.14.09-.24.48-1.31.48-2.25s-.54-1.34-.88-1.34\'/></svg>","supports":{"align":["wide","full"],"color":{"gradients":true},"spacing":{"padding":true,"margin":true}},"attributes":{"emailPlaceholder":{"type":"string"},"consentText":{"type":"string"},"interests":{"type":"array","default":[]},"processingLabel":{"type":"string"},"signupFieldTag":{"type":"string"},"signupFieldValue":{"type":"string"},"successLabel":{"type":"string"},"errorLabel":{"type":"string"},"preview":{"type":"boolean","default":false}},"example":{"attributes":{"preview":true},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"button","text":"Join my Mailchimp audience","uniqueId":"mailchimp-widget-id"}}]}}')},55740(e){"use strict";e.exports=JSON.parse('[{"id":"mapbox-gl-js","file":"node_modules/mapbox-gl/dist/mapbox-gl.js","version":"1.13.0"},{"id":"mapbox-gl-css","file":"node_modules/mapbox-gl/dist/mapbox-gl.css","version":"1.13.0"}]')},6852(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/map","title":"Map","description":"Add an interactive map showing one or more locations.","keywords":["maps","location","navigation"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z\' /></svg>","supports":{"defaultStylePicker":false,"html":false},"attributes":{"align":{"type":"string"},"points":{"type":"array","default":[]},"address":{"type":"string","default":""},"mapDetails":{"type":"boolean","default":true},"zoom":{"type":"integer","default":13},"mapCenter":{"type":"object","default":{"longitude":-122.41941550000001,"latitude":37.7749295}},"markerColor":{"type":"string","default":"red"},"scrollToZoom":{"type":"boolean","default":false},"mapHeight":{"type":"integer"},"showFullscreenButton":{"type":"boolean","default":true}},"example":{}}')},73431(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/markdown","title":"Markdown","description":"Add headings, lists, or links to plain text with ease.","keywords":["formatting","syntax","markup"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 208 128\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><rect width=\'198\' height=\'118\' x=\'5\' y=\'5\' ry=\'10\' stroke=\'currentColor\' strokeWidth=\'10\' fill=\'none\' /><path d=\'M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z\' />","supports":{"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":true,"margin":true}}},"attributes":{"source":{"type":"string"}},"example":{"attributes":{"source":"## ## Try Markdown\\n\\nMarkdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters."}}}')},79018(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/opentable","title":"OpenTable","description":"Book a reservation with OpenTable.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 22 16\' width=\'22\' height=\'16\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z\' /></svg>","supports":{"align":true,"html":false},"attributes":{"rid":{"default":[],"type":"array"},"style":{"default":"standard","type":"string","enum":["button","standard","wide","tall"]},"iframe":{"default":true,"type":"boolean"},"domain":{"default":"com","type":"string"},"lang":{"default":"en-US","type":"string","enum":["en-US","fr-CA","de-DE","es-MX","ja-JP","nl-NL","it-IT"]},"newtab":{"default":false,"type":"boolean"},"negativeMargin":{"default":false,"type":"boolean"}},"example":{"attributes":{"rid":["1"],"style":"standard","iframe":true,"domain":"com","lang":"en-US","newtab":false,"negativeMargin":false}}}')},73800(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/pinterest","title":"Pinterest","description":"Embed a Pinterest pin, board, or user.","keywords":["social","pinboard","pins"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z\'/></svg>","supports":{"html":false,"align":false,"inserter":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"https://pinterest.com/anapinskywalker/"}}}')},8206(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/rating-star","title":"Star Rating","description":"Rate movies, books, songs, recipes — anything you can put a number on.","keywords":["star","rating","review"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z\'/></svg>","supports":{"html":false},"styles":[{"name":"filled","label":"Filled","isDefault":true},{"name":"outlined","label":"Outlined"}],"attributes":{"rating":{"type":"number","default":1},"maxRating":{"type":"number","default":5},"color":{"type":"string"},"ratingStyle":{"type":"string","default":"star"},"className":{"type":"string"},"align":{"type":"string","default":"left"}},"example":{}}')},88795(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/related-posts","title":"Related Posts","description":"Display a list of related posts.","keywords":["similar content","linked","connected"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19.5,3.5H3.5v4.94s.01,6,.01,6v4s-.01,0-.01,0v1h15.97v-.06h.05l-.02-15.88Zm-11,1v3.94s-3.99,0-3.99,0v-3.94s3.99,0,3.99,0Zm.01,4.94v4h-4v-4h4Zm-3.99,9v-4s3.99,0,3.99,0v4s-3.99,0-3.99,0Zm13.98-13.94v3.94s-8.99,0-8.99,0v-3.94s8.99,0,8.99,0Zm.01,4.94v4h-9v-4h9Zm-8.99,9v-4s8.99,0,8.99,0v4s-8.99,0-8.99,0Z\'/></svg>","supports":{"html":false,"multiple":false,"reusable":false,"color":{"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"__experimentalFontFamily":true,"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"postLayout":{"type":"string","default":"grid"},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":true},"displayThumbnails":{"type":"boolean","default":false},"displayContext":{"type":"boolean","default":false},"postsToShow":{"type":"number","default":3}},"example":{"attributes":{"postLayout":"grid","displayAuthor":false,"displayDate":true,"displayThumbnails":true,"displayContext":false,"postsToShow":2}}}')},20242(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/repeat-visitor","title":"Repeat Visitor","description":"Control block visibility based on how often a visitor has viewed the page.","keywords":["return","visitors","visibility"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\'/></svg>","supports":{"align":["wide","full"],"html":false},"attributes":{"criteria":{"type":"string","default":"after-visits"},"threshold":{"type":"number","default":3}},"example":{"attributes":{"criteria":"after-visits","threshold":3},"innerBlocks":[{"name":"core/paragraph","attributes":"This block will only appear to a visitor who visited the page three or more times."}]}}')},87762(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/slideshow","title":"Slideshow","description":"Display multiple images in sequential order.","keywords":["story","image","video","gallery"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19,21.5H6v-1h13c.83,0,1.5-.67,1.5-1.5v-11h1v11c0,1.38-1.12,2.5-2.5,2.5Z\'/><path d=\'m16.38,3.25H4.62c-.75,0-1.37.62-1.37,1.37v11.76c0,.75.62,1.37,1.37,1.37h11.76c.75,0,1.37-.62,1.37-1.37V4.62c0-.75-.62-1.37-1.37-1.37Zm.37,13.13c0,.2-.17.37-.37.37H4.62c-.2,0-.37-.17-.37-.37V4.62c0-.2.17-.37.37-.37h11.76c.2,0,.37.17.37.37v11.76Z\'/><path d=\'M9.39 7.51 12.73 11.04 9.31 14.32 8.61 13.6 11.34 10.99 8.67 8.2 9.39 7.51z\'/></svg>","supports":{"html":false,"align":["center","wide","full"]},"attributes":{"align":{"default":"center","type":"string"},"autoplay":{"type":"boolean","default":false},"delay":{"type":"number","default":3},"ids":{"default":[],"type":"array"},"images":{"type":"array","default":[],"source":"query","selector":".swiper-slide","query":{"alt":{"source":"attribute","selector":"img","attribute":"alt","default":""},"caption":{"type":"string","source":"html","selector":"figcaption"},"id":{"source":"attribute","selector":"img","attribute":"data-id"},"url":{"source":"attribute","selector":"img","attribute":"src"},"aspectRatio":{"source":"attribute","selector":"img","attribute":"data-aspect-ratio"}}},"effect":{"type":"string","default":"slide"},"sizeSlug":{"type":"string"}},"example":{"align":"center","autoplay":true,"ids":[22,23,24],"images":[{"alt":"","caption":"","id":22,"url":"./slideshowExample1.png"},{"alt":"","caption":"","id":23,"url":"./slideshowExample2.png"},{"alt":"","caption":"","id":24,"url":"./slideshowExample3.png"}],"effect":"slide"}}')},76585(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/tiled-gallery","title":"Tiled Gallery","description":"Display multiple images in an elegantly organized tiled layout.","keywords":["columns","images","photos","pictures","square","circle","mosaic"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z\'/></svg>","supports":{"align":["center","wide","full"],"color":{"gradients":true,"text":false},"customClassName":false,"html":false,"spacing":{"margin":true,"padding":true},"__experimentalHideChildBlockControls":true},"providesContext":{"imageCrop":"imageCrop"},"styles":[{"name":"rectangular","label":"Tiled mosaic","isDefault":true},{"name":"circle","label":"Circles"},{"name":"square","label":"Square tiles"},{"name":"columns","label":"Tiled columns"}],"attributes":{"align":{"type":"string","default":"center"},"className":{"type":"string","default":"is-style-rectangular"},"columns":{"type":"number"},"columnWidths":{"type":"array","default":[]},"ids":{"type":"array","default":[]},"imageFilter":{"type":"string"},"images":{"type":"array","default":[],"source":"query","selector":".tiled-gallery__item","query":{"alt":{"attribute":"alt","default":"","selector":"img","source":"attribute"},"height":{"attribute":"data-height","type":"number","selector":"img","source":"attribute"},"id":{"attribute":"data-id","selector":"img","source":"attribute"},"link":{"attribute":"data-link","selector":"img","source":"attribute"},"customLink":{"attribute":"href","selector":"a","source":"attribute"},"url":{"attribute":"data-url","selector":"img","source":"attribute"},"width":{"attribute":"data-width","selector":"img","source":"attribute","type":"number"}}},"imageCrop":{"type":"boolean","default":true},"linkTo":{"default":"none","type":"string"},"roundedCorners":{"type":"integer","default":0}}}')},86525(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/tock","title":"Tock","description":"Reserve a table at your restaurant with Tock.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M10 15.619C6.84915 15.619 4.28572 13.0542 4.28572 9.90176C4.28572 7.24269 6.10957 5.00183 8.57143 4.36551V0C3.72557 0.693782 0 4.86162 0 9.90176C0 15.4274 4.47715 19.9069 10 19.9069C12.2461 19.9069 14.3193 19.1658 15.9887 17.9148L12.9003 14.825C12.0494 15.3287 11.0581 15.619 10 15.619 M15.7135 9.90176C15.7135 10.9604 15.4233 11.9522 14.9199 12.8035L18.0082 15.8935C19.2585 14.2232 19.9992 12.149 19.9992 9.90176C19.9992 4.86162 16.2736 0.693782 11.4277 0V4.36551C13.8896 5.00183 15.7135 7.24269 15.7135 9.90176\'/></svg>","supports":{"align":true,"html":false,"multiple":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"roister"},"viewportWidth":250}}')},15210(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/voice-to-content","title":"Voice to content","description":"Transform your spoken words into a post ready to publish with AI.","keywords":["AI","GPT","AL","Magic","help","assistant"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 20 20\' width=\'20\' height=\'20\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z\'/></svg>","supports":{"html":false,"multiple":true,"reusable":false},"attributes":{"content":{"type":"string"}}}')},16344(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/wordads","title":"Ad","description":"Earn income by adding high quality ads to your post.","keywords":["ads","WordAds","advertisement"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z\'/></svg>","supports":{"align":["left","center","right"],"alignWide":false,"className":false,"customClassName":false,"html":false,"reusable":false},"attributes":{"align":{"type":"string","default":"center"},"format":{"type":"string","default":"mrec"},"hideMobile":{"type":"boolean","default":false}},"example":{}}')},73391(e){"use strict";e.exports=JSON.parse('{"production":["ai-assistant","ai-chat","ai-assistant-plugin","blogging-prompt","business-hours","button","calendly","cookie-consent","contact-form","contact-form/salesforce-lead-form","contact-info","donations","eventbrite","field-file","gif","google-calendar","image-compare","instagram-gallery","like","likes","mailchimp","map","markdown","opentable","payments","pinterest","podcast-episode","podcast-player","premium-content","rating-star","recurring-payments","related-posts","repeat-visitor","send-a-message","whatsapp-button","seo","sharing","shortlinks","simple-payments","slideshow","story","subscriber-login","subscriptions","tiled-gallery","tock","videopress","wordads","payments-intro","post-publish-qr-post-panel","payment-buttons","videopress/video","ai-assistant-support","ai-assistant-form-support","paywall","blogroll","blogroll-item","nextdoor","ai-assistant-usage-panel","sharing-button","sharing-buttons","ai-content-lens","blog-stats","top-posts","goodreads","voice-to-content","ai-featured-image-generator","ai-title-optimization","ai-assistant-experimental-image-generation-support","ai-general-purpose-image-generator","ai-proofread-breve","ai-assistant-site-logo-support","ai-title-optimization-keywords-support","ai-response-feedback","ai-assistant-image-extension","ai-sidebar-toolbar-button","ai-seo-enhancer","ai-correct-spelling","paypal-payment-buttons","image-studio","block-notes"],"beta":["google-docs-embed","recipe","v6-video-frame-poster","videopress/video-chapters","ai-assistant-backend-prompts","ai-list-to-table-transform"],"experimental":[],"no-post-editor":["ai-assistant","business-hours","button","calendly","contact-form","contact-info","donations","eventbrite","gif","google-calendar","instagram-gallery","mailchimp","map","markdown","opentable","pinterest","rating-star","related-posts","repeat-visitor","simple-payments","slideshow","tiled-gallery","tock","videopress","voice-to-content","wordads"]}')}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var s=r.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=r[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),n(67858),n(61351),n(71410),n(45878),n(60312),n(25907),n(46197),n(34590),n(55734),n(29280),n(92585),n(97618),n(12742),n(57809),n(82144),n(46010),n(8171),n(1063),n(79238),n(96764),n(25589),n(4595),n(27156),n(72718);n(99398)})();