Plugin Directory

Changeset 3381899


Ignore:
Timestamp:
10/21/2025 12:20:34 PM (8 weeks ago)
Author:
neosinner
Message:

Release 5.16.2

Location:
mailpoet/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • mailpoet/trunk/assets/dist/js/settings.js

    r3362479 r3381899  
    1 "use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[472],{19632:(e,t,i)=>{i(22731);var s=i(79124),n=i(50661),a=i(42109),o=i(59437),r=i(89470),l=i(82808),c=i(71328),m=i(79711),d=i(30253),p=i(77542),h=i(28425),u=i(29975),x=i(93554),g=i(42616),j=i(73867),_=i(86106);function b({title:e,description:t,htmlFor:i}){return(0,_.jsxs)("div",{className:"mailpoet-settings-label",children:[(0,_.jsx)("label",{className:"mailpoet-settings-label-title",htmlFor:i,children:e}),t&&(0,_.jsx)("p",{className:"description",children:t})]})}function v({children:e}){return(0,_.jsx)("div",{className:"mailpoet-settings-inputs",children:e})}var f=i(7378),k=i(43318),y=i(85386),w=i(16609),F=i(2726),C=i.n(F);const S=(e,t,i)=>{if("deactivate"!==e){if("reactivate"===e){const e=C()(k.U.I18n.t("re-engagementReactivatedNotice"),/\[link\](.*?)\[\/link\]/g,(e=>(0,_.jsx)("a",{href:"?page=mailpoet-newsletters#/re_engagement",rel:"noopener noreferrer",children:e},"reEngagementEmailsTabLink")));i((0,_.jsx)("p",{children:e}),{scroll:!0})}}else t((0,_.jsx)("p",{children:k.U.I18n.t("re-engagementDisabledNotice")}),{scroll:!0})};function N(){const[e,t]=(0,f.useState)(!1),i=(0,w.d4)("isSaving")(),s=(0,w.d4)("hasErrorFlag")(),a=(0,w.d4)("getSavingError")(),o=(0,w.d4)("hasReEngagementNotice")(),r=(0,w.d4)("getReEngagementAction")(),l=(0,w.y3)("saveSettings"),{notices:c}=(0,f.useContext)(n.F),m=c.error,d=c.success;return(0,f.useEffect)((()=>{e&&!i&&(a?m(a.map((e=>(0,_.jsx)("p",{children:e}))),{scroll:!0}):(d((0,_.jsx)("p",{children:k.U.I18n.t("settingsSaved")}),{scroll:!0}),o&&S(r,m,d)))}),[e,a,i,m,d,o,r]),(0,_.jsx)("div",{className:"mailpoet-settings-save",children:(0,_.jsx)(y.$,{type:"button",automationId:"settings-submit-button",isDisabled:i||s,onClick:()=>{t(!0),l()},children:k.U.I18n.t("saveSettings")})})}var K=i(94010);function I(e){const t=e.segmentsSelector?e.segmentsSelector:"getDefaultSegments",i=(0,w.d4)(t)().map((e=>({value:e.id,label:e.name,count:e.subscribers}))),s=i.filter((t=>e.value.includes(t.value)));return(0,_.jsx)(K.ReactSelect,{isMulti:!0,defaultValue:s,id:e.id,placeholder:e.placeholder,options:i,onChange:t=>{e.setValue((t||[]).map((e=>e.value)))}})}var T=i(36113);function E(e){const t=(0,w.d4)("getPages")();let i=t.find((t=>t.id===parseInt(e.value,10)));return i||(i=t[0]),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row mailpoet-settings-inputs-row-centered",children:[(0,_.jsx)(T.Select,{id:e.id,automationId:e.automationId,value:i.id,onChange:(0,d.k9)(e.setValue),isMinWidth:!0,dimension:"small",children:t.map((e=>(0,_.jsx)("option",{value:e.id,children:`${e.title}`},e.id)))}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)("a",{className:"mailpoet-link",target:"_blank",title:(0,d.t)("previewPage"),rel:"noopener noreferrer",href:i.url[e.preview],"data-automation-id":e.linkAutomationId,children:(0,d.t)("preview")})]})}var M=i(63599),D=i(49429);function A({showModal:e}){const t=(0,w.d4)("isMssActive")(),[i,s]=(0,w.iK)("sender","name"),[n,a]=(0,w.iK)("sender","address"),[o,r]=(0,f.useState)(!0),l=(0,d.Y8)(n),[c,m]=(0,f.useState)(!window.mailpoet_verified_sender_domains.includes(l)),[p,h]=(0,f.useState)(window.mailpoet_partially_verified_sender_domains.includes(l)),[u,x]=(0,w.iK)("reply_to","name"),[g,j]=(0,w.iK)("reply_to","address"),y=(0,w.y3)("setErrorFlag"),F=n&&!(0,d.xf)(n),C=g&&!(0,d.xf)(g);return(0,f.useEffect)((()=>{y(F||C||!o&&t)}),[C,F,y,o,t]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("defaultSenderTitle"),description:(0,d.t)("defaultSenderDescription"),htmlFor:"sender-name"}),(0,_.jsxs)(v,{children:[(0,_.jsx)("label",{htmlFor:"sender-name",children:(0,d.t)("from")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"sender-name",placeholder:(0,d.t)("yourName"),"data-automation-id":"from-name-field",value:i,onChange:(0,d.k9)(s)}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",placeholder:"[email protected]","data-automation-id":"from-email-field",value:n,onChange:(0,d.k9)((0,d.Xv)((e=>{r(!0),m(!1),h(!1),a(e)}))),onBlur:(0,d.k9)((e=>{if(!t)return;const i=(0,d.Y8)(e);window.mailpoet_verified_sender_domains.includes(i)||((e=>{r(window.mailpoet_authorized_emails.includes(e))})(e),m(!0),h(window.mailpoet_partially_verified_sender_domains.includes(i)))}))}),(0,_.jsx)("br",{}),F&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")}),(0,_.jsx)("div",{className:"regular-text",children:(0,_.jsx)(D.Y,{emailAddress:n,mssActive:t,showModal:e,isEmailAuthorized:o,showSenderDomainWarning:c,isPartiallyVerifiedDomain:p,senderRestrictions:window.mailpoet_sender_restrictions,onSuccessfulEmailOrDomainAuthorization:e=>{"email"===e.type&&(r(!0),k.U.trackEvent("MSS in plugin authorize email",{"authorized email source":"settings",wasSuccessful:"yes"})),"domain"===e.type&&(m(!1),h(!1),k.U.trackEvent("MSS in plugin verify sender domain",{"verify sender domain source":"settings",wasSuccessful:"yes"}))}})}),(0,_.jsx)("label",{className:"mailpoet-settings-inputs-row",htmlFor:"reply_to-name",children:"Reply-to"}),(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"reply_to-name",placeholder:(0,d.t)("yourName"),"data-automation-id":"reply_to-name-field",value:u,onChange:(0,d.k9)(x)}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",placeholder:"[email protected]","data-automation-id":"reply_to-email-field",value:g,onChange:(0,d.k9)((0,d.Xv)(j))}),(0,_.jsx)("br",{}),C&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")})]})]})}var P=i(6519);function $({title:e,description:t,event:i}){const[s,n]=(0,w.iK)("subscribe",i,"enabled"),[a,o]=(0,w.iK)("subscribe",i,"label"),[r,l]=(0,w.iK)("subscribe",i,"segments");return(0,f.useEffect)((()=>{""===a&&o((0,d.t)("yesAddMe"))}),[a,o]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:e,description:t,htmlFor:`subscribe-${i}-enabled`}),(0,_.jsxs)(v,{children:[(0,_.jsx)(P.S,{id:`subscribe-${i}-enabled`,automationId:`subscribe-${i}-checkbox`,checked:"1"===s,onCheck:e=>n(e?"1":"0")}),"1"===s&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:a,onChange:(0,d.k9)(o)}),(0,_.jsx)("label",{className:"mailpoet-settings-inputs-row",htmlFor:`subscribe-${i}-segments`,children:(0,d.t)("usersWillBeSubscribedTo")}),(0,_.jsx)("div",{"data-automation-id":`subscribe-${i}-segments-selection`,children:(0,_.jsx)(I,{id:`subscribe-${i}-segments`,placeholder:(0,d.t)("chooseList"),value:r,setValue:l})})]})]})]})}function z(){const[e,t]=(0,w.iK)("subscription","pages","manage");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("manageSubTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("manageSubDescription1")," ",C()((0,d.t)("manageSubDescription2"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/222-customize-your-manage-subscription-page",rel:"noopener noreferrer",target:"_blank",children:e},e)))]}),htmlFor:"subscription-manage-page"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(E,{value:e,preview:"manage",setValue:t,id:"subscription-manage-page",automationId:"subscription-manage-page-selection",linkAutomationId:"preview_manage_subscription_page_link"}),(0,_.jsx)("p",{children:C()((0,d.t)("hideListFromManageSubPage"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"/wp-admin/admin.php?page=mailpoet-lists#/",rel:"noopener noreferrer",target:"_blank",children:e},e)))})]})]})}function W(){const[e,t]=(0,w.iK)("subscription","pages","unsubscribe"),[i,s]=(0,w.iK)("subscription","pages","confirm_unsubscribe");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("unsubscribeTitle"),description:(0,_.jsxs)(_.Fragment,{children:[C()((0,d.t)("unsubscribeDescription1"),"[mailpoet_page]",(()=>(0,_.jsx)("code",{children:"[mailpoet_page]"},"mp")))," ",C()((0,d.t)("unsubscribeDescription2"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/221-customize-your-unsubscribe-page",rel:"noopener noreferrer",target:"_blank",children:e},e)))]}),htmlFor:"subscription-pages-unsubscribe"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,d.t)("confirmationPageTitle"),":"]}),(0,_.jsx)(E,{value:i,preview:"confirm_unsubscribe",setValue:s,id:"subscription-pages-unsubscribe-confirmation",automationId:"unsubscribe-confirmation-page-selection",linkAutomationId:"unsubscribe_page_preview_link_confirmation"}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,d.t)("successPageTitle"),":"]}),(0,_.jsx)(E,{value:e,preview:"unsubscribe",setValue:t,id:"subscription-pages-unsubscribe",automationId:"unsubscribe-success-page-selection",linkAutomationId:"unsubscribe_page_preview_link"})]})]})}function R(){const[e,t]=(0,w.iK)("stats_notifications","enabled"),[i,s]=(0,w.iK)("stats_notifications","automated"),[n,a]=(0,w.iK)("stats_notifications","address"),o=(0,w.y3)("setErrorFlag"),r=("1"===e||"1"===i)&&""===n.trim(),l=n&&!(0,d.xf)(n);return(0,f.useEffect)((()=>{o(r||l)}),[r,l,o]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("statsNotifsTitle"),description:(0,d.t)("statsNotifsDescription"),htmlFor:"stats-enabled"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(P.S,{id:"stats-enabled",checked:"1"===e,onCheck:e=>t(e?"1":"0")}),(0,_.jsx)("label",{htmlFor:"stats-enabled",children:(0,d.t)("newslettersAndPostNotifs")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(P.S,{id:"stats-automated",checked:"1"===i,onCheck:e=>s(e?"1":"0")}),(0,_.jsx)("label",{htmlFor:"stats-automated",children:(0,d.t)("welcomeAndWcEmails")})]}),(0,_.jsx)(M.p,{dimension:"small",type:"email",value:n,onChange:(0,d.k9)((0,d.Xv)(a)),placeholder:"[email protected]"}),r&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("pleaseFillEmail")}),l&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")})]})]})}var L=i(51015);function O(){const[e,t]=(0,w.iK)("subscriber_email_notification","enabled"),[i,s]=(0,w.iK)("subscriber_email_notification","address"),n=(0,w.y3)("setErrorFlag"),a="1"===e&&""===i.trim(),o=i&&!(0,d.xf)(i);return(0,f.useEffect)((()=>{n(a||o)}),[a,o,n]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("newSubscriberNotifsTitle"),description:(0,d.t)("newSubscriberNotifsDescription"),htmlFor:"subscriber_email_notification-enabled"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{checked:"1"===e,value:"1",onCheck:t}),(0,d.t)("yes")," ",(0,_.jsx)(L.s,{checked:""===e,value:"",onCheck:t}),(0,d.t)("no"),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"email",value:i,onChange:(0,d.k9)((0,d.Xv)(s)),placeholder:"[email protected]"}),a&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("pleaseFillEmail")}),o&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")})]})]})}var V=i(68490),B=i(85501);function U({name:e,title:t,description:i}){const[s,n]=(0,f.useState)([]),[a,r]=(0,f.useState)(""),[l,c]=(0,f.useState)(null),[m,p]=(0,f.useState)(null),[h,u]=(0,f.useState)(""),[x,g]=(0,f.useState)("");let j=`[${e}`;return s.length&&(j+=` segments="${s.join(",")}"`),l&&(j+=` start_date="${k.U.Date.format(l,{format:"Y-m-d"})}"`),m&&(j+=` end_date="${k.U.Date.format(m,{format:"Y-m-d"})}"`),a&&parseInt(a,10)>0&&(j+=` in_the_last_days="${a}"`),h&&h.length>0&&(j+=` subject_contains="${h}"`),x&&parseInt(x,10)>0&&(j+=` limit="${x}"`),j+="]",(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:t,description:i,htmlFor:`${e}-shortcode`}),(0,_.jsxs)(v,{children:[(0,_.jsx)(M.p,{dimension:"small",readOnly:!0,type:"text",value:j,onClick:e=>{e.target.focus(),e.target.select()},id:`${e}-shortcode`}),(0,_.jsx)(B.T,{variant:"secondary",targetId:`${e}-shortcode`,alwaysSelectText:!0}),(0,_.jsx)("br",{}),(0,_.jsx)(I,{value:s,setValue:n,id:`${e}-shortcode-segments`,placeholder:(0,d.t)("leaveEmptyToDisplayAll"),segmentsSelector:"getSegments"}),"mailpoet_archive"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{type:"number",min:"1",max:"365000",dimension:"small",tooltip:(0,o.__)("Include newsletters sent no more than this many days ago. This overrides start and end dates.","mailpoet"),name:"in_the_last_days",placeholder:(0,o.__)("In the last days","mailpoet"),onChange:e=>{const t=e.target.value.trim();if(""===t)return void r("");const i=Number(t);Number.isInteger(i)&&i>0&&(c(null),p(null),r(t))},value:a}),(0,_.jsx)("br",{}),(0,_.jsx)(V.t,{dimension:"small",dateFormat:"MMMM d, yyyy",onChange:e=>{c(e),null!==e&&r("")},selected:l,maxDate:m,placeholderText:(0,o.__)("Start date","mailpoet"),isClearable:!0}),(0,_.jsx)(V.t,{dimension:"small",dateFormat:"MMMM d, yyyy",onChange:e=>{p(e),null!==e&&r("")},selected:m,minDate:l,placeholderText:(0,o.__)("End date","mailpoet"),isClearable:!0}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:h,onChange:e=>u(e.target.value),placeholder:(0,o.__)("Subject lines containing","mailpoet")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{type:"number",min:"1",max:"1000",dimension:"small",placeholder:(0,o.__)("Maximum number to display","mailpoet"),onChange:e=>{const t=e.target.value.trim();if(""===t)return void g("");const i=Number(t);Number.isInteger(i)&&i>0&&g(t)},value:x})]})]})]})}function q(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("gdprTitle"),description:(0,d.t)("gdprDescription"),htmlFor:"gdpr-compliant"}),(0,_.jsx)(v,{children:(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/246-guide-to-conform-to-gdpr",title:(0,d.t)("readGuide"),target:"_blank",rel:"noopener noreferrer",children:(0,d.t)("readGuide")})})]})}function G(){const[e,t]=(0,w.iK)("reEngagement","page");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("reEngagementTitle"),description:(0,d.t)("reEngagementDescription"),htmlFor:"re-engagement-page"}),(0,_.jsx)(v,{children:(0,_.jsx)(E,{value:e,preview:"re_engagement",setValue:t,id:"re-engagement-page"})})]})}function H(){const{showModal:e}=(0,j.g)();return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(A,{showModal:e}),(0,_.jsx)($,{event:"on_comment",title:(0,d.t)("subscribeInCommentsTitle"),description:(0,d.t)("subscribeInCommentsDescription")}),(0,_.jsx)($,{event:"on_register",title:(0,d.t)("subscribeInRegistrationTitle"),description:(0,d.t)("subscribeInRegistrationDescription")}),(0,_.jsx)(z,{}),(0,_.jsx)(W,{}),(0,_.jsx)(G,{}),(0,_.jsx)(R,{}),(0,_.jsx)(O,{}),(0,_.jsx)(U,{name:"mailpoet_archive",title:(0,d.t)("archiveShortcodeTitle"),description:(0,d.t)("archiveShortcodeDescription")}),(0,_.jsx)(U,{name:"mailpoet_subscribers_count",title:(0,d.t)("subscribersCountShortcodeTitle"),description:(0,d.t)("subscribersCountShortcodeDescription")}),(0,_.jsx)(q,{}),(0,_.jsx)(N,{})]})}function Y(){const[e,t]=(0,w.iK)("cron_trigger","method"),i=(0,w.d4)("getPaths")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Newsletter task scheduler (cron)","mailpoet"),description:(0,_.jsxs)(_.Fragment,{children:[(0,o.__)("Select what will activate your newsletter queue.","mailpoet")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/129-newsletter-task-scheduler-cron",rel:"noopener noreferrer",target:"_blank",children:(0,o.__)("Read more.","mailpoet")})]}),htmlFor:"cron_trigger-method"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"cron_trigger-method-action-scheduler",value:"Action Scheduler",checked:"Action Scheduler"===e,onCheck:t,automationId:"action_scheduler_cron_radio"}),(0,_.jsx)("label",{htmlFor:"cron_trigger-method-action-scheduler",children:(0,o.__)("Action Scheduler (recommended)","mailpoet")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"cron_trigger-method-wordpress",value:"WordPress",checked:"WordPress"===e,onCheck:t,automationId:"wordress_cron_radio"}),(0,_.jsx)("label",{htmlFor:"cron_trigger-method-wordpress",children:(0,o.__)("Visitors to your website","mailpoet")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"cron_trigger-method-cron",value:"Linux Cron",checked:"Linux Cron"===e,onCheck:t,automationId:"linux_cron_radio"}),(0,_.jsx)("label",{htmlFor:"cron_trigger-method-cron",children:(0,o.__)("Server side cron (Linux cron)","mailpoet")})]}),"Linux Cron"===e&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,o.__)("To use this option please add this command to your crontab:","mailpoet")}),(0,_.jsx)(M.p,{dimension:"small",type:"text",readOnly:!0,value:`php ${i.plugin}/mailpoet-cron.php ${i.root}`}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,o.__)("With the frequency of running it every minute:","mailpoet")}),(0,_.jsx)(M.p,{dimension:"small",type:"text",readOnly:!0,value:"*/1 * * * *"})]})]})]})}function X(){const e=(0,w.d4)("hasMembersPlugin")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("rolesTitle"),description:(0,d.t)("rolesDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,_.jsx)("p",{children:e?(0,_.jsx)("a",{className:"mailpoet-link",href:"?page=roles",children:(0,d.t)("manageUsingMembers")}):C()((0,d.t)("installMembers"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://wordpress.org/plugins/members/",rel:"noopener noreferrer",target:"_blank",children:e},e)))})})]})}function Z(){const[e,t]=(0,w.iK)("tracking","level");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("engagementTrackingTitle"),description:(0,d.t)("engagementTrackingDescription"),htmlFor:"engagement_tracking"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"tracking-basic",value:"basic",checked:"basic"===e,onCheck:t,automationId:"tracking-basic-radio"}),(0,_.jsx)("label",{htmlFor:"tracking-basic",children:(0,d.t)("engagementTrackingBasic")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"tracking-partial",value:"partial",checked:"partial"===e,onCheck:t,automationId:"tracking-partial-radio"}),(0,_.jsx)("label",{htmlFor:"tracking-partial",children:(0,d.t)("engagementTrackingPartial")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"tracking-full",value:"full",checked:"full"===e,onCheck:t,automationId:"tracking-full-radio"}),(0,_.jsx)("label",{htmlFor:"tracking-full",children:(0,d.t)("engagementTrackingFull")})]})]})]})}function J(){const[e,t]=(0,w.iK)("tracking","opens");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Human and machine opens","mailpoet"),description:(0,o.__)("Choose how human and machine opens should be displayed.","mailpoet"),htmlFor:"opens_mode"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"opens-merged",value:"merged",checked:"merged"===e,onCheck:t,automationId:"opens-merged-radio"}),(0,_.jsx)("label",{htmlFor:"opens-merged",children:(0,o.__)("Merged – both are counted as total opens. Similar to other email marketing tools.","mailpoet")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"opens-separated",value:"separated",checked:"separated"===e,onCheck:t,automationId:"opens-separated-radio"}),(0,_.jsx)("label",{htmlFor:"opens-separated",children:(0,o.__)("Separated – only human opens are counted as total opens. More accurate, but the numbers tend to be lower.","mailpoet")})]})]})]})}function Q(){const[e]=(0,w.iK)("smtp_provider"),t=(0,w.d4)("isMssActive")(),[i,s]=(0,w.iK)("send_transactional_emails");let n="";return t?n="MailPoet Sending Service":"manual"===e?n="SMTP":"SendGrid"===e?n="SendGrid":"AmazonSES"===e?n="Amazon SES":"server"===e&&(n=(0,d.t)("hostOption")),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("transactionalTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("transactionalDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("transactionalLink")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"transactional-enabled",value:"1",checked:"1"===i,onCheck:s}),(0,_.jsxs)("label",{htmlFor:"transactional-enabled",children:[(0,d.t)("transactionalCurrentMethod").replace("%1$s",n),(0,_.jsx)("br",{}),(0,_.jsx)("span",{className:"mailpoet-note",children:C()((0,d.t)("transactionalMssNote"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails#attachments",rel:"noopener noreferrer",target:"_blank",children:e},e)))})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"transactional-disabled",value:"",checked:""===i,onCheck:s}),(0,_.jsx)("label",{htmlFor:"transactional-disabled",children:(0,d.t)("transactionalWP")})]})]})]})}function ee(){const[e,t]=(0,w.iK)("deactivate_subscriber_after_inactive_days"),[i]=(0,w.iK)("tracking","level"),s="basic"!==i;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("inactiveSubsTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("inactiveSubsDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/264-inactive-subscribers",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[!s&&(0,_.jsx)("p",{"data-automation-id":"inactive-subscribers-disabled",children:(0,d.t)("disabledBecauseTrackingIs")}),s&&(0,_.jsxs)("div",{"data-automation-id":"inactive-subscribers-enabled",children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-disabled",automationId:"inactive-subscribers-option-never",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-disabled",children:(0,d.t)("never")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-3-months",value:"90",checked:"90"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-3-months",children:(0,d.t)("after3months")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-6-months",value:"180",checked:"180"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-6-months",children:(0,d.t)("after6months")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-12-months",value:"365",checked:"365"===e,onCheck:t,automationId:"inactive-subscribers-default"}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-12-months",children:(0,d.t)("after12months")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-18-months",value:"540",checked:"540"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-18-months",children:(0,d.t)("after18months")})]})]})]})]})}function te(){const[e,t]=(0,w.iK)("analytics","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("shareDataTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("shareDataDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/130-sharing-your-data-with-us",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"share-data-enabled",value:"1",checked:"1"===e,onCheck:t,automationId:"analytics-yes"}),(0,_.jsx)("label",{htmlFor:"share-data-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"share-data-disabled",value:"",checked:""===e,onCheck:t,automationId:"analytics-no"}),(0,_.jsx)("label",{htmlFor:"share-data-disabled",children:(0,d.t)("no")})]})]})}function ie(){const[e,t]=(0,w.iK)("3rd_party_libs","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("libs3rdPartyTitle"),description:(0,_.jsxs)(_.Fragment,{children:[C()((0,d.t)("libs3rdPartyDescription"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{href:"https://www.mailpoet.com/support/",rel:"noopener noreferrer",target:"_blank",children:e},e)))," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/338-enabledisable-3rd-party-libraries",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"libs-3rd-party-enabled",value:"1",checked:"1"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"libs-3rd-party-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"libs-3rd-party-disabled",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"libs-3rd-party-disabled",children:(0,d.t)("no")})]})]})}function se(){const[e,t]=(0,w.iK)("captcha","type"),[i,s]=(0,w.iK)("captcha","recaptcha_site_token"),[n,a]=(0,w.iK)("captcha","recaptcha_secret_token"),[o,r]=(0,w.iK)("captcha","recaptcha_invisible_site_token"),[l,c]=(0,w.iK)("captcha","recaptcha_invisible_secret_token"),m=(0,w.d4)("isBuiltInCaptchaSupported")(),p=(0,w.y3)("setErrorFlag"),h="recaptcha"===e&&""===i.trim(),u="recaptcha"===e&&""===n.trim(),x="recaptcha-invisible"===e&&""===o.trim(),g="recaptcha-invisible"===e&&""===l.trim();return(0,f.useEffect)((()=>{p(h||u||g||x)}),[u,h,g,x,p]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("captchaTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("captchaDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/182-add-a-captcha-to-subscription-forms",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")}),("recaptcha"===e||"recaptcha-invisible"===e)&&(0,_.jsxs)("p",{children:[(0,_.jsxs)("span",{children:[(0,d.t)("reCaptchaDescription")," "]}),(0,_.jsx)("a",{className:"mailpoet-link",href:"https://www.google.com/recaptcha/admin",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("signupForCaptchaKey")})]})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"built-in-captcha",disabled:!m,value:"built-in",checked:"built-in"===e,onCheck:t}),(0,_.jsxs)("label",{htmlFor:"built-in-captcha",children:[(0,d.t)("builtInCaptcha")," ",!m&&(0,d.t)("disbaledBecauseExtensionMissing")]})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"google-captcha",value:"recaptcha",checked:"recaptcha"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"google-captcha",children:(0,d.t)("googleReCaptchaCheckbox")})]}),"recaptcha"===e&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(M.p,{dimension:"small",type:"text",value:i,onChange:(0,d.k9)(s),placeholder:(0,d.t)("yourReCaptchaKey")}),h&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:n,onChange:(0,d.k9)(a),placeholder:(0,d.t)("yourReCaptchaSecret")}),u&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"google-captcha-invisible",value:"recaptcha-invisible",checked:"recaptcha-invisible"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"google-captcha-invisible",children:(0,d.t)("googleReCaptchaInvisible")})]}),"recaptcha-invisible"===e&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(M.p,{dimension:"small",type:"text",value:o,onChange:(0,d.k9)(r),placeholder:(0,d.t)("yourReCaptchaKey")}),x&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:l,onChange:(0,d.k9)(c),placeholder:(0,d.t)("yourReCaptchaSecret")}),g&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"no-captcha",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"no-captcha",children:(0,d.t)("disable")})]})]})]})}function ne(){const e=(0,w.y3)("reinstall"),{notices:t}=(0,f.useContext)(n.F);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("reinstallTitle"),description:(0,d.t)("reinstallDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,_.jsx)(y.$,{type:"button",onClick:async()=>{if(window.confirm((0,d.t)("reinstallConfirmation"))){const i=await e();"SAVE_FAILED"===i.type?t.error(i.error.map((e=>(0,_.jsx)("p",{children:e}))),{scroll:!0}):window.location.href=`admin.php?page=${k.U.mainPageSlug}`}},automationId:"reinstall-button",variant:"destructive",children:(0,d.t)("reinstallNow")})})]})}function ae(){const e=(0,w.y3)("recalculateSubscribersScore"),{notices:t}=(0,f.useContext)(n.F);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("recalculateSubscribersScoreTitle"),description:(0,d.t)("recalculateSubscribersScoreDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,_.jsx)(y.$,{type:"button",onClick:async()=>{await e(),t.info((0,_.jsx)("p",{children:(0,d.t)("recalculateSubscribersScoreNotice")}),{scroll:!0})},variant:"secondary",dimension:"small",children:(0,d.t)("recalculateSubscribersScoreNow")})})]})}function oe(){const[e,t]=(0,w.iK)("logging");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("loggingTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("loggingDescription")," ",(0,_.jsx)("a",{href:"?page=mailpoet-logs",className:"mailpoet-link",children:(0,d.t)("loggingDescriptionLink")})]}),htmlFor:"logging-level"}),(0,_.jsx)(v,{children:(0,_.jsxs)(T.Select,{id:"logging-level",value:e,onChange:(0,d.k9)(t),automationId:"logging-select-box",isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"everything","data-automation-id":"log-everything",children:(0,d.t)("everythingLogOption")}),(0,_.jsx)("option",{value:"errors","data-automation-id":"log-errors",children:(0,d.t)("errorsLogOption")}),(0,_.jsx)("option",{value:"nothing","data-automation-id":"log-nothing",children:(0,d.t)("nothingLogOption")})]})})]})}function re(){const[e,t]=(0,w.iK)("bounce","address");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("bounceEmail"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("yourBouncedEmails")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/180-bounce-management-in-mailpoet-3",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:"bounce-address"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"bounce-address",placeholder:"[email protected]","data-automation-id":"bounce-address-field",value:e,onChange:(0,d.k9)((0,d.Xv)(t))})})]})}function le(){const[e,t]=(0,w.iK)("captcha","on_register_forms","enabled"),i=(0,w.d4)("hasWooCommerce")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("captchaOnRegisterTitle"),description:(0,d.t)(i?"captchaOnRegisterWooActiveDescription":"captchaOnRegisterWooInactiveDescription"),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"captcha-on-register-enabled",value:"1",checked:"1"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"captcha-on-register-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"captcha-on-register-disabled",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"captcha-on-register-disabled",children:(0,d.t)("no")})]})]})}function ce(){const[e,t]=(0,w.iK)("use_block_email_editor_for_automation_emails","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("useBlockEditorForAutomationTitle"),description:(0,d.t)("useBlockEditorForAutomationDescription"),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"use-block-editor-for-automation-enabled",value:"1",checked:"1"===e,onCheck:t,automationId:"block-editor-for-automation-enabled"}),(0,_.jsx)("label",{htmlFor:"use-block-editor-for-automation-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"use-block-editor-for-automation-disabled",value:"",checked:""===e,onCheck:t,automationId:"block-editor-for-automation-disabled"}),(0,_.jsx)("label",{htmlFor:"use-block-editor-for-automation-disabled",children:(0,d.t)("no")})]})]})}function me(){return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(re,{}),(0,_.jsx)(Y,{}),(0,_.jsx)(X,{}),(0,_.jsx)(Z,{}),(0,_.jsx)(J,{}),(0,_.jsx)(Q,{}),(0,_.jsx)(ae,{}),(0,_.jsx)(ee,{}),(0,_.jsx)(te,{}),(0,_.jsx)(ie,{}),(0,_.jsx)(se,{}),(0,_.jsx)(le,{}),(0,_.jsx)(ce,{}),(0,_.jsx)(ne,{}),(0,_.jsx)(oe,{}),(0,_.jsx)(N,{})]})}var de=i(57232),pe=i(37035),he=i(59866),ue=i(54787);const xe=C()((0,d.t)("premiumTabDescription"),/\[link\](.*?)\[\/link\]/g,(e=>(0,_.jsx)("a",{href:"https://account.mailpoet.com/account?utm_source=plugin&utm_medium=settings&utm_campaign=activate-existing-plan&ref=settings-key-activation",target:"_blank",rel:"noopener noreferrer",children:e},"premium-tab-description"))),ge=C()((0,d.t)("premiumTabGetKey"),/\[link\](.*?)\[\/link\]/g,(e=>(0,_.jsx)("a",{href:"https://account.mailpoet.com/account?utm_source=plugin&utm_medium=settings&utm_campaign=activate-existing-plan&ref=settings-key-activation",target:"_blank",rel:"noopener noreferrer",children:e},"premium-tab-get-key")));function je({subscribersCount:e}){const t=(0,w.d4)("getKeyActivationState")(),i=(0,w.y3)("updateKeyActivationState"),s=(0,w.y3)("sendCongratulatoryMssEmail"),[n,a]=(0,w.iK)("sender","address"),[o,r]=(0,w.iK)("authorized_emails_addresses_check"),l=(0,w.y3)("setSaveDone"),c=(t.fromAddressModalCanBeShown||JSON.parse(sessionStorage.getItem("mailpoet_from_address_modal_can_be_shown")))&&t.mssStatus===de.W0.VALID_MSS_ACTIVE&&(!n||o);return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(b,{htmlFor:"mailpoet_premium_key",title:(0,d.t)("premiumTabActivationKeyLabel"),description:(0,_.jsxs)(_.Fragment,{children:[xe,(0,_.jsx)("br",{}),(0,_.jsx)("br",{}),ge,(0,_.jsx)("br",{}),(0,_.jsx)("br",{}),C()((0,d.t)("premiumTabGetPlan"),/\[link\](.*?)\[\/link\]/g,(t=>(0,_.jsx)("a",{href:`https://account.mailpoet.com/?s=${e}&utm_source=plugin&utm_medium=settings&utm_campaign=create-new-plan&ref=settings-key-activation`,target:"_blank",rel:"noopener noreferrer",children:t},"premium-tab-get-plan")))]})}),(0,_.jsxs)(v,{children:[(0,_.jsx)(ue.M,{}),(0,_.jsx)(he.y,{label:(0,d.t)("premiumTabVerifyButton")})]}),c&&(0,_.jsx)(pe.U,{onRequestClose:()=>{i({fromAddressModalCanBeShown:!1}),s(),sessionStorage.removeItem("mailpoet_from_address_modal_can_be_shown")},setAuthorizedAddress:async e=>{sessionStorage.removeItem("mailpoet_from_address_modal_can_be_shown"),await a(e),await r(null),l()}})]})}var _e=i(65069);function be(){const e=(0,j.Zp)(),t=(0,w.d4)("isMssActive")(),[i]=(0,w.iK)("mta","mailpoet_api_key"),{mssStatus:s,premiumStatus:n}=(0,w.d4)("getKeyActivationState")(),a=null!==s&&s!==de.W0.INVALID,o=null!==n&&n!==de.Ks.INVALID,r=window.mailpoet_free_plan_url,l=(0,w.y3)("setSetting"),c=(0,w.y3)("saveSettings");return(0,_.jsxs)("ul",{className:"mailpoet-sending-methods",children:[(0,_.jsx)("li",{children:(0,_.jsxs)("label",{className:"mailpoet-sending-method mailpoet-form-checkbox",children:[(0,_.jsx)("input",{type:"radio",checked:t,onChange:async s=>{s.preventDefault(),t||a||e("/premium"),!t&&a&&await(async()=>(await l(["mta_group"],"mailpoet"),await l(["mta","method"],"MailPoet"),await l(["mta","mailpoet_api_key"],i),await l(["signup_confirmation","enabled"],"1"),c()))()}}),(0,_.jsx)("span",{className:"mailpoet-form-radio-control"}),(0,_.jsx)("h4",{className:"mailpoet-h4",children:(0,d.t)("mssTitle")}),(0,_.jsx)("p",{children:t?(0,d.t)("youreSendingWithMss"):(0,d.t)("solveSendingProblems")}),(0,_.jsxs)("ul",{className:"mailpoet-sending-method-benefits mailpoet_success",children:[(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit1")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit2")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit3")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit4")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit5")})]}),!a&&!o&&(0,_.jsxs)("div",{className:"mailpoet-sending-method-actions",children:[(0,_.jsx)("a",{className:"mailpoet-button button-primary",href:r,rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("freeUpto")}),(0,_.jsxs)("span",{children:[" ",(0,d.t)("or")," "]}),C()((0,d.t)("enterYourKey"),/\[link\](.*?)\[\/link\]/g,((e,t)=>(0,_.jsx)(_e.Link,{to:"/premium",className:"mailpoet-link",children:e},t)))]}),!a&&o&&(0,_.jsxs)("div",{className:"mailpoet-sending-method-actions",children:[(0,_.jsx)("i",{children:(0,d.t)("invalidKeyForMss")})," ",(0,_.jsx)("a",{className:"mailpoet-button button-primary",href:"https://account.mailpoet.com/",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("getPlan")})]})]})}),(0,_.jsx)("li",{children:(0,_.jsxs)("label",{className:"mailpoet-sending-method mailpoet-form-checkbox",children:[(0,_.jsx)("input",{type:"radio",checked:!t,onChange:t=>{t.preventDefault(),e("/mta/other")}}),(0,_.jsx)("span",{className:"mailpoet-form-radio-control"}),(0,_.jsx)("h4",{className:"mailpoet-h4",children:(0,d.t)("otherTitle")}),(0,_.jsxs)("p",{children:[(0,d.t)("sendViaHost")," ",(0,_.jsx)("strong",{children:(0,d.t)("notRecommended")})," ",(0,d.t)("orViaThirdParty")]}),(0,_.jsx)("div",{className:"mailpoet-sending-method-actions",children:(0,_.jsx)(_e.Link,{to:"/mta/other",className:"mailpoet-link",children:(0,d.t)("configure")})})]})})]})}function ve(){const[e,t]=(0,w.iK)("smtp_provider"),[,i]=(0,w.iK)("mta_group"),[,s]=(0,w.iK)("mta","method");return(0,f.useEffect)((()=>{switch(e){case"server":i("website"),s("PHPMail");break;case"manual":i("smtp"),s("SMTP");break;case"AmazonSES":i("smtp"),s("AmazonSES");break;case"SendGrid":i("smtp"),s("SendGrid");break;default:s("PHPMail")}}),[e,i,s]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("method"),htmlFor:"mailpoet_smtp_method"}),(0,_.jsx)(v,{children:(0,_.jsxs)(T.Select,{id:"mailpoet_smtp_method",value:e,onChange:(0,d.k9)(t),isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"server",children:(0,d.t)("hostOption")}),(0,_.jsx)("option",{value:"manual",children:(0,d.t)("smtpOption")}),(0,_.jsxs)("optgroup",{label:(0,d.t)("selectProvider"),children:[(0,_.jsx)("option",{value:"AmazonSES",children:"Amazon SES"}),(0,_.jsx)("option",{value:"SendGrid",children:"SendGrid"})]})]})})]})}function fe(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("spfTitle"),description:(0,d.t)("spfDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,d.t)("spfSetup")})]})}var ke=i(62138),ye=i(19669);function we(){const[e,t]=(0,f.useState)(window.mailpoet_current_user_email),[i]=(0,w.iK)("mta"),{state:s,error:n}=(0,w.d4)("getTestEmailState")(),a=(0,w.y3)("sendTestEmail");return(0,_.jsxs)(_.Fragment,{children:[s===de.cP.SENDING&&(0,_.jsx)(m.R,{}),s===de.cP.SUCCESS&&(0,_.jsx)(ye.$,{type:"success",scroll:!0,children:(0,_.jsx)("p",{children:(0,d.t)("emailSent")})}),s===de.cP.FAILURE&&(0,_.jsx)(ye.$,{type:"error",scroll:!0,children:(0,_.jsx)("p",{children:n.map((e=>(0,_.jsx)("p",{children:e},e)))})}),(0,_.jsx)(b,{title:(0,d.t)("testSending"),htmlFor:"mailpoet_mta_test_email"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_mta_test_email",value:e,onChange:(0,d.k9)(t)}),(0,_.jsx)(y.$,{type:"button",dimension:"small",variant:"secondary",onClick:()=>a(e,i),children:(0,d.t)("sendTestEmail")}),(0,_.jsx)(ke.Tooltip,{tooltipId:"tooltip-settings-test",className:"mailpoet_tooltip_icon",tooltip:(0,_.jsx)("span",{style:{pointerEvents:"all"},children:C()((0,d.t)("testEmailTooltip"),/\[link\](.*?)\[\/link\]/g,((e,t)=>(0,_.jsx)("a",{className:"mailpoet-link",target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/146-the-newsletters-are-not-being-received",children:e},t)))})})]})]})}function Fe(){const e=(0,w.y3)("saveSettings"),t=(0,w.y3)("loadSettings"),i=(0,j.Zp)();return(0,_.jsxs)("div",{className:"mailpoet-settings-save",children:[(0,_.jsx)(y.$,{type:"button",onClick:async()=>{await e(),i("/mta")},children:(0,d.t)("activate")}),(0,_.jsx)(y.$,{onClick:async()=>{k.U.Modal.loading(!0),await t(),i("/mta"),k.U.Modal.loading(!1)},variant:"tertiary",children:(0,d.t)("orCancel")})]})}const Ce=1440,Se=86400;function Ne(e){const t=Math.floor(parseInt(e,10));return t>60?(0,d.t)("everyHours").replace("%1$d",""+t/60):60===t?(0,d.t)("everyHour"):t>1?(0,d.t)("everyMinutes").replace("%1$d",`${t}`):(0,d.t)("everyMinute")}function Ke({recommendedEmails:e,recommendedInterval:t}){const[i,s]=(0,w.iK)("mailpoet_sending_frequency"),[n,a]=(0,w.iK)("mta","frequency","emails"),[o,r]=(0,w.iK)("mta","frequency","interval");(0,f.useEffect)((()=>{"auto"===i&&(a(`${e}`),r(`${t}`))}),[i,e,t,a,r]);const l=Math.floor(Ce*parseInt(n,10)/parseInt(o,10)),c=Math.floor(l/Se*10)/10;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("sendingFrequency"),htmlFor:"mailpoet_sending_frequency"}),(0,_.jsxs)(v,{children:[(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsxs)(T.Select,{id:"mailpoet_sending_frequency",value:i,onChange:(0,d.k9)(s),dimension:"small",children:[(0,_.jsx)("option",{value:"auto",children:(0,d.t)("recommendedTitle")}),(0,_.jsx)("option",{value:"manual",children:(0,d.t)("ownFrequency")})]})}),"manual"===i&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row mailpoet-settings-inputs-row-centered",children:[(0,_.jsx)(M.p,{dimension:"small",id:"other_frequency_emails",type:"number",min:"1",max:"1000",value:n,onChange:(0,d.k9)(a)}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)("span",{children:(0,d.t)("emails")})]}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsxs)(T.Select,{id:"other_frequency_interval",value:o,onChange:(0,d.k9)(r),dimension:"small",children:[(0,_.jsx)("option",{value:"1",children:"every minute"}),(0,_.jsx)("option",{value:"2",children:"every 2 minutes"}),(0,_.jsx)("option",{value:"5",children:"every 5 minutes (recommended)"}),(0,_.jsx)("option",{value:"10",children:"every 10 minutes"}),(0,_.jsx)("option",{value:"15",children:"every 15 minutes"}),(0,_.jsx)("option",{value:"30",children:"every 30 minutes"})]})})]}),"auto"===i&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,d.t)("xEmails").replace("%1$s",n)," ",Ne(o),". "]}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:C()((0,d.t)("thatsXEmailsPerDay").replace("%1$s",l.toLocaleString()),/<strong>(.*?)<\/strong>/g,((e,t)=>(0,_.jsx)("strong",{children:e},t)))}),c>1&&(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsx)("span",{className:"mailpoet_emails_per_second_warning",children:C()((0,d.t)("thatsXEmailsPerSecond").replace("%1$s",c.toLocaleString()),/<strong>(.*?)<\/strong>/g,((e,t)=>(0,_.jsx)("strong",{children:e},t)))})}),"manual"===i&&(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:C()((0,d.t)("frequencyWarning").replace("%1$s",c.toLocaleString()),/<strong>(.*?)<\/strong>/g,((e,t)=>(0,_.jsx)("strong",{children:e},t)))})]})]})}function Ie(){const[e,t]=(0,w.iK)("web_host"),i=(0,w.d4)("getWebHosts")(),s=i[e];return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("yourHost"),htmlFor:"mailpoet_web_host"}),(0,_.jsx)(v,{children:(0,_.jsx)(T.Select,{id:"mailpoet_web_host",value:e,onChange:(0,d.k9)(t),isMinWidth:!0,dimension:"small",children:Object.entries(i).map((([e,t])=>(0,_.jsx)("option",{value:e,children:t.name},e)))})}),(0,_.jsx)(Ke,{recommendedEmails:s.emails,recommendedInterval:s.interval})]})}function Te(){const[e,t]=(0,w.iK)("mta","host"),[i,s]=(0,w.iK)("mta","port"),[n,a]=(0,w.iK)("mta","login"),[o,r]=(0,w.iK)("mta","password"),[l,c]=(0,w.iK)("mta","encryption"),[m,p]=(0,w.iK)("mta","authentication");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ke,{recommendedEmails:100,recommendedInterval:5}),(0,_.jsx)(b,{title:(0,d.t)("smtpHost"),description:(0,d.t)("smtpHostExample"),htmlFor:"mailpoet_smtp_host"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_smtp_host",value:e,onChange:(0,d.k9)(t)})}),(0,_.jsx)(b,{title:(0,d.t)("smtpPort"),htmlFor:"mailpoet_smtp_port"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_smtp_port",value:i,onChange:(0,d.k9)(s)})}),(0,_.jsx)(b,{title:(0,d.t)("login"),htmlFor:"mailpoet_smtp_login"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_smtp_login",value:n,onChange:(0,d.k9)(a)})}),(0,_.jsx)(b,{title:(0,d.t)("password"),htmlFor:"mailpoet_smtp_password"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"password",id:"mailpoet_smtp_password",value:o,onChange:(0,d.k9)(r)})}),(0,_.jsx)(b,{title:(0,d.t)("secureConnectioon"),htmlFor:"mailpoet_smtp_encryption"}),(0,_.jsx)(v,{children:(0,_.jsxs)(T.Select,{id:"mailpoet_smtp_encryption",value:l,onChange:(0,d.k9)(c),isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"",children:(0,d.t)("no")}),(0,_.jsx)("option",{value:"ssl",children:"SSL"}),(0,_.jsx)("option",{value:"tls",children:"TLS"})]})}),(0,_.jsx)(b,{title:(0,d.t)("authentication"),description:(0,d.t)("authenticationDescription"),htmlFor:"mailpoet_smtp_authentication"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{value:"1",checked:"1"===m,onCheck:p}),(0,d.t)("yes")," ",(0,_.jsx)(L.s,{value:"-1",checked:"-1"===m,onCheck:p}),(0,d.t)("no")]})]})}var Ee=i(60008);function Me(){const[e,t]=(0,w.iK)("mta","region"),[i,s]=(0,w.iK)("mta","access_key"),[n,a]=(0,w.iK)("mta","secret_key"),o=(0,w.d4)("getAmazonSesOptions")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ke,{recommendedEmails:o.emails,recommendedInterval:o.interval}),(0,_.jsx)(b,{title:(0,d.t)("region"),htmlFor:"mailpoet_amazon_ses_region"}),(0,_.jsx)(v,{children:(0,_.jsx)(T.Select,{id:"mailpoet_amazon_ses_region",value:e,onChange:(0,d.k9)(t),isMinWidth:!0,dimension:"small",children:Object.entries(o.regions).map((([e,t])=>(0,_.jsx)("option",{value:t,children:e},t)))})}),(0,_.jsx)(b,{title:(0,d.t)("accessKey"),htmlFor:"mailpoet_amazon_ses_access_key"}),(0,_.jsx)(v,{children:(0,_.jsx)(Ee.yA,{dimension:"small",value:i,className:"regular-text",onChange:(0,d.k9)(s),id:"mailpoet_amazon_ses_access_key"})}),(0,_.jsx)(b,{title:(0,d.t)("secretKey"),htmlFor:"mailpoet_amazon_ses_secret_key"}),(0,_.jsx)(v,{children:(0,_.jsx)(Ee.yA,{dimension:"small",value:n,className:"regular-text",onChange:(0,d.k9)(a),id:"mailpoet_amazon_ses_secret_key"})})]})}function De(){const[e,t]=(0,w.iK)("mta","api_key"),i=(0,w.d4)("getSendGridOptions")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ke,{recommendedEmails:i.emails,recommendedInterval:i.interval}),(0,_.jsx)(b,{title:(0,d.t)("apiKey"),htmlFor:"mailpoet_sendgrid_api_key"}),(0,_.jsx)(v,{children:(0,_.jsx)(Ee.yA,{dimension:"small",value:e,onChange:(0,d.k9)(t),id:"mailpoet_sendgrid_api_key"})})]})}function Ae(){const[e]=(0,w.iK)("mta","method");return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(ve,{}),"PHPMail"===e&&(0,_.jsx)(Ie,{}),"SMTP"===e&&(0,_.jsx)(Te,{}),"AmazonSES"===e&&(0,_.jsx)(Me,{}),"SendGrid"===e&&(0,_.jsx)(De,{}),(0,_.jsx)(fe,{}),(0,_.jsx)(we,{}),(0,_.jsx)(Fe,{})]})}function Pe(){const{subPage:e}=(0,j.g)();return"other"===e?(0,_.jsx)(Ae,{}):(0,_.jsx)(be,{})}function $e(){const e=(0,w.d4)("isMssActive")(),[t,i]=(0,w.iK)("signup_confirmation","enabled"),s=e=>{"1"===e&&window.confirm((0,d.t)("subscribersNeedToActivateSub"))&&i("1"),""===e&&window.confirm((0,d.t)("newSubscribersAutoConfirmed"))&&i("")};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("enableSignupConfTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("enableSignupConfDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/128-signup-confirmation-double-opt-in-feature",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readAboutDoubleOptIn")})]}),htmlFor:"signup_confirmation-enabled"}),(0,_.jsx)(v,{children:e?(0,_.jsx)("p",{children:(0,d.t)("signupConfirmationIsMandatory")}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(L.s,{id:"signup_confirmation-enabled",checked:"1"===t,value:"1",onCheck:s,automationId:"enable_signup_confirmation"}),(0,d.t)("yes")," ",(0,_.jsx)(L.s,{checked:""===t,value:"",onCheck:s,automationId:"disable_signup_confirmation"}),(0,d.t)("no")]})})]})}function ze(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("signup_confirmation","subject"),[s]=(0,w.iK)("signup_confirmation","use_mailpoet_editor");return e?"1"===s?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("emailSubject"),htmlFor:"signup_confirmation-subject"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",size:50,id:"signup_confirmation-subject","data-automation-id":"signup_confirmation_email_subject",value:t,onChange:(0,d.k9)(i)})})]}):null}var We=i(33609);function Re(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("signup_confirmation","body"),[s]=(0,w.iK)("signup_confirmation","use_mailpoet_editor");if(!e)return null;if("1"===s)return null;const n=(0,d.t)("emailContentDescription").replace("[current_site_title]",window.mailpoet_current_site_title||"").split("<br />").filter((e=>e));return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("emailContent"),description:n.map((e=>(0,_.jsxs)("span",{children:[e,(0,_.jsx)("br",{}),(0,_.jsx)("br",{})]},e))),htmlFor:"signup_confirmation-body"}),(0,_.jsx)(v,{children:(0,_.jsx)(We.T,{id:"signup_confirmation-body",cols:50,rows:15,"data-automation-id":"signup_confirmation_email_body",value:t,onChange:(0,d.k9)(i)})})]})}function Le(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("subscription","pages","confirmation");return e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("confirmationPage"),description:(0,d.t)("confirmationPageDescription"),htmlFor:"subscription-pages-confirmation"}),(0,_.jsx)(v,{children:(0,_.jsx)(E,{value:t,preview:"confirm",setValue:i,id:"subscription-pages-confirmation",automationId:"page_selection",linkAutomationId:"preview_page_link"})})]}):null}function Oe(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("signup_confirmation","use_mailpoet_editor"),[s]=(0,w.iK)("signup_confirmation","transactional_email_id"),n=(0,w.y3)("openEmailCustomizer");return e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("emailCustomizerTitle"),description:(0,d.t)("emailCustomizerDescription"),htmlFor:"mailpoet_confirmation_email_customizer"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(P.S,{id:"mailpoet_confirmation_email_customizer",automationId:"mailpoet_confirmation_email_customizer",checked:"1"===t,onCheck:e=>i(e?"1":"")}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsx)(y.$,{type:"button",onClick:()=>n(s),variant:"secondary",dimension:"small",children:(0,d.t)("openTemplateEditor")})})]})]}):null}function Ve(){return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)($e,{}),(0,_.jsx)(Oe,{}),(0,_.jsx)(ze,{}),(0,_.jsx)(Re,{}),(0,_.jsx)(Le,{}),(0,_.jsx)(N,{})]})}function Be(){const[e,t]=(0,w.iK)("woocommerce","use_mailpoet_editor"),[i]=(0,w.iK)("woocommerce","transactional_email_id"),s=(0,w.y3)("openWoocommerceCustomizer");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("wcCustomizerTitle"),description:(0,d.t)("wcCustomizerDescription"),htmlFor:"mailpoet_wc_customizer"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(P.S,{id:"mailpoet_wc_customizer",automationId:"mailpoet_wc_customizer",checked:"1"===e,onCheck:e=>t(e?"1":"")}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsx)(y.$,{type:"button",onClick:()=>s(i),variant:"secondary",dimension:"small",children:(0,d.t)("openTemplateEditor")})})]})]})}var Ue=i(81448);function qe(){const[e,t]=(0,w.iK)("woocommerce","optin_on_checkout","enabled"),[i,s]=(0,w.iK)("woocommerce","optin_on_checkout","segments"),[n,a]=(0,w.iK)("woocommerce","optin_on_checkout","message"),[r,l]=(0,w.iK)("woocommerce","optin_on_checkout","position"),c=(0,w.y3)("setErrorFlag"),m=""===n.trim();return(0,f.useEffect)((()=>{c(m)}),[m,c]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Opt-in on checkout","mailpoet"),description:(0,o.__)('Customers can subscribe to the "WooCommerce Customers" list and optionally other lists via a checkbox on the checkout page.',"mailpoet"),htmlFor:"mailpoet_wc_checkout_optin"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(Ue.Checkbox,{id:"mailpoet_wc_checkout_optin",automationId:"mailpoet_wc_checkout_optin",checked:"1"===e,onCheck:e=>t(e?"1":"")}),"1"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("br",{}),(0,_.jsxs)("label",{htmlFor:"mailpoet_wc_checkout_optin_segments",children:[(0,o.__)("Lists to also subscribe customers to:","mailpoet"),(0,_.jsx)("br",{}),(0,_.jsx)("span",{children:(0,o.__)('Leave empty to subscribe only to "WooCommerce Customers" list')})]}),(0,_.jsx)("br",{}),(0,_.jsx)(I,{id:"mailpoet_wc_checkout_optin_segments",value:i,setValue:s,placeholder:(0,o.__)("Select lists...","mailpoet")})]})]}),"1"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Checkbox opt-in message","mailpoet"),description:(0,o.__)('This is the checkbox message your customers will see on your WooCommerce checkout page to subscribe to the "WooCommerce Customers" list and lists selected in "Opt-in on checkout" setting.'),htmlFor:"mailpoet_wc_checkout_optin_message"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(Ue.Input,{dimension:"small",type:"text",id:"mailpoet_wc_checkout_optin_message","data-automation-id":"mailpoet_wc_checkout_optin_message",value:n,onChange:(0,Ue.onChange)(a),placeholder:(0,o.__)("Checkbox opt-in message","mailpoet")}),(0,_.jsx)("br",{}),m&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,o.__)("The checkbox opt-in message cannot be empty.","mailpoet")})]})]}),"1"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Checkbox opt-in position","mailpoet"),description:(0,o.__)("Select where the marketing opt-in checkbox appears on the checkout page.","mailpoet"),htmlFor:"mailpoet_wc_checkout_optin_position"}),(0,_.jsx)(v,{children:(0,_.jsxs)(Ue.Select,{id:"mailpoet_wc_checkout_optin_position",value:r,onChange:(0,Ue.onChange)(l),automationId:"mailpoet_wc_checkout_optin_position",isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"after_billing_info","data-automation-id":"after_billing_info",children:(0,o.__)("After billing info","mailpoet")}),(0,_.jsx)("option",{value:"after_order_notes","data-automation-id":"after_order_notes",children:(0,o.__)("After order notes","mailpoet")}),(0,_.jsx)("option",{value:"after_terms_and_conditions","data-automation-id":"after_terms_and_conditions",children:(0,o.__)("After terms and conditions","mailpoet")}),(0,_.jsx)("option",{value:"before_payment_methods","data-automation-id":"before_payment_methods",children:(0,o.__)("Before payment methods","mailpoet")}),(0,_.jsx)("option",{value:"before_terms_and_conditions","data-automation-id":"before_terms_and_conditions",children:(0,o.__)("Before terms and conditions","mailpoet")})]})})]})]})}function Ge(){const[e,t]=(0,w.iK)("mailpoet_subscribe_old_woocommerce_customers","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("subscribeOldWCTitle"),description:(0,d.t)("subscribeOldWCDescription"),htmlFor:"mailpoet_subscribe_old_wc_customers"}),(0,_.jsx)(v,{children:(0,_.jsx)(P.S,{id:"mailpoet_subscribe_old_wc_customers",automationId:"mailpoet_subscribe_old_wc_customers",checked:"1"===e,onCheck:e=>t(e?"1":"")})})]})}function He(){return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(Be,{}),(0,_.jsx)(qe,{}),(0,_.jsx)(Ge,{}),(0,_.jsx)(N,{})]})}var Ye=i(87948),Xe=i(98968);function Ze(){const[e,t]=(0,f.useState)(!0);return e&&(0,_.jsxs)(Xe.A,{className:"mailpoet-welcome-wizard-confirmation-modal",title:(0,o.__)("Confirm sending service selection","mailpoet"),onRequestClose:()=>{},isDismissible:!1,children:[(0,_.jsx)("p",{children:(0,Ye.A)((0,o.__)('Your currently selected sending method is "MailPoet Sending Service". The API key you entered is not valid for sending with our sending service. You can either <link>upgrade to a subscription</link> that allows you to send with our service or choose a different sending service',"mailpoet"),{link:(0,_.jsxs)("a",{href:`https://account.mailpoet.com/?s=${window.mailpoet_subscribers_count}&utm_source=plugin&utm_medium=settings&utm_campaign=switch-to-sending-plan&ref=settings-key-activation`,target:"_blank",rel:"noopener noreferrer",children:[" "," "," "]})})}),(0,_.jsx)("div",{className:"mailpoet-welcome-wizard-confirmation-modal-buttons",children:(0,_.jsx)(Ue.Button,{onClick:()=>{t(!1),window.location.href="admin.php?page=mailpoet-settings#/mta/other"},children:(0,o.__)("Update service settings","mailpoet")})})]})}const Je=window.location.href.includes("/mta");function Qe(){const e=(0,w.d4)("isSaving")(),t=(0,w.d4)("hasWooCommerce")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(u.V,{}),e&&(0,_.jsx)(m.R,{}),(0,_.jsx)(r.D,{}),(0,_.jsx)(c.q,{}),(0,_.jsx)(g.z,{heading:(0,o.__)("Settings","mailpoet")}),(0,_.jsx)(l.D,{}),(0,_.jsx)(x.O,{storeName:"mailpoet-settings"}),(0,_.jsxs)(p.k,{activeKey:"basics",children:[(0,_.jsx)(h.o,{route:"basics/:showModal?",title:(0,d.t)("basicsTab"),automationId:"basic_settings_tab",children:(0,_.jsx)(H,{})},"basics"),(0,_.jsx)(h.o,{title:(0,d.t)("signupConfirmationTab"),automationId:"signup_settings_tab",children:(0,_.jsx)(Ve,{})},"signup"),(0,_.jsx)(h.o,{route:"mta/:subPage?",title:(0,d.t)("sendWithTab"),automationId:"send_with_settings_tab",children:(0,_.jsx)(Pe,{})},"mta"),t&&(0,_.jsx)(h.o,{title:(0,d.t)("wooCommerceTab"),automationId:"woocommerce_settings_tab",children:(0,_.jsx)(He,{})},"woocommerce"),(0,_.jsx)(h.o,{title:(0,d.t)("advancedTab"),automationId:"settings-advanced-tab",children:(0,_.jsx)(me,{})},"advanced"),(0,_.jsx)(h.o,{title:(0,d.t)("keyActivationTab"),automationId:"activation_settings_tab",children:(0,_.jsx)(je,{subscribersCount:window.mailpoet_subscribers_count})},"premium")]}),window.mailpoet_mss_active&&!window.mailpoet_mss_key_valid&&!Je&&(0,_.jsx)(Ze,{})]})}function et(){return(0,_.jsx)(n.F.Provider,{value:(0,n.f)(window),children:(0,_.jsx)(Qe,{})})}const tt=document.getElementById("settings_container");tt&&((0,Ue.registerTranslations)(),(0,a.k)(),(0,s.H)(tt).render((0,_.jsx)(et,{})))},41669:e=>{e.exports=jQuery}},e=>{e.O(0,[223],(()=>e(e.s=19632))),e.O()}]);
     1"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[472],{63008:(e,t,i)=>{i(22731);var s=i(79124),n=i(50661),a=i(42109),o=i(59437),r=i(89470),l=i(82808),c=i(71328),m=i(79711),d=i(30253),p=i(77542),h=i(28425),u=i(29975),x=i(93554),g=i(42616),j=i(73867),_=i(86106);function b({title:e,description:t,htmlFor:i}){return(0,_.jsxs)("div",{className:"mailpoet-settings-label",children:[(0,_.jsx)("label",{className:"mailpoet-settings-label-title",htmlFor:i,children:e}),t&&(0,_.jsx)("p",{className:"description",children:t})]})}function v({children:e}){return(0,_.jsx)("div",{className:"mailpoet-settings-inputs",children:e})}var f=i(7378),k=i(43318),y=i(85386),w=i(16609),C=i(2726),F=i.n(C);const S=(e,t,i)=>{if("deactivate"!==e){if("reactivate"===e){const e=F()(k.U.I18n.t("re-engagementReactivatedNotice"),/\[link\](.*?)\[\/link\]/g,(e=>(0,_.jsx)("a",{href:"?page=mailpoet-newsletters#/re_engagement",rel:"noopener noreferrer",children:e},"reEngagementEmailsTabLink")));i((0,_.jsx)("p",{children:e}),{scroll:!0})}}else t((0,_.jsx)("p",{children:k.U.I18n.t("re-engagementDisabledNotice")}),{scroll:!0})};function N(){const[e,t]=(0,f.useState)(!1),i=(0,w.d4)("isSaving")(),s=(0,w.d4)("hasErrorFlag")(),a=(0,w.d4)("getSavingError")(),o=(0,w.d4)("hasReEngagementNotice")(),r=(0,w.d4)("getReEngagementAction")(),l=(0,w.y3)("saveSettings"),{notices:c}=(0,f.useContext)(n.F),m=c.error,d=c.success;return(0,f.useEffect)((()=>{e&&!i&&(a?m(a.map((e=>(0,_.jsx)("p",{children:e}))),{scroll:!0}):(d((0,_.jsx)("p",{children:k.U.I18n.t("settingsSaved")}),{scroll:!0}),o&&S(r,m,d)))}),[e,a,i,m,d,o,r]),(0,_.jsx)("div",{className:"mailpoet-settings-save",children:(0,_.jsx)(y.$,{type:"button",automationId:"settings-submit-button",isDisabled:i||s,onClick:()=>{t(!0),l()},children:k.U.I18n.t("saveSettings")})})}var K=i(94010);function I(e){const t=e.segmentsSelector?e.segmentsSelector:"getDefaultSegments",i=(0,w.d4)(t)().map((e=>({value:e.id,label:e.name,count:e.subscribers}))),s=i.filter((t=>e.value.includes(t.value)));return(0,_.jsx)(K.ReactSelect,{isMulti:!0,defaultValue:s,id:e.id,placeholder:e.placeholder,options:i,onChange:t=>{e.setValue((t||[]).map((e=>e.value)))}})}var T=i(36113);function E(e){const t=(0,w.d4)("getPages")();let i=t.find((t=>t.id===parseInt(e.value,10)));return i||(i=t[0]),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row mailpoet-settings-inputs-row-centered",children:[(0,_.jsx)(T.Select,{id:e.id,automationId:e.automationId,value:i.id,onChange:(0,d.k9)(e.setValue),isMinWidth:!0,dimension:"small",children:t.map((e=>(0,_.jsx)("option",{value:e.id,children:`${e.title}`},e.id)))}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)("a",{className:"mailpoet-link",target:"_blank",title:(0,d.t)("previewPage"),rel:"noopener noreferrer",href:i.url[e.preview],"data-automation-id":e.linkAutomationId,children:(0,d.t)("preview")})]})}var M=i(63599),A=i(49429);function D({showModal:e}){const t=(0,w.d4)("isMssActive")(),[i,s]=(0,w.iK)("sender","name"),[n,a]=(0,w.iK)("sender","address"),[o,r]=(0,f.useState)(!0),l=(0,d.Y8)(n),[c,m]=(0,f.useState)(!window.mailpoet_verified_sender_domains.includes(l)),[p,h]=(0,f.useState)(window.mailpoet_partially_verified_sender_domains.includes(l)),[u,x]=(0,w.iK)("reply_to","name"),[g,j]=(0,w.iK)("reply_to","address"),y=(0,w.y3)("setErrorFlag"),C=n&&!(0,d.xf)(n),F=g&&!(0,d.xf)(g);return(0,f.useEffect)((()=>{y(C||F||!o&&t)}),[F,C,y,o,t]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("defaultSenderTitle"),description:(0,d.t)("defaultSenderDescription"),htmlFor:"sender-name"}),(0,_.jsxs)(v,{children:[(0,_.jsx)("label",{htmlFor:"sender-name",children:(0,d.t)("from")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"sender-name",placeholder:(0,d.t)("yourName"),"data-automation-id":"from-name-field",value:i,onChange:(0,d.k9)(s)}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",placeholder:"[email protected]","data-automation-id":"from-email-field",value:n,onChange:(0,d.k9)((0,d.Xv)((e=>{r(!0),m(!1),h(!1),a(e)}))),onBlur:(0,d.k9)((e=>{if(!t)return;const i=(0,d.Y8)(e);window.mailpoet_verified_sender_domains.includes(i)||((e=>{r(window.mailpoet_authorized_emails.includes(e))})(e),m(!0),h(window.mailpoet_partially_verified_sender_domains.includes(i)))}))}),(0,_.jsx)("br",{}),C&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")}),(0,_.jsx)("div",{className:"regular-text",children:(0,_.jsx)(A.Y,{emailAddress:n,mssActive:t,showModal:e,isEmailAuthorized:o,showSenderDomainWarning:c,isPartiallyVerifiedDomain:p,senderRestrictions:window.mailpoet_sender_restrictions,onSuccessfulEmailOrDomainAuthorization:e=>{"email"===e.type&&(r(!0),k.U.trackEvent("MSS in plugin authorize email",{"authorized email source":"settings",wasSuccessful:"yes"})),"domain"===e.type&&(m(!1),h(!1),k.U.trackEvent("MSS in plugin verify sender domain",{"verify sender domain source":"settings",wasSuccessful:"yes"}))}})}),(0,_.jsx)("label",{className:"mailpoet-settings-inputs-row",htmlFor:"reply_to-name",children:"Reply-to"}),(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"reply_to-name",placeholder:(0,d.t)("yourName"),"data-automation-id":"reply_to-name-field",value:u,onChange:(0,d.k9)(x)}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",placeholder:"[email protected]","data-automation-id":"reply_to-email-field",value:g,onChange:(0,d.k9)((0,d.Xv)(j))}),(0,_.jsx)("br",{}),F&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")})]})]})}var P=i(6519);function $({title:e,description:t,event:i}){const[s,n]=(0,w.iK)("subscribe",i,"enabled"),[a,o]=(0,w.iK)("subscribe",i,"label"),[r,l]=(0,w.iK)("subscribe",i,"segments");return(0,f.useEffect)((()=>{""===a&&o((0,d.t)("yesAddMe"))}),[a,o]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:e,description:t,htmlFor:`subscribe-${i}-enabled`}),(0,_.jsxs)(v,{children:[(0,_.jsx)(P.S,{id:`subscribe-${i}-enabled`,automationId:`subscribe-${i}-checkbox`,checked:"1"===s,onCheck:e=>n(e?"1":"0")}),"1"===s&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:a,onChange:(0,d.k9)(o)}),(0,_.jsx)("label",{className:"mailpoet-settings-inputs-row",htmlFor:`subscribe-${i}-segments`,children:(0,d.t)("usersWillBeSubscribedTo")}),(0,_.jsx)("div",{"data-automation-id":`subscribe-${i}-segments-selection`,children:(0,_.jsx)(I,{id:`subscribe-${i}-segments`,placeholder:(0,d.t)("chooseList"),value:r,setValue:l})})]})]})]})}function z(){const[e,t]=(0,w.iK)("subscription","pages","manage");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("manageSubTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("manageSubDescription1")," ",F()((0,d.t)("manageSubDescription2"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/222-customize-your-manage-subscription-page",rel:"noopener noreferrer",target:"_blank",children:e},e)))]}),htmlFor:"subscription-manage-page"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(E,{value:e,preview:"manage",setValue:t,id:"subscription-manage-page",automationId:"subscription-manage-page-selection",linkAutomationId:"preview_manage_subscription_page_link"}),(0,_.jsx)("p",{children:F()((0,d.t)("hideListFromManageSubPage"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"/wp-admin/admin.php?page=mailpoet-lists#/",rel:"noopener noreferrer",target:"_blank",children:e},e)))})]})]})}function W(){const[e,t]=(0,w.iK)("subscription","pages","unsubscribe"),[i,s]=(0,w.iK)("subscription","pages","confirm_unsubscribe");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("unsubscribeTitle"),description:(0,_.jsxs)(_.Fragment,{children:[F()((0,d.t)("unsubscribeDescription1"),"[mailpoet_page]",(()=>(0,_.jsx)("code",{children:"[mailpoet_page]"},"mp")))," ",F()((0,d.t)("unsubscribeDescription2"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/221-customize-your-unsubscribe-page",rel:"noopener noreferrer",target:"_blank",children:e},e)))]}),htmlFor:"subscription-pages-unsubscribe"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,d.t)("confirmationPageTitle"),":"]}),(0,_.jsx)(E,{value:i,preview:"confirm_unsubscribe",setValue:s,id:"subscription-pages-unsubscribe-confirmation",automationId:"unsubscribe-confirmation-page-selection",linkAutomationId:"unsubscribe_page_preview_link_confirmation"}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,d.t)("successPageTitle"),":"]}),(0,_.jsx)(E,{value:e,preview:"unsubscribe",setValue:t,id:"subscription-pages-unsubscribe",automationId:"unsubscribe-success-page-selection",linkAutomationId:"unsubscribe_page_preview_link"})]})]})}function R(){const[e,t]=(0,w.iK)("stats_notifications","enabled"),[i,s]=(0,w.iK)("stats_notifications","automated"),[n,a]=(0,w.iK)("stats_notifications","address"),o=(0,w.y3)("setErrorFlag"),r=("1"===e||"1"===i)&&""===n.trim(),l=n&&!(0,d.xf)(n);return(0,f.useEffect)((()=>{o(r||l)}),[r,l,o]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("statsNotifsTitle"),description:(0,d.t)("statsNotifsDescription"),htmlFor:"stats-enabled"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(P.S,{id:"stats-enabled",checked:"1"===e,onCheck:e=>t(e?"1":"0")}),(0,_.jsx)("label",{htmlFor:"stats-enabled",children:(0,d.t)("newslettersAndPostNotifs")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(P.S,{id:"stats-automated",checked:"1"===i,onCheck:e=>s(e?"1":"0")}),(0,_.jsx)("label",{htmlFor:"stats-automated",children:(0,d.t)("welcomeAndWcEmails")})]}),(0,_.jsx)(M.p,{dimension:"small",type:"email",value:n,onChange:(0,d.k9)((0,d.Xv)(a)),placeholder:"[email protected]"}),r&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("pleaseFillEmail")}),l&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")})]})]})}var L=i(51015);function O(){const[e,t]=(0,w.iK)("subscriber_email_notification","enabled"),[i,s]=(0,w.iK)("subscriber_email_notification","address"),n=(0,w.y3)("setErrorFlag"),a="1"===e&&""===i.trim(),o=i&&!(0,d.xf)(i);return(0,f.useEffect)((()=>{n(a||o)}),[a,o,n]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("newSubscriberNotifsTitle"),description:(0,d.t)("newSubscriberNotifsDescription"),htmlFor:"subscriber_email_notification-enabled"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{checked:"1"===e,value:"1",onCheck:t}),(0,d.t)("yes")," ",(0,_.jsx)(L.s,{checked:""===e,value:"",onCheck:t}),(0,d.t)("no"),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"email",value:i,onChange:(0,d.k9)((0,d.Xv)(s)),placeholder:"[email protected]"}),a&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("pleaseFillEmail")}),o&&(0,_.jsx)("div",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("invalidEmail")})]})]})}var B=i(68490),V=i(85501);function U({name:e,title:t,description:i}){const[s,n]=(0,f.useState)([]),[a,r]=(0,f.useState)(""),[l,c]=(0,f.useState)(null),[m,p]=(0,f.useState)(null),[h,u]=(0,f.useState)(""),[x,g]=(0,f.useState)("");let j=`[${e}`;return s.length&&(j+=` segments="${s.join(",")}"`),l&&(j+=` start_date="${k.U.Date.format(l,{format:"Y-m-d"})}"`),m&&(j+=` end_date="${k.U.Date.format(m,{format:"Y-m-d"})}"`),a&&parseInt(a,10)>0&&(j+=` in_the_last_days="${a}"`),h&&h.length>0&&(j+=` subject_contains="${h}"`),x&&parseInt(x,10)>0&&(j+=` limit="${x}"`),j+="]",(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:t,description:i,htmlFor:`${e}-shortcode`}),(0,_.jsxs)(v,{children:[(0,_.jsx)(M.p,{dimension:"small",readOnly:!0,type:"text",value:j,onClick:e=>{e.target.focus(),e.target.select()},id:`${e}-shortcode`}),(0,_.jsx)(V.T,{variant:"secondary",targetId:`${e}-shortcode`,alwaysSelectText:!0}),(0,_.jsx)("br",{}),(0,_.jsx)(I,{value:s,setValue:n,id:`${e}-shortcode-segments`,placeholder:(0,d.t)("leaveEmptyToDisplayAll"),segmentsSelector:"getSegments"}),"mailpoet_archive"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{type:"number",min:"1",max:"365000",dimension:"small",tooltip:(0,o.__)("Include newsletters sent no more than this many days ago. This overrides start and end dates.","mailpoet"),name:"in_the_last_days",placeholder:(0,o.__)("In the last days","mailpoet"),onChange:e=>{const t=e.target.value.trim();if(""===t)return void r("");const i=Number(t);Number.isInteger(i)&&i>0&&(c(null),p(null),r(t))},value:a}),(0,_.jsx)("br",{}),(0,_.jsx)(B.t,{dimension:"small",dateFormat:"MMMM d, yyyy",onChange:e=>{c(e),null!==e&&r("")},selected:l,maxDate:m,placeholderText:(0,o.__)("Start date","mailpoet"),isClearable:!0}),(0,_.jsx)(B.t,{dimension:"small",dateFormat:"MMMM d, yyyy",onChange:e=>{p(e),null!==e&&r("")},selected:m,minDate:l,placeholderText:(0,o.__)("End date","mailpoet"),isClearable:!0}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:h,onChange:e=>u(e.target.value),placeholder:(0,o.__)("Subject lines containing","mailpoet")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{type:"number",min:"1",max:"1000",dimension:"small",placeholder:(0,o.__)("Maximum number to display","mailpoet"),onChange:e=>{const t=e.target.value.trim();if(""===t)return void g("");const i=Number(t);Number.isInteger(i)&&i>0&&g(t)},value:x})]})]})]})}function q(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("gdprTitle"),description:(0,d.t)("gdprDescription"),htmlFor:"gdpr-compliant"}),(0,_.jsx)(v,{children:(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/246-guide-to-conform-to-gdpr",title:(0,d.t)("readGuide"),target:"_blank",rel:"noopener noreferrer",children:(0,d.t)("readGuide")})})]})}function H(){const[e,t]=(0,w.iK)("reEngagement","page");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("reEngagementTitle"),description:(0,d.t)("reEngagementDescription"),htmlFor:"re-engagement-page"}),(0,_.jsx)(v,{children:(0,_.jsx)(E,{value:e,preview:"re_engagement",setValue:t,id:"re-engagement-page"})})]})}function G(){const{showModal:e}=(0,j.g)();return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(D,{showModal:e}),(0,_.jsx)($,{event:"on_comment",title:(0,d.t)("subscribeInCommentsTitle"),description:(0,d.t)("subscribeInCommentsDescription")}),(0,_.jsx)($,{event:"on_register",title:(0,d.t)("subscribeInRegistrationTitle"),description:(0,d.t)("subscribeInRegistrationDescription")}),(0,_.jsx)(z,{}),(0,_.jsx)(W,{}),(0,_.jsx)(H,{}),(0,_.jsx)(R,{}),(0,_.jsx)(O,{}),(0,_.jsx)(U,{name:"mailpoet_archive",title:(0,d.t)("archiveShortcodeTitle"),description:(0,d.t)("archiveShortcodeDescription")}),(0,_.jsx)(U,{name:"mailpoet_subscribers_count",title:(0,d.t)("subscribersCountShortcodeTitle"),description:(0,d.t)("subscribersCountShortcodeDescription")}),(0,_.jsx)(q,{}),(0,_.jsx)(N,{})]})}function Y(){const[e,t]=(0,w.iK)("cron_trigger","method"),i=(0,w.d4)("getPaths")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Newsletter task scheduler (cron)","mailpoet"),description:(0,_.jsxs)(_.Fragment,{children:[(0,o.__)("Select what will activate your newsletter queue.","mailpoet")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/129-newsletter-task-scheduler-cron",rel:"noopener noreferrer",target:"_blank",children:(0,o.__)("Read more.","mailpoet")})]}),htmlFor:"cron_trigger-method"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"cron_trigger-method-action-scheduler",value:"Action Scheduler",checked:"Action Scheduler"===e,onCheck:t,automationId:"action_scheduler_cron_radio"}),(0,_.jsx)("label",{htmlFor:"cron_trigger-method-action-scheduler",children:(0,o.__)("Action Scheduler (recommended)","mailpoet")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"cron_trigger-method-wordpress",value:"WordPress",checked:"WordPress"===e,onCheck:t,automationId:"wordress_cron_radio"}),(0,_.jsx)("label",{htmlFor:"cron_trigger-method-wordpress",children:(0,o.__)("Visitors to your website","mailpoet")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"cron_trigger-method-cron",value:"Linux Cron",checked:"Linux Cron"===e,onCheck:t,automationId:"linux_cron_radio"}),(0,_.jsx)("label",{htmlFor:"cron_trigger-method-cron",children:(0,o.__)("Server side cron (Linux cron)","mailpoet")})]}),"Linux Cron"===e&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,o.__)("To use this option please add this command to your crontab:","mailpoet")}),(0,_.jsx)(M.p,{dimension:"small",type:"text",readOnly:!0,value:`php ${i.plugin}/mailpoet-cron.php ${i.root}`}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,o.__)("With the frequency of running it every minute:","mailpoet")}),(0,_.jsx)(M.p,{dimension:"small",type:"text",readOnly:!0,value:"*/1 * * * *"})]})]})]})}function X(){const e=(0,w.d4)("hasMembersPlugin")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("rolesTitle"),description:(0,d.t)("rolesDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,_.jsx)("p",{children:e?(0,_.jsx)("a",{className:"mailpoet-link",href:"?page=roles",children:(0,d.t)("manageUsingMembers")}):F()((0,d.t)("installMembers"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://wordpress.org/plugins/members/",rel:"noopener noreferrer",target:"_blank",children:e},e)))})})]})}function Z(){const[e,t]=(0,w.iK)("tracking","level");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("engagementTrackingTitle"),description:(0,d.t)("engagementTrackingDescription"),htmlFor:"engagement_tracking"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"tracking-basic",value:"basic",checked:"basic"===e,onCheck:t,automationId:"tracking-basic-radio"}),(0,_.jsx)("label",{htmlFor:"tracking-basic",children:(0,d.t)("engagementTrackingBasic")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"tracking-partial",value:"partial",checked:"partial"===e,onCheck:t,automationId:"tracking-partial-radio"}),(0,_.jsx)("label",{htmlFor:"tracking-partial",children:(0,d.t)("engagementTrackingPartial")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"tracking-full",value:"full",checked:"full"===e,onCheck:t,automationId:"tracking-full-radio"}),(0,_.jsx)("label",{htmlFor:"tracking-full",children:(0,d.t)("engagementTrackingFull")})]})]})]})}function J(){const[e,t]=(0,w.iK)("tracking","opens");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Human and machine opens","mailpoet"),description:(0,o.__)("Choose how human and machine opens should be displayed.","mailpoet"),htmlFor:"opens_mode"}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"opens-merged",value:"merged",checked:"merged"===e,onCheck:t,automationId:"opens-merged-radio"}),(0,_.jsx)("label",{htmlFor:"opens-merged",children:(0,o.__)("Merged – both are counted as total opens. Similar to other email marketing tools.","mailpoet")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"opens-separated",value:"separated",checked:"separated"===e,onCheck:t,automationId:"opens-separated-radio"}),(0,_.jsx)("label",{htmlFor:"opens-separated",children:(0,o.__)("Separated – only human opens are counted as total opens. More accurate, but the numbers tend to be lower.","mailpoet")})]})]})]})}function Q(){const[e]=(0,w.iK)("smtp_provider"),t=(0,w.d4)("isMssActive")(),[i,s]=(0,w.iK)("send_transactional_emails");let n="";return t?n="MailPoet Sending Service":"manual"===e?n="SMTP":"SendGrid"===e?n="SendGrid":"AmazonSES"===e?n="Amazon SES":"server"===e&&(n=(0,d.t)("hostOption")),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("transactionalTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("transactionalDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("transactionalLink")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"transactional-enabled",value:"1",checked:"1"===i,onCheck:s}),(0,_.jsxs)("label",{htmlFor:"transactional-enabled",children:[(0,d.t)("transactionalCurrentMethod").replace("%1$s",n),(0,_.jsx)("br",{}),(0,_.jsx)("span",{className:"mailpoet-note",children:F()((0,d.t)("transactionalMssNote"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails#attachments",rel:"noopener noreferrer",target:"_blank",children:e},e)))})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"transactional-disabled",value:"",checked:""===i,onCheck:s}),(0,_.jsx)("label",{htmlFor:"transactional-disabled",children:(0,d.t)("transactionalWP")})]})]})]})}function ee(){const[e,t]=(0,w.iK)("deactivate_subscriber_after_inactive_days"),[i]=(0,w.iK)("tracking","level"),s="basic"!==i;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("inactiveSubsTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("inactiveSubsDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/264-inactive-subscribers",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[!s&&(0,_.jsx)("p",{"data-automation-id":"inactive-subscribers-disabled",children:(0,d.t)("disabledBecauseTrackingIs")}),s&&(0,_.jsxs)("div",{"data-automation-id":"inactive-subscribers-enabled",children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-disabled",automationId:"inactive-subscribers-option-never",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-disabled",children:(0,d.t)("never")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-3-months",value:"90",checked:"90"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-3-months",children:(0,d.t)("after3months")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-6-months",value:"180",checked:"180"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-6-months",children:(0,d.t)("after6months")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-12-months",value:"365",checked:"365"===e,onCheck:t,automationId:"inactive-subscribers-default"}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-12-months",children:(0,d.t)("after12months")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"inactive-subscribers-18-months",value:"540",checked:"540"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"inactive-subscribers-18-months",children:(0,d.t)("after18months")})]})]})]})]})}function te(){const[e,t]=(0,w.iK)("analytics","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("shareDataTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("shareDataDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/130-sharing-your-data-with-us",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"share-data-enabled",value:"1",checked:"1"===e,onCheck:t,automationId:"analytics-yes"}),(0,_.jsx)("label",{htmlFor:"share-data-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"share-data-disabled",value:"",checked:""===e,onCheck:t,automationId:"analytics-no"}),(0,_.jsx)("label",{htmlFor:"share-data-disabled",children:(0,d.t)("no")})]})]})}function ie(){const[e,t]=(0,w.iK)("3rd_party_libs","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("libs3rdPartyTitle"),description:(0,_.jsxs)(_.Fragment,{children:[F()((0,d.t)("libs3rdPartyDescription"),/\[link\](.*?)\[\/link\]/,(e=>(0,_.jsx)("a",{href:"https://www.mailpoet.com/support/",rel:"noopener noreferrer",target:"_blank",children:e},e)))," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/338-enabledisable-3rd-party-libraries",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"libs-3rd-party-enabled",value:"1",checked:"1"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"libs-3rd-party-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"libs-3rd-party-disabled",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"libs-3rd-party-disabled",children:(0,d.t)("no")})]})]})}function se(){const[e,t]=(0,w.iK)("captcha","type"),[i,s]=(0,w.iK)("captcha","recaptcha_site_token"),[n,a]=(0,w.iK)("captcha","recaptcha_secret_token"),[o,r]=(0,w.iK)("captcha","recaptcha_invisible_site_token"),[l,c]=(0,w.iK)("captcha","recaptcha_invisible_secret_token"),m=(0,w.d4)("isBuiltInCaptchaSupported")(),p=(0,w.y3)("setErrorFlag"),h="recaptcha"===e&&""===i.trim(),u="recaptcha"===e&&""===n.trim(),x="recaptcha-invisible"===e&&""===o.trim(),g="recaptcha-invisible"===e&&""===l.trim();return(0,f.useEffect)((()=>{p(h||u||g||x)}),[u,h,g,x,p]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("captchaTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("captchaDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/182-add-a-captcha-to-subscription-forms",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")}),("recaptcha"===e||"recaptcha-invisible"===e)&&(0,_.jsxs)("p",{children:[(0,_.jsxs)("span",{children:[(0,d.t)("reCaptchaDescription")," "]}),(0,_.jsx)("a",{className:"mailpoet-link",href:"https://www.google.com/recaptcha/admin",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("signupForCaptchaKey")})]})]}),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"built-in-captcha",disabled:!m,value:"built-in",checked:"built-in"===e,onCheck:t}),(0,_.jsxs)("label",{htmlFor:"built-in-captcha",children:[(0,d.t)("builtInCaptcha")," ",!m&&(0,d.t)("disbaledBecauseExtensionMissing")]})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"google-captcha",value:"recaptcha",checked:"recaptcha"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"google-captcha",children:(0,d.t)("googleReCaptchaCheckbox")})]}),"recaptcha"===e&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(M.p,{dimension:"small",type:"text",value:i,onChange:(0,d.k9)(s),placeholder:(0,d.t)("yourReCaptchaKey")}),h&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:n,onChange:(0,d.k9)(a),placeholder:(0,d.t)("yourReCaptchaSecret")}),u&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"google-captcha-invisible",value:"recaptcha-invisible",checked:"recaptcha-invisible"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"google-captcha-invisible",children:(0,d.t)("googleReCaptchaInvisible")})]}),"recaptcha-invisible"===e&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(M.p,{dimension:"small",type:"text",value:o,onChange:(0,d.k9)(r),placeholder:(0,d.t)("yourReCaptchaKey")}),x&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")}),(0,_.jsx)("br",{}),(0,_.jsx)(M.p,{dimension:"small",type:"text",value:l,onChange:(0,d.k9)(c),placeholder:(0,d.t)("yourReCaptchaSecret")}),g&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,d.t)("fillReCaptchaKeys")})]}),(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,_.jsx)(L.s,{id:"no-captcha",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"no-captcha",children:(0,d.t)("disable")})]})]})]})}function ne(){const e=(0,w.y3)("reinstall"),{notices:t}=(0,f.useContext)(n.F);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("reinstallTitle"),description:(0,d.t)("reinstallDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,_.jsx)(y.$,{type:"button",onClick:async()=>{if(window.confirm((0,d.t)("reinstallConfirmation"))){const i=await e();"SAVE_FAILED"===i.type?t.error(i.error.map((e=>(0,_.jsx)("p",{children:e}))),{scroll:!0}):window.location.href=`admin.php?page=${k.U.mainPageSlug}`}},automationId:"reinstall-button",variant:"destructive",children:(0,d.t)("reinstallNow")})})]})}function ae(){const e=(0,w.y3)("recalculateSubscribersScore"),{notices:t}=(0,f.useContext)(n.F);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("recalculateSubscribersScoreTitle"),description:(0,d.t)("recalculateSubscribersScoreDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,_.jsx)(y.$,{type:"button",onClick:async()=>{await e(),t.info((0,_.jsx)("p",{children:(0,d.t)("recalculateSubscribersScoreNotice")}),{scroll:!0})},variant:"secondary",dimension:"small",children:(0,d.t)("recalculateSubscribersScoreNow")})})]})}function oe(){const[e,t]=(0,w.iK)("logging");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("loggingTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("loggingDescription")," ",(0,_.jsx)("a",{href:"?page=mailpoet-logs",className:"mailpoet-link",children:(0,d.t)("loggingDescriptionLink")})]}),htmlFor:"logging-level"}),(0,_.jsx)(v,{children:(0,_.jsxs)(T.Select,{id:"logging-level",value:e,onChange:(0,d.k9)(t),automationId:"logging-select-box",isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"everything","data-automation-id":"log-everything",children:(0,d.t)("everythingLogOption")}),(0,_.jsx)("option",{value:"errors","data-automation-id":"log-errors",children:(0,d.t)("errorsLogOption")}),(0,_.jsx)("option",{value:"nothing","data-automation-id":"log-nothing",children:(0,d.t)("nothingLogOption")})]})})]})}function re(){const[e,t]=(0,w.iK)("bounce","address");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("bounceEmail"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("yourBouncedEmails")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/180-bounce-management-in-mailpoet-3",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readMore")})]}),htmlFor:"bounce-address"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"bounce-address",placeholder:"[email protected]","data-automation-id":"bounce-address-field",value:e,onChange:(0,d.k9)((0,d.Xv)(t))})})]})}function le(){const[e,t]=(0,w.iK)("captcha","on_register_forms","enabled"),i=(0,w.d4)("hasWooCommerce")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("captchaOnRegisterTitle"),description:(0,d.t)(i?"captchaOnRegisterWooActiveDescription":"captchaOnRegisterWooInactiveDescription"),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"captcha-on-register-enabled",value:"1",checked:"1"===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"captcha-on-register-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"captcha-on-register-disabled",value:"",checked:""===e,onCheck:t}),(0,_.jsx)("label",{htmlFor:"captcha-on-register-disabled",children:(0,d.t)("no")})]})]})}function ce(){const[e,t]=(0,w.iK)("subscription","pages","captcha");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Built-in CAPTCHA page","mailpoet"),description:(0,_.jsx)(_.Fragment,{children:F()((0,o.__)("Built-in CAPTCHA is shown when users need to verify they’re not a robot. You can customize this page by editing it in WordPress and using the [mailpoet_page] shortcode to display the CAPTCHA form.","mailpoet"),"[mailpoet_page]",(()=>(0,_.jsx)("code",{children:"[mailpoet_page]"},"mp")))}),htmlFor:"subscription-pages-captcha"}),(0,_.jsx)(v,{children:(0,_.jsx)(E,{value:e,preview:"captcha",setValue:t,id:"subscription-pages-captcha"})})]})}function me(){const[e,t]=(0,w.iK)("use_block_email_editor_for_automation_emails","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("useBlockEditorForAutomationTitle"),description:(0,d.t)("useBlockEditorForAutomationDescription"),htmlFor:""}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{id:"use-block-editor-for-automation-enabled",value:"1",checked:"1"===e,onCheck:t,automationId:"block-editor-for-automation-enabled"}),(0,_.jsx)("label",{htmlFor:"use-block-editor-for-automation-enabled",children:(0,d.t)("yes")}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)(L.s,{id:"use-block-editor-for-automation-disabled",value:"",checked:""===e,onCheck:t,automationId:"block-editor-for-automation-disabled"}),(0,_.jsx)("label",{htmlFor:"use-block-editor-for-automation-disabled",children:(0,d.t)("no")})]})]})}function de(){const[e]=(0,w.iK)("captcha","type");return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(re,{}),(0,_.jsx)(Y,{}),(0,_.jsx)(X,{}),(0,_.jsx)(Z,{}),(0,_.jsx)(J,{}),(0,_.jsx)(Q,{}),(0,_.jsx)(ae,{}),(0,_.jsx)(ee,{}),(0,_.jsx)(te,{}),(0,_.jsx)(ie,{}),(0,_.jsx)(se,{}),"built-in"===e&&(0,_.jsx)(ce,{}),(0,_.jsx)(le,{}),(0,_.jsx)(me,{}),(0,_.jsx)(ne,{}),(0,_.jsx)(oe,{}),(0,_.jsx)(N,{})]})}var pe=i(57232),he=i(37035),ue=i(59866),xe=i(54787);const ge=F()((0,d.t)("premiumTabDescription"),/\[link\](.*?)\[\/link\]/g,(e=>(0,_.jsx)("a",{href:"https://account.mailpoet.com/account?utm_source=plugin&utm_medium=settings&utm_campaign=activate-existing-plan&ref=settings-key-activation",target:"_blank",rel:"noopener noreferrer",children:e},"premium-tab-description"))),je=F()((0,d.t)("premiumTabGetKey"),/\[link\](.*?)\[\/link\]/g,(e=>(0,_.jsx)("a",{href:"https://account.mailpoet.com/account?utm_source=plugin&utm_medium=settings&utm_campaign=activate-existing-plan&ref=settings-key-activation",target:"_blank",rel:"noopener noreferrer",children:e},"premium-tab-get-key")));function _e({subscribersCount:e}){const t=(0,w.d4)("getKeyActivationState")(),i=(0,w.y3)("updateKeyActivationState"),s=(0,w.y3)("sendCongratulatoryMssEmail"),[n,a]=(0,w.iK)("sender","address"),[o,r]=(0,w.iK)("authorized_emails_addresses_check"),l=(0,w.y3)("setSaveDone"),c=(t.fromAddressModalCanBeShown||JSON.parse(sessionStorage.getItem("mailpoet_from_address_modal_can_be_shown")))&&t.mssStatus===pe.W0.VALID_MSS_ACTIVE&&(!n||o);return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(b,{htmlFor:"mailpoet_premium_key",title:(0,d.t)("premiumTabActivationKeyLabel"),description:(0,_.jsxs)(_.Fragment,{children:[ge,(0,_.jsx)("br",{}),(0,_.jsx)("br",{}),je,(0,_.jsx)("br",{}),(0,_.jsx)("br",{}),F()((0,d.t)("premiumTabGetPlan"),/\[link\](.*?)\[\/link\]/g,(t=>(0,_.jsx)("a",{href:`https://account.mailpoet.com/?s=${e}&utm_source=plugin&utm_medium=settings&utm_campaign=create-new-plan&ref=settings-key-activation`,target:"_blank",rel:"noopener noreferrer",children:t},"premium-tab-get-plan")))]})}),(0,_.jsxs)(v,{children:[(0,_.jsx)(xe.M,{}),(0,_.jsx)(ue.y,{label:(0,d.t)("premiumTabVerifyButton")})]}),c&&(0,_.jsx)(he.U,{onRequestClose:()=>{i({fromAddressModalCanBeShown:!1}),s(),sessionStorage.removeItem("mailpoet_from_address_modal_can_be_shown")},setAuthorizedAddress:async e=>{sessionStorage.removeItem("mailpoet_from_address_modal_can_be_shown"),await a(e),await r(null),l()}})]})}var be=i(65069);function ve(){const e=(0,j.Zp)(),t=(0,w.d4)("isMssActive")(),[i]=(0,w.iK)("mta","mailpoet_api_key"),{mssStatus:s,premiumStatus:n}=(0,w.d4)("getKeyActivationState")(),a=null!==s&&s!==pe.W0.INVALID,o=null!==n&&n!==pe.Ks.INVALID,r=window.mailpoet_free_plan_url,l=(0,w.y3)("setSetting"),c=(0,w.y3)("saveSettings");return(0,_.jsxs)("ul",{className:"mailpoet-sending-methods",children:[(0,_.jsx)("li",{children:(0,_.jsxs)("label",{className:"mailpoet-sending-method mailpoet-form-checkbox",children:[(0,_.jsx)("input",{type:"radio",checked:t,onChange:async s=>{s.preventDefault(),t||a||e("/premium"),!t&&a&&await(async()=>(await l(["mta_group"],"mailpoet"),await l(["mta","method"],"MailPoet"),await l(["mta","mailpoet_api_key"],i),await l(["signup_confirmation","enabled"],"1"),c()))()}}),(0,_.jsx)("span",{className:"mailpoet-form-radio-control"}),(0,_.jsx)("h4",{className:"mailpoet-h4",children:(0,d.t)("mssTitle")}),(0,_.jsx)("p",{children:t?(0,d.t)("youreSendingWithMss"):(0,d.t)("solveSendingProblems")}),(0,_.jsxs)("ul",{className:"mailpoet-sending-method-benefits mailpoet_success",children:[(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit1")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit2")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit3")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit4")}),(0,_.jsx)("li",{className:"mailpoet_success_item",children:(0,d.t)("mssBenefit5")})]}),!a&&!o&&(0,_.jsxs)("div",{className:"mailpoet-sending-method-actions",children:[(0,_.jsx)("a",{className:"mailpoet-button button-primary",href:r,rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("freeUpto")}),(0,_.jsxs)("span",{children:[" ",(0,d.t)("or")," "]}),F()((0,d.t)("enterYourKey"),/\[link\](.*?)\[\/link\]/g,((e,t)=>(0,_.jsx)(be.Link,{to:"/premium",className:"mailpoet-link",children:e},t)))]}),!a&&o&&(0,_.jsxs)("div",{className:"mailpoet-sending-method-actions",children:[(0,_.jsx)("i",{children:(0,d.t)("invalidKeyForMss")})," ",(0,_.jsx)("a",{className:"mailpoet-button button-primary",href:"https://account.mailpoet.com/",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("getPlan")})]})]})}),(0,_.jsx)("li",{children:(0,_.jsxs)("label",{className:"mailpoet-sending-method mailpoet-form-checkbox",children:[(0,_.jsx)("input",{type:"radio",checked:!t,onChange:t=>{t.preventDefault(),e("/mta/other")}}),(0,_.jsx)("span",{className:"mailpoet-form-radio-control"}),(0,_.jsx)("h4",{className:"mailpoet-h4",children:(0,d.t)("otherTitle")}),(0,_.jsxs)("p",{children:[(0,d.t)("sendViaHost")," ",(0,_.jsx)("strong",{children:(0,d.t)("notRecommended")})," ",(0,d.t)("orViaThirdParty")]}),(0,_.jsx)("div",{className:"mailpoet-sending-method-actions",children:(0,_.jsx)(be.Link,{to:"/mta/other",className:"mailpoet-link",children:(0,d.t)("configure")})})]})})]})}function fe(){const[e,t]=(0,w.iK)("smtp_provider"),[,i]=(0,w.iK)("mta_group"),[,s]=(0,w.iK)("mta","method");return(0,f.useEffect)((()=>{switch(e){case"server":i("website"),s("PHPMail");break;case"manual":i("smtp"),s("SMTP");break;case"AmazonSES":i("smtp"),s("AmazonSES");break;case"SendGrid":i("smtp"),s("SendGrid");break;default:s("PHPMail")}}),[e,i,s]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("method"),htmlFor:"mailpoet_smtp_method"}),(0,_.jsx)(v,{children:(0,_.jsxs)(T.Select,{id:"mailpoet_smtp_method",value:e,onChange:(0,d.k9)(t),isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"server",children:(0,d.t)("hostOption")}),(0,_.jsx)("option",{value:"manual",children:(0,d.t)("smtpOption")}),(0,_.jsxs)("optgroup",{label:(0,d.t)("selectProvider"),children:[(0,_.jsx)("option",{value:"AmazonSES",children:"Amazon SES"}),(0,_.jsx)("option",{value:"SendGrid",children:"SendGrid"})]})]})})]})}function ke(){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("spfTitle"),description:(0,d.t)("spfDescription"),htmlFor:""}),(0,_.jsx)(v,{children:(0,d.t)("spfSetup")})]})}var ye=i(62138),we=i(19669);function Ce(){const[e,t]=(0,f.useState)(window.mailpoet_current_user_email),[i]=(0,w.iK)("mta"),{state:s,error:n}=(0,w.d4)("getTestEmailState")(),a=(0,w.y3)("sendTestEmail");return(0,_.jsxs)(_.Fragment,{children:[s===pe.cP.SENDING&&(0,_.jsx)(m.R,{}),s===pe.cP.SUCCESS&&(0,_.jsx)(we.$,{type:"success",scroll:!0,children:(0,_.jsx)("p",{children:(0,d.t)("emailSent")})}),s===pe.cP.FAILURE&&(0,_.jsx)(we.$,{type:"error",scroll:!0,children:(0,_.jsx)("p",{children:n.map((e=>(0,_.jsx)("p",{children:e},e)))})}),(0,_.jsx)(b,{title:(0,d.t)("testSending"),htmlFor:"mailpoet_mta_test_email"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_mta_test_email",value:e,onChange:(0,d.k9)(t)}),(0,_.jsx)(y.$,{type:"button",dimension:"small",variant:"secondary",onClick:()=>a(e,i),children:(0,d.t)("sendTestEmail")}),(0,_.jsx)(ye.Tooltip,{tooltipId:"tooltip-settings-test",className:"mailpoet_tooltip_icon",tooltip:(0,_.jsx)("span",{style:{pointerEvents:"all"},children:F()((0,d.t)("testEmailTooltip"),/\[link\](.*?)\[\/link\]/g,((e,t)=>(0,_.jsx)("a",{className:"mailpoet-link",target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/146-the-newsletters-are-not-being-received",children:e},t)))})})]})]})}function Fe(){const e=(0,w.y3)("saveSettings"),t=(0,w.y3)("loadSettings"),i=(0,j.Zp)();return(0,_.jsxs)("div",{className:"mailpoet-settings-save",children:[(0,_.jsx)(y.$,{type:"button",onClick:async()=>{await e(),i("/mta")},children:(0,d.t)("activate")}),(0,_.jsx)(y.$,{onClick:async()=>{k.U.Modal.loading(!0),await t(),i("/mta"),k.U.Modal.loading(!1)},variant:"tertiary",children:(0,d.t)("orCancel")})]})}const Se=1440,Ne=86400;function Ke(e){const t=Math.floor(parseInt(e,10));return t>60?(0,d.t)("everyHours").replace("%1$d",""+t/60):60===t?(0,d.t)("everyHour"):t>1?(0,d.t)("everyMinutes").replace("%1$d",`${t}`):(0,d.t)("everyMinute")}function Ie({recommendedEmails:e,recommendedInterval:t}){const[i,s]=(0,w.iK)("mailpoet_sending_frequency"),[n,a]=(0,w.iK)("mta","frequency","emails"),[o,r]=(0,w.iK)("mta","frequency","interval");(0,f.useEffect)((()=>{"auto"===i&&(a(`${e}`),r(`${t}`))}),[i,e,t,a,r]);const l=Math.floor(Se*parseInt(n,10)/parseInt(o,10)),c=Math.floor(l/Ne*10)/10;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("sendingFrequency"),htmlFor:"mailpoet_sending_frequency"}),(0,_.jsxs)(v,{children:[(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsxs)(T.Select,{id:"mailpoet_sending_frequency",value:i,onChange:(0,d.k9)(s),dimension:"small",children:[(0,_.jsx)("option",{value:"auto",children:(0,d.t)("recommendedTitle")}),(0,_.jsx)("option",{value:"manual",children:(0,d.t)("ownFrequency")})]})}),"manual"===i&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row mailpoet-settings-inputs-row-centered",children:[(0,_.jsx)(M.p,{dimension:"small",id:"other_frequency_emails",type:"number",min:"1",max:"1000",value:n,onChange:(0,d.k9)(a)}),(0,_.jsx)("span",{className:"mailpoet-gap"}),(0,_.jsx)("span",{children:(0,d.t)("emails")})]}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsxs)(T.Select,{id:"other_frequency_interval",value:o,onChange:(0,d.k9)(r),dimension:"small",children:[(0,_.jsx)("option",{value:"1",children:"every minute"}),(0,_.jsx)("option",{value:"2",children:"every 2 minutes"}),(0,_.jsx)("option",{value:"5",children:"every 5 minutes (recommended)"}),(0,_.jsx)("option",{value:"10",children:"every 10 minutes"}),(0,_.jsx)("option",{value:"15",children:"every 15 minutes"}),(0,_.jsx)("option",{value:"30",children:"every 30 minutes"})]})})]}),"auto"===i&&(0,_.jsxs)("div",{className:"mailpoet-settings-inputs-row",children:[(0,d.t)("xEmails").replace("%1$s",n)," ",Ke(o),". "]}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:F()((0,d.t)("thatsXEmailsPerDay").replace("%1$s",l.toLocaleString()),/<strong>(.*?)<\/strong>/g,((e,t)=>(0,_.jsx)("strong",{children:e},t)))}),c>1&&(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsx)("span",{className:"mailpoet_emails_per_second_warning",children:F()((0,d.t)("thatsXEmailsPerSecond").replace("%1$s",c.toLocaleString()),/<strong>(.*?)<\/strong>/g,((e,t)=>(0,_.jsx)("strong",{children:e},t)))})}),"manual"===i&&(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:F()((0,d.t)("frequencyWarning").replace("%1$s",c.toLocaleString()),/<strong>(.*?)<\/strong>/g,((e,t)=>(0,_.jsx)("strong",{children:e},t)))})]})]})}function Te(){const[e,t]=(0,w.iK)("web_host"),i=(0,w.d4)("getWebHosts")(),s=i[e];return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("yourHost"),htmlFor:"mailpoet_web_host"}),(0,_.jsx)(v,{children:(0,_.jsx)(T.Select,{id:"mailpoet_web_host",value:e,onChange:(0,d.k9)(t),isMinWidth:!0,dimension:"small",children:Object.entries(i).map((([e,t])=>(0,_.jsx)("option",{value:e,children:t.name},e)))})}),(0,_.jsx)(Ie,{recommendedEmails:s.emails,recommendedInterval:s.interval})]})}function Ee(){const[e,t]=(0,w.iK)("mta","host"),[i,s]=(0,w.iK)("mta","port"),[n,a]=(0,w.iK)("mta","login"),[o,r]=(0,w.iK)("mta","password"),[l,c]=(0,w.iK)("mta","encryption"),[m,p]=(0,w.iK)("mta","authentication");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ie,{recommendedEmails:100,recommendedInterval:5}),(0,_.jsx)(b,{title:(0,d.t)("smtpHost"),description:(0,d.t)("smtpHostExample"),htmlFor:"mailpoet_smtp_host"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_smtp_host",value:e,onChange:(0,d.k9)(t)})}),(0,_.jsx)(b,{title:(0,d.t)("smtpPort"),htmlFor:"mailpoet_smtp_port"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_smtp_port",value:i,onChange:(0,d.k9)(s)})}),(0,_.jsx)(b,{title:(0,d.t)("login"),htmlFor:"mailpoet_smtp_login"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",id:"mailpoet_smtp_login",value:n,onChange:(0,d.k9)(a)})}),(0,_.jsx)(b,{title:(0,d.t)("password"),htmlFor:"mailpoet_smtp_password"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"password",id:"mailpoet_smtp_password",value:o,onChange:(0,d.k9)(r)})}),(0,_.jsx)(b,{title:(0,d.t)("secureConnectioon"),htmlFor:"mailpoet_smtp_encryption"}),(0,_.jsx)(v,{children:(0,_.jsxs)(T.Select,{id:"mailpoet_smtp_encryption",value:l,onChange:(0,d.k9)(c),isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"",children:(0,d.t)("no")}),(0,_.jsx)("option",{value:"ssl",children:"SSL"}),(0,_.jsx)("option",{value:"tls",children:"TLS"})]})}),(0,_.jsx)(b,{title:(0,d.t)("authentication"),description:(0,d.t)("authenticationDescription"),htmlFor:"mailpoet_smtp_authentication"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(L.s,{value:"1",checked:"1"===m,onCheck:p}),(0,d.t)("yes")," ",(0,_.jsx)(L.s,{value:"-1",checked:"-1"===m,onCheck:p}),(0,d.t)("no")]})]})}var Me=i(60008);function Ae(){const[e,t]=(0,w.iK)("mta","region"),[i,s]=(0,w.iK)("mta","access_key"),[n,a]=(0,w.iK)("mta","secret_key"),o=(0,w.d4)("getAmazonSesOptions")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ie,{recommendedEmails:o.emails,recommendedInterval:o.interval}),(0,_.jsx)(b,{title:(0,d.t)("region"),htmlFor:"mailpoet_amazon_ses_region"}),(0,_.jsx)(v,{children:(0,_.jsx)(T.Select,{id:"mailpoet_amazon_ses_region",value:e,onChange:(0,d.k9)(t),isMinWidth:!0,dimension:"small",children:Object.entries(o.regions).map((([e,t])=>(0,_.jsx)("option",{value:t,children:e},t)))})}),(0,_.jsx)(b,{title:(0,d.t)("accessKey"),htmlFor:"mailpoet_amazon_ses_access_key"}),(0,_.jsx)(v,{children:(0,_.jsx)(Me.yA,{dimension:"small",value:i,className:"regular-text",onChange:(0,d.k9)(s),id:"mailpoet_amazon_ses_access_key"})}),(0,_.jsx)(b,{title:(0,d.t)("secretKey"),htmlFor:"mailpoet_amazon_ses_secret_key"}),(0,_.jsx)(v,{children:(0,_.jsx)(Me.yA,{dimension:"small",value:n,className:"regular-text",onChange:(0,d.k9)(a),id:"mailpoet_amazon_ses_secret_key"})})]})}function De(){const[e,t]=(0,w.iK)("mta","api_key"),i=(0,w.d4)("getSendGridOptions")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ie,{recommendedEmails:i.emails,recommendedInterval:i.interval}),(0,_.jsx)(b,{title:(0,d.t)("apiKey"),htmlFor:"mailpoet_sendgrid_api_key"}),(0,_.jsx)(v,{children:(0,_.jsx)(Me.yA,{dimension:"small",value:e,onChange:(0,d.k9)(t),id:"mailpoet_sendgrid_api_key"})})]})}function Pe(){const[e]=(0,w.iK)("mta","method");return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(fe,{}),"PHPMail"===e&&(0,_.jsx)(Te,{}),"SMTP"===e&&(0,_.jsx)(Ee,{}),"AmazonSES"===e&&(0,_.jsx)(Ae,{}),"SendGrid"===e&&(0,_.jsx)(De,{}),(0,_.jsx)(ke,{}),(0,_.jsx)(Ce,{}),(0,_.jsx)(Fe,{})]})}function $e(){const{subPage:e}=(0,j.g)();return"other"===e?(0,_.jsx)(Pe,{}):(0,_.jsx)(ve,{})}function ze(){const e=(0,w.d4)("isMssActive")(),[t,i]=(0,w.iK)("signup_confirmation","enabled"),s=e=>{"1"===e&&window.confirm((0,d.t)("subscribersNeedToActivateSub"))&&i("1"),""===e&&window.confirm((0,d.t)("newSubscribersAutoConfirmed"))&&i("")};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("enableSignupConfTitle"),description:(0,_.jsxs)(_.Fragment,{children:[(0,d.t)("enableSignupConfDescription")," ",(0,_.jsx)("a",{className:"mailpoet-link",href:"https://kb.mailpoet.com/article/128-signup-confirmation-double-opt-in-feature",rel:"noopener noreferrer",target:"_blank",children:(0,d.t)("readAboutDoubleOptIn")})]}),htmlFor:"signup_confirmation-enabled"}),(0,_.jsx)(v,{children:e?(0,_.jsx)("p",{children:(0,d.t)("signupConfirmationIsMandatory")}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(L.s,{id:"signup_confirmation-enabled",checked:"1"===t,value:"1",onCheck:s,automationId:"enable_signup_confirmation"}),(0,d.t)("yes")," ",(0,_.jsx)(L.s,{checked:""===t,value:"",onCheck:s,automationId:"disable_signup_confirmation"}),(0,d.t)("no")]})})]})}function We(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("signup_confirmation","subject"),[s]=(0,w.iK)("signup_confirmation","use_mailpoet_editor");return e?"1"===s?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("emailSubject"),htmlFor:"signup_confirmation-subject"}),(0,_.jsx)(v,{children:(0,_.jsx)(M.p,{dimension:"small",type:"text",size:50,id:"signup_confirmation-subject","data-automation-id":"signup_confirmation_email_subject",value:t,onChange:(0,d.k9)(i)})})]}):null}var Re=i(33609);function Le(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("signup_confirmation","body"),[s]=(0,w.iK)("signup_confirmation","use_mailpoet_editor");if(!e)return null;if("1"===s)return null;const n=(0,d.t)("emailContentDescription").replace("[current_site_title]",window.mailpoet_current_site_title||"").split("<br />").filter((e=>e));return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("emailContent"),description:n.map((e=>(0,_.jsxs)("span",{children:[e,(0,_.jsx)("br",{}),(0,_.jsx)("br",{})]},e))),htmlFor:"signup_confirmation-body"}),(0,_.jsx)(v,{children:(0,_.jsx)(Re.T,{id:"signup_confirmation-body",cols:50,rows:15,"data-automation-id":"signup_confirmation_email_body",value:t,onChange:(0,d.k9)(i)})})]})}function Oe(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("subscription","pages","confirmation");return e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("confirmationPage"),description:(0,d.t)("confirmationPageDescription"),htmlFor:"subscription-pages-confirmation"}),(0,_.jsx)(v,{children:(0,_.jsx)(E,{value:t,preview:"confirm",setValue:i,id:"subscription-pages-confirmation",automationId:"page_selection",linkAutomationId:"preview_page_link"})})]}):null}function Be(){const[e]=(0,w.iK)("signup_confirmation","enabled"),[t,i]=(0,w.iK)("signup_confirmation","use_mailpoet_editor"),[s]=(0,w.iK)("signup_confirmation","transactional_email_id"),n=(0,w.y3)("openEmailCustomizer");return e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("emailCustomizerTitle"),description:(0,d.t)("emailCustomizerDescription"),htmlFor:"mailpoet_confirmation_email_customizer"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(P.S,{id:"mailpoet_confirmation_email_customizer",automationId:"mailpoet_confirmation_email_customizer",checked:"1"===t,onCheck:e=>i(e?"1":"")}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsx)(y.$,{type:"button",onClick:()=>n(s),variant:"secondary",dimension:"small",children:(0,d.t)("openTemplateEditor")})})]})]}):null}function Ve(){return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(ze,{}),(0,_.jsx)(Be,{}),(0,_.jsx)(We,{}),(0,_.jsx)(Le,{}),(0,_.jsx)(Oe,{}),(0,_.jsx)(N,{})]})}function Ue(){const[e,t]=(0,w.iK)("woocommerce","use_mailpoet_editor"),[i]=(0,w.iK)("woocommerce","transactional_email_id"),s=(0,w.y3)("openWoocommerceCustomizer");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("wcCustomizerTitle"),description:(0,d.t)("wcCustomizerDescription"),htmlFor:"mailpoet_wc_customizer"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(P.S,{id:"mailpoet_wc_customizer",automationId:"mailpoet_wc_customizer",checked:"1"===e,onCheck:e=>t(e?"1":"")}),(0,_.jsx)("div",{className:"mailpoet-settings-inputs-row",children:(0,_.jsx)(y.$,{type:"button",onClick:()=>s(i),variant:"secondary",dimension:"small",children:(0,d.t)("openTemplateEditor")})})]})]})}var qe=i(81448);function He(){const[e,t]=(0,w.iK)("woocommerce","optin_on_checkout","enabled"),[i,s]=(0,w.iK)("woocommerce","optin_on_checkout","segments"),[n,a]=(0,w.iK)("woocommerce","optin_on_checkout","message"),[r,l]=(0,w.iK)("woocommerce","optin_on_checkout","position"),c=(0,w.y3)("setErrorFlag"),m=""===n.trim();return(0,f.useEffect)((()=>{c(m)}),[m,c]),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Opt-in on checkout","mailpoet"),description:(0,o.__)('Customers can subscribe to the "WooCommerce Customers" list and optionally other lists via a checkbox on the checkout page.',"mailpoet"),htmlFor:"mailpoet_wc_checkout_optin"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(qe.Checkbox,{id:"mailpoet_wc_checkout_optin",automationId:"mailpoet_wc_checkout_optin",checked:"1"===e,onCheck:e=>t(e?"1":"")}),"1"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("br",{}),(0,_.jsxs)("label",{htmlFor:"mailpoet_wc_checkout_optin_segments",children:[(0,o.__)("Lists to also subscribe customers to:","mailpoet"),(0,_.jsx)("br",{}),(0,_.jsx)("span",{children:(0,o.__)('Leave empty to subscribe only to "WooCommerce Customers" list')})]}),(0,_.jsx)("br",{}),(0,_.jsx)(I,{id:"mailpoet_wc_checkout_optin_segments",value:i,setValue:s,placeholder:(0,o.__)("Select lists...","mailpoet")})]})]}),"1"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Checkbox opt-in message","mailpoet"),description:(0,o.__)('This is the checkbox message your customers will see on your WooCommerce checkout page to subscribe to the "WooCommerce Customers" list and lists selected in "Opt-in on checkout" setting.'),htmlFor:"mailpoet_wc_checkout_optin_message"}),(0,_.jsxs)(v,{children:[(0,_.jsx)(qe.Input,{dimension:"small",type:"text",id:"mailpoet_wc_checkout_optin_message","data-automation-id":"mailpoet_wc_checkout_optin_message",value:n,onChange:(0,qe.onChange)(a),placeholder:(0,o.__)("Checkbox opt-in message","mailpoet")}),(0,_.jsx)("br",{}),m&&(0,_.jsx)("span",{className:"mailpoet_error_item mailpoet_error",children:(0,o.__)("The checkbox opt-in message cannot be empty.","mailpoet")})]})]}),"1"===e&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,o.__)("Checkbox opt-in position","mailpoet"),description:(0,o.__)("Select where the marketing opt-in checkbox appears on the checkout page.","mailpoet"),htmlFor:"mailpoet_wc_checkout_optin_position"}),(0,_.jsx)(v,{children:(0,_.jsxs)(qe.Select,{id:"mailpoet_wc_checkout_optin_position",value:r,onChange:(0,qe.onChange)(l),automationId:"mailpoet_wc_checkout_optin_position",isMinWidth:!0,dimension:"small",children:[(0,_.jsx)("option",{value:"after_billing_info","data-automation-id":"after_billing_info",children:(0,o.__)("After billing info","mailpoet")}),(0,_.jsx)("option",{value:"after_order_notes","data-automation-id":"after_order_notes",children:(0,o.__)("After order notes","mailpoet")}),(0,_.jsx)("option",{value:"after_terms_and_conditions","data-automation-id":"after_terms_and_conditions",children:(0,o.__)("After terms and conditions","mailpoet")}),(0,_.jsx)("option",{value:"before_payment_methods","data-automation-id":"before_payment_methods",children:(0,o.__)("Before payment methods","mailpoet")}),(0,_.jsx)("option",{value:"before_terms_and_conditions","data-automation-id":"before_terms_and_conditions",children:(0,o.__)("Before terms and conditions","mailpoet")})]})})]})]})}function Ge(){const[e,t]=(0,w.iK)("mailpoet_subscribe_old_woocommerce_customers","enabled");return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(b,{title:(0,d.t)("subscribeOldWCTitle"),description:(0,d.t)("subscribeOldWCDescription"),htmlFor:"mailpoet_subscribe_old_wc_customers"}),(0,_.jsx)(v,{children:(0,_.jsx)(P.S,{id:"mailpoet_subscribe_old_wc_customers",automationId:"mailpoet_subscribe_old_wc_customers",checked:"1"===e,onCheck:e=>t(e?"1":"")})})]})}function Ye(){return(0,_.jsxs)("div",{className:"mailpoet-settings-grid",children:[(0,_.jsx)(Ue,{}),(0,_.jsx)(He,{}),(0,_.jsx)(Ge,{}),(0,_.jsx)(N,{})]})}var Xe=i(87948),Ze=i(98968);function Je(){const[e,t]=(0,f.useState)(!0);return e&&(0,_.jsxs)(Ze.A,{className:"mailpoet-welcome-wizard-confirmation-modal",title:(0,o.__)("Confirm sending service selection","mailpoet"),onRequestClose:()=>{},isDismissible:!1,children:[(0,_.jsx)("p",{children:(0,Xe.A)((0,o.__)('Your currently selected sending method is "MailPoet Sending Service". The API key you entered is not valid for sending with our sending service. You can either <link>upgrade to a subscription</link> that allows you to send with our service or choose a different sending service',"mailpoet"),{link:(0,_.jsxs)("a",{href:`https://account.mailpoet.com/?s=${window.mailpoet_subscribers_count}&utm_source=plugin&utm_medium=settings&utm_campaign=switch-to-sending-plan&ref=settings-key-activation`,target:"_blank",rel:"noopener noreferrer",children:[" "," "," "]})})}),(0,_.jsx)("div",{className:"mailpoet-welcome-wizard-confirmation-modal-buttons",children:(0,_.jsx)(qe.Button,{onClick:()=>{t(!1),window.location.href="admin.php?page=mailpoet-settings#/mta/other"},children:(0,o.__)("Update service settings","mailpoet")})})]})}const Qe=window.location.href.includes("/mta");function et(){const e=(0,w.d4)("isSaving")(),t=(0,w.d4)("hasWooCommerce")();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(u.V,{}),e&&(0,_.jsx)(m.R,{}),(0,_.jsx)(r.D,{}),(0,_.jsx)(c.q,{}),(0,_.jsx)(g.z,{heading:(0,o.__)("Settings","mailpoet")}),(0,_.jsx)(l.D,{}),(0,_.jsx)(x.O,{storeName:"mailpoet-settings"}),(0,_.jsxs)(p.k,{activeKey:"basics",children:[(0,_.jsx)(h.o,{route:"basics/:showModal?",title:(0,d.t)("basicsTab"),automationId:"basic_settings_tab",children:(0,_.jsx)(G,{})},"basics"),(0,_.jsx)(h.o,{title:(0,d.t)("signupConfirmationTab"),automationId:"signup_settings_tab",children:(0,_.jsx)(Ve,{})},"signup"),(0,_.jsx)(h.o,{route:"mta/:subPage?",title:(0,d.t)("sendWithTab"),automationId:"send_with_settings_tab",children:(0,_.jsx)($e,{})},"mta"),t&&(0,_.jsx)(h.o,{title:(0,d.t)("wooCommerceTab"),automationId:"woocommerce_settings_tab",children:(0,_.jsx)(Ye,{})},"woocommerce"),(0,_.jsx)(h.o,{title:(0,d.t)("advancedTab"),automationId:"settings-advanced-tab",children:(0,_.jsx)(de,{})},"advanced"),(0,_.jsx)(h.o,{title:(0,d.t)("keyActivationTab"),automationId:"activation_settings_tab",children:(0,_.jsx)(_e,{subscribersCount:window.mailpoet_subscribers_count})},"premium")]}),window.mailpoet_mss_active&&!window.mailpoet_mss_key_valid&&!Qe&&(0,_.jsx)(Je,{})]})}function tt(){return(0,_.jsx)(n.F.Provider,{value:(0,n.f)(window),children:(0,_.jsx)(et,{})})}const it=document.getElementById("settings_container");it&&((0,qe.registerTranslations)(),(0,a.k)(),(0,s.H)(it).render((0,_.jsx)(tt,{})))},41669:e=>{e.exports=jQuery}},e=>{e.O(0,[223],(()=>e(e.s=63008))),e.O()}]);
  • mailpoet/trunk/generated/FreeCachedContainer.php

    r3378624 r3381899  
    35733573    protected function getEmailEditorService()
    35743574    {
    3575         return $this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EmailEditor'] = new \MailPoet\EmailEditor\Integrations\MailPoet\EmailEditor(($this->services['MailPoet\\WP\\Functions'] ?? ($this->services['MailPoet\\WP\\Functions'] = new \MailPoet\WP\Functions())), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EmailApiController'] ?? $this->getEmailApiControllerService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EditorPageRenderer'] ?? $this->getEditorPageRendererService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EmailEditorPreviewEmail'] ?? $this->getEmailEditorPreviewEmailService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\Patterns\\PatternsController'] ?? $this->getPatternsControllerService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\Templates\\TemplatesController'] ?? $this->getTemplatesControllerService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\Cli'] ?? $this->getCliService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\PersonalizationTagManager'] ?? $this->getPersonalizationTagManagerService()));
     3575        return $this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EmailEditor'] = new \MailPoet\EmailEditor\Integrations\MailPoet\EmailEditor(($this->services['MailPoet\\WP\\Functions'] ?? ($this->services['MailPoet\\WP\\Functions'] = new \MailPoet\WP\Functions())), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EmailApiController'] ?? $this->getEmailApiControllerService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EditorPageRenderer'] ?? $this->getEditorPageRendererService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\EmailEditorPreviewEmail'] ?? $this->getEmailEditorPreviewEmailService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\Patterns\\PatternsController'] ?? $this->getPatternsControllerService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\Templates\\TemplatesController'] ?? $this->getTemplatesControllerService()), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\Cli'] ?? $this->getCliService()), ($this->services['MailPoet\\WPCOM\\DotcomHelperFunctions'] ?? ($this->services['MailPoet\\WPCOM\\DotcomHelperFunctions'] = new \MailPoet\WPCOM\DotcomHelperFunctions())), ($this->services['MailPoet\\EmailEditor\\Integrations\\MailPoet\\PersonalizationTagManager'] ?? $this->getPersonalizationTagManagerService()));
    35763576    }
    35773577
  • mailpoet/trunk/lang/mailpoet.pot

    r3378624 r3381899  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: MailPoet 5.16.1\n"
     5"Project-Id-Version: MailPoet 5.16.2\n"
    66"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
    77"Last-Translator: MailPoet i18n (https://www.transifex.com/organization/wysija)\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-10-13T14:20:07+00:00\n"
     12"POT-Creation-Date: 2025-10-21T08:34:10+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.10.0\n"
     
    649649#: lib/API/MP/v1/CustomFields.php:27
    650650#: lib/Automation/Integrations/WordPress/Subjects/UserSubject.php:63
    651 #: lib/EmailEditor/Integrations/MailPoet/EmailEditor.php:67
     651#: lib/EmailEditor/Integrations/MailPoet/EmailEditor.php:75
    652652#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:56
    653653#: lib/Form/Templates/Templates/InitialForm.php:22
     
    15031503#: views/newsletter/templates/blocks/products/settingsDisplayOptions.hbs:186
    15041504#: views/newsletter/templates/blocks/social/settingsIcon.hbs:42
    1505 #: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:98
    15061505#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:107
    15071506#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:116
     1507#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:125
    15081508msgid "Link"
    15091509msgstr ""
     
    88198819msgstr ""
    88208820
    8821 #: lib/Captcha/PageRenderer.php:82
     8821#: lib/Captcha/PageRenderer.php:76
     8822msgid "This is a preview of the CAPTCHA page."
     8823msgstr ""
     8824
     8825#: lib/Captcha/PageRenderer.php:77
     8826msgid "When users need to verify they’re not a robot, the CAPTCHA form will be displayed here."
     8827msgstr ""
     8828
     8829#: lib/Captcha/PageRenderer.php:90
    88228830msgid "Confirm you’re not a robot"
    88238831msgstr ""
     
    89178925#: lib/Config/Menu.php:229
    89188926#: lib/Config/Menu.php:230
    8919 #: lib/EmailEditor/Integrations/MailPoet/EmailEditor.php:66
     8927#: lib/EmailEditor/Integrations/MailPoet/EmailEditor.php:74
    89208928#: assets/dist/js/admin.js:2
    89218929#: assets/dist/js/automation_analytics.js:9
     
    1013110139#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:78
    1013210140#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:87
     10141#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:96
    1013310142#: lib/Newsletter/Shortcodes/ShortcodesHelper.php:114
    1013410143msgid "Site"
     
    1013610145
    1013710146#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:85
     10147msgid "Site Description"
     10148msgstr ""
     10149
     10150#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:94
    1013810151#: lib/Newsletter/Shortcodes/ShortcodesHelper.php:128
    1013910152msgid "Homepage URL"
    1014010153msgstr ""
    1014110154
    10142 #: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:96
     10155#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:105
    1014310156msgid "Unsubscribe URL"
    1014410157msgstr ""
    1014510158
    10146 #: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:105
     10159#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:114
    1014710160msgid "Manage subscription URL"
    1014810161msgstr ""
    1014910162
    10150 #: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:114
     10163#: lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php:123
    1015110164msgid "View in browser URL"
    1015210165msgstr ""
     
    1680316816
    1680416817#: assets/dist/js/settings.js:1
     16818msgid "Built-in CAPTCHA page"
     16819msgstr ""
     16820
     16821#: assets/dist/js/settings.js:1
     16822msgid "Built-in CAPTCHA is shown when users need to verify they’re not a robot. You can customize this page by editing it in WordPress and using the [mailpoet_page] shortcode to display the CAPTCHA form."
     16823msgstr ""
     16824
     16825#: assets/dist/js/settings.js:1
    1680516826msgid "Opt-in on checkout"
    1680616827msgstr ""
  • mailpoet/trunk/lib/Captcha/CaptchaUrlFactory.php

    r3209644 r3381899  
    6161  }
    6262
     63  public function getCaptchaPreviewUrl($post = null) {
     64    if ($post === null) {
     65      $post = $this->wp->getPost($this->settings->get('subscription.pages.captcha'));
     66    }
     67    if ($post === null) return;
     68
     69    $url = $this->wp->getPermalink($post);
     70
     71    // Use preview session ID for preview
     72    $data = [
     73      'captcha_session_id' => 'preview',
     74      'referrer_form' => self::REFERER_MP_FORM,
     75      'preview' => 1,
     76    ];
     77
     78    $params = [
     79      Router::NAME,
     80      'endpoint=' . CaptchaEndpoint::ENDPOINT,
     81      'action=' . CaptchaEndpoint::ACTION_RENDER,
     82      'data=' . Router::encodeRequestData($data),
     83    ];
     84
     85    $url .= (parse_url($url, PHP_URL_QUERY) ? '&' : '?') . join('&', $params);
     86
     87    $urlParams = parse_url($url);
     88    if (!is_array($urlParams) || empty($urlParams['scheme'])) {
     89      $url = $this->wp->getBloginfo('url') . $url;
     90    }
     91
     92    return $url;
     93  }
     94
    6395  private function getUrl(string $action, array $data) {
    6496    $post = $this->wp->getPost($this->settings->get('subscription.pages.captcha'));
  • mailpoet/trunk/lib/Captcha/PageRenderer.php

    r3328158 r3381899  
    7474    $this->assetsController->setupFrontEndDependencies();
    7575
    76     $content = $this->formRenderer->render($this->data);
    77     if (!$content) {
    78       return false;
     76    // For preview, show a placeholder message since we don't have a real captcha session
     77    if (isset($this->data['preview']) && $this->data['preview']) {
     78      $content = '<div class="mailpoet_captcha_preview">' .
     79        '<p>' . __('This is a preview of the CAPTCHA page.', 'mailpoet') . '</p>' .
     80        '<p>' . __('When users need to verify they’re not a robot, the CAPTCHA form will be displayed here.', 'mailpoet') . '</p>' .
     81        '</div>';
     82    } else {
     83      $content = $this->formRenderer->render($this->data);
     84      if (!$content) {
     85        return false;
     86      }
    7987    }
    8088
  • mailpoet/trunk/lib/EmailEditor/Integrations/MailPoet/EmailEditor.php

    r3350424 r3381899  
    99use MailPoet\EmailEditor\Integrations\MailPoet\Templates\TemplatesController;
    1010use MailPoet\WP\Functions as WPFunctions;
     11use MailPoet\WPCOM\DotcomHelperFunctions;
    1112
    1213class EmailEditor {
     
    2930  private TemplatesController $templatesController;
    3031
     32  private DotcomHelperFunctions $dotcomHelperFunctions;
     33
    3134  public function __construct(
    3235    WPFunctions $wp,
     
    3740    TemplatesController $templatesController,
    3841    Cli $cli,
     42    DotcomHelperFunctions $dotcomHelperFunctions,
    3943    PersonalizationTagManager $personalizationTagManager
    4044  ) {
     
    4549    $this->templatesController = $templatesController;
    4650    $this->cli = $cli;
     51    $this->dotcomHelperFunctions = $dotcomHelperFunctions;
    4752    $this->emailEditorPreviewEmail = $emailEditorPreviewEmail;
    4853    $this->personalizationTagManager = $personalizationTagManager;
     
    5661    $this->wp->addFilter('replace_editor', [$this, 'replaceEditor'], 10, 2);
    5762    $this->wp->addFilter('woocommerce_email_editor_send_preview_email', [$this->emailEditorPreviewEmail, 'sendPreviewEmail'], 10, 1);
    58     $this->patternsController->registerPatterns();
    59     $this->templatesController->initialize();
     63    // Skip classic patterns and templates in Garden environment.
     64    if (!$this->dotcomHelperFunctions->isGarden()) {
     65      $this->patternsController->registerPatterns();
     66      $this->templatesController->initialize();
     67    }
    6068    $this->extendEmailPostApi();
    6169    $this->personalizationTagManager->initialize();
  • mailpoet/trunk/lib/EmailEditor/Integrations/MailPoet/PersonalizationTagManager.php

    r3378624 r3381899  
    8686      ));
    8787      $registry->register(new Personalization_Tag(
     88        __('Site Description', 'mailpoet'),
     89        'mailpoet/site-description',
     90        __('Site', 'mailpoet'),
     91        [$this->site, 'getDescription'],
     92        [],
     93        null,
     94        [EmailEditor::MAILPOET_EMAIL_POST_TYPE]
     95      ));
     96      $registry->register(new Personalization_Tag(
    8897        __('Homepage URL', 'mailpoet'),
    8998        'mailpoet/site-homepage-url',
  • mailpoet/trunk/lib/EmailEditor/Integrations/MailPoet/PersonalizationTags/Site.php

    r3254132 r3381899  
    2525    return $this->wp->getBloginfo('url');
    2626  }
     27
     28  public function getDescription(array $context, array $args = []): string {
     29    return htmlspecialchars_decode($this->wp->getBloginfo('description'), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401);
     30  }
    2731}
  • mailpoet/trunk/lib/Newsletter/Listing/NewsletterListingRepository.php

    r3254132 r3381899  
    227227  protected function applyFilters(QueryBuilder $queryBuilder, array $filters) {
    228228    $segmentId = $filters['segment'] ?? null;
    229     if ($segmentId) {
     229    if ($segmentId && is_numeric($segmentId)) {
    230230      $queryBuilder
    231231        ->join('n.newsletterSegments', 'ns')
    232232        ->andWhere('ns.segment = :segmentId')
    233         ->setParameter('segmentId', $segmentId);
     233        ->setParameter('segmentId', (int)$segmentId);
     234    }
     235
     236    // Filter by sent_at/scheduled_at date
     237    $sentAtFrom = $filters['sent_at_from'] ?? null;
     238    if ($sentAtFrom && is_string($sentAtFrom) && $this->isValidDateTime($sentAtFrom)) {
     239      $subQueryFrom = $queryBuilder->getEntityManager()->createQueryBuilder()
     240        ->select('1')
     241        ->from('MailPoet\Entities\SendingQueueEntity', 'queueFrom')
     242        ->join('queueFrom.task', 'taskFrom')
     243        ->where('queueFrom.newsletter = n.id')
     244        ->andWhere('taskFrom.scheduledAt >= :sentAtFrom')
     245        ->getDQL();
     246
     247      $queryBuilder
     248        ->andWhere('(n.sentAt >= :sentAtFrom OR EXISTS (' . $subQueryFrom . '))')
     249        ->setParameter('sentAtFrom', $sentAtFrom);
     250    }
     251
     252    $sentAtTo = $filters['sent_at_to'] ?? null;
     253    if ($sentAtTo && is_string($sentAtTo) && $this->isValidDateTime($sentAtTo)) {
     254      $subQueryTo = $queryBuilder->getEntityManager()->createQueryBuilder()
     255        ->select('1')
     256        ->from('MailPoet\Entities\SendingQueueEntity', 'queueTo')
     257        ->join('queueTo.task', 'taskTo')
     258        ->where('queueTo.newsletter = n.id')
     259        ->andWhere('taskTo.scheduledAt <= :sentAtTo')
     260        ->getDQL();
     261
     262      $queryBuilder
     263        ->andWhere('(n.sentAt <= :sentAtTo OR EXISTS (' . $subQueryTo . '))')
     264        ->setParameter('sentAtTo', $sentAtTo);
     265    }
     266
     267    // Filter by segment IDs with advanced operators
     268    $segmentIds = $filters['segment_ids'] ?? null;
     269    if (!$segmentIds || !is_array($segmentIds)) {
     270      return;
     271    }
     272    $segmentIds = array_filter($segmentIds, 'is_numeric');
     273    $segmentIds = array_map('intval', $segmentIds);
     274    if (empty($segmentIds)) {
     275      return;
     276    }
     277
     278    $segmentOperator = $filters['segment_operator'] ?? null;
     279    if (!in_array($segmentOperator, ['isAny', 'isNone'], true)) {
     280      return;
     281    }
     282
     283    if ($segmentOperator === 'isAny') {
     284      $queryBuilder
     285        ->join('n.newsletterSegments', 'ns2')
     286        ->andWhere('ns2.segment IN (:segmentIds)')
     287        ->setParameter('segmentIds', $segmentIds);
     288    } elseif ($segmentOperator === 'isNone') {
     289      $subQuery = $queryBuilder->getEntityManager()->createQueryBuilder()
     290        ->select('1')
     291        ->from(NewsletterEntity::class, 'nNone')
     292        ->join('nNone.newsletterSegments', 'nsNone')
     293        ->where('nNone.id = n.id')
     294        ->andWhere('nsNone.segment IN (:segmentIdsNone)')
     295        ->getDQL();
     296      $queryBuilder
     297        ->andWhere('NOT EXISTS (' . $subQuery . ')')
     298        ->setParameter('segmentIdsNone', $segmentIds);
     299    }
     300  }
     301
     302  private function isValidDateTime(string $dateTime): bool {
     303    try {
     304      new \DateTime($dateTime);
     305      return true;
     306    } catch (\Exception $e) {
     307      return false;
    234308    }
    235309  }
  • mailpoet/trunk/lib/Settings/Pages.php

    r3320693 r3381899  
    121121  public static function getPageData($page) {
    122122    $subscriptionUrlFactory = Subscription\SubscriptionUrlFactory::getInstance();
     123    $captchaUrlFactory = \MailPoet\DI\ContainerWrapper::getInstance()->get(\MailPoet\Captcha\CaptchaUrlFactory::class);
    123124    return [
    124125      'id' => $page->ID,
     
    130131        'confirm_unsubscribe' => $subscriptionUrlFactory->getSubscriptionUrl($page, 'confirm_unsubscribe'),
    131132        're_engagement' => $subscriptionUrlFactory->getSubscriptionUrl($page, 're_engagement'),
     133        'captcha' => $captchaUrlFactory->getCaptchaPreviewUrl($page),
    132134      ],
    133135    ];
  • mailpoet/trunk/mailpoet.php

    r3378624 r3381899  
    66/*
    77 * Plugin Name: MailPoet
    8  * Version: 5.16.1
     8 * Version: 5.16.2
    99 * Plugin URI: https://www.mailpoet.com
    1010 * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
     
    2424
    2525$mailpoetPlugin = [
    26   'version' => '5.16.1',
     26  'version' => '5.16.2',
    2727  'filename' => __FILE__,
    2828  'path' => dirname(__FILE__),
  • mailpoet/trunk/readme.txt

    r3378624 r3381899  
    44Requires at least: 6.7
    55Tested up to: 6.8
    6 Stable tag: 5.16.1
     6Stable tag: 5.16.2
    77Requires PHP: 7.4
    88License: GPLv3
     
    228228== Changelog ==
    229229
    230 = 5.16.1 - 2025-10-13 =
    231 * Added: Add WooCommerce email for marketing confirmation;
    232 * Changed: Update automation editor UI for garden mode compatibility.
     230= 5.16.2 - 2025-10-20 =
     231* Added: setting to customize built-in CAPTCHA page.
    233232
    234233[See the changelog for all versions.](https://github.com/mailpoet/mailpoet/blob/trunk/mailpoet/changelog.txt)
  • mailpoet/trunk/vendor/composer/installed.php

    r3378624 r3381899  
    66 'pretty_version' => 'dev-trunk',
    77 'version' => 'dev-trunk',
    8  'reference' => 'f7e99ac11bd0ed54777e49eec6da702950b1f7dc',
     8 'reference' => '0602f5fb61dc5544b88cc24749ca36fa876b320e',
    99 'type' => 'library',
    1010 'install_path' => __DIR__ . '/../../',
     
    1616 'pretty_version' => 'dev-trunk',
    1717 'version' => 'dev-trunk',
    18  'reference' => 'f7e99ac11bd0ed54777e49eec6da702950b1f7dc',
     18 'reference' => '0602f5fb61dc5544b88cc24749ca36fa876b320e',
    1919 'type' => 'library',
    2020 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.