"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[9567,6716,3192,1699,8217,5228],{19567:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var a=n(51609),o=n(86087),l=n(56716),r=n(91699),c=n(3192),i=n(45111),s=n(27723),m=n(4219),d=n(99695),p=n(96979);const u=e=>{const{document:t}=e,{showSavedSettingsNotice:n}=(0,m.default)();let o="sync"===t.status?"green":"grey",l="sync"===t.status?(0,s.__)("Document is kept up to date by Complianz","complianz-gdpr"):(0,s.__)("Document is not kept up to date by Complianz","complianz-gdpr"),r=t.exists?"green":"grey",c=t.exists?(0,s.__)("Validated","complianz-gdpr"):(0,s.__)("Missing document","complianz-gdpr"),d=t.required?(0,s.__)("Click to copy the document shortcode","complianz-gdpr"):(0,s.__)("Not enabled","complianz-gdpr");return t.required&&t.exists||(r=o="grey",c=l=(0,s.__)("Not enabled","complianz-gdpr")),(0,a.createElement)("div",{className:"cmplz-single-document"},(0,a.createElement)("div",{className:"cmplz-single-document-title"},t.permalink&&(0,a.createElement)("a",{href:t.permalink},t.title),!t.permalink&&t.readmore&&(0,a.createElement)("a",{href:t.readmore},t.title),!t.permalink&&!t.readmore&&t.title),(0,a.createElement)(i.default,{name:"sync",color:o,tooltip:l,size:14}),(0,a.createElement)(i.default,{name:"circle-check",color:r,tooltip:c,size:14}),(0,a.createElement)("div",{onClick:e=>((e,t)=>{let a;e.target.classList.add("cmplz-click-animation");let o=window.document.createElement("input");window.document.getElementsByTagName("body")[0].appendChild(o),o.value=t,o.select();try{a=window.document.execCommand("copy")}catch(e){a=!1}o.parentElement.removeChild(o),a&&n((0,s.__)("Copied shortcode","complianz-gdpr"))})(e,t.shortcode)},(0,a.createElement)(i.default,{name:"shortcode",color:r,tooltip:d,size:14})))},g=()=>{const{region:e,documentDataLoaded:t,getDocuments:n,documents:i}=(0,l.default)(),{documentsChanged:s}=(0,p.UseDocumentsData)(),[m,g]=(0,o.useState)([]);return(0,o.useEffect)((()=>{t||n()}),[]),(0,o.useEffect)((()=>{t&&s&&n()}),[s]),(0,o.useEffect)((()=>{let t=i.filter((t=>t.region===e))[0];t&&(t=t.documents,g(t))}),[e,i]),t?(0,a.createElement)(a.Fragment,null,m.map(((e,t)=>(0,a.createElement)(u,{key:t,document:e}))),!cmplz_settings.is_premium&&(0,a.createElement)(r.default,null),cmplz_settings.is_premium&&(0,a.createElement)(c.default,null)):(0,a.createElement)(d.default,{lines:"3"})}},56716:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var a=n(81621),o=n(9588);const l=(0,a.vt)(((e,t)=>({documents:[],documentDataLoaded:!1,processingAgreementOptions:[],proofOfConsentOptions:[],dataBreachOptions:[],region:"",setRegion:t=>{"undefined"!=typeof Storage&&(sessionStorage.cmplzSelectedRegion=t),e((e=>({region:t})))},getRegion:()=>{let t="all";"undefined"!=typeof Storage&&sessionStorage.cmplzSelectedRegion&&(t=sessionStorage.cmplzSelectedRegion),e((e=>({region:t})))},getDocuments:async()=>{const{documents:t,processingAgreementOptions:n,proofOfConsentOptions:a,dataBreachOptions:l}=await o.doAction("documents_block_data").then((e=>e));e((e=>({documentDataLoaded:!0,documents:t,processingAgreementOptions:n,proofOfConsentOptions:a,dataBreachOptions:l})))}})))},3192:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var a=n(51609),o=n(27723),l=n(86087),r=n(56716),c=n(4219),i=n(98217);const s=()=>{const{getFieldValue:e,fields:t}=(0,c.default)(),[n,s]=(0,l.useState)(!1);(0,l.useEffect)((()=>{s(e("records_of_consent"))}),[t]);const{processingAgreementOptions:m,dataBreachOptions:d,proofOfConsentOptions:p}=(0,r.default)();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h3",{className:"cmplz-h4"},(0,o.__)("Other documents","complianz-gdpr")),(0,a.createElement)(i.default,{type:"processing-agreements",link:"#tools/processing-agreements",name:(0,o.__)("Processing Agreement","complianz-gdpr"),options:m}),(0,a.createElement)(i.default,{type:"data-breaches",link:"#tools/data-breach-reports",name:(0,o.__)("Data Breach","complianz-gdpr"),options:d}),(0,a.createElement)(i.default,{type:"proof-of-consent",link:n?"#tools/records-of-consent":"#tools/proof-of-consent",name:(0,o.__)("Proof of Consent","complianz-gdpr"),options:p}))}},91699:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(51609),o=n(27723),l=n(56716);const r=({document:e,index:t})=>{const{region:n}=(0,l.default)();let o=e.regions.filter((e=>e!==n));return(0,a.createElement)("div",{key:t,className:"cmplz-single-document-other-regions"},(0,a.createElement)("a",{href:e.readmore,target:"_blank",rel:"noopener noreferrer"},e.title),o.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"cmplz-region-indicator"},(0,a.createElement)("img",{alt:e,width:"16px",height:"16px",src:cmplz_settings.plugin_url+"/assets/images/"+e+".svg"})))))},c=()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"cmplz-document-header"},(0,a.createElement)("h3",{className:"cmplz-h4"},(0,o.__)("Other regions")),(0,a.createElement)("a",{href:"https://complianz.io/features/",target:"_blank",rel:"noopener noreferrer"},(0,o.__)("Read more","complianz-gdpr"))),[{id:"privacy-statement",title:"Privacy Statements",regions:["eu","us","uk","ca","za","au","br"],readmore:"https://complianz.io/definition/what-is-a-privacy-statement/"},{id:"cookie-statement",title:"Cookie Policy",regions:["eu","us","uk","ca","za","au","br"],readmore:" https://complianz.io/definition/what-is-a-cookie-policy/"},{id:"impressum",title:"Impressum",regions:["eu"],readmore:"https://complianz.io/definition/what-is-an-impressum/"},{id:"do-not-sell-my-info",title:"Opt-out preferences",regions:["us"],readmore:"https://complianz.io/definition/what-is-do-not-sell-my-personal-information/"},{id:"privacy-statement-for-children",title:"Privacy Statement for Children",regions:["us","uk","ca","za","au","br"],readmore:"https://complianz.io/definition/what-is-a-privacy-statement-for-children/"}].map(((e,t)=>(0,a.createElement)(r,{key:t,index:t,document:e}))))},98217:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(51609),o=n(45111),l=n(27723),r=n(86087),c=n(25228);const i=e=>{const[t,n]=(0,r.useState)(!1),[i,s]=(0,r.useState)(!1),[m,d]=(0,r.useState)(!1);(0,r.useEffect)((()=>{let t=e.options;if(0===t.length){let n={label:e.name,value:0};t.unshift(n)}else if(!t.filter((e=>0===e.value)).length>0){let n={label:e.name,value:0};t.unshift(n)}d(t)}),[e.options]);const p=()=>{if(i||!t||0===t)return;s(!0);let e=new XMLHttpRequest;e.responseType="blob",e.open("get",t,!0),e.send(),e.onreadystatechange=function(){if(4==this.readyState&&200==this.status){var e=window.URL.createObjectURL(this.response),n=window.document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",m.filter((e=>e.value===t))[0].label),window.document.body.appendChild(n),n.click(),setTimeout((function(){window.URL.revokeObjectURL(e)}),6e4)}},e.onprogress=function(e){s(!0)}};return(0,a.createElement)("div",{className:"cmplz-single-document-other-documents"},(0,a.createElement)(c.default,{onChange:e=>n(e),defaultValue:"0",canBeEmpty:!1,value:t,options:m}),(0,a.createElement)("div",{onClick:()=>p()},(0,a.createElement)(o.default,{name:"file-download",color:0==t||i?"grey":"black",tooltip:(0,l.__)("Download file","complianz-gdpr"),size:14})),m.length>0&&(0,a.createElement)("a",{href:e.link},(0,a.createElement)(o.default,{name:"circle-chevron-right",color:"black",tooltip:(0,l.__)("Go to overview","complianz-gdpr"),size:14})),0===m.length&&(0,a.createElement)("a",{href:e.link},(0,a.createElement)(o.default,{name:"plus",color:"black",tooltip:(0,l.__)("Create new","complianz-gdpr"),size:14})))}},25228:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(51609),o=n(86087),l=n(45296),r=n(45111),c=n(27723);const i=(0,o.memo)((({value:e=!1,onChange:t,required:n,defaultValue:o,disabled:i,options:s={},canBeEmpty:m=!0,label:d})=>{if(Array.isArray(s)){let e={};s.map((t=>{e[t.value]=t.label})),s=e}return m?(""===e||!1===e||0===e)&&(e="0",s={0:(0,c.__)("Select an option","complianz-gdpr"),...s}):e||(e=Object.keys(s)[0]),(0,a.createElement)("div",{className:"cmplz-input-group cmplz-select-group",key:d},(0,a.createElement)(l.bL,{value:e,defaultValue:o,onValueChange:t,required:n,disabled:i&&!Array.isArray(i)},(0,a.createElement)(l.l9,{className:"cmplz-select-group__trigger"},(0,a.createElement)(l.WT,null),(0,a.createElement)(r.default,{name:"chevron-down"})),(0,a.createElement)(l.UC,{className:"cmplz-select-group__content",position:"popper"},(0,a.createElement)(l.PP,{className:"cmplz-select-group__scroll-button"},(0,a.createElement)(r.default,{name:"chevron-up"})),(0,a.createElement)(l.LM,{className:"cmplz-select-group__viewport"},(0,a.createElement)(l.YJ,null,Object.entries(s).map((([e,t])=>(0,a.createElement)(l.q7,{disabled:Array.isArray(i)&&i.includes(e),className:"cmplz-select-group__item",key:e,value:e},(0,a.createElement)(l.p4,null,t)))))),(0,a.createElement)(l.wn,{className:"cmplz-select-group__scroll-button"},(0,a.createElement)(r.default,{name:"chevron-down"})))))}))}}]);