"use strict";(self.webpackChunkgravitysmtp=self.webpackChunkgravitysmtp||[]).push([[4832,4854,6558,8909],{18698:function(t,e,n){n.r(e),n.d(e,{AmazonAWSFullLogo:function(){return r.A},BrevoFullLogo:function(){return i.A},BrokenImageFull:function(){return o.A},CloudflareFullLogo:function(){return a.A},CustomSMTPFullLogo:function(){return u.A},ElasticEmailFullLogo:function(){return s.A},EmailitFullLogo:function(){return c.A},GoogleAltLogo:function(){return l.A},GoogleFullLogo:function(){return d.A},GravityFormsStackedLogo:function(){return p.A},GravitySMTPFullLogo:function(){return v.A},MailFailedBg:function(){return m.A},MailSuccessBg:function(){return b.A},MailchimpFullLogo:function(){return f.A},MailerSendFullLogo:function(){return g.A},MailgunFullLogo:function(){return A.A},MailjetFullLogo:function(){return _.A},MailtrapFullLogo:function(){return y.A},MicrosoftAltLogo:function(){return S.A},MicrosoftFullLogo:function(){return h.A},PHPFullLogo:function(){return w.A},PostmarkFullLogo:function(){return k.A},ResendFullLogo:function(){return O.A},SMTP2GOFullLogo:function(){return E.A},SMTPFullLogo:function(){return P.A},SendGridFullLogo:function(){return x.A},SparkPostFullLogo:function(){return z.A},WPMailSMTPFullLogo:function(){return B.A},ZohoAltLogo:function(){return j.A},ZohoFullLogo:function(){return C.A}});var r=n(61294),i=n(93015),o=n(79866),a=n(66470),u=n(59417),s=n(3108),c=n(68414),l=n(63660),d=n(57438),p=n(79124),v=n(10997),f=n(41921),g=n(25587),m=n(91570),A=n(67652),_=n(34981),b=n(89564),y=n(18673),S=n(40783),h=n(51511),w=n(69703),k=n(10162),O=n(95826),x=n(45279),E=n(63279),P=n(83197),z=n(47400),B=n(33653),j=n(64158),C=n(65911)},49445:function(t,e,n){var r=n(88856),i=n(90455),o=n(52888),a=n(8140),u=n(78564),s=n.n(u),c=n(27122),l=n.n(c),d=n(7175),p=n(6648),v=n(75195),f=n(35739),g=n(30242),m=n(5529),A=n(66598),_=n(83852),b=n(65224),y=n(18698),S=n(83707),h=n(93313),w=n(68381),k=n(57290),O=d.q_.useEffect,x=d.q_.useRef,E=d.q_.useState;e.default=function(t){var e,n,u,c=t.data,P=t.endpoints,z=t.i18n,B=z.debug_messages,j=void 0===B?{}:B,C=j.migrating_data,F=j.migrating_data_error,L=z.setup_wizard_next_button,M=z.setup_wizard_import_data_title,D=z.setup_wizard_import_data_copy,N=c.import_data,q=c.integrations,I=(0,k.default)(function(t){return t.activeStep}),T=(0,k.default)(function(t){return t.isAnimatedIn}),G=(0,k.default)(function(t){return t.importPlugin}),R=(0,k.default)(function(t){return t.setActiveStepNext}),J=(0,k.default)(function(t){return t.setHasDebugError}),U=(0,k.default)(function(t){return t.setImportPlugin}),H=(0,k.default)(function(t){return t.setIntegrationSettingsFormData}),W=(0,k.default)(function(t){return t.setSettingsUpdated}),V=(null==P||null===(e=P.migrate_settings)||void 0===e?void 0:e.action)||"",Z=(null==P||null===(n=P.migrate_settings)||void 0===n?void 0:n.nonce)||"",K=E(!1),Q=(0,a.A)(K,2),X=Q[0],Y=Q[1],$=function(t,e,n){t.forEach(function(t){var r,i;((null===(r=t.props)||void 0===r?void 0:r.name)===e||"InputGroup"===t.component&&(null===(i=t.props)||void 0===i?void 0:i.id)==="".concat(e,"_group"))&&("Toggle"===t.component?t.props.initialChecked=n:"InputGroup"===t.component?t.props.initialValue=n:t.props.value=n),t.fields&&$(t.fields,e,n)})},tt=function(t,e){t.forEach(function(t){var n=e[t.id];"object"!==(0,o.A)(n)||null===n||Array.isArray(n)||Object.entries(n).forEach(function(e){var n=(0,a.A)(e,2),r=n[0],i=n[1];t.settings&&Array.isArray(t.settings.fields)&&$(t.settings.fields,r,i)})})},et=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.entries(t).forEach(function(t){var e=(0,a.A)(t,2),n=e[0],r=e[1];"object"===(0,o.A)(r)&&null!==r&&!Array.isArray(r)&&Object.keys(r).length>0&&Object.entries(r).forEach(function(t){var e=(0,a.A)(t,2),r=e[0],i=e[1];H(n,r,i)})})},nt=function(){var t=(0,i.A)(s().mark(function t(){var e,n,r,i,o;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n={action:V,security:Z,plugin_to_migrate:G},t.next=4,(0,S.A)((0,f.nv)(C,JSON.stringify((0,h.A)(["security"],n))),"info");case 4:return t.next=6,(0,v.bE)({endpoint:l(),body:n});case 6:if(r=t.sent,Y(!1),null!=r&&null!==(e=r.data)&&void 0!==e&&e.success){t.next=15;break}return console.error(null==r?void 0:r.error),t.next=12,(0,S.A)((0,f.nv)(F,JSON.stringify(null==r?void 0:r.error)),"error");case 12:J(!0),t.next=19;break;case 15:et(null==r||null===(i=r.data)||void 0===i?void 0:i.data),tt(q,null==r||null===(o=r.data)||void 0===o?void 0:o.data),W(),(0,w.A)({key:"migrations_used",value:[G]});case 19:t.next=27;break;case 21:return t.prev=21,t.t0=t.catch(0),console.error(t.t0),t.next=26,(0,S.A)((0,f.nv)(F,JSON.stringify(t.t0)),"error");case 26:J(!0);case 27:case"end":return t.stop()}},t,null,[[0,21]])}));return function(){return t.apply(this,arguments)}}(),rt=N.filter(function(t){return t.activated}).map(function(t){var e="import_data_".concat(t.id),n=y["".concat(t.logo,"Logo")];return{id:e,labelAttributes:{label:t.title},name:"import_data",type:"image",value:t.id,children:d.q_.createElement(n,null)}}),it=x();O(function(){2===I&&it.current&&it.current.focus()},[I]);var ot,at={ref:(0,p.rM)(2===I&&T),className:(0,d.pS)((0,r.A)({"gravitysmtp-setup-wizard__screen":!0},"gravitysmtp-setup-wizard__screen--step-".concat(2),!0)),"aria-hidden":2!==I,"data-test-id":"setup-wizard-screen-02"},ut=(null===(u=N.filter(function(t){return t.activated&&t.initialChecked})[0])||void 0===u?void 0:u.id)||"";return d.q_.createElement("div",at,d.q_.createElement("div",{className:"gravitysmtp-setup-wizard__screen-inner"},d.q_.createElement(d.mM,{scrollableNodeProps:{ref:it}},d.q_.createElement("div",{className:"gravitysmtp-setup-wizard__content"},d.q_.createElement(g.A,{customClasses:["gravitysmtp-setup-wizard__content-header"],spacing:6},d.q_.createElement(m.A,{content:M,spacing:4,size:"display-sm",tagName:"h2",weight:"medium"}),d.q_.createElement(A.A,{content:D,spacing:8})),d.q_.createElement(_.A,{customClasses:["gravitysmtp-setup-wizard__content-cards","gform-grid--container","gform-grid--wrap","gform-grid--row-spacing-6","gform-grid--col-spacing-6"],data:rt,id:"import_data",inputType:"radio",initialValue:ut,onChange:function(t,e){return U(e.target.value)},useWrapper:!0,wrapperAttributes:{customClasses:["gravitysmtp-setup-wizard__content-card","gform-grid--item"]}}),d.q_.createElement(b.default,{i18n:z,backButtonCustomAttributes:{customAttributes:{"data-test-id":"setup-wizard-screen-02-back-button"}},nextButtonCustomAttributes:{disabled:!G||X,onClick:(ot=(0,i.A)(s().mark(function t(){return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return Y(!0),t.next=3,nt();case 3:R();case 4:case"end":return t.stop()}},t)})),function(){return ot.apply(this,arguments)}),active:X,activeType:"loader",activeText:L,icon:X?"":"arrow-narrow-right",lockSize:!0,customAttributes:{"data-test-id":"setup-wizard-screen-02-next-button"}},skipButtonCustomAttributes:{customAttributes:{"data-test-id":"setup-wizard-screen-02-skip-button"}}})))))}},53015:function(t,e,n){var r,i=n(40450),o=n.n(i),a=(null===(r=(0,n(35739).zj)(o(),"gravitysmtp_admin_config"))||void 0===r?void 0:r.common)||{};e.A=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(null==a||null===(t=a.data)||void 0===t||null===(t=t.locked_settings)||void 0===t?void 0:t.includes(e))||n}},57290:function(t,e,n){var r,i,o,a,u,s=n(88856),c=n(7175),l=n(6648),d=n(35739),p=n(40450),v=n.n(p);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function g(t){for(var e=1;e0&&void 0!==g[0]?g[0]:"",i=g.length>1&&void 0!==g[1]?g[1]:"debug",o=p.data,u=void 0===o?{}:o,c=p.endpoints,v=(null==(l=void 0===c?{}:c)||null===(e=l.log_debug_item)||void 0===e?void 0:e.action)||"",f=(null==l||null===(n=l.log_debug_item)||void 0===n?void 0:n.nonce)||"",null!=u&&u.debug_log_enabled&&v&&f&&r){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,(0,d.bE)({endpoint:s(),body:{action:v,security:f,message:r,priority:i}}).catch(function(t){console.error(t)});case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}},t)})),f.apply(this,arguments)}},93313:function(t,e,n){var r=n(52888),i=n(8140);e.A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"*",n=function(o){return Object.entries(o).reduce(function(o,a){var u=(0,i.A)(a,2),s=u[0],c=u[1];return"object"===(0,r.A)(c)&&null!==c?o[s]=n(c):t.includes(s)?o[s]=null===c?null:e.repeat(c.length):o[s]=c,o},Array.isArray(o)?[]:{})};return n(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}}]);