@tantainnovative/ndpr-toolkit 3.10.3 → 3.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +256 -155
  2. package/README.md +6 -6
  3. package/dist/adapters.js +1 -1
  4. package/dist/adapters.mjs +1 -1
  5. package/dist/breach.js +1 -1
  6. package/dist/breach.mjs +1 -1
  7. package/dist/{chunk-EEQALYOY.mjs → chunk-25TNTLHJ.mjs} +1 -1
  8. package/dist/{chunk-GTYXVAJX.mjs → chunk-43OQNS2J.mjs} +3 -3
  9. package/dist/chunk-5EKQX6GM.mjs +1 -0
  10. package/dist/{chunk-W7OLQRJP.js → chunk-6GM2PBTF.js} +1 -1
  11. package/dist/{chunk-Q64735OC.js → chunk-6LJHLE6G.js} +8 -8
  12. package/dist/chunk-73BMSK67.js +1 -0
  13. package/dist/chunk-7PMPKVY3.mjs +1 -0
  14. package/dist/{chunk-EFIBHKQE.mjs → chunk-7RBO42IW.mjs} +1 -1
  15. package/dist/{chunk-RMQ7OLNY.mjs → chunk-BIJSMSUU.mjs} +8 -8
  16. package/dist/{chunk-7ZZO7GVB.js → chunk-C2KEXHRX.js} +1 -1
  17. package/dist/chunk-CNM6G5IA.js +1 -0
  18. package/dist/{chunk-UKLU6BQF.mjs → chunk-CWY2FMIC.mjs} +1 -1
  19. package/dist/{chunk-LVGT3DLT.js → chunk-D2ZKDQVL.js} +1 -1
  20. package/dist/chunk-D3DVVJCT.js +1 -0
  21. package/dist/{chunk-V3RYHNHN.js → chunk-EKNWO4DK.js} +1 -1
  22. package/dist/chunk-FMJ6ICLJ.js +1 -0
  23. package/dist/chunk-G7JKRYM5.mjs +1 -0
  24. package/dist/{chunk-R7545FP4.mjs → chunk-GEP52QFH.mjs} +1 -1
  25. package/dist/{chunk-P4LNLCSF.js → chunk-H3IULCE3.js} +1 -1
  26. package/dist/chunk-IPWX5I5P.mjs +2 -0
  27. package/dist/chunk-IVSNHT24.mjs +0 -0
  28. package/dist/{chunk-N3MQQUQP.js → chunk-JS7SYL5P.js} +0 -0
  29. package/dist/chunk-JWAN5J4Y.js +1 -0
  30. package/dist/{chunk-2MIQXECH.mjs → chunk-KE2FZH2V.mjs} +1 -1
  31. package/dist/chunk-KY6WYHWB.mjs +2 -0
  32. package/dist/chunk-MOHBL6LX.mjs +1 -0
  33. package/dist/{chunk-EFIWANHF.mjs → chunk-MTSZ7GL6.mjs} +1 -1
  34. package/dist/{chunk-Y3MKMAFQ.mjs → chunk-NBQQ2GN3.mjs} +1 -1
  35. package/dist/{chunk-UAV7V4EM.js → chunk-NDKDKDDX.js} +1 -1
  36. package/dist/{chunk-3GRGYT3P.js → chunk-NUOHT3LO.js} +1 -1
  37. package/dist/chunk-O2RDZGM2.js +2 -0
  38. package/dist/{chunk-LTPSN2SU.mjs → chunk-OLEUIYE2.mjs} +1 -1
  39. package/dist/{chunk-HXWHL4BD.js → chunk-QHW4UKGJ.js} +2 -2
  40. package/dist/chunk-R3CU7DTT.js +1 -0
  41. package/dist/{chunk-HWHBINVN.mjs → chunk-RBMLGRDN.mjs} +1 -1
  42. package/dist/{chunk-Z763UI5U.js → chunk-RC3XFXTJ.js} +1 -1
  43. package/dist/{chunk-QPRYXVH2.js → chunk-RDALAH3Y.js} +1 -1
  44. package/dist/{chunk-I3Y4LOSL.js → chunk-SSH4U4TJ.js} +3 -3
  45. package/dist/{chunk-PCU6GKBE.mjs → chunk-TAHSSITO.mjs} +1 -1
  46. package/dist/{chunk-ATFUSHC2.mjs → chunk-TDHH7GS2.mjs} +1 -1
  47. package/dist/chunk-TWJHEIQH.js +2 -0
  48. package/dist/{chunk-XS3Z4UT7.js → chunk-US2VGJ7I.js} +1 -1
  49. package/dist/{chunk-VYAL2TGT.mjs → chunk-UVXS7KRV.mjs} +1 -1
  50. package/dist/{chunk-7IFSWCQP.js → chunk-WKTKTLMF.js} +1 -1
  51. package/dist/chunk-WYH3OA5L.mjs +1 -0
  52. package/dist/{chunk-UASG46LP.mjs → chunk-XC3DLYEG.mjs} +1 -1
  53. package/dist/{chunk-TMXK4QKK.mjs → chunk-XN2UYZXH.mjs} +11 -11
  54. package/dist/{chunk-XO3VQYTL.js → chunk-YWCBI7SI.js} +11 -11
  55. package/dist/consent.js +1 -1
  56. package/dist/consent.mjs +1 -1
  57. package/dist/core.d.mts +2 -2
  58. package/dist/core.d.ts +2 -2
  59. package/dist/core.js +1 -1
  60. package/dist/core.mjs +1 -1
  61. package/dist/cross-border-lite.js +1 -1
  62. package/dist/cross-border-lite.mjs +1 -1
  63. package/dist/cross-border.d.mts +3 -3
  64. package/dist/cross-border.d.ts +3 -3
  65. package/dist/cross-border.js +1 -1
  66. package/dist/cross-border.mjs +1 -1
  67. package/dist/dpia.d.mts +3 -3
  68. package/dist/dpia.d.ts +3 -3
  69. package/dist/dsr.d.mts +1 -1
  70. package/dist/dsr.d.ts +1 -1
  71. package/dist/dsr.js +1 -1
  72. package/dist/dsr.mjs +1 -1
  73. package/dist/headless.d.mts +3 -3
  74. package/dist/headless.d.ts +3 -3
  75. package/dist/headless.js +1 -1
  76. package/dist/headless.mjs +1 -1
  77. package/dist/hooks.d.mts +3 -3
  78. package/dist/hooks.d.ts +3 -3
  79. package/dist/hooks.js +1 -1
  80. package/dist/hooks.mjs +1 -1
  81. package/dist/index.d.mts +7 -7
  82. package/dist/index.d.ts +7 -7
  83. package/dist/index.js +1 -1
  84. package/dist/index.mjs +1 -1
  85. package/dist/policy.js +1 -1
  86. package/dist/policy.mjs +1 -1
  87. package/dist/presets-consent.js +1 -1
  88. package/dist/presets-consent.mjs +1 -1
  89. package/dist/presets-dsr.js +1 -1
  90. package/dist/presets-dsr.mjs +1 -1
  91. package/dist/presets-policy.js +1 -1
  92. package/dist/presets-policy.mjs +1 -1
  93. package/dist/presets.d.mts +1 -1
  94. package/dist/presets.d.ts +1 -1
  95. package/dist/presets.js +1 -1
  96. package/dist/presets.mjs +1 -1
  97. package/dist/server.d.mts +2 -2
  98. package/dist/server.d.ts +2 -2
  99. package/dist/server.js +1 -1
  100. package/dist/server.mjs +1 -1
  101. package/dist/unstyled.d.mts +1 -1
  102. package/dist/unstyled.d.ts +1 -1
  103. package/dist/unstyled.js +1 -1
  104. package/dist/unstyled.mjs +1 -1
  105. package/package.json +4 -7
  106. package/dist/chunk-4QXTB3L6.js +0 -1
  107. package/dist/chunk-5IOC3VAW.js +0 -1
  108. package/dist/chunk-732C2EVN.js +0 -1
  109. package/dist/chunk-AOHKVFAS.mjs +0 -322
  110. package/dist/chunk-BFAX7JQA.mjs +0 -1
  111. package/dist/chunk-BRS52EDT.js +0 -1
  112. package/dist/chunk-LQTARVPU.mjs +0 -1
  113. package/dist/chunk-PL4XNCQA.mjs +0 -1
  114. package/dist/chunk-ROTLSZMV.js +0 -1
  115. package/dist/chunk-RYREGZVQ.js +0 -1
  116. package/dist/chunk-S6COXIZA.js +0 -2
  117. package/dist/chunk-U5RWJRGA.mjs +0 -1
  118. package/dist/chunk-W47OSMT6.js +0 -2
  119. package/dist/chunk-W65ZWTLD.mjs +0 -1
  120. package/dist/chunk-XJO4DH3L.mjs +0 -2
  121. package/dist/chunk-ZHFLBL63.mjs +0 -2
