Files
WEBtomaste/Atomaste Reference/public_html/wp-content/plugins/complianz-gdpr/settings/build/1677.86c36f078e0b19e9d573.js

1 line
19 KiB
JavaScript
Raw Normal View History

2025-12-10 12:17:30 -05:00
"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[1677,6231],{76231:(e,t,n)=>{n.r(t),n.d(t,{steps:()=>r,useNewOnboardingData:()=>c});var s=n(9588),i=n(81621),l=n(27723);const r={welcome:{title:(0,l.__)("Welcome to Complianz","complianz-gdpr"),prevButton:(0,l.__)("No, Thanks","complianz-gdpr"),nextButton:(0,l.__)("Continue","complianz-gdpr"),prevButtonGoTo:"newsletter",nextButtonGoTo:"terms"},terms:{title:(0,l.__)("Terms and Conditions","complianz-gdpr"),prevButton:(0,l.__)("Dismiss","complianz-gdpr"),nextButton:(0,l.__)("Continue","complianz-gdpr"),prevButtonGoTo:"newsletter",nextButtonGoTo:"newsletter"},newsletter:{title:(0,l.__)("Get tips and tricks","complianz-gdpr"),prevButton:(0,l.__)("Skip","complianz-gdpr"),nextButton:(0,l.__)("Continue","complianz-gdpr"),prevButtonGoTo:"plugins",nextButtonGoTo:"plugins"},plugins:{title:(0,l.__)("Install quickly for free","complianz-gdpr"),prevButton:(0,l.__)("Skip","complianz-gdpr"),nextButton:(0,l.__)("Continue","complianz-gdpr"),nextButtonSecondary:(0,l.__)("Install","complianz-gdpr"),nextButtonThird:(0,l.__)("Installing ...","complianz-gdpr"),prevButtonGoTo:"thankYou",nextButtonGoTo:"thankYou"},thankYou:{title:(0,l.__)("Youre almost there...","complianz-gdpr"),nextButton:(0,l.__)("Close","complianz-gdpr"),nextButtonGoTo:!1}},o=[{slug:"complianz-terms-conditions",description:(0,l.__)("Missing Terms & Conditions? Generate now","complianz-gdpr"),status:"not-installed",processing:!1},{slug:"really-simple-ssl",description:(0,l.__)("Really Simple Security? Lets go","complianz-gdpr"),status:"not-installed",processing:!1}],a=async(e,t,n,i)=>{i((e=>({plugins:e.plugins.map((e=>e.slug===n.slug?{...e,status:"processing"}:e))})));const l={slug:n.slug,plugins:e};try{let e="";if("install_plugin"===t){const i=await s.doAction(t,l);if(!i.request_success)throw new Error("API Error: installing plugin.");const r=i.plugins.find((e=>e.slug===n.slug)).status||"not-installed";if("not-installed"===r)throw new Error("Error installing plugin.");e=r}const r=await s.doAction("activate_plugin",l);if(!r.request_success)throw new Error("API Error: installing plugin.");const o=r.plugins.find((e=>e.slug===n.slug)).status;if("activated"!==o)throw new Error("Error activating plugin.");e=o,i((t=>({plugins:t.plugins.map((t=>t.slug===n.slug?{...t,status:e}:t))})))}catch(e){i({isInstalling:!1}),console.error("Plugin installation error:",e)}},c=(0,i.vt)(((e,t)=>({isModalOpen:!0,isOnboardingComplete:!1,currentStep:"welcome",stepProcessing:!1,isLoading:!1,isContentLoading:!0,setIsContentLoading:t=>e({isContentLoading:t}),nextStepDisabled:!1,prevStepDisabled:!1,wscEmail:"",enableWsc:!1,emailError:"",termsAccepted:!1,wscTerms:"",newsletterAccepted:!1,newsletterEmail:"",newsletterTerms:"",fetchError:!1,fetchErrorMessage:"",fetchDoc:async()=>{e({isLoading:!0,fetchError:!1,fetchErrorMessage:""});const n=t().currentStep;let i="terms"===n?"get_wsc_terms":"get_newsletter_terms";const r=await s.doAction(i);r.request_success||e({fetchError:!0,fetchErrorMessage:(0,l.__)("Something went wrong while downloading the document.","complianz-gdpr")});const o=r.doc;o?"terms"===n?e({wscTerms:o,isLoading:!1}):"newsletter"===n&&e({newsletterTerms:o,isLoading:!1}):e({fetchError:!0,fetchErrorMessage:(0,l.__)("Something went wrong while downloading the document.","complianz-gdpr"),isLoading:!1})},suggestedPlugins:o,plugins:[],fetchPlugins:async()=>{try{const t=await s.doAction("get_recommended_plugins_status",{plugins:o});if(!t.request_success)throw new Error("Error fetching.");const n=t.plugins.map((e=>({...e,checked:"activated"===e.status||!1,toProcess:!1})));e({plugins:n})}catch(e){throw new Error("Api error:",e)}},enablePluginInstallation:!1,isInstalling:!1,setWscEmail:t=>e({wscEmail:t}),setEnableWsc:t=>e({enableWsc:t}),setEmailError:t=>e({emailError:t}),setNewsletterEmail:t=>e({newsletterEmail:t}),setNextStepDisabled:t=>e({nextStepDisabled:t}),setPrevStepDisabled:t=>e({prevStepDisabled:t}),setPlugins:t=>e({plugins:t}),setEnablePluginInstallation:t=>e({enablePluginInstallation:t}),