(()=>{vare,t,n,r,a={7675:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});varr=n(76416),a=function(e,t){varn={};for(varrine)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeofObject.getOwnPropertySymbols){vara=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}returnn};consts="text/event-stream",o=1e3,i="last-event-id";functionl(e,t){var{signal:n,headers:l,onopen:u,onmessage:d,onclose:p,onerror:m,openWhenHidden:h,fetch:g}=t,f=a(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);returnnewPromise(((t,a)=>{constb=Object.assign({},l);letv;functionk(){v.abort(),document.hidden||A()}b.accept||(b.accept=s),h||document.addEventListener("visibilitychange",k);lety=o,w=0;functionE(){document.removeEventListener("visibilitychange",k),window.clearTimeout(w),v.abort()}null==n||n.addEventListener("abort",(()=>{E(),t()}));const_=null!=g?g:window.fetch,C=null!=u?u:c;asyncfunctionA(){varn;v=newAbortController;try{constn=await_(e,Object.assign(Object.assign({},f),{headers:b,signal:v.signal}));awaitC(n),await(0,r.q5)(n.body,(0,r.iv)((0,r.VL)((e=>{e?b[i]=e:deleteb[i]}),(e=>{y=e}),d))),null==p||p(),E(),t()}catch(e){if(!v.signal.aborted)try{constt=null!==(n=null==m?void0:m(e))&&void0!==n?n:y;window.clearTimeout(w),w=window.setTimeout(A,t)}catch(e){E(),a(e)}}}A()}))}functionc(e){constt=e.headers.get("content-type");if(!(null==t?void0:t.startsWith(s)))thrownewError(`Expected content-type to be ${s}, Actual: ${t}`)}},76416:(e,t,n)=>{"use strict";asyncfunctionr(e,t){constn=e.getReader();letr;for(;!(r=awaitn.read()).done;)t(r.value)}functiona(e){lett,n,r,a=!1;returnfunction(s){void0===t?(t=s,n=0,r=-1):t=function(e,t){constn=newUint8Array(e.length+t.length);returnn.set(e),n.set(t,e.length),n}(t,s);consto=t.length;leti=0;for(;n<o;){a&&(10===t[n]&&(i=++n),a=!1);lets=-1;for(;n<o&&-1===s;++n)switch(t[n]){case58:-1===r&&(r=n-i);break;case13:a=!0;case10:s=n}if(-1===s)break;e(t.subarray(i,s),r),i=n,r=-1}i===o?t=void0:0!==i&&(t=t.subarray(i),n-=i)}}functions(e,t,n){letr=o();consta=newTextDecoder;returnfunction(s,i){if(0===s.length)null==n||n(r),r=o();elseif(i>0){constn=a.decode(s.subarray(0,i)),o=i+(32===s[i+1]?2:1),l=a.decode(s.subarray(o));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":constn=parseInt(l,10);isNaN(n)||t(r.retry=n)}}}}functiono(){return{data:"",event:"",id:"",retry:void0}}n.d(t,{VL:()=>s,iv:()=>a,q5:()=>r})},95723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void0;varr=n(84265);leta,s,o,i;constl=/<(\/)?(\w+)\s*(\/)?>/g;functionc(e,t,n,r,a){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:a,children:[]}}constu=e=>{constt="object"==typeofe,n=t&&Object.values(e);returnt&&n.length&&n.every((e=>(0,r.isValidElement)(e)))};functiond(e){constt=function(){conste=l.exec(a);if(null===e)return["no-more-tokens"];constt=e.index,[n,r,s,o]=e,i=n.length;if(o)return["self-closed",s,t,i];if(r)return["closer",s,t,i];return["opener",s,t,i]}(),[n,u,d,h]=t,g=i.length,f=d>s?s:null;if(!e[u])returnp(),!1;switch(n){case"no-more-tokens":if(0!==g){const{leadingTextStart:e,tokenStart:t}=i.pop();o.push(a.substr(e,t))}returnp(),!1;case"self-closed":return0===g?(null!==f&&o.push(a.substr(f,d-f)),o.push(e[u]),s=d+h,!0):(m(c(e[u],d,h)),s=d+h,!0);case"opener":returni.push(c(e[u],d,h,d+h,f)),s=d+h,!0;case"closer":if(1===g)returnfunction(e){const{element:t,leadingTextStart:n,prevOffset:s,tokenStart:l,children:c}=i.pop(),u=e?a.substr(s,e-s):a.substr(s);u&&c.push(u);null!==n&&o.push(a.substr(n,l-n));o.push((0,r.cloneElement)(t,null,...c))}(d),s=d+h,!0;constt=i.pop(),n=a.substr(t.prevOffset,d-t.prevOffset);t.children.push(n),t.prevOffset=d+h;constl=c(t.element,t.tokenStart,t.tokenLength,d+h);returnl.children=t.children,m(l),s=d+h,!0;default:returnp(),!1}}functionp(){conste=a.length-s;0!==e
__("You have %1$d requests remaining.","jetpack"),e)),React.createElement(r.Button,{variant:"link",onClick:n,href:a,target:a?"_blank":null},__("Upgrade now","jetpack")))}functionE({error:e,code:t,onTryAgainClick:n,onUpgradeClick:a,upgradeUrl:o}){consti=e||__("Something went wrong","jetpack");returnReact.createElement(b,{severity:m},React.createElement("span",null,(0,s.sprintf)(
// translators: %1$d: A dynamic error message
__("Error: %1$s","jetpack"),i)),t===u.Or?React.createElement(r.Button,{variant:"link",onClick:a,href:o,target:o?"_blank":null},__("Upgrade now","jetpack")):React.createElement(r.Button,{variant:"link",onClick:n},__("Try again","jetpack")))}},43984:(e,t,n)=>{"use strict";n.d(t,{A4:()=>l,DD:()=>E,DT:()=>P,Gm:()=>g,HM:()=>_,JR:()=>C,K2:()=>x,Rq:()=>R,UA:()=>h,UD:()=>A,br:()=>d,d5:()=>v,eJ:()=>m,fD:()=>p,fv:()=>k,im:()=>o,mI:()=>j,mT:()=>N,oZ:()=>s,pE:()=>f,sn:()=>i,so:()=>a,u0:()=>y,uQ:()=>w,vE:()=>u,yQ:()=>S,yy:()=>c,z5:()=>b});varr=n(27723);const__=r.__,a={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")}},s={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:"🔥"}},o="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="userPrompt",b="jetpackFormCustomPrompt",v="transformListToTable",k="writePostFromList",y=__("Translate","jetpack"),w=__("Change tone","jetpack"),E=__("Correct spelling and grammar","jetpack"),_=__("Simplify","jetpack"),C=__("Summarize","jetpack"),A=__("Make shorter","jetpack"),x=__("Expand","jetpack"),j=__("Turn list into a table","jetpack"),S=__("Write a post from this list","jetpack"),N=__("Generate a post title","jetpack"),R=__("Summary based on title","jetpack"),P=__("Continue writing","jetpack")},2166:(e,t,n)=>{"use strict";n.d(t,{R:()=>o});varr=n(51609),a=n.n(r);consts=(0,r.createContext)({}),o=({value:e,children:t})=>a().createElement(s.Provider,{value:e,children:t})},13965:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>r.R});varr=n(2166);n(59886),n(53471)},53471:(e,t,n)=>{"use strict";n(51609),n(78836),n(13965)},59886:(e,t,n)=>{"use strict";varr=n(29491),a=n(86087),s=n(51609),o=n.n(s),i=n(46219),l=n(13965);(0,r.createHigherOrderComponent)((e=>t=>{const{suggestion:n,error:r,requestingState:s,request:c,stopSuggestion:u,eventSource:d}=(0,i.Ay)(),p=(0,a.useMemo)((()=>({suggestion:n,requestingError:r,requestingState:s,eventSource:d,requestSuggestion:c,stopSuggestion:u})),[n,r,s,d,c,u]);returno().createElement(l.Rb,{value:p},o().createElement(e,t))}),"withAiDataProvider")},46219:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,fC:()=>i});varr=n(86087),a=n(27723),s=n(87286),o=n(78836);const__=a.__;functioni(e){switch(e){caseo.Or:return{code:o.Or,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};caseo.L9:return{code:o.L9,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};caseo.AZ:return{code:o.AZ,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};caseo.ud:return{code:o.ud,message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),severity:"info"};caseo.cT:return{code:o.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"};caseo.mA:default:return{code:o.mA,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}functionl(e){returne.replace(/^<\|start_header_id\|>assistant<\|end_header_id
// translators: %u is the number of requests
__("%u requests remaining.","jetpack"),w)),x&&React.createElement(React.Fragment,null,"",React.createElement(a.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{n(m.AN,{context:U,placement:m.Cn})}},__("Upgrade","jetpack"))),"",React.createElement(a.Tooltip,{text:__("Logo generation costs 10 requests; prompt enhancement costs 1 request each","jetpack"),placement:"bottom"},React.createElement(o.A,{className:"prompt-footer__icon",icon:i.A}))),H&&V&&React.createElement(v.G,null),H&&!V&&React.createElement(b.Q,null),_&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error enhancing prompt. Please try again.","jetpack")),C&&React.createElement("div",{className:"jetpack-ai-logo-generator__prompt-error"},__("Error generating logo. Please try again.","jetpack"))))}},64024:(e,t,n)=>{"use strict";n.d(t,{G:()=>p});varr=n(85985),a=n(56427),s=n(86087),o=n(27723),i=n(51113),l=n(23751),c=n(61356),u=n(60674),d=n(88725);const__=o.__,p=()=>{const{tracks:e}=(0,r.st)(),{recordEvent:t}=e,n=__("Upgrade","jetpack"),o=(0,s.createInterpolateElement)(__("Not enough requests left to generate a logo. <strong>Upgrade now to increase it.</strong>","jetpack"),{strong:React.createElement("strong",null)}),{nextTierCheckoutURL:p}=(0,u.Q)(),{context:m}=(0,d.A)();returnReact.createElement("div",{className:"jetpack-upgrade-plan-banner"},React.createElement("div",{className:"jetpack-upgrade-plan-banner__wrapper"},React.createElement("div",null,React.createElement(i.A,{className:"jetpack-upgrade-plan-banner__icon",icon:l.A}),React.createElement("span",{className:"jetpack-upgrade-plan-banner__banner-description"},o)),React.createElement(a.Button,{href:p,target:"_blank",className:"is-primary",onClick:()=>{t(c.AN,{context:m,placement:c.tF})}},n)))}},35421:(e,t,n)=>{"use strict";n.d(t,{R:()=>c});varr=n(85985),a=n(56427),s=n(27723),o=n(3924),i=n(61356),l=n(88725);const__=s.__,c=({onCancel:e,upgradeURL:t,reason:n})=>{const{tracks:s}=(0,r.st)(),{recordEvent:c}=s,u=__("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"),d=__("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"),p=(0,o.A)("ai-logo-generator-fair-usage-policy",{anchor:"usage-limitations-and-upgrades"}),{context:m}=(0,l.A)();returnReact.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper"},React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-message"},React.createElement("span",{className:"jetpack-ai-logo-generator-modal__loading-message"},"feature"===n?u:d),"",React.createElement(a.Button,{variant:"link",href:p,target:"_blank"},__("Learn more about Jetpack AI.","jetpack"))),React.createElement("div",{className:"jetpack-ai-logo-generator-modal__notice-actions"},React.createElement(a.Button,{variant:"tertiary",onClick:e},__("Cancel","jetpack")),React.createElement(a.Button,{variant:"primary",href:t,target:"_blank",onClick:()=>{c(i.AN,{context:m,placement:i.Tz}),e()}},__("Upgrade","jetpack"))))}},48204:(e,t,n)=>{"use strict";n.d(t,{H:()=>l});varr=n(56427),a=n(27723),s=n(53512),o=n(13022),i=n(36791);const__=a.__,l=({className:e=null,onVisitBlankTarget:t})=>React.createElement("div",{className:(0,o.A)("jetpack-ai-logo-generator-modal-visit-site-banner",e)},React.createElement("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo"},React.createElement("img",{src:i,alt:"Jetpack"})),React.createElement("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__content"},React.createElement("strong",null,__("Do you want to know all the amazing things you can do with Jetpack AI?","jetpack")),React.createElement("span",null,__("Generate and tweak content, create forms, get feedback and much more.","jetpack")),React.createElement("div",null,React.createElement(r.Button,{variant:"link",href:"https://jetpack.com/redirect/?source=logo_genera
// Translators: %s is the date when the requests will reset.
constn=__("Requests will reset on %s.","jetpack");return`${t}${(0,s.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)returnnull;constt=newDate(e.nextStart);returnt.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),n=(0,o.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,a.createInterpolateElement)(t,{link:React.createElement("a",{href:n,target:"_blank",rel:"noreferrer"})})}},88725:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});varr=n(47143),a=n(10067),s=n.n(a),o=n(51609),i=n(31439),l=n(62614),c=n(93869),u=n(51391),d=n(19362),p=n(28229),m=n(74423),h=n(44461);constg=s()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:n,setIsRequestingImage:a,setIsEnhancingPrompt:s,increaseAiAssistantRequestsCount:f,addLogoToHistory:b,setContext:v,setIsLoadingHistory:k}=(0,r.useDispatch)(m.E),{logos:y,selectedLogoIndex:w,selectedLogo:E,siteDetails:_,isSavingLogoToLibrary:C,isApplyingLogo:A,isEnhancingPrompt:x,isBusy:j,isRequestingImage:S,getAiAssistantFeature:N,requireUpgrade:R,context:P,tierPlansEnabled:L,isLoadingHistory:T}=(0,r.useSelect)((e=>{constt=e(m.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:M,setEnhancePromptFetchError:B,setLogoFetchError:I,setSaveToLibraryError:D,setLogoUpdateError:F}=(0,h.A)(),{generateImageWithParameters:z}=(0,l.Ay)(),{saveToMediaLibrary:O}=(0,c.A)(),{ID:H=null,name:U=null,description:V=null}=_||{},q=H?String(H):null,G=N(q),$=G?.costs?.["jetpack-ai-logo-generator"]?.logo,W=G?.featuresControl?.["logo-generator"],Z=W?.styles||[],J=(0,o.useCallback)((asyncfunction(){M(null),f();try{conste=await(0,u.A)();if(!e||!e.token)thrownewError("No token provided");g("Generating first prompt for site");constt={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: ${U}\nSite description: ${V}`,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"},a=awaitfetch(n,{method:"POST",headers:r,body:JSON.stringify(t)}).then((e=>e.json()));returna?.choices?.[0]?.message?.content}catch(e){throwf(-1),M(e),e}}),[M,f,U,V]),K=(0,o.useCallback)((asyncfunction(e){if(I(null),!Z||!Z.length)returnnull;constt=[{role:"jetpack-ai",context:{type:"ai-assistant-guess-logo-style",request:e,name:U,description:V}}];try{conste=await(0,i.A)(t,{feature:"jetpack-ai-logo-generator"});if(!e)returnnull;constn=Z.find((({value:t})=>t===e));returnn?n.value:null}catch(e){g("Error guessing style",e),Promise.reject(e)}}),[Z,U,V]),Y=(0,o.useCallback)((asyncfunction({prompt:e,style:t=null}){I(null);try{constn=await(0,u.A)();if(!n||!n.token)thrownewError("No token provided");if("auto"===t)thrownewError("Auto style is not supported");g("Generatingimagewit
__("(opens in a new tab)","jetpack"))),x=v?"_blank":void0,j=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className;returnd().createElement(s.Button,a()({target:x,variant:r,className:(0,c.A)(_,{"has-text":!!m&&j}),icon:v?void0:m,iconSize:h,disabled:g,"aria-disabled":g,isDestructive:f,text:y},E),b&&d().createElement(s.Spinner,null),d().createElement("span",null,n),A)}));m.displayName="Button";consth=m},69222:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});varr=n(96072),a=n.n(r),s=n(29491),o=n(86087),i=n(27723),l=n(51112),c=n(78478);const__=i.__,u=({buttonStyle:e="icon",textToCopy:t,onCopy:n,...r})=>{const[i,u]=(0,o.useState)(!1),d=(0,o.useRef)(),p=(0,s.useCopyToClipboard)(t,(()=>{d.current&&clearTimeout(d.current),u(!0),n?.(),d.current=setTimeout((()=>{u(!1),d.current=void0}),3e3)}));(0,o.useEffect)((()=>()=>{d.current&&clearTimeout(d.current)}),[]);letm=null,h=null;"text"!==e&&(m=i?React.createElement(c.Nr,null):React.createElement(c.ui,null));constg=__("Copy to clipboard","jetpack");return"icon"!==e&&(h=i?__("Copied!","jetpack"):g),React.createElement(l.A,a()({"aria-label":g,icon:m,children:h,ref:p},r))}},63406:(e,t,n)=>{"use strict";n.d(t,{I:()=>s});varr=n(47143),a=n(692);functions(){conste=(0,r.useDispatch)(a.store),t=(0,r.useSelect)((e=>e(a.store).getNotices()),[]);return{...e,createNotice:(t,n,r)=>e.createNotice(t,n,{type:"snackbar",...r}),createErrorNotice:(t,n)=>e.createErrorNotice(t,{type:"snackbar",...n}),createInfoNotice:(t,n)=>e.createInfoNotice(t,{type:"snackbar",...n}),createSuccessNotice:(t,n)=>e.createSuccessNotice(t,{type:"snackbar",...n}),createWarningNotice:(t,n)=>e.createWarningNotice(t,{type:"snackbar",...n}),getNotices:()=>t}}},11883:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});varr=n(27723),a=n(13022),s=n(51609);n(4459);const__=r.__;classoextendss.Component{staticdefaultProps={"aria-hidden":"false",focusable:"true"};needsOffset(e,t){return["gridicons-arrow-left","gridicons-arrow-right","gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-help-outline","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGDescription(e){if("description"inthis.props)returnthis.props.description;switch(e){default:return"";case"gridicons-audio":return__("Has audio.","jetpack");case"gridicons-arrow-left":return__("Arrow left","jetpack");case"gridicons-arrow-right":return__("Arrow right","jetpack");case"gridicons-calendar":return__("Is an event.","jetpack");case"gridicons-cart":return__("Is a product.","jetpack");case"chevron-down":return__("Show filters","jetpack");case"gridicons-comment":return__("Matching comment.","jetpack");case"gridicons-cross":return__("Close.","jetpack");case"gridicons-filter":return__("Toggle search filters.","jetpack");case"gridicons-folder":return__("Category","jetpack");case"gridicons-help-outline":return__("Help","jetpack");case"gridicons-info":case"gridicons-info-outline":return__("Information.","jetpack");case"gridicons-image-multiple":return__("Has multiple images.","jetpack");case"gridicons-image":return__("Has an image.","jetpack");case"gridicons-page":return__("Page","jetpack");case"gridicons-post":return__("Post","jetpack");case"gridicons-jetpack-search":case"gridicons-search":return__("Magnifying Glass","jetpack");case"gridicons-tag":return__("Tag","jetpack");case"gridicons-video":return__("Has a video.","jetpack")}}renderIcon(e){switch(e){default:returnnull;case"gridicons-audio":returnReact.createElement("g",null,React.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-arrow-left":returnReact.createElement("g",null,React.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}));case"gridicons-arrow-right":returnReact.createElement("g",null,React.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}));case"gridicons-block":
// translators: %s: The name of the connection the user is disconnecting.
__("Are you sure you want to disconnect <strong>%s</strong>?","jetpack"),e.display_name),{strong:React.createElement("strong",null)})),React.createElement(r.A,{size:"small",onClick:p,disabled:h,variant:t,isDestructive:n,className:u},h?__("Disconnecting…","jetpack"):_x("Disconnect","Disconnect a social media account","jetpack"))):null}},26637:(e,t,n)=>{"use strict";n(56427),n(47143),n(86087),n(27723),n(50001),n(31963),n(48222),n(48712),n(55488),n(85605)},52683:(e,t,n)=>{"use strict";n.d(t,{j:()=>l});varr=n(56427),a=n(47143),s=n(86087),o=n(27723),i=n(31963);const__=o.__;functionl({connection:e}){const{updateConnectionById:t}=(0,a.useDispatch)(i.M_),{isUpdating:n}=(0,a.useSelect)((t=>{const{getUpdatingConnections:n}=t(i.M_);return{isUpdating:n().includes(e.connection_id)}}),[e.connection_id]),o=(0,s.useCallback)((n=>{t(e.connection_id,{shared:n})}),[e.connection_id,t]);returnReact.createElement(r.CheckboxControl,{checked:e.shared??!1,onChange:o,disabled:n||"broken"===e.status,label:__("Mark the connection as shared","jetpack"),__nextHasNoMarginBottom:!0})}},76046:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});varr=n(51112),a=n(47143),s=n(86087),o=n(27723),i=n(31963),l=n(70745);const__=o.__,_x=o._x;functionc({connection:e,service:t,variant:n="link"}){const{deleteConnectionById:o,setKeyringResult:c,openConnectionsModal:u,setReconnectingAccount:d}=(0,a.useDispatch)(i.M_),{isDisconnecting:p,canManageConnection:m}=(0,a.useSelect)((t=>{const{getDeletingConnections:n,canUserManageConnection:r}=t(i.M_);return{isDisconnecting:n().includes(e.connection_id),canManageConnection:r(e)}}),[e]),h=(0,s.useCallback)((e=>{c(e),e?.ID&&u()}),[u,c]),g=(0,l.P)({service:t,onConfirm:h}),f=(0,s.useCallback)((async()=>{if(!awaito({connectionId:e.connection_id,showSuccessNotice:!1}))return;awaitd(e);constn=newFormData;"mastodon"===t.ID&&n.set("instance",e.external_handle),"bluesky"===t.ID?u():g(n)}),[e,o,u,g,t.ID,d]);returnm?React.createElement(r.A,{size:"small",onClick:f,disabled:p,variant:n},p?__("Disconnecting…","jetpack"):_x("Reconnect","Reconnect a social media account","jetpack")):null}},91910:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});varr=n(13022),a=n(28120),s=n.n(a),o=n(12141);consti=e=>{const{checked:t,disabled:n,onChange:a,serviceName:s,label:i,profilePicture:l}=e,c=(0,r.A)("components-connection-toggle",{"is-not-checked":!t,"is-disabled":n});returnReact.createElement("div",{className:c,title:i},React.createElement(o.A,{checked:t,label:i,onClick:a,serviceName:s,profilePicture:l}))};i.propTypes={className:s().string,checked:s().bool,id:s().string.isRequired,disabled:s().bool,onChange:s().func,serviceName:s().string,label:s().string,profilePicture:s().string};constl=i},10267:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(47143),a=n(86087),s=n(31963),o=n(91910),i=n(49514);classlextendsa.Component{onConnectionChange=()=>{const{id:e}=this.props;this.isDisabled()||this.props.toggleConnection(e)};connectionIsFailing(){const{failedConnections:e,name:t}=this.props;returne.some((e=>e.service_name===t))}isDisabled(){returnthis.props.disabled||this.connectionIsFailing()}render(){const{enabled:e,id:t,label:n,name:r,profilePicture:a}=this.props,s="connection-"+r+"-"+t,l=r.replace("_","-"),c=React.createElement(o.A,{id:s,className:i.A["connection-toggle"],checked:e,onChange:this.onConnectionChange,disabled:this.isDisabled(),serviceName:l,label:n,profilePicture:a});returnReact.createElement("li",null,React.createElement("div",{className:i.A["connection-container"]},c))}}constc=(0,r.withSelect)((e=>({failedConnections:e(s.Af).getFailedConnections()})))(l)},77125:(e,t,n)=>{"use strict";n.d(t,{l:()=>m});varr=n(51112),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(77627),c=n(31963),u=n(51371),d=n(51475),p=n(71016);const_n=i._n,m=()=>{const{brokenConnections:e,reauthConnections:t}=(0,s.useSelect)((e=>{constt=e(c.M_);return{brokenConnections:t.getBrokenConnections(),reauthConnections:t.getMustReauthConnections()}}),[]),{connectionsPageUrl:n}=(0,l.A)(),{useAdminUiV1:i}=(0,u.n)().feature_flags,{openConnectionsModal:m}=(0,s.useDispatch)(c.M_)
_n("This post will be shared to %d connection.","This post will be shared to %d connections.",u.length,"jetpack"),u.length))):null}},9573:(e,t,n)=>{"use strict";n.d(t,{X:()=>u});varr=n(3924),a=n(85985),s=n(56427),o=n(27723),i=n(70407),l=n(71016),c=n(647);const_x=o._x,u=()=>{conste=(0,c.X)();return(0,a.Sy)()||(0,a.d9)()||(0,i.hasSocialPaidFeatures)()?null:React.createElement(s.PanelRow,{className:l.A["enhanced-features-nudge"]},React.createElement(s.Button,{key:"upgrade",variant:"link",onClick:e,href:(0,r.A)("jetpack-social-basic-plan-block-editor",{site:(0,a.GE)()||"",query:"redirect_to="+encodeURIComponent(window.location.href)})},_x("Unlock enhanced media sharing features.","Call to action to buy a new plan","jetpack")))}},70925:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});varr=n(56427),a=n(86087),s=n(7162),o=n(98420),i=n(54915),l=n(80624),c=n(52367),u=n(50001),d=n(48222),p=n(96390),m=n(64636),h=n(14993),g=n(9573),f=n(41190);functionb(){const{hasConnections:e,hasEnabledConnections:t,connections:n}=(0,u.A)(),{isPublicizeEnabled:b,isPublicizeDisabledBySitePlan:v}=(0,s.usePublicizeConfig)(),{attachedMedia:k}=(0,o.A)(),y=(0,i.A)(),w=k[0]?.id||y,{validationErrors:E,isConvertible:_}=(0,c.A)(n,(0,l.A)(w)[0]),C=b&&(t||k.length>0||0!==Object.keys(E).length&&!_),A=v?r.Disabled:a.Fragment,{feature_flags:x}=(0,s.getSocialScriptData)();returnReact.createElement(A,null,x.useAdminUiV1?React.createElement(d._,null):null,e?React.createElement(React.Fragment,null,React.createElement(r.PanelRow,null,React.createElement(h.E,null)),x.useEditorPreview&&b?React.createElement(p.n,null):null,React.createElement(g.X,null)):null,React.createElement(m.D,null),!v&&React.createElement(a.Fragment,null,C&&React.createElement(f.o,{analyticsData:{location:"editor"}})))}},62697:(e,t,n)=>{"use strict";n.d(t,{q:()=>c});varr=n(3924),a=n(97999),s=n(56427),o=n(27723),i=n(27844),l=n(51475);const__=o.__,c=()=>(0,a.siteHasFeature)(i.q.ENHANCED_PUBLISHING)?React.createElement(l.A,{type:"warning"},__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,r.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack"))):React.createElement(l.A,{type:"warning"},__("You need a featured image to share to Instagram.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,r.A)("jetpack-social-share-to-instagram")},__("Learn more","jetpack")))},31099:(e,t,n)=>{"use strict";n.d(t,{j:()=>p});varr=n(3924),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(80682),c=n(31963),u=n(51475),d=n(9515);const__=i.__,_x=i._x,p=({validationErrors:e})=>{const{getConnectionById:t}=(0,s.useSelect)((e=>e(c.M_)),[]),n=(0,d.h)(),i=(0,o.useMemo)((()=>Object.entries(e).reduce(((e,[r,a])=>{if(!a)returne;e[a]||(e[a]=[]);consts=n(t(r)?.service_name);returns&&!e[a].includes(s)&&e[a].push(s),e}),{})),[t,n,e]);returnReact.createElement(u.A,{type:"warning"},React.createElement("p",null,__("The selected media cannot be share to some social media platforms.","jetpack")),React.createElement("ul",null,Object.entries(i).map((([e,t])=>t.length?React.createElement("li",{key:e},React.createElement("i",null,(0,l.$m)(e)),_x(":","Colon to display before the list of social media platforms","jetpack")+" ",t.map(((e,t,{length:n})=>React.createElement(o.Fragment,{key:e},React.createElement("b",null,e),t<n-1&&_x(",","Comma to separate list of social media platforms","jetpack")+" ")))):null))),React.createElement(a.ExternalLink,{href:(0,r.A)("jetpack-social-media-support-information")},__("Troubleshooting tips","jetpack")))}},75013:(e,t,n)=>{"use strict";n.d(t,{L:()=>d});varr=n(98420),a=n(54915),s=n(80624),o=n(52367),i=n(80682),l=n(50001),c=n(62697),u=n(31099);constd=()=>{const{connections:e}=(0,l.A)(),{attachedMedia:t}=(0,r.A)(),n=(0,a.A)(),d=t[0]?.id||n,{validationErrors:p,isConvertible:m}=(0,o.A)(e,(0,s.A)(d)[0]);returnObject.keys(p).length?Object.values(p).includes(i.k3)?React.createElement(c.q,null):m?null:React.createElement(u.j,{validationErrors:p}):null}
_n("%d character remaining","%d characters remaining",d,"jetpack"),d),__nextHasNoMarginBottom:!0})}},51475:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});varr=n(56427),a=n(27723),s=n(51113),o=n(31249),i=n(13022),l=n(28120),c=n.n(l),u=n(93794);const__=a.__,d=({children:e,type:t="default",actions:n=[],onDismiss:a})=>{constl=(0,i.A)(u.A.notice,u.A[`notice--${t}`]);returnReact.createElement("div",{className:l},React.createElement("div",null," ",e," "),a&&React.createElement("button",{className:u.A.dismiss,onClick:a},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(s.A,{icon:o.A})),n&&n.length>0&&React.createElement("div",{className:u.A.actions},n.map((e=>e))))};d.propTypes={children:c().node.isRequired,type:c().oneOf(["default","highlight","warning","error"]),actions:c().arrayOf(c().element),onDismiss:c().func};constp=d},66561:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});varr=n(56427),a=n(47143),s=n(43656),o=n(86087),i=n(27723),l=n(77627),c=n(88584),u=n(49036),d=n(50001),p=n(51371),m=n(70925),h=n(30642),g=n(51353),f=n(1101),b=n(87170);const__=i.__,v=({prePublish:e,children:t})=>{const{refresh:n,hasConnections:i,hasEnabledConnections:v}=(0,d.A)(),k=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{feature_flags:y}=(0,p.n)(),w=(0,c.A)(),{isPublicizeEnabled:E,hidePublicizeFeature:_,togglePublicizeFeature:C}=(0,l.A)();(0,u._D)((function(){v&&n()}),[v,n]);constA=e?o.Fragment:r.PanelBody,x=e?{}:{title:__("Share this post","jetpack"),className:b.A.panel};returnw(),React.createElement(A,x,t,!_&&React.createElement(o.Fragment,null,!k&&React.createElement(r.ToggleControl,{label:E?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:C,checked:E&&i,disabled:!i,__nextHasNoMarginBottom:!0}),React.createElement(m.A,null),React.createElement(f.O,null)),k&&React.createElement(React.Fragment,null,y.useShareStatus?React.createElement(g.E,null):null,React.createElement(h.F,null)))}},65843:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});varr=n(85985),a=n(47143),s=n(14309),o=n(43656),i=n(27723),l=n(34600),c=n(68541),u=n(5780);const__=i.__;functiond(){const{isCurrentPostPublished:e}=(0,a.useSelect)((e=>e(o.store)),[]);returne()?React.createElement(s.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack"),id:"publicize-manual-sharing",icon:React.createElement(r.jt,null)},React.createElement(l.P,{className:u.A.description,variant:"body-small"}),React.createElement(c.R,null)):null}},26029:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});varr=n(50723),a=n(65843),s=n(39691),o=n(89640);consti=()=>React.createElement(r.Ay,{targetDom:document.body},React.createElement(o.p,null),React.createElement(a.A,null),React.createElement(s.A,null))},39691:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});varr=n(3924),a=n(85985),s=n(1455),o=n.n(s),i=n(14309),l=n(86087),c=n(77627),u=n(49036),d=n(50001),p=n(25300);constm=()=>{const[e,t]=(0,l.useState)((0,a.$i)()?.social?.reviewRequestDismissed??!0),[n,s]=(0,l.useState)(!1),{hasEnabledConnections:m}=(0,d.A)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,c.A)();(0,u.Wv)((()=>{s(!g&&h&&m)}),[g,m,h]);constf=(0,l.useCallback)((()=>{conste=(0,a.$i)()?.social?.dismissReviewRequestPath??null;o()({path:e,method:"POST",data:{dismissed:!0}}).catch((e=>{throwe})),t(!0)}),[]);returne||!n?null:React.createElement(i.PluginPostPublishPanel,{id:"publicize-title"},React.createElement(p.A,{href:(0,r.A)("jetpack-social-plugin-reviews"),onClose:f}))}},89640:(e,t,n)=>{"use strict";n.d(t,{p:()=>m});varr=n(47143),a=n(14309),s=n(43656),o=n(92214),i=n(383),l=n(57275),c=n(49036),u=n(31963),d=n(51371),p=n(79594);functionm(){const{isPublicizeEnabled:e}=(0,i.h)(),{pollForPostShareStatus:t}=(0,r.useDispatch)(u.M_),{feature_flags:n}=(0,d.n)(),{isPostPublished:m}=(0,r.useSelect)((e=>({isPostPublished:e(s.store).isCurrentPostPublished()})),[]),h=(0,l.z)((0,o.P)()),g=(0,l.z)((0,r.useSelect)((e=>e(u.M_).getEnabledConnections()),[])),f=e&&g.length>0&&h,b=n.useShareStatus&&f&&m;return(0,c._D)((()=>{b&&t({isRequestComplete:({postShareStatus:e})=>e.done})}),[b]),
_n("Your post was unable to be shared to %d connection.","Your post was unable to be shared to %d connections.",u,"jetpack"),u)),React.createElement(l.JU,{variant:"link",analyticsData:{location:"post-publish-panel"}},__("Review status and try again","jetpack"))):t.done?n.length?React.createElement(React.Fragment,null,React.createElement("b",null,__("Your post was shared.","jetpack")),"","🎉",React.createElement("p",null,(0,s.sprintf)(/* translators: %d: number of connections to which a post was shared */
_n("You post was successfuly shared to %d connection.","You post was successfuly shared to %d connections.",n.length,"jetpack"),n.length)),React.createElement(l.JU,{analyticsData:{location:e?"resharing-section":"post-publish-panel"}})):React.createElement("span",null,__("Your post was not shared.","jetpack")):React.createElement("span",null,__("The request to share your post is still in progress.","jetpack"),"",__("Please refresh and check again in a few minutes.","jetpack"))}},51353:(e,t,n)=>{"use strict";n.d(t,{E:()=>c});varr=n(47143),a=n(51609),s=n(31963),o=n(79594),i=n(7757),l=n(61420);constc=()=>{conste=(0,r.useSelect)((e=>e(s.M_).getPostShareStatus()),[]),[t,n]=(0,a.useState)(null);return(0,a.useEffect)((()=>{e.polling&&n(Date.now()/1e3)}),[e.polling]),t?React.createElement("div",{className:l.A.wrapper},React.createElement(o.q,{reShareTimestamp:t})):React.createElement(i.JU,{withWrapper:!0,analyticsData:{location:"editor"}})}},25300:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(50723),a=n(51112),s=n(85985),o=n(27723),i=n(51609),l=n(76445);const__=o.__,c=({href:e,onClose:t})=>{const{recordEvent:n}=(0,s.st)({pageViewEventName:"social_plugin_review_prompt",pageViewNamespace:"jetpack",pageViewSuffix:"view"}),c=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_new_review_click")}),[n]),u=(0,i.useCallback)((()=>{n("jetpack_social_plugin_review_prompt_dismiss_click"),t()}),[n,t]);returnReact.createElement(r.Ay,null,React.createElement("div",{className:l.A.prompt},React.createElement("h2",{className:l.A.header},(0,o.sprintf)(/* translators: %s is the celebration emoji */
__("Presto! %s","jetpack"),String.fromCodePoint(127881))),React.createElement("p",null,__("Just like that, Jetpack Social has shared your post to your connected social accounts.","jetpack")),React.createElement("p",null,__("Please leave a review to let others know how easy getting your posts on social media can be!","jetpack")),React.createElement("div",{className:l.A.buttons},React.createElement(a.A,{onClick:c,isExternalLink:!0,href:e,className:l.A.button},__("Leave a Review","jetpack")),React.createElement(a.A,{onClick:u,variant:"link",className:l.A.button},__("Dismiss","jetpack")))))}},53774:(e,t,n)=>{"use strict";n.d(t,{$:()=>p});varr=n(51112),a=n(47143),s=n(86087),o=n(27723),i=n(13022),l=n(31963),c=n(75018),u=n(42475),d=n(70745);const__=o.__,_x=o._x;functionp({service:e,isSmall:t,onSubmit:n,displayInputs:o,hasConnections:p,buttonLabel:m}){const{setKeyringResult:h}=(0,a.useDispatch)(l.M_),{isConnectionsModalOpen:g}=(0,a.useSelect)((e=>e(l.M_)),[]),f=(0,s.useCallback)((e=>{g()&&h(e)}),[h,g]),b=(0,d.P)({service:e,onConfirm:f}),v=(0,s.useCallback)((e=>{if(e.preventDefault(),e.stopPropagation(),n)returnn();constt=newFormData(e.target);b(t)}),[n,b]);returnReact.createElement("form",{className:(0,i.A)(u.A["connect-form"],{[u.A.small]:t}),onSubmit:v},o?React.createElement("div",{className:u.A["fields-wrapper"]},React.createElement(c.t,{service:e})):null,React.createElement("div",{className:u.A["fields-wrapper"]},React.createElement("div",{className:u.A["fields-item"]},React.createElement(r.A,{variant:p?"secondary":"primary",type:"submit",className:u.A["connect-button"]},m||(p?_x("Connect more","","jetpack"):__("Connect","jetpack"))))))}},75018:(e,t,n)=>{"use strict";n.d(t,{t:()=>u});varr=n(42266),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(31963),c=n(42475);const__=i.__,_x=i._x;functionu({service:e}){constt=(0,o.useId)(),n=(0,s.useSelect)((e=>e(l.M_).getReconnectingAccount()),[]);return"mastodon"===e.ID?React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-handle`},_x("Handle","The handle of a social media account.","jetpack")),React.createElement("input",{id:`${t}-handle`,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack"),"aria-describedby":`${t}-handle-description`,placeholder:"@mastodon@mastodon.social"}),React.createElement("p",{className:"description",id:`${t}-handle-description`},__("You can find the handle in your Mastodon profile.","jetpack"))):"bluesky"===e.ID?React.createElement(React.Fragment,null,React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-handle`},_x("Handle","The handle of a social media account.","jetpack")),React.createElement("input",{id:`${t}-handle`,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===n?.service_name?n?.external_handle:void0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack"),"aria-describedby":`${t}-handle-description`,placeholder:"username.bsky.social"}),React.createElement("p",{className:"description",id:`${t}-handle-description`},__("You can find the handle in your Bluesky profile.","jetpack"))),React.createElement("div",{className:c.A["fields-item"]},React.createElement("label",{htmlFor:`${t}-password`},__("App password","jetpack")),React.createElement("input",{id:`${t}-password`,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("App password","jetpack"),"aria-describedby":`${t}-password-description`,placeholder:"xxxx-xxxx-xxxx-xxxx"}),React.createElement("p",{className:"description",id:`${t}-password-description`},(0,o.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can <link>generate it in Bluesky</link>.","jetpack"),{link:React.createElement(a.ExternalLink,{href:"https://bsky.app/settings/app-pa
// translators: %d: Number of connections
__("%d connections","jetpack"),e.length):__("Connected","jetpack"))}},78362:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});varr=n(47143),a=n(31963),s=n(59008),o=n(42475),i=n(39630);functionl(){conste=(0,i.o)(),t=(0,r.useSelect)((e=>e(a.M_).getConnections().reduce(((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e)),{})),[]),n=(0,r.useSelect)((e=>e(a.M_).getReconnectingAccount()),[]);returnReact.createElement("ul",{className:o.A.services},e.map((e=>React.createElement("li",{key:e.ID,className:o.A["service-list-item"]},React.createElement(s.j,{service:e,serviceConnections:t[e.ID]||[],isPanelDefaultOpen:n?.service_name===e.ID})))))}},70745:(e,t,n)=>{"use strict";n.d(t,{P:()=>u});varr=n(63406),a=n(47143),s=n(86087),o=n(27723),i=n(31963),l=n(70407);const__=o.__,c=e=>/^@?\b([A-Z0-9_]+)@([A-Z0-9.-]+\.[A-Z]{2,})$/gi.test(e);functionu({service:e,onConfirm:t}){const{createErrorNotice:n}=(0,r.I)(),o=(0,a.useSelect)((e=>e(i.M_).isMastodonAccountAlreadyConnected),[]),u=(0,a.useSelect)((e=>e(i.M_).isBlueskyAccountAlreadyConnected),[]);return(0,s.useCallback)((r=>{consta=newURL(e.connect_URL);switch(e.ID){case"mastodon":{conste=r.get("instance").toString().trim();if(!c(e))returnvoidn(__("Invalid Mastodon username","jetpack"));if(o?.(e))returnvoidn(__("This Mastodon account is already connected","jetpack"));a.searchParams.set("instance",e);break}case"bluesky":{conste=(r.get("handle")?.toString()||"").trim().replace(/^@/,"");if(!function(e){constt=e.split(".").filter(Boolean);return!(t.length<2)&&t.every((e=>/^[a-z0-9_-]+$/i.test(e)))}(e))returnvoidn(__("Invalid Bluesky handle","jetpack"));if(u?.(e))returnvoidn(__("This Bluesky account is already connected","jetpack"));a.searchParams.set("handle",e),a.searchParams.set("app_password",(r.get("app_password")?.toString()||"").trim());break}}(0,l.requestExternalAccess)(a.toString(),t)}),[n,u,o,t,e.ID,e.connect_URL])}},9515:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});varr=n(51609),a=n(48712);functions(){conste=(0,a.h)();return(0,r.useCallback)((t=>e(t)?.label||t[0].toUpperCase()+t.substring(1)),[e])}},48712:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});varr=n(51609),a=n(39630);functions(){conste=(0,a.o)(),t=(0,r.useMemo)((()=>e.reduce(((e,t)=>(e[t.ID]=t,e)),{})),[e]);return(0,r.useCallback)((e=>t[e]),[t])}},39630:(e,t,n)=>{"use strict";n.d(t,{o:()=>f});varr=n(96072),a=n.n(r),s=n(78478),o=n(56427),i=n(86087),l=n(27723),c=n(30081),u=n(26818),d=n(43443),p=n(11326),m=n(65398),h=n(9791),g=n(51371);const__=l.__;functionf(){conste=(0,i.useMemo)((()=>{const{supported_services:e}=(0,g.n)();returne.reduce(((e,t)=>({...e,[t.ID]:t})),{})}),[]),t={text:__("New","jetpack"),style:{background:"#e9eff5",color:"#0675C4"}};return[{...e.facebook,icon:e=>React.createElement(s.M5,a()({serviceName:"facebook"},e)),description:__("Share to your pages","jetpack"),examples:[()=>React.createElement(React.Fragment,null,(0,i.createInterpolateElement)(__("<strong>Connect</strong> to automatically share posts on your Facebook page.","jetpack"),{strong:React.createElement("strong",null)})),()=>React.createElement("img",{src:c,alt:__("Add Facebook connection","jetpack")})]},{...e["instagram-business"],icon:e=>React.createElement(s.M5,a()({serviceName:"instagram"},e)),description:__("Share to your Instagram Business account.","jetpack"),examples:[()=>React.createElement(React.Fragment,null,__("Drive engagement and save time by automatically sharing images to Instagram when you publish blog posts.","jetpack"),React.createElement("div",{className:"instagram-business__requirements"},React.createElement("h4",null,__("Requirements for connecting Instagram:","jetpack")),React.createElement("ol",null,React.createElement("li",null,__("You must have an Instagram Business account.","jetpack")),React.createElement("li",null,__("Your Instagram Business account must be linked to a Facebook page.","jetpack")))),(0,i.createInterpolateElement)(__("<i>Whenyouclick“connect”you'll be asked to <strong>log into Facebook</strong>. If your Instagram Business account isn'tlisted,ensureit'slinkedt
__("Share on %s","jetpack"),o);returnReact.createElement("div",{className:p.A.container,key:i},React.createElement(a.A,{icon:d,variant:t,"aria-label":m,href:u,target:"_blank",rel:"noopener noreferrer",onClick:b(u,{network:i}),className:"icon"===e?p.A[i]:"has-text"},"icon"===e?null:React.createElement(React.Fragment,null,"icon-text"===e&&React.createElement(r.M5,{className:p.A[i],serviceName:i}),React.createElement(s.Ay,{className:p.A.label,component:"span"},m))))})),React.createElement("div",{className:p.A.container},React.createElement(o.A,{buttonStyle:e,onCopy:g,textToCopy:f,className:"icon"===e?p.A.clipboard:" has-text",variant:t},"icon"===e?null:React.createElement(s.Ay,{className:p.A.label,component:"span"},__("Copy to clipboard","jetpack")))))}},53975:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});varr=n(47143),a=n(43656),s=n(86087),o=n(383);functioni(){const{shareMessage:e}=(0,o.h)(),{message:t,link:n}=(0,r.useSelect)((t=>{const{getEditedPostAttribute:n}=t(a.store);return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}}),[e]);return(0,s.useCallback)(((e,r=!0)=>{leta=t,s=n;returne.includes("{{url}}")||(a=a+"\n\n"+s,s=""),r&&(a=encodeURIComponent(a),s=encodeURIComponent(s)),e.replace("{{text}}",a).replace("{{url}}",s)}),[n,t])}},1101:(e,t,n)=>{"use strict";n.d(t,{O:()=>b});varr=n(85985),a=n(56427),s=n(47143),o=n(43656),i=n(86087),l=n(27723),c=n(692),u=n(92214),d=n(77627),p=n(31873),m=n(31963),h=n(51371);const__=l.__;functiong(e=__("Unable to share the Post","jetpack")){const{createErrorNotice:t}=(0,s.dispatch)(c.store);t(e,{id:"publicize-post-share-message"})}functionf(){const{isPublicizeEnabled:e}=(0,d.A)(),{isFetching:t,isError:n,isSuccess:l,doPublicize:f}=(0,p.A)(),b=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{feature_flags:v}=(0,h.n)(),{pollForPostShareStatus:k}=(0,s.useDispatch)(m.M_),{recordEvent:y}=(0,r.st)();(0,i.useEffect)((()=>{if(!t)returnn?g():void(l&&function(){const{createSuccessNotice:e}=(0,s.dispatch)(c.store);e(__("Request submitted successfully.","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[t,n,l]);constw=(0,u.P)(),E=!e||!w||!b||t,_=(0,i.useCallback)((async()=>{if(!b)returng(__("You must publish your post before you can share it.","jetpack"));(0,s.dispatch)(c.store).removeNotice("publicize-post-share-message"),y("jetpack_social_reshare_clicked",{location:"editor",environment:(0,r.d9)()?"atomic":(0,r.Sy)()?"simple":"jetpack"}),awaitf(),v.useShareStatus&&k()}),[b,y,f,v.useShareStatus,k]);returnReact.createElement(a.Button,{variant:"secondary",onClick:_,disabled:E,isBusy:t},__("Share post","jetpack"))}functionb(){const{isRePublicizeUpgradableViaUpsell:e}=(0,d.A)(),t=(0,s.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{hasConnections:n}=(0,s.useSelect)((e=>e(m.M_)),[]);returnt?e?null:n()?React.createElement(a.PanelRow,null,React.createElement(f,null)):null:null}},7757:(e,t,n)=>{"use strict";n.d(t,{JU:()=>a.g,Q3:()=>r.Q});varr=n(59032),a=n(95499)},95499:(e,t,n)=>{"use strict";n.d(t,{g:()=>m});varr=n(96072),a=n.n(r),s=n(85985),o=n(56427),i=n(47143),l=n(27723),c=n(51609),u=n(31963),d=n(51371),p=n(14150);const__=l.__,m=(0,c.forwardRef)((({withWrapper:e=!1,analyticsData:t=null,...n},r)=>{const{recordEvent:l}=(0,s.st)(),{openShareStatusModal:m}=(0,i.useDispatch)(u.M_),h=(0,i.useSelect)((e=>e(u.M_).getPostShareStatus()),[]),g=(0,c.useCallback)((()=>{l("jetpack_social_share_status_modal_opened",t),m()}),[t,m,l]);if(!h||!h.shares||0===h.shares.length)returnnull;const{feature_flags:f}=(0,d.n)();if(!f.useShareStatus)returnnull;constb=React.createElement(o.Button,a()({variant:"secondary",onClick:g},n,{ref:r}),n.children||__("View sharing history","jetpack"));returne?React.createElement("div",{className:p.A["trigger-wrapper"]},b):b}))},59032:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d});varr=n(50723),a=n(56427),s=n(47143),o=n(27723),i=n(31963),l=n(30557),c=n(14150);const__=o.__;functionu(){const{closeShareStatusModal:e}=(0,s.useDispatch)(i.M_);returnReact.createElement("div",{className:c.A.wrapper},React.createElement(a.Mod
__("Pick the %s template","jetpack"),t.label))))))}},10936:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(26365),a=n(45329),s=n(9509);consto=[{name:"highway",label:"Highway",image:n(22417)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},98725:(e,t,n)=>{"use strict";n(47143),n(86087),n(51609),n(31963)},96390:(e,t,n)=>{"use strict";n.d(t,{n:()=>d});varr=n(85985),a=n(56427),s=n(86087),o=n(27723),i=n(10991),l=n(18603),c=n(94360),u=n(47944);const__=o.__;functiond(){const[e,t]=(0,s.useReducer)((e=>!e),!1),{recordEvent:n}=(0,r.st)(),o=(0,s.useCallback)((()=>{e||n("jetpack_social_preview_modal_opened"),t()}),[e,n]);returnReact.createElement(a.PanelRow,{className:u.A.panel},e&&React.createElement(a.Modal,{onRequestClose:t,title:__("Social Previews","jetpack"),className:u.A.modal,__experimentalHideHeader:!0},React.createElement("div",{className:u.A["modal-content"]},React.createElement(c.X,null),React.createElement(l.w,null)),React.createElement(a.Button,{className:u.A["close-button"],onClick:t,icon:i.A,label:__("Close","jetpack")})),React.createElement(a.Button,{variant:"secondary",onClick:o},__("Preview social posts","jetpack")))}},98588:(e,t,n)=>{"use strict";n.d(t,{z:()=>E});varr=n(96072),a=n.n(r),s=n(29103),o=n(73188),i=n(73066),l=n(57984),c=n(48914),u=n(83945),d=n(73915),p=n(89075),m=n(95550),h=n(3582),g=n(47143),f=n(86087),b=n(18537),v=n(27723),k=n(39553),y=n(62697),w=n(31137);const__=v.__;functionE({connection:e}){constt=(0,f.useMemo)((()=>({displayName:e.display_name,profileImage:e.profile_picture,externalName:e.external_handle})),[e]),{image:n,media:r,title:v,description:E,url:_,excerpt:C}=(0,w.s)(),A=((0,k.A)().message||"").trim(),x=(0,f.useMemo)((()=>({description:E,image:n,media:r,title:v,url:_})),[E,n,r,v,_]),j=(0,g.useSelect)((e=>{const{getUnstableBase:t}=e(h.store);return(0,b.decodeEntities)(t(void0)?.name)}),[]),S=r?.some((({type:e})=>e.startsWith("image/")||e.startsWith("video/")));switch(e.service_name){case"bluesky":{conste=r?.[0],n=e?.type.startsWith("image/")?e.url:null;returnReact.createElement(s.O,a()({},x,{description:(0,b.decodeEntities)(C),user:{avatarUrl:t.profileImage,address:t.externalName,displayName:t.displayName},customText:(0,b.decodeEntities)(A||`${v}\n\n${C.replaceAll(/[\s\n]/g," ")}`),customImage:n}))}case"facebook":returnS?React.createElement(o.h,a()({},x,{type:"article",customText:A||C||v,user:{...t,avatarUrl:t.profileImage}})):React.createElement(i.l,a()({},x,{type:"article",customText:A||C||v,user:{...t,avatarUrl:t.profileImage}}));case"instagram-business":{conste=Boolean(n);returnS||e?React.createElement(l.l,a()({},x,{image:r?.[0]?.url||n,name:t.displayName,profileImage:t.profileImage,caption:A||v||E})):React.createElement(y.q,null)}case"linkedin":returnReact.createElement(c.$,a()({},x,{jobTitle:__("Job Title (Company Name)","jetpack"),name:t.displayName,profileImage:t.profileImage,description:A||v||E}));case"mastodon":{conste=r?.[0],n=e?.type.startsWith("image/")?e.url:null;returnReact.createElement(u._,a()({},x,{description:C,siteName:j,user:{avatarUrl:t.profileImage,address:t.displayName,displayName:t.displayName},customText:A,customImage:n}))}case"nextdoor":{conste=`${A||v||E}${r.length?_:""}`.trim();returnReact.createElement(d.K,a()({},x,{description:e,name:t.displayName,profileImage:t.profileImage}))}case"threads":{lete=v;A?e=A:v&&C&&(e=`${v}\n\n${C}`);constn=500-_.length-2;returne=(0,b.decodeEntities)(e).slice(0,n),e+=`\n\n${_}`,React.createElement(p.s,a()({},x,{caption:e,name:t.displayName,profileImage:t.profileImage}))}case"tumblr":returnReact.createElement(m.B,a()({},x,{user:{displayName:t.displayName,avatarUrl:t.profileImage},customText:A}));default:returnnull}}},18603:(e,t,n)=>{"use strict";n.d(t,{w:()=>h});varr=n(85985),a=n(56427),s=n(47143),o=n(27723),i=n(51609),l=n(31963),c=n(12141),u=n(39329),d=n(48712),p=n(98588),m=n(47944);const__=o.__,_x=o._x;functionh(){const{recordEvent:e}=(0,r.st)(),t=(0,d.h)(),{canBeTurnedOn:n,shouldBeDisabled:o}=(0,u.j)(),h=(0,s.useSelect)((e=>e(l.
// Translators: %s is the date when the requests will reset.
constn=__("Requests will reset on %s.","jetpack");return`${t}${(0,l.sprintf)(n,e)}`})((e=>{if(!e?.nextStart)returnnull;constt=newDate(e.nextStart);returnt.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e));return(0,i.createInterpolateElement)(t,{link:(0,r.createElement)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"})})})();return"muted"===e?(0,r.createElement)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant"},t):"error"===e?(0,r.createElement)(o.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice"},t):null},v=e=>{const{upgradeType:t,currentTier:n}=(0,m.A)();return1===n?.value?(0,r.createElement)(b,null):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{constn=t?g.U:d.c,a=(0,i.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,r.createElement)("strong",null)});return(0,r.createElement)(n,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||a,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})=>{consto=n?g.U:d.c,{checkoutUrl:c}=(0,p.A)(),u=(0,h.C)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y}=(0,m.A)(),{tracks:w}=(0,s.st)(),E=(0,i.useCallback)((()=>{f("upgrade",e),w.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:y,placement:e})}),[k,y,w,e]),_=(0,i.useCallback)((()=>{f("contact us",e),w.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[w,e]);if(!u){conste=(0,i.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,r.createElement)("strong",null)});return(0,r.createElement)(o,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(v){if(!b){conste=(0,a.A)("jetpack-ai-tiers-more-requests-contact"),n=__("You have reached the request limit for your current plan.","jetpack");return(0,r.createElement)(o,{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"})}conste=(0,i.createInterpolateElement)((0,l.sprintf)(/* Translators: number of requests */
__("You have reached the requests limit for your current plan. <strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack"),b.limit),{strong:(0,r.createElement)("strong",null)});return(0,r.createElement)(o,{buttonText:(0,l.sprintf)(/* Translators: number of requests */
__("Upgrade to %d requests","jetpack"),b.limit),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:E,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,r.createElement)(o,{buttonText:"Upgrade",checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:(0,i.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Upgrade now to keep using it.</strong>","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:E,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},93094:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});varr=n(82170),a=n(56427),s=n(27723);const__=s.__,o=({title:e,description:t,buttonText:n=null,checkoutUrl:s=null,goToCheckoutPage:o=null,isRedirecting:i=!1,showButton:l=!0,target:c="_top"})=>{constu=__("Redirecting…","jetpack");return(0,r.createElement)("div",{className:"jetpack-upgrade-plan-banner-light"},(0,r.createElement)(a.Notice,{status:"error",isDismissible:!1},(0,r.createElement)("p",null,e&&(0,r.createElement)("strong",null,e),t," ",l&&(0,r.createElement)(a.Button,{href:i?null:s,onClick:o,variant:"link",target:c},i?u:n))))}},62402:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>m,US:()=>u,hN:()=>p});varr=n(82170),a=n(96865),s=n(85985),o=n(56427),i=n(27723),l=n(29115);n(51609);const__=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d=({value:e,onChange:t})=>(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((n=>(0,r.createElement)(o.MenuItem,{key:`key-${n}`,onClick:()=>t(n),isSelected:e===n},`${a.oZ[n].emoji}${a.oZ[n].label}`))));functionp({label:e=a.uQ,value:t=u,onChange:n,disabled:s=!1}){return(0,r.createElement)(o.DropdownMenu,{icon:a.Qr,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},e),(0,r.createElement)(o.Icon,{icon:l.A})),disabled:s}},(({onClose:e})=>(0,r.createElement)(d,{value:t,onChange:t=>{n(t),e()}})))}functionm({value:e=u,onChange:t,disabled:n=!1}){const{tracks:i}=(0,s.st)();returnn?(0,r.createElement)(o.Tooltip,{text:a.uQ},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:a.Qr}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.Qr,label:a.uQ,popoverProps:{variant:"toolbar"},disabled:n,onToggle:e=>{e&&i.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,r.createElement)(d,{value:e,onChange:t})))}},51698:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});varr=n(82170),a=n(96865),s=n(94715),o=n(56427),i=n(27723),l=n(83883),c=n(83822),u=n(2162),d=n(99050),p=n(33468),m=n(62402);const__=i.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:n,handleAcceptContent:i,handleTryAgain:h,showRetry:g,contentBefore:f,hasPostTitle:b,wholeContent:v,setUserPrompt:k,recordEvent:y,isGeneratingTitle:w})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.BlockControls,null,!g&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(p.Ay,{hasContentBefore:!!f?.length,hasContent:!!v?.length,hasPostTitle:b,contentIsLoaded:e,onPromptSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),k(e.translated)},onSuggestionSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,r.createElement)(s.BlockControls,{group:"block"},(0,r.createElement)(m.Ay,{value:"neutral",onChange:n=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:a.eJ}),t(a.eJ,{tone:n,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,r.createElement)(u.Ay,{value:"en",onChange:n=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:a.Gm}),t(a.Gm,{language:n,contentType:e?"generated":null})},disabled:!e&&!v?.length})
_n("visitor","visitors",parseInt(x),"jetpack",0),N=/* Translators: Number of views */
_n("hit","hits",parseInt(x),"jetpack",0);return(0,r.createElement)("div",A,(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(p.z,{attributes:e,setAttributes:n})),(0,r.createElement)("div",{className:t},o||null===k?(0,r.createElement)("p",{className:"jetpack-blog-stats__loading"},__("Loading stats…","jetpack")):(0,r.createElement)("p",null,(0,r.createElement)("span",null,(0,a.A)(x)," "),(0,r.createElement)(l.RichText,{tagName:"span",placeholder:"visitors"===b?S:N,value:f,allowedFormats:["core/bold","core/italic","core/link"],onChange:e=>n({label:e})}))))}},95184:(e,t,n)=>{"use strict";varr=n(74997),a=n(94375),s=n(35116),o=n(20201);(0,a.M)(s,{edit:o.A,save:()=>null,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog-stats"===e,transform:({instance:e})=>{constt=e.raw.title?(0,r.createBlock)("core/heading",{content:e.raw.title,level:3}):null,n=(0,r.createBlock)("jetpack/blog-stats",{label:e.raw.hits});returnt?[t,n]:n}}]}})},51744:(e,t,n)=>{"use strict";n.d(t,{k:()=>l});varr=n(82170),a=n(85985),s=n(56427),o=n(27723),i=n(35116);const__=o.__,l=({className:e,isLoading:t,changeStatus:n})=>{consto=(0,a.d9)()?"https://wordpress.com/support/stats/":"https://jetpack.com/support/jetpack-stats/";return(0,r.createElement)("div",{className:e},(0,r.createElement)(s.Placeholder,{icon:(0,a.sh)(i),instructions:__("You'll need to activate the Stats module to use this block. Please note that hits are only counted while this module is active.","jetpack"),label:i.title},(0,r.createElement)(s.Button,{disabled:t,isBusy:t,onClick:()=>n(!0),variant:"secondary"},t?__("Activating Stats","jetpack"):__("Activate Stats","jetpack",0)),(0,r.createElement)("div",null,(0,r.createElement)(s.ExternalLink,{href:o},__("Learn more about the Stats module.","jetpack")))))}},12169:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});varr=n(82170),a=n(1455),s=n.n(a),o=n(94715),i=n(56427),l=n(47143),c=n(86087),u=n(27723),d=n(93832),p=n(13022),m=n(54919),h=n(9075);const__=u.__,_x=u._x;constg=(0,i.withNotices)((function({attributes:e,noticeOperations:t,noticeUI:n,setAttributes:a}){constg=(0,c.useRef)(!1),{answersLink:f,answersLinkText:b,gravatars:v,promptFetched:k,promptId:y,promptLabel:w,promptText:E,showLabel:_,showResponses:C,tagsAdded:A,isBloganuary:x}=e,j=(0,o.useBlockProps)({className:"jetpack-blogging-prompt"});(0,h.J)(y,A,(e=>a({tagsAdded:e})));constS=(0,l.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:n}=e("core"),r=t("root","site")?.language||"en_US";returnn("getEntityRecord",["root","site"])?r:null}),[]);(0,c.useEffect)((()=>{if(!S||g.current||k)return;conste=()=>{a({promptFetched:!1,promptId:null,tagsAdded:!1}),g.current=!1,t.removeAllNotices()};letn="/wpcom/v3/blogging-prompts";if(y)n+="/"+encodeURIComponent(y);else{conste=newDate;n+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}n=(0,d.addQueryArgs)(n,{_locale:S,force_year:(newDate)?.getFullYear()}),g.current=!0,s()({path:n}).then((e=>{constt=y?e:e[0],n=(0,m.i)(S);a({answersLink:t.answered_link+`?locale=${n}`,answersLinkText:t.answered_link_text,gravatars:t.answered_users_sample.map((({avatar:e})=>({url:e}))),promptFetched:!0,promptLabel:t.label,promptText:t.text,promptId:t.id,isBloganuary:!!t.bloganuary_id})})).catch((n=>{a({promptFetched:!0});consts="rest_post_invalid_id"===n.code&&y?(o=y,(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %d is the prompt id. */
__("Prompt with id %d not found.","jetpack"),o)," ",(0,r.createElement)(i.Button,{variant:"link",onClick:e},__("Reset prompt","jetpack")))):(t=>(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %s is the error message. */
__("Error while fetching prompt: %s","jetpack"),t)," ",(0,r.createElement)(i.Button,{variant:"link",onClick:e},__("Retry","jetpack"))))(n.message);varo;t.removeAllNotices(),t.createErrorNotice(s)}))}),[g,t,k,y,a,S]);constN=e=>{a({showLabel:e})},R=e=>{a({showResponses:e})},P=(0,p.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":x});return(0,r.createElement)("div",j,n,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Show prompt label","jetpack"),checked:_,onChange:N,__nextHasNoMarginBottom:!0}),(0,r.createElement)(i.ToggleControl,{label:__("Show other responses","jetpack"),checked:C,onChange:R,__nextHasNoMarginBottom:!0})))),k?(0,r.createElement)(r.Fragment,null,_&&(0,r.createElement)("div",{className:P},w),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},E),C&&y&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},v&&v.slice(0,3).map((({url:e})=>e&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:e,key:e}))),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:f,target:"_blank",rel:"external noreferrer noopener"},b))):(0,r.createElement)("div",{className:"jetpack-blogging-prompt__spinner"},(0,r.createElement)(i.Spinner,null)))}))},87888:(e,t,n)=>{"use strict";varr=n(74997),a=n(47143),s=n(27723),o=n(94375),i=n(27734),l=n(32442),c=n(12169),u=n(63757),d=n(94530),p=n(86239),m=n(57028);const__=s.__;(0,o.M)(l,{edit:c.A,save:m.A,example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:u},{url:d},{url:p}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0,isBloganuary:!1}}}),function(){conste=newURL(document.location.href);if(!e.pathname.endsWith("/wp-admin/post-new.php"))return;constt=e.searchParams.get("answer_prompt")??"0",n=parseInt(t);n&&asyncfunction(e){await(0,i.O)();const{insertBlocks:t}=(0,a.dispatch)("core/block-editor");t([(0,r.createBlock)(`jetpack/${name}`,{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,r.createBlock)("core/paragraph")],0,void0,!1)}(n)}()},57028:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(94715),s=n(13022);consto=function({attributes:e}){const{answersLink:t,answersLinkText:n,gravatars:o,promptId:i,promptLabel:l,promptText:c,showLabel:u,showResponses:d,isBloganuary:p}=e,m=a.useBlockProps.save({className:"jetpack-blogging-prompt"}),h=(0,s.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":p});return(0,r.createElement)("div",m,u&&(0,r.createElement)("div",{className:h},l),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},c),d&&i&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},o.map((({url:e})=>e&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:e,key:e}))),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:t,target:"_blank",rel:"external noreferrer noopener"},n)))}},9075:(e,t,n)=>{"use strict";n.d(t,{J:()=>c});varr=n(1455),a=n.n(r),s=n(47143),o=n(86087),i=n(89877);functionl(e){constt=(0,i.escapeHTML)(e);returna()({path:"/wp/v2/tags",method:"POST",data:{name:t}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e})))}functionc(e,t,n){const{editPost:r}=(0,s.useDispatch)("core/editor"),a=(0,o.useRef)("not-started"),{postType:i,postsSupportTags:c,tags:u,tagIds:d,tagsHaveResolved:p}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getEntityRecords:n,getPostType:r,hasFinishedResolution:a}=e("core"),s=t("tags"),o={_fields:"id,name",context:"view",include:s?.join(","),per_page:-1};return{postType:t("type"),postsSupportTags:r("post")?.taxonomies.includes("post_tag"),tagI
__("No sites found for %s.","jetpack"),n))),e.length>0&&(0,r.createElement)("ul",{"aria-live":"polite"},e.map((e=>{constn=i.some((t=>t?.id===e?.blog_id));return(0,r.createElement)("li",{key:e.blog_id,className:"jetpack-blogroll__appender-result-container"},(0,r.createElement)("button",{className:"jetpack-blogroll__appender-result-title",disabled:n,onClick:()=>t(e)},(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-image"},e.site_icon&&(0,r.createElement)("img",{src:e.site_icon,alt:e.name,onError:e=>{e.target.parentNode.classList.add("empty-site-icon")}})),(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-text"},(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-title"},e.name),(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-description"},e.description))))}))))}},17454:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(56427),s=n(27723);const__=s.__;functiono({value:e,onChange:t}){return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-search"},(0,r.createElement)(a.TextControl,{__nextHasNoMarginBottom:!0,label:__("Search for sites to add","jetpack"),hideLabelFromVision:!0,placeholder:__("Search…","jetpack"),value:e,onChange:e=>t(e)}))}},37127:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});varr=n(82170),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(45459),c=n(92507),u=n(85101),d=n(40536),p=n(17454);const__=i.__;functionm({isLoading:e,subscriptions:t,clientId:n}){const[i,m]=(0,o.useState)(!1),[h,g]=(0,o.useState)(),[f,b]=(0,o.useState)(""),{insertBlock:v}=(0,s.dispatch)("core/block-editor"),{siteDetails:k,isLoading:y}=(0,c.A)({siteURL:f,subscriptions:t,enabled:f});returne?(0,r.createElement)(a.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Button,{className:"block-editor-button-blogroll-block-appender",ref:g,icon:l.A,label:__("Add Blogroll Item","jetpack"),onClick:()=>{m((e=>!e))}}),i&&(0,r.createElement)(a.Popover,{anchor:h,className:"jetpack-blogroll__appender"},(0,r.createElement)(p.A,{value:f,onChange:b}),(0,r.createElement)(d.A,{results:k,onSelect:e=>{v((0,u.FN)(e),void0,n),m(!1)},searchInput:f,isLoading:y})))}},63166:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});varr=n(82170),a=n(94715),s=n(74997),o=n(56427),i=n(47143),l=n(86087),c=n(27723),u=n(13022),d=n(2274),p=n(26247),m=n(37127),h=n(32130),g=n(46542),f=n(25688),b=n(85101);const__=c.__;constv=function({className:e,attributes:t,setAttributes:n,clientId:c}){const{show_avatar:v,show_description:k,open_links_new_window:y,ignore_user_blogs:w,load_placeholders:E}=t,_=(0,p.A)(),{isLoading:C,recommendations:A,errorMessage:x}=(0,h.A)(E),{isLoading:j,subscriptions:S,errorMessage:N}=(0,f.A)({ignore_user_blogs:w});(0,g.b)({clientId:c});const{replaceInnerBlocks:R}=(0,i.dispatch)("core/block-editor");(0,l.useEffect)((()=>{if(E&&A.length){n({load_placeholders:!1});conste=[(0,s.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),...A.map(b.dy)];R(c,e)}}),[A,E,n,c,R]);constP=(0,a.useBlockProps)({className:(0,u.A)(e,{"hide-avatar":!v,"hide-description":!k})});if(!_)return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.A,{block:"Blogroll",explanation:__("Connect your WordPress.com account to use the Blogroll block.","jetpack")}));constL=x||N;return(0,r.createElement)("div",P,(0,r.createElement)(a.InnerBlocks,{template:[["core/heading",{content:__("Blogroll","jetpack"),level:3}]],allowedBlocks:["jetpack/blogroll-item"],renderAppender:()=>!C&&(0,r.createElement)(m.A,{isLoading:j,subscriptions:S,clientId:c})}),L&&(0,r.createElement)(o.Notice,{status:"error",isDismissible:!1},(0,r.createElement)("p",null,L)),E&&C&&(0,r.createElement)(o.FlexBlock,{style:{padding:"30px",textAlign:"center"}},(0,r.createElement)(o.Spinner,null)),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!v,onChange:()=>n({show_avatar:!v}),__nextHasNoMarginBottom:!
// translators: %s is a link to the cookie policy.
__("Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: %s.","jetpack"),`<a href="https://automattic.com/cookies/">${__("Cookie Policy","jetpack")}</a>`)},15216:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});varr=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(56427),l=n(27723),c=n(68071),u=n(34839);const__=l.__;constd=function({clientId:e,attributes:t,setAttributes:n}){const{consentExpiryDays:r,align:d,text:p=c.a}=t;(0,u.w)(e);constm=(0,o.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${d}`});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(o.InspectorControls,null,(0,s.createElement)(i.PanelBody,{title:__("Block Settings","jetpack")},(0,s.createElement)(i.SelectControl,{label:__("Alignment","jetpack"),value:d,options:[{label:(0,l.isRTL)()?__("Right","jetpack"):__("Left","jetpack"),value:"left"},{label:__("Full","jetpack"),value:"full"},{label:__("Wide","jetpack"),value:"wide"},{label:(0,l.isRTL)()?__("Left","jetpack"):__("Right","jetpack"),value:"right"}],onChange:e=>function(e){constt=["wide","full"].includes(e)?{width:void0,height:void0}:{};n({...t,align:e})}(e),__nextHasNoMarginBottom:!0}),(0,s.createElement)(i.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:r,type:"number",min:"1",max:"365",onChange:e=>n({consentExpiryDays:parseInt(e)}),__nextHasNoMarginBottom:!0}),(0,s.createElement)("p",null,__("Note: The block position in the editor is not indicative of the position on the front end. The block will always be positioned at the bottom of the page.","jetpack")))),(0,s.createElement)("div",a()({},m,{style:m.style}),(0,s.createElement)(o.RichText,{tagName:"p",value:p,onChange:e=>n({text:e})}),(0,s.createElement)(o.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})))}},78165:(e,t,n)=>{"use strict";varr=n(94375),a=n(74095),s=n(15216),o=n(75757);(0,r.M)(a,{edit:s.A,save:o.A})},75757:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});varr=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(68071);functionl({attributes:e}){constt=o.useBlockProps.save(),{text:n=i.a,consentExpiryDays:r}=e;return(0,s.createElement)("div",a()({},t,{style:t.style,role:"dialog","aria-modal":"true"}),(0,s.createElement)(o.RichText.Content,{tagName:"p",value:n}),(0,s.createElement)(o.InnerBlocks.Content,null),(0,s.createElement)("span",null,r))}},34839:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});varr=n(74997),a=n(29491),s=n(3582),o=n(47143),i=n(86087);functionl(e){constt=(0,o.useSelect)((e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:n}=e("core/editor");returnt()||n()}),[]),n=!(!(0,a.usePrevious)(t)||t),[,l]=(0,s.useEntityProp)("root","site","cookie_consent_template"),{saveEditedEntityRecord:c}=(0,o.useDispatch)(s.store),[u,d]=(0,i.useState)(!1),p=(0,o.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");returnt})),m=(0,i.useCallback)((e=>{d(!0),l(e),c("root","site",void0,{cookie_consent_template:e}).finally((()=>{d(!1)}))}),[d,l,c]);(0,i.useEffect)((()=>()=>{p(e)||m(null)}),[]),(0,i.useEffect)((()=>{n&&!u&&m((0,r.serialize)([p(e)]))}),[n,u,m,p,e])}},75800:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});varr=n(82170),a=n(4567),s=n(3975),o=n(94715),i=n(86087),l=n(13022),c=n(72730);constu=({className:e=null,currency:t=null,defaultValue:n=null,disabled:u=!1,label:d="",onChange:p=null,value:m=""})=>{const[h,g]=(0,i.useState)((0,a.Ay)(m,t,{symbol:""})),[f,b]=(0,i.useState)(!1),[v,k]=(0,i.useState)(!1),y=(0,i.useRef)(null),w=(0,i.useCallback)(((e,n)=>{g((r=>{if(e!==r){constr=(0,c.C_)(e,t);r&&r>=(0,c.dv)(t)?(k(!1),n&&p?.(r)):k(!0)}returne}))}),[t,p]),E=()=>{y.current&&(y.current.focus(),b(!0))};return(0,i.useEffect)((()=>{if(!y.current)return;conste=y.current,r=()=>{b(!1),h||w((0,a.Ay)(n,t,{symbol:""}))};returne.addEventListener("blur",r),()=>{e.removeEventListener("blur",r)}}),[t,n,h,y,w]),(0,i.useEffect)((()=>{f||v||g((0,a.Ay)(m,t,{symbol:""}))}),[t,f,v,m]),(0,i.useEffect)((()=>{w((0,a.Ay)(m,t,{symbol:""}))}),[t,m]),(0,r.create
__("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{constn=[...w];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>n({customAmountText:e})}),(0,r.createElement)(l.A,{currency:c,label:__("Custom amount","jetpack"),defaultValue:100*(0,i.dv)(c),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText")??u.extraText,onChange:e=>k("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(a.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText")||u[b]?.buttonText,onChange:e=>{returnt=e,voidn({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...m,buttonText:t}});vart},allowedFormats:E})))}},36580:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(86087),s=n(27723),o=n(13022),i=n(57018),l=n(62225);const__=s.__,c=e=>{const{attributes:t,products:n,setAttributes:s}=e,{oneTimeDonation:c,monthlyDonation:u,annualDonation:d}=t,[p,m]=(0,a.useState)("one-time"),h=(0,a.useCallback)((e=>p===e),[p]),g={"one-time":{title:__("One-Time","jetpack")},...u.show&&{"1 month":{title:__("Monthly","jetpack")}},...d.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,a.useEffect)((()=>{c.planId===n["one-time"]&&u.planId===n["1 month"]&&d.planId===n["1 year"]||s({...n["one-time"]&&{oneTimeDonation:{...c,planId:n["one-time"]}},...n["1 month"]&&{monthlyDonation:{...u,planId:n["1 month"]}},...n["1 year"]&&{annualDonation:{...d,planId:n["1 year"]}}})}),[c,u,d,s,n]),(0,a.useEffect)((()=>{!u.show&&h("1 month")&&m("one-time"),!d.show&&h("1 year")&&m("one-time")}),[u,d,m,h]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(g).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(g).map((([e,{title:t}])=>(0,r.createElement)("div",{role:"button",tabIndex:0,className:(0,o.A)("donations__nav-item",{"is-active":h(e)}),onClick:()=>m(e),onKeyDown:()=>m(e),key:`jetpack-donations-nav-item-${e}`},t)))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(l.A,{activeTab:p,attributes:t,setAttributes:s}))),(0,r.createElement)(i.A,e))}},75703:(e,t,n)=>{"use strict";functionr(){if("undefined"==typeofwindow)return{};conste=window.Jetpack_DonationsBlock?.defaultTexts;return"object"!=typeofe?{}:e}n.d(t,{O:()=>r})},36850:(e,t,n)=>{"use strict";n.d(t,{GY:()=>a,_t:()=>r,gQ:()=>s});constr=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,a=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,s="https://www.eventbrite.com/e/test-event-tickets-123456789"},38449:(e,t,n)=>{"use strict";n.d(t,{o:()=>c,s:()=>u});varr=n(82170),a=n(56427),s=n(27723),o=n(5873),i=n(72660);const__=s.__,_x=s._x,l=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,r.createElement)("div",{className:"block-editor-block-preview__container"},(0,r.createElement)("img",{src:i,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}],c=({setEditingUrl:e})=>(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})),u=({attributes:e,clientId:t,setAttributes:n})=>(0,r.createElement)(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});constr=[n(87879).A]},87879:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});varr=n(82170),a=n(94715)
{label:__("50% - Show half of the document","jetpack"),value:"ar-50"}];return(0,s.createElement)(l.Fragment,null,(0,s.createElement)(l.Fragment,null,(0,s.createElement)(u.A,a()({icon:d.src,instructions:[__("Copy and paste your document link below.","jetpack"),__("If your document is private, only readers logged into a Google account with shared access to the document may view it.","jetpack")].join(" "),label:p,patterns:m,placeholder:_x("Enter the link here…","Embed block placeholder","jetpack"),mapUrl:()=>{if(0===m.length||""===h)returnr;conste=r.match(m[0]);returnnull===e||void0===e[1]||void0===e[2]||void0===e[3]?r:`${e[1]}://${e[2]}/${h}/d/${e[3]}/preview`},mismatchErrorMessage:__("The document couldn’t be embedded. To embed a document, use the link in your browser address bar when editing the document.","jetpack"),checkGoogleDocVisibility:!0},e))),(0,s.createElement)(l.Fragment,null,(0,s.createElement)(o.InspectorControls,null,(0,s.createElement)(i.PanelBody,null,(0,s.createElement)("p",null,__("Select a different aspect-ratio to show more (or less) of your embedded document.","jetpack")),(0,s.createElement)(i.SelectControl,{label:__("Aspect Ratio","jetpack"),value:t,options:v,onChange:e=>c({aspectRatio:e}),__nextHasNoMarginBottom:!0})))))}},85779:(e,t,n)=>{"use strict";varr=n(94375),a=n(94575),s=n(94806),o=n(10467),i=n(72371),l=n(60288);(0,r.M)(a,{edit:s.A,save:o.A,transforms:(0,i.A)(a.name),variations:l.A})},93261:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});varr=n(82170),a=n(56427),s=n(27723),o=n(13022);const_x=s._x,i=({className:e,icon:t,instructions:n,label:s,notices:i,url:l,onSubmit:c,placeholder:u,updateUrl:d})=>(0,r.createElement)("div",{className:(0,o.A)("wp-block-jetpack-google-docs-embed-editmode",e)},(0,r.createElement)(a.Placeholder,{icon:t,label:s,instructions:n,notices:i},(0,r.createElement)("form",{onSubmit:c},(0,r.createElement)("input",{type:"url",value:l||"",className:"components-placeholder__input",placeholder:u,onChange:e=>d(e.target.value)}),(0,r.createElement)(a.Button,{variant:"primary",type:"submit"},_x("Embed","button label","jetpack")))))},58725:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});varr=n(82170),a=n(1455),s=n.n(a),o=n(94715),i=n(74997),l=n(56427),c=n(29491),u=n(86087),d=n(27723),p=n(92687),m=n(93261),h=n(22336);const__=d.__,_x=d._x,g=({children:e,mapUrl:t,url:n,className:a,interactive:o,toggleInteractive:i,noticeUI:l=null,noticeOperations:c={},checkGoogleDocVisibility:d=!1})=>{if((0,u.useEffect)((()=>{d&&s()({path:`/wpcom/v2/checkGoogleDocVisibility?url=${n}`}).catch((()=>{c.removeAllNotices(),c.createNotice({status:"warning",content:__("This document is private. Only readers logged into a Google account that the document is shared with can view it.","jetpack")})}))}),[n,d,c]),e)returne;letp=!1;returnl&&(p=!0),(0,r.createElement)(r.Fragment,null,l,(0,r.createElement)(h.A,{url:t(n),className:a,interactive:o,toggleInteractive:i,isPrivateURL:p}))},f=(0,c.compose)(l.withNotices)((e=>{const{attributes:t,className:n,isSelected:a,setAttributes:s,icon:c="superhero-alt",instructions:h=__("Paste a link to the content you want to display.","jetpack"),forceEditing:f=!1,mismatchErrorMessage:b=__("It does not look like an embeddable URL.","jetpack"),label:v,mapUrl:k=e=>e,noticeOperations:y,noticeUI:w,patterns:E,placeholder:_=__("Enter URL to embed here…","jetpack"),children:C,onSubmitUrl:A=()=>{},checkGoogleDocVisibility:x=!1}=e,{url:j}=t,[S,N]=(0,u.useState)(!1),[R,P]=(0,u.useState)(!1),[L,T]=(0,u.useState)(j);f&&!S&&N(!0);(0,u.useEffect)((()=>{!a&&R&&P(!1)}),[a]);constM=(0,u.useRef)(null),B=(0,o.useBlockProps)({className:"wp-block-jetpack-google-docs-embed",ref:M}),{title:I}=(0,i.getBlockType)(e.name),D=(0,d.sprintf)(/* translators: %s is replaced with the name of the embed provider */
_x("%s URL","placeholder label","jetpack"),I);return(0,r.createElement)("div",B,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(l.ToolbarGroup,null,!S&&(0,r.createElement)(l.ToolbarButton,{icon:p.A,label:__("Edit URL","jetpack"),isActive:S,onClick:()=>{y.removeAllNotices(),N(!S)}}))),S||!j?(0,r.createElement)(m.A,{className:n,icon:c,instructions:h,label:v||D,url:L,notices:w,placeholder:_,onSubmit:e=>{if(e&&e.preventDefault(),!E[0].test(L))returny.removeAllNotices(),voidy.createErrorNotice(b);y.removeAllNotices(),N(!1),s({url:L}),A(L)},updateUrl:T}):(0,r.createElement)(g,{children:C,mapUrl:k,url:L,className:n,interactive:R,toggleInteractive:P,noticeUI:w,noticeOperations:y,checkGoogleDocVisibility:x}))}))},22336:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(56427),s=n(27723);const__=s.__,o=e=>{const{allowFullScreen:t=!0,isPrivateURL:n=!1,interactive:s,toggleInteractive:o,title:i=__("Embed URL","jetpack"),url:l}=e;return(0,r.createElement)("figure",null,n?(0,r.createElement)("div",{className:"wp-block-jetpack-google-docs-embed__wrapper wp-block-jetpack-google-docs-embed__wrapper--error"},(0,r.createElement)("p",{className:"wp-block-jetpack-google-docs-embed__error-msg"},__("This Google Document is private.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)(a.ExternalLink,{href:l},__("Click here to open this document.","jetpack")))):(0,r.createElement)("div",{className:"wp-block-jetpack-google-docs-embed__wrapper"},(0,r.createElement)("iframe",{src:l,allowFullScreen:t,title:i,height:"450"})),!s&&(0,r.createElement)("div",{className:"wp-block-jetpack-google-docs-embed__interactive-overlay",onMouseUp:()=>o(!0)}))}},10467:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});varr=n(82170);consta=e=>{const{attributes:t}=e;return(0,r.createElement)("figure",null,(0,r.createElement)("div",{className:"embed__wrapper"},`\n${t.url}\n`))}},72371:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(74997),s=n(86087);consto=e=>{constt=[/^(http|https):\/\/(docs\.google.com)\/(spreadsheets|document|presentation)\/d\/([A-Za-z0-9_-]+).*?$/i];return{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&t[0].test(e.textContent)&&1===e.textContent?.match(/https/gi)?.length,transform:t=>(0,a.createBlock)(e,{url:t.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],transform:({url:e})=>{constt=(0,r.createElement)("a",{href:e},e);return(0,a.createBlock)("core/paragraph",{content:(0,s.renderToString)(t)})}}]}}},60288:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(85985),a=n(27723);const__=a.__,s=[{name:"jetpack/google-docs",isDefault:!0,title:__("Google Docs","jetpack"),description:__("Embed a Google Document.","jetpack"),icon:"<svg viewBox='0 0 64 88' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M58,88H6c-3.3,0-6-2.7-6-6V6c0-3.3,2.7-6,6-6h36l22,22v60C64,85.3,61.3,88,58,88z' /><path fill='#FDFFFF' d='M42,0l22,22H42V0z' /><path fill='#FDFFFF' d='M50,39H14v-5h36V39z M50,46H14v5h36V46z M40,58H14v5h26V58z' /></svg>",keywords:[__("document","jetpack"),__("gsuite","jetpack"),__("doc","jetpack")],attributes:{variation:"jetpack/google-docs"},isActive:["variation"]},{name:"jetpack/google-sheets",isDefault:!0,title:__("Google Sheets","jetpack"),description:__("Embed a Google Sheet.","jetpack"),icon:"<svg viewBox='0 0 64 88' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M58,88H6c-3.3,0-6-2.7-6-6V6c0-3.3,2.7-6,6-6h36l22,22v60C64,85.3,61.3,88,58,88z' /><path fill='#FDFFFF' d='M42,0l22,22H42V0z' /><path fill='#FDFFFF' d='M12,34.5v28h40v-28H12z M17,39.5h12.5V46H17V39.5z M17,51h12.5v6.5H17V51z M47,57.5H34.5V51H47V57.5z M47,46 H34.5v-6.5H47V46z' /></svg>",keywords:[__("sheet","jetpack"),__("spreadsheet","jetpack")],attributes:{variation:"jetpack/google-sheets"},isActive:["variation"]},{name:"jetpack/google-slides",isDefault:!0,title:__("Google Slides","jetpack"),description:__("Embed a Google Slides presentation.","jetpack"),icon:"<svgviewBox='0 0 64 88'width='24'height='24'xmlns='http://www.w3.org/2000/svg'><pathd='M58,88H6c-3.3,0-6-2.7-
_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,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(a.Notice,{isDismissible:!1,status:"info"},t))})():null,(0,r.createElement)(a.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Posts","jetpack"),value:p,onChange:e=>c({count:e}),min:1,max:o.V}),(0,r.createElement)(a.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Columns","jetpack"),value:d,onChange:e=>c({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>c({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Stack on mobile","jetpack"),checked:h,onChange:()=>c({isStackedOnMobile:!h})})))}},11148:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});varr=n(96072),a=n.n(r),s=n(82170),o=n(85985),i=n(94715),l=n(56427),c=n(86087),u=n(27723),d=n(13022),p=n(66087),m=n(78218),h=n(89525),g=n(80427),f=n(57926),b=n(86975),v=n(49783),k=n(53495),y=n(80619);const__=u.__,w=(0,l.withNotices)((e=>{constt=(0,i.useBlockProps)(),{attributes:n,isSelected:r,noticeOperations:u,noticeUI:w,setAttributes:E}=e,{accessToken:_,align:C,columns:A,count:x,isStackedOnMobile:j,spacing:S}=n;(0,c.useEffect)((()=>{conste=(0,m.y)(h.attributes,n);(0,p.isEqual)(e,n)||E(e)}),[n,E]);const[N,R]=(0,c.useState)(_),{isRequestingWpcomConnectUrl:P,wpcomConnectUrl:L}=(0,k.A)(),{images:T,isLoadingGallery:M,setImages:B}=(0,y.A)({accessToken:_,noticeOperations:u,setAttributes:E,setSelectedAccount:R}),{connectToService:I,disconnectFromService:D,isConnecting:F,isRequestingUserConnections:z,userConnections:O}=(0,v.A)({accessToken:_,noticeOperations:u,selectedAccount:N,setAttributes:E,setImages:B,setSelectedAccount:R}),H=(0,o.gB)(),U=x>T.length?T.length:x,V=!M&&(!_||(0,p.isEmpty)(T)),q=!V,G=_&&M&&(0,p.isEmpty)(T),$=!V&&!G,W=(0,d.A)(t.className,{[`align${C}`]:C}),Z=(0,d.A)("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${A}`,{"is-stacked-on-mobile":j}),J={gridGap:S,"--latest-instagram-posts-spacing":S?`${S}px`:void0},K={padding:S},Y=()=>{N&&g.B!==N?E({accessToken:N,instagramUser:(0,p.find)(O,{token:N}).username}):I()};return(0,s.createElement)("div",a()({},t,{className:W}),V&&(0,s.createElement)(l.Placeholder,{icon:"instagram",instructions:H?z||O.length?void0:__("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:w},H?(()=>{conste=O.length>0,t=[...(0,p.map)(O,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:g.B}],n=F||z||e&&!N;return(0,s.createElement)("div",null,e&&(0,s.createElement)(l.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>R(e),options:t,selected:N}),g.B===N&&(0,s.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,s.createElement)(l.Button,{disabled:n,variant:"primary",onClick:Y},F&&__("Connecting…","jetpack"),z&&__("Loading your connections…","jetpack"),!F&&!z&&__("Connect to Instagram","jetpack")))})():(0,s.createElement)(l.Button,{disabled:P||!L,href:L,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),G&&(0,s.createElement)("div",{className:"wp-block-embed is-loading"},(0,s.createElement)(l.Spinner,null),(0,s.createElement)("p",null,__("Embedding…","jetpack"))),$&&(0,s.createElement)("div",{className:Z,style:J},(0,p.times)(r?x:U,(e=>(0,s.createElement)("span",{className:(0,d.A)("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:K},(e=>{if(T[e]){constt=T[e]
__("<span>%1$d</span> likes","jetpack"),v.length),{span:(0,r.createElement)("span",{className:"wpl-count-number"})}))))))}},67511:(e,t,n)=>{"use strict";varr=n(94375),a=n(71969),s=n(434);(0,r.M)(a,{edit:s.A,save:()=>null})},40483:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});varr=n(82170),a=n(94715),s=n(56427),o=n(27723),i=n(13022),l=n(54790);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=l.Bd,consentText:u=l.Do,processingLabel:d=l.HD,successLabel:p=l.XO,errorLabel:m=l.Ys}=e,h={[l.k1]:d,[l.EM]:p,[l.Dc]:m}[n];return(0,r.createElement)("div",{className:(0,i.A)({[`${l.j7}_notication-audition`]:n})},(0,r.createElement)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-label":o,className:`${l.j7}_text-input`,disabled:!0,onChange:()=>!1,placeholder:o,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,r.createElement)(a.InnerBlocks,{template:[[c.name,c.attributes]],templateLock:"all"}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:u,onChange:e=>t({consentText:e}),inlineToolbar:!0}),n&&(0,r.createElement)("div",{className:`${l.j7}_notification ${l.j7}_${n}`,role:n===l.Dc?"alert":"status"},h))}},54790:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>d,Dc:()=>o,Do:()=>p,EM:()=>s,HD:()=>m,JA:()=>c,XO:()=>h,Ys:()=>g,an:()=>l,gI:()=>u,j7:()=>i,k1:()=>a});varr=n(27723);const__=r.__,a="processing",s="success",o="error",i="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"),m=__("Processing…","jetpack"),h=__("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:()=>d});varr=n(82170),a=n(94715),s=n(56427),o=n(86087),i=n(27723),l=n(54790),c=n(60462);const__=i.__,u=({auditionNotification:e,clearAudition:t,setAttributes:n,emailPlaceholder:a=l.Bd,processingLabel:o=l.HD,successLabel:i=l.XO,errorLabel:u=l.Ys,interests:d,signupFieldTag:p,signupFieldValue:m,connectURL:h})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Email Placeholder","jetpack"),value:a,onChange:e=>{n({emailPlaceholder:e}),t()}})),(0,r.createElement)(s.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Processing text","jetpack"),value:o,onChange:t=>{n({processingLabel:t}),e(l.k1)}}),(0,r.createElement)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Success text","jetpack"),value:i,onChange:t=>{n({successLabel:t}),e(l.EM)}}),(0,r.createElement)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Error text","jetpack"),value:u,onChange:t=>{n({errorLabel:t}),e(l.Dc)}})),(0,r.createElement)(s.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(c.A,{interests:d,onChange:(e,t)=>{constr=[...newSet([...d,e])].filter((n=>!(n===e&&!t)&&n));n({interests:r})}}),(0,r.createElement)(s.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(s.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:p,onChange:e=>n({signupFieldTag:e})}),(0,r.createElement)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("SignupFieldVal
_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:l}=this.state,{key:d=""}=l[i]||{},{className:p}=o,m=l.length>0,h=m?`components-autocomplete-listbox-${s}`:null,g=m?`components-autocomplete-item-${s}-${d}`:null;return(0,r.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:g,onChange:e,onKeyDown:t}),m&&(0,r.createElement)(a.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,r.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,u.map)(l,((e,t)=>(0,r.createElement)(a.Button,{key:e.key,id:`components-autocomplete-item-${s}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:(0,c.A)("components-autocomplete__result",p,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}constm=(0,s.compose)([a.withSpokenMessages,s.withInstanceId,a.withFocusOutside])(p)},82063:(e,t,n)=>{"use strict";functionr(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:()=>i,ES:()=>a,_t:()=>s,iU:()=>o,jF:()=>r});constr=e=>Object.hasOwn(e,"lat")&&Object.hasOwn(e,"lng")?e:{lat:e.latitude||0,lng:e.longitude||0};functiona(e,t){constn=newe.LngLatBounds;returnt.forEach((e=>{n.extend([e.coordinates.longitude,e.coordinates.latitude])})),n}functions(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}functiono(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`}functioni(e){returnnewe.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:()=>d,K5:()=>c,Sm:()=>i,Yc:()=>u,c6:()=>o,nQ:()=>l});varr=n(34377);consta=6371e3;functions(e){returnMath.abs(a*Math.cos(e*Math.PI/180)*2*Math.PI/256)}functiono(e,t){return512/Math.pow(2,e)*.5*s(t)}functioni(e,t){constn=e/s(t);returnMath.log2(512/(n/.5))}functionl(e,t){if(0===t.length)returnnull;constn=newe.Coordinate(-90,180),r=newe.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)}));consta=newe.Coordinate(n.latitude-.5*(n.latitude-r.latitude),n.longitude+.5*(r.longitude-n.longitude)),s=newe.CoordinateSpan(1.3*Math.abs(n.latitude-r.latitude),1.3*Math.abs(r.longitude-n.longitude));returnnewe.CoordinateRegion(a,s)}functionc(e,t){return()=>{constn=e.createElement("div");returnn.classList.add("mapkit-popup-content"),t(n),n}}functionu(e,t){returnnewPromise((n=>{if(t.mapkitScriptIsLoading)(0,r.Cu)(t,"mapkit").then((e=>{n(e)}));else{t.mapkitScriptIsLoading=!0;consta=e.createElement("script");a.addEventListener("load",(async()=>{conste=await(0,r.Cu)(t,"mapkit");t.mapkitScriptIsLoading=!1,n(e)}),{once:!0}),a.src="https://cdn.apple-mapkit
__("Open Table Preview %s","jetpack"),t),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,d.join)(N,"%2C")}&type=${n}&theme=${a}&overlay=false&domain=${P}&lang=${L&&g.L.includes(L)?L:"en-US"}&newtab=${T}&disablega=true`}))})()))}))},82144:(e,t,n)=>{"use strict";varr=n(82170),a=n(94715),s=n(74997),o=n(94375),i=n(79018),l=n(34157),c=n(8100),u=n(71833),d=n(50387),p=n(84260);(0,o.M)(i,{edit:u.A,save:({attributes:{rid:e}})=>{constt=a.useBlockProps.save();return(0,r.createElement)("div",t,e?.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:i.attributes,styles:(0,d.Iy)(),transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(p.XA.test(e.textContent)||p.JJ.test(e.textContent)),transform:e=>{constt=(0,p.a9)(e.textContent);return(0,s.createBlock)("jetpack/opentable",t)}}]},deprecated:[l.A,c.A]})},82101:(e,t,n)=>{"use strict";n.d(t,{L:()=>a,P:()=>r});constr=[{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"}],a=r.map((e=>e.value))},98233:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});varr=n(96072),a=n.n(r),s=n(82170),o=n(56427),i=n(86087),l=n(27723),c=n(66087),u=n(4673);const__=l.__,_n=l._n,d=20;functionp(e){const[t,n]=(0,i.useState)(""),{restaurants:r,hasRequestFailed:l}=(0,u.A)(t,d),[p,m]=(0,i.useState)(e.rids||[]),h=/^(\d+)$|\(#(\d+)\)$/,g=r.filter((e=>p.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),f=(0,s.createElement)(o.FormTokenField,a()({value:p,suggestions:g,saveTransform:e=>u.h.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:d,label:_n("Restaurant","Restaurants",p.length,"jetpack")},e,{onChange:t=>{constn=t.map((e=>{constt=h.exec(e);returnt[1]||t[2]}));m(n),e.onChange&&e.onChange(n)},__nextHasNoMarginBottom:!0}));return(0,s.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,s.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,c.isEmpty)(p)?t:p)}},f,(0,s.createElement)(o.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):f,l&&(0,s.createElement)(o.Notice,{status:"error",isDismissible:!1},__("OpenTable can't find this restaurant right now. Please try again later.","jetpack")))}},50387:(e,t,n)=>{"use strict";n.d(t,{Iy:()=>o,K5:()=>i,i9:()=>s});varr=n(27723),a=n(66087);const__=r.__,s={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},o=e=>(0,a.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&s]),i=e=>o(e).map((e=>e.name))},59038:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});varr=n(86087);functiona(e){constt=(0,r.useRef)(void0);return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},4673:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,h:()=>s});varr=n(86087),a=n(66087);consts=/^\s*(http[s]?:\/\/|<script)/;functiono(e,t){const[n,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(!1),c=(0,r.useCallback)(((e="")=>{l(!1),fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(e)).then((e=>e.json())).then((e=>{l(!1),o((0,a.unionBy)(n,e.items,"rid"))})).catch((()=>l(!0)))}),[n,t]),u=(0,r.useMemo)((()=>(0,a.throttle)(c,500)),[c]);return(0,r.useEffect)((()=>{(0,a.isEmpty)(e)||s.test(e)||u(e)}),[e,u]),{restaurants:n,hasRequestFailed:i}}},84260:(e,t,n)=>{"use strict";n.d(t,{JJ:()=>a,XA:()=>s,a9:()=>o});constr=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,s=/rid=([0-9]+)&/,o=e=>{if(e)return(e=>{if(!e)return;lett="";if(t=0===e.indexOf("http")?newURL(e):newURL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;constn=newURLSearchParams(t.search);letr=n.get("theme");"button"===n.get("t
`${(0,l.sprintf)(__("Loading: %s","jetpack"),n)}${s}`,"assertive"),!0};loadAndPlay=e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)};getTrack=e=>this.props.tracks[e];handleError=e=>{if(!this.state.hasUserInteraction){constt=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{thrownewError(t)}))}this.props.errorMediaSource(this.props.playerId),(0,a.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")};handlePlay=()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})};handlePause=()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==d.pF&&this.props.pauseMediaSource(this.props.playerId)};handleTimeChange=e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)};handleJump=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)};handleSkip=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)};updateMediaData=e=>{this.props.updateMediaSourceData(this.props.playerId,{duration:e.target?.duration,domId:e.target?.id})};registerPlayer(){conste=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:d.vh}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){constt=e=>e?.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=newSet(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}staticgetDerivedStateFromProps(e,t){returne.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:a,tracks:s,attributes:o,currentTime:i,playerState:d}=this.props,{itemsToShow:g,primaryColor:f,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:w,backgroundColor:E,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:A,showEpisodeTitle:x,showEpisodeDescription:j}=o,{currentTrack:S}=this.state,N=s.slice(0,g),R=this.getTrack(S),P=(0,p.GU)({primaryColor:f,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:E,customBackgroundColor:_}),L={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":w,"--jetpack-podcast-player-background":C},T=(0,c.A)("jetpack-podcast-player",d,P.secondary.classes,P.background.classes);return(0,r.createElement)("section",{className:T,style:L,"aria-labelledby":t||R&&R.title?`${e}__title`:void0,"aria-describedby":R&&R.description?`${e}__track-description`:void0,"data-jetpack-iframe-ignore":!0},(0,r.createElement)(m.A,{playerId:e,title:t,link:n,cover:a,track:this.getTrack(S),showCoverArt:A,showEpisodeTitle:x,showEpisodeDescription:j,colors:P},(0,r.createElement)(u.A,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(S).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:d,currentTime:i,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),N.length>1&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,l.sprintf)(
__("Playlist: %s","jetpack"),t)),(0,r.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,r.createElement)(h.A,{playerId:e,playerState:d,currentTrack:S,tracks:N,selectTrack:this.selectTrack,colors:P})))}}f.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]};constb=(0,s.compose)([g.A,(0,o.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(d.ax);return{currentTime:r(n),playerState:a(n)}})),(0,o.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:s,pauseMediaSource:o,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(d.ax);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:s,pauseMediaSource:o,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(f)},74050:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(86087),s=n(27723);const__=s.__,o=(0,a.memo)((({link:e,title:t,colors:n})=>(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable.","jetpack")," ",e&&(0,r.createElement)("span",{className:n.secondary.classes,style:{color:n.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:e,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,s.sprintf)(/* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */
__("%s:","jetpack"),t)}`),__("Open in a new tab","jetpack"))))))},35311:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(82170),a=n(86087),s=n(27723),o=n(62796);const __=s.__,i=(0,a.memo)((({isPlaying:e,isError:t,className:n})=>{let a,s;t?(s="error",
f=t?__("track","jetpack"):void0;return(0,r.createElement)("li",{className:h,style:Object.keys(g).length?g:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:e.link||e.src,role:"button","aria-current":f,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),s(u))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),s(u))}},(0,r.createElement)(c.A,{className:"jetpack-podcast-player__track-status-icon",isPlaying:n,isError:a}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},e.title),e.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:e.duration},e.duration)),t&&a&&(0,r.createElement)(l.A,{link:e.link,title:e.title,colors:d}))}))},81166:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(86087),s=n(27723);const__=s.__;functiono(e){classtextendsa.Component{state={didError:!1,isIE11AudioIssue:!1};componentDidCatch=(e,t)=>{this.props.onError(e,t)};staticgetDerivedStateFromError=e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)});render(){const{didError:t,isIE11AudioIssue:n}=this.state;returnt?(0,r.createElement)("section",{className:"jetpack-podcast-player"},(0,r.createElement)("p",{className:"jetpack-podcast-player__error"},n?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,r.createElement)(e,this.props)}}returnt.defaultProps={onError:()=>{}},t}},38288:(e,t,n)=>{"use strict";n.d(t,{Q:()=>a,g:()=>r});constr="podcast-feed",a="embed-block"},18029:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(93832),a=n(20710);consts={attributes:{url:{type:"string",validator:r.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.A},hexPrimaryColor:{type:"string",validator:a.A},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.A},hexSecondaryColor:{type:"string",validator:a.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.A},hexBackgroundColor:{type:"string",validator:a.A},exampleFeedData:{type:"object"}},supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},60025:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});varr=n(82170),a=n(85985),s=n(94715),o=n(74997),i=n(56427),l=n(29491),c=n(47143),u=n(86087),d=n(27723),p=n(93832),m=n(10067),h=n.n(m),g=n(66087),f=n(49487),b=n(34377),v=n(78218),k=n(50961),y=n(1624),w=n(57162),E=n(38288),_=n(90388),C=n(90764),A=n(19812);const__=d.__,x=h()("jetpack:podcast-player:edit"),j=(0,a.Sy)()||(0,a.d9)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/",S=(0,l.compose)([(0,c.withDispatch)(((e,{clientId:t,attributes:n})=>({replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(t,(0,o.createBlock)("core/embed",{url:n.url}))}}))),(0,s.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),i.withNotices,l.withInstanceId,f.T])((({instanceId:e,attributes:t,setAttributes:n,noticeOperations:{createErrorNotice:a,removeAllNotices:o},noticeUI:l,primaryColor:c,setPrimaryColor:d,secondaryColor:m,setSecondaryColor:h,fallbackTextColor:f,backgroundColor:S,setBackgroundColor:N,fallbackBackgroundColor:R,isSelected:P,replaceWithEmbedBlock:L})=>{constT=(0,v.y)(y.attributes,t),{url:M,selectedEpisodes:B,itemsToShow:I,showCoverArt:D,showEpisodeTitle:F,showEpisodeDescription:z,exampleFeedD
content:__("Instructions","jetpack")}],["jetpack/recipe-steps"]]]]]];return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",(0,a.useBlockProps)({className:e}),(0,r.createElement)(a.InnerBlocks,{template:t})))}},16636:(e,t,n)=>{"use strict";varr=n(94375),a=n(85660),s=n(67868),o=n(81629),i=n(35970),l=n(64947),c=n(665),u=n(5440),d=n(54348),p=n(95413);(0,r.M)(a,{edit:o.A,save:u.A},[{name:s.U,settings:s.W},{name:i.UU,settings:i.W0},{name:c.UU,settings:c.W0},{name:l.UU,settings:l.W0},{name:p.UU,settings:p.W0},{name:d.UU,settings:d.W0}])},82628:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=function({className:e,hasInnerBlocks:t}){return(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["core/image","jetpack/slideshow","core/cover"],renderAppender:!t&&a.InnerBlocks.ButtonBlockAppender}))}},35970:(e,t,n)=>{"use strict";n.d(t,{UU:()=>u,W0:()=>d});varr=n(82170),a=n(85985),s=n(86087),o=n(27723),i=n(85660),l=n(82628),c=n(66249);const__=o.__,u="recipe-hero",d={title:__("Recipe Hero","jetpack"),description:(0,r.createElement)(s.Fragment,null,(0,r.createElement)("p",null,__("Image area for the recipe.","jetpack"))),keywords:[],icon:(0,a.Cq)(i),category:"widgets",edit:l.A,save:c.A,parent:["jetpack/recipe"]}},66249:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=({className:e})=>(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks.Content,null))},70922:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});constr={ingredient:{type:"string",selector:".ingredientText"}}},68835:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=function({className:e,attributes:t,setAttributes:n}){const{ingredient:s}=t;return(0,r.createElement)("div",{className:e},(0,r.createElement)(a.RichText,{tagName:"p",className:"ingredientText",value:s,onChange:e=>n({ingredient:e})}))}},64947:(e,t,n)=>{"use strict";n.d(t,{UU:()=>d,W0:()=>p});varr=n(82170),a=n(85985),s=n(86087),o=n(27723),i=n(85660),l=n(70922),c=n(68835),u=n(51166);const__=o.__,d="recipe-ingredient-item",p={title:__("Recipe Ingredient Item","jetpack"),description:(0,r.createElement)(s.Fragment,null,(0,r.createElement)("p",null,__("A single ingredient associated with a recipe.","jetpack"))),keywords:[],icon:(0,a.Cq)(i),category:"widgets",attributes:l.A,edit:c.A,save:u.A,parent:["jetpack/recipe"]}},51166:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=({className:e,attributes:t})=>{const{ingredient:n}=t;return(0,r.createElement)("div",{className:e},(0,r.createElement)(a.RichText.Content,{tagName:"p",itemprop:"recipeIngredient",value:n}))}},75636:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});constr={ingredients:{type:"string[]"}}},17257:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=function({className:e}){return(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["jetpack/recipe-ingredient-item"],renderAppender:a.InnerBlocks.ButtonBlockAppender}))}},665:(e,t,n)=>{"use strict";n.d(t,{UU:()=>d,W0:()=>p});varr=n(82170),a=n(85985),s=n(86087),o=n(27723),i=n(85660),l=n(75636),c=n(17257),u=n(89732);const__=o.__,d="recipe-ingredients-list",p={title:__("Recipe Ingredients List","jetpack"),description:(0,r.createElement)(s.Fragment,null,(0,r.createElement)("p",null,__("Recipe ingredient list","jetpack"))),icon:(0,a.Cq)(i),category:"widgets",keywords:[],attributes:l.A,edit:c.A,save:u.A,parent:["jetpack/recipe"]}},89732:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=({className:e})=>(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks.Content,null))},5440:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=({className:e})=>(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks.Content,null))},95478:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=function({className:e}){return(0,r.createElement)("li",null,(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks,{al
_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.",+o,"jetpack"),o):1===o?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,d.sprintf)(/* translators: placeholder is a number. */
_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.",+o,"jetpack"),o)),(0,s.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,s.createElement)(i.InnerBlocks,null)))}))},53183:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=()=>{conste=a.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.InnerBlocks.Content,null)))}},84730:(e,t,n)=>{"use strict";n.d(t,{DF:()=>r,aV:()=>s,et:()=>a});constr="after-visits",a="before-visits",s=3},31566:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(94715),s=n(84730);consto={attributes:{criteria:{type:"string",default:s.DF},threshold:{type:"number",default:s.aV}},supports:{html:!1},save:({className:e})=>(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks.Content,null))}},79238:(e,t,n)=>{"use strict";varr=n(94375),a=n(20242),s=n(34570),o=n(53183),i=n(31566);(0,r.M)(a,{edit:s.A,save:o.A,deprecated:[i.A]})},24097:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);functions(){conste=(0,a.useBlockProps)();return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},38136:(e,t,n)=>{"use strict";varr=n(94375),a=n(58180),s=n(24097),o=n(92908),i=n(92335),l=n(7651);(0,r.M)(a,{edit:s.A,save:o.A,variations:i.A},[{name:l.UU,settings:l.W0}])},92908:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=()=>{conste=a.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},57699:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});constr=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲
// translators: option to print the content - a verb.
label:__("Print","jetpack")},
// translators: option to print the content - a verb labelling a button.
{value:"text",label:__("Text Only","jetpack")}],value:h,onSelect:e=>c({styleType:e})}))),(0,s.createElement)(o.InspectorControls,{group:"color"},f.map((({onChange:e,label:n,value:r,resetAllFilter:i})=>(0,s.createElement)(o.__experimentalColorGradientSettingsDropdown,a()({key:`social-links-color-${n}`,__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:r,label:n,onColorChange:e,isShownByDefault:!0,resetAllFilter:i,enableAlpha:!0,clearable:!0}],panelId:t,gradients:""},g)))),(0,s.createElement)(o.ContrastChecker,{textColor:m,backgroundColor:p,isLargeText:!1})))}))},83597:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});varr=n(82170),a=n(94715),s=n(27723),o=n(13022),i=n(11906),l=n(67650);const__=s.__,c=["jetpack/sharing-button"];constu=function(e){const{attributes:t}=e,{size:n}=t,s=(0,r.createElement)("li",null,__("Click plus to add a Sharing Button","jetpack")),u=(0,o.A)(n,"jetpack-sharing-buttons__services-list"),d=(0,a.useBlockProps)({className:u}),p=(0,a.useInnerBlocksProps)(d,{allowedBlocks:c,placeholder:s,templateLock:!1,orientation:t.layout?.orientation??"horizontal",sharingEventsAdded:!0,__experimentalAppenderTagName:"li"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.A,e),(0,r.createElement)(l.A,e),(0,r.createElement)("ul",p))}},74956:(e,t,n)=>{"use strict";varr=n(94375),a=n(32870),s=n(83597),o=n(53840);(0,r.M)(a,{edit:s.A,save:o.A})},53840:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});varr=n(96072),a=n.n(r),s=n(82170),o=n(94715),i=n(13022);functionl({attributes:e}){const{size:t}=e,n=(0,i.A)(t,"jetpack-sharing-buttons__services-list"),r=o.useBlockProps.save({className:n}),l=o.useInnerBlocksProps.save(r);return(0,s.createElement)("ul",a()({},l,{id:"jetpack-sharing-serivces-list"}))}},48715:(e,t,n)=>{"use strict";varr=n(85985),a=n(18692);(0,r.vp)(a.U,a.W)},18692:(e,t,n)=>{"use strict";n.d(t,{U:()=>d,W:()=>p});varr=n(82170),a=n(56427),s=n(47143),o=n(86087),i=n(27723),l=n(66087),c=n(71046),u=n(90062);const__=i.__,d="shortlinks",p={render:()=>(0,r.createElement)(h,null)};classmextendso.Component{render(){const{shortlink:e}=this.props;returne?(0,r.createElement)(u.A,null,(0,r.createElement)(a.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel",initialOpen:!1},(0,r.createElement)(c.A,{link:e}))):null}}consth=(0,s.withSelect)((e=>{constt=e("core/editor").getCurrentPost();return{shortlink:(0,l.get)(t,"jetpack_shortlink","")}}))(m)},52362:(e,t,n)=>{"use strict";n.d(t,{OS:()=>a,Z3:()=>r,oU:()=>s});constr="jp_pay_product",a="USD",s=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},77513:(e,t,n)=>{"use strict";n.d(t,{H:()=>o});varr=n(82170),a=n(56427),s=n(27723);const__=s.__;functiono({setAttributes:e,postLinkText:t}){return(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text",placeholder:__("Click here to purchase","jetpack"),onChange:t=>e({postLinkText:t}),value:t}))}},54719:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(86087);consts={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:({attributes:e})=>{const{productId:t}=e;returnt?(0,r.createElement)(a.RawHTML,null,`[simple-payment id="${t}"]`):null}}},14604:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});varr=n(82170),a=n(3975),s=n(94715),o=n(56427),i=n(29491),l=n(47143),c=n(
__("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{conste=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();returne&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;returng.oU.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes;if(!t||0===parseFloat(t))returnthis.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1;if(Number.isNaN(parseFloat(t)))returnthis.setState({fieldPriceError:__("Invalid price","jetpack")}),!1;if(parseFloat(t)<0)returnthis.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1;const{precision:n}=(0,a.i)(e);return(0,v.w1)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,u.sprintf)(/* translators: Placeholder is a number of decimals in a number. */
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0)};validateEmail=()=>{const{email:e}=this.props.attributes;returne?p.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.sprintf)(/* translators: placeholder is an email address. */
__("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)};validateTitle=()=>{const{title:e}=this.props.attributes;returne?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=g.oU.map((e=>{const{symbol:t}=(0,a.i)(e);return{value:e,label:t===e?e:`${e}${(0,m.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(o.TextControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text",placeholder:__("Click here to purchase","jetpack"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText})));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:a,instanceId:s,isSelected:i,setAttributes:l,simplePayment:c}=this.props,{content:u,currency:p,email:g,featuredMediaId:k,featuredMediaUrl:y,featuredMediaTitle:w,multiple:E,price:_,productId:C,title:A}=a,x=C&&(0,m.isEmpty)(c);if(!i&&x)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(b.A,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&g&&_&&A&&!e&&!t&&!n)return(0,r.createElement)(b.A,{"aria-busy":"false",content:u,featuredMediaUrl:y,featuredMediaTitle:w,formattedPrice:(0,v.N_)(_,p),multiple:E,title:A});constj=x?o.Disabled:"div";return(0,r.createElement)(j,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(f.A,{featuredMediaId:k,featuredMediaUrl:y,featuredMediaTitle:w,setAttributes:l}),(0,r.createElement)("div",null,(0,r.createElement)(o.TextControl,{"aria-describedby":`${s}-title-error`,className:(0,d.A)("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:A}),(0,r.createElement)(h.A,{id:`${s}-title-error`,isError:!0},n),(0,r.createElement)(o.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),value:u}),(0,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(o.SelectControl,{__next40pxDefaultSize:!0,className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:p}),(0,r.createElement)(o.TextControl,{"aria-describedby":`${s}-price-error`,className:(0,d.A)("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,v.N_)(0,p,!1),required:!0,step:"1",type:"number",value:_||""}),(0,r.createElement)(h.A,{id:`${s}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.create
__("%s is not a valid email address.","jetpack"),R):null),V("spay_price"===t?__("Invalid price.","jetpack"):null)})).finally((()=>{W(!1)}))},K=()=>{conste=Q(),t=ee(),n=X(),r=Y();returne&&t&&n&&r},Y=()=>f.oU.includes(N),Q=()=>{if(!B||0===parseFloat(B))returnV(__("If you’re selling something, you need a price tag. Add yours here.","jetpack")),!1;if(Number.isNaN(parseFloat(B)))returnV(__("Invalid price","jetpack")),!1;if(parseFloat(B)<0)returnV(__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")),!1;const{precision:e}=(0,a.i)(N);return(0,y.w1)(B)>e?0===e?(V(__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")),!1):(V((0,u.sprintf)(/* translators: Placeholder is a number of decimals in a number. */
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",e,"jetpack"),e)),!1):(U&&V(null),!0)},X=()=>R?m.validate(R)?(O&&H(null),!0):(H((0,u.sprintf)(/* translators: Placeholder is an email address. */
__("%s is not a valid email address.","jetpack"),R)),!1):(H(__("We want to make sure payments reach you, so please add an email address.","jetpack")),!1),ee=()=>D?(q&&G(null),!0):(G(__("Please add a brief title so that people know what they’re paying for.","jetpack")),!1),te=e=>{i({email:e}),H(null)},ne=e=>{i({content:e})},re=e=>{constt=parseFloat(e);isNaN(t)?i({price:void0}):i({price:t}),V(null)},ae=e=>{i({currency:e})},se=e=>{i({multiple:!!e})},oe=e=>{i({title:e}),G(null)},ie=f.oU.map((e=>{const{symbol:t}=(0,a.i)(e);return{value:e,label:t===e?e:`${e}${(0,h.trimEnd)(t,".")}`}}));letle;if((0,c.useEffect)((()=>{(!I&&_||!A)&&J(),window.wp?.customize?.bind("change",(e=>{lett;constn=e.id.match(/^widget_(.+)(?:\[(\d+)\])$/);if(n){t=`${n[1]}-${parseInt(n[2],10)}`}elset=e.id;t===(0,d.getWidgetIdFromBlock)(x)&&K()&&J()}))}),[]),(0,c.useEffect)((()=>{w&&Z.current&&!(0,h.isEmpty)(w)&&(i({content:(0,h.get)(w,["content","raw"],S),currency:(0,h.get)(w,["meta","spay_currency"],N),email:(0,h.get)(w,["meta","spay_email"],R),featuredMediaId:(0,h.get)(w,["featured_media"],P),featuredMediaUrl:(0,h.get)(E,"url",L),featuredMediaTitle:(0,h.get)(E,"title",T),multiple:Boolean((0,h.get)(w,["meta","spay_multiple"],Boolean(M))),price:(0,h.get)(w,["meta","spay_price"],B||void0),title:(0,h.get)(w,["title","raw"],D)}),Z.current=!1)}),[w]),(0,c.useEffect)((()=>{j&&(_||!A)&&K()?J():n||K()}),[j,n]),(0,c.useEffect)((()=>{constt=C&&C!==e.postLinkUrl,n=!e.postLinkText;(t||n)&&i({...t&&{postLinkUrl:C},...n&&{postLinkText:__("Click here to purchase.","jetpack")}})}),[C,e]),!n&&F)le=(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(k.A,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));elseif(n||!R||!B||!D||O||U||q){constn=F?o.Disabled:"div";le=(0,r.createElement)(n,{className:"simple-payments__wrapper"},(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(b.H,{postLinkText:e.postLinkText,setAttributes:i})),(0,r.createElement)(v.A,{featuredMediaId:P,featuredMediaUrl:L,featuredMediaTitle:T,setAttributes:i}),(0,r.createElement)("div",null,(0,r.createElement)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-describedby":`${t}-title-error`,className:(0,p.A)("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":q}),label:__("Item name","jetpack"),onChange:oe,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:D}),(0,r.createElement)(g.A,{id:`${t}-title-error`,isError:!0},q),(0,r.createElement)(o.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:ne,placeholder:__("Describe your item in a few words","jetpack"),"aria-label":__("Describe your item in a few words","jetpack"),value:S}),(0,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(o.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:ae,options:ie,value:N}),(0,r.createElement)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-describedby":`${t}-price-error`,className:(0,p.A)("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":U}),label:__("Price","jetpack"),onChange:re,placeholder:(0,y.$g)(0,N,!1),required:!0,step:"1",type:"number",value:B||""}),(0,r.createElement)(g.A,{id:`${t}-price-error`,isError:!0},U)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.createElement)(o.ToggleControl,{__nextHasNoMarginBottom:!0,checked:Boolean(M),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:se})),(0,r.createElement)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-describedby":`${t}-email-${O?"error":"help"}`,className:(0,p.A)("simple-payments__field","simple-payments__field-email",{"simple-payments__field-ha
__("Go to slide %s","jetpack"),e)+'"></button>'}elsea+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;returna}},16445:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});varr=n(82170),a=n(63162),s=n(94715),o=n(56427),i=n(86087),l=n(27723),c=n(13022),u=n(66087),d=n(94107),p=n(39126),m=n(31837),h=n(57464);const__=l.__;classgextendsi.Component{pendingRequestAnimationFrame=null;resizeObserver=null;staticdefaultProps={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:a,images:s,onError:o}=this.props;if(t===e.align&&(0,u.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||s!==e.images){lett;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{o(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=newd.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)returnnull;const{autoplay:e,className:t,delay:n,effect:i,images:l}=this.props;return(0,r.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":i},(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,r.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},l.map((({alt:e,caption:t,id:n,url:i})=>(0,r.createElement)("li",{className:(0,c.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,a.isBlobURL)(i)&&"is-transient"),key:n||i},(0,r.createElement)("figure",null,(0,r.createElement)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,src:i}),(0,a.isBlobURL)(i)&&(0,r.createElement)(o.Spinner,null),t&&(0,r.createElement)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})))))),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,r.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}prefersReducedMotion=()=>"undefined"!=typeofwindow&&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,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:m.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transition
__("Go to slide %s","jetpack"),e)+'"></button>'}elsea+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;returna}},71576:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});varr=n(82170),a=n(63162),s=n(94715),o=n(56427),i=n(86087),l=n(27723),c=n(13022),u=n(66087),d=n(94107),p=n(13895),m=n(74194),h=n(25080);const__=l.__;classgextendsi.Component{pendingRequestAnimationFrame=null;resizeObserver=null;staticdefaultProps={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:a,images:s,onError:o}=this.props;if(t===e.align&&(0,u.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||s!==e.images){lett;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{o(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=newd.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)returnnull;const{autoplay:e,delay:t,effect:n,images:i}=this.props;return(0,r.createElement)("div",{"data-autoplay":e||null,"data-delay":e?t:null,"data-effect":n},(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,r.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},i.map((({alt:e,caption:t,id:n,url:i})=>(0,r.createElement)("li",{className:(0,c.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,a.isBlobURL)(i)&&"is-transient"),key:n||i},(0,r.createElement)("figure",null,(0,r.createElement)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,src:i}),(0,a.isBlobURL)(i)&&(0,r.createElement)(o.Spinner,null),t&&(0,r.createElement)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})))))),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,r.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}prefersReducedMotion=()=>"undefined"!=typeofwindow&&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,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:m.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}constf=g},89
__("Go to slide %s","jetpack"),e)+'"></button>'}elsea+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;returna}},41952:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(82170),a=n(94715),s=n(241);consto=({attributes:{align:e,autoplay:t,delay:n,effect:o,images:i},className:l})=>{constc=a.useBlockProps.save({className:l});return(0,r.createElement)(s.A,{align:e,autoplay:t,className:c.className,delay:n,effect:o,images:i})}},241:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});varr=n(82170),a=n(63162),s=n(94715),o=n(56427),i=n(86087),l=n(27723),c=n(13022),u=n(66087),d=n(94107),p=n(33170),m=n(30889),h=n(34308);const__=l.__;classgextendsi.Component{pendingRequestAnimationFrame=null;resizeObserver=null;staticdefaultProps={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:a,images:s,onError:o}=this.props;if(t===e.align&&(0,u.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||s!==e.images){lett;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{o(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=newd.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)returnnull;const{autoplay:e,className:t,delay:n,effect:i,images:l}=this.props;return(0,r.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":i},(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,r.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},l.map((({alt:e,caption:t,id:n,url:i},l)=>(0,r.createElement)("li",{className:(0,c.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,a.isBlobURL)(i)&&"is-transient"),key:n?`${n}-${l}`:`${i}-${l}`},(0,r.createElement)("figure",null,(0,r.createElement)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,src:i}),(0,a.isBlobURL)(i)&&(0,r.createElement)(o.Spinner,null),t&&(0,r.createElement)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})))))),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,r.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}prefersReducedMotion=()=>"undefined"!=typeofwindow&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,p.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMot
_n("<span>%s reader</span> issubscribed.","<span>%s readers</span> aresubscribed.",N,"jetpack"),(0,a.A)(N,{notation:"compact",maximumFractionDigits:1})),{span:(0,r.createElement)("span",{style:{fontWeight:"bold"}})})),w&&(0,r.createElement)(o.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:e.color,onColorChange:A,gradientValue:n.gradientValue,onGradientChange:n.setGradient,label:__("Button Background","jetpack")},{colorValue:R.color,onColorChange:x,label:__("Button Text","jetpack")},{colorValue:t.color,onColorChange:C,label:__("Border","jetpack")}],initialOpen:!0},(0,r.createElement)(o.ContrastChecker,{fontSize:k.size,textColor:R.color,backgroundColor:f.color,fallbackButtonBackgroundColor:b,fallbackTextColor:v})),!w&&(0,r.createElement)(o.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:e.color,onChange:A,label:__("Button Background Color","jetpack")},{value:R.color,onChange:x,label:__("Button Text Color","jetpack")},{value:t.color,onColorChange:C,label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(o.ContrastChecker,{fontSize:k.size,textColor:R.color,backgroundColor:f.color,fallbackButtonBackgroundColor:b,fallbackTextColor:v})),(0,r.createElement)(i.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(o.FontSizePicker,{withSlider:!0,value:k.size,onChange:e=>{constt=e||p.Fm;_({fontSize:t,customFontSize:t})},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})),(0,r.createElement)(i.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:m,label:__("Border Radius","jetpack"),min:p.rG,max:p.Bs,initialPosition:p.Kn,allowReset:!0,onChange:e=>_({borderRadius:e})}),(0,r.createElement)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:h,label:__("Border Weight","jetpack"),min:p.ZS,max:p.JD,initialPosition:p.aS,allowReset:!0,onChange:e=>_({borderWeight:e})})),(0,r.createElement)(i.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:E,label:__("Space Inside","jetpack"),min:p.rE,max:p.Vy,initialPosition:p.oi,allowReset:!0,onChange:e=>_({padding:e})}),(0,r.createElement)(i.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:S,label:__("Space Between","jetpack"),min:p.Hq,max:p.Zi,initialPosition:p.E,allowReset:!0,onChange:e=>_({spacing:e})}),(0,r.createElement)(d.s,{width:P,onChange:e=>_({buttonWidth:e})})),(0,r.createElement)(i.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Show subscriber count","jetpack"),checked:j,onChange:()=>{_({showSubscribersTotal:!j,includeSocialFollowers:void0!==y&&y})},help:()=>{if(!N||N<1)return__("This will remain hidden until there is at least one subscriber.","jetpack")}}),M&&(0,r.createElement)(i.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!j,label:__("Include social followers in count","jetpack"),checked:void0===y||y,onChange:()=>{_({includeSocialFollowers:void0!==y&&!y})}}),(0,r.createElement)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Place button on new line","jetpack"),checked:g,onChange:()=>{_({buttonOnNewLine:!g})}}),(0,r.createElement)(i.TextareaControl,{__nextHasNoMarginBottom:!0,value:L,label:__("Input placeholder text","jetpack"),help:__("Edit the placeholder text of the email address input.","jetpack"),onChange:e=>_({subscribePlaceholder:e})}),!(0,s.Sy)()&&(0,r.createElement)(i.TextareaControl,{__nextHasNoMarginBottom:!0,value:T,label:__("Success message","jetpack"),help:__("Editthem
_n("Join %s other subscriber","Join %s other subscribers",r,"jetpack"),(0,o.A)(r,{notation:"compact",maximumFractionDigits:1}))}})),Y=A({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}),Q=A({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}),X={"no-border-radius":0===I,[L.class]:L.class,"has-text-color":j.color,[j.class]:j.class},ee={...X,"has-background":r.color||Y.gradientValue,[r.class]:!Y.gradientValue&&r.class,[Y.gradientClass]:Y.gradientClass},te={...X,"has-background":i.color||Q.gradientValue,[i.class]:!Q.gradientValue&&i.class,[Q.gradientClass]:Q.gradientClass},ne=e=>e||w.E,re={color:j.color,borderColor:R.color,borderRadius:I?I+"px":w.Kn+"px",borderWidth:D?D+"px":w.aS+"px",fontSize:L.size?L.size:w.Fm,padding:(e=>{constt=e||w.oi;returnt+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(H)},ae={"--subscribe-block-border-radius":I?I+"px":w.Kn+"px"},se={...re,...!r.color&&Y.gradientValue?{background:Y.gradientValue}:{backgroundColor:r.color}},oe={...re,...!i.color&&Q.gradientValue?{background:Q.gradientValue}:{backgroundColor:i.color},width:F};"button"!==Z&&($?oe.marginTop=ne(U)+"px":oe.marginLeft=ne(U)+"px");constie=(0,u.usePrevious)(i);return(0,p.useEffect)((()=>{ie?.color===R?.color&&R?.color!==i?.color&&P(i.color)}),[i,ie,R,P]),(0,s.createElement)("div",a()({},M,{className:(0,h.A)(M.className,"wp-block-jetpack-subscriptions__container","wp-block-jetpack-subscriptions__supports-newline",$?"wp-block-jetpack-subscriptions__use-newline":void0,G?"wp-block-jetpack-subscriptions__show-subs":void0)}),(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(E.A,{buttonBackgroundColor:i,borderColor:R,buttonGradient:Q,borderRadius:I,borderWeight:D,buttonOnNewLine:$,emailFieldBackgroundColor:r,fallbackButtonBackgroundColor:x,fallbackTextColor:S,fontSize:L,includeSocialFollowers:O,isGradientAvailable:C,padding:H,setAttributes:n,setBorderColor:P,setButtonBackgroundColor:_,setTextColor:N,showSubscribersTotal:G,spacing:U,subscriberCount:J,textColor:j,buttonWidth:F,subscribePlaceholder:q,submitButtonText:V,successMessage:W})),(0,s.createElement)(l.BlockControls,null,(0,s.createElement)(c.Toolbar,{label:(0,v.$E)(T)},(0,s.createElement)(v.Ay,{context:"toolbar",hasTierPlans:T}))),(0,s.createElement)("div",{style:ae},(0,s.createElement)("div",{className:"wp-block-jetpack-subscriptions__container is-not-subscriber"},(0,s.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,s.createElement)("div",{className:"wp-block-jetpack-subscriptions__form-elements"},"button"!==Z&&(0,s.createElement)(c.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,placeholder:q,disabled:!0,className:(0,h.A)(ee,"wp-block-jetpack-subscriptions__textfield"),style:se}),(0,s.createElement)(l.RichText,{className:(0,h.A)(te,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>n({submitButtonText:e}),style:oe,value:V,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})))),G&&(0,s.createElement)("div",{className:"wp-block-jetpack-subscriptions__subscount"},K)))}))},13554:(e,t,n)=>{"use strict";varr=n(82170),a=n(85985),s=n(74997),o=n(47143),i=n(43656),l=n(86087),c=n(52619),u=n(27723),d=n(67709),p=n(62599),m=n(94375),h=n(99876),g=n(63200),f=n(39025),b=n(38387),v=n(3722),k=n(74500),y=n(48313);const__=u.__,w=h.name.replace("jetpack/","");(0,m.M)(h,{edit:b.h,transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog_subscription"===e,transform:({instance:e})=>(0,s.createBlock)("jetpack/subscriptions",{showSubscribersTotal:e.raw.show_subscribers_total,submitButtonText:e.raw.subscribe_button,subscribePlaceholder:e.raw.subscribe_placeholder,successMessage:e.raw.success_message})},{type:"block",isMultiBlock:!1,blocks:["core/buttons"],transform:(e,t)=>{if(!t?.length)return(0,s.createBlock)("jetpack/subscriptions");constn=[];returnt.forEach((e=>{constt=e?.attributes?.text;n.push((0,s.create
__("image %1$d of %2$d in gallery","jetpack"),t+1,n.length);return(0,r.createElement)(c.A,{alt:e.alt,"aria-label":i,height:e.height,id:e.id,origUrl:e.url,isSelected:s===t,key:t,link:e.link,linkTo:a,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:o}=this.props,i=m(o)?d.A:u.A,l=this.props.images.map(this.renderImage,this);return(0,r.createElement)("div",{className:n},(0,r.createElement)(i,{align:e,columns:a,images:s,layoutStyle:o,renderedImages:l}),t)}}functionm(e){return["circle","square"].includes(e)}functionh(e,t={}){constn={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(newURL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]ofObject.entries(t))r.searchParams.set(Object.hasOwn(n,e)?n[e]:e,a);returnr.toString()}},58070:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});varr=n(82170),a=n(86087),s=n(94107),o=n(29971),i=n(75303),l=n(56237),c=n(34896),u=n(5236);classdextendsa.Component{gallery=(0,a.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}ofe){const{width:e}=t;(0,u.S)(n).forEach((t=>(0,u.r)(t,e)))}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=news.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:a,renderedImages:s}=this.props,u=(0,c.mJ)(n),d="columns"===a?(0,c.FL)(u,t):(0,c.VU)(u,{isWide:["full","wide"].includes(e)});letp=0;return(0,r.createElement)(i.A,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(l.A,{key:t},e.map(((e,t)=>{constn=s.slice(p,p+e);returnp+=e,(0,r.createElement)(o.A,{key:t},n)}))))))}}},34896:(e,t,n)=>{"use strict";n.d(t,{FL:()=>o,VU:()=>A,mJ:()=>a});varr=n(66087);functiona(e){return(0,r.map)(e,s)}functions({height:e,width:t}){returne&&t?t/e:1}functiono(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];lets=e,o=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(s,(t=>{constr=o<=(e+1)*n;returnr&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}returna.push(s.length),[a]}consti=x([2,1,2],5),l=j([S,S,N,S,S]),c=j([S,S,S,N,S,S,S]),u=x([3,1,3],5),d=j([N,S,S,N]),p=x([1,2,1],5),m=j([N,S,S,S]),h=x([1,3],3),g=j([S,S,S,N]),f=x([3,1],3),b=j([P(1.6),(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2)),P(1.6)]),_=x([2,1],3),C=j([function(e){returne>=2}]);functionA(e,{isWide:t}={}){constn=(e,a)=>{if(!a.length)returne;lets;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){consta=(0,r.sum)((0,r.take)(t,3));returnt.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);consto=e.concat([s]),A=(0,r.sum)(s),x=a.slice(A);returnn(o,x)};returnn([],e)}functionx(e,t){returnn=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}functionj(e){returnt=>t.length>=
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:m,srcSet:h}=(0,c.A)(e,{layoutStyle:u});return(0,r.createElement)(l.A,{alt:e.alt,"aria-label":p,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:d===t,key:t,link:e.link,linkTo:i,origUrl:e.url,showMovers:o.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:l,roundedCorners:p}=this.props,m=(0,c.s)(l)?d.A:u.A,h=this.props.images.map(this.renderImage,this),g=l!==i.aQ?Math.min(p,i.WN):0;return(0,r.createElement)("div",{className:(0,o.A)(n,{[`has-rounded-corners-${g}`]:g>0})},(0,r.createElement)(m,{align:e,columns:a,images:s,layoutStyle:l,renderedImages:h}),t)}}},84255:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(86087),s=n(84394),o=n(38548),i=n(70954),l=n(89195);classcextendsa.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:c}=this.props,u=(0,l.mJ)(n),d="columns"===a?(0,l.FL)(u,t):(0,l.VU)(u,{isWide:["full","wide"].includes(e)});letp=0;return(0,r.createElement)(o.A,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(i.A,{key:t},e.map(((e,t)=>{constn=c.slice(p,p+e);returnp+=e,(0,r.createElement)(s.A,{key:t},n)}))))))}}},89195:(e,t,n)=>{"use strict";n.d(t,{FL:()=>o,VU:()=>A,mJ:()=>a});varr=n(66087);functiona(e){return(0,r.map)(e,s)}functions({height:e,width:t}){returne&&t?t/e:1}functiono(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];lets=e,o=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(s,(t=>{constr=o<=(e+1)*n;returnr&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}returna.push(s.length),[a]}consti=x([2,1,2],5),l=j([S,S,N,S,S]),c=j([S,S,S,N,S,S,S]),u=x([3,1,3],5),d=j([N,S,S,N]),p=x([1,2,1],5),m=j([N,S,S,S]),h=x([1,3],3),g=j([S,S,S,N]),f=x([3,1],3),b=j([P(1.6),(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2)),P(1.6)]),_=x([2,1],3),C=j([function(e){returne>=2}]);functionA(e,{isWide:t}={}){constn=(e,a)=>{if(!a.length)returne;lets;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){consta=(0,r.sum)((0,r.take)(t,3));returnt.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);consto=e.concat([s]),A=(0,r.sum)(s),x=a.slice(A);returnn(o,x)};returnn([],e)}functionx(e,t){returnn=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}functionj(e){returnt=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}functionS(e){returne>=1&&e<2}functionN(e){returne<1}functionR(e){returnt=>t>=e}functionP(e){returnt=>t<e}},70954:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(13022);functions({children:e,className:t}){return(0,r.createElement)("div",{className:(0,a.A)("tiled-gallery__row",t)},e)}},73856:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(66087),s=n(43566),o=n(84394),i=n(38548),l=n(70954);functionc({columns:e,renderedImages:t}){constn=Math.min(s.ZS,e),c=t.length%n;return(0,r.createElement)(i.A,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),n)].map(((e,t)=>(0,r.createElement)(l.A,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(o.A,{key:t},e)))))))}},14294:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});varr=n(82170),a=n(90907),s=n(43566),o=n(65378);functioni(e){returnMath.min(3,e.images.length)}functionl({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)returnnull;const{align:l,className:c,columns:u=i(e),linkTo:d,round
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,c.A)(e,{layoutStyle:d});return(0,r.createElement)(l.A,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,key:t,link:e.link,linkTo:u,onMoveBackward:i?void0:p(t),onMoveForward:i?void0:m(t),onRemove:i?void0:h(t),onSelect:i?void0:g(t),origUrl:e.url,setAttributes:i?void0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:l,roundedCorners:p,onResize:m,isSave:h,columnWidths:g}=this.props,f=(0,c.s)(l)?d.A:u.A,b=this.props.images.map(this.renderImage,this),v=l!==i.aQ?Math.min(p,i.WN):0;return(0,r.createElement)("div",{className:(0,o.A)(n,{[`has-rounded-corners-${v}`]:v>0})},(0,r.createElement)(f,{align:e,columns:a,columnWidths:h?g:void0,images:s,layoutStyle:l,renderedImages:b,onResize:h?void0:m}),t)}}},56420:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(86087),s=n(54001),o=n(99309),i=n(46479),l=n(70394);classcextendsa.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:c,columnWidths:u}=this.props,d=(0,l.mJ)(n),p="columns"===a?(0,l.FL)(d,t):(0,l.VU)(d,{isWide:["full","wide"].includes(e)});letm=0;return(0,r.createElement)(o.A,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(i.A,{key:t},e.map(((e,n)=>{consta=c.slice(m,m+e);returnm+=e,(0,r.createElement)(s.A,{key:n,width:u?.[t]?.[n]},a)}))))))}}},70394:(e,t,n)=>{"use strict";n.d(t,{FL:()=>o,VU:()=>A,mJ:()=>a});varr=n(66087);functiona(e){return(0,r.map)(e,s)}functions({height:e,width:t}){returne&&t?t/e:1}functiono(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];lets=e,o=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(s,(t=>{constr=o<=(e+1)*n;returnr&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}returna.push(s.length),[a]}consti=x([2,1,2],5),l=j([S,S,N,S,S]),c=j([S,S,S,N,S,S,S]),u=x([3,1,3],5),d=j([N,S,S,N]),p=x([1,2,1],5),m=j([N,S,S,S]),h=x([1,3],3),g=j([S,S,S,N]),f=x([3,1],3),b=j([P(1.6),(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2)),P(1.6)]),_=x([2,1],3),C=j([function(e){returne>=2}]);functionA(e,{isWide:t}={}){constn=(e,a)=>{if(!a.length)returne;lets;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){consta=(0,r.sum)((0,r.take)(t,3));returnt.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);consto=e.concat([s]),A=(0,r.sum)(s),x=a.slice(A);returnn(o,x)};returnn([],e)}functionx(e,t){returnn=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}functionj(e){returnt=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}functionS(e){returne>=1&&e<2}functionN(e){returne<1}functionR(e){returnt=>t>=e}functionP(e){returnt=>t<e}},46479:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(13022);functions({children:e,className:t}){return(0,r.createElement)("div",{className:(0,a.A)("tiled-gallery__row",t)},e)}},65216:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(66087),s=n(60041),o=n(54001),i=n(99309),l=n(46479);functionc({columns:e,renderedImages:t}){constn=Math.min(s.ZS,e),c=t.length%n;return(0,r.createElement)(i.A,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),n)].map(((e,t)=>(0,r.createElement)(l.A,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(o.A,{key:t},e)))))))}},28635:(e,t,n)=>{"use strict";n.d(t,{A:(
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,c.A)(e,{layoutStyle:d});return(0,r.createElement)(l.A,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,key:t,link:e.link,linkTo:u,onMoveBackward:i?void0:p(t),onMoveForward:i?void0:m(t),onRemove:i?void0:h(t),onSelect:i?void0:g(t),origUrl:e.url,setAttributes:i?void0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:l,roundedCorners:p,onResize:m,style:h,isSave:g,columnWidths:f}=this.props,b=(0,c.s)(l)?d.A:u.A,v=this.props.images.map(this.renderImage,this),k=l!==i.aQ?Math.min(p,i.WN):0;return(0,r.createElement)("div",{style:h,className:(0,o.A)(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:g?f:void0,images:s,layoutStyle:l,renderedImages:v,onResize:g?void0:m}),t)}}},91341:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});varr=n(82170),a=n(86087),s=n(94107),o=n(78608),i=n(52042),l=n(9276),c=n(71245),u=n(86461);classdextendsa.Component{gallery=(0,a.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}ofe){const{width:e}=t,r=[];(0,u.S)(n).forEach((t=>{r.push((0,u.r)(t,e))})),void0!==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=news.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){letr=0;returne.map((e=>e.map((e=>{constn=t.slice(r,r+e);returnr+=e,n})))).map((e=>(0,u.r)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:s,renderedImages:u}=this.props,d=(0,c.mJ)(n),p="columns"===s?(0,c.FL)(d,t):(0,c.VU)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();leth=0;return(0,r.createElement)(i.A,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(l.A,{key:t},e.map(((e,n)=>{consta=u.slice(h,h+e);returnh+=e,(0,r.createElement)(o.A,{key:n,width:m?.[t]?.[n]},a)}))))))}}},71245:(e,t,n)=>{"use strict";n.d(t,{FL:()=>o,VU:()=>A,mJ:()=>a});varr=n(66087);functiona(e){return(0,r.map)(e,s)}functions({height:e,width:t}){returne&&t?t/e:1}functiono(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];lets=e,o=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(s,(t=>{constr=o<=(e+1)*n;returnr&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}returna.push(s.length),[a]}consti=x([2,1,2],5),l=j([S,S,N,S,S]),c=j([S,S,S,N,S,S,S]),u=x([3,1,3],5),d=j([N,S,S,N]),p=x([1,2,1],5),m=j([N,S,S,S]),h=x([1,3],3),g=j([S,S,S,N]),f=x([3,1],3),b=j([P(1.6),(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2)),P(1.6)]),_=x([2,1],3),C=j([function(e){returne>=2}]);functionA(e,{isWide:t}={}){constn=(e,a)=>{if(!a.length)returne;lets;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){con
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,c.A)(e,{layoutStyle:d});return(0,r.createElement)(l.A,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,key:t,link:e.link,linkTo:u,onMoveBackward:i?void0:p(t),onMoveForward:i?void0:m(t),onRemove:i?void0:h(t),onSelect:i?void0:g(t),origUrl:e.url,setAttributes:i?void0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:l,roundedCorners:p,onResize:m,isSave:h,columnWidths:g}=this.props,f=(0,c.s)(l)?d.A:u.A,b=this.props.images.map(this.renderImage,this),v=l!==i.aQ?Math.min(p,i.WN):0;return(0,r.createElement)("div",{className:(0,o.A)(n,{[`has-rounded-corners-${v}`]:v>0})},(0,r.createElement)(f,{align:e,columns:a,columnWidths:h?g:void0,images:s,layoutStyle:l,renderedImages:b,onResize:h?void0:m}),t)}}},62579:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(86087),s=n(89798),o=n(38448),i=n(26054),l=n(79167);classcextendsa.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:c,columnWidths:u}=this.props,d=(0,l.mJ)(n),p="columns"===a?(0,l.FL)(d,t):(0,l.VU)(d,{isWide:["full","wide"].includes(e)});letm=0;return(0,r.createElement)(o.A,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(i.A,{key:t},e.map(((e,n)=>{consta=c.slice(m,m+e);returnm+=e,(0,r.createElement)(s.A,{key:n,width:u?.[t]?.[n]},a)}))))))}}},79167:(e,t,n)=>{"use strict";n.d(t,{FL:()=>o,VU:()=>A,mJ:()=>a});varr=n(66087);functiona(e){return(0,r.map)(e,s)}functions({height:e,width:t}){returne&&t?t/e:1}functiono(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];lets=e,o=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(s,(t=>{constr=o<=(e+1)*n;returnr&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}returna.push(s.length),[a]}consti=x([2,1,2],5),l=j([S,S,N,S,S]),c=j([S,S,S,N,S,S,S]),u=x([3,1,3],5),d=j([N,S,S,N]),p=x([1,2,1],5),m=j([N,S,S,S]),h=x([1,3],3),g=j([S,S,S,N]),f=x([3,1],3),b=j([P(1.6),(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2)),P(1.6)]),_=x([2,1],3),C=j([function(e){returne>=2}]);functionA(e,{isWide:t}={}){constn=(e,a)=>{if(!a.length)returne;lets;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){consta=(0,r.sum)((0,r.take)(t,3));returnt.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);consto=e.concat([s]),A=(0,r.sum)(s),x=a.slice(A);returnn(o,x)};returnn([],e)}functionx(e,t){returnn=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}functionj(e){returnt=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}functionS(e){returne>=1&&e<2}functionN(e){returne<1}functionR(e){returnt=>t>=e}functionP(e){returnt=>t<e}},26054:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(13022);functions({children:e,className:t}){return(0,r.createElement)("div",{className:(0,a.A)("tiled-gallery__row",t)},e)}},58711:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(66087),s=n(41314),o=n(89798),i=n(38448),l=n(26054);functionc({columns:e,renderedImages:t}){constn=Math.min(s.ZS,e),c=t.length%n;return(0,r.createElement)(i.A,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),n)].map(((e,t)=>(0,r.createElement)(l.A,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(o.A,{key:t},e)))))))}},91162:(e,t,n)=>{"use strict";n.d(t,{A:(
__("Open image %1$d of %2$d in full-screen","jetpack"),t+1,o.length),y=i?c.A:l.A,{src:w,srcSet:E}=(0,u.A)(e,{layoutStyle:p});return(0,r.createElement)(y,{alt:e.alt,"aria-label":k,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:b===t,key:t,link:e.link,linkTo:d,onMoveBackward:i?void0:m(t),onMoveForward:i?void0:h(t),onRemove:i?void0:g(t),onSelect:i?void0:f(t),origUrl:e.url,setAttributes:i?void0:v(t),showMovers:o.length>1,srcSet:E,url:w,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:l,roundedCorners:c,onResize:m,style:h,isSave:g,columnWidths:f}=this.props,b=(0,u.s)(l)?p.A:d.A,v=this.props.images.map(this.renderImage,this),k=l!==i.aQ?Math.min(c,i.WN):0;return(0,r.createElement)("div",{style:h,className:(0,o.A)(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:g?f:void0,images:s,layoutStyle:l,renderedImages:v,onResize:g?void0:m}),t)}}},31238:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});varr=n(82170),a=n(86087),s=n(94107),o=n(98627),i=n(54359),l=n(43645),c=n(74176),u=n(18980);classdextendsa.Component{gallery=(0,a.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}ofe){const{width:e}=t,r=[];(0,u.S)(n).forEach((t=>{r.push((0,u.r)(t,e))})),void0!==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=news.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){letr=0;returne.map((e=>e.map((e=>{constn=t.slice(r,r+e);returnr+=e,n})))).map((e=>(0,u.r)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:s,renderedImages:u}=this.props,d=(0,c.mJ)(n),p="columns"===s?(0,c.FL)(d,t):(0,c.VU)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();leth=0;return(0,r.createElement)(i.A,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(l.A,{key:t},e.map(((e,n)=>{consta=u.slice(h,h+e);returnh+=e,(0,r.createElement)(o.A,{key:n,width:m?.[t]?.[n]},a)}))))))}}},74176:(e,t,n)=>{"use strict";n.d(t,{FL:()=>o,VU:()=>A,mJ:()=>a});varr=n(66087);functiona(e){return(0,r.map)(e,s)}functions({height:e,width:t}){returne&&t?t/e:1}functiono(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];lets=e,o=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(s,(t=>{constr=o<=(e+1)*n;returnr&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}returna.push(s.length),[a]}consti=x([2,1,2],5),l=j([S,S,N,S,S]),c=j([S,S,S,N,S,S,S]),u=x([3,1,3],5),d=j([N,S,S,N]),p=x([1,2,1],5),m=j([N,S,S,S]),h=x([1,3],3),g=j([S,S,S,N]),f=x([3,1],3),b=j([P(1.6),(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(R(.9),P(2)),(0,r.overEvery)(R(.9),P(2)),P(1.6)]),_=x([2,1],3),C=j([function(e){returne>=2}]);functionA(e,{isWide:t}={}){constn=(e,a)=>{if(!a.length)returne;lets;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]
__("Display %s","jetpack"),e.label.toLowerCase()),checked:i[e.id]||!1,onChange:(n=e.id,e=>{constr={...i,[n]:e};if(Object.values(r).every((e=>!1===e)))returnf(!0);l(r),t({postTypes:r}),f(!1)})});varn})),g&&(0,r.createElement)(a.Notice,{className:"jetpack-top-posts__error",status:"error",isDismissible:!1},__("At least one item must be selected.","jetpack"))),(0,r.createElement)(a.PanelBody,{title:__("Metadata settings","jetpack")},(0,r.createElement)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display date","jetpack"),checked:d,onChange:e=>t({displayDate:e})}),(0,r.createElement)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display author","jetpack"),checked:c,onChange:e=>t({displayAuthor:e})}),(0,r.createElement)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display context","jetpack"),checked:u,onChange:e=>t({displayContext:e})}),(0,r.createElement)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display thumbnail","jetpack"),checked:p,onChange:e=>t({displayThumbnail:e})})))}functionl({attributes:e,setAttributes:t}){const{layout:n}=e,s=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>t({layout:"grid"}),isActive:"grid"===n},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>t({layout:"list"}),isActive:"list"===n}];return(0,r.createElement)(a.ToolbarGroup,{controls:s})}},96894:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});varr=n(96072),a=n.n(r),s=n(82170),o=n(85985),i=n(1455),l=n.n(i),c=n(94715),u=n(86087),d=n(13022),p=n(9522),m=n(20600),h=n(8031);functiong(e){return(0,s.createElement)("div",{className:"jetpack-top-posts-item"},e.displayThumbnail&&e.thumbnail&&(0,s.createElement)("a",{className:"jetpack-top-posts-thumbnail-link"},(0,s.createElement)("img",{className:"jetpack-top-posts-thumbnail",src:e.thumbnail,alt:e.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayThumbnail&&!e.thumbnail&&(0,s.createElement)("a",{className:"jetpack-top-posts-thumbnail-link"},(0,s.createElement)("div",{className:"jetpack-top-posts-mock-thumbnail"})),(0,s.createElement)("span",{className:"jetpack-top-posts-title"},(0,s.createElement)("a",null,e.title)),e.displayDate&&(0,s.createElement)("span",{className:"jetpack-top-posts-date has-small-font-size"},e.date),e.displayAuthor&&(0,s.createElement)("span",{className:"jetpack-top-posts-author has-small-font-size"},e.author),e.displayContext&&e.context&&(0,s.createElement)("span",{className:"jetpack-top-posts-context has-small-font-size"},(0,s.createElement)("a",null,e.context[0].cat_name)))}constf=function({attributes:e,setAttributes:t}){const{isLoadingModules:n,isChangingStatus:r,isModuleActive:i,changeStatus:f}=(0,o.q7)("stats"),b=(0,c.useBlockProps)(),{className:v}=b,[k,y]=(0,u.useState)(),[w,E]=(0,u.useState)(),[_,C]=(0,u.useState)(),[A,x]=(0,u.useState)({}),{displayAuthor:j,displayContext:S,displayDate:N,displayThumbnail:R,layout:P,period:L,postsToShow:T,postTypes:M}=e;letB;return(0,u.useEffect)((()=>{l()({path:"/wpcom/v2/post-types"}).then((e=>{C(e),e.forEach((e=>{M&&M[e.id]&&x((t=>({...t,[e.id]:!0})))}))}))}),[M]),(0,u.useEffect)((()=>{i&&l()({path:`/wpcom/v2/top-posts?period=${L}`}).then((e=>{y(e)}))}),[L,i]),(0,u.useEffect)((()=>{conste=k;if(!e)return;constt=[];for(letn=0;t.length!==T&&(e[n]&&M[e[n].type]&&t.push((0,s.createElement)(g,{key:"jetpack-top-posts-"+e[n].id,title:e[n].title,date:e[n].date,author:e[n].author,thumbnail:e[n].thumbnail,context:e[n].context,displayDate:N,displayAuthor:j,displayThumbnail:R,displayContext:S})),e[n]);n++);E(t)}),[j,S,N,R,k,M,T,E]),B=i||n?w?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(c.InspectorControls,null,(0,s.createElement)(m.O,{attributes:e,setAttributes:t,toggleAttributes:A,setToggleAttributes:x,postTypesData:_})),(0,s.createElement)(c.BlockControls,null,(0,s.createElement)(m.G,{attributes:e,setAttributes:t})),(0,s.createElement)("div",{"data-item-count":w.length},(0,s.createElement)("div",{className:"jetpack-top-posts-wrapper"},w))):(0,s.createElement)(p.G,null):(0,s.createElement)(h.k,{className:v,changeStatus:f,isLoading:r}),(0,s.createElement)("div
__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:I,help:this.getAutoplayHelp,__nextHasNoMarginBottom:!0}),(0,s.createElement)(u.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:O,__nextHasNoMarginBottom:!0}),(0,s.createElement)(u.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:H,__nextHasNoMarginBottom:!0}),(0,s.createElement)(u.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:F,__nextHasNoMarginBottom:!0}),(0,s.createElement)(u.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:U,__nextHasNoMarginBottom:!0}),(0,s.createElement)(u.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:q??"",onChange:e=>p({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}),(0,s.createElement)(c.MediaUploadCheck,null,(0,s.createElement)(u.BaseControl,{className:"editor-video-poster-control"},(0,s.createElement)(u.BaseControl.VisualLabel,null,__("Poster Image","jetpack")),(0,s.createElement)(c.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:N,render:({open:e})=>(0,s.createElement)(u.Button,{variant:"secondary",onClick:e,ref:this.posterImageButton,"aria-describedby":J},K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}),(0,s.createElement)("p",{id:J,hidden:!0},K?(0,g.sprintf)(/* translators: Placeholder is an image URL. */
__("The current poster image url is %s","jetpack"),V??B):__("There is no poster image currently selected","jetpack")),K&&(0,s.createElement)(u.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")))),(0,m.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,s.createElement)(u.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,s.createElement)(C.A,{attributes:t,setAttributes:p,useAverageColor:G,toggleAttribute:this.toggleAttribute}),(0,s.createElement)(u.PanelBody,{title:__("Video File Settings","jetpack")},(0,s.createElement)(u.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:x??"",disabled:v||k,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}),(0,s.createElement)(u.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:j,disabled:v||T,__nextHasNoMarginBottom:!0}),(0,s.createElement)(u.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(L),onChange:this.onChangePrivacySetting,value:L??"",options:[{value:w.NF.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:w.NF.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:w.NF.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:v||M,__nextHasNoMarginBottom:!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:void0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):p({src:void0,id:void0,poster:void0})},ee=()=>"videoPressUploadPoster"inwindow,te=(0,h.escapeHTML)(b?(0,S.T3)(b.name):""),ne=({mediaId:e,guid:t,src:n})=>{this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!e,isEditingWhileUploading:!!e&&this.state.isEditingWhileUploading}),e&&t&&n&&p({id:e,guid:t,src:n})},re=e=>{this.setState({title:e})},ae=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},se=()=>{conste=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},oe=()=>de({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),ie=()=>de({poster_attachment_id:this.state.videoPosterImageData.id}),le=e=>{e.generating?ce():ue(e.poster)},ce=()=>{setTimeout((()=>{(ee()?window.videoPressGetPoster(z):i()({path:`/videos/${z}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>le(e)))}),2e3)},ue=e=>{e&&p({poster:e})},de=e=>{if(ee())returnwindow.videoPressUploadPoster(z,e).then((e=>le(e)));i()({path:`/videos/${z}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},pe=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&se(),B?ie():null!=t&&oe()},me=()=>{this.setState({isEditingWhileUploading:!1}),pe()};if(null!=b&&b.name||this.state.isEditingWhileUploading){conste=this.state.title??te;return(0,s.createElement)(R,{fileForUpload:b,filename:te,uploadFinished:ne,blockSettings:Y,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:ae,onSave:pe})}consthe=v||r,ge=f||o||!z,fe=ge&&!o&&!he,be=(0,s.createElement)(m.Fragment,null,(0,s.createElement)("div",{className:o||he?"":"videopress-block-hide"},(0,s.createElement)(E.A,{text:o?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,s.createElement)("div",{className:fe?"":"videopress-block-hide"},(0,s.createElement)(e,this.props)));if(ge)returnd?(0,s.createElement)(y.f,{onFilesSelected:Q,onMediaItemSelected:X},be):(0,s.createElement)(m.Fragment,null,be);const{html:ve,scripts:ke}=l||{html:null,scripts:null},ye=he||!l;return(0,s.createElement)(m.Fragment,null,Y,ye&&(0,s.createElement)(E.A,{text:__("Generating preview…","jetpack")}),!ye&&(0,s.createElement)(P,a()({},this.props,{hideOverlay:this.hideOverlay,html:ve,scripts:ke,interactive:_,caption:D})))}}]),"withVideoPressEdit")},27156:(e,t,n)=>{"use strict";varr=n(96072),a=n.n(r),s=n(82170),o=n(90372),i=n(85985),l=n(63162),c=n(94715),u=n(75994),d=n(74997),p=n(56427),m=n(29491),h=n(47143),g=n(43656),f=n(86087),b=n(52619),v=n(27723),k=n(66087),y=n(81837),w=n(59257),E=n(21440),_=n(54727),C=n(65390),A=n(77189),x=n(41560),j=n(47960),S=n(51983),N=n(7345),R=n(40932);const__=v.__,P=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,c.useBlockEditContext)();return"core/video"!==n?(0,s.createElement)(e,t):(0,s.createElement)(e,a()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,s.createElement)(p.Button,{disabled:!0,className:"components-butto
__("Delete %s","jetpack"),o.label),disabled:a===l},a===l?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,r.createElement)(i.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},o)}functiony({track:e,guid:t,onChange:n,onClose:a,onCancel:s,trackExists:d}){const[g,f]=(0,c.useState)(),[v=!1,k]=(0,c.useState)(),{label:y="",srcLang:w="",kind:E=p}=e,_=e.tmpFile?e.tmpFile.name:"";if(!(0,l.useSelect)((e=>e(o.store).getSettings().mediaUpload),[]))returnnull;return(0,r.createElement)(i.NavigableMenu,null,(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor"},(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-label"},__("Edit track","jetpack")),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file"},(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label"},(0,r.createElement)("span",null,__("File","jetpack"),":"),""!==_&&(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,r.createElement)("strong",null,_)),(0,r.createElement)(o.MediaUploadCheck,null,(0,r.createElement)(i.FormFileUpload,{onChange:t=>{constr=t.target.files;!r.length>0||(e.tmpFile=r[0],n(e))},accept:m,render:({openFileDialog:e})=>(0,r.createElement)(i.Button,{variant:"link",onClick:()=>{e()}},""===_?__("Select track","jetpack"):__("Change track","jetpack",0)),disabled:v}))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help"},/* translators: %s: The allowed file types to be uploaded as a video text track." *//* translators: %s: The allowed file types to be uploaded as a video text track." */
(0,u.sprintf)(__("Allowed formats: %s","jetpack"),m))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language"},(0,r.createElement)(i.TextControl,{onChange:t=>n({...e,label:t}),label:__("Label","jetpack"),value:y,help:__("Title of track","jetpack"),disabled:v,__nextHasNoMarginBottom:!0}),(0,r.createElement)(i.TextControl,{onChange:t=>n({...e,srcLang:t}),label:__("Source language","jetpack"),value:w,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:v,__nextHasNoMarginBottom:!0})),(0,r.createElement)(i.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:h,value:E,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}),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},v?(0,r.createElement)(i.Spinner,null):(0,r.createElement)(i.Button,{variant:"secondary",disabled:!e.tmpFile,onClick:()=>{f(null),""===y&&(e.label=__("English","jetpack")),""===w&&(e.srcLang="en"),void0===e.kind&&(e.kind=p),d(e)?f(__("A track already exists for that language and kind.","jetpack")):(k(!0),b(e,t).then((()=>{n(e),f(null),a()})).catch((e=>{e.message&&f(e.message)})).finally((()=>{k(!1)})))}},__("Save","jetpack")),(0,r.createElement)(i.Button,{variant:"link",onClick:s},__("Close","jetpack"))),g&&(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-error"},/* 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." */
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:m=u,visible:h=!0,requiredPlan:g,context:f})=>{const[b,v,k]=(0,i.A)(g,e),y=(0,a.useSelect)((e=>{if(p)returnp;constt=e("wordpress-com/plans"),n=t&&t.getPlan(g);returnn?(0,s.sprintf)(c,n.product_name_short):null}),[p,g]);returny&&(0,r.createElement)(o.c,{align:t,buttonText:m,checkoutUrl:b,className:n,context:f,description:y,goToCheckoutPage:v,isRedirecting:k,title:d,visible:h})}},23887:(e,t,n)=>{"use strict";n.d(t,{W:()=>r,r:()=>a});constr=({plan:e,blockName:t,context:n,tracks:r})=>{r.recordEvent("jetpack_editor_block_upgrade_click",{plan:e,block:t,context:n})},a=({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:()=>m});varr=n(82170),a=n(85985),s=n(94715),o=n(29491),i=n(47143),l=n(86087),c=n(95104),u=n(26845),d=n(23887);constp=(0,o.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:o,isSelected:p,attributes:m,setAttributes:h}=t||{},g=(0,a.tu)(n);if(!g)return(0,r.createElement)(e,t);constf=(0,a.sH)(n),b=(0,a.GT)(n),[v,k]=(0,l.useState)(!f),[y,w]=(0,l.useState)(!1),E="editor-canvas",_=(0,i.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(o,!0)),[o]),{hasParentBanner:C}=(0,l.useContext)(c.j)||{},A=(p||_)&&v&&!C,{tracks:x}=(0,a.st)(),j=(0,l.useMemo)((()=>({plan:g,blockName:n,context:E,tracks:x})),[g,n,x]);(0,l.useEffect)((()=>{A&&w(!0)}),[A,w]),(0,l.useEffect)((()=>{!y&&A&&(0,d.r)(j)}),[y,j,A]),(0,l.useEffect)((()=>k(!f)),[m,k,f]),(0,l.useEffect)((()=>{h({shouldDisplayFrontendBanner:!C})}),[h,C]);constS=(0,s.useBlockProps)();return(0,r.createElement)(c.b,{onBannerVisibilityChange:k,hasParentBanner:A},(0,r.createElement)("div",{ref:S.ref,style:{"max-width":"unset"}},(0,r.createElement)(u.Ay,{className:`is-${n.replace(/\//,"-")}-paid-block`,title:null,align:m?.align,visible:A,description:b?.description,requiredPlan:g,context:E,onRedirect:()=>(0,d.W)(j)}),(0,r.createElement)(e,t)))}),"withUpgradeBanner");functionm(e,t){return(0,a.tu)(t)?{...e,edit:p(e.edit)}:e}},76047:(e,t,n)=>{"use strict";n.d(t,{k6:()=>s,s6:()=>r,wb:()=>a});constr="jetpack-sidebar",a="document-settings",s="pre-publish"},23162:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});varr=n(82170),a=n(85985),s=n(56427),o=n(3582),i=n(47143),l=n(14309),c=n(43656),u=n(27723),d=n(10067),p=n.n(d),m=n(23e3),h=n(92169),g=n(61297),f=n(44732),b=n(48499),v=n(90062),k=n(58164),y=n(46536),w=n(50976),E=n(81932),_=n(37215),C=n(76318),A=n(27970),x=n(76047),j=n(45606);const__=u.__,S=p()("jetpack-ai-assistant-plugin:sidebar"),N=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-usage-panel"]?.available||!1,R=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-featured-image-generator"]?.available||!1,P=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-title-optimization"]?.available||!1,L=(0,b.C)("ai-title-optimization-keywords-support"),T=({placement:e,requireUpgrade:t,upgradeType:n,showUsagePanel:a,showFairUsageNotice:o})=>{const{checkoutUrl:l}=(0,h.A)(),{productPageUrl:u}=(0,f.A)(),d=(0,E.Ul)(),p=(0,i.useSelect)((e=>e(c.store).isEditedPostEmpty()),[]),g=__("Optimize Publishing","jetpack"),b=__("Optimize Title","jetpack"),v=L?b:g;return(0,r.createElement)(r.Fragment,null,o&&(0,r.createElement)(s.PanelRow,{className:"jetpack-ai-sidebar__feature-section"},(0,r.createElement)(s.BaseControl,{__nextHasNoMarginBottom:!0},(0,r.createElement)(m.Q,{variant:"muted"}))),p&&(0,r.createElement)(s.PanelRow,{className:"jetpack-ai-sidebar__warning-content"},(0,r.createElement)(s.Notice,{isDismissible:!1,status:"warning"},__("The following features require content to work.","jetpack"))),(0,E.GB)()&&d&&(0,r.createElement)(s.PanelRow,null,(0,r.createElement)(s.BaseControl,{__nextHasNoMarginBottom:!0},(0,r.createElement)(s.BaseControl.VisualLabel,null,__("WriteBrief(B
__("You have reached the limit of <strong>%d requests</strong>. <button>Upgrade to continue generating feedback.</button>","jetpack"),p),g=(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,r.createElement)("strong",null)}),f=(0,o.createInterpolateElement)(20===p?m:h,{strong:(0,r.createElement)("strong",null),button:(0,r.createElement)(s.Button,{variant:"link",onClick:d,href:c,target:"_blank"})});return(0,r.createElement)("p",null,"vip"===t?g:f)}},78058:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,R:()=>i});varr=n(82170),a=n(56427),s=n(51113),o=n(5573);consti=(0,r.createElement)(a.SVG,{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,{clipPath:"url(#clip0_4479_1006)"},(0,r.createElement)(a.Path,{d:"M7.87488 0L10.1022 5.64753L15.7498 7.87488L10.1022 10.1022L7.87488 15.7498L5.64753 10.1022L0 7.87488L5.64753 5.64753L7.87488 0Z",fill:"#A7AAAD"}),(0,r.createElement)(a.Path,{d:"M31.4998 0L34.4696 7.53004L41.9997 10.4998L34.4696 13.4696L31.4998 20.9997L28.53 13.4696L21 10.4998L28.53 7.53004L31.4998 0Z",fill:"#A7AAAD"}),(0,r.createElement)(a.Path,{d:"M18.3748 15.7496L22.0871 25.1621L31.4996 28.8744L22.0871 32.5866L18.3748 41.9992L14.6625 32.5866L5.25 28.8744L14.6625 25.1621L18.3748 15.7496Z",fill:"#A7AAAD"})),(0,r.createElement)(o.Defs,null,(0,r.createElement)("clipPath",{id:"clip0_4479_1006"},(0,r.createElement)(a.Rect,{width:"41.9997",height:"41.9992",fill:"white"}))));functionl({className:e,size:t=42}){return(0,r.createElement)(s.A,{icon:i,width:t,height:t,className:e})}},2561:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});varr=n(82170),a=n(96865),s=n(85985),o=n(56427),i=n(86087),l=n(27723),c=n(10067),u=n.n(c),d=n(23e3),p=n(71933),m=n(15855),h=n(6493);const__=l.__,g="ai-image-generator",f=u()("jetpack-ai:ai-image-modal");functionb({title:e,cost:t,open:n,images:l,currentIndex:c=0,onClose:u=null,onTryAgain:b=null,onGenerate:v=null,generating:k=!1,notEnoughRequests:y=!1,requireUpgrade:w=!1,currentLimit:E=null,currentUsage:_=null,isUnlimited:C=!1,upgradeDescription:A=null,hasError:x=!1,handlePreviousImage:j=()=>{},handleNextImage:S=()=>{},acceptButton:N=null,autoStart:R=!1,autoStartAction:P=null,instructionsPlaceholder:L=null,imageStyles:T=[],onGuessStyle:M=null,prompt:B="",setPrompt:I=()=>{},initialStyle:D=null,inputDisabled:F=!1,actionDisabled:z=!1}){const{tracks:O}=(0,s.st)(),{recordEvent:H}=O,U=(0,i.useRef)(!1),[V,q]=(0,i.useState)(!1),[G,$]=(0,i.useState)(null),[W,Z]=(0,i.useState)(T||[]),J=(0,i.useCallback)((()=>{b?.({userPrompt:B,style:G})}),[b,B,G]),K=(0,i.useCallback)((async()=>{if(G===a.Wp&&M){H("jetpack_ai_general_image_guess_style",{context:"block-editor",tool:"image"});conste=awaitM(B)||a.Hu;$(e),f("guessed style",e),v?.({userPrompt:B,style:e})}elsev?.({userPrompt:B,style:G})}),[v,B,G,M,H]),Y=(0,i.useCallback)((e=>{f("change style",e),$(e),H("jetpack_ai_image_generator_switch_style",{context:"block-editor",style:e})}),[$,H]),Q=(w||y)&&!k,X=Boolean(!C&&t&&E),ee=__("Generate","jetpack"),te=__("Try again","jetpack");return(0,i.useEffect)((()=>{R&&n&&(U.current||(U.current=!0,P?.({})))}),[R,P,n]),(0,i.useEffect)((()=>{T&&T.length>0&&(Z([T.find((({value:e})=>e===a.Hu)),T.find((({value:e})=>e===a.Wp)),...T.filter((({value:e})=>![a.Hu,a.Wp].includes(e)))].filter((e=>e))),q(!0),$(D||a.Hu))}),[T,D]),(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(p.A,{handleClose:u,title:e},(0,r.createElement)("div",{className:"ai-image-modal__content"},V&&(0,r.createElement)("div",{style:{display:"flex",alignItems:"center",gap:16}},(0,r.createElement)("div",{style:{fontWeight:500,flexGrow:1}},__("Generate image","jetpack")),(0,r.createElement)("div",null,(0,r.createElement)(o.SelectControl,{__nextHasNoMarginBottom:!0,value:G,options:W,onChange:Y}))),(0,r.createElement)(a.KJ,{prompt:B,setPrompt:I,disabled:F,actionDisabled:z,generateHandler:x?J:K,placeholder:L,buttonLabel:x?te:ee}),Q&&(0,r.createElement)(d.A,{description:A,placement:g,useLightNudge:!0}),(0,r.create
// Translators: %d is the current requests balance.
// Translators: %d is the current requests balance.
(0,s.sprintf)(__("Requests available: <counter>%d</counter>","jetpack"),o),{counter:o<n?(0,r.createElement)("span",{className:"ai-assistant-featured-image__usage-counter-no-limit"}):(0,r.createElement)("strong",null)});return(0,r.createElement)("div",{className:"ai-assistant-featured-image__usage-counter"},(0,r.createElement)("span",null,i),(0,r.createElement)("span",null,l))}},90096:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});varr=n(82170),a=n(85985),s=n(56427),o=n(47143),i=n(43656),l=n(86087),c=n(27723),u=n(10067),d=n.n(u),p=n(61297),m=n(58164),h=n(9847),g=n(99991),f=n(76047),b=n(2561),v=n(96051),k=n(16615),y=n(22465);const__=c.__,w=d()("jetpack-ai:featured-image");functionE({busy:e,disabled:t,placement:n,onClose:u=()=>{}}){const[d,E]=(0,l.useState)(n===y.hB),_=(0,k.A)(),C=(0,h.A)(),{postTitle:A,postFeaturedMediaId:x,isEditorPanelOpened:j}=(0,o.useSelect)((e=>({postTitle:e(i.store).getEditedPostAttribute("title"),postFeaturedMediaId:e(i.store).getEditedPostAttribute("featured_media"),isEditorPanelOpened:e(i.store).isEditorPanelOpened??e("core/edit-post").isEditorPanelOpened})),[]),{saveToMediaLibrary:S}=(0,g.A)(),{tracks:N}=(0,a.st)(),{recordEvent:R}=N,[P,L]=(0,l.useState)(null),[T,M]=(0,l.useState)(""),{enableComplementaryArea:B}=(0,o.useDispatch)("core/interface"),{clearSelectedBlock:I}=(0,o.useDispatch)("core/block-editor"),{toggleEditorPanelOpened:D}=(0,o.useDispatch)("core/edit-post"),{editPost:F,toggleEditorPanelOpened:z}=(0,o.useDispatch)(i.store),{requireUpgrade:O,requestsCount:H,requestsLimit:U,currentTier:V,costs:q}=(0,p.A)(),G=(0,m.Bd)(V),$=q?.[y.oW]?.activeModel??10,W=$===q?.[y.oW]?.stableDiffusion?y.Dk:y.bb,Z=G===m.Ti,J=U-H<$,K=z??D,{pointer:Y,current:Q,setCurrent:X,processImageGeneration:ee,handlePreviousImage:te,handleNextImage:ne,currentImage:re,currentPointer:ae,images:se,imageStyles:oe,guessStyle:ie}=(0,v.A)({autoStart:!1,cost:$,type:"featured-image-generation",feature:y.oW,previousMediaId:x}),le=(0,l.useCallback)((()=>{E(!1),u?.()}),[u]),ce=(0,l.useCallback)((()=>{E(!0)}),[]),ue=(0,l.useCallback)((e=>ie(e,"featured-image-guess-style",A+"\n\n"+C)),[C,A,ie]),de=(0,l.useCallback)((({userPrompt:e,style:t})=>(R("jetpack_ai_featured_image_generation_generate_image",{placement:n,model:W,site_type:_,style:t,userPrompt:e}),E(!0),ee({userPrompt:e,postContent:A+"\n\n"+C,notEnoughRequests:J,style:t}).catch((e=>{R("jetpack_ai_featured_image_generation_error",{placement:n,error:e?.message,model:W,site_type:_,style:t})})))),[R,n,W,_,ee,C,J,A]),pe=(0,l.useCallback)((async()=>{ae.generating=!0;conste=awaitue("");L(e);constt=awaitde({userPrompt:"",style:e});t&&(w("handleFirstGenerate",t.revisedPrompt),M(t.revisedPrompt||""))}),[ae,de,ue]),me=(0,l.useCallback)((({userPrompt:e,style:t})=>{R("jetpack_ai_featured_image_generation_generate_another_image",{placement:n,model:W,site_type:_,style:t}),X((()=>se.length)),ee({userPrompt:e,postContent:A+"\n\n"+C,notEnoughRequests:J,style:t}).catch((r=>{R("jetpack_ai_featured_image_generation_error",{placement:n,error:r?.message,model:W,site_type:_,style:t,userPrompt:e})}))}),[R,n,W,_,X,ee,A,C,J,se]),he=(0,l.useCallback)((({userPrompt:e,style:t})=>{R("jetpack_ai_featured_image_generation_try_again",{placement:n,model:W,site_type:_,style:t}),ee({userPrompt:e,postContent:A+"\n\n"+C,notEnoughRequests:J,style:t}).catch((e=>{R("jetpack_ai_featured_image_generation_error",{placement:n,error:e?.message,model:W,site_type:_,style:t})}))}),[R,n,W,_,ee,C,J,A]),ge=(0,l.useCallback)((()=>(I(),B("core/edit-post","edit-post/document"))),[I,B]),fe=(0,l.useCallback)((()=>{R("jetpack_ai_featured_image_generation_use_image",{placement:n,model:W,site_type:_});conste=e=>{F({featured_media:e}),le(),setTimeout((()=>{conste=j("featured-image"),t=j("post-status");ge().then((()=>{e||K("featured-image"),t||K("post-status")}))}),500)};re?.libraryId?e(re?.libraryId):S(re?.image).then((t=>{e(t?.id)})).catch((e=>{R("jetpack_ai_featured_image_saving_error",{placement:n,error:e?.message,model:W,site_type:_})}))}),[R,n,W,_,re?.libraryId,re?.image,F,le,j,ge,K,S]),be=__("Generate another image","jetpack"),ve=__
// Translators: %d is the cost of generating a featured image.
__("Featured image generation costs %d requests per image. You don't have enough requests to generate another image.","jetpack"),$):null,Ce=(0,r.createElement)(s.Button,{onClick:fe,variant:"primary",disabled:!re?.image||re?.generating||re?.libraryId===x},__("Set as featured image","jetpack"));return(0,r.createElement)(r.Fragment,null,(n===f.s6||n===f.wb)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"jetpack-ai-assistant__help-text"},__("Based on your post content.","jetpack")),(0,r.createElement)(s.Button,{onClick:ce,isBusy:e,disabled:t||J,variant:"secondary",__next40pxDefaultSize:!0},__("Generate image","jetpack"))),(0,r.createElement)(b.A,{postContent:ke,autoStart:ke&&!x,autoStartAction:pe,images:se,currentIndex:Q,title:__("Generate a featured image with AI","jetpack"),cost:$,open:d,placement:n,onClose:le,onTryAgain:he,onGenerate:Y?.current>0||x?me:de,generating:ae?.generating,notEnoughRequests:J,requireUpgrade:O,upgradeDescription:_e,currentLimit:U,currentUsage:H,isUnlimited:Z,hasError:Boolean(ae?.error),handlePreviousImage:te,handleNextImage:ne,acceptButton:Ce,generateButtonLabel:Y?.current>0?be:ve,instructionsPlaceholder:__("Describe the featured image you'd like to create and select a style.","jetpack"),imageStyles:oe,onGuessStyle:ue,prompt:T,setPrompt:M,initialStyle:P,inputDisabled:we,actionDisabled:Ee}))}},83729:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});varr=n(82170),a=n(85985),s=n(56427),o=n(86087),i=n(27723),l=n(10067),c=n.n(l),u=n(61297),d=n(58164),p=n(9847),m=n(99991),h=n(2561),g=n(96051),f=n(16615),b=n(22465);const__=i.__,v=c()("jetpack-ai:general-purpose-image");functionk({placement:e,onClose:t=()=>{},onSetImage:n=()=>{}}){const[l,c]=(0,o.useState)(!0),k=(0,f.A)(),y=(0,p.A)(),{saveToMediaLibrary:w}=(0,m.A)(),{tracks:E}=(0,a.st)(),{recordEvent:_}=E,[C,A]=(0,o.useState)(""),{requireUpgrade:x,requestsCount:j,requestsLimit:S,currentTier:N,costs:R}=(0,u.A)(),P=(0,d.Bd)(N),L=R?.[b.yP]?.activeModel??10,T=L===R?.[b.yP]?.stableDiffusion?b.Dk:b.bb,M=P===d.Ti,B=S-j<L,{current:I,setCurrent:D,processImageGeneration:F,handlePreviousImage:z,handleNextImage:O,currentImage:H,currentPointer:U,images:V,pointer:q,imageStyles:G,guessStyle:$}=(0,g.A)({cost:L,autoStart:!1,type:"general-image-generation",feature:b.yP}),W=C.length>=3,Z=B||U?.generating||x,J=Z||!W,K=(0,o.useCallback)((()=>{c(!1),t?.()}),[t]),Y=(0,o.useCallback)((async({userPrompt:t,style:n})=>{v("handleGenerate",t,n),_("jetpack_ai_general_image_generation_generate_image",{placement:e,model:T,site_type:k,style:n}),F({userPrompt:t,postContent:y,notEnoughRequests:B,style:n}).catch((t=>{_("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:k,style:n})}))}),[_,e,T,k,F,y,B]),Q=(0,o.useCallback)((({userPrompt:t,style:n})=>{v("handleRegenerate",t),_("jetpack_ai_general_image_generation_generate_another_image",{placement:e,model:T,site_type:k,style:n}),D((e=>e+1)),F({userPrompt:t,postContent:y,notEnoughRequests:B,style:n}).catch((t=>{_("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:k})}))}),[_,e,T,k,F,y,B,D]),X=(0,o.useCallback)((({userPrompt:t,style:n})=>{v("handleTryAgain",t),_("jetpack_ai_general_image_generation_try_again",{placement:e,model:T,site_type:k,style:n}),F({userPrompt:t,postContent:y,notEnoughRequests:B,style:n}).catch((t=>{_("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:k})}))}),[_,e,T,k,F,y,B]),ee=(0,o.useCallback)((()=>{_("jetpack_ai_general_image_generation_use_image",{placement:e,model:T,site_type:k});constt=e=>{n?.({id:e.id,url:e.url}),K()};H?.libraryId?t({id:H?.libraryId,url:H?.libraryUrl}):w(H?.image).then((e=>{t(e)}))}),[_,e,T,k,H?.libraryId,H?.libraryUrl,H?.image,n,K,w]),te=__("Generate another image","jetpack"),ne=__("Generate","jetpack"),re=B?(0,i.sprintf)(
// Translators: %d is the cost of generating a featured image.
__("Image generation costs %d requests per image. You don't have enough requests to generate another image.","jetpack"),L):null,ae=(0,r.createElement)(s.Button,{onClick:ee,variant:"primary",disabled:!H?.image||H?.generating},__("Insert image","jetpack"));return(0,r.createElement)(h.A,{postContent:!0,images:V,currentIndex:I,title:__("Generate an image with AI","jetpack"),cost:L,open:l,placement:e,onClose:K,onTryAgain:X,onGenerate:q?.current>0?Q:Y,generating:U?.generating,notEnoughRequests:B,requireUpgrade:x,upgradeDescription:re,currentLimit:S,currentUsage:j,isUnlimited:M,hasError:Boolean(U?.error),handlePreviousImage:z,handleNextImage:O,acceptButton:ae,generateButtonLabel:q?.current>0?te:ne,instructionsPlaceholder:__("Describe the image you'd like to create and select a style.","jetpack"),imageStyles:G,onGuessStyle:$,prompt:C,setPrompt:A,inputDisabled:Z,actionDisabled:J})}},96051:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});varr=n(96865),a=n(47143),s=n(86087),o=n(27723),i=n(93832),l=n(61297),c=n(99991),u=n(22465);const__=o.__;functiond({feature:e,type:t,cost:n,autoStart:o=!0,previousMediaId:d}){const{generateImageWithParameters:p}=(0,r.Kf)(),{increaseRequestsCount:m,featuresControl:h}=(0,l.A)(),{saveToMediaLibrary:g}=(0,c.A)(),{createNotice:f}=(0,a.useDispatch)("core/notices"),b=(0,s.useRef)(0),[v,k]=(0,s.useState)(0),[y,w]=(0,s.useState)([{generating:o}]),E=e===u.oW?"featured-image":"image",_=h?.[E],C=_?.styles,A=(0,s.useCallback)(((e,t)=>{w((n=>{constr=[...n];returnr[t]={...r[t],...e},r}))}),[]),x=(0,a.useSelect)((e=>e("core")?.getMedia?.(d)),[d]);(0,s.useEffect)((()=>{x&&A({image:x.source_url,libraryId:x.id,libraryUrl:x.source_url,generating:!1},b.current)}),[x,A]);constj=(0,s.useCallback)((e=>{f("success",e,{type:"snackbar",isDismissible:!0})}),[f]),S=(0,s.useCallback)((()=>{m(n)}),[m,n]),N=(0,s.useCallback)((e=>{if(!e)return"image.png";constt=e.split(" ").slice(0,10).join(" ");return(0,i.cleanForSlug)(t)+".png"}),[]),R=(0,s.useCallback)((({userPrompt:n,postContent:r,notEnoughRequests:a,style:s=null})=>newPromise(((o,i)=>{if(d&&0===b.current&&b.current++,A({generating:!0,error:null},b.current),a)returnA({generating:!1,error:newError(__("You don't have enough requests to generate another image.","jetpack"))},b.current),voido({});constl=p({feature:e,size:"1792x1024",responseFormat:"b64_json",messages:[{role:"jetpack-ai",context:{type:t,request:n||null,content:r,style:s}}],style:s||""}),c=N(n);l.then((e=>{if(e.data.length>0){constt="data:image/png;base64,"+e.data[0].b64_json,r=n||null,a=e.data[0].revised_prompt||null;A({image:t,prompt:r,revisedPrompt:a},b.current),S(),g(t,c).then((e=>{j(__("Image saved to media library.","jetpack")),A({libraryId:e?.id,libraryUrl:e?.url,generating:!1},b.current),b.current+=1,o({image:t,libraryId:e?.id,libraryUrl:e?.url,revisedPrompt:a})})).catch((()=>{A({generating:!1},b.current),b.current+=1,o({image:t})}))}})).catch((e=>{A({generating:!1,error:e},b.current),i(e)}))}))),[A,p,e,t,S,g,j,N,d]),P=(0,s.useCallback)((()=>{k(Math.max(v-1,0))}),[v]),L=(0,s.useCallback)((()=>{k(Math.min(v+1,y.length-1))}),[v,y.length]),T=(0,s.useCallback)((asyncfunction(e,t="",n=""){if(!C||!C.length)returnnull;consta=[{role:"jetpack-ai",context:{type:t||"general-image-guess-style",request:e,content:n}}];try{conste=await(0,r.R0)(a,{feature:"jetpack-ai-image-generator"});if(!e)returnnull;constt=C.find((({value:t})=>t===e));returnt?t.value:null}catch(e){Promise.reject(e)}}),[C]);return{current:v,setCurrent:k,processImageGeneration:R,handlePreviousImage:P,handleNextImage:L,currentImage:y[v],currentPointer:y[b.current],images:y,pointer:b,imageStyles:C,guessStyle:T}}},16615:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(85985),a=n(86087);functions(){const[e]=(0,a.useState)((0,r.d9)()?"atomic":(0,r.Sy)()?"simple":"jetpack");returne}},46536:(e,t,n)=>{"use strict";n.d(t,{OE:()=>a.A,dY:()=>s.dY,hB:()=>s.hB,m2:()=>r.A});varr=n(90096),a=n(83729),s=n(22465)},22465:(e,t,n)=>{"use strict";n.d(t,{Dk:()=>s,bb:()=>o,dY:()=>l,hB:()=>i,oW:()=>r,yP:()=>a});constr="featured-post-image",a="general-image",s="stable
(0,s.sprintf)(__("Got it! You're targeting <b>%s</b>. ✨✅","jetpack"),t),{b:(0,r.createElement)("b",null)});returnd({content:n}),l(!0),e}),[d,e,p]);return{id:"keywords",title:__("Optimise for SEO","jetpack"),label:__("Keywords","jetpack"),messages:c,type:"input",placeholder:__("Photography, plants","jetpack"),onSubmit:m,completed:n,setCompleted:l,value:e,setValue:t}}},30125:(e,t,n)=>{"use strict";n.d(t,{l:()=>c});varr=n(82170),a=n(47143),s=n(86087),o=n(27723),i=n(23967),l=n(59096);const__=o.__,c=()=>{const[e,t]=(0,s.useState)(),[n,o]=(0,s.useState)([]),{messages:c,setMessages:u,addMessage:d,removeLastMessage:p,editLastMessage:m,setSelectedMessage:h}=(0,l.ot)(),{editPost:g}=(0,a.useDispatch)("core/editor"),[f,b]=(0,s.useState)(!1),v=(0,s.useCallback)((e=>{t(e.content),h(e)}),[h]),k=(0,s.useCallback)((async()=>(d({content:(0,r.createElement)(i.A,null)}),awaitg({meta:{advanced_seo_description:e}}),p(),d({content:__("Meta description updated! ✅","jetpack")}),b(!0),e)),[e,d,g,p]),y=(0,s.useCallback)((async({fromSkip:e})=>{constt=e?{content:(0,s.createInterpolateElement)(__("Skipped!<br />Now, let's optimize your meta description.","jetpack"),{br:(0,r.createElement)("br",null)}),showIcon:!0}:{content:__("Now, let's optimize your meta description.","jetpack"),showIcon:!0};leta=[...n];u([t]),0===a.length&&(d({content:(0,r.createElement)(i.A,null)}),a=awaitnewPromise((e=>setTimeout((()=>e([{id:"meta-1",content:"Explore breathtaking flower and plant photography in our Flora Guide, featuring tips and inspiration for gardening and plant enthusiasts to enhance their outdoor spaces."}])),3e3))),p()),o(a);constl=e?(0,s.createInterpolateElement)(__("Skipped!<br />Now, let's optimize your meta description.<br />Here's a suggestion:","jetpack"),{br:(0,r.createElement)("br",null)}):(0,s.createInterpolateElement)(__("Now, let's optimize your meta description.<br />Here's a suggestion:","jetpack"),{br:(0,r.createElement)("br",null)});m(l),a.forEach((e=>d({...e,type:"option",isUser:!0})))}),[n,d,p,u,m]),w=(0,s.useCallback)((async()=>{o([]),u([{content:__("Now, let's optimize your meta description.","jetpack"),showIcon:!0}]),d({content:(0,r.createElement)(i.A,null)});conste=awaitnewPromise((e=>setTimeout((()=>e([{id:"meta-1"+Math.random(),content:"Explore breathtaking flower and plant photography in our Flora Guide, featuring tips and inspiration for gardening and plant enthusiasts to enhance their outdoor spaces."}])),3e3)));p();constt=(0,s.createInterpolateElement)(__("Now, let's optimize your meta description.<br />Here's a suggestion:","jetpack"),{br:(0,r.createElement)("br",null)});m(t),o(e),e.forEach((e=>d({...e,type:"option",isUser:!0})))}),[d,p,m,u]);return{id:"meta",title:__("Add meta description","jetpack"),messages:c,type:"options",options:n,onSelect:v,onSubmit:k,submitCtaLabel:__("Insert","jetpack"),onRetry:w,retryCtaLabel:__("Regenerate","jetpack"),onStart:y,value:e,setValue:t,completed:f,setCompleted:b}}},79399:(e,t,n)=>{"use strict";n.d(t,{c:()=>c});varr=n(82170),a=n(47143),s=n(86087),o=n(27723),i=n(23967),l=n(59096);const__=o.__,c=()=>{const[e,t]=(0,s.useState)(""),[n,o]=(0,s.useState)([]),{editPost:c}=(0,a.useDispatch)("core/editor"),{messages:u,setMessages:d,addMessage:p,removeLastMessage:m,editLastMessage:h,setSelectedMessage:g}=(0,l.ot)(),[f,b]=(0,s.useState)(!1),[v,k]=(0,s.useState)(),y=(0,s.useCallback)((e=>{t(e.content),g(e)}),[g]),w=(0,s.useCallback)((async({fromSkip:e,stepValue:t})=>{consta=t!==v;if(!a)return;k(t);constl=e?{content:(0,s.createInterpolateElement)(__("Skipped!<br />Let's optimise your title first.","jetpack"),{br:(0,r.createElement)("br",null)}),showIcon:!0}:{content:__("Let's optimise your title first.","jetpack"),showIcon:!0};d([l]);letc,u=[...n];(0===u.length||a)&&(p({content:(0,r.createElement)(i.A,null)}),u=awaitnewPromise((e=>setTimeout((()=>e([{id:"1",content:"A Photo Gallery for Gardening Enthusiasths: Flora Guide"},{id:"2",content:"Flora Guide: Beautiful Photos of Flowers and Plants for Gardening Enthusiasts"}])),3e3))),m()),c=e?(0,s.createInterpolateElement)(__("Skippe
__("Requests will reset to <strong>%1$d</strong> on %2$s.","jetpack"),l,d),{strong:(0,r.createElement)("strong",null)}));constb=n/l,v=(0,r.createElement)(r.Fragment,null,t===c.Ti&&(0,r.createElement)("p",null,__("Unlimited requests.","jetpack")),(t===c._X||t===c.ds)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"jetpack-ai-usage-panel__available-requests"},f),(0,r.createElement)(u,{usage:b}))),k=(0,r.createElement)(a.A,{height:100,className:"jetpack-ai-usage-panel__loading-placeholder"}),y=(0,r.createElement)(r.Fragment,null,!p&&g.length?g.join(" ").concat(" "):null,!p&&h);return(0,r.createElement)(s.BaseControl,{__nextHasNoMarginBottom:!0,help:y},(0,r.createElement)(s.BaseControl.VisualLabel,null,__("Available Requests","jetpack")),!p&&v,p&&k)}},27970:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});varr=n(82170),a=n(3924),s=n(85985),o=n(56427),i=n(38443),l=n(86087),c=n(27723),u=(n(51609),n(92169)),d=n(61297),p=n(75956),m=n(7503),h=n(10617),g=n(58164),f=n(93471);const__=c.__,b=e=>e?(0,i.gmdateI18n)("F j",e):null,v=(e,t)=>e===g._X?__("Upgrade","jetpack"):t?(0,c.sprintf)(
__("Get %1$d requests","jetpack"),t):__("Get more requests","jetpack"),k=()=>{conste=(0,a.A)("jetpack-ai-tiers-more-requests-contact"),{autosaveAndRedirect:t,isRedirecting:n}=(0,h.A)(e);return{contactUsURL:e,autosaveAndRedirectContactUs:t,isRedirectingContactUs:n}};functiony({isOverLimit:e,requestsCount:t,requestsLimit:n,nextStart:a,planType:s,loading:i,canUpgrade:l,showContactUsCallToAction:c,nextLimit:u,contactUsURL:d,handleContactUsClick:p,checkoutUrl:m,handleUpgradeClick:h}){constk=v(s,u),y=b(a);return(0,r.createElement)("div",{className:"jetpack-ai-usage-panel"},(0,r.createElement)(r.Fragment,null,(0,r.createElement)(f.A,{isOverLimit:e,requestsCount:t,requestsLimit:n,nextResetDate:y,planType:s,loading:i}),!i&&(s===g._X||s===g.ds)&&l&&(0,r.createElement)("div",{className:"jetpack-ai-usage-panel-upgrade-button"},c&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Need more requests?","jetpack")),(0,r.createElement)(o.Button,{target:"_blank",variant:"primary",label:__("Contact us for more requests","jetpack"),href:d,onClick:p},__("Contact Us","jetpack"))),!c&&(0,r.createElement)(o.Button,{target:"_blank",variant:"primary",label:__("Upgrade your Jetpack AI plan","jetpack"),href:m,onClick:h},k))))}functionw({placement:e=null}){const{checkoutUrl:t}=(0,u.A)(),{contactUsURL:n}=k(),{tracks:a}=(0,p.A)(),o=(0,m.C)(),{requestsCount:i,requestsLimit:c,isOverLimit:h,usagePeriod:f,currentTier:b,nextTier:v,loading:w}=(0,d.A)(),E=(0,g.Bd)(b),_=(0,l.useCallback)((()=>{a.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:i,...e?{placement:e}:{}})}),[a,b,i,e]),C=(0,l.useCallback)((()=>{a.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:i,...e?{placement:e}:{}})}),[a,b,i,e]),A=((0,s.Sy)()||(0,s.d9)())&&E===g.ds&&!v;return(0,r.createElement)(y,{isOverLimit:h,requestsCount:i,requestsLimit:c,nextStart:f?.nextStart,nextLimit:v?.limit,planType:E,loading:w,canUpgrade:o,showContactUsCallToAction:A,contactUsURL:n,handleContactUsClick:C,checkoutUrl:t,handleUpgradeClick:_})}},56199:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});constr="block_settings_sidebar"},88797:(e,t,n)=>{"use strict";varr=n(85985),a=n(23806);(0,r.vp)(a.U,a.W)},9847:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(96865),a=n(74997),s=n(47143);consto=()=>{conste=(0,s.useSelect)((e=>e("core/block-editor").getBlocks()),[]);returne?.length?(0,r.rh)({content:(0,a.serialize)(e)}):""}},99991:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});varr=n(63162),a=n(47143),s=n(86087),o=n(10067);consti=n.n(o)()("jetpack-ai-assistant-plugin:save-to-media-library");functionl(){const[e,t]=(0,s.useState)(!1),{getSettings:n}=(0,a.useSelect)((e=>e("core/block-editor")),[]);return{isLoading:e,saveToMediaLibrary:(e,a=null)=>{consts=n();returnnewPromise(((n,o)=>{t(!0),i("Fetching image from URL"),fetch(e).then((e=>{i("Transforming response to blob"),e.blob().then((e=>{i("Uploading blob to media library");constl=[];a?l.push(newFile([e],a)):l.push(e),s.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,r.isBlobURL)(e?.url)||(e&&(i("Image uploaded to media library",e),n(e)),t(!1))},onError(e){i("Error uploading image to media library:",e),o(e),t(!1)}})})).catch((e=>{i("Error transforming response to blob:",e?.message),o(e?.message),t(!1)}))})).catch((e=>{i("Error fetching image from URL:",e?.message),o(e?.message),t(!1)}))}))}}}},23806:(e,t,n)=>{"use strict";n.d(t,{U:()=>a,W:()=>s});varr=n(23162);consta="ai-assistant-plugin",s={render:r.A}},1176:(e,t,n)=>{"use strict";n.d(t,{N:()=>d});varr=n(82170),a=n(96865),s=n(56427),o=n(27723),i=n(51609),l=n.n(i),c=n(2162),u=n(62402);const__=o.__;functiond({minWords:e=10,maxWords:t=100,disabled:n,words:o,onWordsNumberChange:i,language:d,onLanguageChange:p,tone:m,onToneChange:h}){const[g,f]=l().useState(!1);constb=d?.split(" ")[0],v=a.so[b]?.label||__("Language","jetpack"),k=a.oZ[m]?.label||__("Tone","jetpack");return(0,r.createElement)("div",{className:"jetpack-ai-generate-excerpt-control"},(0,r.createElement)(s.BaseControl,{className:"jetpack-ai-generate-excer
_n("%1$s word","%1$s words",I,"jetpack"),I),F="requesting"===P||"suggesting"===P||"done"===P&&!y,z="requesting"===P||"suggesting"===P,O=z||"done"===P;const{requireUpgrade:H,isOverLimit:U}=(0,m.A)(),V=(0,s.d9)()||(0,s.Sy)()?__("https://wordpress.com/support/excerpts/","jetpack"):__("https://jetpack.com/support/create-better-post-excerpts-with-ai/","jetpack");return(0,r.createElement)("div",{className:"jetpack-ai-post-excerpt"},(0,r.createElement)(o.TextareaControl,{__nextHasNoMarginBottom:!0,label:__("Write an excerpt (optional)","jetpack"),onChange:e=>h({excerpt:e}),help:I?D:null,value:B,disabled:O}),(0,r.createElement)(o.ExternalLink,{href:V},__("Learn more about manual excerpts","jetpack")),(0,r.createElement)("div",{className:"jetpack-generated-excerpt__ai-container"},L?.code&&"error_quota_exceeded"!==L.code&&(0,r.createElement)(o.Notice,{status:L.severity,isDismissible:!1,className:"jetpack-ai-assistant__error"},L.message),U&&(0,r.createElement)(p.A,{placement:"excerpt-panel"}),(0,r.createElement)(g.N,{words:v,onWordsNumberChange:e=>{k(e),w(!0)},language:E,onLanguageChange:e=>{_(e),w(!0)},tone:C,onToneChange:e=>{A(e),w(!0)},model:x,onModelChange:e=>{j(e),w(!0)},disabled:z||H}),(0,r.createElement)(o.BaseControl,{help:M?.length?null:__("Add content to generate an excerpt.","jetpack"),__nextHasNoMarginBottom:!0},(0,r.createElement)("div",{className:"jetpack-generated-excerpt__generate-buttons-container"},(0,r.createElement)(o.Button,{onClick:function(){h({excerpt:e}),n.recordEvent("jetpack_ai_assistant_block_discard",{feature:"jetpack-ai-content-lens"}),T()},variant:"secondary",isDestructive:!0,disabled:"done"!==P||H},__("Discard","jetpack")),(0,r.createElement)(o.Button,{onClick:function(){h({excerpt:R}),n.recordEvent("jetpack_ai_assistant_block_accept",{feature:"jetpack-ai-content-lens"}),T()},variant:"secondary",disabled:"done"!==P||H},__("Accept","jetpack")),(0,r.createElement)(o.Button,{onClick:function(){w(!1),T();conste=[{role:"jetpack-ai",context:{type:"ai-content-lens",contentType:"post-excerpt",postId:t,words:v,language:E,tone:C,content:`Post content:\n${M}\n`}}];f(),S(e,{feature:"jetpack-ai-content-lens",model:x}),n.recordEvent("jetpack_ai_assistant_block_generate",{feature:"jetpack-ai-content-lens"})},variant:"secondary",isBusy:z,disabled:F||H||!M},__("Generate","jetpack"))))))}constb=()=>{if((0,i.useSelect)((e=>{const{getCurrentPostType:t}=e(l.store),n=t();return"wp_template"===n||"wp_template_part"===n||"wp_block"===n}),[]))returnnull;return(0,r.createElement)(l.PostTypeSupportCheck,{supportKeys:"excerpt"},(0,r.createElement)((e=>{constt=l.PluginDocumentSettingPanel;return(0,r.createElement)(t,e)}),{className:(0,h.m)("ai-content-lens")?"is-beta-extension inset-shadow":"",name:"ai-content-lens-plugin",title:__("Excerpt","jetpack")},(0,r.createElement)(f,null)))}},33792:(e,t,n)=>{"use strict";n.d(t,{$:()=>s,s:()=>a});varr=n(33251);consta="ai-content-lens",s={render:r.g}},31009:(e,t,n)=>{"use strict";n.d(t,{m:()=>l});varr=n(82170),a=n(3924),s=n(85985),o=n(56427),i=n(27723);const__=i.__,l=({changeStatus:e,isLoading:t,isModuleActive:n})=>{const{tracks:i}=(0,s.st)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the Likes feature to allow others to like your posts.","jetpack")),(0,r.createElement)(o.Button,{disabled:n||t,isBusy:t,onClick:()=>(i.recordEvent("jetpack_editor_likes_enable"),e(!0)),variant:"secondary"},t?__("Activating Likes","jetpack"):__("Activate Likes","jetpack",0)),(0,r.createElement)("div",{className:"components-likes-placeholder__learn-more"},(0,r.createElement)(o.ExternalLink,{href:(0,a.A)("jetpack-support-likes")},__("Learn more about Jetpack Likes.","jetpack"))))}},79013:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});varr=n(82170),a=n(50723),s=n(11876),o=n(56427);consti=()=>(0,r.createElement)(a.Ay,null,(0,r.createElement)(o.Placeholder,null,(0,r.createElement)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.A,{width:"100%",height:30})),(0,r.createElement)(o.FlexItem
__("To re-share a post, you need to upgrade to the %s plan","jetpack"),_)),(0,r.createElement)(o.Button,{href:b?null:g,onClick:f,target:"_top",icon:u.A,className:(0,d.A)("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!g}),isBusy:b},b?__("Redirecting…","jetpack"):j)):(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("strong",null,A),(0,r.createElement)("br",null),(0,c.sprintf)(/* translators: placeholder is the product name of the plan. */
__("This feature is for sites with a %s plan.","jetpack"),_),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:x},__("More information.","jetpack")))}},9357:(e,t,n)=>{"use strict";varr=n(85985),a=n(19822);(0,r.vp)(a.U,a.W)},19822:(e,t,n)=>{"use strict";n.d(t,{U:()=>p,W:()=>m});varr=n(82170),a=n(7162),s=n(85985),o=n(43656),i=n(90062),l=n(96042),c=n(77398),u=n(44529),d=n(59185);constp="publicize",m={render:()=>{const{isLoadingModules:e,isModuleActive:t}=(0,s.q7)(p),n=(0,a.usePostCanUseSig)();letm=null,h=null;returne?m=(0,r.createElement)(c.A,null):t?(m=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PublicizePanel,null,(0,r.createElement)(u.A,null)),n&&(0,r.createElement)(a.SocialImageGeneratorPanel,null)),h=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.A,null),(0,r.createElement)(a.PostPublishPanels,null),(0,r.createElement)(a.GlobalModals,null))):m=(0,r.createElement)(l.n,null),(0,r.createElement)(o.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(i.A,null,m),h)}}},59185:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(7162),s=n(85985),o=n(14309),i=n(27723),l=n(44529);const__=i.__,c=()=>{(0,a.useSyncPostDataToStore)();const{hasEnabledConnections:e}=(0,a.useSocialMediaConnections)(),t=(0,a.usePostCanUseSig)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:e,id:"publicize-title",title:(0,r.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack")),icon:(0,r.createElement)(s.jt,null)},(0,r.createElement)(a.PublicizePanel,{prePublish:!0},(0,r.createElement)(l.A,null))),t&&(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:!0,title:__("Social Image Generator","jetpack"),icon:(0,r.createElement)(s.jt,null)},(0,r.createElement)(a.SocialImageGeneratorPanel,{prePublish:!0})))}},76262:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});varr=n(82170),a=n(3924),s=n(85985),o=n(56427),i=n(27723);const__=i.__,l=({changeStatus:e,isLoading:t,isModuleActive:n})=>{const{tracks:i}=(0,s.st)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the SEO feature and start optimizing your posts for search engines.","jetpack")),(0,r.createElement)(o.Button,{disabled:n||t,isBusy:t,onClick:()=>(i.recordEvent("jetpack_editor_seo_enable"),e(!0)),variant:"secondary"},t?__("Activating Jetpack SEO","jetpack"):__("Activate Jetpack SEO","jetpack",0)),(0,r.createElement)("div",{className:"components-seo-placeholder__learn-more"},(0,r.createElement)(o.ExternalLink,{href:(0,a.A)("jetpack-support-seo-tools")},__("Learn more about Jetpack SEO.","jetpack"))))}},51626:(e,t,n)=>{"use strict";n.d(t,{G:()=>i});varr=n(82170),a=n(50723),s=n(11876),o=n(56427);consti=()=>(0,r.createElement)(a.Ay,null,(0,r.createElement)(o.Placeholder,null,(0,r.createElement)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.A,{width:"100%",height:30})),(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.A,{width:"100%",height:90})),(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.A,{width:"100%",height:30})))))},24294:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});varr=n(82170),a=n(85985),s=n(56427),o=n(47143),i=n(27723),l=n(53512),c=n(13022),u=n(86183);const__=i.__,d=({requiredPlan:e})=>{const[t,n,d,p]=(0,u.A)(e),{tracks:m}=(0,a.st)(),h=p?.product_name||__("paid","jetpack"),g=__("Upgrade now","jetpack"),f="https://wordpress.com/support/seo-tools/",b=__("Learn more about the SEO feature.","jetpack"),v=(0,o.useDispatch)("automattic/help-center"),k=v?.setShowHelpCenter,y=v?.setShowSupportDoc;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",null,(0,i.sprintf)(/* translators: placeholder is the product name of the plan. */
__("To use the SEO feature you need to upgrade to the %s plan","jetpack"),h)),(0,r.createElement)("div",{className:"components-seo-upsell__learn-more"},k?(0,r.createElement)(s.Button,{onClick:()=>{k(!0),y(f)},className:"components-seo-upsell__learn-more-link",variant:"link"},b):(0,r.createElement)(s.ExternalLink,{href:f},b)),(0,r.createElement)(s.Button,{href:d?null:t,onClick:e=>{e.preventDefault(),m.recordEvent("jetpack_seo_tools_upsell_click"),n(e)},target:"_top",icon:l.A,className:(0,c.A)("components-seo-upsell__button is-primary",{"jetpack-upgrade-plan__hidden":!t}),isBusy:d},d?__("Redirecting…","jetpack"):g))}},99463:(e,t,n)=>{"use strict";n.d(t,{P:()=>l});varr=n(96072),a=n.n(r),s=n(82170),o=n(56427),i=n(27723);n(51609);const__=i.__,_n=i._n,l=({suggestedLimit:e,value:t,label:n,...r})=>{constl=!e||t.length<=e?(0,i.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */
__("It’s recommended to use less than %1$d characters in this field. (%2$d used)","jetpack"),e,t.length);return(0,s.createElement)("div",{className:"jetpack-seo-message-box"},(0,s.createElement)(o.TextareaControl,a()({__nextHasNoMarginBottom:!0,label:n,help:l,value:t},r)))}},92411:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(86087),s=n(27723),o=n(99463),i=n(53189);const__=s.__;classlextendsa.Component{onMessageChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(o.P,{value:e,onChange:this.onMessageChange,label:__("SEO Description","jetpack"),placeholder:__("Write a description…","jetpack"),suggestedLimit:156,rows:4})}}constc=(0,i.m)("advanced_seo_description")(l)},44921:(e,t,n)=>{"use strict";varr=n(85985),a=n(37802);(0,r.vp)(a.U,a.W)},37802:(e,t,n)=>{"use strict";n.d(t,{U:()=>_,W:()=>x});varr=n(96072),a=n.n(r),s=n(82170),o=n(85985),i=n(56427),l=n(3582),c=n(47143),u=n(14309),d=n(43656),p=n(86087),m=n(27723),h=n(67858),g=n(90062),f=n(43162),b=n(76262),v=n(51626),k=n(24294),y=n(92411),w=n(5664),E=n(80151);const__=m.__,_="seo",C=!0===(0,o.FB)("ai-seo-assistant")?.available,A=()=>{const{isLoadingModules:e,isChangingStatus:t,isModuleActive:n,changeStatus:r}=(0,o.q7)("seo-tools"),m=(0,c.useSelect)((e=>{constt=e(d.store).getCurrentPostType(),n=e(l.store).getPostType(t);returnn?.viewable}),[]);if(!m)returnnull;const_=(0,o.tu)("advanced-seo"),A=(0,o.d9)()||(0,o.Sy)(),x={title:__("SEO","jetpack")};if(A&&!1!==_)return(0,s.createElement)(p.Fragment,null,(0,s.createElement)(g.A,null,(0,s.createElement)(i.PanelBody,a()({className:"jetpack-seo-panel"},x,{initialOpen:!1}),(0,s.createElement)(k.A,{requiredPlan:_}))));if(!n)return(0,s.createElement)(p.Fragment,null,(0,s.createElement)(g.A,null,(0,s.createElement)(i.PanelBody,a()({className:"jetpack-seo-panel"},x,{initialOpen:!1}),e?(0,s.createElement)(v.G,null):(0,s.createElement)(b.l,{changeStatus:r,isModuleActive:n,isLoading:t}))));constj={icon:(0,s.createElement)(o.jt,null),title:__("SEO","jetpack")};return(0,s.createElement)(p.Fragment,null,(0,s.createElement)(g.A,null,(0,s.createElement)(i.PanelBody,a()({className:"jetpack-seo-panel"},x),C&&m&&(0,s.createElement)(i.PanelRow,{className:"jetpack-ai-sidebar__feature-section "+((0,h.m)("ai-seo-assistant")?"is-beta-extension":"")},(0,s.createElement)(f.A,{disabled:!1})),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(E.A,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(y.A,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(w.A,null)))),(0,s.createElement)(u.PluginPrePublishPanel,j,(0,s.createElement)(p.Fragment,null,(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(E.A,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(y.A,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(w.A,null)))))},x={render:()=>(0,s.createElement)(A,null)}},5664:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});varr=n(82170),a=n(56427),s=n(27723),o=(n(51609),n(53189));const__=s.__,i=(0,o.m)("jetpack_seo_noindex")((({metaValue:e,updateMetaValue:t})=>(0,r.createElement)(a.ToggleControl,{label:__("Hide page from search engines","jetpack"),help:__("If selected, a 'noindex' tag will help instruct search engines to not include this page in search results. This page will also be removed from the Jetpack sitemap.","jetpack"),checked:!!e,onChange:e=>{t(e)},__nextHasNoMarginBottom:!0})))},80151:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});varr=n(82170),a=n(86087),s=n(27723),o=(n(51609),n(99463)),i=n(53189);const__=s.__;classlextendsa.Component{onTitleChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(o.P,{value:e,onChange:this.onTitleChange,label:__("SEO Title","jetpack"),placeholder:__("Write a title…","jetpack"),suggestedLimit:70,rows:2})}}constc=(0,i.m)("jetpack_seo_html_title")(l)},53189:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});varr=n(29491),a=n(47143),s=n(66087);consto=e=>(0,r.compose)([(0,a.withSelect)((t=>({metaValue:(0,s.get)(t("core/editor").getEditedPostAttribute("me
__("%1$s / %2$s","jetpack"),s,n)}functionv({onClose:e,product:t}){const{selectedProductIds:n,setSelectedProductIds:a}=(0,h.B)(),{id:s,title:i}=t,l=n&&n.includes(s),u=l?c.A:void0,d=t?" "+b(t):null;return(0,r.createElement)(o.MenuItem,{icon:u,onClick:t=>{t.preventDefault();constr=l?n.filter((e=>e!==s)):[...n,s];a(r),e()},selected:l,value:s},i," : ",d)}functionk({onClose:e}){const{clientId:t,productType:n}=(0,h.B)(),a=(0,i.useSelect)((e=>e(p.M).getSiteSlug())),s=(0,g.A)(t);if(m.Wd===(0,m.AU)())return(0,r.createElement)(o.MenuItem,null,a&&(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${a}#add-new-payment-plan`},(0,f.W)("add a new product",n)));return(0,r.createElement)(o.MenuItem,{onClick:t=>{t.preventDefault(),s(),setTimeout((()=>{conste=document.getElementById("new-product-title");null!==e&&e.focus()}),100),e()}},(0,f.W)("add a new product",n))}functiony(){const{products:e,productType:t,selectedProductIds:n}=(0,h.B)(),{selectedProducts:a}=(0,i.useSelect)((e=>{const{getSelectedProducts:t}=e(p.M);return{selectedProducts:t(n)}}));letl=null,c=u.A;returna.length>1?l=__("Multiple products selected","jetpack"):1===a.length&&(l=b(a[0])),a.length!=a.length&&(l=(0,f.W)("product not found",t),c=d.A),(0,r.createElement)(s.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(o.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:c,label:(0,f.W)("select a product",t),text:l},(({onClose:t})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.MenuGroup,null,e.map((e=>(0,r.createElement)(v,{key:e.id,onClose:t,product:e})))),(0,r.createElement)(o.MenuGroup,null,(0,r.createElement)(k,{onClose:t}))))))}},21212:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});varr=n(94715),a=n(47143),s=n(14309),o=n(59340);functioni(e){constt=(0,o.AU)(),{selectBlock:n}=(0,a.useDispatch)(r.store),{enableComplementaryArea:i}=(0,a.useDispatch)("core/interface"),{closePublishSidebar:l}=(0,a.useDispatch)(s.store);return()=>{switch(e&&n(e),t){caseo.O3:returni("core/edit-site","edit-site/block-inspector");caseo.RZ:returni("core/edit-widgets","edit-widgets/block-inspector");default:l(),i("core/edit-post","edit-post/block")}}}},1990:(e,t,n)=>{"use strict";n.d(t,{G:()=>l,W:()=>o});varr=n(27723),a=n(29726);const__=r.__,s={"add a new product":{[a._$]:__("Add a new payment plan","jetpack"),[a.h5]:__("Add a new subscription","jetpack")},"product not found":{[a._$]:__("Payment plan not found","jetpack"),[a.h5]:__("Subscription not found","jetpack")},"select a product":{[a._$]:__("Select a payment plan","jetpack"),[a.h5]:__("Select a subscription","jetpack")},"default new product title":{[a._$]:__("Monthly Subscription","jetpack"),[a.h5]:__("Monthly Subscription","jetpack")},"manage your products":{[a._$]:__("Manage your payment plans.","jetpack"),[a.h5]:__("Manage your subscriptions.","jetpack")},"saving product":{[a._$]:__("Saving payment plan…","jetpack"),[a.h5]:__("Saving subscription…","jetpack")},"add product":{[a._$]:__("Add payment plan","jetpack"),[a.h5]:__("Add subscription","jetpack")},"product requires a name":{[a._$]:__("Payment plan requires a name","jetpack"),[a.h5]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[a._$]:__("Payment plan requires a valid price","jetpack"),[a.h5]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[a._$]:__("Successfully created payment plan","jetpack"),[a.h5]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[a._$]:__("There was an error when adding the payment plan.","jetpack"),[a.h5]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[a._$]:__("Invalid payment plan configured for this block.","jetpack"),[a.h5]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[a._$]:__("Thebuttonwillbehiddenfromyourvisitorsuntilyouselectavalidpaym
_n("This post will be sent to everyone subscribed to %1$s (%2$s subscriber).","This post will be sent to everyone subscribed to %1$s (%2$s subscribers).",r,"jetpack"),a,s):(0,c.sprintf)(
_n("This post was sent to everyone subscribed to %1$s (%2$s subscriber).","This post was sent to everyone subscribed to %1$s (%2$s subscribers).",r,"jetpack"),a,s)};constg=function({accessLevel:e,prePublish:t=!1}){constn=(0,o.useSelect)((e=>e("core/block-editor").getBlocks().some((e=>e.name===u.name)))),{isScheduledPost:g,postCategories:f,postMeta:b}=(0,o.useSelect)((e=>{const{isCurrentPostScheduled:t,getEditedPostAttribute:n}=e(i.store);return{isScheduledPost:t(),postCategories:n("categories"),postMeta:n("meta")}})),{emailSubscribersCount:v,hasFinishedLoading:k,newsletterCategories:y,newsletterCategoriesEnabled:w,newsletterCategorySubscriberCount:E,paidSubscribersCount:_}=(0,o.useSelect)((e=>{const{getNewsletterCategories:t,getNewsletterCategoriesEnabled:n,getNewsletterCategoriesSubscriptionsCount:r,getSubscriberCounts:a,hasFinishedResolution:s}=e(m.M),{emailSubscribers:o,paidSubscribers:i}=a();return{hasFinishedLoading:[s("getSubscriberCounts"),s("getNewsletterCategories"),s("getNewsletterCategoriesSubscriptionsCount")].every(Boolean),emailSubscribersCount:o,newsletterCategories:t(),newsletterCategoriesEnabled:n(),newsletterCategorySubscriberCount:r(),paidSubscribersCount:i}}));if(!k)return(0,r.createElement)(s.Animate,{type:"loading"},(({className:e})=>(0,r.createElement)("p",{className:`jetpack-subscribe-affirmation-loading ${e}`},__("Loading…","jetpack"))));constC=e===d.P2.paid_subscribers.key,A=t||g,x=(0,p.Yc)({accessLevel:e,emailSubscribers:v,paidSubscribers:_,postHasPaywallBlock:n});letj;returnj=b?.[d.KG]?__("Not sent via email.","jetpack"):(0,a.lk)()?__("Your site is in Coming Soon mode. Emails are sent only when your site is public.","jetpack"):w&&y.length>0&&!C?h({futureTense:A,isPaidPost:C,newsletterCategories:y,postCategories:f,reachCount:E}):(({futureTense:e,isPaidPost:t,postHasPaywallBlock:n,reachCount:r})=>{consta=r.toLocaleString();returne?t&&!n?(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post will be sent to <strong>%s paid subscriber</strong>.","This post will be sent to <strong>%s paid subscribers</strong>.",r,"jetpack"),a):(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post will be sent to <strong>%s subscriber</strong>.","This post will be sent to <strong>%s subscribers</strong>.",r,"jetpack"),a):t&&!n?(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post was sent to <strong>%s paid subscriber</strong>.","This post was sent to <strong>%s paid subscribers</strong>.",r,"jetpack"),a):t&&!n?(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post was sent to <strong>%s paid subscriber</strong> only.","This post was sent to <strong>%s paid subscribers</strong> only.",r,"jetpack"),a):(0,c.sprintf)(/* translators: %s is the number of subscribers */
_n("This post was sent to <strong>%s subscriber</strong>.","This post was sent to <strong>%s subscribers</strong>.",r,"jetpack"),a)})({futureTense:A,isPaidPost:C,postHasPaywallBlock:n,reachCount:x}),(0,r.createElement)("p",null,(0,l.createInterpolateElement)(j,{strong:(0,r.createElement)("strong",null)}))}},64234:(e,t,n)=>{"use strict";n.d(t,{$E:()=>d,Ay:()=>p,Qu:()=>l,fI:()=>c,mf:()=>u});varr=n(82170),a=n(56427),s=n(86087),o=n(27723),i=n(37906);const_x=o._x,__=o.__,l=e=>{constt="https://wordpress.com/earn/payments/"+location.hostname;returne?t:t+"#add-tier-plan"},c=(e,t)=>"public"!==e&&t!==i.P2.everybody.key,u=()=>(0,r.createElement)(a.Notice,{status:"warning",isDismissible:!1,className:"edit-post-post-misconfiguration__warning"},(0,s.createInterpolateElement)(__("You’ll need to change the post’s access to Everybody or visibility to Public.<br/><br/>Subscribers aren’t able to view private or password-protected posts.","jetpack"),{br:(0,r.createElement)("br",null)})),d=e=>e?_x("Manage plans","unused context to distinguish translations","jetpack"):__("Set up a paid plan","jetpack");functionp({context:e="other",hasTierPlans:t}){constn=d(t);return"toolbar"===e?(0,r.createElement)(a.ToolbarButton,{href:l(t),target:"_blank"},n):(0,r.createElement)(a.Button,{variant:"primary",href:l(t),target:"_blank"},n)}},14435:(e,t,n)=>{"use strict";varr=n(85985),a=n(1455),s=n.n(a),o=n(47143),i=n(27723);n(692);const__=i.__;functionl(){conste=(0,r.GE)();returnwindow?.location&&e?(0,r.Sy)()||(0,r.d9)()?`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(newURLSearchParams(window.location.search).get("plan_upgraded")){lete=null;e:try{if((0,r.Sy)())breake;constt=awaits()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}finally{constt=l();(0,o.dispatch)("core/notices").createNotice("success",e?(0,i.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:l(),label:__("View my plan","jetpack")}]}})}}}})()},79366:(e,t,n)=>{"object"==typeofwindow&&window.Jetpack_Block_Assets_Base_Url&&(n.p=window.Jetpack_Block_Assets_Base_Url)},94375:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,M:()=>l});varr=n(85985),a=n(74997),s=n(52619);consto="jetpack/";functioni(e,t,n=[],i=!0){constl="string"==typeofe?e:e.name,c=l.startsWith(o),u=c?l.slice(o.length):l,{available:d,details:p,unavailableReason:m}=(0,r.FB)(u),h=(0,r.aq)(m,p),g=i||c?o:"";if(!d&&!h)return!1;constf=g+u,b=(0,a.registerBlockType)("object"==typeofe?e:f,t);returnh&&(0,s.addFilter)("editor.BlockListBlock",`${f}-with-has-warning-is-interactive-class-names`,(0,r.BT)(f)),n.forEach((e=>(0,a.registerBlockType)(g+e.name,e.settings))),b}functionl(e,t,n,a){returni(e,{...t,icon:(0,r.Cq)(e),attributes:e.attributes||{}},n,a)}},62289:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(5573);consts=(e,t=24,n=24,s="0 0 24 24")=>(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:s},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)},64882:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(82170),a=n(94715);consts=(e,t,n,s,o)=>{const{isSelected:i}=t,l=t.attributes[e];return(0,r.createElement)("div",{className:i?`jetpack-${e}-block is-selected`:`jetpack-${e}-block`},!i&&""!==l&&s(t),(i||""===l)&&(0,r.createElement)(a.PlainText,{value:l,placeholder:n,"aria-label":n,onChange:o}))}},21929:(e,t,n)=>{"use strict";varr=n(47143),a=n(27723);n(692);const__=a.__;if("undefined"!=typeofwindow&&window.location){conste=newURLSearchParams(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:()=>o});varr=n(1455),a=n.n(r),s=n(66087);functiono(e,t=s.noop){returnt(!0),newPromise(((n,r)=>{a()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((a=>{t(!1);consts=a.status?parseInt(a.status,10):null;s&&s>=400?r():n(a.url||e)}),(()=>{t(!1),r()}))}))}},10617:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(47143),a=n(86087),s=n(66087);functiono(e,t=s.noop){const[n,o]=(0,a.useState)(!1),{isAutosaveablePost:i,isDirtyPost:l,currentPost:c}=(0,r.useSelect)((e=>{constt=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,m=(0,r.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),h=asynce=>{e.preventDefault(),u?l&&i&&awaitp(e):await(async()=>{for(lete=0;e<m.length;e++)await(0,r.dispatch)("core").saveEditedEntityRecord(m[e].kind,m[e].name,m[e].key)})()};return{autosave:h,autosaveAndRedirect:asyncr=>{r.preventDefault(),n||(o(!0),h(r).then((()=>{!function(e,t,n=!1){t&&t(e),n?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)})))},isRedirecting:n}}},26247:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(39384),a=n(85985);consts=()=>{const{isUserConnected:e}=(0,r.useConnection)();return(0,a.Sy)()||e}},58164:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>o,Ti:()=>s,_X:()=>r,ds:()=>a});constr="free",a="tiered",s="unlimited",o=e=>e?0===e?.value?r:1===e?.value?s:a:null},71960:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});varr=n(86087);consta=e=>{e&&cancelAnimationFrame(e.id)},s=(e,t=0)=>{constn=(0,r.useRef)(),s=(0,r.useRef)(e);s.current=e,(0,r.useEffect)((()=>(n.current=((e,t=0)=>{constn=t<0?0:t,r={id:0};leta=Date.now();consts=()=>{constt=Date.now();t-a>=n&&(a=t,e()),r.id=requestAnimationFrame(s)};returnr.id=requestAn
__("Minimum allowed price is %s.","jetpack"),(0,r.Ay)(k,b)),h),voida(!1);if(!(0,c.kF)(b,v))return(0,d.S)((0,l.W)("product requires a valid price",t),h),voida(!1);try{constr=awaits()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),o={id:r.id,title:r.title,interval:r.interval,price:r.price,currency:r.currency},c=h.select(u.EF).getProducts();i(p(c.concat([o]))),n([o.id]),m&&(0,d.L)((0,l.W)("successfully created product",t),h),a(!0)}catch{(0,d.S)((0,l.W)("there was an error when adding the product",t),h),a(!1)}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e}),k=e=>({type:"SET_NEWSLETTER_CATEGORIES",newsletterCategories:e}),y=e=>({type:"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT",newsletterCategoriesSubscriptionsCount:e})},3696:(e,t,n)=>{"use strict";n.d(t,{EF:()=>r,JA:()=>s,an:()=>a,gI:()=>o,ky:()=>i});constr="jetpack/membership-products",a=0,s=1,o=2,i="tier"},16521:(e,t,n)=>{"use strict";n.d(t,{M:()=>c});varr=n(47143),a=n(66314),s=n(3696),o=n(91497),i=n(18410),l=n(92955);constc=(0,r.createReduxStore)(s.EF,{actions:a,reducer:o.A,resolvers:i,selectors:l,__experimentalUseThunks:!0});(0,r.register)(c)},91497:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});constr={products:[],apiState:n(3696).an,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{socialFollowers:null,emailSubscribers:null,paidSubscribers:null},newsletterCategories:{enabled:!1,categories:[]}};functiona(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_NEWSLETTER_CATEGORIES":return{...e,newsletterCategories:t.newsletterCategories};case"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT":return{...e,newsletterCategoriesSubscriptionsCount:t.newsletterCategoriesSubscriptionsCount}}returne}},18410:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fetchNewsletterCategoriesSubscriptionsCount:()=>k,getNewsletterCategories:()=>C,getNewsletterCategoriesSubscriptionsCount:()=>A,getNewsletterTierProducts:()=>w,getProducts:()=>E,getSubscriberCounts:()=>_});varr=n(1455),a=n.n(r),s=n(43656),o=n(93832),i=n(29726),l=n(1990),c=n(56539),u=n(27574),d=n(66314),p=n(3696),m=n(34884);consth="membership-products-resolver-getProducts",g="membership-products-resolver-getSubscriberCounts",f="membership-products-resolver-getNewsletterCategories",b="membership-products-resolver-getNewsletterCategoriesSubscriptionsCount";letv=!1;constk=asynce=>{constt=awaita()({path:`/wpcom/v2/newsletter-categories/count?term_ids=${e.join(",")}`,method:"GET"});if(!t||"object"!=typeoft)thrownewError("Unexpected API response");constn=t?.errors&&Object.values(t.errors)?.[0]?.[0];if(n)thrownewError(n);returnt},y=(e,t,n)=>{if(e.length>0)return;constr=n.getProductsNoResolver()[0]?.id;r&&t([r])},w=(e=i._$,t=[],n=()=>{})=>E(e,t,n,!1),E=(e=i._$,t=[],n=()=>{},r=!0)=>async({dispatch:i,registry:g,select:f})=>{if(awaitc.A.blockExecution(h),v)returnvoidy(t,n,f);constb=c.A.acquire(h);try{constc=await(async()=>{conste=(0,o.getQueryArg)(window.location.href,"origin"),t=(0,o.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),n=awaita()({path:t,method:"GET"});if(!n&&"object"!=typeofn)thrownewError("Unexpected API response");constr=n?.errors&&Object.values(n.errors)?.[0]?.[0];if(r)thrownewError(r);returnn})();((e,t,n)=>{constr=t.select(s.store).getCurrentPostId();n((0,d.setConnectUrl)((0,u.A)(r,e.connect_url))),n((0,d.setSiteSlug)(e.site_slug)),n((0,d.setProducts)(e.products)),n((0,d.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),n((0,d.setApiState)(e.connected_account_id?p.JA:p.gI))})(c,g,i),(e=>!e.products.length&&e.connected_account_id)(c)&&await(async(e
// translators: refers to a social post on Bluesky
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Bluesky:","jetpack")}),(0,r.jsx)(i.O,{...a})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section bluesky-preview__section",children:[(0,r.jsx)(s.w,{level:e,children:
// translators: refers to a link to a Bluesky post
__("Link preview","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what it will look like when someone shares the link to your WordPress post on Bluesky.","jetpack")}),(0,r.jsx)(o.c,{...a})]})]})},46140:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>r,_I:()=>a,q8:()=>s});constr="article",a="landscape",s="portrait"},5954:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(10790),a=n(31280),s=n(57466);consto=({text:e,url:t,forceUrlDisplay:n})=>{leto;return(n||(0,a.ti)(e,"a"))&&(o=(0,r.jsx)("a",{className:"facebook-preview__custom-text-post-url",href:t,rel:"nofollow noopener noreferrer",target:"_blank",children:t})),(0,r.jsxs)("p",{className:"facebook-preview__custom-text",children:[(0,r.jsx)("span",{children:(0,a.x5)(e,{platform:"facebook",maxChars:s.zl})}),o]})}},57466:(e,t,n)=>{"use strict";n.d(t,{B2:()=>i,GA:()=>s,t2:()=>o,zl:()=>a});varr=n(31280);consta=440,s=e=>e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,""),o=e=>(0,r.RA)((0,r.f5)(110),(0,r.ZT)(110))((0,r.$J)(e))||"",i=e=>(0,r.RA)((0,r.f5)(200),(0,r.ZT)(200))((0,r.$J)(e))||""},72691:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(27723),a=n(51609),s=n(46140);const__=r.__,o=({mode:e})=>{const[t,n]=(0,a.useState)(e),[r,o]=(0,a.useState)(!0),i=(0,a.useCallback)((({target:e})=>{if(!t){constt=e;n(t.naturalWidth>t.naturalHeight?s._I:s.q8)}o(!1)}),[t]),l=(0,a.useCallback)((()=>o(!1)),[]);return[t,r,{alt:__("Facebook Preview Thumbnail","jetpack"),onLoad:i,onError:l}]}},57181:(e,t,n)=>{"use strict";n.d(t,{D:()=>c});varr=n(10790),a=n(46140),s=n(5954),o=n(72691),i=n(72870),l=n(77114);constc=({url:e,customImage:t,user:n,customText:c,imageMode:u})=>{const[d,p,m]=(0,o.A)({mode:u}),h="is-"+(d===a.q8?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(l.A,{user:void0}),(0,r.jsx)("div",{className:"facebook-preview__content",children:(0,r.jsxs)("div",{className:`facebook-preview__window ${h}${t&&p?"is-loading":""}`,children:[(0,r.jsx)("div",{className:`facebook-preview__custom-image ${h}`,children:(0,r.jsx)("img",{src:t,...m})}),(0,r.jsx)(l.A,{user:n,timeElapsed:!0,hideOptions:!0}),c&&(0,r.jsx)(s.A,{text:c,url:e,forceUrlDisplay:!0})]})}),(0,r.jsx)(i.A,{})]})}},73066:(e,t,n)=>{"use strict";n.d(t,{l:()=>p});varr=n(10790),a=n(27723),s=n(46140),o=n(5954),i=n(57466),l=n(72691),c=n(72870),u=n(77114),d=n(29659);n(81500);const__=a.__,p=({url:e,title:t,description:n,image:a,user:p,customText:m,type:h,imageMode:g,compactDescription:f})=>{const[b,v,k]=(0,l.A)({mode:g}),y=h===s.Kq,w="is-"+(y&&!a||b===s.q8?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(u.A,{user:p}),(0,r.jsxs)("div",{className:"facebook-preview__content",children:[m&&(0,r.jsx)(o.A,{text:m,url:e}),(0,r.jsxs)("div",{className:`facebook-preview__body ${w}${a&&v?"is-loading":""}`,children:[(a||y)&&(0,r.jsx)("div",{className:`facebook-preview__image ${a?"":"is-empty"}${w}`,children:a&&(0,r.jsx)("img",{src:a,...k})}),(0,r.jsx)("div",{className:"facebook-preview__text",children:(0,r.jsxs)("div",{className:"facebook-preview__text-wrapper",children:[(0,r.jsx)("div",{className:"facebook-preview__url",children:(0,i.GA)(e)}),(0,r.jsx)("div",{className:"facebook-preview__title",children:(0,i.t2)(t)||(0,i.GA)(e)}),(0,r.jsxs)("div",{className:"facebook-preview__description "+(f?"is-compact":""),children:[n&&(0,i.B2)(n),y&&!n&&
__("Visit the post for more.","jetpack")]}),(0,r.jsx)("div",{className:"facebook-preview__info",children:(0,r.jsx)(d.A,{name:"info"})})]})})]})]}),(0,r.jsx)(c.A,{})]})}},73188:(e,t,n)=>{"use strict";n.d(t,{h:()=>c});varr=n(10790),a=n(46140),s=n(5954),o=n(72691),i=n(72870),l=n(77114);n(81500);constc=({url:e,user:t,customText:n,media:c,imageMode:u})=>{const[d]=(0,o.A)({mode:u}),p="is-"+(d===a.q8?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(l.A,{user:t}),(0,r.jsxs)("div",{className:"facebook-preview__content",children:[n&&(0,r.jsx)(s.A,{text:n,url:e,forceUrlDisplay:!0}),(0,r.jsx)("div",{className:"facebook-preview__body",children:c?(0,r.jsx)("div",{className:`facebook-preview__media ${p}`,children:c.map(((e,t)=>(0,r.jsx)("div",{className:`facebook-preview__media-item ${p}`,children:e.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,children:(0,r.jsx)("source",{src:e.url,type:e.type})}):(0,r.jsx)("img",{alt:e.alt||"",src:e.url})},`facebook-preview__media-item-${t}`)))}):null})]}),(0,r.jsx)(i.A,{})]})}},72870:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(10790),a=n(27723),s=n(29659);n(87748);const__=a.__,o=()=>(0,r.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like",
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Facebook:","jetpack")}),c?(0,r.jsx)(l.h,{...a}):(0,r.jsx)(o.l,{...a})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,r.jsx)(s.A,{level:e,children:
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on LinkedIn:","jetpack")}),(0,r.jsx)(i.$,{...a})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,r.jsx)(s.A,{level:e,children:
__("Link preview","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what it will look like when someone shares the link to your WordPress post on LinkedIn.","jetpack")}),(0,r.jsx)(o.X,{...a,name:"",profileImage:""})]})]})},50121:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,w:()=>r});constr="mastodon.social",a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAWlBMVEXZ4ejW3+fQ2eTN1+LL1eHI0+DG0d7U3ebY4Oi7ydm0w9a2xNe5x9i+y9vS2+XDz93BzduwwNWputKjts+rvNOmudGtvtSgtM2OpMKHn72Bmbl8lbacsMuVq8fmVh92AAAKsklEQVR4AezBMQEAAAQAMKB/ZSWc2wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnmT17O5xVx8ItqJAFIZLUcIhqXV1/zudeZnObYCr+G2gwy91pOz7TrRKU0W0+vXLS9n/+uWb+mMIafCadV6Khi5PCemdxWtGCkXVCinGOy4KTVno0HZy8FFmfH1aRIfPmD7UWcPha3YQ+liJLrpx4pceMLFTR2sMFl9zUlFVtPBYw0a19xQOmPkzE/a3DtJiDdNRNRppsdoQttc2C39rHoeWNms9VrOyqSQHtvGB1mt6N/Fak+nK5EhJ7vQ6kkHROsLyRpNZnVsNSO6SRDjs0usVrePCeyyxoe9piV2coOtSA/b69kMOlneb/bdJgsFeXtFFdThC0hdax4fMpsn+PJKOLikiyfultZaTAq9EGRwzaLoc5XCUbekjjecs5qg/642kyMU9QWuRQU/v9RPnsgj6QI8MbEuXIiyyiPRGGDmn91OiI7Kw4iZz/sabSy9nzmsSb3p4vFP/tPdAkSKN5fy8pqQxwP2KCOSUrkr74BJGlbdHIugSAlCkSORCJrGiR73LriyKFPFcTp+1R2IDnU4bZOc1acslRfrBIDuj6WwRBfgGXJbRekAB8laDnkxcmpNI7jPsjUMJM5c3ogjX0JlidT2SB3C7oxXqu1fliwQ6j6+xR7KgBH+zRX/w84w323WD/EZ+pvFWTyRU34NnlNDeaEFmfq4JBQx0ClX1oBcddkVnkMhu4aTmGenpDA7ZcVL1jJibTPrEZ1j+Z+cMciWFYSAaIj6kFYABk77/UWc18m42X928Cn5XKLnsisGdhMNJ37A+Z1pTD451mKNuWksPM9Zpd/HuYc4a9QvkkyUypm/zRzkSfv7dd5dvIW+7E/0mMqALBFAiQ/ouGV0ggNE3i/f0Zvdyqnf1qY8CcdSj4QooEHQXWaWHrMPuR/x9saJDOiCu1/RVCrxAAHFd+SXrNAKHchDZAHsp+OS76ebCwxgoJ8PcnWN5Ww9BDEILQTylc9p6CNLMAaT1EMQwNF1Btp4cyxHeqi+AGQvtWYvsSt1AnLofXI89pUJHd0E1o3+YAgy+s+rfU8269KyX7Ke9hqLp/pAw99RCHOFfdlZsCgEIssqe9buMxaF7XK5UaCwEPMFX3X8Mm7G4hO+dDBU5ZAHm3jrrngIy63Du3XWvLR5GQ7BAnCkEYV3MGiouhgDm3joIn7S+OhTkJ93IEoKwLsVmWC4EJMMsfba3GY1LcuR1hiUEIVyJdXIIgjAsZw9BCIbllCUE+cdSkiNpWobjlDUsZwpB/M0EwSsE8UhIYK4hiD/yEhhDEL8wjmAPQfbkOGqBvekL4hEdRX56DskJxvRsQaZEo7yeLMirJBxbfa4gdUtAfm4QBLKgGhORsj51Y7iWhGR+6k59S0j+Y1q/EOQvNWeR6DwMA2E/LIXJfP9j/lhWrFdH3sy3D1nVjJQq1nrMQH62HmzMhOdQdi5LG+u8984aPcoJxvp/Z4vc2fArLFF72HMLaP0NG0YZ0fkbTICxW0JCVywg2vhHJFlyC+4ZF8cE4O+wxC/ikyvo/DNue0SiJ9j1s83ywVFsX/9pBZ219hIbt1W2DDlbMiIzuqMTqhIBCReZCmc7FkXkcvTZzKNlMm6AHGvg+CzQqgf3/BsOdrtqReJB8Xz+kTLB9+iEStyqa/d/BVd+5nZkYLMtcle4scAnCOFT3Bna2wqSiMQxl/9rH55ibhNn67ETRD44t6QkxiTipDcJVqRZuC6B+AlC+ZI1IjqlTdrRQPFwB4X1y6AniHxHgfWayOmkG4T8CsulUydIqt7TXkHQSQISGKuw2Smi2bPRFBnwm3TpG605uUyUkO0ikZyND/2E/xZLpFm0zNKsLNncQstxBxgarV66zyW+Zi0rAbFsT2EyA+LShk+uBatYPB+CMsuw/bjNdHXDZlQkZ4OdHeV5E7l6ZExCGxPGHKLhFC5ELfD0NwVDDTp4Msn3ucTvDQfUkZMvhUMDut1JDzxrwlNhbghUruhFHr0G/RThWyHRQJrIVEKx8DVrgrSQSmHxhWgi2DUWz9sJz0Rm8OkfnhavNZzKWDr+yNyEZyGnnYLjG85EyicI6pfSM5piVW8KkE8wzeqLDTfg/08FVmN1CpQDUrO+oHyhI6CpgGz9dQNpFCy7CsTWMyy92ilg3g4oLvJdv6hXbwqa3+zdC3qqMBAF4BMISeSRjAyw/6Xevm6tmipGA1Tn34BfOUxOArVVM37OnbZYu0V2gK1m3D2dwh/nQn1REz6W5MDrsp+lF5q/8ps/d9DNhQW5Ul+T1K88IF+cvjAmjQb+PqBo67hdiW+BVzRaHJRdHdcWeBIq1BHB46eB10M44qmOCA7Po9zVx1pjcczwagaFE9Y0TzkeB0639UGrHc7seS0a51y1O+o6PB1X0GcmnfGIKXglNeK8+cykDSWelLLe4lc1r2L0+J31VuFFORp5DS2ihKeGVzCQQozQRAMvbuyoRIwIRN3IS2uJDESEpTcNL6ymNwrinKZ309IF8q6EOOMCfRgXLpB3BuKMp0+7hQvkg4U4pelLvXCByJoVF+i/iReyp/8MxImCvnU9L2KiA4tjwtBBNy60wTrQOCIU/dRyfj0dcRA/aTrSLLXhJan1uEDH6uXykFqPKOjUfrE8pNYjDJ2ZOJ9xR2cqfBOeIqZl5kNGJMJQzLBoHjIi8QHJn0jfUZxFlAzIwZQ9DxmRiIJouUSGjn5lIQ4vQuL22Z5fRRi8EZouqTM9340qIWDpsoYfp6YrlOThDF2xG/lBWrrGSCCarur6TMfziFJ2WDN0U6btVYSXI+EMgfherad5rBT6VcGiGPg+BWygOYLCy5p5iYwCoFq+i8LsRKysVxdVCh90z+l6vFFGErmgoFm0wxfb3/slKVeRNHvc7GtT4KC7/3vo5ey74MX4lPW84GThxg82Fq9EVWk3as+p9O2fraTNTwSPEw2n8jgoZLd1zIXUW5Q40YiD2bstIwPyg/E4V3GiPY55I4f2m/a7oUBMwYl2OFUGCWT2A5NQOkRZTlThjNMkb0e+VFemw+EXihN5RKgrU6LxKpy+3h1x6Z0eV5hLeci50JQWlyhO0+BXVgc5GcZLNWgLIEsgFS7x55mYAq8kch2q0uI6y0lGhcucLQ19M9riVVlflLoqrcMsZcY/9+N8qXVZeuswl6g4SYE8BHGKGpmIllOUyERMnGBCLoJTGGQiSk4wOGyJdHqFXETNt9sjF6HGTW2xRODbNchGDHyz0SMXYfh2hFyE6uVMuCmdNPqmaL7dDrmIYuSbTQqZiKKX1yBbUo0b2mEJ28prqQ1RNHKCQUE8nqqakVOMBcQjOVuarpk4VQXxQF3P9wkQj9TwfTqIh6qf6f/gSSCtg3is+nnykEB2EA+3f5L9lQQyVtgQCWQosCESSK2QhZg4wRiwIRLI5LEdEshIDtmIgW9Ue2yHBDJpZCV6vkEfHDZDAulJITfRSxzbMv7BxUoCGbYUhwQyGQexFL5s3HcFtkE
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Mastodon:","jetpack")}),(0,r.jsx)(i._,{...a})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,r.jsx)(s.w,{level:e,children:
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Nextdoor:","jetpack")}),(0,r.jsx)(i.K,{...a})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section nextdoor-preview__section",children:[(0,r.jsx)(s.A,{level:e,children:
// translators: refers to a social post on Threads
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Threads:","jetpack")}),a.map(((e,t)=>{constn=t+1===a.length;return(0,r.jsx)(i.s,{...e,showThreadConnector:!n},`threads-preview__post-${t}`)}))]}),t?null:(0,r.jsxs)("section",{className:"social-preview__section threads-preview__section",children:[(0,r.jsx)(s.A,{level:e,children:
// translators: refers to a link to a Threads post
__("Link preview","jetpack")}),a[0].image?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what it will look like when someone shares the link to your WordPress post on Threads.","jetpack")}),(0,r.jsx)(o.G,{...a[0],name:"",profileImage:""})]}):(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("Threads link preview requires an image to be set for the post. Please add an image to see the preview.","jetpack")})]})]}):null},83390:(e,t,n)=>{"use strict";n.d(t,{B:()=>o});varr=n(10790),a=n(27723),s=n(70718);const__=a.__,o=({profileImage:e,showThreadConnector:t})=>(0,r.jsxs)("div",{className:"threads-preview__sidebar",children:[(0,r.jsx)("div",{className:"threads-preview__profile-image",children:e?(0,r.jsx)("img",{alt:__("Threads profile image","jetpack"),src:e}):(0,r.jsx)(s.f,{})}),t&&(0,r.jsx)("div",{className:"threads-preview__connector"})]})},47956:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,f:()=>s});varr=n(31280);consta=e=>(0,r.RA)((0,r.f5)(1e3),(0,r.ZT)(1e3))((0,r.$J)(e))||"",s=e=>(0,r.RA)((0,r.f5)(400),(0,r.ZT)(400))((0,r.$J)(e))||""},82484:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});varr=n(10790),a=n(27723),s=n(31280),o=n(47956),i=n(38336),l=n(52340);n(54447);const__=a.__,c=({title:e,description:t,image:n,user:a,url:c})=>{constu=a?.avatarUrl;return(0,r.jsxs)("div",{className:"tumblr-preview__post",children:[u&&(0,r.jsx)("img",{className:"tumblr-preview__avatar",src:u,alt:""}),(0,r.jsxs)("div",{className:"tumblr-preview__card",children:[(0,r.jsx)(l.A,{user:a}),(0,r.jsxs)("div",{className:"tumblr-preview__window",children:[n&&(0,r.jsxs)("div",{className:"tumblr-preview__window-top",children:[(0,r.jsx)("div",{className:"tumblr-preview__overlay",children:(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,o.Z)(e)})}),(0,r.jsx)("img",{className:"tumblr-preview__image",src:n,alt:__("Tumblr preview thumbnail","jetpack")})]}),(0,r.jsxs)("div",{className:"tumblr-preview__window-bottom "+(n?"":"is-full"),children:[!n&&(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,o.Z)(e)}),t&&n&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,o.f)(t)}),c&&(0,r.jsx)("div",{className:"tumblr-preview__site-name",children:(0,s.GA)(c)})]})]}),(0,r.jsx)(i.A,{})]})]})}},95550:(e,t,n)=>{"use strict";n.d(t,{B:()=>l});varr=n(10790),a=n(27723),s=n(47956),o=n(38336),i=n(52340);n(54447);const__=a.__,l=({title:e,description:t,image:n,user:a,url:l,customText:c,media:u})=>{constd=a?.avatarUrl,p=u?.[0];return(0,r.jsxs)("div",{className:"tumblr-preview__post",children:[d&&(0,r.jsx)("img",{className:"tumblr-preview__avatar",src:d,alt:""}),(0,r.jsxs)("div",{className:"tumblr-preview__card",children:[(0,r.jsx)(i.A,{user:a}),(0,r.jsxs)("div",{className:"tumblr-preview__body",children:[(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,s.Z)(e)}),c&&(0,r.jsx)("div",{className:"tumblr-preview__custom-text",children:c}),t&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,s.f)(t)}),p?(0,r.jsx)("div",{className:"tumblr-preview__media-item",children:p.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,className:"tumblr-preview__media--video",children:(0,r.jsx)("source",{src:p.url,type:p.type})}):(0,r.jsx)("img",{className:"tumblr-preview__image",src:p.url,alt:""})}):n&&(0,r.jsx)("img",{className:"tumblr-preview__image",src:n,alt:__("Tumblr preview thumbnail","jetpack")}),(0,r.jsx)("a",{className:"tumblr-preview__url",href:l,target:"_blank",rel:"noreferrer",children:__("View On WordPress","jetpack")})]}),(0,r.jsx)(o.A,{})]})]})}},38336:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});varr=n(10790),a=n(27723),s=n(45949);n(25634);const__=a.__,o=()=>(0,r.jsxs)("div",{className:"tumblr-preview__post-actions",children:[(0,r.jsxs)("div",{className:"tumblr-preview__post-manage-actions",children:[(0,r.jsxs)("div",{className:"tumblr-preview__post-actions-blaze",children:[(0,r.jsx)(s.A,{name:"blaze"}),"Blaze"]}),(0,r.jsx)("ul",{children:[{icon:"delete",
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Tumblr:","jetpack")}),l?(0,r.jsx)(i.B,{...a}):(0,r.jsx)(o.Z,{...a})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section tumblr-preview__section",children:[(0,r.jsx)(s.w,{level:e,children:
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on X:","jetpack")}),a.map(((e,t)=>{constn=t+1===a.length;return(0,r.jsx)(i.O,{...e,showThreadConnector:!n},`twitter-preview__tweet-${t}`)}))]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section twitter-preview__section",children:[(0,r.jsx)(s.A,{level:e,children:
__("Link preview","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what it will look like when someone shares the link to your WordPress post on X.","jetpack")}),(0,r.jsx)(o.E,{...a[0],name:"",profileImage:"",screenName:""})]})]}):null},58024:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});varr=n(10790),a=n(56427);consts=({tweet:e})=>e?(0,r.jsxs)("div",{className:"twitter-preview__quote-tweet",children:[(0,r.jsx)(a.SandBox,{html:`<blockquote class="twitter-tweet" data-conversation="none" data-dnt="true"><a href="${e}"></a></blockquote>`,scripts:["https://platform.twitter.com/widgets.js"],title:"Embedded tweet"}),(0,r.jsx)("div",{className:"twitter-preview__quote-tweet-overlay"})]}):null},940:(e,t,n)=>{"use strict";n.d(t,{B:()=>o});varr=n(10790),a=n(27723),s=n(43204);const__=a.__,o=({profileImage:e,showThreadConnector:t})=>(0,r.jsxs)("div",{className:"twitter-preview__sidebar",children:[(0,r.jsx)("div",{className:"twitter-preview__profile-image",children:e?(0,r.jsx)("img",{alt:__("Twitter profile image","jetpack"),src:e}):(0,r.jsx)(s.f,{})}),t&&(0,r.jsx)("div",{className:"twitter-preview__connector"})]})},16801:(e,t,n)=>{"use strict";n.d(t,{E:()=>s});varr=n(10790),a=n(31280);consts=({text:e,url:t,retainUrl:n})=>{if(!e)returnnull;consts=t&&!n&&e.endsWith(t)?e.substring(0,e.lastIndexOf(t)):e;return(0,r.jsx)("div",{className:"twitter-preview__text",children:(0,a.x5)(s,{platform:"twitter"})})}},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;constn="color: "+this.color;t.splice(1,0,n,"color: inherit");letr=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(a=r))})),t.splice(a,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){lete;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeofprocess&&"env"inprocess&&(e=process.env.DEBUG);returne},t.useColors=function(){if("undefined"!=typeofwindow&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeofnavigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;lete;return"undefined"!=typeofdocument&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeofwindow&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeofnavigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeofnavigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{returnlocalStorage}catch(e){}}(),t.destroy=(()=>{lete=!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{returnJSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},78926:(e,t,n)=>{e