@@ -0,0 +1,2 @@
1
+ import {a as a$2}from'./chunk-EWVK45Z3.mjs';import {c}from'./chunk-25TNTLHJ.mjs';import {a}from'./chunk-SFGW37LE.mjs';import {a as a$1,b}from'./chunk-ZJYULEER.mjs';import {useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var fr=({categories:Ze,onSubmit:Ge,onValidationError:u,title:x,formDescription:C,submitButtonText:S,className:Q="",buttonClassName:X="",classNames:d={},unstyled:c$1=false,isSubmitting:f=false,showConfirmation:Ke=true,confirmationMessage:We="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:Je=true,maxAttachments:A=5,maxFileSize:D=5*1024*1024,allowedFileTypes:R=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:t,onReset:w})=>{var we,Fe,qe,Pe,ke,je,Te,Ie,Ee,Be,Me,$e,Oe,Le;let F=c(),Qe=(we=x!=null?x:F.breach.title)!=null?we:"Report a Data Breach",Xe=(Fe=C!=null?C:F.breach.description)!=null?Fe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",Ve=(qe=S!=null?S:F.breach.submitReport)!=null?qe:"Submit Report",V=r=>{if(!r)return "";let o=new Date(r),l=s=>String(s).padStart(2,"0");return `${o.getFullYear()}-${l(o.getMonth()+1)}-${l(o.getDate())}T${l(o.getHours())}:${l(o.getMinutes())}`},[q,ee]=useState((t==null?void 0:t.title)||""),[P,re]=useState((t==null?void 0:t.description)||""),[k,te]=useState((t==null?void 0:t.category)||""),[j,ie]=useState(V(t==null?void 0:t.discoveredAt)),[T,ae]=useState(V(t==null?void 0:t.occurredAt)),[I,ne]=useState(((Pe=t==null?void 0:t.reporter)==null?void 0:Pe.name)||""),[N,oe]=useState(((ke=t==null?void 0:t.reporter)==null?void 0:ke.email)||""),[E,se]=useState(((je=t==null?void 0:t.reporter)==null?void 0:je.department)||""),[B,de]=useState(((Te=t==null?void 0:t.reporter)==null?void 0:Te.phone)||""),[me,ce]=useState((t==null?void 0:t.affectedSystems)||[]),[er,pe]=useState(((Ie=t==null?void 0:t.affectedSystems)==null?void 0:Ie.join(", "))||""),[M,le]=useState((t==null?void 0:t.dataTypes)||[]),[h,ge]=useState((t==null?void 0:t.estimatedAffectedSubjects)!=null?String(t.estimatedAffectedSubjects):""),[$,be]=useState((t==null?void 0:t.approximateRecordCount)!=null?String(t.approximateRecordCount):""),[O,fe]=useState(((Ee=t==null?void 0:t.dataSubjectCategories)==null?void 0:Ee.join(", "))||""),[he,ve]=useState((Be=t==null?void 0:t.involvesSensitiveData)!=null?Be:false),[L,Ne]=useState((t==null?void 0:t.likelyConsequences)||""),[z,_e]=useState((t==null?void 0:t.mitigationMeasures)||""),[Y,ye]=useState(((Me=t==null?void 0:t.dpoContact)==null?void 0:Me.name)||""),[U,ue]=useState((($e=t==null?void 0:t.dpoContact)==null?void 0:$e.email)||""),[H,xe]=useState(((Oe=t==null?void 0:t.dpoContact)==null?void 0:Oe.phone)||""),[Z,Ce]=useState((Le=t==null?void 0:t.isPhasedReport)!=null?Le:false),[G,Se]=useState((t==null?void 0:t.supplementsReportId)||""),[Ae,De]=useState((t==null?void 0:t.status)||"ongoing"),[K,Re]=useState((t==null?void 0:t.initialActions)||""),[_,W]=useState([]),[rr,J]=useState(false),[a$3,v]=useState({}),tr=()=>{ee(""),re(""),te(""),ie(""),ae(""),ne(""),oe(""),se(""),de(""),ce([]),pe(""),le([]),ge(""),be(""),fe(""),ve(false),Ne(""),_e(""),ye(""),ue(""),xe(""),Ce(false),Se(""),De("ongoing"),Re(""),W([]),J(false),v({}),w==null||w();},ir=r=>{let o=r.target.value;pe(o);let l=o.split(",").map(s=>s.trim()).filter(Boolean);ce(l);},ar=r=>{le(o=>o.includes(r)?o.filter(l=>l!==r):[...o,r]);},nr=r=>{var ze;let o=r.target.files;if(!o)return;let l=[],s={};if(_.length+o.length>A){s.attachments=`Maximum of ${A} files allowed`,v(g=>a$1(a$1({},g),s));return}for(let g=0;g<o.length;g++){let y=o[g];if(y.size>D){s.attachments=`File ${y.name} exceeds the maximum size of ${D/(1024*1024)}MB`;continue}let Ye="."+((ze=y.name.split(".").pop())==null?void 0:ze.toLowerCase());if(!R.includes(Ye)){s.attachments=`File type ${Ye} is not allowed`;continue}l.push(y);}l.length>0&&W(g=>[...g,...l]),Object.keys(s).length>0?v(g=>a$1(a$1({},g),s)):v(g=>b(a$1({},g),{attachments:""}));},or=r=>{W(o=>o.filter((l,s)=>s!==r));},sr=()=>{let r={};return q.trim()||(r.breachTitle="Breach title is required"),P.trim()||(r.description="Description is required"),k||(r.category="Category is required"),j||(r.discoveredAt="Discovery date is required"),I.trim()||(r.reporterName="Reporter name is required"),N.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(N)||(r.reporterEmail="Reporter email is invalid"):r.reporterEmail="Reporter email is required",E.trim()||(r.reporterDepartment="Reporter department is required"),me.length===0&&(r.affectedSystems="At least one affected system is required"),M.length===0&&(r.dataTypes="At least one data type is required"),h&&isNaN(Number(h))&&(r.estimatedAffectedSubjects="Estimated affected subjects must be a number"),v(r),r},dr=r=>{r.preventDefault();let o=sr();if(Object.keys(o).length>0){u==null||u(o);return}let l={title:a$2(q),description:a$2(P),category:k,discoveredAt:new Date(j).getTime(),occurredAt:T?new Date(T).getTime():void 0,reportedAt:Date.now(),reporter:{name:a$2(I),email:a$2(N),department:a$2(E),phone:B?a$2(B):void 0},affectedSystems:me.map(s=>a$2(s)),dataTypes:M,estimatedAffectedSubjects:h?Number(h):void 0,approximateRecordCount:$?Number($):void 0,dataSubjectCategories:O?O.split(",").map(s=>a$2(s.trim())).filter(Boolean):void 0,involvesSensitiveData:he,likelyConsequences:L?a$2(L):void 0,mitigationMeasures:z?a$2(z):void 0,dpoContact:Y||U?{name:a$2(Y),email:a$2(U),phone:H?a$2(H):void 0}:void 0,isPhasedReport:Z||void 0,supplementsReportId:G?a$2(G):void 0,status:Ae,initialActions:K?a$2(K):void 0,attachments:_.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Ge(l),Ke&&J(true);};if(rr)return jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${Q}`,children:[jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsx("p",{className:"ndpr-text-success",children:We}),jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsx("p",{className:"ndpr-text-warning text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsx("button",{onClick:()=>J(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${X}`,children:"Report Another Breach"})]});let mr=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${Q}`,d.root,c$1),children:[jsx("h2",{className:a("ndpr-section-heading",d.title,c$1),children:Qe}),jsx("p",{className:"ndpr-card__subtitle",children:Xe}),jsx("form",{onSubmit:dr,className:a("",d.form,c$1),children:jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{className:a("",d.fieldGroup,c$1),children:[jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"breachTitle",className:a("ndpr-form-field__label",d.label,c$1),children:["Breach Title/Summary ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"breachTitle",value:q,onChange:r=>ee(r.target.value),className:a("ndpr-form-field__input",d.input,c$1),required:true,"aria-invalid":!!a$3.breachTitle,"aria-describedby":a$3.breachTitle?"breachTitle-error":void 0}),a$3.breachTitle&&jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a$3.breachTitle})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"category",className:a("ndpr-form-field__label",d.label,c$1),children:["Breach Category ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"category",value:k,onChange:r=>te(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),required:true,"aria-invalid":!!a$3.category,"aria-describedby":a$3.category?"category-error":void 0,children:[jsx("option",{value:"",children:"Select a category"}),Ze.map(r=>jsx("option",{value:r.id,children:r.name},r.id))]}),a$3.category&&jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a$3.category})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{htmlFor:"description",className:a("ndpr-form-field__label",d.label,c$1),children:["Detailed Description ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("textarea",{id:"description",value:P,onChange:r=>re(r.target.value),rows:4,className:a("ndpr-form-field__input",d.textarea,c$1),required:true,"aria-invalid":!!a$3.description,"aria-describedby":a$3.description?"description-error":void 0}),a$3.description&&jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a$3.description})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"datetime-local",id:"discoveredAt",value:j,onChange:r=>ie(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.discoveredAt,"aria-describedby":a$3.discoveredAt?"discoveredAt-error":void 0}),a$3.discoveredAt&&jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a$3.discoveredAt})]}),jsxs("div",{children:[jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsx("input",{type:"datetime-local",id:"occurredAt",value:T,onChange:r=>ae(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterName",value:I,onChange:r=>ne(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterName,"aria-describedby":a$3.reporterName?"reporterName-error":void 0}),a$3.reporterName&&jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterName})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:r=>oe(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterEmail,"aria-describedby":a$3.reporterEmail?"reporterEmail-error":void 0}),a$3.reporterEmail&&jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterEmail})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterDepartment",value:E,onChange:r=>se(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterDepartment,"aria-describedby":a$3.reporterDepartment?"reporterDepartment-error":void 0}),a$3.reporterDepartment&&jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterDepartment})]}),jsxs("div",{children:[jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsx("input",{type:"tel",id:"reporterPhone",value:B,onChange:r=>de(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"affectedSystems",value:er,onChange:ir,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.affectedSystems,"aria-describedby":a$3.affectedSystems?"affectedSystems-error":void 0}),a$3.affectedSystems&&jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a$3.affectedSystems})]}),jsxs("div",{children:[jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:h,onChange:r=>ge(r.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a$3.estimatedAffectedSubjects,"aria-describedby":a$3.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a$3.estimatedAffectedSubjects&&jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a$3.estimatedAffectedSubjects})]}),jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a$3.dataTypes,"aria-describedby":a$3.dataTypes?"dataTypes-error":void 0,children:[jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsx("span",{className:"sr-only",children:"(required)"})]}),jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:mr.map(r=>jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"checkbox",id:`dataType_${r.id}`,checked:M.includes(r.id),onChange:()=>ar(r.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:`dataType_${r.id}`,className:"ml-2 text-sm ndpr-text-muted",children:r.label})]},r.id))}),a$3.dataTypes&&jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a$3.dataTypes})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"status",value:Ae,onChange:r=>De(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),required:true,children:[jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsx("input",{type:"text",id:"approximateRecordCount",value:$,onChange:r=>be(r.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsx("input",{type:"text",id:"dataSubjectCategories",value:O,onChange:r=>fe(r.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:he,onChange:r=>ve(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsx("textarea",{id:"likelyConsequences",value:L,onChange:r=>Ne(r.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsx("textarea",{id:"mitigationMeasures",value:z,onChange:r=>_e(r.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsx("input",{type:"text",id:"dpoName",value:Y,onChange:r=>ye(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsx("input",{type:"email",id:"dpoEmail",value:U,onChange:r=>ue(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsx("input",{type:"tel",id:"dpoPhone",value:H,onChange:r=>xe(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsx("input",{id:"isPhasedReport",type:"checkbox",checked:Z,onChange:r=>Ce(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"isPhasedReport",className:"ml-2 text-sm ndpr-text-muted",children:"This is a phased / interim report (Section 40(2) \u2014 complete info not yet available)"})]}),Z&&jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsx("input",{type:"text",id:"supplementsReportId",value:G,onChange:r=>Se(r.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsx("textarea",{id:"initialActions",value:K,onChange:r=>Re(r.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)})]})]})]}),Je&&jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxs("div",{className:"ndpr-form-field",children:[jsx("label",{className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",A," files, ",D/(1024*1024),"MB each. Allowed types: ",R.join(", ")]}),jsx("input",{type:"file",onChange:nr,multiple:true,className:"ndpr-form-field__input",accept:R.join(",")}),a$3.attachments&&jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a$3.attachments})]}),_.length>0&&jsxs("div",{className:"ndpr-form-field",children:[jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsx("ul",{className:"ndpr-form-section",children:_.map((r,o)=>jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxs("div",{className:"flex items-center",children:[jsx("svg",{className:"w-4 h-4 ndpr-text-muted mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsx("span",{className:"text-sm ndpr-text-muted",children:r.name}),jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(r.size/1024).toFixed(1)," KB)"]})]}),jsxs("button",{type:"button",onClick:()=>or(o),"aria-label":`Remove attachment ${r.name}`,className:"text-red-500 hover:ndpr-text-destructive p-2 min-w-[44px] min-h-[44px] flex items-center justify-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxs("div",{className:a("ndpr-alert ndpr-alert--info",d.notice,c$1),children:[jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsx("p",{className:"ndpr-text-info text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxs("div",{className:"mt-6 relative flex gap-3",children:[f&&d.loadingOverlay&&jsx("div",{className:d.loadingOverlay}),jsx("button",{type:"submit",disabled:f,className:a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${X} ${f?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c$1),children:f?"Submitting...":Ve}),jsx("button",{type:"button",onClick:tr,disabled:f,className:a("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,c$1),children:"Reset"})]})]})})]})};
2
+ export{fr as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-7RBO42IW.mjs';import {useMemo}from'react';function c({input:e}){let p=JSON.stringify(e);return useMemo(()=>a(e),[p])}export{c as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-XJO4DH3L.mjs';import {d,a as a$1}from'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';var q=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 34(1)(a)\u2013(b)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 34(1)(c)",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 34(1)(d), Section 34(2)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 38",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 34(1)(e)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 36",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"withdraw_consent",name:"Withdraw My Consent",description:"Withdraw consent previously given for processing",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],C=({requestTypes:R=q,adapter:s,classNames:y,unstyled:S,onSubmit:u=()=>{},submitTo:n,submitOptions:e,onSubmitError:t,onSubmitSuccess:r})=>jsx(a,{requestTypes:R,onSubmit:a=>d(null,null,function*(){var d,c;if(n){let h=typeof(e==null?void 0:e.headers)=="function"?e.headers():(d=e==null?void 0:e.headers)!=null?d:{};try{let o=yield fetch(n,{method:"POST",headers:a$1({"Content-Type":"application/json"},h),credentials:(c=e==null?void 0:e.credentials)!=null?c:"same-origin",body:JSON.stringify(a)});if(!o.ok)t==null||t({response:o});else if(r){let l;try{let i=yield o.clone().text();i&&(l=JSON.parse(i));}catch(i){}r({response:o,data:a,body:l});}}catch(o){t==null||t({error:o});}}else s&&s.save(a);u(a);}),classNames:y,unstyled:S});export{C as a};
1
+ import {a}from'./chunk-IPWX5I5P.mjs';import {d,a as a$1}from'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';var q=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 34(1)(a)\u2013(b)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 34(1)(c)",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 34(1)(d), Section 34(2)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 38",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 34(1)(e)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 36",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"withdraw_consent",name:"Withdraw My Consent",description:"Withdraw consent previously given for processing",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],C=({requestTypes:R=q,adapter:s,classNames:y,unstyled:S,onSubmit:u=()=>{},submitTo:n,submitOptions:e,onSubmitError:t,onSubmitSuccess:r})=>jsx(a,{requestTypes:R,onSubmit:a=>d(null,null,function*(){var d,c;if(n){let h=typeof(e==null?void 0:e.headers)=="function"?e.headers():(d=e==null?void 0:e.headers)!=null?d:{};try{let o=yield fetch(n,{method:"POST",headers:a$1({"Content-Type":"application/json"},h),credentials:(c=e==null?void 0:e.credentials)!=null?c:"same-origin",body:JSON.stringify(a)});if(!o.ok)t==null||t({response:o});else if(r){let l;try{let i=yield o.clone().text();i&&(l=JSON.parse(i));}catch(i){}r({response:o,data:a,body:l});}}catch(o){t==null||t({error:o});}}else s&&s.save(a);u(a);}),classNames:y,unstyled:S});export{C as a};
@@ -1,4 +1,4 @@
1
- import {a as a$1}from'./chunk-RMQ7OLNY.mjs';import {a}from'./chunk-ZJYULEER.mjs';function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(e){let n=new Set,o=new RegExp(`${s(a$1)}([^${s("\xBB")}]+)${s("\xBB")}`,"g"),i;for(;(i=o.exec(e))!==null;)n.add(i[1].trim());let r=/\{\{\s*([^}\s]+)\s*\}\}/g;for(;(i=r.exec(e))!==null;)n.add(i[1].trim());return Array.from(n)}function P(e,n){if(typeof e=="string"){let o=e,i=n,r=o,c=/\{\{([^}]+)\}\}/g,d;for(;(d=c.exec(o))!==null;){let t=d[1].trim(),a=i[t]||"";r=r.replace(new RegExp(`\\{\\{\\s*${s(t)}\\s*\\}\\}`,"g"),a);}return r}else {let o=e,i=n,r={},c=[];return o.filter(t=>t.included).sort((t,a)=>(t.order||0)-(a.order||0)).forEach(t=>{let a=t.template||t.customContent||t.defaultContent||"",y=/\{\{([^}]+)\}\}/g,m,h=[];for(;(m=y.exec(a))!==null;)h.push(m[1].trim());h.forEach(l=>{let u="";l in i&&(u=i[l]||""),u||c.push(l),a=a.replace(new RegExp(`\\{\\{\\s*${s(l)}\\s*\\}\\}`,"g"),u);}),r[t.id]=a;}),{fullText:Object.values(r).join(`
1
+ import {a as a$1}from'./chunk-BIJSMSUU.mjs';import {a}from'./chunk-ZJYULEER.mjs';function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(e){let n=new Set,o=new RegExp(`${s(a$1)}([^${s("\xBB")}]+)${s("\xBB")}`,"g"),i;for(;(i=o.exec(e))!==null;)n.add(i[1].trim());let r=/\{\{\s*([^}\s]+)\s*\}\}/g;for(;(i=r.exec(e))!==null;)n.add(i[1].trim());return Array.from(n)}function P(e,n){if(typeof e=="string"){let o=e,i=n,r=o,c=/\{\{([^}]+)\}\}/g,d;for(;(d=c.exec(o))!==null;){let t=d[1].trim(),a=i[t]||"";r=r.replace(new RegExp(`\\{\\{\\s*${s(t)}\\s*\\}\\}`,"g"),a);}return r}else {let o=e,i=n,r={},c=[];return o.filter(t=>t.included).sort((t,a)=>(t.order||0)-(a.order||0)).forEach(t=>{let a=t.template||t.customContent||t.defaultContent||"",y=/\{\{([^}]+)\}\}/g,m,h=[];for(;(m=y.exec(a))!==null;)h.push(m[1].trim());h.forEach(l=>{let u="";l in i&&(u=i[l]||""),u||c.push(l),a=a.replace(new RegExp(`\\{\\{\\s*${s(l)}\\s*\\}\\}`,"g"),u);}),r[t.id]=a;}),{fullText:Object.values(r).join(`
2
2
 
3
3
  `),sectionTexts:r,missingVariables:Array.from(new Set(c))}}}var w=[{id:"data-collection",title:"Data Collection",description:"Describes what personal data is collected and how it is obtained.",order:1,required:true,included:true,template:'{{orgName}} ("we", "us", or "our") collects personal data from users of our services at {{website}}. We collect information you provide directly, such as your name, email address, phone number, and any other details you submit through forms or communications. We may also collect data automatically, including IP addresses, browser type, device information, and usage patterns through cookies and similar technologies. All data collection is conducted in accordance with the Nigeria Data Protection Act (NDPA) 2023.',variables:["orgName","website"]},{id:"legal-basis",title:"Legal Basis for Processing",description:"Specifies the lawful basis for processing personal data under the NDPA.",order:2,required:true,included:true,template:`{{orgName}} processes personal data under one or more of the following lawful bases as prescribed by the NDPA 2023:
4
4
 
@@ -1 +1 @@
1
- 'use strict';var chunk7IFSWCQP_js=require('./chunk-7IFSWCQP.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var d=react.createContext({}),s=class extends react.Component{constructor(e){super(e);this.reset=()=>{this.setState({error:null});};this.state={error:null};}static getDerivedStateFromError(e){return {error:e}}componentDidCatch(e,r){var a,t;(t=(a=this.props).onError)==null||t.call(a,e,r);}render(){let{error:e}=this.state;if(e){let{fallback:r}=this.props;return typeof r=="function"?r(e,this.reset):r!==void 0?r:jsxRuntime.jsxs("div",{role:"alert",style:{padding:"16px",border:"1px solid #e53e3e",borderRadius:"4px",backgroundColor:"#fff5f5",color:"#c53030"},children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px"},children:"Something went wrong"}),jsxRuntime.jsx("p",{style:{margin:0,fontSize:"14px"},children:e.message})]})}return this.props.children}},E=a=>{var t=a,{children:o,fallback:p,onError:e}=t,r=chunkRFPLZDIO_js.c(t,["children","fallback","onError"]);let l=react.useMemo(()=>{if(!r.theme)return;let n={};return r.theme.primary&&(n["--ndpr-primary"]=r.theme.primary),r.theme.primaryHover&&(n["--ndpr-primary-hover"]=r.theme.primaryHover),r.theme.primaryForeground&&(n["--ndpr-primary-foreground"]=r.theme.primaryForeground),Object.keys(n).length>0?n:void 0},[r.theme]);return jsxRuntime.jsx(d.Provider,{value:r,children:jsxRuntime.jsx(s,{fallback:p,onError:e,children:l?jsxRuntime.jsx("div",{style:l,children:o}):o})})};function v(){return react.useContext(d)}function D(){let{locale:o}=react.useContext(d);return react.useMemo(()=>chunk7IFSWCQP_js.b(o),[o])}exports.a=E;exports.b=v;exports.c=D;
1
+ 'use strict';var chunkWKTKTLMF_js=require('./chunk-WKTKTLMF.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var d=react.createContext({}),s=class extends react.Component{constructor(e){super(e);this.reset=()=>{this.setState({error:null});};this.state={error:null};}static getDerivedStateFromError(e){return {error:e}}componentDidCatch(e,r){var a,t;(t=(a=this.props).onError)==null||t.call(a,e,r);}render(){let{error:e}=this.state;if(e){let{fallback:r}=this.props;return typeof r=="function"?r(e,this.reset):r!==void 0?r:jsxRuntime.jsxs("div",{role:"alert",style:{padding:"16px",border:"1px solid #e53e3e",borderRadius:"4px",backgroundColor:"#fff5f5",color:"#c53030"},children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px"},children:"Something went wrong"}),jsxRuntime.jsx("p",{style:{margin:0,fontSize:"14px"},children:e.message})]})}return this.props.children}},E=a=>{var t=a,{children:o,fallback:p,onError:e}=t,r=chunkRFPLZDIO_js.c(t,["children","fallback","onError"]);let l=react.useMemo(()=>{if(!r.theme)return;let n={};return r.theme.primary&&(n["--ndpr-primary"]=r.theme.primary),r.theme.primaryHover&&(n["--ndpr-primary-hover"]=r.theme.primaryHover),r.theme.primaryForeground&&(n["--ndpr-primary-foreground"]=r.theme.primaryForeground),Object.keys(n).length>0?n:void 0},[r.theme]);return jsxRuntime.jsx(d.Provider,{value:r,children:jsxRuntime.jsx(s,{fallback:p,onError:e,children:l?jsxRuntime.jsx("div",{style:l,children:o}):o})})};function v(){return react.useContext(d)}function D(){let{locale:o}=react.useContext(d);return react.useMemo(()=>chunkWKTKTLMF_js.b(o),[o])}exports.a=E;exports.b=v;exports.c=D;
@@ -1 +1 @@
1
- 'use strict';var chunkQ64735OC_js=require('./chunk-Q64735OC.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');var x={saas:{id:"saas",label:"SaaS / B2B Software",description:"Multi-tenant cloud software. Account credentials, usage analytics, cross-border transfer to the SaaS vendor, automated processing for features like spam filtering or fraud scoring.",examples:["team collaboration tools","CRM","developer tools","workflow automation"]},ecommerce:{id:"ecommerce",label:"Ecommerce / Online Store",description:"Online retail. Customer identity, payment data, shipping address, cart abandonment cookies, marketing analytics, third-party payment processors.",examples:["online retail","D2C brand","marketplace","food delivery"]},school:{id:"school",label:"School / Education",description:"Educational institution or edtech platform. Student data including minors (NDPA Section 31 \u2014 parental consent required), academic records, attendance, behavioural data for learning analytics.",examples:["K-12 school","edtech app","tutoring platform","online courses"]},healthcare:{id:"healthcare",label:"Healthcare / HealthTech",description:"Medical practice, hospital, telemedicine, or health insurance. Sensitive personal data (NDPA Section 30 \u2014 medical), prescription history, insurance claims, biometric data.",examples:["hospital","telemedicine","pharmacy","health insurance"]},procurement:{id:"procurement",label:"Procurement / B2G",description:"Government procurement, vendor management, public-sector bidding. Vendor company data, tax IDs, beneficial-owner information, contract records, sometimes politically-exposed-person (PEP) data.",examples:["e-procurement portal","vendor registry","government supplier database"]}},a={fullName:"full-name",contactDetails:"contact-details",govIds:"government-ids",credentials:"account-credentials",payment:"payment-info",financialRecords:"financial-records",bvn:"bvn",device:"device-info",usage:"usage-data",location:"location-data",cookies:"cookies",health:"health-data",biometric:"biometric-data",children:"children"};function s(e){let t=new Set(e);return chunkQ64735OC_js.d.map(r=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{selected:t.has(r.id)}))}function h(e,t){var r,c,l,d,p,m;return t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{org:chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e.org),{name:(r=t.orgName)!=null?r:e.org.name,website:(c=t.website)!=null?c:e.org.website,privacyEmail:(l=t.privacyEmail)!=null?l:e.org.privacyEmail,address:(d=t.address)!=null?d:e.org.address,dpoName:(p=t.dpoName)!=null?p:e.org.dpoName,dpoEmail:(m=t.dpoEmail)!=null?m:e.org.dpoEmail})}):e}var f=["service_delivery","analytics","marketing","fraud_prevention"],y=["service_delivery","marketing","analytics","fraud_prevention","legal_compliance"],v=["service_delivery","analytics","legal_compliance"],C=["service_delivery","legal_compliance","research"],T=["service_delivery","legal_compliance","fraud_prevention"];function P(){let e=chunkQ64735OC_js.e();return e.org.industry="saas",e.org.orgSize="startup",e.dataCategories=s([a.fullName,a.contactDetails,a.credentials,a.device,a.usage,a.cookies]),e.purposes=f,e.hasChildrenData=false,e.hasSensitiveData=false,e.hasFinancialData=false,e.hasCrossBorderTransfer=true,e.hasAutomatedDecisions=false,e}function S(){let e=chunkQ64735OC_js.e();return e.org.industry="ecommerce",e.org.orgSize="midsize",e.dataCategories=s([a.fullName,a.contactDetails,a.payment,a.financialRecords,a.device,a.usage,a.location,a.cookies]),e.purposes=y,e.hasChildrenData=false,e.hasSensitiveData=false,e.hasFinancialData=true,e.hasCrossBorderTransfer=true,e.hasAutomatedDecisions=true,e}function D(){let e=chunkQ64735OC_js.e();return e.org.industry="education",e.org.orgSize="midsize",e.dataCategories=s([a.fullName,a.contactDetails,a.govIds,a.credentials,a.usage,a.cookies,a.children]),e.purposes=v,e.hasChildrenData=true,e.hasSensitiveData=false,e.hasFinancialData=false,e.hasCrossBorderTransfer=false,e.hasAutomatedDecisions=false,e}function E(){let e=chunkQ64735OC_js.e();return e.org.industry="healthcare",e.org.orgSize="enterprise",e.dataCategories=s([a.fullName,a.contactDetails,a.govIds,a.payment,a.health,a.biometric]),e.purposes=C,e.hasChildrenData=false,e.hasSensitiveData=true,e.hasFinancialData=true,e.hasCrossBorderTransfer=false,e.hasAutomatedDecisions=false,e}function O(){let e=chunkQ64735OC_js.e();return e.org.industry="government",e.org.orgSize="enterprise",e.dataCategories=s([a.fullName,a.contactDetails,a.govIds,a.financialRecords,a.bvn]),e.purposes=T,e.hasChildrenData=false,e.hasSensitiveData=false,e.hasFinancialData=true,e.hasCrossBorderTransfer=false,e.hasAutomatedDecisions=false,e}var g={saas:P,ecommerce:S,school:D,healthcare:E,procurement:O};function _(e,t){let r=g[e];if(!r)throw new Error(`[ndpr-toolkit] Unknown org template id: ${String(e)}. Expected one of: ${Object.keys(g).join(", ")}.`);return h(r(),t)}exports.a=x;exports.b=_;
1
+ 'use strict';var chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');var x={saas:{id:"saas",label:"SaaS / B2B Software",description:"Multi-tenant cloud software. Account credentials, usage analytics, cross-border transfer to the SaaS vendor, automated processing for features like spam filtering or fraud scoring.",examples:["team collaboration tools","CRM","developer tools","workflow automation"]},ecommerce:{id:"ecommerce",label:"Ecommerce / Online Store",description:"Online retail. Customer identity, payment data, shipping address, cart abandonment cookies, marketing analytics, third-party payment processors.",examples:["online retail","D2C brand","marketplace","food delivery"]},school:{id:"school",label:"School / Education",description:"Educational institution or edtech platform. Student data including minors (NDPA Section 31 \u2014 parental consent required), academic records, attendance, behavioural data for learning analytics.",examples:["K-12 school","edtech app","tutoring platform","online courses"]},healthcare:{id:"healthcare",label:"Healthcare / HealthTech",description:"Medical practice, hospital, telemedicine, or health insurance. Sensitive personal data (NDPA Section 30 \u2014 medical), prescription history, insurance claims, biometric data.",examples:["hospital","telemedicine","pharmacy","health insurance"]},procurement:{id:"procurement",label:"Procurement / B2G",description:"Government procurement, vendor management, public-sector bidding. Vendor company data, tax IDs, beneficial-owner information, contract records, sometimes politically-exposed-person (PEP) data.",examples:["e-procurement portal","vendor registry","government supplier database"]}},a={fullName:"full-name",contactDetails:"contact-details",govIds:"government-ids",credentials:"account-credentials",payment:"payment-info",financialRecords:"financial-records",bvn:"bvn",device:"device-info",usage:"usage-data",location:"location-data",cookies:"cookies",health:"health-data",biometric:"biometric-data",children:"children"};function s(e){let t=new Set(e);return chunk6LJHLE6G_js.d.map(r=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{selected:t.has(r.id)}))}function h(e,t){var r,c,l,d,p,m;return t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{org:chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e.org),{name:(r=t.orgName)!=null?r:e.org.name,website:(c=t.website)!=null?c:e.org.website,privacyEmail:(l=t.privacyEmail)!=null?l:e.org.privacyEmail,address:(d=t.address)!=null?d:e.org.address,dpoName:(p=t.dpoName)!=null?p:e.org.dpoName,dpoEmail:(m=t.dpoEmail)!=null?m:e.org.dpoEmail})}):e}var f=["service_delivery","analytics","marketing","fraud_prevention"],y=["service_delivery","marketing","analytics","fraud_prevention","legal_compliance"],v=["service_delivery","analytics","legal_compliance"],C=["service_delivery","legal_compliance","research"],T=["service_delivery","legal_compliance","fraud_prevention"];function P(){let e=chunk6LJHLE6G_js.e();return e.org.industry="saas",e.org.orgSize="startup",e.dataCategories=s([a.fullName,a.contactDetails,a.credentials,a.device,a.usage,a.cookies]),e.purposes=f,e.hasChildrenData=false,e.hasSensitiveData=false,e.hasFinancialData=false,e.hasCrossBorderTransfer=true,e.hasAutomatedDecisions=false,e}function S(){let e=chunk6LJHLE6G_js.e();return e.org.industry="ecommerce",e.org.orgSize="midsize",e.dataCategories=s([a.fullName,a.contactDetails,a.payment,a.financialRecords,a.device,a.usage,a.location,a.cookies]),e.purposes=y,e.hasChildrenData=false,e.hasSensitiveData=false,e.hasFinancialData=true,e.hasCrossBorderTransfer=true,e.hasAutomatedDecisions=true,e}function D(){let e=chunk6LJHLE6G_js.e();return e.org.industry="education",e.org.orgSize="midsize",e.dataCategories=s([a.fullName,a.contactDetails,a.govIds,a.credentials,a.usage,a.cookies,a.children]),e.purposes=v,e.hasChildrenData=true,e.hasSensitiveData=false,e.hasFinancialData=false,e.hasCrossBorderTransfer=false,e.hasAutomatedDecisions=false,e}function E(){let e=chunk6LJHLE6G_js.e();return e.org.industry="healthcare",e.org.orgSize="enterprise",e.dataCategories=s([a.fullName,a.contactDetails,a.govIds,a.payment,a.health,a.biometric]),e.purposes=C,e.hasChildrenData=false,e.hasSensitiveData=true,e.hasFinancialData=true,e.hasCrossBorderTransfer=false,e.hasAutomatedDecisions=false,e}function O(){let e=chunk6LJHLE6G_js.e();return e.org.industry="government",e.org.orgSize="enterprise",e.dataCategories=s([a.fullName,a.contactDetails,a.govIds,a.financialRecords,a.bvn]),e.purposes=T,e.hasChildrenData=false,e.hasSensitiveData=false,e.hasFinancialData=true,e.hasCrossBorderTransfer=false,e.hasAutomatedDecisions=false,e}var g={saas:P,ecommerce:S,school:D,healthcare:E,procurement:O};function _(e,t){let r=g[e];if(!r)throw new Error(`[ndpr-toolkit] Unknown org template id: ${String(e)}. Expected one of: ${Object.keys(g).join(", ")}.`);return h(r(),t)}exports.a=x;exports.b=_;
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkNDKDKDDX_js=require('./chunk-NDKDKDDX.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var fr=({categories:Ze,onSubmit:Ge,onValidationError:u,title:x,formDescription:C,submitButtonText:S,className:Q="",buttonClassName:X="",classNames:d={},unstyled:c=false,isSubmitting:f=false,showConfirmation:Ke=true,confirmationMessage:We="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:Je=true,maxAttachments:A=5,maxFileSize:D=5*1024*1024,allowedFileTypes:R=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:t,onReset:w})=>{var we,Fe,qe,Pe,ke,je,Te,Ie,Ee,Be,Me,$e,Oe,Le;let F=chunkNDKDKDDX_js.c(),Qe=(we=x!=null?x:F.breach.title)!=null?we:"Report a Data Breach",Xe=(Fe=C!=null?C:F.breach.description)!=null?Fe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",Ve=(qe=S!=null?S:F.breach.submitReport)!=null?qe:"Submit Report",V=r=>{if(!r)return "";let o=new Date(r),l=s=>String(s).padStart(2,"0");return `${o.getFullYear()}-${l(o.getMonth()+1)}-${l(o.getDate())}T${l(o.getHours())}:${l(o.getMinutes())}`},[q,ee]=react.useState((t==null?void 0:t.title)||""),[P,re]=react.useState((t==null?void 0:t.description)||""),[k,te]=react.useState((t==null?void 0:t.category)||""),[j,ie]=react.useState(V(t==null?void 0:t.discoveredAt)),[T,ae]=react.useState(V(t==null?void 0:t.occurredAt)),[I,ne]=react.useState(((Pe=t==null?void 0:t.reporter)==null?void 0:Pe.name)||""),[N,oe]=react.useState(((ke=t==null?void 0:t.reporter)==null?void 0:ke.email)||""),[E,se]=react.useState(((je=t==null?void 0:t.reporter)==null?void 0:je.department)||""),[B,de]=react.useState(((Te=t==null?void 0:t.reporter)==null?void 0:Te.phone)||""),[me,ce]=react.useState((t==null?void 0:t.affectedSystems)||[]),[er,pe]=react.useState(((Ie=t==null?void 0:t.affectedSystems)==null?void 0:Ie.join(", "))||""),[M,le]=react.useState((t==null?void 0:t.dataTypes)||[]),[h,ge]=react.useState((t==null?void 0:t.estimatedAffectedSubjects)!=null?String(t.estimatedAffectedSubjects):""),[$,be]=react.useState((t==null?void 0:t.approximateRecordCount)!=null?String(t.approximateRecordCount):""),[O,fe]=react.useState(((Ee=t==null?void 0:t.dataSubjectCategories)==null?void 0:Ee.join(", "))||""),[he,ve]=react.useState((Be=t==null?void 0:t.involvesSensitiveData)!=null?Be:false),[L,Ne]=react.useState((t==null?void 0:t.likelyConsequences)||""),[z,_e]=react.useState((t==null?void 0:t.mitigationMeasures)||""),[Y,ye]=react.useState(((Me=t==null?void 0:t.dpoContact)==null?void 0:Me.name)||""),[U,ue]=react.useState((($e=t==null?void 0:t.dpoContact)==null?void 0:$e.email)||""),[H,xe]=react.useState(((Oe=t==null?void 0:t.dpoContact)==null?void 0:Oe.phone)||""),[Z,Ce]=react.useState((Le=t==null?void 0:t.isPhasedReport)!=null?Le:false),[G,Se]=react.useState((t==null?void 0:t.supplementsReportId)||""),[Ae,De]=react.useState((t==null?void 0:t.status)||"ongoing"),[K,Re]=react.useState((t==null?void 0:t.initialActions)||""),[_,W]=react.useState([]),[rr,J]=react.useState(false),[a,v]=react.useState({}),tr=()=>{ee(""),re(""),te(""),ie(""),ae(""),ne(""),oe(""),se(""),de(""),ce([]),pe(""),le([]),ge(""),be(""),fe(""),ve(false),Ne(""),_e(""),ye(""),ue(""),xe(""),Ce(false),Se(""),De("ongoing"),Re(""),W([]),J(false),v({}),w==null||w();},ir=r=>{let o=r.target.value;pe(o);let l=o.split(",").map(s=>s.trim()).filter(Boolean);ce(l);},ar=r=>{le(o=>o.includes(r)?o.filter(l=>l!==r):[...o,r]);},nr=r=>{var ze;let o=r.target.files;if(!o)return;let l=[],s={};if(_.length+o.length>A){s.attachments=`Maximum of ${A} files allowed`,v(g=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},g),s));return}for(let g=0;g<o.length;g++){let y=o[g];if(y.size>D){s.attachments=`File ${y.name} exceeds the maximum size of ${D/(1024*1024)}MB`;continue}let Ye="."+((ze=y.name.split(".").pop())==null?void 0:ze.toLowerCase());if(!R.includes(Ye)){s.attachments=`File type ${Ye} is not allowed`;continue}l.push(y);}l.length>0&&W(g=>[...g,...l]),Object.keys(s).length>0?v(g=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},g),s)):v(g=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},g),{attachments:""}));},or=r=>{W(o=>o.filter((l,s)=>s!==r));},sr=()=>{let r={};return q.trim()||(r.breachTitle="Breach title is required"),P.trim()||(r.description="Description is required"),k||(r.category="Category is required"),j||(r.discoveredAt="Discovery date is required"),I.trim()||(r.reporterName="Reporter name is required"),N.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(N)||(r.reporterEmail="Reporter email is invalid"):r.reporterEmail="Reporter email is required",E.trim()||(r.reporterDepartment="Reporter department is required"),me.length===0&&(r.affectedSystems="At least one affected system is required"),M.length===0&&(r.dataTypes="At least one data type is required"),h&&isNaN(Number(h))&&(r.estimatedAffectedSubjects="Estimated affected subjects must be a number"),v(r),r},dr=r=>{r.preventDefault();let o=sr();if(Object.keys(o).length>0){u==null||u(o);return}let l={title:chunkUXUMYP4L_js.a(q),description:chunkUXUMYP4L_js.a(P),category:k,discoveredAt:new Date(j).getTime(),occurredAt:T?new Date(T).getTime():void 0,reportedAt:Date.now(),reporter:{name:chunkUXUMYP4L_js.a(I),email:chunkUXUMYP4L_js.a(N),department:chunkUXUMYP4L_js.a(E),phone:B?chunkUXUMYP4L_js.a(B):void 0},affectedSystems:me.map(s=>chunkUXUMYP4L_js.a(s)),dataTypes:M,estimatedAffectedSubjects:h?Number(h):void 0,approximateRecordCount:$?Number($):void 0,dataSubjectCategories:O?O.split(",").map(s=>chunkUXUMYP4L_js.a(s.trim())).filter(Boolean):void 0,involvesSensitiveData:he,likelyConsequences:L?chunkUXUMYP4L_js.a(L):void 0,mitigationMeasures:z?chunkUXUMYP4L_js.a(z):void 0,dpoContact:Y||U?{name:chunkUXUMYP4L_js.a(Y),email:chunkUXUMYP4L_js.a(U),phone:H?chunkUXUMYP4L_js.a(H):void 0}:void 0,isPhasedReport:Z||void 0,supplementsReportId:G?chunkUXUMYP4L_js.a(G):void 0,status:Ae,initialActions:K?chunkUXUMYP4L_js.a(K):void 0,attachments:_.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Ge(l),Ke&&J(true);};if(rr)return jsxRuntime.jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${Q}`,children:[jsxRuntime.jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsxRuntime.jsx("p",{className:"ndpr-text-success",children:We}),jsxRuntime.jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsxRuntime.jsx("p",{className:"ndpr-text-warning text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxRuntime.jsx("button",{onClick:()=>J(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${X}`,children:"Report Another Breach"})]});let mr=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${Q}`,d.root,c),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",d.title,c),children:Qe}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:Xe}),jsxRuntime.jsx("form",{onSubmit:dr,className:chunkAME4HJR4_js.a("",d.form,c),children:jsxRuntime.jsxs("div",{className:"ndpr-form-section",children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",d.fieldGroup,c),children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"breachTitle",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Breach Title/Summary ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"breachTitle",value:q,onChange:r=>ee(r.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.input,c),required:true,"aria-invalid":!!a.breachTitle,"aria-describedby":a.breachTitle?"breachTitle-error":void 0}),a.breachTitle&&jsxRuntime.jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a.breachTitle})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"category",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Breach Category ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsxs("select",{id:"category",value:k,onChange:r=>te(r.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.select,c),required:true,"aria-invalid":!!a.category,"aria-describedby":a.category?"category-error":void 0,children:[jsxRuntime.jsx("option",{value:"",children:"Select a category"}),Ze.map(r=>jsxRuntime.jsx("option",{value:r.id,children:r.name},r.id))]}),a.category&&jsxRuntime.jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a.category})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsxs("label",{htmlFor:"description",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Detailed Description ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"description",value:P,onChange:r=>re(r.target.value),rows:4,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c),required:true,"aria-invalid":!!a.description,"aria-describedby":a.description?"description-error":void 0}),a.description&&jsxRuntime.jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a.description})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"datetime-local",id:"discoveredAt",value:j,onChange:r=>ie(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.discoveredAt,"aria-describedby":a.discoveredAt?"discoveredAt-error":void 0}),a.discoveredAt&&jsxRuntime.jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a.discoveredAt})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsxRuntime.jsx("input",{type:"datetime-local",id:"occurredAt",value:T,onChange:r=>ae(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterName",value:I,onChange:r=>ne(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterName,"aria-describedby":a.reporterName?"reporterName-error":void 0}),a.reporterName&&jsxRuntime.jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterName})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:r=>oe(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterEmail,"aria-describedby":a.reporterEmail?"reporterEmail-error":void 0}),a.reporterEmail&&jsxRuntime.jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterEmail})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterDepartment",value:E,onChange:r=>se(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterDepartment,"aria-describedby":a.reporterDepartment?"reporterDepartment-error":void 0}),a.reporterDepartment&&jsxRuntime.jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterDepartment})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsxRuntime.jsx("input",{type:"tel",id:"reporterPhone",value:B,onChange:r=>de(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"affectedSystems",value:er,onChange:ir,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.affectedSystems,"aria-describedby":a.affectedSystems?"affectedSystems-error":void 0}),a.affectedSystems&&jsxRuntime.jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a.affectedSystems})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsxRuntime.jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:h,onChange:r=>ge(r.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a.estimatedAffectedSubjects,"aria-describedby":a.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a.estimatedAffectedSubjects&&jsxRuntime.jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a.estimatedAffectedSubjects})]}),jsxRuntime.jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a.dataTypes,"aria-describedby":a.dataTypes?"dataTypes-error":void 0,children:[jsxRuntime.jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsxRuntime.jsx("span",{className:"sr-only",children:"(required)"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:mr.map(r=>jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"checkbox",id:`dataType_${r.id}`,checked:M.includes(r.id),onChange:()=>ar(r.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:`dataType_${r.id}`,className:"ml-2 text-sm ndpr-text-muted",children:r.label})]},r.id))}),a.dataTypes&&jsxRuntime.jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a.dataTypes})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsxs("select",{id:"status",value:Ae,onChange:r=>De(r.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.select,c),required:true,children:[jsxRuntime.jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsxRuntime.jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsxRuntime.jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsxRuntime.jsx("input",{type:"text",id:"approximateRecordCount",value:$,onChange:r=>be(r.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsxRuntime.jsx("input",{type:"text",id:"dataSubjectCategories",value:O,onChange:r=>fe(r.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsxRuntime.jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:he,onChange:r=>ve(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsxRuntime.jsx("textarea",{id:"likelyConsequences",value:L,onChange:r=>Ne(r.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsxRuntime.jsx("textarea",{id:"mitigationMeasures",value:z,onChange:r=>_e(r.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsxRuntime.jsx("input",{type:"text",id:"dpoName",value:Y,onChange:r=>ye(r.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsxRuntime.jsx("input",{type:"email",id:"dpoEmail",value:U,onChange:r=>ue(r.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsxRuntime.jsx("input",{type:"tel",id:"dpoPhone",value:H,onChange:r=>xe(r.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsxRuntime.jsx("input",{id:"isPhasedReport",type:"checkbox",checked:Z,onChange:r=>Ce(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"isPhasedReport",className:"ml-2 text-sm ndpr-text-muted",children:"This is a phased / interim report (Section 40(2) \u2014 complete info not yet available)"})]}),Z&&jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsxRuntime.jsx("input",{type:"text",id:"supplementsReportId",value:G,onChange:r=>Se(r.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsxRuntime.jsx("textarea",{id:"initialActions",value:K,onChange:r=>Re(r.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)})]})]})]}),Je&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("label",{className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",A," files, ",D/(1024*1024),"MB each. Allowed types: ",R.join(", ")]}),jsxRuntime.jsx("input",{type:"file",onChange:nr,multiple:true,className:"ndpr-form-field__input",accept:R.join(",")}),a.attachments&&jsxRuntime.jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a.attachments})]}),_.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsxRuntime.jsx("ul",{className:"ndpr-form-section",children:_.map((r,o)=>jsxRuntime.jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 ndpr-text-muted mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsxRuntime.jsx("span",{className:"text-sm ndpr-text-muted",children:r.name}),jsxRuntime.jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(r.size/1024).toFixed(1)," KB)"]})]}),jsxRuntime.jsxs("button",{type:"button",onClick:()=>or(o),"aria-label":`Remove attachment ${r.name}`,className:"text-red-500 hover:ndpr-text-destructive p-2 min-w-[44px] min-h-[44px] flex items-center justify-center",children:[jsxRuntime.jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),jsxRuntime.jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--info",d.notice,c),children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.jsx("p",{className:"ndpr-text-info text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxRuntime.jsxs("div",{className:"mt-6 relative flex gap-3",children:[f&&d.loadingOverlay&&jsxRuntime.jsx("div",{className:d.loadingOverlay}),jsxRuntime.jsx("button",{type:"submit",disabled:f,className:chunkAME4HJR4_js.a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${X} ${f?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c),children:f?"Submitting...":Ve}),jsxRuntime.jsx("button",{type:"button",onClick:tr,disabled:f,className:chunkAME4HJR4_js.a("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,c),children:"Reset"})]})]})})]})};
2
+ exports.a=fr;
@@ -1 +1 @@
1
- import {a}from'./chunk-BFAX7JQA.mjs';import {jsx}from'react/jsx-runtime';var p=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],f=({extraOptions:a$1=[],options:t,adapter:n,position:o="bottom",classNames:l,unstyled:d,onSave:s,copy:e})=>{let m=t!=null?t:[...p,...a$1];return jsx(a,{options:m,onSave:i=>{n&&n.save(i),s==null||s(i);},position:o,classNames:l,unstyled:d,manageStorage:!n,title:e==null?void 0:e.title,description:e==null?void 0:e.description,acceptAllButtonText:e==null?void 0:e.acceptAll,rejectAllButtonText:e==null?void 0:e.rejectAll,customizeButtonText:e==null?void 0:e.customize,saveButtonText:e==null?void 0:e.save})};export{f as a};
1
+ import {a}from'./chunk-WYH3OA5L.mjs';import {jsx}from'react/jsx-runtime';var p=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],f=({extraOptions:a$1=[],options:t,adapter:n,position:o="bottom",classNames:l,unstyled:d,onSave:s,copy:e})=>{let m=t!=null?t:[...p,...a$1];return jsx(a,{options:m,onSave:i=>{n&&n.save(i),s==null||s(i);},position:o,classNames:l,unstyled:d,manageStorage:!n,title:e==null?void 0:e.title,description:e==null?void 0:e.description,acceptAllButtonText:e==null?void 0:e.acceptAll,rejectAllButtonText:e==null?void 0:e.rejectAll,customizeButtonText:e==null?void 0:e.customize,saveButtonText:e==null?void 0:e.save})};export{f as a};
@@ -1,3 +1,3 @@
1
- 'use strict';var chunkN3MQQUQP_js=require('./chunk-N3MQQUQP.js'),chunkQ64735OC_js=require('./chunk-Q64735OC.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');var nt=10,Rt="ndpr_policy_draft",_t=2e3;function st(){return `section_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function it(){return `draft_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function w(u,A,M){let S=Date.now();return {id:M,title:`Privacy Policy${u.org.name?` \u2014 ${u.org.name}`:""}`,templateId:"adaptive-policy-wizard",organizationInfo:{name:u.org.name,website:u.org.website,privacyEmail:u.org.privacyEmail,address:u.org.address,dpoName:u.org.dpoName,dpoEmail:u.org.dpoEmail,industry:u.org.industry},sections:A,variableValues:{},effectiveDate:S,lastUpdated:S,version:"1.0",applicableFrameworks:["ndpa","ndpr"]}}function Ut(u={}){var K;let{onComplete:A,onComplianceChange:M}=u,S=react.useRef((K=u.adapter)!=null?K:chunkVWED6UTN_js.a(Rt));u.adapter&&(S.current=u.adapter);let f=react.useRef(it()),[P,C]=react.useState(1),[n,v]=react.useState(()=>{var t;return (t=u.initialContext)!=null?t:chunkQ64735OC_js.e()}),[b,O]=react.useState([]),[x,I]=react.useState({}),[E,$]=react.useState([]),[at,q]=react.useState(false),[ct,z]=react.useState(null),[N,U]=react.useState(true),T=react.useRef(false),R=react.useRef(null);react.useEffect(()=>{let t=false,e=r=>{r&&(f.current=r.id,v(r.templateContext),O(r.customSections),I(r.sectionOverrides),$(r.sectionOrder),C(r.currentStep),z(r.lastSavedAt),q(true));};try{let r=S.current.load();r instanceof Promise?r.then(i=>{t||(e(i),U(!1));},()=>{t||U(!1);}):(e(r),U(!1));}catch(r){t||U(false);}return ()=>{t=true;}},[]);let d=react.useMemo(()=>{let e=chunkQ64735OC_js.c(n).map(o=>x[o.id]?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{template:x[o.id]}):o),r=b.map(o=>{var l;return {id:o.id,title:o.title,template:(l=x[o.id])!=null?l:o.content,order:o.order,required:false,included:true}}),i=[...e,...r];if(E.length>0){let o=new Map(E.map((l,p)=>[l,p]));return [...i].sort((l,p)=>{let m=o.has(l.id)?o.get(l.id):i.length,y=o.has(p.id)?o.get(p.id):i.length;return m-y})}return [...i].sort((o,l)=>{var p,m;return ((p=o.order)!=null?p:0)-((m=l.order)!=null?m:0)})},[n,b,x,E]),s=react.useMemo(()=>!n.org.name&&!n.org.privacyEmail?null:w(n,d,f.current),[n,d]),Y=react.useMemo(()=>w(chunkQ64735OC_js.e(),[],f.current),[]),V=react.useMemo(()=>chunkQ64735OC_js.f(s!=null?s:Y,n),[s,n,Y]),_=V.percentage,D=V.gaps,j=react.useRef({score:-1,gaps:[]});react.useEffect(()=>{let t=j.current;M&&(_!==t.score||D!==t.gaps)&&M(_,D),j.current={score:_,gaps:D};},[_,D,M]);let lt=react.useMemo(()=>{switch(P){case 1:return n.org.name.trim().length>0&&n.org.privacyEmail.trim().length>0;case 2:return n.dataCategories.some(t=>t.selected);case 3:return n.purposes.length>0;case 4:return true;default:return false}},[P,n]),dt=react.useCallback(t=>{let e=Math.min(Math.max(1,t),4);e<4&&(T.current=false),C(e);},[]),pt=react.useCallback(()=>{C(t=>Math.min(t+1,4));},[]),ut=react.useCallback(()=>{T.current=false,C(t=>Math.max(t-1,1));},[]),mt=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},e),t));},[]),gt=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{org:chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},e.org),t)}));},[]),ft=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{dataCategories:e.dataCategories.map(r=>r.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{selected:!r.selected}):r)}));},[]),Pt=react.useCallback(t=>{v(e=>{let r=t,i=e.purposes.includes(r);return chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{purposes:i?e.purposes.filter(o=>o!==t):[...e.purposes,r]})});},[]),Ct=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{thirdPartyProcessors:[...e.thirdPartyProcessors,t]}));},[]),yt=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{thirdPartyProcessors:e.thirdPartyProcessors.filter((r,i)=>i!==t)}));},[]),St=react.useCallback(t=>{O(e=>e.length>=nt?e:[...e,chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:st(),required:false})]);},[]),vt=react.useCallback((t,e)=>{O(r=>r.map(i=>i.id===t?chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},i),e):i));},[]),xt=react.useCallback(t=>{O(e=>e.filter(r=>r.id!==t)),$(e=>e.filter(r=>r!==t)),I(e=>{let r=chunkRFPLZDIO_js.a({},e);return delete r[t],r});},[]),ht=react.useCallback((t,e)=>{$(r=>{let i=r.length>0?r:d.map(m=>m.id),o=i.indexOf(t);if(o===-1){let m=d.map(It=>It.id),y=m.indexOf(t);if(y===-1)return r;let G=e==="up"?y-1:y+1;if(G<0||G>=m.length)return m;let k=[...m];return [k[y],k[G]]=[k[G],k[y]],k}let l=e==="up"?o-1:o+1;if(l<0||l>=i.length)return i;let p=[...i];return [p[o],p[l]]=[p[l],p[o]],p});},[d]),Dt=react.useCallback((t,e)=>{I(r=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{[t]:e}));},[]),bt=react.useCallback(t=>{let e=D.find(r=>r.requirementId===t);if(e)switch(e.fixType){case "fill_field":{T.current=false;let i=["data-categories-disclosed"],o=["purpose-of-processing"];i.includes(t)?C(2):o.includes(t)?C(3):(C(1));break}case "add_section":{if(!e.suggestedContent)break;O(r=>r.length>=nt?r:[...r,{id:st(),title:e.requirement,content:e.suggestedContent,order:999,required:false}]);break}case "add_content":{if(!e.suggestedContent)break;let r="data-subject-rights";I(i=>{var l,p,m;let o=(m=(p=i[r])!=null?p:(l=d.find(y=>y.id===r))==null?void 0:l.template)!=null?m:"";return chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{[r]:`${o}
1
+ 'use strict';var chunkJS7SYL5P_js=require('./chunk-JS7SYL5P.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');var nt=10,Rt="ndpr_policy_draft",_t=2e3;function st(){return `section_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function it(){return `draft_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function w(u,A,M){let S=Date.now();return {id:M,title:`Privacy Policy${u.org.name?` \u2014 ${u.org.name}`:""}`,templateId:"adaptive-policy-wizard",organizationInfo:{name:u.org.name,website:u.org.website,privacyEmail:u.org.privacyEmail,address:u.org.address,dpoName:u.org.dpoName,dpoEmail:u.org.dpoEmail,industry:u.org.industry},sections:A,variableValues:{},effectiveDate:S,lastUpdated:S,version:"1.0",applicableFrameworks:["ndpa","ndpr"]}}function Ut(u={}){var K;let{onComplete:A,onComplianceChange:M}=u,S=react.useRef((K=u.adapter)!=null?K:chunkVWED6UTN_js.a(Rt));u.adapter&&(S.current=u.adapter);let f=react.useRef(it()),[P,C]=react.useState(1),[n,v]=react.useState(()=>{var t;return (t=u.initialContext)!=null?t:chunk6LJHLE6G_js.e()}),[b,O]=react.useState([]),[x,I]=react.useState({}),[E,$]=react.useState([]),[at,q]=react.useState(false),[ct,z]=react.useState(null),[N,U]=react.useState(true),T=react.useRef(false),R=react.useRef(null);react.useEffect(()=>{let t=false,e=r=>{r&&(f.current=r.id,v(r.templateContext),O(r.customSections),I(r.sectionOverrides),$(r.sectionOrder),C(r.currentStep),z(r.lastSavedAt),q(true));};try{let r=S.current.load();r instanceof Promise?r.then(i=>{t||(e(i),U(!1));},()=>{t||U(!1);}):(e(r),U(!1));}catch(r){t||U(false);}return ()=>{t=true;}},[]);let d=react.useMemo(()=>{let e=chunk6LJHLE6G_js.c(n).map(o=>x[o.id]?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{template:x[o.id]}):o),r=b.map(o=>{var l;return {id:o.id,title:o.title,template:(l=x[o.id])!=null?l:o.content,order:o.order,required:false,included:true}}),i=[...e,...r];if(E.length>0){let o=new Map(E.map((l,p)=>[l,p]));return [...i].sort((l,p)=>{let m=o.has(l.id)?o.get(l.id):i.length,y=o.has(p.id)?o.get(p.id):i.length;return m-y})}return [...i].sort((o,l)=>{var p,m;return ((p=o.order)!=null?p:0)-((m=l.order)!=null?m:0)})},[n,b,x,E]),s=react.useMemo(()=>!n.org.name&&!n.org.privacyEmail?null:w(n,d,f.current),[n,d]),Y=react.useMemo(()=>w(chunk6LJHLE6G_js.e(),[],f.current),[]),V=react.useMemo(()=>chunk6LJHLE6G_js.f(s!=null?s:Y,n),[s,n,Y]),_=V.percentage,D=V.gaps,j=react.useRef({score:-1,gaps:[]});react.useEffect(()=>{let t=j.current;M&&(_!==t.score||D!==t.gaps)&&M(_,D),j.current={score:_,gaps:D};},[_,D,M]);let lt=react.useMemo(()=>{switch(P){case 1:return n.org.name.trim().length>0&&n.org.privacyEmail.trim().length>0;case 2:return n.dataCategories.some(t=>t.selected);case 3:return n.purposes.length>0;case 4:return true;default:return false}},[P,n]),dt=react.useCallback(t=>{let e=Math.min(Math.max(1,t),4);e<4&&(T.current=false),C(e);},[]),pt=react.useCallback(()=>{C(t=>Math.min(t+1,4));},[]),ut=react.useCallback(()=>{T.current=false,C(t=>Math.max(t-1,1));},[]),mt=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},e),t));},[]),gt=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{org:chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},e.org),t)}));},[]),ft=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{dataCategories:e.dataCategories.map(r=>r.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{selected:!r.selected}):r)}));},[]),Pt=react.useCallback(t=>{v(e=>{let r=t,i=e.purposes.includes(r);return chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{purposes:i?e.purposes.filter(o=>o!==t):[...e.purposes,r]})});},[]),Ct=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{thirdPartyProcessors:[...e.thirdPartyProcessors,t]}));},[]),yt=react.useCallback(t=>{v(e=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{thirdPartyProcessors:e.thirdPartyProcessors.filter((r,i)=>i!==t)}));},[]),St=react.useCallback(t=>{O(e=>e.length>=nt?e:[...e,chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:st(),required:false})]);},[]),vt=react.useCallback((t,e)=>{O(r=>r.map(i=>i.id===t?chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},i),e):i));},[]),xt=react.useCallback(t=>{O(e=>e.filter(r=>r.id!==t)),$(e=>e.filter(r=>r!==t)),I(e=>{let r=chunkRFPLZDIO_js.a({},e);return delete r[t],r});},[]),ht=react.useCallback((t,e)=>{$(r=>{let i=r.length>0?r:d.map(m=>m.id),o=i.indexOf(t);if(o===-1){let m=d.map(It=>It.id),y=m.indexOf(t);if(y===-1)return r;let G=e==="up"?y-1:y+1;if(G<0||G>=m.length)return m;let k=[...m];return [k[y],k[G]]=[k[G],k[y]],k}let l=e==="up"?o-1:o+1;if(l<0||l>=i.length)return i;let p=[...i];return [p[o],p[l]]=[p[l],p[o]],p});},[d]),Dt=react.useCallback((t,e)=>{I(r=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{[t]:e}));},[]),bt=react.useCallback(t=>{let e=D.find(r=>r.requirementId===t);if(e)switch(e.fixType){case "fill_field":{T.current=false;let i=["data-categories-disclosed"],o=["purpose-of-processing"];i.includes(t)?C(2):o.includes(t)?C(3):(C(1));break}case "add_section":{if(!e.suggestedContent)break;O(r=>r.length>=nt?r:[...r,{id:st(),title:e.requirement,content:e.suggestedContent,order:999,required:false}]);break}case "add_content":{if(!e.suggestedContent)break;let r="data-subject-rights";I(i=>{var l,p,m;let o=(m=(p=i[r])!=null?p:(l=d.find(y=>y.id===r))==null?void 0:l.template)!=null?m:"";return chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{[r]:`${o}
2
2
 
3
- ${e.suggestedContent}`.trim()})});break}}},[D,d]),X=react.useCallback(t=>({id:f.current,templateContext:n,customSections:b,sectionOverrides:x,sectionOrder:E,currentStep:t,lastSavedAt:Date.now(),status:"draft"}),[n,b,x,E]),Ot=react.useCallback(()=>chunkRFPLZDIO_js.d(null,null,function*(){let t=X(P);try{yield Promise.resolve(S.current.save(t)),z(t.lastSavedAt),q(!0);}catch(e){console.warn("[ndpr-toolkit] Failed to save draft:",e);}}),[X,P]),Et=react.useCallback(()=>{Promise.resolve(S.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove draft:",t);}),f.current=it(),T.current=false,v(chunkQ64735OC_js.e()),O([]),I({}),$([]),C(1),q(false),z(null);},[]);react.useEffect(()=>{if(!N)return R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{let t=X(P);Promise.resolve(S.current.save(t)).then(()=>{z(t.lastSavedAt),q(true);}).catch(e=>{console.warn("[ndpr-toolkit] Auto-save failed:",e);});},_t),()=>{R.current&&clearTimeout(R.current);}},[n,b,x,E,P,N,X]),react.useEffect(()=>{P===4&&s&&A&&!T.current&&(T.current=true,A(s));},[P,s,A]);let Tt=react.useCallback(t=>chunkRFPLZDIO_js.d(null,null,function*(){let e=s!=null?s:w(n,d,f.current);return chunkN3MQQUQP_js.c(e,t)}),[s,n,d]),wt=react.useCallback(t=>chunkRFPLZDIO_js.d(null,null,function*(){let e=s!=null?s:w(n,d,f.current);return chunkN3MQQUQP_js.d(e,t)}),[s,n,d]),At=react.useCallback(t=>{let e=s!=null?s:w(n,d,f.current);return chunkN3MQQUQP_js.a(e,t)},[s,n,d]),Mt=react.useCallback(()=>{let t=s!=null?s:w(n,d,f.current);return chunkN3MQQUQP_js.b(t)},[s,n,d]);return {currentStep:P,goToStep:dt,nextStep:pt,prevStep:ut,canProceed:lt,context:n,updateContext:mt,updateOrg:gt,toggleDataCategory:ft,togglePurpose:Pt,addProcessor:Ct,removeProcessor:yt,policy:s,sections:d,customSections:b,addCustomSection:St,updateCustomSection:vt,removeCustomSection:xt,reorderSections:ht,editSectionContent:Dt,sectionOverrides:x,complianceScore:_,complianceResult:V,complianceGaps:D,applyFix:bt,handleExportPDF:Tt,handleExportDOCX:wt,handleExportHTML:At,handleExportMarkdown:Mt,isDraftSaved:at,lastSavedAt:ct,saveDraft:Ot,discardDraft:Et,isLoading:N}}exports.a=Ut;
3
+ ${e.suggestedContent}`.trim()})});break}}},[D,d]),X=react.useCallback(t=>({id:f.current,templateContext:n,customSections:b,sectionOverrides:x,sectionOrder:E,currentStep:t,lastSavedAt:Date.now(),status:"draft"}),[n,b,x,E]),Ot=react.useCallback(()=>chunkRFPLZDIO_js.d(null,null,function*(){let t=X(P);try{yield Promise.resolve(S.current.save(t)),z(t.lastSavedAt),q(!0);}catch(e){console.warn("[ndpr-toolkit] Failed to save draft:",e);}}),[X,P]),Et=react.useCallback(()=>{Promise.resolve(S.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove draft:",t);}),f.current=it(),T.current=false,v(chunk6LJHLE6G_js.e()),O([]),I({}),$([]),C(1),q(false),z(null);},[]);react.useEffect(()=>{if(!N)return R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{let t=X(P);Promise.resolve(S.current.save(t)).then(()=>{z(t.lastSavedAt),q(true);}).catch(e=>{console.warn("[ndpr-toolkit] Auto-save failed:",e);});},_t),()=>{R.current&&clearTimeout(R.current);}},[n,b,x,E,P,N,X]),react.useEffect(()=>{P===4&&s&&A&&!T.current&&(T.current=true,A(s));},[P,s,A]);let Tt=react.useCallback(t=>chunkRFPLZDIO_js.d(null,null,function*(){let e=s!=null?s:w(n,d,f.current);return chunkJS7SYL5P_js.c(e,t)}),[s,n,d]),wt=react.useCallback(t=>chunkRFPLZDIO_js.d(null,null,function*(){let e=s!=null?s:w(n,d,f.current);return chunkJS7SYL5P_js.d(e,t)}),[s,n,d]),At=react.useCallback(t=>{let e=s!=null?s:w(n,d,f.current);return chunkJS7SYL5P_js.a(e,t)},[s,n,d]),Mt=react.useCallback(()=>{let t=s!=null?s:w(n,d,f.current);return chunkJS7SYL5P_js.b(t)},[s,n,d]);return {currentStep:P,goToStep:dt,nextStep:pt,prevStep:ut,canProceed:lt,context:n,updateContext:mt,updateOrg:gt,toggleDataCategory:ft,togglePurpose:Pt,addProcessor:Ct,removeProcessor:yt,policy:s,sections:d,customSections:b,addCustomSection:St,updateCustomSection:vt,removeCustomSection:xt,reorderSections:ht,editSectionContent:Dt,sectionOverrides:x,complianceScore:_,complianceResult:V,complianceGaps:D,applyFix:bt,handleExportPDF:Tt,handleExportDOCX:wt,handleExportHTML:At,handleExportMarkdown:Mt,isDraftSaved:at,lastSavedAt:ct,saveDraft:Ot,discardDraft:Et,isLoading:N}}exports.a=Ut;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');function M(e){return e.response?e.response.status>=500:true}function $(e){return new Promise(s=>setTimeout(s,e))}function O(e){return e?typeof e=="function"?e():e:{}}function q(e,s={}){var w,k,g;let{headers:a,credentials:d="same-origin",loadMethod:u="GET",saveMethod:c="POST",unwrap:A,retry:p,onError:h,onSuccess:l,fetchInit:x}=s,T=(w=p==null?void 0:p.attempts)!=null?w:0,C=(k=p==null?void 0:p.baseDelayMs)!=null?k:250,E=(g=p==null?void 0:p.shouldRetry)!=null?g:M,y=h!=null?h:(t=>{if(t.method==="load")return;let o=t.method==="save"?"save to":"delete from";if(t.response){console.warn(`[ndpr-toolkit] Failed to ${o} ${t.endpoint}: ${t.response.status}`);try{let r=typeof t.response.clone=="function"?t.response.clone():null;r&&typeof r.text=="function"&&r.text().then(i=>{let n=i.length>256?`${i.slice(0,256)}\u2026`:i;n.trim()&&console.warn(`[ndpr-toolkit] ${o} ${t.endpoint} response body: ${n}`);}).catch(()=>{});}catch(r){}}else console.warn(`[ndpr-toolkit] Failed to ${o} ${t.endpoint}`);});function v(t,o,r){return chunkRFPLZDIO_js.d(this,null,function*(){for(let i=0;i<=T;i++){let n,S;try{n=yield fetch(e,chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},x),o),{headers:chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},O(a)),o.headers),credentials:d}));}catch(b){S=b;}if(n&&n.ok)return {ok:true,response:n};let R={method:t,endpoint:e,error:S,response:n,status:n==null?void 0:n.status,payload:r,attempt:i};if(i===T||!E(R))return y(R),{ok:false};yield $(C*Math.pow(2,i));}return {ok:false}})}return {load(){return chunkRFPLZDIO_js.d(this,null,function*(){let t=yield v("load",{method:u,headers:{}});if(!t.ok)return null;try{let o=yield t.response.json(),r=A?A(o):o;return l&&l({method:"load",endpoint:e,response:t.response,data:r!=null?r:void 0}),r}catch(o){return y({method:"load",endpoint:e,error:o,response:t.response,status:t.response.status,attempt:T}),null}})},save(t){return chunkRFPLZDIO_js.d(this,null,function*(){let o=yield v("save",{method:c,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},t);o.ok&&l&&l({method:"save",endpoint:e,response:o.response,payload:t});})},remove(){return chunkRFPLZDIO_js.d(this,null,function*(){let t=yield v("remove",{method:"DELETE",headers:{}});t.ok&&l&&l({method:"remove",endpoint:e,response:t.response});})}}}function F(e){let s=e!=null?e:null;return {load(){return s},save(a){s=a;},remove(){s=null;}}}function H(e,...s){return {load(){return e.load()},save(a){let d=e.save(a),u=()=>{for(let c of s)try{c.save(a);}catch(A){console.warn("[ndpr-toolkit] Secondary adapter save failed:",A);}};if(d instanceof Promise)return d.then(()=>u());u();},remove(){let a=e.remove(),d=()=>{for(let u of s)try{u.remove();}catch(c){console.warn("[ndpr-toolkit] Secondary adapter remove failed:",c);}};if(a instanceof Promise)return a.then(()=>d());d();}}}exports.a=q;exports.b=F;exports.c=H;
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-ZJYULEER.mjs';var i={consent:{title:"We Value Your Privacy",description:"We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",acceptAll:"Accept All",rejectAll:"Reject All",customize:"Customize",savePreferences:"Save Preferences",selectAll:"Select All",deselectAll:"Deselect All",required:"Required",cookieNotice:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'},dsr:{title:"Submit a Data Subject Request",description:"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36.",submitRequest:"Submit Request",reset:"Reset",fullName:"Full Name",email:"Email Address",phone:"Phone Number (Optional)",requestType:"Request Type",additionalInfo:"Additional Information",identityVerification:"Identity Verification",identifierType:"Identifier Type",identifierValue:"Identifier Value",privacyNotice:"The information you provide in this form will be used solely for the purpose of processing your data subject request.",successMessage:"Your request has been submitted successfully."},breach:{title:"Report a Data Breach",description:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40.",submitReport:"Submit Report",breachTitle:"Breach Title/Summary",category:"Category",discoveredAt:"Date Discovered",detailedDescription:"Detailed Description"},dpia:{title:"Data Protection Impact Assessment",next:"Next",previous:"Previous",complete:"Complete Assessment",progress:"Progress"},policy:{title:"Privacy Policy Generator",generate:"Generate Policy",preview:"Preview",export:"Export",sections:"Sections",variables:"Variables"},compliance:{score:"Compliance Score",excellent:"Excellent",good:"Good",needsWork:"Needs Work",critical:"Critical",recommendations:"Recommendations",passed:"Passed",gaps:"Gaps"},common:{loading:"Loading...",error:"An error occurred",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",back:"Back",next:"Next",search:"Search",noResults:"No results found"}};function a(e){if(!e)return i;let r=a$1({},i);for(let t of Object.keys(e))e[t]&&(r[t]=a$1(a$1({},i[t]),e[t]));return r}export{i as a,a as b};
1
+ import {a as a$1}from'./chunk-ZJYULEER.mjs';var i={consent:{title:"We Value Your Privacy",description:"We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",acceptAll:"Accept All",rejectAll:"Reject All",customize:"Customize",savePreferences:"Save Preferences",selectAll:"Select All",deselectAll:"Deselect All",required:"Required",cookieNotice:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'},dsr:{title:"Submit a Data Subject Request",description:"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part VI, Sections 34-38.",submitRequest:"Submit Request",reset:"Reset",fullName:"Full Name",email:"Email Address",phone:"Phone Number (Optional)",requestType:"Request Type",additionalInfo:"Additional Information",identityVerification:"Identity Verification",identifierType:"Identifier Type",identifierValue:"Identifier Value",privacyNotice:"The information you provide in this form will be used solely for the purpose of processing your data subject request.",successMessage:"Your request has been submitted successfully."},breach:{title:"Report a Data Breach",description:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40.",submitReport:"Submit Report",breachTitle:"Breach Title/Summary",category:"Category",discoveredAt:"Date Discovered",detailedDescription:"Detailed Description"},dpia:{title:"Data Protection Impact Assessment",next:"Next",previous:"Previous",complete:"Complete Assessment",progress:"Progress"},policy:{title:"Privacy Policy Generator",generate:"Generate Policy",preview:"Preview",export:"Export",sections:"Sections",variables:"Variables"},compliance:{score:"Compliance Score",excellent:"Excellent",good:"Good",needsWork:"Needs Work",critical:"Critical",recommendations:"Recommendations",passed:"Passed",gaps:"Gaps"},common:{loading:"Loading...",error:"An error occurred",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",back:"Back",next:"Next",search:"Search",noResults:"No results found"}};function a(e){if(!e)return i;let r=a$1({},i);for(let t of Object.keys(e))e[t]&&(r[t]=a$1(a$1({},i[t]),e[t]));return r}export{i as a,a as b};
@@ -1 +1 @@
1
- 'use strict';var chunkLVGT3DLT_js=require('./chunk-LVGT3DLT.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');function W(e,s){return s?chunkVWED6UTN_js.a(e):{load:()=>null,save:()=>{},remove:()=>{}}}function A({templates:e,initialPolicy:s,adapter:y,storageKey:l="ndpr_privacy_policy",persist:f,useLocalStorage:D,onGenerate:T}){var V;let O=(V=f!=null?f:D)!=null?V:true,w=y!=null?y:W(l,O),c=react.useRef(w);c.current=w;let[n,p]=react.useState(s||null),[o,g]=react.useState(null),[u,S]=react.useState({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),[C,E]=react.useState(true),R=react.useRef(e);R.current=e,react.useEffect(()=>{if(s){E(false);return}let t=false;try{let r=c.current.load(),i=a=>{if(a){if(p(a),a.templateId){let P=R.current.find(b=>b.id===a.templateId);P&&g(P);}a.organizationInfo&&S(a.organizationInfo);}E(!1);};r instanceof Promise?r.then(a=>{t||i(a);},()=>{t||E(!1);}):i(r);}catch(r){t||E(false);}return ()=>{t=true;}},[s]);let k=t=>{Promise.resolve(c.current.save(t)).catch(r=>{console.warn("[ndpr-toolkit] Failed to save policy:",r);});},j=react.useCallback(t=>{let r=e.find(b=>b.id===t);if(!r)return false;g(r);let i=r.sections.map(b=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},b),{customContent:void 0})),a={};Object.keys(r.variables).forEach(b=>{a[b]=r.variables[b].defaultValue||"";});let P=Date.now();return p({id:"policy_"+P+"_"+Math.random().toString(36).substr(2,9),title:"",templateId:r.id,organizationInfo:u,sections:i,variableValues:a,effectiveDate:P,lastUpdated:P,version:"1.0"}),true},[e,u]),I=react.useCallback(t=>{S(r=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},r),t));},[]),F=react.useCallback((t,r)=>{o&&(n?p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{included:r}):a)})):g(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{included:r}):a)})));},[o,n]),M=react.useCallback((t,r)=>{o&&(n?p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{customContent:r}):a)})):g(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{customContent:r}):a)})));},[o,n]),$=react.useCallback((t,r)=>{n&&p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{variableValues:chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i.variableValues),{[t]:r})}));},[n]),B=()=>"policy_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),G=react.useCallback(()=>{if(!o)return null;let t=Date.now(),r={id:(n==null?void 0:n.id)||B(),title:`Privacy Policy for ${u.name}`,templateId:o.id,organizationInfo:u,sections:o.sections.map(i=>{var a;return chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{customContent:(a=n==null?void 0:n.sections.find(P=>P.id===i.id))==null?void 0:a.customContent})}),variableValues:(n==null?void 0:n.variableValues)||{},effectiveDate:t,lastUpdated:t,version:"1.0"};return p(r),k(r),T&&T(r),r},[o,n,u,T]),K=react.useCallback(()=>{if(!n)return {fullText:"",sectionTexts:{},missingVariables:[]};let t=chunkLVGT3DLT_js.b(n.sections,n.organizationInfo);return typeof t=="string"?{fullText:t,sectionTexts:{full:t},missingVariables:[]}:t},[n]),H=react.useCallback(()=>{p(null),g(null),S({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),Promise.resolve(c.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove policy:",t);});},[]),J=react.useCallback(()=>{let t=[];if(o||t.push("No template selected"),u.name||t.push("Organization name is required"),u.website||t.push("Organization website is required"),u.privacyEmail||t.push("Privacy contact email is required"),o){let r=o.sections.filter(a=>a.required),i=(n==null?void 0:n.sections.filter(a=>a.included))||[];r.forEach(a=>{i.some(P=>P.id===a.id)||t.push(`Required section "${a.title}" must be included`);});}return o&&n&&Object.entries(o.variables).forEach(([r,i])=>{i.required&&!n.variableValues[r]&&t.push(`Required variable "${i.name}" must have a value`);}),{valid:t.length===0,errors:t}},[o,u,n]);return {policy:n,selectedTemplate:o,organizationInfo:u,selectTemplate:j,updateOrganizationInfo:I,toggleSection:F,updateSectionContent:M,updateVariableValue:$,generatePolicy:G,getPolicyText:K,resetPolicy:H,isValid:J,isLoading:C}}var _="default-business";function X(e){return e.toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"})}function Y(e){let{sections:s,variables:y}=chunkLVGT3DLT_js.e(),l={};return e&&(e.name&&(l.orgName=e.name),e.email&&(l.privacyEmail=e.email),e.website&&(l.website=e.website),e.address&&(l.address=e.address),e.industry&&(l.industry=e.industry),e.dpoName&&(l.dpoName=e.dpoName),e.dpoEmail&&(l.dpoEmail=e.dpoEmail)),l.effectiveDate||(l.effectiveDate=X(new Date)),{id:_,name:"Default Business Policy",description:"NDPA-compliant privacy policy template for businesses.",organizationType:"business",sections:s,variables:Object.fromEntries(y.map(f=>[f.name,{name:f.name,description:f.description,required:f.required,defaultValue:l[f.name]||f.value||void 0}])),version:"1.0",lastUpdated:Date.now(),ndpaCompliant:true}}function Z(e){if(!e)return {};let s={};return e.name&&(s.name=e.name),e.email&&(s.privacyEmail=e.email),e.website&&(s.website=e.website),e.address&&(s.address=e.address),e.industry&&(s.industry=e.industry),e.dpoName&&(s.dpoName=e.dpoName),e.dpoEmail&&(s.dpoEmail=e.dpoEmail),s}function ce(e={}){var o;let{orgInfo:s,autoGenerate:y=true,storageKey:l,persist:f,useLocalStorage:D,adapter:T}=e,O=(o=f!=null?f:D)!=null?o:true,w=react.useRef(null);w.current===null&&(w.current=Y(s));let c=A({templates:[w.current],adapter:T,storageKey:l,persist:O}),n=react.useRef(false),p=react.useRef(false);return react.useEffect(()=>{if(!y||c.isLoading||n.current)return;if(!T&&O!==false&&typeof window!="undefined"&&typeof window.localStorage!="undefined")try{if(window.localStorage.getItem(l!=null?l:"ndpr_privacy_policy")){n.current=!0,p.current=!0;return}}catch(S){}if(c.policy){n.current=true,p.current=true;return}n.current=true;let u=Z(s);Object.keys(u).length>0&&c.updateOrganizationInfo(u),c.selectedTemplate||c.selectTemplate(_);},[y,c.isLoading]),react.useEffect(()=>{var u;if(!y||p.current||!n.current||!c.selectedTemplate)return;let g=(u=s==null?void 0:s.name)!=null?u:"";g&&c.organizationInfo.name!==g||(p.current=true,c.generatePolicy());},[y,c.selectedTemplate,c.organizationInfo]),c}exports.a=A;exports.b=ce;
1
+ 'use strict';var chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');function W(e,s){return s?chunkVWED6UTN_js.a(e):{load:()=>null,save:()=>{},remove:()=>{}}}function A({templates:e,initialPolicy:s,adapter:y,storageKey:l="ndpr_privacy_policy",persist:f,useLocalStorage:D,onGenerate:T}){var V;let O=(V=f!=null?f:D)!=null?V:true,w=y!=null?y:W(l,O),c=react.useRef(w);c.current=w;let[n,p]=react.useState(s||null),[o,g]=react.useState(null),[u,S]=react.useState({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),[C,E]=react.useState(true),R=react.useRef(e);R.current=e,react.useEffect(()=>{if(s){E(false);return}let t=false;try{let r=c.current.load(),i=a=>{if(a){if(p(a),a.templateId){let P=R.current.find(b=>b.id===a.templateId);P&&g(P);}a.organizationInfo&&S(a.organizationInfo);}E(!1);};r instanceof Promise?r.then(a=>{t||i(a);},()=>{t||E(!1);}):i(r);}catch(r){t||E(false);}return ()=>{t=true;}},[s]);let k=t=>{Promise.resolve(c.current.save(t)).catch(r=>{console.warn("[ndpr-toolkit] Failed to save policy:",r);});},j=react.useCallback(t=>{let r=e.find(b=>b.id===t);if(!r)return false;g(r);let i=r.sections.map(b=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},b),{customContent:void 0})),a={};Object.keys(r.variables).forEach(b=>{a[b]=r.variables[b].defaultValue||"";});let P=Date.now();return p({id:"policy_"+P+"_"+Math.random().toString(36).substr(2,9),title:"",templateId:r.id,organizationInfo:u,sections:i,variableValues:a,effectiveDate:P,lastUpdated:P,version:"1.0"}),true},[e,u]),I=react.useCallback(t=>{S(r=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},r),t));},[]),F=react.useCallback((t,r)=>{o&&(n?p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{included:r}):a)})):g(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{included:r}):a)})));},[o,n]),M=react.useCallback((t,r)=>{o&&(n?p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{customContent:r}):a)})):g(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{customContent:r}):a)})));},[o,n]),$=react.useCallback((t,r)=>{n&&p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{variableValues:chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i.variableValues),{[t]:r})}));},[n]),B=()=>"policy_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),G=react.useCallback(()=>{if(!o)return null;let t=Date.now(),r={id:(n==null?void 0:n.id)||B(),title:`Privacy Policy for ${u.name}`,templateId:o.id,organizationInfo:u,sections:o.sections.map(i=>{var a;return chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{customContent:(a=n==null?void 0:n.sections.find(P=>P.id===i.id))==null?void 0:a.customContent})}),variableValues:(n==null?void 0:n.variableValues)||{},effectiveDate:t,lastUpdated:t,version:"1.0"};return p(r),k(r),T&&T(r),r},[o,n,u,T]),K=react.useCallback(()=>{if(!n)return {fullText:"",sectionTexts:{},missingVariables:[]};let t=chunkD2ZKDQVL_js.b(n.sections,n.organizationInfo);return typeof t=="string"?{fullText:t,sectionTexts:{full:t},missingVariables:[]}:t},[n]),H=react.useCallback(()=>{p(null),g(null),S({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),Promise.resolve(c.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove policy:",t);});},[]),J=react.useCallback(()=>{let t=[];if(o||t.push("No template selected"),u.name||t.push("Organization name is required"),u.website||t.push("Organization website is required"),u.privacyEmail||t.push("Privacy contact email is required"),o){let r=o.sections.filter(a=>a.required),i=(n==null?void 0:n.sections.filter(a=>a.included))||[];r.forEach(a=>{i.some(P=>P.id===a.id)||t.push(`Required section "${a.title}" must be included`);});}return o&&n&&Object.entries(o.variables).forEach(([r,i])=>{i.required&&!n.variableValues[r]&&t.push(`Required variable "${i.name}" must have a value`);}),{valid:t.length===0,errors:t}},[o,u,n]);return {policy:n,selectedTemplate:o,organizationInfo:u,selectTemplate:j,updateOrganizationInfo:I,toggleSection:F,updateSectionContent:M,updateVariableValue:$,generatePolicy:G,getPolicyText:K,resetPolicy:H,isValid:J,isLoading:C}}var _="default-business";function X(e){return e.toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"})}function Y(e){let{sections:s,variables:y}=chunkD2ZKDQVL_js.e(),l={};return e&&(e.name&&(l.orgName=e.name),e.email&&(l.privacyEmail=e.email),e.website&&(l.website=e.website),e.address&&(l.address=e.address),e.industry&&(l.industry=e.industry),e.dpoName&&(l.dpoName=e.dpoName),e.dpoEmail&&(l.dpoEmail=e.dpoEmail)),l.effectiveDate||(l.effectiveDate=X(new Date)),{id:_,name:"Default Business Policy",description:"NDPA-compliant privacy policy template for businesses.",organizationType:"business",sections:s,variables:Object.fromEntries(y.map(f=>[f.name,{name:f.name,description:f.description,required:f.required,defaultValue:l[f.name]||f.value||void 0}])),version:"1.0",lastUpdated:Date.now(),ndpaCompliant:true}}function Z(e){if(!e)return {};let s={};return e.name&&(s.name=e.name),e.email&&(s.privacyEmail=e.email),e.website&&(s.website=e.website),e.address&&(s.address=e.address),e.industry&&(s.industry=e.industry),e.dpoName&&(s.dpoName=e.dpoName),e.dpoEmail&&(s.dpoEmail=e.dpoEmail),s}function ce(e={}){var o;let{orgInfo:s,autoGenerate:y=true,storageKey:l,persist:f,useLocalStorage:D,adapter:T}=e,O=(o=f!=null?f:D)!=null?o:true,w=react.useRef(null);w.current===null&&(w.current=Y(s));let c=A({templates:[w.current],adapter:T,storageKey:l,persist:O}),n=react.useRef(false),p=react.useRef(false);return react.useEffect(()=>{if(!y||c.isLoading||n.current)return;if(!T&&O!==false&&typeof window!="undefined"&&typeof window.localStorage!="undefined")try{if(window.localStorage.getItem(l!=null?l:"ndpr_privacy_policy")){n.current=!0,p.current=!0;return}}catch(S){}if(c.policy){n.current=true,p.current=true;return}n.current=true;let u=Z(s);Object.keys(u).length>0&&c.updateOrganizationInfo(u),c.selectedTemplate||c.selectTemplate(_);},[y,c.isLoading]),react.useEffect(()=>{var u;if(!y||p.current||!n.current||!c.selectedTemplate)return;let g=(u=s==null?void 0:s.name)!=null?u:"";g&&c.organizationInfo.name!==g||(p.current=true,c.generatePolicy());},[y,c.selectedTemplate,c.organizationInfo]),c}exports.a=A;exports.b=ce;
@@ -1 +1 @@
1
- 'use strict';var p=["critical","high","medium","low"];function m(e){let i=new Date(e).getTime();if(isNaN(i))return 1/0;let t=(Date.now()-i)/(1e3*60*60*24*30.44);return Math.max(0,t)}function u(e){if(e.length===0)return 100;let i=e.filter(t=>t.pass).length;return Math.round(i/e.length*100)}function f(e){return [{key:"hasConsentMechanism",label:"Consent collection mechanism",priority:"critical",effort:"high",recommendation:"Implement a clear, affirmative consent collection mechanism before processing personal data.",ndpaSection:"Section 25",pass:e.hasConsentMechanism},{key:"hasPurposeSpecification",label:"Purpose specification at collection",priority:"critical",effort:"medium",recommendation:"Specify and communicate the purpose of data collection at the point of consent.",ndpaSection:"Section 25",pass:e.hasPurposeSpecification},{key:"hasWithdrawalMechanism",label:"Consent withdrawal mechanism",priority:"high",effort:"medium",recommendation:"Provide a simple mechanism for data subjects to withdraw consent at any time.",ndpaSection:"Section 26",pass:e.hasWithdrawalMechanism},{key:"hasMinorProtection",label:"Minor (child) data protection controls",priority:"high",effort:"high",recommendation:"Implement age-verification and parental-consent controls for processing data of minors.",ndpaSection:"Section 26",pass:e.hasMinorProtection},{key:"consentRecordsRetained",label:"Consent records retained",priority:"medium",effort:"low",recommendation:"Retain records of all consents obtained, including what was agreed to and when.",ndpaSection:"Section 25",pass:e.consentRecordsRetained}]}function g(e){let i=e.responseTimelineDays<=30;return [{key:"hasRequestMechanism",label:"DSR submission mechanism",priority:"critical",effort:"high",recommendation:"Implement a formal channel (e.g. a web form or email address) for data subjects to submit requests.",ndpaSection:"Section 34",pass:e.hasRequestMechanism},{key:"supportsAccess",label:"Right of access supported",priority:"high",effort:"medium",recommendation:"Enable data subjects to request and receive a copy of their personal data.",ndpaSection:"Section 34(1)(a)\u2013(b)",pass:e.supportsAccess},{key:"supportsRectification",label:"Right to rectification supported",priority:"high",effort:"medium",recommendation:"Allow data subjects to request correction of inaccurate or incomplete personal data.",ndpaSection:"Section 34(1)(c)",pass:e.supportsRectification},{key:"supportsErasure",label:"Right to erasure supported",priority:"high",effort:"high",recommendation:"Implement processes to delete personal data upon valid erasure requests.",ndpaSection:"Section 34(1)(d), Section 34(2)",pass:e.supportsErasure},{key:"supportsPortability",label:"Right to data portability supported",priority:"medium",effort:"high",recommendation:"Provide personal data in a structured, machine-readable format upon request.",ndpaSection:"Section 38",pass:e.supportsPortability},{key:"supportsObjection",label:"Right to object supported",priority:"medium",effort:"medium",recommendation:"Honour objections to processing where no compelling legitimate grounds override the data subject's interests.",ndpaSection:"Section 36",pass:e.supportsObjection},{key:"responseTimeline",label:"DSR response within 30 days",priority:"high",effort:"medium",recommendation:"Reduce DSR response time to 30 days or less per NDPC guidance (GAID 2025).",ndpaSection:"Section 34 (NDPC GAID 2025 timeline guidance)",pass:i}]}function y(e){return [{key:"conductedForHighRisk",label:"DPIA conducted for high-risk processing",priority:"critical",effort:"high",recommendation:"Conduct a Data Protection Impact Assessment before undertaking high-risk processing activities.",ndpaSection:"Section 28",pass:e.conductedForHighRisk},{key:"documentedRisks",label:"Risks documented in DPIA",priority:"high",effort:"medium",recommendation:"Document identified risks to data subjects' rights and freedoms within the DPIA.",ndpaSection:"Section 28",pass:e.documentedRisks},{key:"mitigationMeasures",label:"Mitigation measures documented",priority:"high",effort:"medium",recommendation:"Document mitigation measures and residual risk acceptance within the DPIA.",ndpaSection:"Section 28",pass:e.mitigationMeasures}]}function b(e){return [{key:"hasNotificationProcess",label:"Breach notification process in place",priority:"critical",effort:"high",recommendation:"Establish a documented breach notification process covering detection, assessment, and reporting.",ndpaSection:"Section 40",pass:e.hasNotificationProcess},{key:"notifiesWithin72Hours",label:"NDPC notified within 72 hours",priority:"critical",effort:"medium",recommendation:"Ensure the NDPC is notified of qualifying breaches within 72 hours of discovery.",ndpaSection:"Section 40",pass:e.notifiesWithin72Hours},{key:"hasRiskAssessment",label:"Breach risk assessment performed",priority:"high",effort:"medium",recommendation:"Perform a risk assessment for every identified breach to determine notification obligations.",ndpaSection:"Section 40",pass:e.hasRiskAssessment},{key:"hasRecordKeeping",label:"Breach records maintained",priority:"medium",effort:"low",recommendation:"Maintain a breach register documenting all incidents, assessments, and actions taken.",ndpaSection:"Section 40",pass:e.hasRecordKeeping}]}function S(e){let t=m(e.lastUpdated)<=13;return [{key:"hasPrivacyPolicy",label:"Privacy policy exists",priority:"critical",effort:"high",recommendation:"Draft and publish a comprehensive privacy policy that satisfies NDPA requirements.",ndpaSection:"Section 27",pass:e.hasPrivacyPolicy},{key:"isPubliclyAccessible",label:"Privacy policy publicly accessible",priority:"high",effort:"low",recommendation:"Make the privacy policy easily accessible to data subjects on your website or app.",ndpaSection:"Section 27",pass:e.isPubliclyAccessible},{key:"policyUpToDate",label:"Privacy policy reviewed within 13 months",priority:"medium",effort:"medium",recommendation:"Review and update the privacy policy at least annually to reflect current practices.",ndpaSection:"Section 27",pass:t},{key:"coversAllSections",label:"Privacy policy covers all required sections",priority:"high",effort:"medium",recommendation:"Ensure the privacy policy addresses all NDPA-mandated disclosures including lawful basis, retention, and subject rights.",ndpaSection:"Section 27",pass:e.coversAllSections}]}function R(e){return [{key:"documentedForAllProcessing",label:"Lawful basis documented for all processing",priority:"critical",effort:"high",recommendation:"Identify and document a valid lawful basis for every processing activity before it begins.",ndpaSection:"Section 25(1)",pass:e.documentedForAllProcessing},{key:"hasLegitimateInterestAssessment",label:"Legitimate interest assessment completed",priority:"medium",effort:"medium",recommendation:"Complete a Legitimate Interest Assessment (LIA) where legitimate interests is the chosen lawful basis.",ndpaSection:"Section 25(1)",pass:e.hasLegitimateInterestAssessment}]}function v(e){return [{key:"hasTransferMechanisms",label:"Transfer mechanisms in place",priority:"critical",effort:"high",recommendation:"Implement appropriate transfer mechanisms (SCCs, BCRs, adequacy decisions, or Section 43 derogations) for all cross-border transfers.",ndpaSection:"Section 41",pass:e.hasTransferMechanisms},{key:"adequacyAssessed",label:"Adequacy of destination country assessed",priority:"high",effort:"medium",recommendation:"Assess whether the destination country provides an adequate level of data protection before transferring.",ndpaSection:"Section 42",pass:e.adequacyAssessed},{key:"ndpcApprovalObtained",label:"NDPC approval obtained where required",priority:"high",effort:"high",recommendation:"Obtain NDPC approval (e.g. for binding corporate rules, codes of conduct, or certification mechanisms) for transfers to countries without adequacy decisions where required.",ndpaSection:"Section 42(5)",pass:e.ndpcApprovalObtained}]}function w(e){let t=m(e.lastReviewed)<=6;return [{key:"maintained",label:"Record of Processing Activities maintained",priority:"critical",effort:"high",recommendation:"Create and maintain a comprehensive Record of Processing Activities (ROPA) as required by the NDPA.",ndpaSection:"Section 29",pass:e.maintained},{key:"includesAllProcessing",label:"ROPA includes all processing activities",priority:"high",effort:"medium",recommendation:"Ensure the ROPA captures every processing activity across all departments and systems.",ndpaSection:"Section 29",pass:e.includesAllProcessing},{key:"ropaUpToDate",label:"ROPA reviewed within 6 months",priority:"medium",effort:"low",recommendation:"Review and update the ROPA at least every six months to reflect changes in processing activities.",ndpaSection:"Section 29",pass:t}]}var k=[{name:"consent",weight:.2,ndpaSections:["Section 25","Section 26"],evaluate:e=>f(e.consent)},{name:"dsr",weight:.15,ndpaSections:["Section 34","Section 35","Section 36","Section 37","Section 38"],evaluate:e=>g(e.dsr)},{name:"breach",weight:.15,ndpaSections:["Section 40"],evaluate:e=>b(e.breach)},{name:"policy",weight:.12,ndpaSections:["Section 27"],evaluate:e=>S(e.policy)},{name:"dpia",weight:.12,ndpaSections:["Section 28"],evaluate:e=>y(e.dpia)},{name:"lawfulBasis",weight:.1,ndpaSections:["Section 25(1)"],evaluate:e=>R(e.lawfulBasis)},{name:"crossBorder",weight:.08,ndpaSections:["Section 41","Section 42","Section 43"],evaluate:e=>v(e.crossBorder)},{name:"ropa",weight:.08,ndpaSections:["Section 29"],evaluate:e=>w(e.ropa)}];function P(e){return e>=90?"excellent":e>=70?"good":e>=40?"needs-work":"critical"}function A(e){let i={},t=[],s=0;for(let o of k){let a=o.evaluate(e),c=u(a),l=c*o.weight;s+=l;let d=[];for(let n of a)n.pass||(d.push(n.label),t.push({module:o.name,key:n.key,label:n.label,priority:n.priority,effort:n.effort,recommendation:n.recommendation,ndpaSection:n.ndpaSection}));i[o.name]={name:o.name,score:c,maxScore:100,weightedScore:Math.round(l*100)/100,ndpaSections:o.ndpaSections,gaps:d};}t.sort((o,a)=>p.indexOf(o.priority)-p.indexOf(a.priority));let r=Math.round(s),h=[{section:"Section 25",title:"Consent and lawful basis for processing"},{section:"Section 26",title:"Withdrawal of consent and minor protection"},{section:"Section 28",title:"Data Protection Impact Assessment"},{section:"Section 29",title:"Privacy notice requirements"},{section:"Section 30",title:"Records of processing activities"},{section:"Section 34",title:"Right of access"},{section:"Section 35",title:"Right to rectification"},{section:"Section 36",title:"Right to erasure"},{section:"Section 37",title:"Right to data portability"},{section:"Section 38",title:"Right to object"},{section:"Section 39",title:"Response timelines for data subject requests"},{section:"Section 40",title:"Data breach notification"},{section:"Section 43",title:"Cross-border transfer restrictions"},{section:"Section 44",title:"NDPC approval for cross-border transfers"}];return {score:r,rating:P(r),modules:i,recommendations:t,regulatoryReferences:h,generatedAt:new Date().toISOString()}}exports.a=A;
1
+ 'use strict';var m=["critical","high","medium","low"];function p(e){let i=new Date(e).getTime();if(isNaN(i))return 1/0;let t=(Date.now()-i)/(1e3*60*60*24*30.44);return Math.max(0,t)}function u(e){if(e.length===0)return 100;let i=e.filter(t=>t.pass).length;return Math.round(i/e.length*100)}function f(e){return [{key:"hasConsentMechanism",label:"Consent collection mechanism",priority:"critical",effort:"high",recommendation:"Implement a clear, affirmative consent collection mechanism before processing personal data.",ndpaSection:"Section 25",pass:e.hasConsentMechanism},{key:"hasPurposeSpecification",label:"Purpose specification at collection",priority:"critical",effort:"medium",recommendation:"Specify and communicate the purpose of data collection at the point of consent.",ndpaSection:"Section 25",pass:e.hasPurposeSpecification},{key:"hasWithdrawalMechanism",label:"Consent withdrawal mechanism",priority:"high",effort:"medium",recommendation:"Provide a simple mechanism for data subjects to withdraw consent at any time.",ndpaSection:"Section 26",pass:e.hasWithdrawalMechanism},{key:"hasMinorProtection",label:"Minor (child) data protection controls",priority:"high",effort:"high",recommendation:"Implement age-verification and parental-consent controls for processing data of minors.",ndpaSection:"Section 26",pass:e.hasMinorProtection},{key:"consentRecordsRetained",label:"Consent records retained",priority:"medium",effort:"low",recommendation:"Retain records of all consents obtained, including what was agreed to and when.",ndpaSection:"Section 25",pass:e.consentRecordsRetained}]}function g(e){let i=e.responseTimelineDays<=30;return [{key:"hasRequestMechanism",label:"DSR submission mechanism",priority:"critical",effort:"high",recommendation:"Implement a formal channel (e.g. a web form or email address) for data subjects to submit requests.",ndpaSection:"Section 34",pass:e.hasRequestMechanism},{key:"supportsAccess",label:"Right of access supported",priority:"high",effort:"medium",recommendation:"Enable data subjects to request and receive a copy of their personal data.",ndpaSection:"Section 34(1)(a)\u2013(b)",pass:e.supportsAccess},{key:"supportsRectification",label:"Right to rectification supported",priority:"high",effort:"medium",recommendation:"Allow data subjects to request correction of inaccurate or incomplete personal data.",ndpaSection:"Section 34(1)(c)",pass:e.supportsRectification},{key:"supportsErasure",label:"Right to erasure supported",priority:"high",effort:"high",recommendation:"Implement processes to delete personal data upon valid erasure requests.",ndpaSection:"Section 34(1)(d), Section 34(2)",pass:e.supportsErasure},{key:"supportsPortability",label:"Right to data portability supported",priority:"medium",effort:"high",recommendation:"Provide personal data in a structured, machine-readable format upon request.",ndpaSection:"Section 38",pass:e.supportsPortability},{key:"supportsObjection",label:"Right to object supported",priority:"medium",effort:"medium",recommendation:"Honour objections to processing where no compelling legitimate grounds override the data subject's interests.",ndpaSection:"Section 36",pass:e.supportsObjection},{key:"responseTimeline",label:"DSR response within 30 days",priority:"high",effort:"medium",recommendation:"Reduce DSR response time to 30 days or less per NDPC guidance (GAID 2025).",ndpaSection:"Section 34 (NDPC GAID 2025 timeline guidance)",pass:i}]}function y(e){return [{key:"conductedForHighRisk",label:"DPIA conducted for high-risk processing",priority:"critical",effort:"high",recommendation:"Conduct a Data Protection Impact Assessment before undertaking high-risk processing activities.",ndpaSection:"Section 28",pass:e.conductedForHighRisk},{key:"documentedRisks",label:"Risks documented in DPIA",priority:"high",effort:"medium",recommendation:"Document identified risks to data subjects' rights and freedoms within the DPIA.",ndpaSection:"Section 28",pass:e.documentedRisks},{key:"mitigationMeasures",label:"Mitigation measures documented",priority:"high",effort:"medium",recommendation:"Document mitigation measures and residual risk acceptance within the DPIA.",ndpaSection:"Section 28",pass:e.mitigationMeasures}]}function b(e){return [{key:"hasNotificationProcess",label:"Breach notification process in place",priority:"critical",effort:"high",recommendation:"Establish a documented breach notification process covering detection, assessment, and reporting.",ndpaSection:"Section 40",pass:e.hasNotificationProcess},{key:"notifiesWithin72Hours",label:"NDPC notified within 72 hours",priority:"critical",effort:"medium",recommendation:"Ensure the NDPC is notified of qualifying breaches within 72 hours of discovery.",ndpaSection:"Section 40",pass:e.notifiesWithin72Hours},{key:"hasRiskAssessment",label:"Breach risk assessment performed",priority:"high",effort:"medium",recommendation:"Perform a risk assessment for every identified breach to determine notification obligations.",ndpaSection:"Section 40",pass:e.hasRiskAssessment},{key:"hasRecordKeeping",label:"Breach records maintained",priority:"medium",effort:"low",recommendation:"Maintain a breach register documenting all incidents, assessments, and actions taken.",ndpaSection:"Section 40",pass:e.hasRecordKeeping}]}function S(e){let t=p(e.lastUpdated)<=13;return [{key:"hasPrivacyPolicy",label:"Privacy policy exists",priority:"critical",effort:"high",recommendation:"Draft and publish a comprehensive privacy policy that satisfies NDPA requirements.",ndpaSection:"Section 27",pass:e.hasPrivacyPolicy},{key:"isPubliclyAccessible",label:"Privacy policy publicly accessible",priority:"high",effort:"low",recommendation:"Make the privacy policy easily accessible to data subjects on your website or app.",ndpaSection:"Section 27",pass:e.isPubliclyAccessible},{key:"policyUpToDate",label:"Privacy policy reviewed within 13 months",priority:"medium",effort:"medium",recommendation:"Review and update the privacy policy at least annually to reflect current practices.",ndpaSection:"Section 27",pass:t},{key:"coversAllSections",label:"Privacy policy covers all required sections",priority:"high",effort:"medium",recommendation:"Ensure the privacy policy addresses all NDPA-mandated disclosures including lawful basis, retention, and subject rights.",ndpaSection:"Section 27",pass:e.coversAllSections}]}function R(e){return [{key:"documentedForAllProcessing",label:"Lawful basis documented for all processing",priority:"critical",effort:"high",recommendation:"Identify and document a valid lawful basis for every processing activity before it begins.",ndpaSection:"Section 25(1)",pass:e.documentedForAllProcessing},{key:"hasLegitimateInterestAssessment",label:"Legitimate interest assessment completed",priority:"medium",effort:"medium",recommendation:"Complete a Legitimate Interest Assessment (LIA) where legitimate interests is the chosen lawful basis.",ndpaSection:"Section 25(1)",pass:e.hasLegitimateInterestAssessment}]}function v(e){return [{key:"hasTransferMechanisms",label:"Transfer mechanisms in place",priority:"critical",effort:"high",recommendation:"Implement appropriate transfer mechanisms (SCCs, BCRs, adequacy decisions, or Section 43 derogations) for all cross-border transfers.",ndpaSection:"Section 41",pass:e.hasTransferMechanisms},{key:"adequacyAssessed",label:"Adequacy of destination country assessed",priority:"high",effort:"medium",recommendation:"Assess whether the destination country provides an adequate level of data protection before transferring.",ndpaSection:"Section 42",pass:e.adequacyAssessed},{key:"ndpcApprovalObtained",label:"NDPC approval obtained where required",priority:"high",effort:"high",recommendation:"Obtain NDPC approval (e.g. for binding corporate rules, codes of conduct, or certification mechanisms) for transfers to countries without adequacy decisions where required.",ndpaSection:"Section 42(5)",pass:e.ndpcApprovalObtained}]}function w(e){let t=p(e.lastReviewed)<=6;return [{key:"maintained",label:"Record of Processing Activities maintained",priority:"critical",effort:"high",recommendation:"Create and maintain a comprehensive Record of Processing Activities (ROPA) as required by the NDPA.",ndpaSection:"Section 29",pass:e.maintained},{key:"includesAllProcessing",label:"ROPA includes all processing activities",priority:"high",effort:"medium",recommendation:"Ensure the ROPA captures every processing activity across all departments and systems.",ndpaSection:"Section 29",pass:e.includesAllProcessing},{key:"ropaUpToDate",label:"ROPA reviewed within 6 months",priority:"medium",effort:"low",recommendation:"Review and update the ROPA at least every six months to reflect changes in processing activities.",ndpaSection:"Section 29",pass:t}]}var k=[{name:"consent",weight:.2,ndpaSections:["Section 25","Section 26"],evaluate:e=>f(e.consent)},{name:"dsr",weight:.15,ndpaSections:["Section 34","Section 35","Section 36","Section 37","Section 38"],evaluate:e=>g(e.dsr)},{name:"breach",weight:.15,ndpaSections:["Section 40"],evaluate:e=>b(e.breach)},{name:"policy",weight:.12,ndpaSections:["Section 27"],evaluate:e=>S(e.policy)},{name:"dpia",weight:.12,ndpaSections:["Section 28"],evaluate:e=>y(e.dpia)},{name:"lawfulBasis",weight:.1,ndpaSections:["Section 25(1)"],evaluate:e=>R(e.lawfulBasis)},{name:"crossBorder",weight:.08,ndpaSections:["Section 41","Section 42","Section 43"],evaluate:e=>v(e.crossBorder)},{name:"ropa",weight:.08,ndpaSections:["Section 29"],evaluate:e=>w(e.ropa)}];function P(e){return e>=90?"excellent":e>=70?"good":e>=40?"needs-work":"critical"}function C(e){let i={},t=[],s=0;for(let o of k){let a=o.evaluate(e),c=u(a),l=c*o.weight;s+=l;let d=[];for(let n of a)n.pass||(d.push(n.label),t.push({module:o.name,key:n.key,label:n.label,priority:n.priority,effort:n.effort,recommendation:n.recommendation,ndpaSection:n.ndpaSection}));i[o.name]={name:o.name,score:c,maxScore:100,weightedScore:Math.round(l*100)/100,ndpaSections:o.ndpaSections,gaps:d};}t.sort((o,a)=>m.indexOf(o.priority)-m.indexOf(a.priority));let r=Math.round(s),h=[{section:"Section 25",title:"Consent and lawful basis for processing"},{section:"Section 26",title:"Withdrawal of consent and minor protection"},{section:"Section 27",title:"Privacy notice requirements"},{section:"Section 28",title:"Data Protection Impact Assessment (including Section 28(2) NDPC consultation)"},{section:"Section 29",title:"Records of processing activities"},{section:"Section 34",title:"Data subject rights (access, rectification, erasure, restriction)"},{section:"Section 35",title:"Right to withdraw consent"},{section:"Section 36",title:"Right to object"},{section:"Section 37",title:"Rights related to automated decision-making"},{section:"Section 38",title:"Right to data portability"},{section:"Section 40",title:"Data breach notification"},{section:"Section 41",title:"Cross-border transfer mechanisms (SCCs / BCRs)"},{section:"Section 42",title:"Cross-border adequacy decisions"},{section:"Section 43",title:"Cross-border transfer derogations"}];return {score:r,rating:P(r),modules:i,recommendations:t,regulatoryReferences:h,generatedAt:new Date().toISOString()}}exports.a=C;