File: /home/exhehbu/wp/wp-content/plugins/complianz-gdpr/settings/build/3788.27ea499e7dfda7ca355f.js
"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[3788,4492,3452],{84492:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var l=t(51280),n=t(15832),i=t(93396),s=t(33452);const c=({plugin:e,processing:a})=>{const{pluginAction:t}=(0,s.default)();let c="grey",o=a||e.processing?"loading":"info";return"activated"===e.status&&(c="green",o="circle-check"),(0,l.createElement)("div",{className:"cmplz-onboarding-item"},(0,l.createElement)(n.default,{name:o,color:c,size:14}),e.description," ","not-installed"===e.status&&(0,l.createElement)("a",{href:"#",onClick:a=>(async e=>{await t(e,"install_plugin"),await t(e,"activate_plugin")})(e.slug)},!e.processing&&(0,i.__)("Install","complianz-gdpr"),e.processing&&(0,i.__)("Installing...","complianz-gdpr")),"installed"===e.status&&(0,l.createElement)("a",{href:"#",onClick:a=>(async e=>{await t(e,"activate_plugin")})(e.slug)},!e.processing&&(0,i.__)("Activate","complianz-gdpr"),e.processing&&(0,i.__)("Activating...","complianz-gdpr")),"activated"===e.status&&(0,i.__)("Installed!","complianz-gdpr"))}},73788:(e,a,t)=>{t.r(a),t.d(a,{default:()=>m});var l=t(51280),n=t(88496),i=t(93396),s=t(84492),c=t(33452),o=t(15832),r=t(25536);const m=()=>{const{email:e,setEmail:a,setIncludeTips:t,includeTips:m,sendTestEmail:p,saveEmail:d,setSendTestEmail:g,plugins:u,loaded:_,isUpgrade:h,processing:z,dismissModal:f,modalVisible:E,getRecommendedPluginsStatus:v}=(0,c.default)(),[b,w]=(0,n.useState)(0),{updateField:y}=(0,r.default)(),[k,T]=(0,n.useState)(!0),[C,N]=(0,n.useState)(!0),S=["plugins","email"],I=e=>0===e.length||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);if((0,n.useEffect)((()=>{_||v()}),[_]),(0,n.useEffect)((()=>{"plugins"===S[b]&&(N(!0),k||N(!1)),"email"===S[b]&&(N(!0),I(e)&&N(!1))}),[e,b,k]),(0,n.useEffect)((()=>{const e=setInterval((()=>{T(!1)}),2e3);return()=>clearInterval(e)}),[]),!E)return null;let A=I(e)?"cmplz-valid":"cmplz-invalid",P="email"===S[b]&&z?"cmplz-processing":"";return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"cmplz-modal-backdrop"}," "),(0,l.createElement)("div",{className:"cmplz-modal cmplz-onboarding"},(0,l.createElement)("div",{className:"cmplz-modal-header"},(0,l.createElement)("div",{className:"cmplz-modal-header-branding"},(0,l.createElement)("img",{className:"cmplz-header-logo",src:cmplz_settings.plugin_url+"assets/images/cmplz-logo.svg",alt:"Complianz logo"}),(0,l.createElement)("button",{type:"button",className:"cmplz-modal-close","data-dismiss":"modal","aria-label":"Close",onClick:()=>f()},(0,l.createElement)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",height:"24"},(0,l.createElement)("path",{fill:"#000000",d:"M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"})))),"plugins"===S[b]&&(0,l.createElement)("p",null,(0,i.__)("Take a quick tour to familiarize yourself with Complianz, or discover on your own pace. If you have any questions, let us know, but for now: ","complianz-gdpr")," ",(0,l.createElement)("a",{href:"https://complianz.io/meet-complianz-7/ref/76/?campaign=onboarding-zero",target:"_blank",rel:"noopener noreferrer"},(0,i.__)("Meet Complianz 7.0","complianz-gdpr"))),"email"===S[b]&&(0,l.createElement)("p",null,(0,i.__)("We use email notifications to explain important updates in your plugin settings. Add your email address below.","complianz-gdpr"))),(0,l.createElement)("div",{className:"cmplz-modal-content "+P},"plugins"===S[b]&&(0,l.createElement)(l.Fragment,null,u.map(((e,a)=>(0,l.createElement)(s.default,{key:a,plugin:e,processing:z}))),(0,l.createElement)("div",{className:"cmplz-onboarding-item"},(0,l.createElement)(o.default,{name:k?"loading":"circle-check",color:k?"grey":"green",size:14}),(k||!_)&&(0,i.__)("Upgrading","complianz-gdpr"),!k&&_&&(0,l.createElement)(l.Fragment,null,h&&(0,i.__)("Thanks for updating!","complianz-gdpr"),!h&&(0,i.__)("Thanks for installing!","complianz-gdpr")))),"email"===S[b]&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",null,(0,l.createElement)("input",{type:"email",className:A,value:e,placeholder:(0,i.__)("Your email address","complianz-gdpr"),onChange:e=>a(e.target.value)})),(0,l.createElement)("div",null,(0,l.createElement)("label",null,(0,l.createElement)("input",{onChange:e=>t(e.target.checked),type:"checkbox",checked:m}),(0,i.__)("Include 8 Tips & Tricks to get started with Complianz GDPR.","complianz-gdpr")," ",(0,l.createElement)("a",{href:"https://complianz.io/legal/privacy-statement/",target:"_blank",rel:"noopener noreferrer"},(0,i.__)("Privacy Statement","complianz-gdpr")))),(0,l.createElement)("div",null,(0,l.createElement)("label",null,(0,l.createElement)("input",{onChange:e=>g(e.target.checked),type:"checkbox",checked:p}),(0,i.__)("Send a notification test email - Notification emails are sent from your server.","complianz-gdpr"))))),(0,l.createElement)("div",{className:"cmplz-modal-footer"},b>0&&(0,l.createElement)("a",{href:"#",onClick:e=>w(b-1)},(0,i.__)("Previous","complianz-gdpr")),(0,l.createElement)("button",{type:"button",className:"button button-default",onClick:()=>f()},(0,i.__)("Dismiss","complianz-gdpr")),b<S.length-1&&(0,l.createElement)("button",{disabled:C,className:"button button-primary",onClick:e=>w(b+1)},(0,i.__)("Next","complianz-gdpr")),b===S.length-1&&(0,l.createElement)("a",{disabled:C,href:"#",onClick:a=>(async a=>{a.preventDefault(),await d(),I(e)&&e.length>0&&(y("notifications_email_address",e),y("send_notifications_email",!0)),f(),window.location.hash="#wizard"})(a),className:"button button-primary"},(0,i.__)("Start wizard","complianz-gdpr")),b===S.length-1&&(0,l.createElement)("a",{href:"#",onClick:e=>(e=>{e.preventDefault(),window.location.href=window.location.href.replace("onboarding","tour")})(e)},(0,i.__)("Take a tour","complianz-gdpr")))))}},33452:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var l=t(30809),n=t(524),i=t(93396),s=t(61744);const c=(0,l.Su)(((e,a)=>({loaded:!1,plugins:[{slug:"complianz-terms-conditions",description:(0,i.__)("Need Terms & Conditions? Configure now.","complianz-gdpr"),status:"not-installed",processing:!1},{slug:"burst-statistics",premium:"burst-pro",description:(0,i.__)("Privacy-Friendly Analytics? Here you go!","complianz-gdpr"),status:"not-installed",processing:!1},{slug:"really-simple-ssl",description:(0,i.__)("Really Simple Security? Install now!","complianz-gdpr"),status:"not-installed",processing:!1}],isUpgrade:!1,processing:!0,email:"",includeTips:!1,sendTestEmail:!0,actionStatus:"",modalVisible:!0,setIncludeTips:a=>{e((e=>({includeTips:a})))},setSendTestEmail:a=>{e((e=>({sendTestEmail:a})))},setEmail:a=>{e((e=>({email:a})))},dismissModal:()=>{const a=new URL(window.location.href);a.searchParams.delete("onboarding"),window.history.pushState({},"",a.href),e((e=>({modalVisible:!1})))},saveEmail:async()=>{let t={};t.email=a().email,t.includeTips=a().includeTips,t.sendTestEmail=a().sendTestEmail,e((e=>({processing:!0}))),await s.doAction("update_email",t).then((e=>e)),e((()=>({processing:!1})))},getRecommendedPluginsStatus:async()=>{const t={};t.plugins=a().plugins;const{plugins:l,isUpgrade:n}=await s.doAction("get_recommended_plugins_status",t).then((async e=>e));e({processing:!1,plugins:l,isUpgrade:n,loaded:!0})},setProcessing:(a,t)=>{e((0,n.Ut)((e=>{const l=e.plugins.findIndex((e=>e.slug===a));-1!==l&&(e.plugins[l].processing=t)})))},pluginAction:async(t,l)=>{const n={};n.slug=t,n.plugins=a().plugins,a().setProcessing(t,!0);const{plugins:i}=await s.doAction(l,n).then((async e=>e));e({plugins:i})}})))}}]);