"use strict";(self.webpackChunkcomplianz_gdpr=self.webpackChunkcomplianz_gdpr||[]).push([[626,9091,756,2010],{10626:(e,a,t)=>{t.r(a),t.d(a,{default:()=>g});var n=t(51609),o=t(86087),l=t(9588),s=t(99091),c=t(27723),r=t(52010),i=t(45111),d=t(15139),m=t(52043),p=t(4219),_=t(80756),u=t(32828);const g=(0,o.memo)((()=>{const{setSyncProgress:e,fetchSyncProgressData:a}=(0,d.default)(),{initialLoadCompleted:t,loading:g,nextPage:f,progress:b,setProgress:k,cookies:z,fetchProgress:h,lastLoadedIframe:v,setLastLoadedIframe:E}=(0,s.UseCookieScanData)(),[y,w]=(0,o.useState)(!1),{addHelpNotice:C,fieldsLoaded:L}=(0,p.default)(),{selectedSubMenuItem:N}=(0,m.default)(),{setProgressLoaded:P}=(0,u.default)();(0,o.useEffect)((()=>{v!==f&&(y||(w(!0),S()))}),[f,v,y]),(0,o.useEffect)((()=>{!y&&!g&&b<100&&h()}),[y,g,b]),(0,o.useEffect)((()=>{L&&(void 0===window.canRunAds&&C("cookie_scan","warning",(0,c.__)("You are using an ad blocker. This will prevent most cookies from being placed. Please run the scan without an adblocker enabled.","complianz-gdpr"),(0,c.__)("Ad Blocker detected.","complianz-gdpr"),null),I()&&C("cookie_scan","warning",(0,c.__)("Your browser has the Do Not Track or Global Privacy Control setting enabled.","complianz-gdpr")+"&nbsp;"+(0,c.__)("This will prevent most cookies from being placed.","complianz-gdpr")+"&nbsp;"+(0,c.__)("Please run the scan with these browser options disabled.","complianz-gdpr"),(0,c.__)("DNT or GPC enabled.","complianz-gdpr"),null))}),[L]);const I=()=>{let e="doNotTrack"in navigator&&"1"===navigator.doNotTrack;return"globalPrivacyControl"in navigator&&navigator.globalPrivacyControl||e},S=()=>{if(!f)return void w(!1);let e=document.getElementById("cmplz_cookie_scan_frame");e||(e=document.createElement("iframe"),e.setAttribute("id","cmplz_cookie_scan_frame"),e.classList.add("hidden")),e.setAttribute("src",f),e.onload=function(e){setTimeout((()=>{w(!1),E(f)}),200)},document.body.appendChild(e)};if("cookie-scan"!==N)return null;let T=z?z.length:0,A="";A=0===T?(0,c.__)("No cookies found on your domain yet.","complianz-gdpr"):1===T?(0,c.__)("The scan found 1 cookie on your domain.","complianz-gdpr"):(0,c.__)("The scan found %s cookies on your domain.","complianz-gdpr").replace("%s",T),b>=100?T>0&&(A+=" "+(0,c.__)("Continue the wizard to categorize cookies and configure consent.","complianz-gdpr")):A+=" "+(0,c.__)("Scanning, %s complete.","complianz-gdpr").replace("%s",Math.round(b)+"%"),t||(A=(0,n.createElement)(i.default,{name:"loading",color:"grey"}));let D=b<100&&b>0;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"cmplz-table-header"},(0,n.createElement)("button",{disabled:D,className:"button button-default",onClick:t=>(async()=>{k(1),await l.doAction("scan",{scan_action:"restart"}),await h(),100===b&&(await a(),z.length>0&&e(1))})()},(0,c.__)("Scan","complianz-gdpr")),(0,n.createElement)("button",{disabled:D,className:"button button-default cmplz-reset-button",onClick:t=>(async()=>{k(1),await l.doAction("scan",{scan_action:"reset"}),await h(),100===b&&(P(!1),await a(),z.length>0&&e(1))})()},(0,c.__)("Clear Cookies","complianz-gdpr"))),(0,n.createElement)("div",{id:"cmplz-scan-progress"},(0,n.createElement)("div",{className:"cmplz-progress-bar",style:Object.assign({},{width:b+"%"})})),(0,n.createElement)("div",null,(0,n.createElement)("div",{className:"cmplz-panel__list"},(0,n.createElement)(r.default,{summary:A,details:(0,_.default)(t,z)}))))}))},99091:(e,a,t)=>{t.r(a),t.d(a,{UseCookieScanData:()=>l});var n=t(81621),o=t(9588);const l=(0,n.vt)(((e,a)=>({initialLoadCompleted:!1,setInitialLoadCompleted:a=>e({initialLoadCompleted:a}),iframeLoaded:!1,loading:!1,nextPage:!1,progress:0,cookies:[],lastLoadedIframe:"",setIframeLoaded:a=>e({iframeLoaded:a}),setLastLoadedIframe:a=>e((e=>({lastLoadedIframe:a}))),setProgress:a=>e({progress:a}),fetchProgress:()=>(e({loading:!0}),o.doAction("get_scan_progress",{}).then((a=>(e({initialLoadCompleted:!0,loading:!1,nextPage:a.next_page,progress:a.progress,cookies:a.cookies}),a))))})))},80756:(e,a,t)=>{t.r(a),t.d(a,{default:()=>o});var n=t(51609);const o=(e,a)=>(0,n.createElement)(n.Fragment,null,e&&a.map(((e,a)=>(0,n.createElement)("div",{key:a},e))))},52010:(e,a,t)=>{t.r(a),t.d(a,{default:()=>s});var n=t(51609),o=t(45111),l=t(86087);const s=e=>{const[a,t]=(0,l.useState)(!1);return(0,n.createElement)("div",{className:"cmplz-panel__list__item",style:e.style?e.style:{}},(0,n.createElement)("details",{open:a},(0,n.createElement)("summary",{onClick:e=>(e=>{e.preventDefault(),t(!a)})(e)},e.icon&&(0,n.createElement)(o.default,{name:e.icon}),(0,n.createElement)("h5",{className:"cmplz-panel__list__item__title"},e.summary),(0,n.createElement)("div",{className:"cmplz-panel__list__item__comment"},e.comment),(0,n.createElement)("div",{className:"cmplz-panel__list__item__icons"},e.icons),(0,n.createElement)(o.default,{name:"chevron-down",size:18})),(0,n.createElement)("div",{className:"cmplz-panel__list__item__details"},a&&e.details)))}}}]);