ethyca-fides 2.71.2b0__py2.py3-none-any.whl → 2.72.0__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of ethyca-fides might be problematic. Click here for more details.

Files changed (311) hide show
  1. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0.dist-info}/RECORD +261 -245
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/4bfbeff34611_add_polling_status.py +45 -12
  5. fides/api/api/v1/endpoints/connection_endpoints.py +38 -45
  6. fides/api/api/v1/endpoints/saas_config_endpoints.py +60 -48
  7. fides/api/api/v1/endpoints/system.py +11 -43
  8. fides/api/api/v1/endpoints/user_endpoints.py +8 -1
  9. fides/api/app_setup.py +1 -3
  10. fides/api/common_exceptions.py +4 -0
  11. fides/api/email_templates/get_email_template.py +3 -0
  12. fides/api/email_templates/template_names.py +1 -0
  13. fides/api/email_templates/templates/manual_task_digest.html +316 -0
  14. fides/api/models/detection_discovery/monitor_task.py +1 -0
  15. fides/api/models/digest/digest_execution.py +11 -1
  16. fides/api/models/event_audit.py +9 -0
  17. fides/api/models/messaging_template.py +7 -0
  18. fides/api/schemas/connection_configuration/connection_config.py +1 -30
  19. fides/api/schemas/messaging/messaging.py +15 -0
  20. fides/api/service/connectors/saas/connector_registry_service.py +1 -138
  21. fides/api/service/deps.py +8 -0
  22. fides/api/service/messaging/message_dispatch_service.py +38 -1
  23. fides/api/service/privacy_request/request_runner_service.py +32 -1
  24. fides/api/tasks/__init__.py +0 -1
  25. fides/api/util/connection_util.py +99 -215
  26. fides/api/util/event_audit_util.py +230 -0
  27. fides/api/util/masking_util.py +31 -0
  28. fides/api/util/saas_config_updater.py +66 -0
  29. fides/service/connection/__init__.py +0 -0
  30. fides/service/connection/connection_service.py +651 -0
  31. fides/service/event_audit_service.py +16 -22
  32. fides/ui-build/static/admin/404.html +1 -1
  33. fides/ui-build/static/admin/_next/static/BOxlzhSs4KC4KKoRi_z4Y/_buildManifest.js +1 -0
  34. fides/ui-build/static/admin/_next/static/chunks/{1437-fb699e9d69c3e325.js → 1437-4604a69888906ec0.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/155-bf4e3ffb18f29226.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/{1817-10b392e1dd9c4673.js → 1817-6a6b4aea9d242c5b.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/{2040-01d5edb1802d3482.js → 2040-8eead9d29546a50f.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/{2397-40506a386a3a469a.js → 2397-92f628c53688925b.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/2921-9b596ba7f5267afc.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/3377-80612c111e047cb6.js +1 -0
  41. fides/ui-build/static/admin/_next/static/chunks/{3696-259be222ea12392a.js → 3696-e4abb6a922b954a2.js} +1 -1
  42. fides/ui-build/static/admin/_next/static/chunks/3700-1f9f6e5ebfa3ab0a.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/401-c2f1e4ea077f1f26.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/4496-8204168bae78092d.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/5185-bf5655b5d697b714.js +1 -0
  46. fides/ui-build/static/admin/_next/static/chunks/{5258-2d28b2c64acf5de3.js → 5258-63325c03319e87dc.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/{5279-21929b12c927b022.js → 5279-fcac4a8575f41ecc.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/5643-7800464c8df7a78e.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/{5783-55c0387508e50f3e.js → 5783-7deeb7de5d2db4c4.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/6277-0ab2a15c37b83b8d.js +1 -0
  51. fides/ui-build/static/admin/_next/static/chunks/{6315-2d4e86a32fc40458.js → 6315-d0b886d849c2e5e3.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/{6853-cb15625a713b3ef9.js → 6853-6d64d627df6f8194.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/6954-8b106311a3be35f4.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/7245-53a20677c49b41c8.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/{7476-f25fce73eeb1f9c6.js → 7476-08717f00da5f89ab.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/{7488-df17b592fbeaa1eb.js → 7488-bad160a2bfd89871.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/7630-775c578fa8109b0f.js +1 -0
  58. fides/ui-build/static/admin/_next/static/chunks/{8011-56031d82d5428981.js → 8011-c23d609ed3f0efa5.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/8212-67ac884660ddb63a.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/{8373-7f940f5ac9c38b1f.js → 8373-43b6df89a2085d6b.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/{9046-31b16a7e872c22be.js → 9046-28fe0723e3b6584f.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/9070-6d3aaaf5aa5913ba.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/{9330-cea1bf40f5d27e53.js → 9330-6eb11127296c54c2.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/{9682-2754256aeae141bb.js → 9682-65d253d54f84f6f2.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/{9899-15530c468d5656a1.js → 9899-63998972698a49fb.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/9965-4709f43bf62af9a9.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-9e869a44215709ed.js → _app-4f697016cf2fb1bb.js} +43 -43
  68. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-e2a5c951347195e3.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0058fe05f2d23d1a.js +1 -0
  70. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-b6b2d50d894cefa5.js +1 -0
  71. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-a7fe3925771bb6c3.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-e9ec351281c54822.js +1 -0
  73. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-69b429a9d30ebaf1.js → projects-3c935e93208d2bdd.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-a53ef0161235ee47.js → data-catalog-79d06a04698c47c0.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-e50e9c8e11412b2a.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/data-explorer-dd93cffd6744837d.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-ace848575e688200.js → [monitorId]-878aa4ab0746df5b.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-53ca31c50c43007f.js → action-center-a2e9c0bfa67c633d.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-f87e4a0f664f4cde.js → activity-70ca690b253a118e.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-db54d01fd8f6df50.js → new-5c20080cdb053b1d.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-55d312af5228e098.js → dataset-96355a68e8c28fe8.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-488beba62e832660.js → [id]-448729ee9d1d78c3.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-4aad5495f9bf81ce.js → new-42c720ec5c941573.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/{index-8a2ba955d92d52ee.js → index-ca794e85c16cba67.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-2f1dc17eba11fb4e.js +1 -0
  86. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-f69b04d3b4cf43b1.js → integrations-bbec0140433a199b.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/[id]-058125922d1eaeec.js +1 -0
  88. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/new-7a5f76708c79f714.js +1 -0
  89. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests-31bed1f86b89d1d8.js +1 -0
  90. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/[key]-d08f3a7cd2d011ec.js +1 -0
  91. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/new-cb2c7fbc26886052.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-40b9f1f70d27b660.js +1 -0
  93. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/[id]-a6ae72abe59ff830.js +1 -0
  94. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/add-template-a3e4b5b575b31be1.js +1 -0
  95. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-4918f86f7300ac9b.js +1 -0
  96. fides/ui-build/static/admin/_next/static/chunks/pages/notifications-9644c0f088a01fea.js +1 -0
  97. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-39b5586d9c8b64aa.js +1 -0
  98. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-5163f3213377bd35.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-0b1547cd9b114c6b.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-da562cba4cffd6bb.js +1 -0
  101. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-3a587676869d2ef6.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-defc3b917306a6d8.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-b46f432b51421fae.js → table-migration-11a70bcfa672ce8f.js} +1 -1
  104. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-787621468b5a7619.js +1 -0
  105. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-de681c2d022c9e0d.js → storage-24a8c2ab57625556.js} +1 -1
  106. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-da634187d8201ab3.js +1 -0
  107. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-e410d13a2b35cff4.js +1 -0
  108. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-aec1bf8a409ec75f.js +1 -0
  109. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4c20c08ca7ea8cff.js +1 -0
  110. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-ea9baf24de35d3b1.js → custom-fields-8e4a76376927afd5.js} +1 -1
  111. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-2e88cc7a6074a28b.js +1 -0
  112. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-33448bf0a1d53870.js → locations-20789aa0c84d544e.js} +1 -1
  113. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-3c315036f1fc9f90.js → organization-f84a13eb9688cb5f.js} +1 -1
  114. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-5be9ce7a745ce908.js +1 -0
  115. fides/ui-build/static/admin/_next/static/chunks/pages/systems-86f5557384124f79.js +1 -0
  116. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-2589729c47976357.js +1 -0
  117. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-726fbc0a34ffba1f.js → [id]-6217433a26599521.js} +1 -1
  118. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-df9b75ab01c1a2ea.js → user-management-b6c4bf35c003965d.js} +1 -1
  119. fides/ui-build/static/admin/_next/static/css/de09ed8a0adf1ca2.css +1 -0
  120. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  121. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  122. fides/ui-build/static/admin/add-systems.html +1 -1
  123. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  124. fides/ui-build/static/admin/consent/configure.html +1 -1
  125. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  126. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  127. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  128. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  129. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  130. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  131. fides/ui-build/static/admin/consent/properties.html +1 -1
  132. fides/ui-build/static/admin/consent/reporting.html +1 -1
  133. fides/ui-build/static/admin/consent.html +1 -1
  134. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  135. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  136. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  137. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  138. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  139. fides/ui-build/static/admin/data-catalog.html +1 -1
  140. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  141. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/data-explorer.html +1 -1
  142. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  143. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  144. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  145. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  146. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  147. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  148. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  149. fides/ui-build/static/admin/datamap.html +1 -1
  150. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  151. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  152. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  153. fides/ui-build/static/admin/dataset/new.html +1 -1
  154. fides/ui-build/static/admin/dataset.html +1 -1
  155. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  156. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  157. fides/ui-build/static/admin/datastore-connection.html +1 -1
  158. fides/ui-build/static/admin/index.html +1 -1
  159. fides/ui-build/static/admin/integrations/[id].html +1 -1
  160. fides/ui-build/static/admin/integrations.html +1 -1
  161. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  162. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  163. fides/ui-build/static/admin/lib/fides.js +2 -2
  164. fides/ui-build/static/admin/login/[provider].html +1 -1
  165. fides/ui-build/static/admin/login.html +1 -1
  166. fides/ui-build/static/admin/notifications/digests/[id].html +1 -0
  167. fides/ui-build/static/admin/notifications/digests/new.html +1 -0
  168. fides/ui-build/static/admin/notifications/digests.html +1 -0
  169. fides/ui-build/static/admin/notifications/providers/[key].html +1 -0
  170. fides/ui-build/static/admin/notifications/providers/new.html +1 -0
  171. fides/ui-build/static/admin/notifications/providers.html +1 -0
  172. fides/ui-build/static/admin/notifications/templates/[id].html +1 -0
  173. fides/ui-build/static/admin/notifications/templates/add-template.html +1 -0
  174. fides/ui-build/static/admin/notifications/templates.html +1 -0
  175. fides/ui-build/static/admin/notifications.html +1 -0
  176. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  177. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  178. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  179. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  180. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  181. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  182. fides/ui-build/static/admin/poc/forms.html +1 -1
  183. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  184. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  185. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  186. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  187. fides/ui-build/static/admin/privacy-requests.html +1 -1
  188. fides/ui-build/static/admin/properties/[id].html +1 -1
  189. fides/ui-build/static/admin/properties/add-property.html +1 -1
  190. fides/ui-build/static/admin/properties.html +1 -1
  191. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  192. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  193. fides/ui-build/static/admin/settings/about.html +1 -1
  194. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  195. fides/ui-build/static/admin/settings/consent.html +1 -1
  196. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  197. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  198. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  199. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  200. fides/ui-build/static/admin/settings/domains.html +1 -1
  201. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  202. fides/ui-build/static/admin/settings/locations.html +1 -1
  203. fides/ui-build/static/admin/settings/organization.html +1 -1
  204. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  205. fides/ui-build/static/admin/settings/regulations.html +1 -1
  206. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  207. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  208. fides/ui-build/static/admin/systems.html +1 -1
  209. fides/ui-build/static/admin/taxonomy.html +1 -1
  210. fides/ui-build/static/admin/user-management/new.html +1 -1
  211. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  212. fides/ui-build/static/admin/user-management.html +1 -1
  213. fides/ui-build/static/admin/_next/static/chunks/155-3d03f101c662c054.js +0 -1
  214. fides/ui-build/static/admin/_next/static/chunks/2921-edfdffa353a611e4.js +0 -1
  215. fides/ui-build/static/admin/_next/static/chunks/3377-4c129258b4c4ea28.js +0 -1
  216. fides/ui-build/static/admin/_next/static/chunks/3700-42976bfaad3b91c9.js +0 -1
  217. fides/ui-build/static/admin/_next/static/chunks/401-5270e3e23b08ab2b.js +0 -1
  218. fides/ui-build/static/admin/_next/static/chunks/5185-325e5435a0c7dcb7.js +0 -1
  219. fides/ui-build/static/admin/_next/static/chunks/5643-7583c1f8dbd83273.js +0 -1
  220. fides/ui-build/static/admin/_next/static/chunks/6277-ca31d48a33202761.js +0 -1
  221. fides/ui-build/static/admin/_next/static/chunks/6954-08b59d28d7a2a43b.js +0 -1
  222. fides/ui-build/static/admin/_next/static/chunks/7245-895bb7c6a6c797bc.js +0 -1
  223. fides/ui-build/static/admin/_next/static/chunks/7630-71582de0e818e28f.js +0 -1
  224. fides/ui-build/static/admin/_next/static/chunks/9070-13f237db78da586d.js +0 -1
  225. fides/ui-build/static/admin/_next/static/chunks/9965-54037b6c8f36d14b.js +0 -1
  226. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-1c9cef80deccb15d.js +0 -1
  227. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-4adeec3bcec05f7b.js +0 -1
  228. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-4254abef7bb52edd.js +0 -1
  229. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-8e76cbfaf71fdcb9.js +0 -1
  230. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-93730a4316c0d980.js +0 -1
  231. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-f85f4f8fcf1bfbdb.js +0 -1
  232. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/data-explorer-3619e454763dba09.js +0 -1
  233. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-4580f70eb41b6a7d.js +0 -1
  234. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-d6eed2dc5d27f625.js +0 -1
  235. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-c7b43fa365f4be10.js +0 -1
  236. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-c7ba755c2e0e2377.js +0 -1
  237. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-f14bfd5890a0e939.js +0 -1
  238. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-e4274a4d5d23eea9.js +0 -1
  239. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-f5bce1ceb0502f04.js +0 -1
  240. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-90b4ea9f9deca6e2.js +0 -1
  241. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-d6043ae8dae6ef7d.js +0 -1
  242. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-520ba5ae02f47bda.js +0 -1
  243. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-fe4ed3ad75151e36.js +0 -1
  244. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-cd8ba2eef9085377.js +0 -1
  245. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-764b6ce8e030d4a1.js +0 -1
  246. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-da78452b3c41b29e.js +0 -1
  247. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-6442e761ecb5c65a.js +0 -1
  248. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-6f61d886aa6f5ce7.js +0 -1
  249. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/[key]-4a18d8135c0dbf2a.js +0 -1
  250. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/new-41957281b8ec26b1.js +0 -1
  251. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-776258bad0941a7d.js +0 -1
  252. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-8067e12227210f48.js +0 -1
  253. fides/ui-build/static/admin/_next/static/chunks/pages/systems-277ea1f34c3714cf.js +0 -1
  254. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-cecea5832cb1f3b0.js +0 -1
  255. fides/ui-build/static/admin/_next/static/css/372d6a236c84613f.css +0 -1
  256. fides/ui-build/static/admin/_next/static/zmEQMSpOBih8kmA1t-EWO/_buildManifest.js +0 -1
  257. fides/ui-build/static/admin/messaging/[id].html +0 -1
  258. fides/ui-build/static/admin/messaging/add-template.html +0 -1
  259. fides/ui-build/static/admin/messaging.html +0 -1
  260. fides/ui-build/static/admin/settings/messaging-providers/[key].html +0 -1
  261. fides/ui-build/static/admin/settings/messaging-providers/new.html +0 -1
  262. fides/ui-build/static/admin/settings/messaging-providers.html +0 -1
  263. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0.dist-info}/WHEEL +0 -0
  264. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0.dist-info}/entry_points.txt +0 -0
  265. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0.dist-info}/licenses/LICENSE +0 -0
  266. {ethyca_fides-2.71.2b0.dist-info → ethyca_fides-2.72.0.dist-info}/top_level.txt +0 -0
  267. /fides/ui-build/static/admin/_next/static/{zmEQMSpOBih8kmA1t-EWO → BOxlzhSs4KC4KKoRi_z4Y}/_ssgManifest.js +0 -0
  268. /fides/ui-build/static/admin/_next/static/chunks/{1099-27b2d4e59a569b38.js → 1099-d1b22e891705eaf8.js} +0 -0
  269. /fides/ui-build/static/admin/_next/static/chunks/{1115-8fb5000847f73ec7.js → 1115-584dac093cef6cc3.js} +0 -0
  270. /fides/ui-build/static/admin/_next/static/chunks/{3772-aa7beafe5df5e656.js → 3772-b945c6839e43c753.js} +0 -0
  271. /fides/ui-build/static/admin/_next/static/chunks/{3923-fa1d71afc7dc9e6e.js → 3923-c1e41661ebf57178.js} +0 -0
  272. /fides/ui-build/static/admin/_next/static/chunks/{4817-5f9b9c9bafe888f1.js → 4817-066598cef25d7e88.js} +0 -0
  273. /fides/ui-build/static/admin/_next/static/chunks/{549-c3b4c51f45a84a52.js → 549-3e3b8d01bc984f96.js} +0 -0
  274. /fides/ui-build/static/admin/_next/static/chunks/{7773-98d34d188ae0a694.js → 7773-24899908bf8ff659.js} +0 -0
  275. /fides/ui-build/static/admin/_next/static/chunks/{796-7944f684f8945506.js → 796-6fe49d134f660156.js} +0 -0
  276. /fides/ui-build/static/admin/_next/static/chunks/{9826-e71887e2c4283249.js → 9826-1f42934a2863992e.js} +0 -0
  277. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-2014144a1a0fa64f.js → 404-962d132471cd41ba.js} +0 -0
  278. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-4f3ba02774f27795.js → manual-055d058d16c02957.js} +0 -0
  279. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-f7bdc2da53137ffd.js → add-vendors-7c829e58485fc821.js} +0 -0
  280. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-a27b220fe76bdc8e.js → configure-5c58b69dd473cc06.js} +0 -0
  281. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-542fd4a4322122f1.js → [id]-58460ac9c1dface5.js} +0 -0
  282. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-d31d1c233e94dc1f.js → [id]-25ce8366e689363b.js} +0 -0
  283. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2ea057e6217993f9.js → new-faa457089616711a.js} +0 -0
  284. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-eb557180eded0abd.js → properties-45a2901a35edc8f7.js} +0 -0
  285. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-c64589e53338e59a.js → consent-a7a4e419e4086033.js} +0 -0
  286. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-d3d1841bc8105e56.js → [resourceUrn]-3b59925f6c9a13a9.js} +0 -0
  287. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-8cd4d1d6ba000333.js → [projectUrn]-ffb6e0fe6712342e.js} +0 -0
  288. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-791c522ad1d9a2ce.js → [resourceUrn]-8d7d9152e215c3b6.js} +0 -0
  289. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-8c7103ebf01d6e6a.js → resources-96be972a983616e3.js} +0 -0
  290. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-699762cb8a66237e.js → [resourceUrn]-260f5deb68966b70.js} +0 -0
  291. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-d970d0b82db36c88.js → detection-d735dab3d9f3adc5.js} +0 -0
  292. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-a6343038a447699c.js → [resourceUrn]-c7f055275a2c503f.js} +0 -0
  293. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-ce82ba79f9bf825c.js → discovery-b1cfd55c7e127865.js} +0 -0
  294. /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-ae7a4c1c4eabc0d4.js → datamap-18f255a8bbeecaa4.js} +0 -0
  295. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-179e5d09ccff50c1.js → [...subfieldNames]-e04a4e16ccf32aef.js} +0 -0
  296. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-59466e5e238c59d0.js → [collectionName]-a40c4febe16a0a6d.js} +0 -0
  297. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-36d90c8c39fb0d1c.js → [datasetId]-f500a77eefb057e7.js} +0 -0
  298. /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-496ec7ecca8259dc.js → datastore-connection-a8fc95a46de38b35.js} +0 -0
  299. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-04ebf2fb6fc4358a.js → configure-1926359bdf5d6c30.js} +0 -0
  300. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-f75a407d78857ab3.js → [id]-47118b9976ad7212.js} +0 -0
  301. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-975ff605e1dbc09c.js → add-property-2e6b0d8b409ba1fd.js} +0 -0
  302. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-e7fdf3a9a3e8c267.js → properties-32486c25255c9cb1.js} +0 -0
  303. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{[id]-bd1042a0e9be6aff.js → [id]-a270325109398f48.js} +0 -0
  304. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{new-469ad83c8cfa1290.js → new-2e0c8e249f286427.js} +0 -0
  305. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-44d06e280990854d.js → domain-records-e3dcef1ec8cf8b9e.js} +0 -0
  306. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-11148b182370fd83.js → email-templates-7469d2f85396c693.js} +0 -0
  307. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{privacy-requests-00917525c9245a90.js → privacy-requests-b72df6f3d460125f.js} +0 -0
  308. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-5d924b2f1f926b88.js → regulations-aa02bc818e089c49.js} +0 -0
  309. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-1a902922759cae76.js → [id]-2fc7c0d3988427b3.js} +0 -0
  310. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-629c88e90699369b.js → new-e399005c3bb4db1b.js} +0 -0
  311. /fides/ui-build/static/admin/_next/static/chunks/{webpack-118fb4723d13c14f.js → webpack-8eac1ea5c825c8b4.js} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return s(77169)}])},35287:function(e,t,s){"use strict";var i=s(24246),l=s(20595),a=s(88038),r=s.n(a);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:a}=e;return(0,i.jsxs)(l.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(l.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,s){"use strict";var i=s(24246),l=s(20595);t.Z=e=>{let{title:t,text:s,onClose:a}=e;return(0,i.jsxs)(l.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[a&&(0,i.jsx)(l.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,i.jsx)(l.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(l.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(l.X6q,{fontSize:"md",children:t}),(0,i.jsx)(l.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},96718:function(e,t,s){"use strict";s.d(t,{z:function(){return a}});var i=s(24246),l=s(20595);let a=e=>{let{...t}=e;return(0,i.jsx)(l.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,styles:t.mode?void 0:{popup:{root:{width:"auto",minWidth:"200px"}}},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return o}});var i=s(24246),l=s(20595),a=s(34090),r=s(27378),n=s(46238),d=s(40324);let o=e=>{let{name:t,label:s,labelProps:o,tooltip:c,isRequired:u,layout:p="inline",helperText:m,...x}=e,[h,v,{setValue:y}]=(0,a.U$)(t),j=!!(v.touched&&v.error),[g,f]=(0,r.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let _="tags"===x.mode?(e,t)=>e?e.value!==g||h.value.includes(g)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:x.optionRender||void 0,b=e=>{f(e),x.onSearch&&x.onSearch(e)},q=(e,t)=>{y(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,i.jsx)(l.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(l.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:s}):null,(0,i.jsxs)(l.jqI,{align:"center",children:[(0,i.jsxs)(l.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(l.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:_,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(l.Q6r,{children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:v.error,fieldName:h.name})]}),(0,i.jsx)(n.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(l.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(l.gCW,{alignItems:"start",children:[(0,i.jsxs)(l.jqI,{align:"center",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:s}):null,(0,i.jsx)(n.b,{label:c})]}),(0,i.jsx)(l.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:_,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(l.Q6r,{style:{marginTop:0},children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:v.error,fieldName:h.name})]})})}},9270:function(e,t,s){"use strict";s.d(t,{S:function(){return a}});var i=s(27378),l=s(36866);let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.h)(e),{pageIndex:s,pageSize:a,updatePageIndex:r,updatePageSize:n,pageSizeOptions:d,showSizeChanger:o}=t,c=(0,i.useMemo)(()=>({current:s,pageSize:a,showSizeChanger:o,pageSizeOptions:d.map(String),onChange:r,onShowSizeChange:(e,t)=>{n(t)}}),[s,a,o,d,r,n]);return{...t,paginationProps:c}}},71784:function(e,t,s){"use strict";s.d(t,{DE:function(){return n},I3:function(){return l},kN:function(){return r},rE:function(){return a}});var i=s(85054);let l=[...new Map([[i.q2.APPROVED,"Approved"],[i.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[i.q2.CANCELED,"Canceled"],[i.q2.COMPLETE,"Completed"],[i.q2.DENIED,"Denied"],[i.q2.ERROR,"Error"],[i.q2.IN_PROCESSING,"In progress"],[i.q2.PENDING,"New"],[i.q2.PAUSED,"Paused"],[i.q2.IDENTITY_UNVERIFIED,"Unverified"],[i.q2.REQUIRES_INPUT,"Requires input"],[i.q2.REQUIRES_MANUAL_FINALIZATION,"Requires finalization"]])].map(e=>{let[t,s]=e;return{label:s,value:t}}),a=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),r=[...a].map(e=>{let[t,s]=e;return{label:s,value:t}}),n={local:"local",s3:"s3",gcs:"gcs"}},77169:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eU}});var i,l,a=s(24246),r=s(35287),n=s(20595),d=s(65218),o=s.n(d),c=s(27378),u=s(25980),p=s(19904),m=s(56141),x=s.n(m),h=s(86677),v=s(16134),y=s(91317),j=s(18225),g=s(77830),f=s(28407),_=s(16394),b=s(85054),q=s(32735),C=s(59969),S=s(71784),k=s(45116);let E=e=>{let{label:t,children:s}=e;return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"shrink-0 grow-0 basis-1/3 pr-2",children:(0,a.jsxs)(n.AntTypography.Text,{className:"text-gray-700",children:[t,":"]})}),(0,a.jsx)("div",{className:"min-w-0 shrink grow text-gray-600",children:s})]})},R=e=>{let{task:t}=e,s=t.request_type===b.k6.ACCESS?b.Us.ACCESS:b.Us.ERASURE,i=S.rE.get(s)||t.request_type;return(0,a.jsxs)("div",{className:"flex flex-col space-y-3","data-testid":"task-details-container",children:[(0,a.jsx)(E,{label:"Name",children:(0,a.jsx)(n.AntTypography.Text,{children:t.name})}),(0,a.jsx)(E,{label:"Description",children:(0,a.jsx)(n.AntTypography.Text,{children:t.description||"-"})}),(0,a.jsx)(E,{label:"Request Type",children:(0,a.jsx)(n.AntTypography.Text,{children:i})}),(0,a.jsx)(E,{label:"Assigned To",children:t.assigned_users&&t.assigned_users.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1","data-testid":"assigned-users-tags",children:t.assigned_users.map(e=>(0,a.jsx)(n.j8w,{"data-testid":"assigned-user-tag-".concat(e.id),children:"".concat(e.first_name||""," ").concat(e.last_name||"").trim()||e.email_address||"Unknown User"},e.id))}):(0,a.jsx)(n.AntTypography.Text,{children:"No one assigned"})}),t.privacy_request.subject_identities&&Object.keys(t.privacy_request.subject_identities).length>0?(0,a.jsx)(E,{label:"Subject identities",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.subject_identities).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",String(s)]},t)})})}):null,t.privacy_request.custom_fields&&Object.keys(t.privacy_request.custom_fields).length>0?(0,a.jsx)(E,{label:"Custom fields",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.custom_fields).filter(e=>{let[,t]=e;return t}).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",String(s)]},t)})})}):null]})},w=e=>{let{isOpen:t,onClose:s,task:i}=e,[l,{isLoading:r}]=(0,k.HP)(),[d,o]=(0,c.useState)(""),[u,p]=(0,c.useState)(!1),[m,x]=(0,c.useState)(""),[h,v]=(0,c.useState)([]),y=async()=>{try{await l({privacy_request_id:i.privacy_request.id,manual_field_id:i.manual_field_id,field_value:i.input_type===b.PF.TEXT?d:i.input_type===b.PF.CHECKBOX?u.toString():void 0,comment_text:m||void 0,attachments:h.length>0?h.map(e=>e.originFileObj).filter(Boolean):void 0}).unwrap(),o(""),p(!1),x(""),v([]),s()}catch(e){n.Pg3.error("Failed to complete task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"complete-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Complete Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(R,{task:i})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(()=>{switch(i.input_type){case b.PF.TEXT:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Subject data"}),(0,a.jsx)(n.uFc.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Enter your response...",rows:4,"data-testid":"complete-modal-text-input"})]});case b.PF.CHECKBOX:return(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsx)(n.E_O,{checked:u,onChange:e=>p(e.target.checked),"data-testid":"complete-modal-checkbox",children:"The task has been completed"})});default:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Upload Files"}),(0,a.jsx)("div",{children:(0,a.jsx)(n.pMK,{fileList:h,onChange:e=>{let{fileList:t}=e;return v(t)},beforeUpload:()=>!1,"data-testid":"complete-modal-file-upload",multiple:!0,children:(0,a.jsx)(n.wpx,{"data-testid":"complete-modal-upload-button",children:"Click to Upload"})})})]})}})(),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Internal comment"}),(0,a.jsx)(n.uFc.TextArea,{value:m,onChange:e=>x(e.target.value),placeholder:"Add any additional comments...",rows:3,"data-testid":"complete-modal-comment-input"})]})]})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),p(!1),x(""),v([]),s()},disabled:r,"data-testid":"complete-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:y,loading:r,disabled:!(()=>{switch(i.input_type){case b.PF.TEXT:return d.trim().length>0;case b.PF.CHECKBOX:return u;default:return h.length>0}})(),"data-testid":"complete-modal-save-button",children:"Save"})]})})]})]})},T=e=>{let{isOpen:t,onClose:s,task:i}=e,[l,{isLoading:r}]=(0,k.DA)(),[d,o]=(0,c.useState)(""),u=async()=>{try{await l({privacy_request_id:i.privacy_request.id,manual_field_id:i.manual_field_id,skip_reason:d}).unwrap(),o(""),s()}catch(e){n.Pg3.error("Failed to skip task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"skip-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Skip Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(R,{task:i})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"flex flex-col space-y-4",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Reason for skipping (Required)"}),(0,a.jsx)(n.uFc.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Please provide a reason for skipping this task...",rows:4,"data-testid":"skip-modal-comment-input"})]})})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),s()},disabled:r,"data-testid":"skip-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:u,loading:r,disabled:!d.trim(),danger:!0,"data-testid":"skip-modal-skip-button",children:"Skip Task"})]})})]})]})},I=e=>{let{task:t}=e,s=(0,h.useRouter)(),{isOpen:i,onOpen:l,onClose:r}=(0,n.qY0)(),{isOpen:d,onOpen:o,onClose:c}=(0,n.qY0)(),u=(0,p.Tg)([b.Sh.PRIVACY_REQUEST_READ]);if(t.status!==b.OS.NEW)return null;let m=[{key:"skip",label:"Skip task",onClick:o}];return u&&m.push({key:"go-to-request",label:"Go to request",onClick:()=>{s.push({pathname:g.ld,query:{id:t.privacy_request.id}})}}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.vyj,{size:"small",children:[(0,a.jsx)(n.wpx,{type:"default",onClick:l,size:"small",children:"Complete"}),(0,a.jsx)(n.S0p,{menu:{items:m},trigger:["click"],placement:"bottomRight",overlayStyle:{minWidth:120},children:(0,a.jsx)(n.wpx,{size:"small",icon:(0,a.jsx)(n.PJP.r43,{}),"aria-label":"More actions"})})]}),(0,a.jsx)(w,{isOpen:i,onClose:r,task:t}),(0,a.jsx)(T,{isOpen:d,onClose:c,task:t})]})},A={[b.OS.NEW]:{color:"info",label:"New"},[b.OS.COMPLETED]:{color:"success",label:"Completed"},[b.OS.SKIPPED]:{color:"marble",label:"Skipped"}},N=[{text:"New",value:b.OS.NEW},{text:"Completed",value:b.OS.COMPLETED},{text:"Skipped",value:b.OS.SKIPPED}],P=[{text:"Access",value:b.k6.ACCESS},{text:"Erasure",value:b.k6.ERASURE}],O=e=>{let{systemFilters:t,userFilters:s,onUserClick:i,currentFilters:l,hasAccessToAllTasks:r}=e,d=[{title:"Task name",dataIndex:"name",key:"name",minWidth:100,render:e=>(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:e},children:e})},{title:"Status",dataIndex:"status",key:"status",width:110,render:e=>(0,a.jsx)(n.j8w,{color:A[e].color,"data-testid":"manual-task-status-tag",children:A[e].label}),filters:N,filterMultiple:!1},{title:"System",dataIndex:["system","name"],key:"system_name",minWidth:100,render:e=>(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:e},children:e}),filters:t,filterMultiple:!1},{title:"Type",dataIndex:"request_type",key:"request_type",width:80,render:e=>{let t=e===b.k6.ACCESS?b.Us.ACCESS:b.Us.ERASURE,s=S.rE.get(t)||e;return(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:s},children:s})},filters:P,filterMultiple:!1},{title:"Assigned to",dataIndex:"assigned_users",key:"assigned_users",minWidth:100,render:e=>{if(!e||0===e.length)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.map(e=>({label:(0,_.gJ)(e),value:e.id})),s=e.map(e=>e.id);return(0,a.jsx)(n.d3V,{value:s,options:t,readonly:!0,onTagClick:e=>i(String(e))})},filters:s,filterMultiple:!1,defaultFilteredValue:l.assignedUsers?[l.assignedUsers]:void 0},{title:"Days left",dataIndex:["privacy_request","days_left"],key:"days_left",width:90,render:e=>(0,a.jsx)(C.Z,{daysLeft:e||0,includeText:!1,status:b.q2.PENDING})},{title:"Subject identity",dataIndex:["privacy_request","subject_identities"],key:"subject_identities",minWidth:120,render:e=>{if(!e)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.email||e.phone_number||"";return(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:t},children:t})}},{title:"Actions",key:"actions",width:145,render:(e,t)=>(0,a.jsx)(I,{task:t})}];return r?d:d.filter(e=>"assigned_users"!==e.key)},U=()=>{let e=(0,h.useRouter)(),t=(0,v.C)(y.dy),[s,i]=(0,c.useState)(1),[l,r]=(0,c.useState)(25),d=(0,p.Tg)([b.Sh.MANUAL_FIELD_READ_ALL]),o=e.query.privacy_request_id||void 0,u=(0,c.useMemo)(()=>{let e={};return(null==t?void 0:t.id)&&!o&&(e.assignedUsers=t.id),o&&"string"==typeof o&&(e.privacyRequestId=o),e},[null==t?void 0:t.id,o]),[m,C]=(0,c.useState)(u),{data:S,isLoading:E,isFetching:R}=(0,k.Ym)({page:s,size:l,status:m.status,systemName:m.systemName,requestType:m.requestType,assignedUserId:m.assignedUsers,privacyRequestId:m.privacyRequestId}),{data:w}=(0,k.Ym)({page:1,size:1}),{items:T,total:I}=(0,c.useMemo)(()=>S||{items:[],total:0,pages:0,filter_options:{assigned_users:[],systems:[]}},[S]),A=(0,c.useMemo)(()=>(null==w?void 0:w.filter_options)||{assigned_users:[],systems:[]},[w]),N=O({systemFilters:(0,c.useMemo)(()=>{var e;return(null==A?void 0:null===(e=A.systems)||void 0===e?void 0:e.map(e=>({text:e.name,value:e.name})))||[]},[null==A?void 0:A.systems]),userFilters:(0,c.useMemo)(()=>{var e;let s=(null==A?void 0:null===(e=A.assigned_users)||void 0===e?void 0:e.map(e=>({text:(0,_.gJ)(e),value:e.id})))||[];return(null==t?void 0:t.id)&&!s.some(e=>e.value===t.id)&&s.push({text:(0,_.gJ)(t,{fallbackToId:!0}),value:t.id}),s},[null==A?void 0:A.assigned_users,t]),onUserClick:t=>{e.push({pathname:g.fw,query:{id:t}})},currentFilters:m,hasAccessToAllTasks:d}),P=(0,c.useMemo)(()=>x()(m,u),[m,u]);return E?(0,a.jsx)(j.Z,{}):(0,a.jsxs)("div",{className:"mt-2 space-y-4",children:[(0,a.jsx)(n.kCb,{gap:3,align:"center",className:"mb-4",children:(0,a.jsx)(f.H,{globalFilter:m.privacyRequestId||"",setGlobalFilter:e=>{let t={...m};e&&e.trim()?t.privacyRequestId=e.trim():delete t.privacyRequestId,C(t),i(1)},placeholder:"Search by privacy request ID",testid:"privacy-request-id-filter"})}),(0,a.jsx)(n.V5H,{columns:N,dataSource:T,rowKey:e=>"".concat(e.privacy_request.id,"-").concat(e.manual_field_id),pagination:{current:s,pageSize:l,pageSizeOptions:q.VZ,total:I||0,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),onChange:(e,t)=>{i(e),t!==l&&(r(t),i(1))}},onChange:(e,t)=>{let s={privacyRequestId:m.privacyRequestId};t.status&&([s.status]=t.status),t.system_name&&([s.systemName]=t.system_name),t.request_type&&([s.requestType]=t.request_type),t.assigned_users&&([s.assignedUsers]=t.assigned_users),C(s),i(1)},locale:{emptyText:P?(0,a.jsx)("div",{"data-testid":"empty-state-current-user",className:"my-4",children:(0,a.jsxs)(n.AntTypography.Paragraph,{children:["You have no tasks assigned."," ",d&&(0,a.jsx)("span",{children:'You can modify the "Assigned to" column filter to view tasks assigned to other users.'})]})}):(0,a.jsx)("div",{"data-testid":"empty-state",className:"my-4",children:"No results found."})},loading:E||R,scroll:{scrollToFirstRowOnChange:!0},tableLayout:"fixed",className:"[&_th]:!break-normal"})]})};var z=s(59003),F=s(92222),D=s(40431),M=s(16125),Z=s(14048),L=s(47935),W=s(90867);let Y={approved:{colorScheme:"success",label:"Approved"},complete:{label:"Completed",colorScheme:"success"},awaiting_email_send:{label:"Awaiting Email Send",colorScheme:"marble"},denied:{label:"Denied",colorScheme:"warning"},canceled:{label:"Canceled",colorScheme:"marble"},error:{label:"Error",colorScheme:"error"},in_processing:{label:"In Progress",colorScheme:"caution"},paused:{label:"Paused",colorScheme:"marble"},pending:{label:"New",colorScheme:"info"},identity_unverified:{label:"Unverified",colorScheme:"marble"},requires_input:{colorScheme:"minos",label:"Requires Input"},requires_manual_finalization:{colorScheme:"minos",label:"Requires Finalization"}},B=e=>{let{value:t}=e;return(0,a.jsx)(L.A4,{color:Y[t].colorScheme,value:Y[t].label,"data-testid":"request-status-badge"})},V=e=>{let t,{daysLeft:s,timeframe:i=45,status:l,includeText:r=!1}=e;if(null==s||l===b.q2.COMPLETE||l===b.q2.CANCELED||l===b.q2.DENIED||l===b.q2.IDENTITY_UNVERIFIED)return null;let n=100*s/i;return n<25?t="error":n>=75?t="success":n>=25&&(t="warning"),(0,a.jsx)(L.A4,{value:r?"".concat(s," days left"):s.toString(),color:t})},K=e=>Array.from(new Set(e.filter(e=>Object.values(b.Us).includes(e.action_type)).map(e=>e.action_type))),G=e=>{let{value:t}=e,s=K(t).map(e=>S.rE.get(e));return(0,a.jsx)(L.WP,{value:s,cellState:{isExpanded:!0}})};var Q=s(58452),X=s(7426),J=s(57526),H=s(66548),$=s(45489),ee=s(42478);let et=e=>{var t;let{subjectRequest:s,...i}=e,l=(0,n.qY0)(),r=(0,n.qY0)(),d=(0,n.qY0)(),o=(0,n.qY0)(),{handleApproveRequest:c,handleDenyRequest:u,handleDeleteRequest:m,handleFinalizeRequest:x,isLoading:h}=(0,$.Z)({subjectRequest:s}),{data:v}=(0,X.tB)({api_set:!1}),{data:y}=(0,ee.JE)(),j=null==v?void 0:null===(t=v.notifications)||void 0===t?void 0:t.send_request_completion_notification;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Ugi,{...i,children:["pending"!==s.status?null:(0,a.jsx)(n.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(n.PJP.MCw,{}),onClick:l.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==s.status?null:(0,a.jsx)(n.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(n.PJP.x8P,{}),onClick:r.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-deny-btn",size:"small"}),s.status!==b.q2.REQUIRES_MANUAL_FINALIZATION?null:(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_REVIEW],children:(0,a.jsx)(n.wpx,{title:"Finalize","aria-label":"Finalize",icon:(0,a.jsx)(n.PJP.Ok8,{}),onClick:o.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-finalize-btn",size:"small"})}),(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(n.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(n.PJP.ZNm,{size:14}),onClick:d.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(J.Z,{isOpen:l.isOpen,isLoading:h,onClose:l.onClose,onApproveRequest:c,subjectRequest:s})}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(H.Z,{isOpen:r.isOpen,onClose:r.onClose,onDenyRequest:u})}),(0,a.jsx)(Q.Z,{isOpen:d.isOpen,onClose:d.onClose,onConfirm:m,message:(0,a.jsx)(n.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})}),(0,a.jsx)(Q.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{x(),o.onClose()},title:"Finalize privacy request",message:(0,a.jsxs)(n.xvT,{children:['You are about to finalize this privacy request. The status will be updated to "Complete"',j&&(null==y?void 0:y.service_type)?" and the requesting user will be notified":"",". Would you like to continue?"]})})]})};(i=l||(l={})).STATUS="status",i.DAYS_LEFT="due_date",i.SOURCE="source",i.REQUEST_TYPE="request_type",i.SUBJECT_IDENTITY="subject_identity",i.TIME_RECEIVED="created_at",i.CREATED_BY="created_by",i.REVIEWER="reviewer",i.ID="id",i.LOCATION="location",i.ACTIONS="actions";let es=(0,F.Cl)(),ei=()=>[es.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(B,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Status",...e}),size:120}),es.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:s}=e;return(0,a.jsx)(V,{daysLeft:s(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(L.Rr,{value:"Days left",...e}),size:80}),es.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(L.A4,{value:e.getValue()}):(0,a.jsx)(L.G3,{value:void 0}),header:e=>(0,a.jsx)(L.Rr,{value:"Source",...e}),enableSorting:!1}),es.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(G,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Request type",...e}),enableSorting:!1,size:100}),es.accessor(e=>{var t,s;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(s=e.identity)||void 0===s?void 0:s.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Subject identity",...e}),enableSorting:!1}),es.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:(0,_.p6)(t())})},header:e=>(0,a.jsx)(L.Rr,{value:"Time received",...e}),size:120}),es.accessor(e=>{var t;return(null===(t=e.reviewer)||void 0===t?void 0:t.username)||""},{id:"reviewer",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),es.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Request ID",...e}),enableSorting:!1}),es.accessor(e=>e.location,{id:"location",cell:e=>{let{getValue:t}=e,s=t(),i=s?(0,n.QCN)(s):void 0,l=i?(0,n.c1K)({isoEntry:i,showFlag:!0}):s;return(0,a.jsx)(L.G3,{value:l})},header:e=>(0,a.jsx)(L.Rr,{value:"Location",...e}),enableSorting:!1}),es.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(et,{subjectRequest:t.original})},header:e=>(0,a.jsx)(L.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})],el=e=>{let t=(0,M.v9)(W.dp),s=(0,M.I0)();return{handleStatusChange:t=>{s((0,W.CI)(t)),e()},handleActionTypeChange:t=>{s((0,W.aM)(t)),e()},handleFromChange:t=>{s((0,W.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{s((0,W.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{s((0,W.Mk)()),e()},...t}};var ea=s(96718);let er=e=>{let{onClose:t,onFilterChange:s,...i}=e,{handleStatusChange:l,handleActionTypeChange:r,handleFromChange:d,handleToChange:o,handleClearAllFilters:c,from:u,to:p,status:m,action_type:x}=el(s);return(0,a.jsxs)(n.u_l,{onClose:t,size:"xl",...i,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(n.Kqy,{gap:4,children:[(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(n.Ugi,{gap:3,children:[(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(n.IIB,{type:"date",name:"From",value:u,max:p||void 0,onChange:d,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(n.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:u||void 0,onChange:o,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(ea.z,{id:"request-status",mode:"multiple",options:S.I3,value:m,onChange:l,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(ea.z,{id:"request-action-type",mode:"multiple",options:S.kN,value:x,onChange:r,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(n.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(n.wpx,{type:"text",onClick:c,children:"Clear all"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})};var en=s(9270),ed=s(812),eo=()=>{let e=(0,n.pmc)(),[t,{isFetching:s}]=(0,W.ZU)();return{downloadReport:async s=>{let i=await t(s);if(i.isError)e({status:"error",description:(0,ed.e$)(i.error,"A problem occurred while generating your privacy request report. Please try again.")});else{let t=document.createElement("a"),s=new Blob([i.data],{type:"text/csv"}),l=window.URL.createObjectURL(s);t.href=l,t.download="privacy-request-report.csv",t.click(),t.remove(),window.URL.revokeObjectURL(l),e({status:"success",description:"Successfully downloaded Privacy Request report."})}},isDownloadingReport:s}};let ec=e=>{let{...t}=e,[s,i]=(0,D.v1)("search",D.Oi.withDefault("").withOptions({throttleMs:100})),l=(0,M.v9)(W.dp),r=(0,n.pmc)(),d=(0,h.useRouter)(),o=(0,M.I0)(),u=(0,en.S)(),{pageIndex:p,pageSize:m,resetPagination:x}=u,{isOpen:v,onOpen:y,onClose:j}=(0,n.qY0)(),{data:g,isLoading:f,isFetching:_}=(0,W.QA)({...l,page:p,size:m,fuzzy_search_str:s}),{items:b,total:q}=(0,c.useMemo)(()=>g||{items:[],total:0,pages:0},[g]),{downloadReport:C}=eo(),S=(0,c.useCallback)(e=>{i(null!=e?e:""),x()},[x,i]),k=async()=>{let e;try{await C(l)}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&r({description:"".concat(e),duration:5e3,status:"error"})},E=e=>{d.push("/privacy-requests/".concat(e))},R=(0,z.b7)({getCoreRowModel:(0,F.sC)(),data:b,columns:(0,c.useMemo)(()=>ei(),[]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(n.xuv,{...t,children:[(0,a.jsxs)(L.Q$,{children:[(0,a.jsx)(L.HO,{globalFilter:s,setGlobalFilter:S,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(n.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(n.wpx,{"data-testid":"filter-btn",onClick:y,children:"Filter"}),(0,a.jsx)(n.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(Z.nM,{ml:"1.5px"}),onClick:k})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(er,{isOpen:v,onClose:j,onFilterChange:x})})]}),f?(0,a.jsx)(n.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(L.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(n.jqI,{vertical:!0,gap:"middle",children:[(0,a.jsx)(L.ZK,{tableInstance:R,onRowClick:e=>E(e.id),onSort:e=>{if(!e){o((0,W.PS)());return}let{id:t,desc:s}=e;o((0,W.WR)(t)),o((0,W.iX)(s?"desc":"asc")),x()},loading:_}),(0,a.jsx)(n.B7X,{...u.paginationProps,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),total:null!=q?q:0,align:"end"})]})]})};var eu=s(87361),ep=s(46628),em=s(32885),ex=s(34090),eh=s(55484),ev=s(40324);let ey=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),ej=e=>{var t,s;if(!e)return eh.Ry().shape({policy_key:eh.Z_().required().label("Request type")});let i=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).filter(e=>{let[,t]=e;return"field_type"in t&&"location"!==t.field_type}).map(e=>{let[t,s]=e;return{[t]:eh.Ry().shape({value:s.required&&!s.hidden?eh.Z_().required().label(s.label):eh.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return eh.Ry().shape({policy_key:eh.Z_().required().label("Request type"),identity:eh.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?eh.Z_().email().required().label("Email address"):eh.Z_().nullable(),phone_number:(null===(s=e.identity_inputs)||void 0===s?void 0:s.phone)==="required"?eh.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):eh.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:eh.Ry().shape(i)})};var eg=s(97181);let ef={is_verified:!1,policy_key:"",identity:{}},e_=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(ev.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(ev.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},eb=e=>{var t;let{label:s,required:i,name:l}=e,[r,d,o]=(0,ex.U$)(e),c=!!(d.touched&&d.error),{setValue:u}=o,{value:p}={...r,value:null!==(t=r.value)&&void 0!==t?t:""};return(0,a.jsx)(n.PPS.Item,{label:s,name:l,required:null!=i?i:void 0,layout:"vertical",validateStatus:c?"error":void 0,children:(0,a.jsx)(n.AOh,{value:p,onChange:e=>{e&&u(e)}},l)})},eq=e=>{let{customFieldInputs:t}=e;if(!t)return null;let s=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:s.map(e=>{let[t,s]=e;return"field_type"in s&&"location"===s.field_type?(0,a.jsx)(eb,{name:t,label:s.label,required:!!s.required},t):(0,a.jsx)(ev.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:s.label,isRequired:!!s.required,variant:"stacked"},t)})})},eC=e=>{let{onSubmit:t,onCancel:s,privacyCenterUrl:i}=e,{onCopy:l}=(0,n.VPI)(""),r=(0,n.pmc)();return(0,a.jsx)(ex.J9,{initialValues:{identity:{email:""}},onSubmit:e=>{l("".concat(i,"?email=").concat(encodeURIComponent(e.identity.email))),t(e),r({status:"success",description:"DSR Link Copied!"})},validationSchema:()=>eh.Ry().shape({identity:eh.Ry().shape({email:eh.Z_().email().required().label("Email Address")})}),children:e=>{let{dirty:t,isValid:i}=e;return(0,a.jsx)(ex.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(e_,{identityInputs:{email:"required"}}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,"data-testid":"submit-btn",icon:(0,a.jsx)(n.xPt,{}),children:"Copy"})]})]})})}})};var eS=e=>{let{onSubmit:t,onCancel:s}=e,{data:i}=(0,W.xv)();return(0,a.jsx)(ex.J9,{initialValues:ef,onSubmit:t,validationSchema:()=>(0,eh.Vo)(e=>ej(ey(e.policy_key,null==i?void 0:i.actions))),children:e=>{var t;let{values:l,dirty:r,isValid:d,isSubmitting:o,setFieldValue:c}=e,u=ey(l.policy_key,null==i?void 0:i.actions);return(0,a.jsx)(ex.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(eg.d,{name:"policy_key",label:"Request type",options:null!==(t=null==i?void 0:i.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=ey(e,null==i?void 0:i.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){c("custom_privacy_request_fields",void 0);return}c("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,s]=e;return{[t]:{label:s.label,value:s.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(e_,{identityInputs:null==u?void 0:u.identity_inputs}),(0,a.jsx)(eq,{customFieldInputs:null==u?void 0:u.custom_privacy_request_fields}),(0,a.jsx)(ev.Xl,{name:"is_verified",label:"I confirm that I have verified this user information"}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!l.is_verified||!r||!d,loading:o,"data-testid":"submit-btn",children:"Create"})]})]})})}})},ek=s(31883);let eE=e=>{let{isOpen:t,onClose:s}=e,[i]=(0,W.M6)(),l=(0,n.pmc)(),r=async e=>{let{is_verified:t,...a}=e,r=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,s]=e;return s.value?{[t]:s}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,n={...a,custom_privacy_request_fields:r},d=await i([n]);(0,ek.D4)(d)?l((0,ep.Vo)((0,ed.e$)(d.error,"An error occurred while creating this privacy request. Please try again"))):l((0,ep.t5)("Privacy request created")),s()};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"2xl",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(n.xBx,{children:"Create privacy request"}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)(n.Kqy,{spacing:4,children:[(0,a.jsx)(eu.Z,{title:"Warning: You are bypassing identity verification",text:"You are bypassing Fides' built-in identity verification step. Please ensure that you are only entering information on behalf of a verified and approved user's privacy request."}),(0,a.jsx)(eS,{onSubmit:r,onCancel:()=>s()})]})})]})]})},eR=e=>{let{isOpen:t,onClose:s,privacyCenterUrl:i}=e;return(0,a.jsxs)(n.u_l,{size:"md",isOpen:t,onClose:s,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{children:"Create a Privacy Request Link"}),(0,a.jsxs)(n.fef,{children:[(0,a.jsx)(n.Kqy,{spacing:4}),(0,a.jsx)(eC,{privacyCenterUrl:i,onSubmit:s,onCancel:s})]})]})]})};var ew=()=>{var e;let[t,s]=(0,c.useState)("closed"),i=()=>s("closed"),{data:l}=(0,em.Vh)(),r=(null!==(e=null==l?void 0:l.privacy_center_url)&&void 0!==e?e:"").trim(),d=r.length>0;return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsx)(eR,{isOpen:"create-link"===t,onClose:i,privacyCenterUrl:r}):null,(0,a.jsx)(eE,{isOpen:"submit-request"===t,onClose:i}),(0,a.jsx)(n.S0p.Button,{type:"primary",onClick:()=>s("submit-request"),"data-testid":"submit-request-btn",menu:{items:[{label:"Create request link",key:"create-request-link",icon:(0,a.jsx)(n.xPt,{}),onClick:()=>s("create-link"),disabled:!d}]},icon:(0,a.jsx)(n.v4q,{}),children:"Create request"})]})},eT=s(58754),eI=s(17245);let eA=()=>{let{errorAlert:e}=(0,eI.VY)(),[t,s]=(0,c.useState)(!1),[i,l]=(0,c.useState)({count:0,total:0}),[r,d]=(0,c.useState)(!0),o=b.q2.ERROR,{data:u}=(0,W.tE)(),{data:p}=(0,W.QA)({status:[o]},{pollingInterval:15e3,skip:r});return(0,c.useEffect)(()=>{d(!(u&&u.notify_after_failures>0))},[u]),(0,c.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==u?void 0:u.notify_after_failures)||0)&&e>i.total?(l({count:e-i.total,total:e}),s(!0)):s(!1)},[null==p?void 0:p.total,null==u?void 0:u.notify_after_failures,i.total]),{processing:()=>{t&&e((0,a.jsxs)(n.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(n.xvT,{as:"span",fontWeight:"semibold",children:i.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}};var eN=s(72281);let eP=o()(()=>s.e(9676).then(s.bind(s,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var eO=()=>{let{processing:e}=eA(),{plus:t}=(0,u.hz)(),{activeTab:s,handleTabChange:i,availableTabs:l}=(0,eN.d)();(0,c.useEffect)(()=>{e()},[e]);let r=(0,c.useMemo)(()=>{let e=[];return l.request&&e.push({key:eN.G.REQUEST,label:"Request",children:(0,a.jsx)(ec,{})}),l.manualTask&&e.push({key:eN.G.MANUAL_TASK,label:"Manual tasks",children:(0,a.jsx)(U,{})}),e},[l.manualTask,l.request]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eT.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(n.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(ew,{})}),(0,a.jsx)(eP,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(n.A5g,{activeKey:s,onChange:i,items:r})]})},eU=()=>(0,a.jsx)(r.Z,{title:"Privacy Requests",children:(0,a.jsx)(eO,{})})},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}},function(e){e.O(0,[431,8765,3550,7245,8373,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{6446:function(e){e.exports=function(e,t,a,s){var r=-1,i=null==e?0:e.length;for(s&&i&&(a=e[++r]);++r<i;)a=t(a,e[r],r,e);return a}},67375:function(e,t,a){var s=a(52033),r=a(80068);e.exports=function(e,t){var a=-1,i=r(e)?Array(e.length):[];return s(e,function(e,s,r){i[++a]=t(e,s,r)}),i}},74833:function(e,t,a){var s=a(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(r,""):e}},56632:function(e,t,a){var s=a(89278),r=a(80068),i=a(50098);e.exports=function(e){return function(t,a,n){var l=Object(t);if(!r(t)){var o=s(a,3);t=i(t),a=function(e){return o(l[e],e,l)}}var c=e(t,a,n);return c>-1?l[o?t[c]:c]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var a=e.length;a--&&t.test(e.charAt(a)););return a}},64925:function(e,t,a){var s=a(56632)(a(66259));e.exports=s},66259:function(e,t,a){var s=a(95372),r=a(89278),i=a(47991),n=Math.max;e.exports=function(e,t,a){var l=null==e?0:e.length;if(!l)return -1;var o=null==a?0:i(a);return o<0&&(o=n(l+o,0)),s(e,r(t,3),o)}},55807:function(e,t,a){var s=a(66070),r=a(89278),i=a(67375),n=a(19785);e.exports=function(e,t){return(n(e)?s:i)(e,r(t,3))}},82846:function(e,t,a){var s=a(77400);e.exports=function(){return s.Date.now()}},32526:function(e,t,a){var s=a(68267)(function(e,t,a){return e+(a?"_":"")+t.toLowerCase()});e.exports=s},94919:function(e,t,a){var s=a(91936),r=1/0;e.exports=function(e){return e?(e=s(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,a){var s=a(94919);e.exports=function(e){var t=s(e),a=t%1;return t==t?a?t-a:t:0}},91936:function(e,t,a){var s=a(74833),r=a(11611),i=a(55193),n=0/0,l=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return n;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||c.test(e)?d(e.slice(2),a?2:8):l.test(e)?n:+e}},86548:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return a(27901)}])},624:function(e,t,a){"use strict";var s=a(24246),r=a(20595),i=a(27378);let n=e=>{let t=e.split("."),a=[];return t.forEach(e=>{let t=a.length>0?a[a.length-1]:null;t?a.push("".concat(t,".").concat(e)):a.push(e)}),a},l=(e,t)=>{let a=n(t).filter(e=>e!==t);return e.filter(e=>a.includes(e)).length>0},o=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,a)=>{let s=null!=a?a:[];return e.forEach(e=>{e.children&&c(e.children,t,s),o(e.value,t)&&s.push(e)}),s},d=e=>{let{node:t,isChecked:a,onChecked:i,isExpanded:n,onExpanded:l,isIndeterminate:o,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,s.jsxs)(r.xuv,{children:[(0,s.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>l(t),minHeight:8,children:[(0,s.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!o&&a,isIndeterminate:o,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,s.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":n?"collapse":"expand",icon:(0,s.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>l(t),className:n?"rotate-180":void 0}):null]}),d&&(0,s.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:a,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...a.map(e=>n(e)).reduce((e,t)=>e.concat(t),[]),...a.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[a,t]);let g=e=>{let s=[],r=[];p.indexOf(e.value)>=0?(s=p.filter(t=>!o(t,e.value)),r=a.filter(t=>!o(t,e.value))):(s=[...p,...c(t,e.value).map(e=>e.value)],r=[...a,e.value]),m(s),u(r)},f=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!o(t,e.value))):S([...E,e.value])},h=e=>{if(e.children){let r=p.indexOf(e.value)>=0,n=E.indexOf(e.value)>=0,o=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==o.length,_=l(a,e.value);return(0,s.jsx)(d,{node:e,isChecked:r,onChecked:g,isExpanded:n,onExpanded:f,isDisabled:_,isIndeterminate:u,children:n?e.children.map(e=>(0,s.jsx)(i.Fragment,{children:h(e)},e.value)):void 0})}return null};return(0,s.jsx)(r.xuv,{..._,children:t.map(e=>(0,s.jsx)(r.xuv,{children:h(e)},e.value))})}},35287:function(e,t,a){"use strict";var s=a(24246),r=a(20595),i=a(88038),n=a.n(i);a(27378),t.Z=e=>{let{children:t,title:a,mainProps:i}=e;return(0,s.jsxs)(r.kCb,{"data-testid":a,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,s.jsxs)(n(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",a]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},19904:function(e,t,a){"use strict";a.d(t,{Tg:function(){return n}});var s=a(24246),r=a(16134),i=a(31793);let n=e=>(0,r.C)(i.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:a}=e;return n(t)?(0,s.jsx)(s.Fragment,{children:a}):null}},34929:function(e,t,a){"use strict";var s=a(24246),r=a(64925),i=a.n(r),n=a(27378),l=a(16134),o=a(30002),c=a(28079),d=a(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,l.C)(c.U3),{isLoading:a}=(0,d.MO)(),s=(0,l.C)(d.qb),{isLoading:r}=(0,o.te)();return{dataUses:t,dataSubjects:(0,l.C)(o.ZL),dataCategories:s,isLoading:e||a||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:a,isLoading:r}=u(),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},o=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let r=t(l(e,a)),i=!!s.parent_key;return{name:s.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==s.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=o(e,t,a);return r?i?(0,s.jsxs)(n.Fragment,{children:[(0,s.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,s.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(a,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>o(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>o(e,_,2),getDataSubjects:()=>a,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:l,isLoading:r}}},2525:function(e,t,a){"use strict";a.d(t,{Q:function(){return l}});var s=a(24246),r=a(20595),i=a(27378),n=a(3110);let l=e=>{let{values:t,columnState:a,tagProps:l,onTagClose:o,...c}=e,{isExpanded:d,isWrapped:u,version:_}=a||{},[p,m]=(0,i.useState)(!d),[E,S]=(0,i.useState)(!!u),[g,f]=(0,i.useState)(d?t:null==t?void 0:t.slice(0,2));(0,i.useEffect)(()=>{m(!d)},[d,_]),(0,i.useEffect)(()=>{S(!!u)},[u]),(0,i.useEffect)(()=>{(null==t?void 0:t.length)?f(p?t.slice(0,2):t):f(t)},[p,t]);let h=(0,i.useCallback)(()=>{f(null==t?void 0:t.slice(0,2)),m(!0)},[t]),A=(0,i.useCallback)(()=>{m(!1)},[]),T=(0,i.useCallback)(()=>{p?A():h()},[p,A,h]);return(0,i.useMemo)(()=>(null==g?void 0:g.length)?(0,s.jsxs)(r.jqI,{align:p?"center":"start",wrap:E?"wrap":"nowrap",vertical:!p,gap:"small","data-testid":"tag-expandable-cell",style:{overflowX:"auto",...c.style},...c,children:[g.map(e=>(0,s.jsx)(r.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...l,...e.tagProps,children:(0,s.jsx)(r.lKn,{ellipsis:!!p&&{tooltip:!0},style:{color:"inherit",maxWidth:p?n.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),T()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:p?"+".concat(t.length-2," more"):n.T5})]}):(0,s.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[g,p,E,c,t,l,o,T])}},3110:function(e,t,a){"use strict";a.d(t,{DI:function(){return l},T5:function(){return i},TD:function(){return n}});var s=a(24246),r=a(20595);let i="show less",n=150,l=[{key:"expand-all",label:"Expand all",icon:(0,s.jsx)(r.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,s.jsx)(r.PJP.MVB,{})}]},26070:function(e,t,a){"use strict";a.d(t,{v:function(){return o},Q:function(){return c.Q}});var s=a(24246),r=a(20595),i=a(27378),n=a(3110);let{Text:l}=r.AntTypography,o=e=>{let{values:t,valueSuffix:a,columnState:o}=e,{isExpanded:c,version:d}=o||{},[u,_]=(0,i.useState)(!c);(0,i.useEffect)(()=>{_(!c)},[c,d]);let p=(0,i.useCallback)(()=>{_(!0)},[]),m=(0,i.useCallback)(()=>{_(!1)},[]),E=(0,i.useCallback)(()=>{u?m():p()},[u,m,p]);return(0,i.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,s.jsx)(l,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,s.jsxs)(r.jqI,{align:u?"center":"flex-start",vertical:!u,gap:u?"small":"none","data-testid":"list-expandable-cell",children:[u?(0,s.jsxs)(l,{ellipsis:!0,children:[t.length," ",a]}):(0,s.jsx)(r.krs,{dataSource:t,renderItem:e=>(0,s.jsx)("li",{children:e})}),(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),E()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:u?"view":n.T5})]}):null,[u,t,a,E])};var c=a(2525)},22583:function(e,t,a){"use strict";a.d(t,{j:function(){return r}});var s=a(85054);let r={[s.Ej.TAXONOMY_WHITE]:"default",[s.Ej.TAXONOMY_RED]:"error",[s.Ej.TAXONOMY_ORANGE]:"warning",[s.Ej.TAXONOMY_YELLOW]:"caution",[s.Ej.TAXONOMY_GREEN]:"success",[s.Ej.TAXONOMY_BLUE]:"info",[s.Ej.TAXONOMY_PURPLE]:"alert",[s.Ej.SANDSTONE]:"sandstone",[s.Ej.MINOS]:"minos"}},59001:function(e,t,a){"use strict";a.d(t,{Ch:function(){return o},Lo:function(){return n},_g:function(){return c},ac:function(){return i},aq:function(){return d}});var s,r,i,n,l=a(85054);let o="root";(s=i||(i={})).DATA_CATEGORY="data_category",s.DATA_USE="data_use",s.DATA_SUBJECT="data_subject",s.SYSTEM_GROUP="system_group",(r=n||(n={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects",r.SYSTEM_GROUPS="System groups";let c=e=>{switch(e){case"data_category":return"Data categories";case"data_use":return"Data uses";case"data_subject":return"Data subjects";case"system_group":return"System groups";default:return e}},d=e=>{switch(e){case"data_category":return{UPDATE:l.Sh.DATA_CATEGORY_UPDATE,CREATE:l.Sh.DATA_CATEGORY_CREATE,DELETE:l.Sh.DATA_CATEGORY_DELETE,READ:l.Sh.DATA_CATEGORY_READ};case"data_use":return{UPDATE:l.Sh.DATA_USE_UPDATE,CREATE:l.Sh.DATA_USE_CREATE,DELETE:l.Sh.DATA_USE_DELETE,READ:l.Sh.DATA_USE_READ};case"data_subject":return{UPDATE:l.Sh.DATA_SUBJECT_UPDATE,CREATE:l.Sh.DATA_SUBJECT_CREATE,DELETE:l.Sh.DATA_SUBJECT_DELETE,READ:l.Sh.DATA_SUBJECT_READ};case"system_group":return{UPDATE:l.Sh.SYSTEM_GROUP_UPDATE,CREATE:l.Sh.SYSTEM_GROUP_CREATE,DELETE:l.Sh.SYSTEM_GROUP_DELETE,READ:l.Sh.SYSTEM_GROUP_READ};default:return{UPDATE:l.Sh.TAXONOMY_UPDATE,CREATE:l.Sh.TAXONOMY_CREATE,DELETE:l.Sh.TAXONOMY_DELETE,READ:l.Sh.TAXONOMY_READ}}}},90673:function(e,t,a){"use strict";a.d(t,{Cd:function(){return i},Xl:function(){return n}});var s=a(85054),r=a(59001);let i=(e,t)=>{let a;if(null==t&&e.every(e=>void 0===e.parent_key))a=e;else{let s=null!=t?t:null;a=e.filter(e=>e.parent_key===s)}return a.map(t=>{var a,s;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(a=t.is_default)&&void 0!==a&&a,active:null!==(s=t.active)&&void 0!==s&&s}})},n=e=>{switch(e){case r.ac.DATA_CATEGORY:return s.P6.DATA_CATEGORY;case r.ac.DATA_SUBJECT:return s.P6.DATA_SUBJECT;case r.ac.DATA_USE:return s.P6.DATA_USE;default:return}}},27901:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eC}});var s,r,i,n,l=a(24246),o=a(27378),c=a(35287),d=a(58754),u=a(71795),_=a(85054);(s=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",s.COLUMN_NAMES="datamap-column-names",s.COLUMN_ORDER="datamap-column-order",s.COLUMN_SIZING="datamap-column-sizing",s.COLUMN_VISIBILITY="datamap-column-visibility",s.CUSTOM_REPORT_ID="datamap-custom-report-id",s.FILTERS="datamap-filters",s.GROUP_BY="datamap-group-by",s.SORTING_STATE="datamap-sorting-state",s.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=n||(n={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data",r.SYSTEM_GROUPS="system_groups",r.SYSTEM_GROUP="system_group_fides_key",r.SYSTEM_GROUP_DATA_USES="system_group_data_uses";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data",system_groups:"System groups",system_group_fides_key:"System group",system_group_data_uses:"Data uses"},m={[n.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[n.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,o.createContext)({}),g=e=>{let{children:t}=e,[a,s]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,n]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,g]=(0,u._)(i.COLUMN_ORDER,[]),[f,h]=(0,u._)(i.COLUMN_VISIBILITY,m),[A,T]=(0,u._)(i.COLUMN_SIZING,{}),[x,C]=(0,u._)(i.COLUMN_NAMES,{}),v=(0,o.useMemo)(()=>({savedCustomReportId:a,setSavedCustomReportId:s,groupBy:r,setGroupBy:n,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:g,columnVisibility:f,setColumnVisibility:h,columnSizing:A,setColumnSizing:T,columnNameMapOverrides:x,setColumnNameMapOverrides:C}),[a,s,r,n,c,d,p,g,f,h,A,T,x,C]);return(0,l.jsx)(S.Provider,{value:v,children:t})},f=()=>{let e=(0,o.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var h=a(59003),A=a(92222),T=a(47935),x=a(20595),C=a(34090),v=a(66726),O=a.n(v),R=a(16134),y=a(34929),j=a(14048),b=a(19904),D=a(16394),I=a(38943),P=a(35258),N=e=>{let{children:t,heading:a,onCancel:s,onConfirm:r,isLoading:i,cancelButtonText:n,continueButtonText:o,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,l.jsxs)(x.u_l,{closeOnOverlayClick:i,...d,children:[(0,l.jsx)(x.ZAr,{}),(0,l.jsxs)(x.hzk,{"data-testid":c,children:[a&&(0,l.jsx)(x.xBx,{children:a}),(0,l.jsx)(x.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,l.jsx)(x.fef,{children:t}),(0,l.jsxs)(x.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,l.jsx)(x.wpx,{onClick:()=>{s&&s(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:n||"Cancel"}),(0,l.jsx)(x.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:o||"Continue"})]})]})]})},M=a(22968),w=e=>{let[t,a]=(0,o.useState)(M.T2.csv),{onConfirm:s}=e;return(0,l.jsx)(N,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>s(t),"data-testid":"export-modal",children:(0,l.jsxs)(x.kCb,{direction:"column",gap:3,pb:3,children:[(0,l.jsx)(x.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,l.jsxs)(x.NIc,{children:[(0,l.jsx)(x.lXp,{htmlFor:"format",children:"Choose Format"}),(0,l.jsx)(x.WPr,{id:"format",value:t,onChange:a,"data-testid":"export-format-select",options:[{value:M.T2.csv,label:"CSV"},{value:M.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},U=a(624),L=a(30002),k=a(28079),G=a(5785),Y=a(90673);let F=e=>{let{label:t,children:a,...s}=e;return(0,l.jsxs)(x.Qdk,{...s,children:[(0,l.jsx)(x.X6q,{children:(0,l.jsxs)(x.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,l.jsx)(x.xuv,{flex:1,children:t}),(0,l.jsx)(x.XEm,{boxSize:7})]})}),(0,l.jsx)(x.Hk3,{children:a})]})},H=e=>{let{columnNameMap:t,selectedFilters:a,onFilterChange:s,onClose:r,...i}=e;(0,k.fd)(),(0,L.te)(),(0,G.MO)();let{dataUses:n,dataSubjects:c,dataCategories:d}=a,u=(0,R.C)(k.U3),_=(0,R.C)(L.ZL),p=(0,R.C)(G.qb),[m,E]=(0,o.useState)(n),[S,g]=(0,o.useState)(c),[f,h]=(0,o.useState)(d);(0,o.useEffect)(()=>{E(n)},[n]),(0,o.useEffect)(()=>{g(c)},[c]),(0,o.useEffect)(()=>{h(d)},[d]);let A=(0,o.useMemo)(()=>(0,Y.Cd)(u),[u]),T=(0,o.useMemo)(()=>(0,Y.Cd)(_),[_]),C=(0,o.useMemo)(()=>(0,Y.Cd)(p),[p]);return(0,l.jsx)(N,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),g([]),h([]),s({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{s({dataUses:m,dataSubjects:S,dataCategories:f}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,l.jsxs)(x.UQy,{allowToggle:!0,children:[(0,l.jsx)(F,{label:t.data_uses,children:(0,l.jsx)(U.ZP,{nodes:A,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,l.jsx)(F,{label:t.data_categories,children:(0,l.jsx)(U.ZP,{nodes:C,selected:f,onSelected:h,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,l.jsx)(F,{label:t.data_subjects,children:(0,l.jsx)(U.ZP,{nodes:T,selected:S,onSelected:g,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=a(32885),z=a(69353),B=a(812);let{useGetMinimalCustomReportsQuery:Z,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:W,useDeleteCustomReportMutation:X}=a(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:a=50,report_type:s=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(a,"&report_type=").concat(s);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,a)=>[{type:"Custom Reports",id:a}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var J=a(55484),K=a(40324);let Q="Report name",$=e=>{let{isOpen:t,handleClose:a,tableStateToSave:s,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:n}=e,c=(0,x.pmc)(),[d]=W(),u=(0,o.useMemo)(()=>J.Ry().shape({reportName:J.Z_().label(Q).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,a]=e;i[t]={label:a,enabled:!0}}),Object.entries(null!==(t=null==s?void 0:s.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,a]=e;i[t]||(i[t]={}),i[t].enabled=a});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:s}},r=await d(t);if((0,B.D4)(r))throw r.error;n(r.data),a()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,l.jsxs)(x.u_l,{size:"lg",isOpen:t,onClose:a,motionPreset:"none",children:[(0,l.jsx)(x.ZAr,{}),(0,l.jsxs)(x.hzk,{children:[(0,l.jsx)(x.xBx,{pb:0,children:"Create a report"}),(0,l.jsx)(C.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:a,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:a}=e;return(0,l.jsxs)(C.l0,{"data-testid":"custom-report-form",children:[(0,l.jsxs)(x.fef,{children:[(0,l.jsx)(x.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,l.jsx)(K.j0,{id:"reportName",name:"reportName",isRequired:!0,label:Q,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,l.jsxs)(x.mzw,{gap:2,children:[(0,l.jsx)(x.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,l.jsx)(x.wpx,{size:"small",disabled:!t||!a,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},ee="Report",et="Reports",ea=e=>{var t;let{reportType:a,savedReportId:s,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:n,onSavedReportDeleted:c}=e,d=(0,b.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,b.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,x.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=Z({report_type:a}),[S,g]=(0,o.useState)(),[f]=q(),[h]=X(),{isOpen:A,onOpen:T,onClose:v}=(0,x.qY0)(),{isOpen:O,onOpen:R,onClose:y}=(0,x.qY0)(),{isOpen:j,onOpen:D,onClose:I}=(0,x.qY0)(),[P,N]=(0,o.useState)(),[M,w]=(0,o.useState)(),[U,L]=(0,o.useState)(),[k,G]=(0,o.useState)(!1),{resetForm:Y}=(0,C.u6)(),F=(0,o.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===s))||void 0===e?void 0:e.name;return null!=t?t:et},[null==m?void 0:m.items,s]),H=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),V=e=>{g(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},z=async e=>{N(e);let{data:t,isError:a,error:s}=await f(e);if(a){let e=(0,B.e$)(s,"A problem occurred while fetching the ".concat(ee,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else w(t)},W=()=>{N(""),w(void 0),G(!1)},J=()=>{M?(G(!1),M.id!==s&&n(M,Y),v()):P?G(!0):(n(null,Y),v())},K=async e=>{e===(null==M?void 0:M.id)&&(W(),c()),h(e)};(0,o.useEffect)(()=>{m&&g(m.items)},[m]),(0,o.useEffect)(()=>{k&&(G(!1),J())},[M]),(0,o.useEffect)(()=>{s?z(s):W()},[s]),(0,o.useEffect)(()=>{U&&D()},[D,U]);let Q=!M&&!s||(null==M?void 0:M.id)===s,ea=(0,l.jsx)("div",{"data-testid":"custom-reports-popover",children:(0,l.jsx)(C.J9,{initialValues:{},onSubmit:J,onReset:W,children:(0,l.jsxs)(C.l0,{children:[(0,l.jsxs)("div",{className:"relative p-3",style:{borderBottom:"var(--ant-popover-title-border-bottom)"},children:[(0,l.jsx)(x.wpx,{size:"small",disabled:H,htmlType:"reset",className:"absolute left-3 top-3","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,l.jsx)(x.wpx,{type:"text",size:"small",icon:(0,l.jsx)(x.PJP.x8P,{}),className:"absolute right-3 top-3",onClick:()=>{s?z(s):W(),v()},"data-testid":"custom-report-popover-cancel"}),(0,l.jsx)("div",{className:"text-center",style:{color:"var(--ant-color-text-heading)",fontWeight:"var(--ant-font-weight-strong)"},children:et}),(0,l.jsx)("div",{className:"mt-3",children:(0,l.jsx)(x.uFc,{size:"small",placeholder:"Search...",onChange:e=>V(e.target.value)})})]}),(0,l.jsxs)("div",{className:"px-5 pb-1 pt-3",children:[H&&(0,l.jsx)(x.oj8,{image:(0,l.jsx)(x.wpx,{type:"primary",shape:"circle",size:"small","aria-label":"add ".concat(ee),icon:(0,l.jsx)(x.PJP.mm_,{}),onClick:R,"data-testid":"add-report-button"}),description:"No ".concat(et.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a ").concat(ee.toLowerCase()," for easy access later."),styles:{image:{height:"24px"}},"data-testid":"custom-reports-empty-state"}),!H&&(E?(0,l.jsx)(x.N_L,{active:!0,paragraph:{rows:3,width:"100%"},title:!1,className:"pt-2"}):(0,l.jsx)(x.y02.Group,{onChange:e=>z(e.target.value),value:P,style:{width:"100%"},children:(0,l.jsx)(x.vyj,{direction:"vertical",className:"w-full",size:"small",children:null==S?void 0:S.map(e=>(0,l.jsxs)(x.jqI,{justify:u?"space-between":"flex-start",align:"center",children:[(0,l.jsx)(x.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:e.name}),u&&(0,l.jsx)(x.wpx,{type:"text",size:"small",icon:(0,l.jsx)(x.PJP.ZNm,{}),onClick:()=>L(e),"data-testid":"delete-report-button"})]},e.id))})}))]}),(0,l.jsxs)(x.jqI,{className:"px-5 py-4",gap:"small",children:[d&&r&&(0,l.jsxs)(x.wpx,{size:"small",onClick:R,className:"flex-1 gap-1 pl-0","data-testid":"create-report-button",htmlType:"button",icon:(0,l.jsx)(x.PJP.mm_,{}),iconPosition:"start",children:["Create ",ee.toLowerCase()]}),(0,l.jsx)(x.wpx,{size:"small",type:"primary",loading:k,disabled:Q,className:"flex-1","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})]})})});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.bPF,{content:ea,trigger:"click",placement:"bottomRight",open:A,onOpenChange:e=>{e?T():J()},styles:{root:{width:"320px","--ant-popover-inner-content-padding":"0"}},zIndex:1400,children:(0,l.jsx)(x.wpx,{className:"max-w-40",icon:(0,l.jsx)(x.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",children:(0,l.jsx)(x.lKn,{ellipsis:!0,children:F})})}),(0,l.jsx)($,{isOpen:O,handleClose:()=>{y(),setTimeout(()=>{T()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>n(e,Y)}),(0,l.jsx)(x.cVQ,{isOpen:j,onClose:()=>{L(void 0),I()},onConfirm:()=>{U&&K(U.id),I()},title:"Delete ".concat(ee),message:(0,l.jsxs)(x.lKn,{children:["You are about to permanently delete the"," ",ee.toLowerCase()," named"," ",(0,l.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var es=a(19785),er=a.n(es),ei=a(55807),en=a.n(ei),el=a(32526),eo=a.n(el),ec=a(26070),ed=a(72625),eu=a(43862),e_=a(22583);let ep=(0,A.Cl)(),em=(e,t)=>({cell:e=>(0,l.jsx)(T.G3,{value:e.getValue()}),header:a=>{let s={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?s[t]=e[t]:e[t].label&&(s[t]=e[t].label||"")}),(0,l.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:a.column.id,columnNameMap:s}),defaultValue:p[a.column.id]||(0,eu.AH)({columnId:a.column.id}),isEditing:t,...a})}}),eE=(e,t)=>{var a;let s=(null==e?void 0:null===(a=e.items)||void 0===a?void 0:a.length)?Object.keys(e.items[0]):[],r=Object.values(n);return s.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let a=t.find(t=>e.includes(eo()(t.name)));return ep.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,l.jsx)(T.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,l.jsx)(T.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==a?void 0:a.field_type)==="string[]"}})})},eS=e=>{let{onSelectRow:t,getDataUseDisplayName:a,getDataCategoryDisplayName:s,getDataSubjectDisplayName:r,datamapReport:i,customFields:o,systemGroups:c=[],isRenaming:d=!1,groupBy:u}=e,p=eE(i,o),m=e=>{let t=c.find(t=>t.fides_key===e);return(null==t?void 0:t.label_color)?e_.j[t.label_color]:void 0},E=e=>{if(e&&0!==e.length&&1===e.length)return m(e[0])},S=[ep.accessor(e=>e.system_name,{enableGrouping:!0,id:n.SYSTEM_NAME,meta:{onCellClick:t}}),ep.accessor(e=>e.data_uses,{id:n.DATA_USE,cell:e=>{let t=e.getValue();return(0,l.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?en()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),ep.accessor(e=>e.data_categories,{id:n.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,l.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_subjects,{id:n.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,l.jsx)(T.WP,{suffix:"data subjects",ignoreZero:!0,value:er()(t)?en()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!d}}),ep.accessor(e=>e.legal_name,{id:n.LEGAL_NAME}),ep.accessor(e=>e.dpo,{id:n.DPO}),ep.accessor(e=>e.legal_basis_for_processing,{id:n.LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.administrating_department,{id:n.ADMINISTRATING_DEPARTMENT}),ep.accessor(e=>e.cookie_max_age_seconds,{id:n.COOKIE_MAX_AGE_SECONDS}),ep.accessor(e=>e.privacy_policy,{id:n.PRIVACY_POLICY}),ep.accessor(e=>e.legal_address,{id:n.LEGAL_ADDRESS}),ep.accessor(e=>e.cookie_refresh,{id:n.COOKIE_REFRESH}),ep.accessor(e=>e.data_security_practices,{id:n.DATA_SECURITY_PRACTICES}),ep.accessor(e=>e.data_shared_with_third_parties,{id:n.DATA_SHARED_WITH_THIRD_PARTIES}),ep.accessor(e=>e.processes_special_category_data,{id:n.PROCESSES_SPECIAL_CATEGORY_DATA}),ep.accessor(e=>e.data_stewards,{id:n.DATA_STEWARDS,cell:e=>(0,l.jsx)(T.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.declaration_name,{id:n.DECLARATION_NAME}),ep.accessor(e=>e.does_international_transfers,{id:n.DOES_INTERNATIONAL_TRANSFERS}),ep.accessor(e=>e.dpa_location,{id:n.DPA_LOCATION}),ep.accessor(e=>e.egress,{id:n.DESTINATIONS,cell:e=>(0,l.jsx)(T.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.exempt_from_privacy_regulations,{id:n.EXEMPT_FROM_PRIVACY_REGULATIONS}),ep.accessor(e=>e.features,{id:n.FEATURES,cell:e=>(0,l.jsx)(T.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.fides_key,{id:n.FIDES_KEY}),ep.accessor(e=>e.flexible_legal_basis_for_processing,{id:n.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.impact_assessment_location,{id:n.IMPACT_ASSESSMENT_LOCATION}),ep.accessor(e=>e.ingress,{id:n.SOURCES,cell:e=>(0,l.jsx)(T.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.joint_controller_info,{id:n.JOINT_CONTROLLER_INFO}),ep.accessor(e=>e.legal_basis_for_profiling,{id:n.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,l.jsx)(T.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legal_basis_for_transfers,{id:n.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,l.jsx)(T.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legitimate_interest_disclosure_url,{id:n.LEGITIMATE_INTEREST_DISCLOSURE_URL}),ep.accessor(e=>e.processes_personal_data,{id:n.PROCESSES_PERSONAL_DATA}),ep.accessor(e=>e.reason_for_exemption,{id:n.REASON_FOR_EXEMPTION}),ep.accessor(e=>e.requires_data_protection_assessments,{id:n.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),ep.accessor(e=>e.responsibility,{id:n.RESPONSIBILITY,cell:e=>(0,l.jsx)(T.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.retention_period,{id:n.RETENTION_PERIOD}),ep.accessor(e=>e.shared_categories,{id:n.SHARED_CATEGORIES,cell:e=>(0,l.jsx)(T.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.special_category_legal_basis,{id:n.SPECIAL_CATEGORY_LEGAL_BASIS}),ep.accessor(e=>e.third_parties,{id:n.THIRD_PARTIES}),ep.accessor(e=>e.system_undeclared_data_categories,{id:n.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,l.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_use_undeclared_data_categories,{id:n.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,l.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.cookies,{id:n.COOKIES,cell:e=>(0,l.jsx)(T.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.uses_cookies,{id:n.USES_COOKIES}),ep.accessor(e=>e.uses_non_cookie_access,{id:n.USES_NON_COOKIE_ACCESS}),ep.accessor(e=>e.uses_profiling,{id:n.USES_PROFILING}),ep.accessor(e=>e.system_groups,{id:n.SYSTEM_GROUPS,cell:e=>{let t=e.getValue();if(!t||Array.isArray(t)&&0===t.length)return null;let a=(Array.isArray(t)?t:[t]).map(e=>{let t=c.find(t=>t.fides_key===e);return{label:(null==t?void 0:t.name)||e,key:e,tagProps:{color:(null==t?void 0:t.label_color)?e_.j[t.label_color]:"default",bordered:!1}}});return(0,l.jsx)(ec.Q,{values:a})},meta:{width:"auto"}}),...p],g=[];return u===_.fI.SYSTEM_GROUP&&g.push(ep.accessor(e=>e.system_group_fides_key,{id:n.SYSTEM_GROUP,cell:e=>{var t;let a=e.getValue();if(!a||Array.isArray(a)&&0===a.length)return null;let s=Array.isArray(a)?a.map(e=>{var t;return(null===(t=c.find(t=>t.fides_key===e))||void 0===t?void 0:t.name)||e}):[(null===(t=c.find(e=>e.fides_key===a))||void 0===t?void 0:t.name)||a],r=E(Array.isArray(a)?a:[a]);return(0,l.jsx)(T.WP,{suffix:"system group",ignoreZero:!0,value:s,tagProps:{color:r||"white",bordered:!1},...e})},meta:{width:"auto",showHeaderMenu:!d}}),ep.accessor(e=>e.system_group_data_uses,{id:n.SYSTEM_GROUP_DATA_USES,cell:e=>{let t=e.getValue();return!t||Array.isArray(t)&&0===t.length?null:(0,l.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?en()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto",showHeaderMenu:!d}})),[...S,...g]},eg=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:a,setSavedCustomReportId:s,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:n}=(0,C.u6)();return(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{a({}),s(""),n({values:{}}),r(!1)},children:"Reset all"}),(0,l.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{n({values:t}),r(!1)},children:"Cancel"}),(0,l.jsx)(x.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},ef=e=>{switch(e){case _.fI.DATA_USE_SYSTEM:return[n.DATA_USE];case _.fI.SYSTEM_GROUP:return[n.SYSTEM_GROUP];default:return[n.SYSTEM_NAME]}},eh=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[n.SYSTEM_NAME,n.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[n.DATA_USE,n.SYSTEM_NAME]),_.fI.SYSTEM_GROUP===e&&(t=[n.SYSTEM_GROUP,n.SYSTEM_GROUP_DATA_USES,n.SYSTEM_NAME,n.DATA_USE]),t},eA=(e,t)=>{let a=eh(e),s=new Set(a);return[...a,...t.filter(e=>!s.has(e))]},eT={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,b.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{data:a}=(0,z.QD)(),{PAGE_SIZES:s,pageSize:r,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u,onNextPageClick:S,isNextPageDisabled:g,startRange:v,endRange:N,pageIndex:M,setTotalPages:U,resetPageIndexToDefault:L}=(0,T.oi)(),k=(0,x.pmc)({id:"datamap-report-toast"}),{isOpen:G,onClose:Y,onOpen:F}=(0,x.qY0)(),{getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:q,isLoading:W}=(0,y.Z)(),[X,J]=(0,o.useState)(),{savedCustomReportId:K,setSavedCustomReportId:Q,groupBy:$,setGroupBy:ee,selectedFilters:et,setSelectedFilters:es,columnOrder:er,setColumnOrder:ei,columnVisibility:en,setColumnVisibility:el,columnSizing:eo,setColumnSizing:ec,columnNameMapOverrides:ed,setColumnNameMapOverrides:eu}=f(),[e_,ep]=(0,o.useState)(!1),eE=e=>{Q(""),ee(e),ep(!0),L()},[ex,eC]=(0,o.useState)(""),ev=(0,o.useCallback)(e=>{L(),eC(e)},[L,eC]),eO={pageIndex:M,pageSize:r,groupBy:$,search:ex,dataUses:(0,D.du)(et.dataUses,"data_uses"),dataSubjects:(0,D.du)(et.dataSubjects,"data_subjects"),dataCategories:(0,D.du)(et.dataCategories,"data_categories")},{data:eR,isLoading:ey,isFetching:ej}=(0,I.tH)(eO),[eb,{isLoading:eD,isError:eI}]=(0,I.Eo)(),{data:eP,totalRows:eN}=(0,o.useMemo)(()=>{let e=eR||eT,t=e.items;return e_&&ep(!1),U(e.pages),{totalRows:e.total,data:t}},[eR]);(0,V.GH)();let eM=(0,R.C)(V.fN),[ew,eU]=(0,o.useState)(!1),eL=(0,o.useMemo)(()=>eR?eS({onSelectRow:e=>J(e.fides_key),getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:q,datamapReport:eR,customFields:eM,systemGroups:a,isRenaming:ew,groupBy:$}):[],[B,q,Z,eR,eM,a,ew,$]),{isOpen:ek,onOpen:eG,onClose:eY}=(0,x.qY0)(),{isOpen:eF,onOpen:eH,onClose:eV}=(0,x.qY0)(),ez=(0,h.b7)({getCoreRowModel:(0,A.sC)(),getGroupedRowModel:(0,A.qe)(),getExpandedRowModel:(0,A.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:eL,defaultColumn:em({...p,...ed},ew),data:eP,initialState:{expanded:!0,columnSizing:eo,columnOrder:er,columnVisibility:en,grouping:ef($)}});(0,o.useEffect)(()=>{$&&ez&&eR&&(0===ez.getState().columnOrder.length?ei(eA($,ez.getAllColumns().map(e=>e.id))):ei(eA($,ez.getState().columnOrder)))},[$,ez,eR]),(0,o.useEffect)(()=>{let e=ef($);eR&&ez.setGrouping(e)},[eR]);let eB=(0,o.useMemo)(()=>O()(ec,300),[ec]);(0,o.useEffect)(()=>{let e=ez.getState().columnSizing;e&&eB(e)},[ez.getState().columnSizing]);let eZ=()=>ed[n.SYSTEM_GROUP]||"System group",eq=(e,t)=>{if(e||K){if(!e){try{Q(""),el(m),ez.toggleAllColumnsVisible(!0),ez.setColumnVisibility(m),ei([]),ez.setColumnOrder([]),ee(_.fI.SYSTEM_DATA_USE),es(E),eu({}),t({values:{}})}catch(e){k({status:"error",description:"There was a problem resetting the report."})}return}try{var a,s,r,i;if(null===(a=e.config)||void 0===a?void 0:a.table_state){let{groupBy:t,filters:a,columnOrder:s}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,a]=e;i[t]=a.enabled||!1}),t&&ee(t),a&&es(a),s&&(ei(s),ez.setColumnOrder(s)),i&&(el(i),ez.setColumnVisibility(i))}if(null===(s=e.config)||void 0===s?void 0:s.column_map){let a={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,s]=e;s.label&&(a[t]=s.label)}),eu(a),t({values:a})}Q(e.id),k({status:"success",description:"Report applied successfully."})}catch(e){k({status:"error",description:"There was a problem applying report."})}}};return ey||t||W?(0,l.jsx)(T.I4,{rowHeight:36,numRows:15}):(0,l.jsxs)(x.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,l.jsx)(H,{columnNameMap:{...p,...ed},selectedFilters:et,isOpen:G,onClose:Y,onFilterChange:e=>{Q(""),es(e)}}),(0,l.jsx)(T.F1,{isOpen:ek,onClose:eY,headerText:"Columns",columnNameMap:{...p,...ed},prefixColumns:eh($),tableInstance:ez,savedCustomReportId:K,onColumnOrderChange:e=>{Q(""),ez.setColumnOrder(e),ei(e)},onColumnVisibilityChange:e=>{Q(""),ez.setColumnVisibility(e),el(e)}}),(0,l.jsx)(w,{isOpen:eF,onClose:eV,onConfirm:e=>{let t={};Object.entries(en).forEach(e=>{let[a,s]=e;t[a]={enabled:s}}),Object.entries(ed).forEach(e=>{let[a,s]=e;if(t[a])t[a].label=s;else{var r;t[a]={label:s,enabled:null===(r=en[a])||void 0===r||r}}}),eb({...eO,format:e,report_id:K,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:$,filters:et,columnOrder:er}}}}).then(()=>{eI||eV()})},isLoading:eD}),(0,l.jsx)(C.J9,{initialValues:ed,onSubmit:e=>{Q(""),eu(e),eU(!1)},children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(T.Q$,{children:[(0,l.jsx)(T.HO,{globalFilter:ex,setGlobalFilter:ev,placeholder:"System name, Fides key, or ID"}),(0,l.jsxs)(x.kCb,{alignItems:"center",gap:2,children:[e&&(0,l.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:K,tableStateToSave:{groupBy:$,filters:et,columnOrder:er,columnVisibility:en},currentColumnMap:ed,onCustomReportSaved:(e,t)=>eq(e,t),onSavedReportDeleted:()=>{Q("")}}),(0,l.jsxs)(x.v2r,{children:[(0,l.jsxs)(x.j2t,{as:x.wpx,icon:(0,l.jsx)(x.v4q,{}),iconPosition:"end",loading:e_,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch($){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";case _.fI.SYSTEM_GROUP:{let e=eZ();return e.charAt(0).toLowerCase()+e.slice(1)}default:return"system"}})()]}),(0,l.jsxs)(x.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,l.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===$,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,l.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===$,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"}),(0,l.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_GROUP)},isChecked:_.fI.SYSTEM_GROUP===$,value:_.fI.SYSTEM_GROUP,"data-testid":"group-by-system-group",children:eZ()})]})]}),(0,l.jsx)(x.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:F,children:"Filter"}),(0,l.jsx)(x.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eH,icon:(0,l.jsx)(j.nM,{ml:"1.5px"})}),(0,l.jsxs)(x.v2r,{placement:"bottom-end",children:[(0,l.jsx)(x.j2t,{as:x.wpx,icon:(0,l.jsx)(x.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,l.jsxs)(x.qyq,{"data-testid":"more-menu-list",children:[(0,l.jsx)(x.sNh,{onClick:eG,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,l.jsx)(x.sNh,{onClick:()=>eU(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),ew&&(0,l.jsx)(eg,{columnNameMapOverrides:ed,setColumnNameMapOverrides:eu,setSavedCustomReportId:Q,setIsRenamingColumns:eU})]})]}),(0,l.jsx)(C.l0,{children:(0,l.jsx)(T.ZK,{tableInstance:ez,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,l.jsx)(T.s8,{totalRows:eN||0,pageSizes:s,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u||ej,onNextPageClick:S,isNextPageDisabled:g||ej,startRange:v,endRange:N}),(0,l.jsx)(P.Z,{selectedSystemId:X,resetSelectedSystemId:()=>J(void 0)})]})};var eC=()=>(0,l.jsxs)(c.Z,{title:"Datamap Report",children:[(0,l.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,l.jsx)(g,{children:(0,l.jsx)(ex,{})})]})}},function(e){e.O(0,[431,8765,9278,5163,9187,7245,9899,5258,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5135],{77713:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent/[configuration_id]/[purpose_id]",function(){return i(80758)}])},59301:function(e,t,i){"use strict";var r=i(24246);let{Link:n}=i(20595).AntTypography;t.Z=e=>(0,r.jsx)(n,{target:"_blank",rel:"noopener noreferrer",...e})},35287:function(e,t,i){"use strict";var r=i(24246),n=i(20595),s=i(88038),o=i.n(s);i(27378),t.Z=e=>{let{children:t,title:i,mainProps:s}=e;return(0,r.jsxs)(n.kCb,{"data-testid":i,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,r.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsx)(n.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},58754:function(e,t,i){"use strict";var r=i(24246),n=i(20595),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:o=!0,children:d,rightContent:l,style:a,...c}=e;return(0,r.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...a}:{paddingBottom:"24px",...a},children:[(0,r.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(n.lQT,{className:i||d?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,l&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!i&&(0,r.jsx)(s.m,{className:d?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),d]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return a}});var r=i(24246),n=i(20595),s=i(34090),o=i(27378),d=i(46238),l=i(40324);let a=e=>{let{name:t,label:i,labelProps:a,tooltip:c,isRequired:u,layout:p="inline",helperText:h,...v}=e,[_,m,{setValue:x}]=(0,s.U$)(t),f=!!(m.touched&&m.error),[g,R]=(0,o.useState)("");_.value||"tags"!==v.mode&&"multiple"!==v.mode||(_.value=[]),"tags"===v.mode&&"string"==typeof _.value&&(_.value=[_.value]);let j="tags"===v.mode?(e,t)=>e?e.value!==g||_.value.includes(g)?v.optionRender?v.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:v.optionRender||void 0,I=e=>{R(e),v.onSearch&&v.onSearch(e)},E=(e,t)=>{x(e),v.onChange&&v.onChange(e,t)};return"inline"===p?(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,...a,children:i}):null,(0,r.jsxs)(n.jqI,{align:"center",children:[(0,r.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]}),(0,r.jsx)(d.b,{label:c,className:f?"mt-2 self-start":void 0})]})]})}):(0,r.jsx)(n.NIc,{isInvalid:f,isRequired:u,children:(0,r.jsxs)(n.gCW,{alignItems:"start",children:[(0,r.jsxs)(n.jqI,{align:"center",children:[i?(0,r.jsx)(l.__,{htmlFor:v.id||t,fontSize:"xs",my:0,mr:1,...a,children:i}):null,(0,r.jsx)(d.b,{label:c})]}),(0,r.jsx)(n.WPr,{..._,id:v.id||t,"data-testid":"controlled-select-".concat(_.name),...v,optionRender:j,onSearch:"tags"===v.mode?I:void 0,onChange:E,value:_.value||void 0,status:f?"error":void 0}),h&&(0,r.jsx)(n.Q6r,{style:{marginTop:0},children:h}),(0,r.jsx)(l.Bc,{isInvalid:f,message:m.error,fieldName:_.name})]})})}},8133:function(e,t,i){"use strict";var r=i(24246),n=i(20595);t.Z=e=>{let{title:t,children:i,isOpen:s,onClose:o,modalContentProps:d,showCloseButton:l=!1,footer:a,...c}=e;return(0,r.jsxs)(n.u_l,{isOpen:s,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,r.jsx)(n.ZAr,{}),(0,r.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...d,children:[l&&(0,r.jsx)(n.olH,{}),(0,r.jsx)(n.xBx,{p:0,children:(0,r.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,r.jsx)(n.X6q,{as:"h3",size:"sm",children:t})})}),(0,r.jsx)(n.fef,{pb:4,overflow:"auto",children:i}),a&&(0,r.jsx)(n.mzw,{children:a})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return a}});var r=i(24246),n=i(20595),s=i(79894),o=i.n(s),d=i(27378);let{Text:l}=n.AntTypography,a=e=>{let{items:t,...i}=e,s=(0,d.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,d={...e},a=d.onClick&&!d.href;return("string"==typeof d.title&&(d.title=(0,r.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:d.title})),a)?d.title=(0,r.jsx)(n.wpx,{type:"text",size:"small",icon:d.icon,onClick:d.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:d.title}):(d.icon&&(d.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:d.icon}),d.title]})),d.href&&d.title&&(d.title=(0,r.jsx)(o(),{href:d.href,className:"ant-breadcrumb-link",children:d.title}),delete d.href)),d}),[t]);return(0,r.jsx)(n.zrq,{items:s,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return d},a4:function(){return s}});var r=i(3228);let n=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=n,o={purposes:{},special_purposes:{}},d=(0,r.P1)(n.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||o})},51263:function(e,t,i){"use strict";var r=i(24246),n=i(20595);t.Z=e=>{let{title:t,children:i,...s}=e;return(0,r.jsxs)(n.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,r.jsx)(n.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return d},Py:function(){return n},fj:function(){return o},uh:function(){return s}});var r=i(85054);let n=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",o={[r.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[r.FF.REQUIRE_CONSENT]:"Require consent",[r.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},d={[r.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[r.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[r.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},80758:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Z}});var r=i(24246),n=i(20595),s=i(86677),o=i(27378),d=i(59301),l=i(35287),a=i(58754),c=i(6675),u=i(51263),p=i(59512),h=i(59003),v=i(92222),_=i(47935),m=i(85054),x=i(34090),f=i(55484),g=i(97181),R=i(812),j=i(8133),I=i(46628),E=i(52955);let y=e=>{if(/^\d+$/.test(e))return!0;let t=e.match(/^(\d+)-(\d+)$/);return!!t&&parseInt(t[1],10)<parseInt(t[2],10)},C=e=>{if(/^\d+$/.test(e)){let t=parseInt(e,10);return{start:t,end:t}}let t=e.match(/^(\d+)-(\d+)$/);return t?{start:parseInt(t[1],10),end:parseInt(t[2],10)}:null},T=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):t.end===t.start?t.start>=e.start&&(null===e.end||t.start<=e.end):null===e.end&&null!==t.end?e.start<=t.end:null===t.end&&null!==e.end?t.start<=e.end:null===e.end&&null===t.end||e.start<=t.end&&e.end>=t.start||t.start<=e.end&&t.end>=e.start,b=(e,t)=>e.end===e.start?e.start>=t.start&&(null===t.end||e.start<=t.end):null===t.end?e.start>=t.start:null!==e.end&&e.start>=t.start&&e.end<=t.end,S=(e,t,i,r)=>{var n;let s=t.filter(e=>e.purpose_id===i&&e.id!==r);if(!(null===(n=e.vendor_ids)||void 0===n?void 0:n.length))return!1;let o=e.vendor_ids.map(C).filter(e=>null!==e);return 0!==o.length&&s.some(t=>{let i=e.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS||e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS&&t.vendor_restriction===m.PY.RESTRICT_SPECIFIC_VENDORS,r=t.vendor_ids.map(C).filter(e=>null!==e);return i?e.vendor_restriction===m.PY.ALLOW_SPECIFIC_VENDORS?r.some(e=>o.some(t=>!b(e,t))):o.some(e=>r.some(t=>!b(e,t))):t.vendor_restriction===e.vendor_restriction&&o.some(e=>r.some(t=>T(e,t)))})},N=e=>{if(/^\d+$/.test(e))return{start_vendor_id:parseInt(e,10),end_vendor_id:null};let t=e.match(/^(\d+)-(\d+)$/);if(t){let e=parseInt(t[1],10),i=parseInt(t[2],10);if(e<i)return{start_vendor_id:e,end_vendor_id:i}}return null},F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(N).filter(e=>null!==e)},w="This restriction type is already in use for this purpose",P={restriction_type:"",vendor_restriction:"",vendor_ids:[]},O=e=>{let{isOpen:t,onClose:i,initialValues:s=P,existingRestrictions:o=[],purposeId:d,restrictionId:l,configurationId:a}=e,c=(0,n.pmc)(),[u]=(0,E.a_)(),[h]=(0,E.h3)(),v=!(d&&p.Py.includes(+d)),_=o.filter(e=>e.id!==l).map(e=>e.restriction_type),C=[{value:m.FF.PURPOSE_RESTRICTION,label:p.fj[m.FF.PURPOSE_RESTRICTION],disabled:_.includes(m.FF.PURPOSE_RESTRICTION),title:_.includes(m.FF.PURPOSE_RESTRICTION)?w:void 0},{value:m.FF.REQUIRE_CONSENT,label:p.fj[m.FF.REQUIRE_CONSENT],disabled:_.includes(m.FF.REQUIRE_CONSENT),title:_.includes(m.FF.REQUIRE_CONSENT)?w:void 0},{value:m.FF.REQUIRE_LEGITIMATE_INTEREST,label:p.fj[m.FF.REQUIRE_LEGITIMATE_INTEREST],disabled:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST),title:_.includes(m.FF.REQUIRE_LEGITIMATE_INTEREST)?w:void 0}],T=[{value:m.PY.RESTRICT_ALL_VENDORS,label:p.Cu[m.PY.RESTRICT_ALL_VENDORS],disabled:_.length>0,title:_.length>0?"Cannot restrict all vendors when other restrictions exist":void 0},{value:m.PY.RESTRICT_SPECIFIC_VENDORS,label:p.Cu[m.PY.RESTRICT_SPECIFIC_VENDORS]},{value:m.PY.ALLOW_SPECIFIC_VENDORS,label:p.Cu[m.PY.ALLOW_SPECIFIC_VENDORS]}],b=f.Ry().shape({restriction_type:f.Z_().required("Restriction type is required"),vendor_restriction:f.Z_().required("Vendor restriction is required"),vendor_ids:f.IX().when("vendor_restriction",{is:e=>e!==m.PY.RESTRICT_ALL_VENDORS,then:e=>e.required("At least one vendor ID is required").min(1,"At least one vendor ID is required").test("valid-format","Vendor IDs must be numbers or ranges (e.g., 10 or 15-300)",e=>{var t;return null===(t=null==e?void 0:e.every(e=>y(e)))||void 0===t||t}).test("no-conflicts","One or more of these vendors already have a restriction for this purpose. Please update the existing restriction or remove duplicates.",(e,t)=>!S({...t.parent,vendor_ids:e},o,d,l))})}),N=async e=>{try{let t={restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,range_entries:e.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS?F(e.vendor_ids):[]},r={...t,purpose_id:null!=d?d:0};if(l){let e=await h({configuration_id:a,restriction_id:l,restriction:t});if((0,R.D4)(e)){c((0,I.Vo)("Failed to update restriction"));return}c((0,I.t5)("Restriction updated successfully"))}else{let e=await u({configuration_id:a,restriction:r});if((0,R.D4)(e)){c((0,I.Vo)("Failed to create restriction"));return}c((0,I.t5)("Restriction created successfully"))}i()}catch(e){c((0,I.Vo)("Failed to save restriction"))}};return(0,r.jsx)(j.Z,{isOpen:t,onClose:i,title:"Edit restriction",children:(0,r.jsx)(x.J9,{initialValues:{...s,restriction_type:v?s.restriction_type:m.FF.PURPOSE_RESTRICTION},onSubmit:N,validationSchema:b,children:e=>{let{values:t,validateField:s,setTouched:o}=e;return(0,r.jsx)(x.l0,{children:(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-6",children:[(0,r.jsx)(n.xvT,{className:"text-sm",children:"Define how specific vendors are restricted from processing data for this purpose. Select a restriction type, set whether the listed vendors are restricted or allowed, and specify which vendor IDs the restriction applies to."}),(0,r.jsx)(n.esZ,{title:v?void 0:"Non-flexible purposes only support Purpose restrictions and cannot be restricted by consent or legitimate interest settings.",children:(0,r.jsx)(g.d,{name:"restriction_type",label:"Restriction type",options:C,layout:"stacked",tooltip:"Choose how vendors are permitted to process data for this purpose. This setting overrides the vendor's declared legal basis in the Global Vendor List.",isRequired:!0,disabled:!v,className:"w-full"})}),(0,r.jsx)(g.d,{name:"vendor_restriction",label:"Vendor restriction",options:T,layout:"stacked",tooltip:"Decide if the restriction applies to all vendors, specific vendors, or if only certain vendors are allowed.",isRequired:!0}),(0,r.jsx)(n.UO1,{in:!!t.restriction_type&&!!t.vendor_restriction&&t.vendor_restriction!==m.PY.RESTRICT_ALL_VENDORS,animateOpacity:!0,children:(0,r.jsx)(g.d,{name:"vendor_ids",label:"Vendor IDs",mode:"tags",options:[],layout:"stacked",placeholder:"Enter vendor IDs",open:!1,suffixIcon:(0,r.jsx)("span",{}),tooltip:"List the specific vendors that are restricted or allowed from processing data for this purpose.",disabled:t.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS,tokenSeparators:[","," "],onBlur:()=>{setTimeout(()=>{o({vendor_ids:!0}),s("vendor_ids")},100)},helperText:"Enter IDs (e.g. 123) or ranges (e.g. 1-10) and press enter",isRequired:!0})}),(0,r.jsxs)(n.jqI,{justify:"flex-end",className:"gap-3 pt-4",children:[(0,r.jsx)(n.wpx,{onClick:i,"data-testid":"cancel-restriction-button",children:"Cancel"}),(0,r.jsx)(n.wpx,{type:"primary",htmlType:"submit","data-testid":"save-restriction-button",children:"Save"})]})]})})}})})};var L=i(72625),q=i(58452);let A=e=>{let{currentValues:t,existingRestrictions:i}=e,[d,l]=(0,o.useState)(!1),[a,c]=(0,o.useState)(!1),u=(0,s.useRouter)(),p=(0,n.pmc)(),[h]=(0,E.FC)(),v=u.query.purpose_id?parseInt(u.query.purpose_id,10):void 0,_=u.query.configuration_id,m=async()=>{try{if(!(null==t?void 0:t.id))return;let e=await h({configuration_id:_,restriction_id:t.id});if((0,R.D4)(e)){p((0,I.Vo)("Failed to delete publisher restriction"));return}l(!1),p((0,I.t5)("Publisher restriction deleted successfully"))}catch(e){p((0,I.Vo)("Failed to delete publisher restriction"))}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.vyj,{children:[(0,r.jsx)(n.wpx,{size:"small",onClick:()=>c(!0),"data-testid":"edit-restriction-button",children:"Edit"}),(0,r.jsx)(n.wpx,{size:"small",onClick:()=>l(!0),"data-testid":"delete-restriction-button",children:"Delete"})]}),(0,r.jsx)(O,{isOpen:a,onClose:()=>c(!1),initialValues:t,existingRestrictions:i,purposeId:v,restrictionId:null==t?void 0:t.id,configurationId:_}),(0,r.jsx)(q.Z,{isOpen:d,onClose:()=>l(!1),onConfirm:m,title:"Confirm deletion",message:"Are you sure you want to delete this publisher restriction? This action cannot be undone.",cancelButtonText:"Cancel",continueButtonText:"Delete"})]})},D=(0,v.Cl)(),V=()=>(0,o.useMemo)(()=>[D.accessor(e=>e.restriction_type,{id:"restriction_type",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.fj[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Restriction type",...e})}),D.accessor(e=>e.vendor_restriction,{id:"vendor_restriction",cell:e=>{let{getValue:t}=e,i=t();return(0,r.jsx)(_.G3,{value:p.Cu[i]})},header:e=>(0,r.jsx)(_.Rr,{value:"Vendor restriction",...e})}),D.accessor(e=>e.vendor_ids,{id:"vendor_ids",cell:e=>{let{getValue:t}=e;return(0,r.jsx)(_.G3,{value:t().join(", ")||"All vendors"})},header:e=>(0,r.jsx)(L.vs,{value:"Vendors",helperText:"Specify which vendors the restriction applies to. You can apply restrictions to all vendors, specific vendors by their IDs, or allow only certain vendors while restricting the rest.",...e})}),D.display({id:"actions",cell:e=>(0,r.jsx)(A,{currentValues:e.row.original,existingRestrictions:e.table.getRowModel().rows.map(e=>e.original)}),header:"Actions",size:154,meta:{disableRowClick:!0}})],[]),k=e=>{let{onAdd:t}=e;return(0,r.jsxs)(n.jqI,{vertical:!0,align:"center",className:"mt-6 w-full gap-3 self-center whitespace-normal py-10","data-testid":"empty-table-notice",children:[(0,r.jsx)(n.xvT,{fontSize:"md",fontWeight:"semibold",children:"Add a restriction"}),(0,r.jsx)(n.xvT,{fontSize:"sm",className:"max-w-[70%]",children:"No restrictions have been added. By default, all vendors follow their declared legal basis unless a restriction is applied—add a restriction to override this behavior."}),(0,r.jsx)(n.wpx,{type:"primary",onClick:t,children:"Add +"})]})},U=()=>{let[e,t]=(0,o.useState)(!1),i=V(),d=(0,s.useRouter)(),l=d.query.purpose_id?parseInt(d.query.purpose_id,10):void 0,a=d.query.configuration_id,{data:c,isFetching:u}=(0,E.a9)({configuration_id:a,purpose_id:null!=l?l:0},{skip:!a||!l}),p=((null==c?void 0:c.items)||[]).map(e=>{var t;return{id:e.id,restriction_type:e.restriction_type,vendor_restriction:e.vendor_restriction,vendor_ids:(null===(t=e.range_entries)||void 0===t?void 0:t.map(e=>e.end_vendor_id?"".concat(e.start_vendor_id,"-").concat(e.end_vendor_id):e.start_vendor_id.toString()))||[],purpose_id:e.purpose_id}}),x=p.some(e=>e.vendor_restriction===m.PY.RESTRICT_ALL_VENDORS),f=Object.values(m.FF).every(e=>p.some(t=>t.restriction_type===e)),g=(0,h.b7)({getCoreRowModel:(0,v.sC)(),columns:i,data:p,columnResizeMode:"onChange",manualPagination:!0}),R=()=>{t(!0)};return(0,r.jsxs)(n.jqI,{vertical:!0,className:"overflow-auto",children:[(0,r.jsxs)(_.Q$,{children:[(0,r.jsx)(n.LZC,{}),(0,r.jsx)(n.esZ,{title:x?'Each vendor must have a unique restriction type. When "Restrict all vendors" is active for any restriction type, no other restrictions can be added.':f?"Each purpose must have a unique restriction type. When all restriction types are active, no other restrictions can be added. Use the 'Edit' button to change the vendor restrictions on each type.":void 0,children:(0,r.jsx)(n.wpx,{type:"primary",onClick:R,disabled:x||f,"data-testid":"add-restriction-button",children:"Add restriction +"})})]}),u?(0,r.jsx)(_.I4,{rowHeight:36,numRows:3}):(0,r.jsx)(_.ZK,{tableInstance:g,emptyTableNotice:(0,r.jsx)(k,{onAdd:R})}),(0,r.jsx)(O,{isOpen:e,onClose:()=>{t(!1)},existingRestrictions:p,purposeId:l,configurationId:a})]})};var Z=()=>{let e=(0,s.useRouter)(),t=decodeURIComponent(e.query.configuration_id),i=decodeURIComponent(e.query.purpose_id),{data:h,isLoading:v}=(0,c.a4)(),{data:_}=(0,E.NZ)(t),m=(0,o.useMemo)(()=>null==h?void 0:h.purposes[i],[h,i]);return(0,r.jsxs)(l.Z,{title:"Consent Configuration",children:[(0,r.jsx)(a.Z,{heading:"Consent configuration",breadcrumbItems:[{title:"Consent settings",href:"/settings/consent"},{title:(null==_?void 0:_.name)||"Configuration"},{title:"TCF purpose ".concat(i)}]}),(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsxs)(n.vyj,{direction:"vertical",size:"middle",children:[(0,r.jsx)(u.Z,{title:"TCF purpose ".concat(i).concat((null==m?void 0:m.name)?": ".concat(null==m?void 0:m.name):""),children:v?(0,r.jsxs)(n.jqI,{vertical:!0,className:"gap-1.5",children:[(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"100%"}),(0,r.jsx)(n.OdW,{height:"16px",width:"30%"})]}):!!m&&(0,r.jsx)(n.xvT,{fontSize:"sm",children:null==m?void 0:m.description})}),(0,r.jsx)(u.Z,{title:(null==_?void 0:_.name)||"Configuration",children:(0,r.jsx)(n.vyj,{direction:"vertical",className:"gap-3",children:(0,r.jsxs)(n.xvT,{fontSize:"sm",children:["Add restrictions to control how vendors process data for specific purposes. For each restriction, choose a restriction type. Then, decide whether the restriction applies to all vendors, specific vendors, or only to a limited set of allowed vendors. You can add multiple restrictions—they'll appear in the table below."," ",(0,r.jsx)(d.Z,{href:p.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]})})})]}),(0,r.jsx)(U,{})]})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=77713)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return i(96236)}])},59301:function(e,t,i){"use strict";var s=i(24246);let{Link:n}=i(20595).AntTypography;t.Z=e=>(0,s.jsx)(n,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,t,i){"use strict";i.d(t,{q:function(){return n}});var s=i(24246);let n=(0,i(20595).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,s.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},58754:function(e,t,i){"use strict";var s=i(24246),n=i(20595),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:o=!0,children:l,rightContent:a,style:d,...c}=e;return(0,s.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(n.lQT,{className:i||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,a&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,s.jsx)(r.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return o}});var s=i(24246),n=i(16134),r=i(31793);let o=e=>(0,n.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return o(t)?(0,s.jsx)(s.Fragment,{children:i}):null}},8133:function(e,t,i){"use strict";var s=i(24246),n=i(20595);t.Z=e=>{let{title:t,children:i,isOpen:r,onClose:o,modalContentProps:l,showCloseButton:a=!1,footer:d,...c}=e;return(0,s.jsxs)(n.u_l,{isOpen:r,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,s.jsx)(n.ZAr,{}),(0,s.jsxs)(n.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...l,children:[a&&(0,s.jsx)(n.olH,{}),(0,s.jsx)(n.xBx,{p:0,children:(0,s.jsx)(n.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,s.jsx)(n.X6q,{as:"h3",size:"sm",children:t})})}),(0,s.jsx)(n.fef,{pb:4,overflow:"auto",children:i}),d&&(0,s.jsx)(n.mzw,{children:d})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),n=i(20595),r=i(79894),o=i.n(r),l=i(27378);let{Text:a}=n.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(a,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:l.title})),d)?l.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(o(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(n.zrq,{items:r,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return l},a4:function(){return r}});var s=i(3228);let n=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:r}=n,o={purposes:{},special_purposes:{}},l=(0,s.P1)(n.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||o})},51263:function(e,t,i){"use strict";var s=i(24246),n=i(20595);t.Z=e=>{let{title:t,children:i,...r}=e;return(0,s.jsxs)(n.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...r,children:[(0,s.jsx)(n.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return l},Py:function(){return n},fj:function(){return o},uh:function(){return r}});var s=i(85054);let n=[1,3,4,5,6],r="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",o={[s.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[s.FF.REQUIRE_CONSENT]:"Require consent",[s.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},l={[s.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[s.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[s.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},96236:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return J}});var s=i(24246),n=i(20595),r=i(34090),o=i(27378),l=i(16134),a=i(25980),d=i(812),c=i(77213),u=i(58754),p=i(6675),h=i(46628),x=i(7426),g=i(40324);let m=e=>{let{children:t,purpose:i,endCol:r}=e;return(0,s.jsx)(n.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:r?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(i)?null:(0,s.jsx)(n.xuv,{children:t})})};var f=()=>{let{values:e,setFieldValue:t}=(0,r.u6)(),{purposes:i}=(0,l.C)(p.ZS);return(0,s.jsx)(r.F2,{name:"purposeOverrides",render:()=>(0,s.jsxs)(n.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,s.jsxs)(n.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,s.jsx)(n.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,s.jsx)(n.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,s.jsx)(n.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,s.jsx)(n.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,s.jsx)(n.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,s.jsx)(n.kCb,{flex:"1",alignItems:"center",children:(0,s.jsx)(n.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((r,o)=>(0,s.jsxs)(n.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",backgroundColor:"#fff",children:[(0,s.jsxs)(n.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",r.purpose,": ",i[r.purpose].name]}),(0,s.jsx)(n.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,s.jsx)(n.xuv,{children:(0,s.jsx)(g.w8,{name:"purposeOverrides[".concat(o,"].is_included"),onChange:e=>{e||(t("purposeOverrides[".concat(o,"].is_consent"),!1),t("purposeOverrides[".concat(o,"].is_legitimate_interest"),!1))}})})}),(0,s.jsx)(m,{purpose:r.purpose,children:(0,s.jsx)(g.w8,{isDisabled:!e.purposeOverrides[o].is_included||e.purposeOverrides[o].is_legitimate_interest,name:"purposeOverrides[".concat(o,"].is_consent")})}),(0,s.jsx)(m,{purpose:r.purpose,endCol:!0,children:(0,s.jsx)(g.w8,{isDisabled:!e.purposeOverrides[o].is_included||e.purposeOverrides[o].is_consent,name:"purposeOverrides[".concat(o,"].is_legitimate_interest")})})]},r.purpose))]})})},v=i(59301),j=e=>{let{name:t,enabled:i}=e;return(0,s.jsxs)(n.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,s.jsxs)(n.xvT,{children:[t," status"," ",i?(0,s.jsx)(n.j8w,{color:"success",children:"Enabled"}):(0,s.jsx)(n.j8w,{color:"error",children:"Disabled"})]}),(0,s.jsxs)(n.xvT,{children:["To ",i?"disable":"enable"," ",t,", please contact your Fides administrator or"," ",(0,s.jsx)(v.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},b=i(46238),C=e=>{var t,i;let{label:o,options:l,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,r.U$)(c),h={...u,value:null!==(t=u.value)&&void 0!==t?t:""},x=!!(p.touched&&p.error),m=d?l[0]:void 0,f=null!==(i=l.find(e=>e.value===h.value))&&void 0!==i?i:m,v=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,s.jsxs)(n.NIc,{isInvalid:x,children:[(0,s.jsxs)(n.jqI,{className:"w-fit",children:[o?(0,s.jsx)(g.__,{children:o}):null,(0,s.jsx)(n.y02.Group,{onChange:v,value:null==f?void 0:f.value,"data-testid":"input-".concat(h.name),children:(0,s.jsx)(n.jqI,{className:"flex-col gap-3",children:l.map(e=>{let{value:t,label:i,tooltip:r}=e;return(0,s.jsx)(n.y02,{value:t,"data-testid":"option-".concat(t),children:(0,s.jsxs)(n.jqI,{className:"items-center gap-2",children:[(0,s.jsx)(n.xvT,{fontSize:"sm",fontWeight:"medium",children:i}),r?(0,s.jsx)(b.b,{label:r}):null]})},t)})})})]}),(0,s.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]}):(0,s.jsxs)(n.NIc,{isInvalid:x,children:[(0,s.jsxs)(n.rjZ,{templateColumns:"1fr 3fr",children:[(0,s.jsx)(g.__,{children:o}),(0,s.jsx)(n.y02.Group,{onChange:v,value:null==f?void 0:f.value,"data-testid":"input-".concat(h.name),children:(0,s.jsx)(n.jqI,{children:l.map(e=>(0,s.jsx)(n.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,s.jsx)(g.Bc,{isInvalid:x,message:p.error,fieldName:h.name})]})},y=i(85054),_=i(51263);let w=e=>{let{title:t,children:i}=e;return(0,s.jsxs)(n.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(t),children:[(0,s.jsx)(n.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:t}),i]})};var T=()=>{let{tcf:e}=(0,a.hz)(),t=!!(0,l.C)(x.D2).enabled,{values:i,setFieldValue:o}=(0,r.u6)(),d=!!i.gpp.us_approach;return(0,s.jsx)(_.Z,{title:"Global Privacy Platform",children:(0,s.jsxs)(n.Kqy,{spacing:6,children:[(0,s.jsx)(j,{name:"GPP",enabled:t}),t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w,{title:"GPP U.S.",children:(0,s.jsx)(C,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:y.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:y.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:y.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),d?(0,s.jsxs)(w,{title:"MSPA",children:[(0,s.jsx)(g.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(o("gpp.mspa_service_provider_mode",!1),o("gpp.mspa_opt_out_option_mode",!1))}}),(0,s.jsx)(g.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!i.gpp.mspa_opt_out_option_mode||!i.gpp.mspa_covered_transactions}),(0,s.jsx)(g.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!i.gpp.mspa_service_provider_mode||!i.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{color:"gray.200"}),(0,s.jsxs)(w,{title:"GPP Europe",children:[(0,s.jsx)(n.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,s.jsx)(g.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})},S=i(64781),I=i(60325),N=()=>{var e,t,i;let{tcf:o}=(0,a.hz)(),{values:l,setFieldValue:d}=(0,r.u6)(),{data:c,isLoading:u}=(0,S.gT)(),p=[...(0,I.k1)(null!==(t=null==c?void 0:c.locations)&&void 0!==t?t:[]),...(0,I.k1)(null!==(i=null==c?void 0:c.location_groups)&&void 0!==i?i:[])].sort((e,t)=>e.name<t.name?-1:1);return o?(0,s.jsxs)(_.Z,{title:"Publisher settings",children:[(0,s.jsx)(n.AntTypography.Paragraph,{className:"mb-3",children:"Specify the country in which your organization operates for TCF compliance. This setting will determine the 'Publisher Country Code ' transmitted in the Transparency and Consent (TC) Data."}),(0,s.jsx)(n.PPS.Item,{label:"Publisher country",htmlFor:"publisher_country_code",children:(0,s.jsx)(n.AOh,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:u,allowClear:!0,options:(0,n.Ky_)(null==p?void 0:p.map(e=>e.id)),placeholder:"Select a country",value:null===(e=l.tcfPublisherSettings.publisher_country_code)||void 0===e?void 0:e.replace("_","-").toUpperCase(),onChange:e=>d("tcfPublisherSettings.publisher_country_code",null==e?void 0:e.toLowerCase()),className:"!w-80"})})]}):null},E=i(52955),P=i(71795),k=i(59512),F=i(55484),L=i(8133),O=i(31883);let R=F.Ry().shape({name:F.Z_().required().label("Name")}),z=e=>{let{isOpen:t,onClose:i,onSuccess:o}=e,l=(0,n.pmc)(),[a]=(0,E.LK)(),c=async e=>{let t=await a({name:e.name});(0,O.D4)(t)?l((0,h.Vo)((0,d.e$)(t.error))):(l((0,h.t5)("Successfully created TCF configuration")),null==o||o(t.data.id),i())};return(0,s.jsx)(L.Z,{title:"Create a new TCF configuration",isOpen:t,onClose:i,children:(0,s.jsx)(r.J9,{initialValues:{name:""},onSubmit:c,validationSchema:R,children:e=>{let{isValid:t,dirty:o}=e;return(0,s.jsx)(r.l0,{children:(0,s.jsxs)(n.vyj,{direction:"vertical",size:"small",className:"w-full",children:[(0,s.jsx)(n.xvT,{children:"TCF configurations allow you to define unique sets of publisher restrictions. These configurations can be added to privacy experiences."}),(0,s.jsx)(g.j0,{id:"name",name:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,s.jsxs)(n.vyj,{className:"w-full justify-end pt-6",children:[(0,s.jsx)(n.wpx,{onClick:i,children:"Cancel"}),(0,s.jsx)(n.wpx,{type:"primary",htmlType:"submit",disabled:!t||!o,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=i(79894),q=i.n(A);let Z=e=>{let{width:t,style:i,borderLeft:r=!1,borderRight:o=!1,...l}=e;return(0,s.jsx)(n.jqI,{align:"center",className:"h-full px-4",...l,style:{borderLeft:r?"solid 1px":"none",borderRight:o?"solid 1px":"none",borderColor:"var(--ant-color-border)",width:t,...i},role:"cell"})},W=e=>{let{width:t,style:i,borderLeft:r=!1,children:o,...l}=e;return(0,s.jsx)(n.jqI,{align:"center",role:"columnheader",className:"px-4",...l,style:{borderLeft:r?"solid 1px":"none",borderColor:"var(--ant-color-border)",fontWeight:500,whiteSpace:"nowrap",width:t,...i},children:o})},H=e=>{let{isHeader:t=!1,isLastRow:i=!1,style:r,...o}=e;return(0,s.jsx)(n.jqI,{role:t?"rowheader":"row",className:"h-9 w-full",...o,style:{backgroundColor:t?"var(--fidesui-bg-default)":void 0,borderBottom:i?"none":"solid 1px",borderColor:"var(--ant-color-border)",...r}})},M=e=>{let{config:t,isLoading:i,style:r,...o}=e,{purposes:a}=(0,l.C)(p.ZS);return(0,s.jsxs)(n.jqI,{vertical:!0,...o,style:{maxWidth:"1200px",border:"solid 1px",borderColor:"var(--ant-color-border)",backgroundColor:"var(--ant-color-bg-base)",fontSize:"12px",...r},"aria-label":"Publisher restrictions table",role:"table","data-testid":"publisher-restrictions-table",children:[(0,s.jsxs)(H,{isHeader:!0,style:{width:"100%"},children:[(0,s.jsx)(W,{width:"600px",children:"TCF purpose"}),(0,s.jsxs)(W,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,s.jsx)(b.b,{label:"Restrictions control how vendors are permitted to process data for specific purposes. Fides supports three restriction types: Purpose Restriction to completely disallow data processing for a purpose, Require Consent to allow processing only with explicit user consent, and Require Legitimate Interest to allow processing based on legitimate business interest unless the user objects."})]}),(0,s.jsxs)(W,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,s.jsx)(b.b,{label:'Indicates whether the legal basis for this purpose can be overridden by publisher restrictions. If marked "No," the purpose has a fixed legal basis defined by the TCF and cannot be changed.'})]}),(0,s.jsx)(W,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,r)=>(0,s.jsxs)(H,{isLastRow:r===Object.values(a).length-1,children:[(0,s.jsxs)(Z,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,s.jsx)(Z,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:i?(0,s.jsx)(n.OdW,{height:"16px",width:"100%"}):(()=>{var i;let r=(null==t?void 0:null===(i=t.restriction_types_per_purpose)||void 0===i?void 0:i[e.id])||[];return 0===r.length?"none":1===r.length?(0,s.jsx)(n.xvT,{size:"sm",whiteSpace:"nowrap",children:k.fj[r[0]]}):(0,s.jsxs)(n.xvT,{children:[r.length," restrictions"]})})()}),(0,s.jsx)(Z,{width:"100px",borderLeft:!0,children:k.Py.includes(e.id)?(0,s.jsx)(n.j8w,{color:"error","data-testid":"flexibility-tag-".concat(e.id),children:"No"}):(0,s.jsx)(n.j8w,{color:"success","data-testid":"flexibility-tag-".concat(e.id),children:"Yes"})}),(0,s.jsx)(Z,{width:"100px",borderLeft:!0,children:(0,s.jsx)(q(),{href:"/settings/consent/".concat(null==t?void 0:t.id,"/").concat(e.id),passHref:!0,legacyBehavior:!0,children:(0,s.jsx)(n.wpx,{size:"small","data-testid":"edit-restriction-btn-".concat(e.id),children:"Edit"})})})]},e.id))]})};var V=i(56358),D=i(19904);let B=()=>(0,s.jsxs)(n.vyj,{direction:"vertical",size:"small",children:[(0,s.jsx)(n.OdW,{width:"100%",className:"h-4"}),(0,s.jsx)(n.OdW,{width:"100%",className:"h-4"}),(0,s.jsx)(n.OdW,{width:"100%",className:"h-4"})]}),G=e=>{let{searchResults:t,selectedConfigId:i,handleSelection:r,userCanDeleteConfigs:o,onDeleteOpen:l,setConfigToDelete:a}=e;return(0,s.jsx)(n.y02.Group,{onChange:e=>r(e.target.value),value:i,className:"flex flex-col gap-2",children:t.map(e=>(0,s.jsxs)(n.jqI,{className:o?"justify-between":"justify-start","data-testid":"tcf-config-item-".concat(e.id),children:[(0,s.jsx)(n.y02,{value:e.id,name:"tcf-config-id","data-testid":"tcf-config-item",children:(0,s.jsx)(n.xvT,{className:"text-sm",children:e.name})}),o&&(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:(0,s.jsx)(V.q,{fontSize:16}),onClick:t=>{t.stopPropagation(),a(e),l()},"data-testid":"delete-config-button"})]},e.id))})},U=e=>{let t,{searchTerm:i,setSearchTerm:r,searchResults:l,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:x,isLoading:g,setDropdownOpen:m,configurations:f}=e,[v,j]=(0,o.useState)(a);return(0,o.useEffect)(()=>{j(a)},[a]),t=g?(0,s.jsx)(B,{}):0===l.length?(0,s.jsx)(n.xvT,{className:"text-center",children:"No configurations found."}):(0,s.jsx)(G,{searchResults:l,selectedConfigId:v,handleSelection:e=>{j(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:x}),(0,s.jsxs)(n.V4A,{title:"TCF configurations",className:"min-w-[300px]",extra:(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:(0,s.jsx)(n.Two,{}),onClick:()=>m(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[f.length>10&&(0,s.jsx)(n.BZy,{size:"sm",children:(0,s.jsx)(n.uFc,{className:"mb-4",placeholder:"Search...",onChange:e=>r(e.target.value),value:i})}),t,(0,s.jsxs)(n.jqI,{gap:"small",className:"mt-4",children:[c&&(0,s.jsx)(n.wpx,{size:"small",onClick:()=>{p(),m(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,s.jsx)(n.wpx,{size:"small",onClick:()=>d(v),className:"flex-1","data-testid":"apply-config-button",disabled:v===a,children:"Apply"})]})]})},$=e=>(0,s.jsx)(U,{...e}),Y=e=>{var t;let{selectedConfigId:i,configurations:r,isLoading:l=!1,onConfigurationSelect:a,onConfigurationDelete:c}=e,u=(0,D.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),p=(0,D.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),h=(0,n.pmc)({id:"tcf-config-toast"}),[x]=(0,E.Cm)(),{isOpen:g,onOpen:m,onClose:f}=(0,n.qY0)(),{isOpen:v,onOpen:j,onClose:b}=(0,n.qY0)(),[C,_]=(0,o.useState)(""),[w,T]=(0,o.useState)(),[S,I]=(0,o.useState)(!1),N=(0,o.useMemo)(()=>C?r.filter(e=>e.name.toLowerCase().includes(C.toLowerCase())):r,[r,C]),P=(0,o.useMemo)(()=>r.find(e=>e.id===i),[r,i]),k=null!==(t=null==P?void 0:P.name)&&void 0!==t?t:"Select Configuration",F=e=>{a(e),I(!1)},L=async e=>{try{await x(e).unwrap(),null==c||c(e),T(void 0),b(),h({status:"success",description:'Configuration "'.concat(null==w?void 0:w.name,'" was successfully deleted.')})}catch(e){h({status:"error",description:(0,d.e$)(e,"A problem occurred while deleting the configuration.")})}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.S0p,{open:S,onOpenChange:I,trigger:["click"],overlayStyle:{zIndex:999},dropdownRender:()=>$({searchTerm:C,setSearchTerm:_,searchResults:N,selectedConfigId:i,handleSelection:F,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:m,onDeleteOpen:j,setConfigToDelete:T,isLoading:l,setDropdownOpen:I,configurations:r}),children:(0,s.jsx)(n.wpx,{icon:(0,s.jsx)(n.v4q,{}),iconPosition:"end","data-testid":"tcf-config-dropdown-trigger",children:k})}),(0,s.jsx)(z,{isOpen:g,onClose:f,onSuccess:e=>{a(e)}}),(0,s.jsx)(n.cVQ,{isOpen:v,onClose:()=>{T(void 0),b()},onConfirm:()=>{w&&L(w.id)},title:"Delete configuration",message:"Are you sure you want to delete this configuration? This action cannot be undone."})]})};var K=i(32885);let X=e=>{let{defaultChecked:t,onChange:i,...r}=e,l=(0,n.pmc)(),[a,c]=(0,o.useState)(t),[u,p]=(0,o.useState)(!1),{isLoading:g}=(0,K.x8)(),[m,{isLoading:f}]=(0,x.L)(),[v]=(0,K.M7)(),{data:j}=(0,K.n3)(void 0,{skip:g}),C=async e=>{let t=await m({consent:{override_vendor_purposes:e}});e&&j&&await v(j.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(t=>{if(l.closeAll(),null==i||i(e),(0,O.D4)(t)){let e=(0,d.e$)(t.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==i||i(!1),l((0,h.Vo)(e))}})(t)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.vyj,{direction:"vertical",size:"small",children:[(0,s.jsx)(n.xvT,{children:"Configure overrides for TCF related purposes."}),(0,s.jsxs)(n.vyj,{size:"small",children:[(0,s.jsx)(n.rAg,{size:"small",disabled:f,loading:f,...r,checked:a,defaultChecked:t,onClick:e=>{e?(c(e),C(e)):p(!0)},"data-testid":"tcf-override-toggle"}),(0,s.jsx)(n.xvT,{children:"Override vendor purposes"}),(0,s.jsx)(b.b,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]})]}),(0,s.jsx)(n.cVQ,{isOpen:u,onClose:()=>p(!1),onConfirm:()=>{c(!1),C(!1),p(!1)},title:"Disable Vendor Overrides",message:"Are you sure you want to disable vendor overrides? Clicking 'Continue' will immediately remove any custom configurations you have set for TCF purposes for all experiences."})]})},Q=e=>{var t;let{isTCFOverrideEnabled:i}=e,[r,l]=(0,o.useState)(i),[a,d]=(0,o.useState)(!1),[c,u]=(0,P._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,E.LS)({page:1,size:50},{skip:!i}),{data:x,isFetching:g}=(0,E.NZ)(c||"",{skip:!c});return(0,o.useEffect)(()=>{var e,t;!h&&(null==p?void 0:null===(e=p.items)||void 0===e?void 0:e.length)&&!c&&u(p.items[0].id),h||!c||(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)||u(null)},[h,null==p?void 0:p.items,c,u]),(0,s.jsxs)(_.Z,{title:"Publisher restrictions",fontSize:"sm",children:[(0,s.jsxs)(n.vyj,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,s.jsx)(X,{defaultChecked:r,onChange:e=>l(e)}),r&&(0,s.jsxs)(s.Fragment,{children:[h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.OdW,{height:"20px"}),(0,s.jsx)(n.OdW,{height:"20px"}),(0,s.jsx)(n.OdW,{height:"32px",width:"200px"})]}),!h&&(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activities."}),(0,s.jsxs)(n.xvT,{children:["To configure this section, select a TCF purpose to edit the restriction type and vendors."," ",(0,s.jsx)(v.Z,{href:k.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,s.jsx)(Y,{selectedConfigId:c||"",configurations:(null==p?void 0:p.items)||[],onConfigurationSelect:u})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.xvT,{children:['To define custom publisher restrictions select "create configuration" below.'," ",(0,s.jsx)(v.Z,{href:k.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,s.jsx)(n.wpx,{onClick:()=>d(!0),"data-testid":"create-config-button",children:"Create configuration +"})]})]})]}),(0,s.jsx)(z,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),r&&c&&(0,s.jsx)(M,{className:"mt-3",config:x,isLoading:g})]})};var J=()=>{var e,t;let{isLoading:i}=(0,K.x8)(),{tcf:g}=(0,a.hz)(),{data:m,isLoading:v}=(0,K.n3)(void 0,{skip:i||!g}),[b,{isLoading:C}]=(0,K.M7)(),{data:w,isLoading:S}=(0,x.tB)({api_set:!0}),{data:I,isLoading:E}=(0,x.tB)({api_set:!1}),[P]=(0,x.L)(),k=(0,l.C)(x.D2),F=(0,l.C)(x.Yh),L=(0,o.useMemo)(()=>w&&(null==w?void 0:w.consent)&&"override_vendor_purposes"in w.consent?w.consent.override_vendor_purposes:!!I&&null!=I&&!!I.consent&&"override_vendor_purposes"in I.consent&&I.consent.override_vendor_purposes,[w,I]),{isLoading:O}=(0,p.a4)(),R=(0,n.pmc)(),z=async e=>{var t;let i=e=>{if(R.closeAll(),(0,d.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");R((0,h.Vo)(t))}else R((0,h.t5)("Settings saved successfully"))},s=[...e.purposeOverrides.map(e=>{let t;return e.is_consent&&(t=y.I$.CONSENT),e.is_legitimate_interest&&(t=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:t}})];if(L){let e=await b(s);if((0,d.D4)(e)){i(e);return}}let{enabled:n,...r}=e.gpp;i(await P({gpp:r,plus_consent_settings:{tcf_publisher_country_code:null!==(t=e.tcfPublisherSettings.publisher_country_code)&&void 0!==t?t:null}}))},A=(0,o.useMemo)(()=>({purposeOverrides:m?m.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===y.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS})):[],gpp:k,tcfPublisherSettings:{publisher_country_code:F.tcf_publisher_country_code}}),[m,k,F]),q=(0,o.useMemo)(()=>(null==m?void 0:m.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[m]),Z=null===(t=(0,a.hz)())||void 0===t?void 0:null===(e=t.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,s.jsx)(c.Z,{title:"Consent Configuration",children:i||O||v||S||E?(0,s.jsx)(n.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,s.jsx)(n.$jN,{})}):(0,s.jsxs)(n.xuv,{"data-testid":"consent-configuration",children:[(0,s.jsx)(u.Z,{heading:"Consent settings"}),(0,s.jsxs)(n.Kqy,{spacing:3,mb:3,children:[(0,s.jsx)(_.Z,{title:"Transparency & Consent Framework settings",children:(0,s.jsx)(j,{name:"TCF",enabled:g})}),g&&!q&&Z&&(0,s.jsx)(Q,{isTCFOverrideEnabled:L})]}),(0,s.jsx)(r.J9,{initialValues:A,enableReinitialize:!0,onSubmit:z,children:e=>{let{dirty:t,isValid:i,isSubmitting:o}=e;return(0,s.jsx)(r.l0,{children:(0,s.jsxs)(n.Kqy,{spacing:6,children:[g&&(q||!Z)&&(0,s.jsxs)(_.Z,{title:"Vendor overrides",fontSize:"sm",children:[(0,s.jsx)(X,{defaultChecked:L,disabled:C}),L&&(0,s.jsxs)(n.Kqy,{mt:2,spacing:2,children:[(0,s.jsx)(n.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites."}),(0,s.jsx)(n.xvT,{children:"To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."}),(0,s.jsx)(f,{})]})]}),(0,s.jsx)(N,{}),(0,s.jsx)(T,{}),(0,s.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,loading:o,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=i(19043)}},function(e){e.O(0,[5279,2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9252],{98648:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/domains",function(){return n(76974)}])},59301:function(e,i,n){"use strict";var t=n(24246);let{Link:s}=n(20595).AntTypography;i.Z=e=>(0,t.jsx)(s,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,i,n){"use strict";n.d(i,{Z:function(){return m}});var t=n(24246),s=n(20595),r=n(88038),a=n.n(r),o=n(86677);n(27378);var c=n(25980),d=n(90867),l=n(42478),g=n(77830),u=()=>{let e=(0,o.useRouter)();return(0,t.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,t.jsxs)(s.xuv,{children:[(0,t.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,t.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,t.jsx)(s.wpx,{onClick:()=>{e.push(g.AD)},children:"Configure"})]}),(0,t.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:i,title:n,padded:r=!0,mainProps:g}=e,m=(0,c.hz)(),p=(0,o.useRouter)(),h="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,x=!(m.flags.messagingConfiguration&&h),{data:f}=(0,l.JE)(void 0,{skip:x}),{data:y}=(0,d.PW)(void 0,{skip:x}),v=m.flags.messagingConfiguration&&(!f||!y)&&h;return(0,t.jsxs)(s.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,t.jsxs)(a(),{children:[(0,t.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,t.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,t.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,t.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...g,children:[v?(0,t.jsx)(u,{}):null,i]})]})}},58754:function(e,i,n){"use strict";var t=n(24246),s=n(20595),r=n(70788);i.Z=e=>{let{heading:i,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:c,style:d,...l}=e;return(0,t.jsxs)("div",{...l,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,t.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof i?(0,t.jsx)(s.lQT,{className:n||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,c&&(0,t.jsx)("div",{"data-testid":"page-header-right-content",children:c})]}),!!n&&(0,t.jsx)(r.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},10342:function(e,i,n){"use strict";var t=n(24246),s=n(20595),r=n(46238);i.Z=e=>{let{title:i,tooltip:n,children:a,...o}=e;return(0,t.jsxs)(s.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...o,children:[(0,t.jsxs)(s.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[i,n?(0,t.jsx)(s.xvT,{as:"span",mx:1,children:(0,t.jsx)(r.b,{label:n})}):void 0]}),(0,t.jsx)(s.Kqy,{p:6,spacing:6,children:a})]})}},70788:function(e,i,n){"use strict";n.d(i,{m:function(){return d}});var t=n(24246),s=n(20595),r=n(79894),a=n.n(r),o=n(27378);let{Text:c}=s.AntTypography,d=e=>{let{items:i,...n}=e,r=(0,o.useMemo)(()=>null==i?void 0:i.map((e,n)=>{let r=n===i.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,t.jsx)(c,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:o.title})),d)?o.title=(0,t.jsx)(s.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,t.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[i]);return(0,t.jsx)(s.zrq,{items:r,...n})}},42478:function(e,i,n){"use strict";n.d(i,{FU:function(){return d},JE:function(){return s},Ki:function(){return g},SU:function(){return u},W:function(){return m},h9:function(){return r},jc:function(){return t},qt:function(){return c},sn:function(){return l}});let{useGetEmailInviteStatusQuery:t,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:r,useCreateMessagingConfigurationSecretsMutation:a,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:c,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:l,useUpdateMessagingConfigurationSecretsByKeyMutation:g,useCreateTestConnectionMessageMutation:u,useDeleteMessagingConfigurationByKeyMutation:m}=n(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,i,n,t)=>{let s=await t({url:"messaging/default/active"});return s.error&&404===s.error.status?{data:null}:s},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},76974:function(e,i,n){"use strict";n.r(i);var t=n(24246),s=n(20595),r=n(34090),a=n(55484),o=n(16134),c=n(59301),d=n(10342),l=n(40324),g=n(812),u=n(77213),m=n(58754),p=n(46628),h=n(7426);i.default=()=>{var e;let{isLoading:i}=(0,h.tB)({api_set:!0}),{isLoading:n}=(0,h.tB)({api_set:!1}),x=(0,o.C)(h.ak),f=x.apiSet,y=x.configSet,v=!!((null===(e=y.cors_origins)||void 0===e?void 0:e.length)||y.cors_origin_regex),j=(0,o.C)((0,h.U7)()),[b,{isLoading:C}]=(0,h.km)(),_=(0,s.pmc)(),w=e=>{if(!e||!(e.startsWith("https://")||e.startsWith("http://")))return!1;try{new URL(e)}catch(e){return!1}return!0},k=e=>!!e&&!e.includes("*"),T=e=>{if(!e)return!1;try{let i=new URL(e);return"/"===i.pathname&&!e.endsWith("/")}catch(e){return!1}},q=a.Ry().shape({cors_origins:a.IX().nullable().of(a.Z_().required().trim().test("is-valid-url",e=>{let{label:i}=e;return"".concat(i," must be a valid URL (e.g. https://example.com)")},e=>w(e)).test("has-no-wildcard",e=>{let{label:i}=e;return"".concat(i," cannot contain a wildcard (e.g. https://*.example.com)")},e=>k(e)).test("has-no-path",e=>{let{label:i}=e;return"".concat(i," cannot contain a path (e.g. https://example.com/path)")},e=>T(e)).label("Domain"))}),M=async(e,i)=>{let n=e.cors_origins&&e.cors_origins.length>0?e.cors_origins:void 0,t={...j,security:{cors_origins:n}};(n=>{if(_.closeAll(),(0,g.D4)(n)){let e=(0,g.e$)(n.error,"An unexpected error occurred while saving domains. Please try again.");_((0,p.Vo)(e))}else _((0,p.t5)("Domains saved successfully")),i.resetForm({values:e})})(await b(t))};return(0,t.jsx)(u.Z,{title:"Domains",children:(0,t.jsxs)(s.xuv,{"data-testid":"management-domains",children:[(0,t.jsx)(m.Z,{heading:"Domains"}),(0,t.jsxs)(s.xuv,{maxW:"600px",children:[(0,t.jsxs)(s.xvT,{fontSize:"sm",pb:6,children:["For Fides to work on your website(s), each of your domains must be listed below. You can add and remove domains at any time up to the quantity included in your license. For more information on managing domains"," ",(0,t.jsx)(c.Z,{href:"https://fid.es/domain-configuration",children:"read here"}),"."]}),(0,t.jsx)(d.Z,{"data-testid":"api-set-domains-form",title:"Organization domains",tooltip:"Fides uses these domains to enforce cross-origin resource sharing (CORS), a browser-based security standard. Each domain must be a valid URL (e.g. https://example.com) without any wildcards '*' or paths '/blog'",children:i||C?(0,t.jsx)(s.kCb,{justifyContent:"center",children:(0,t.jsx)(s.$jN,{})}):(0,t.jsx)(r.J9,{initialValues:f,enableReinitialize:!0,onSubmit:M,validationSchema:q,validateOnChange:!0,children:e=>{let{dirty:i,values:n,isValid:a}=e;return(0,t.jsxs)(r.l0,{children:[(0,t.jsx)(r.F2,{name:"cors_origins",render:e=>(0,t.jsxs)(s.kCb,{flexDir:"column",children:[n.cors_origins.map((i,n)=>(0,t.jsxs)(s.kCb,{flexDir:"row",my:3,children:[(0,t.jsx)(l.j0,{variant:"stacked",name:"cors_origins[".concat(n,"]"),placeholder:"https://subdomain.example.com:9090"}),(0,t.jsx)(s.wpx,{"aria-label":"delete-domain",className:"z-[2] ml-4",icon:(0,t.jsx)(s.pJl,{}),onClick:()=>{e.remove(n)}})]},n)),(0,t.jsx)(s.kCb,{justifyContent:"center",mt:3,children:(0,t.jsx)(s.wpx,{"aria-label":"add-domain",className:"w-full",onClick:()=>{e.push("")},children:"Add domain"})})]})}),(0,t.jsx)(s.xuv,{mt:6,children:(0,t.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:C||!i||!a,loading:C,"data-testid":"save-btn",children:"Save"})})]})}})})]}),(0,t.jsx)(s.xuv,{maxW:"600px",marginY:3,children:(0,t.jsx)(d.Z,{"data-testid":"config-set-domains-form",title:"Advanced settings",tooltip:"These domains are configured by an administrator with access to Fides security settings and can support more advanced options such as wildcards and regex.",children:n?(0,t.jsx)(s.kCb,{justifyContent:"center",children:(0,t.jsx)(s.$jN,{})}):(0,t.jsxs)(s.kCb,{flexDir:"column",children:[y.cors_origins.map((e,i)=>(0,t.jsx)(l.oi,{"data-testid":"input-config_cors_origins[".concat(i,"]"),marginY:3,value:e,isDisabled:!0,isPassword:!1},i)),y.cors_origin_regex?(0,t.jsx)(l.oi,{"data-testid":"input-config_cors_origin_regex",marginY:3,value:y.cors_origin_regex,isDisabled:!0,isPassword:!1},"cors_origin_regex"):void 0,v?void 0:(0,t.jsx)(s.xvT,{fontSize:"xs",color:"gray.500",children:"No advanced domain settings configured."})]})})})]})})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=98648)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4046],{10234:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/messaging-providers/[key]",function(){return n(55066)}])},55066:function(e,i,n){"use strict";n.r(i),n.d(i,{default:function(){return h}});var t=n(24246),r=n(86677),s=n(77213),c=n(90980),o=n(77830),d=n(20595),u=n(27378),l=n(17245),a=n(90710),f=n(42478),x=n(10792);let g=e=>{let{configKey:i}=e,{handleError:n}=(0,l.HK)(),{data:r,isLoading:s,error:c}=(0,f.FU)({key:i});if((0,u.useEffect)(()=>{c&&n(c)},[c,n]),s)return(0,t.jsx)(d.xuv,{display:"flex",justifyContent:"center",alignItems:"center",height:"200px",children:(0,t.jsx)(d.$jN,{})});if(!r)return(0,t.jsx)(d.V4A,{children:(0,t.jsxs)(d.xvT,{color:"red.500",children:["Messaging configuration not found for key: ",i]})});let o=r.service_type;return(0,t.jsxs)(d.xuv,{children:[(0,t.jsx)(d.X6q,{fontSize:"2xl",fontWeight:"semibold",mb:6,children:"Edit messaging provider"}),Object.values(a.q).includes(o)?(0,t.jsx)(x.Z,{configKey:i,initialProviderType:o}):(0,t.jsxs)(d.xvT,{color:"red.500",children:["Unsupported service type: ",o]})]})};var h=()=>{let{key:e}=(0,r.useRouter)().query;return e&&"string"==typeof e?(0,t.jsxs)(s.Z,{title:"Edit Messaging Provider - ".concat(e),children:[(0,t.jsx)(c.Z,{backPath:o.AD}),(0,t.jsx)(g,{configKey:e})]}):(0,t.jsxs)(s.Z,{title:"Edit Messaging Provider",children:[(0,t.jsx)(c.Z,{backPath:o.AD}),(0,t.jsx)("div",{children:"Invalid messaging provider key"})]})}}},function(e){e.O(0,[431,8765,9278,3662,9037,7245,3377,2888,9774,179],function(){return e(e.s=10234)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2992],{84983:function(n,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/messaging-providers/new",function(){return i(51192)}])},51192:function(n,e,i){"use strict";i.r(e),i.d(e,{default:function(){return c}});var s=i(24246),t=i(20595),r=i(77213),u=i(90980),o=i(77830),f=i(10792);let a=()=>(0,s.jsxs)(r.Z,{title:"Create Messaging Configuration",children:[(0,s.jsx)(u.Z,{backPath:o.AD}),(0,s.jsx)(t.X6q,{fontSize:"2xl",fontWeight:"semibold",mb:6,children:"Configure your messaging provider"}),(0,s.jsx)(f.Z,{})]});var c=()=>(0,s.jsx)(a,{})}},function(n){n.O(0,[431,8765,9278,3662,9037,7245,3377,2888,9774,179],function(){return n(n.s=84983)}),_N_E=n.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5935],{9255:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/messaging-providers",function(){return i(60612)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return f}});var n=i(24246),s=i(20595),a=i(88038),r=i.n(a),o=i(86677);i(27378);var l=i(25980),u=i(90867),c=i(42478),d=i(77830),g=()=>{let e=(0,o.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(d.AD)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},f=e=>{let{children:t,title:i,padded:a=!0,mainProps:d}=e,f=(0,l.hz)(),p=(0,o.useRouter)(),m="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(f.flags.messagingConfiguration&&m),{data:v}=(0,c.JE)(void 0,{skip:h}),{data:x}=(0,u.PW)(void 0,{skip:h}),y=f.flags.messagingConfiguration&&(!v||!x)&&m;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(r(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,n.jsx)(g,{}):null,t]})]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return r}});var n=i(24246),s=i(16134),a=i(31793);let r=e=>(0,s.C)(a.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return r(t)?(0,n.jsx)(n.Fragment,{children:i}):null}},8125:function(e,t,i){"use strict";i.d(t,{V:function(){return a},o:function(){return u}});var n=i(27378),s=i(32735);let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enableSelection:i=!1,getRowKey:a,bulkActions:r,isLoading:o=!1,isFetching:l=!1,dataSource:u=[],totalRows:c=0,currentPage:d,pageSize:g,customTableProps:f={}}=t,p=(0,n.useCallback)(e=>{if(e&&"object"==typeof e){if(e.id)return String(e.id);if(e.key)return String(e.key)}return String(e)},[]),m=a||p,[h,v]=(0,n.useState)([]),[x,y]=(0,n.useState)([]),j=(0,n.useCallback)(()=>{v([]),y([])},[]),C=(0,n.useMemo)(()=>({selectedRowKeys:h,selectedRows:x,resetSelections:j}),[h,x,j]),b=(0,n.useMemo)(()=>{if(i)return{selectedRowKeys:h,onChange:(e,t)=>{v(e),y(t)}}},[i,h]),w=(0,n.useCallback)((t,i,n)=>{var s,a;let r=null!==(s=t.current)&&void 0!==s?s:e.pageIndex,o=null!==(a=t.pageSize)&&void 0!==a?a:e.pageSize,l=r!==e.pageIndex||o!==e.pageSize;l?(t.current&&t.current!==e.pageIndex&&e.updatePageIndex(t.current),t.pageSize&&t.pageSize!==e.pageSize&&e.updatePageSize(t.pageSize)):e.updateFilters(i||{});let u=n&&!Array.isArray(n)?n.field:void 0,c=n&&!Array.isArray(n)&&null!==n.order?n.order:void 0;l||e.updateSorting(u,c)},[e]),S=(0,n.useMemo)(()=>{var t,i,n,a,r;return{current:null!=d?d:e.pageIndex,pageSize:null!=g?g:e.pageSize,total:c,showSizeChanger:null===(a=null===(t=e.paginationConfig)||void 0===t?void 0:t.showSizeChanger)||void 0===a||a,pageSizeOptions:null!==(r=null===(n=e.paginationConfig)||void 0===n?void 0:null===(i=n.pageSizeOptions)||void 0===i?void 0:i.map(String))&&void 0!==r?r:s.VZ}},[d,e.pageIndex,g,e.pageSize,c,e.paginationConfig]),k=(0,n.useMemo)(()=>({dataSource:u,loading:o||l,pagination:S,onChange:w,rowKey:m,scroll:{x:"max-content",scrollToFirstRowOnChange:!0},size:"small",bordered:!0,...f}),[u,o,l,S,w,m,f]),z=h.map(String),M=x.length>0,_=(0,n.useCallback)(e=>{let t=null==r?void 0:r.actions.find(t=>t.key===e);return t?{disabled:!M||!!t.disabled&&t.disabled(x),loading:t.loading||!1,onClick:()=>t.onClick(x)}:{disabled:!0,loading:!1}},[r,M,x]);return(0,n.useMemo)(()=>({tableProps:k,selectionProps:b,selectionState:C,selectedRows:x,selectedKeys:z,hasSelectedRows:M,resetSelections:j,getBulkActionProps:_,isLoadingOrFetching:o||l,hasData:u.length>0}),[k,b,C,x,z,M,j,_,o,l,u.length])};var r=i(40431),o=i(17245);let l=()=>({filters:(0,r.WJ)(e=>e).withDefault({})}),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pagination:t={},sorting:i={},search:s={},onStateChange:a}=e,{pageIndex:u,pageSize:c,resetPagination:d,updatePageIndex:g,updatePageSize:f,pageSizeOptions:p,showSizeChanger:m}=(0,o.h0)(t),{sortKey:h,sortOrder:v,updateSorting:x,resetSorting:y}=(0,o.rK)(i),{searchQuery:j,updateSearch:C,resetSearch:b}=(0,o.Rx)(s),w=(0,n.useMemo)(()=>l(),[]),[S,k]=(0,r.XI)(w,{history:"push"}),z=(0,n.useMemo)(()=>{var e;return{pageIndex:u,pageSize:c,sortKey:h,sortOrder:v,columnFilters:null!==(e=S.filters)&&void 0!==e?e:{},searchQuery:j}},[S,u,c,h,v,j]),M=(0,n.useCallback)((e,t)=>{x(e,t),d()},[x,d]),_=(0,n.useCallback)(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t}));k({filters:Object.keys(t).length>0?t:null}),d()},[k,d]),T=(0,n.useCallback)(e=>{C(e),d()},[C,d]),P=(0,n.useCallback)(()=>{k({filters:null}),d(),y(),b()},[k,d,y,b]);return(0,n.useEffect)(()=>{a&&a(z)},[z,a]),{state:z,pageIndex:z.pageIndex,pageSize:z.pageSize,updatePageIndex:g,updatePageSize:f,sortKey:z.sortKey,sortOrder:z.sortOrder,updateSorting:M,columnFilters:z.columnFilters,updateFilters:_,searchQuery:z.searchQuery,updateSearch:T,resetState:P,paginationConfig:{pageSizeOptions:p,showSizeChanger:m}}}},17828:function(e,t,i){"use strict";var n=i(24246);i(27378),t.Z=()=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 74.375 85",width:"20",height:"20",fill:"#fff",fillRule:"evenodd",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("use",{xlinkHref:"#A",x:"2.188",y:"2.5"}),(0,n.jsx)("symbol",{id:"A",overflow:"visible",children:(0,n.jsxs)("g",{stroke:"none",children:[(0,n.jsx)("path",{d:"M16.558 12.75L0 38.591l16.558 25.841 13.227-3.324.654-44.869-13.881-3.489z",fill:"#876929"}),(0,n.jsx)("path",{d:"M35.049 59.786l-18.491 4.645V12.75l18.491 4.645v42.391z",fill:"#d9a741"}),(0,n.jsxs)("g",{fill:"#876929",children:[(0,n.jsx)("path",{d:"M32.849 21.614L35.05 80 70 62.867l-.01-43.615-8.914 1.448-28.228.913z"}),(0,n.jsx)("path",{d:"M46.184 33.149l10.906-.632 10.778-19.164L40.612 0 30.439 4.364l15.745 28.785z"})]}),(0,n.jsx)("path",{d:"M40.612 0l27.256 13.353-10.778 19.164L40.612 0z",fill:"#d9a741"}),(0,n.jsx)("path",{d:"M35.049 5.539L57.09 44.742l3.788 22.595L35.049 80l-10.46-5.131V9.64l10.45-4.101h.01z",fill:"#876929"}),(0,n.jsx)("path",{d:"M69.991 19.251L70 62.867 35.05 80V5.539l22.041 39.203 12.899-25.491z",fill:"#d9a741"})]})})]})},44907:function(e,t,i){"use strict";var n=i(24246);i(27378),t.Z=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",preserveAspectRatio:"xMidYMid",viewBox:"-0.5 0 257 257",children:(0,n.jsx)("path",{fill:"#C02428",d:"M128.418 80.526c-26.51 0-48.884 21.475-48.884 48.728a48.197 48.197 0 0014.187 34.579 48.532 48.532 0 0034.697 14.14c26.511 0 48.875-21.476 48.875-48.719 0-27.253-22.364-48.728-48.875-48.728zm-76.22 47.895c0-41.285 33.968-75.138 75.395-75.138 41.417 0 75.385 33.853 75.385 75.138 0 2.478 0 5.788-.825 8.266-.835 7.422 4.972 13.2 12.43 13.2 12.43 0 14.08-15.678 14.08-21.466 0-55.328-45.573-100.746-101.07-100.746-55.518 0-101.07 45.418-101.07 100.746 0 55.339 45.552 100.747 101.07 100.747 29.822 0 56.333-12.388 74.56-33.03l20.703 17.342c-22.364 26.43-57.158 42.952-94.448 42.952-34.097.105-66.827-13.35-90.932-37.384C13.37 195.016-.118 162.392 0 128.411 0 58.228 57.159.432 128.418.432 198.832.432 256 58.238 256 128.432c0 28.075-13.256 51.205-40.591 51.205-11.605 0-19.053-5.787-23.2-11.565-13.255 21.476-37.29 35.508-64.626 35.508-20.017.068-39.234-7.827-53.388-21.933a74.755 74.755 0 01-22.008-53.205l.01-.02zm76.21-22.297c12.43 0 22.374 9.91 22.374 22.297 0 12.388-9.944 22.298-22.364 22.298a22.322 22.322 0 01-15.848-6.504 22.169 22.169 0 01-6.526-15.794c0-12.387 9.944-22.297 22.374-22.297h-.01z"})})},5144:function(e,t,i){"use strict";var n=i(24246);t.Z=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",children:(0,n.jsx)("path",{fill:"#F12E45",d:"M128 0c70.656 0 128 57.344 128 128s-57.344 128-128 128S0 198.656 0 128 57.344 0 128 0zm0 33.792c-52.224 0-94.208 41.984-94.208 94.208S75.776 222.208 128 222.208s94.208-41.984 94.208-94.208S180.224 33.792 128 33.792zm31.744 99.328c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm-63.488 0c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm63.488-63.488c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624zm-63.488 0c14.704 0 26.624 11.92 26.624 26.624 0 14.704-11.92 26.624-26.624 26.624-14.704 0-26.624-11.92-26.624-26.624 0-14.704 11.92-26.624 26.624-26.624z"})})},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return u},JE:function(){return s},Ki:function(){return d},SU:function(){return g},W:function(){return f},h9:function(){return a},jc:function(){return n},qt:function(){return l},sn:function(){return c}});let{useGetEmailInviteStatusQuery:n,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:a,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:o,useGetMessagingConfigurationsQuery:l,useGetMessagingConfigurationByKeyQuery:u,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:d,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:f}=i(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,i,n)=>{let s=await n({url:"messaging/default/active"});return s.error&&404===s.error.status?{data:null}:s},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},60612:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n,s,a=i(24246),r=i(20595),o=i(77213),l=i(77830),u=i(47935),c=i(812),d=i(17245),g=i(86677),f=i(27378),p=i(8125),m=i(7426),h=i(85054),v=i(19904),x=i(17828),y=i(44907),j=i(5144),C=i(42478),b=i(51980),w=i(16394),S=e=>{let{messagingConfig:t}=e,{last_test_succeeded:i,last_test_timestamp:n}=t;if(!n)return(0,a.jsx)(r.j8w,{children:"Verify configuration"});let s=new Date(n),o=(0,w.p6)(s),l=(0,b.B)(s,new Date,{addSuffix:!0});return(0,a.jsx)(r.esZ,{title:"Last verified: ".concat(o),children:(0,a.jsxs)(r.j8w,{color:i?"success":"error","data-testid":i?"test-success":"test-error",children:[i?"Succeeded":"Failed"," ",l]})})};(n=s||(s={})).NAME="name",n.VERIFICATION_STATUS="verification_status",n.ENABLED="enabled",n.ACTIONS="actions";let k=()=>{let e=(0,g.useRouter)(),{handleError:t}=(0,d.HK)(),[i,n]=(0,f.useState)(null),[o]=(0,m.L)(),[u]=(0,C.W)(),b=(0,v.Tg)([h.Sh.MESSAGING_CREATE_OR_UPDATE]),[w,k]=(0,f.useState)(!1),[z,M]=(0,f.useState)(null),_=(0,p.o)({pagination:{defaultPageSize:25,pageSizeOptions:[25,50,100]},sorting:{validColumns:Object.values(s),defaultSortKey:"name",defaultSortOrder:"ascend"}}),{data:T,isLoading:P}=(0,C.JE)(),{data:E,isLoading:q}=(0,C.qt)();(0,f.useEffect)(()=>{T?n(T.service_type):n(null)},[T]);let A=(0,f.useCallback)(async e=>{try{let i=await o({notifications:{notification_service_type:e}});(0,c.D4)(i)?t(i.error):(n(e),r.Pg3.success(e?"Updated active messaging config":"Disabled active messaging config"))}catch(e){t(e)}},[o,t,n]),I=(0,f.useCallback)(t=>{var i,n;let s=l.GE.replace("[key]",t.key);e.push({pathname:s,query:{last_test_succeeded:null!==(i=t.last_test_succeeded)&&void 0!==i?i:"",last_test_timestamp:null!==(n=t.last_test_timestamp)&&void 0!==n?n:""}})},[e]),O=(0,f.useCallback)((e,t)=>{M({key:e,name:t}),k(!0)},[]),L=(0,f.useCallback)(async()=>{if(z)try{let e=await u({key:z.key});(0,c.D4)(e)?t(e.error):r.Pg3.success("Messaging configuration successfully deleted")}catch(e){t(e)}finally{k(!1),M(null)}},[z,u,t]),D=(0,f.useCallback)(()=>{k(!1),M(null)},[]),F=(0,f.useMemo)(()=>({enableSelection:!1,getRowKey:e=>e.key,isLoading:q||P,dataSource:(null==E?void 0:E.items)||[],totalRows:(null==E?void 0:E.total)||0,customTableProps:{size:"small",pagination:{hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["25","50","100"]}}}),[q,P,null==E?void 0:E.items,null==E?void 0:E.total]),R=(0,p.V)(_,F),K=(0,f.useMemo)(()=>[{title:"Provider type",dataIndex:"name",key:"name",render:(e,t)=>(0,a.jsxs)(r.Ugi,{children:[(()=>{switch(t.service_type){case"mailgun":return(0,a.jsx)(y.Z,{});case"twilio_text":case"twilio_email":default:return(0,a.jsx)(j.Z,{});case"aws_ses":return(0,a.jsx)(x.Z,{})}})(),(0,a.jsx)(r.xvT,{children:e})]})},{title:"Verification status",key:"verification_status",render:(e,t)=>(0,a.jsx)(S,{messagingConfig:t})},{title:"Enabled",key:"enabled",width:100,render:(e,t)=>{let n=t.service_type===i,s=!!t.last_test_timestamp&&""!==t.last_test_timestamp&&!1===t.last_test_succeeded&&!n,o=(0,a.jsx)(r.rAg,{checked:n,disabled:s,onChange:e=>{e?A(t.service_type):A(null)}});return s?(0,a.jsx)(r.esZ,{title:"This provider cannot be enabled because its last test failed. Please fix the configuration and test again.",children:o}):o}},{title:"Actions",key:"actions",render:(e,t)=>(0,a.jsxs)(r.Ugi,{children:[b&&(0,a.jsx)(r.wpx,{onClick:e=>{e.stopPropagation(),I(t)},size:"small",icon:(0,a.jsx)(r.PJP.I8b,{}),title:"Edit","aria-label":"Edit messaging configuration","data-testid":"edit-messaging-config-btn"}),b&&(0,a.jsx)(r.wpx,{onClick:e=>{e.stopPropagation(),O(t.key,t.name)},size:"small",icon:(0,a.jsx)(r.PJP.ZNm,{}),title:"Delete","aria-label":"Delete messaging configuration","data-testid":"delete-messaging-config-btn"})]})}],[b,i,I,O,A]),Z=(0,f.useMemo)(()=>(0,a.jsx)(r.$zI,{title:"Delete messaging configuration",open:w,onCancel:D,footer:[(0,a.jsx)(r.wpx,{onClick:D,children:"Cancel"},"cancel"),(0,a.jsx)(r.wpx,{type:"primary",danger:!0,onClick:L,children:"Delete"},"delete")],children:(0,a.jsxs)(r.vyj,{direction:"vertical",children:[(0,a.jsxs)(r.xvT,{children:['Are you sure you want to delete "',(0,a.jsx)("strong",{children:null==z?void 0:z.name}),'" messaging configuration?']}),(0,a.jsx)(r.xvT,{children:"This action cannot be undone."})]})}),[w,null==z?void 0:z.name,D,L]);return{columns:K,tableProps:R.tableProps,selectionProps:R.selectionProps,userCanUpdate:b,isLoading:q||P,deleteModal:Z,handleEditConfiguration:I,handleDeleteConfiguration:O,setActiveServiceType:A}},z=()=>(0,a.jsx)(r.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,a.jsxs)(r.gCW,{children:[(0,a.jsx)(r.xvT,{fontSize:"md",fontWeight:"600",children:"No messaging providers found."}),(0,a.jsx)(r.xvT,{fontSize:"sm",children:'Click "Add a messaging provider" to add your first messaging provider to Fides.'})]})}),M=()=>{let{columns:e,tableProps:t,userCanUpdate:i,isLoading:n,deleteModal:s}=k();return(0,a.jsxs)(o.Z,{title:"Messaging providers",children:[(0,a.jsx)(r.X6q,{mb:5,fontSize:"2xl",fontWeight:"semibold",children:"Manage messaging providers"}),(0,a.jsxs)(r.xvT,{fontSize:"sm",mb:8,width:{base:"100%",lg:"70%"},children:["Fides requires a messaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,a.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,a.jsxs)(r.kCb,{flex:1,direction:"column",overflow:"auto",children:[i&&(0,a.jsx)(r.vyj,{direction:"horizontal",style:{width:"100%",justifyContent:"flex-end",marginBottom:16},children:(0,a.jsx)(r.wpx,{href:"".concat(l.AD,"/new"),role:"link",type:"primary",icon:(0,a.jsx)(r.PJP.mm_,{}),iconPosition:"end","data-testid":"add-messaging-provider-btn",children:"Add a messaging provider"})}),n?(0,a.jsx)(u.I4,{rowHeight:36,numRows:5}):(0,a.jsx)(r.V5H,{...t,columns:e,locale:{emptyText:(0,a.jsx)(z,{})}})]}),s]})};var _=()=>(0,a.jsx)(M,{})}},function(e){e.O(0,[431,7245,2888,9774,179],function(){return e(e.s=9255)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1617],{54543:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]/test-datasets",function(){return i(94010)}])},18225:function(e,t,i){"use strict";var n=i(24246),s=i(20595);t.Z=e=>{let{alignment:t="center",...i}=e;return(0,n.jsx)(s.kCb,{boxSize:"full",align:"center",justify:t,children:(0,n.jsx)(s.$jN,{color:"primary",...i})})}},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return g}});var n=i(24246),s=i(20595),r=i(88038),a=i.n(r),l=i(86677);i(27378);var o=i(25980),d=i(90867),u=i(42478),c=i(77830),f=()=>{let e=(0,l.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(c.AD)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},g=e=>{let{children:t,title:i,padded:r=!0,mainProps:c}=e,g=(0,o.hz)(),p=(0,l.useRouter)(),m="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(g.flags.messagingConfiguration&&m),{data:y}=(0,u.JE)(void 0,{skip:h}),{data:v}=(0,d.PW)(void 0,{skip:h}),x=g.flags.messagingConfiguration&&(!y||!v)&&m;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[x?(0,n.jsx)(f,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(20595),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:a=!0,children:l,rightContent:o,style:d,...u}=e;return(0,n.jsxs)("div",{...u,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.lQT,{className:i||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),s=i(20595),r=i(79894),a=i.n(r),l=i(27378);let{Text:o}=s.AntTypography,d=e=>{let{items:t,...i}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:l.title})),d)?l.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,n.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},41207:function(e,t,i){"use strict";i.d(t,{F:function(){return a},M:function(){return r}});var n=i(76649),s=i(65218);let r=i.n(s)()(()=>i.e(7088).then(i.bind(i,57088)).then(e=>e.default),{loadableGenerated:{webpack:()=>[57088]},ssr:!1}),a=e=>(0,n.Ln)({name:"string"},e)&&"YAMLException"===e.name},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return d},JE:function(){return s},Ki:function(){return c},SU:function(){return f},W:function(){return g},h9:function(){return r},jc:function(){return n},qt:function(){return o},sn:function(){return u}});let{useGetEmailInviteStatusQuery:n,useGetActiveMessagingProviderQuery:s,useCreateMessagingConfigurationMutation:r,useCreateMessagingConfigurationSecretsMutation:a,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:u,useUpdateMessagingConfigurationSecretsByKeyMutation:c,useCreateTestConnectionMessageMutation:f,useDeleteMessagingConfigurationByKeyMutation:g}=i(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,i,n)=>{let s=await n({url:"messaging/default/active"});return s.error&&404===s.error.status?{data:null}:s},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},94010:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return A}});var n=i(24246),s=i(20595),r=i(86677),a=i(18225),l=i(77213),o=i(77830),d=i(58754),u=i(1315),c=i(66527),f=i(27378),g=i(16134),p=i(88340),m=i(812),h=i(46628),y=i(41207),v=i(41966),x=i(94725),b=i(88124);let _=e=>Array.isArray(e)?e.map(e=>_(e)).filter(e=>null!==e):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[t,i]=e;return[t,_(i)]}).filter(e=>{let[,t]=e;return null!==t})):e,j=e=>{if(Array.isArray(e)){let t=e[0];if(!t)return"";let i=t.msg||"",n=t.loc?" (".concat(t.loc,")"):"";return"".concat(i).concat(n)}return e};var C=e=>{let{connectionKey:t}=e,i=(0,s.pmc)(),r=(0,g.T)(),[a]=(0,v.TG)(),[l,o]=(0,f.useState)(""),d=(0,g.C)(b.fD),u=(0,g.C)(b.lR),{data:C,isLoading:k,refetch:T}=(0,x.Eg)(t,{skip:!t}),{data:w,refetch:S}=(0,x.tW)({connectionKey:t,datasetKey:(null==d?void 0:d.fides_key)||"",policyKey:u},{skip:!t||!(null==d?void 0:d.fides_key)||!u});(0,f.useEffect)(()=>{w&&r((0,b.x0)(w.reachable))},[w,r]);let E=(0,f.useMemo)(()=>((null==C?void 0:C.items)||[]).map(e=>({value:e.fides_key,label:e.fides_key})),[null==C?void 0:C.items]);(0,f.useEffect)(()=>{if((null==C?void 0:C.items.length)&&(!d||!C.items.find(e=>e.fides_key===d.fides_key))){let e=C.items[0];r((0,b.w7)(e))}},[C,d,r]),(0,f.useEffect)(()=>{(null==d?void 0:d.ctl_dataset)&&o(c.ZP.dump(_(null==d?void 0:d.ctl_dataset)))},[d]),(0,f.useEffect)(()=>{u&&(null==d?void 0:d.fides_key)&&t&&S()},[u,null==d?void 0:d.fides_key,t,S]),(0,f.useEffect)(()=>{w&&r((0,b.x0)(w.reachable))},[w,r]);let q=async e=>{let t=null==C?void 0:C.items.find(t=>t.fides_key===e);t&&r((0,b.w7)(t))},M=async()=>{let e;if(!d)return;try{e=c.ZP.load(l)}catch(e){i((0,h.Vo)("YAML Parsing Error: ".concat(e instanceof c._L?"".concat(e.reason," ").concat(e.mark?"at line ".concat(e.mark.line):""):"Invalid YAML format")));return}let t=await a(e);if((0,m.D4)(t)){i((0,h.Vo)((0,m.e$)(t.error)));return}r((0,b.w7)({fides_key:d.fides_key,ctl_dataset:t.data})),i((0,h.t5)("Successfully modified dataset")),await T(),await S()},O=async()=>{try{let{data:e}=await T(),t=null==e?void 0:e.items.find(e=>e.fides_key===(null==d?void 0:d.fides_key));(null==t?void 0:t.ctl_dataset)&&o(c.ZP.dump(_(t.ctl_dataset))),i((0,h.t5)("Successfully refreshed datasets"))}catch(e){i((0,h.Vo)((0,m.e$)(e)))}};return(0,n.jsxs)(s.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",maxHeight:"100vh",children:[(0,n.jsxs)(s.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.xvT,{children:"Edit dataset: "}),(0,n.jsx)(s.WPr,{id:"format","data-testid":"export-format-select",value:(null==d?void 0:d.fides_key)||"",options:E,onChange:q,className:"w-64"}),(0,n.jsx)(p.Z,{copyText:l})]}),(0,n.jsxs)(s.Ugi,{spacing:2,children:[(0,n.jsx)(s.esZ,{title:"Refresh to load the latest data from the database. This will overwrite any unsaved local changes.",placement:"top",children:(0,n.jsx)(s.wpx,{htmlType:"submit",size:"small","data-testid":"refresh-btn",onClick:O,loading:k,children:"Refresh"})}),(0,n.jsx)(s.esZ,{title:"Save your changes to update the dataset in the database.",placement:"top",children:(0,n.jsx)(s.wpx,{htmlType:"submit",size:"small",onClick:M,children:"Save"})})]})]}),(0,n.jsx)(s.Kqy,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",justifyContent:"space-between",py:4,pr:4,"data-testid":"empty-state",flex:"1 1 auto",minHeight:"200px",children:(0,n.jsx)(y.M,{defaultLanguage:"yaml",value:l,height:"100%",onChange:e=>o(e||""),onMount:()=>{},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:!1,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,scrollBeyondLastLine:!1},theme:"light"})}),w&&(0,n.jsx)(s.Kqy,{backgroundColor:(null==w?void 0:w.reachable)?"green.50":"red.50",border:"1px solid",borderColor:(null==w?void 0:w.reachable)?"green.500":"red.500",borderRadius:"md",p:2,flexShrink:0,mt:2,children:(0,n.jsx)(s.Ugi,{alignItems:"center",children:(0,n.jsxs)(s.Ugi,{flex:"1",children:[(null==w?void 0:w.reachable)?(0,n.jsx)(s.StI,{}):(0,n.jsx)(s.f9v,{}),(0,n.jsx)(s.xvT,{fontSize:"sm",whiteSpace:"pre-wrap",children:(null==w?void 0:w.reachable)?"Dataset is reachable":"Dataset is not reachable. ".concat(j(null==w?void 0:w.details))})]})})})]})},k=i(54458),T=i(16125),w=i(99716);let S=e=>{let t=new Date(e);return(0,k.WU)(t,"yyyy-MM-dd HH:mm:ss.SSS")},E=e=>{switch(e){case"ERROR":return"red.500";case"WARNING":return"orange.500";case"INFO":return"blue.500";default:return"gray.500"}},q=(0,f.memo)(e=>{let{log:t}=e;return(0,n.jsxs)(s.xuv,{as:"pre",margin:0,fontSize:"xs",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",children:[(0,n.jsx)(s.xvT,{as:"span",color:"green.500",children:S(t.timestamp)}),(0,n.jsx)(s.xvT,{as:"span",children:" | "}),(0,n.jsx)(s.xvT,{as:"span",color:E(t.level),children:t.level.padEnd(8)}),(0,n.jsx)(s.xvT,{as:"span",children:" | "}),(0,n.jsx)(s.xvT,{as:"span",color:"cyan.500",children:t.module_info}),(0,n.jsx)(s.xvT,{as:"span",children:" - "}),(0,n.jsx)(s.xvT,{as:"span",color:"ERROR"===t.level||"WARNING"===t.level?E(t.level):"gray.800",children:t.message})]})});q.displayName="LogLine";var M=(0,f.memo)(()=>{let e=(0,g.T)(),t=(0,f.useRef)(null),i=(0,T.v9)(b.HN),r=(0,T.v9)(b.pz),{data:a}=(0,w.fV)({privacy_request_id:i},{skip:!i,pollingInterval:1e3});(0,f.useEffect)(()=>{a&&e((0,b.Hy)(a))},[a,e]);let l=(0,f.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[]);(0,f.useEffect)(()=>{l()},[r,l]);let o=(0,f.useMemo)(()=>(null==r?void 0:r.map(e=>"".concat(S(e.timestamp)," | ").concat(e.level," | ").concat(e.module_info," - ").concat(e.message)).join("\n"))||"",[r]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.xvT,{children:"Test logs"}),(0,n.jsx)(p.Z,{copyText:o})]})}),(0,n.jsx)(s.xuv,{ref:t,height:"200px",overflowY:"auto",borderWidth:1,borderColor:"gray.200",borderRadius:"md",p:2,children:null==r?void 0:r.map(e=>(0,n.jsx)(q,{log:e},"".concat(e.timestamp,"-").concat(e.module_info,"-").concat(e.message)))})]})}),O=i(46238);let{useGetPoliciesQuery:R}=i(78780).u.injectEndpoints({endpoints:e=>({getPolicies:e.query({query:()=>({url:"/dsr/policy"}),providesTags:()=>["Policies"]})})});var P=i(85054),N=i(31883),I=e=>{let{connectionKey:t}=e,i=(0,s.pmc)(),r=(0,g.T)(),[a]=(0,x.s7)(),l=(0,T.v9)(b.fD),o=(0,T.v9)(b.YS),d=(0,T.v9)(b.Af),u=(0,T.v9)(b.zn),c=(0,T.v9)(b.lR),y=(0,T.v9)(b.M_),v=(0,T.v9)(b.HN),[_,j]=(0,f.useState)("{}");(0,f.useEffect)(()=>{l&&j(JSON.stringify(u,null,2))},[l,u]);let{data:C,error:k}=(0,w.Z2)({privacy_request_id:v},{skip:!v||!(null==l?void 0:l.fides_key),pollingInterval:2e3}),{refetch:S}=(0,w.fV)({privacy_request_id:v},{skip:!v}),{refetch:E}=(0,x.I1)({connectionKey:t,datasetKey:(null==l?void 0:l.fides_key)||""},{skip:!t||!(null==l?void 0:l.fides_key),refetchOnMountOrArgChange:!0}),{data:q}=R(),M=(0,f.useMemo)(()=>((null==q?void 0:q.items)||[]).filter(e=>{var t;return null===(t=e.rules)||void 0===t?void 0:t.some(e=>"access"===e.action_type)}).map(e=>({value:e.key,label:e.name})),[null==q?void 0:q.items]);(0,f.useEffect)(()=>{let e=null==l?void 0:l.fides_key;t&&e&&E().then(t=>{t.data&&(null==l?void 0:l.fides_key)===e&&r((0,b.qD)({datasetKey:e,values:t.data}))})},[l,t,r,E]),(0,f.useEffect)(()=>{let e=null==l?void 0:l.fides_key;if(k&&"status"in k&&404===k.status){r((0,b.hT)()),i((0,h.Vo)("Test run failed"));return}if(!C||C.privacy_request_id!==v||!e)return;let t={datasetKey:e,values:JSON.stringify(C,null,2)};C.status===P.q2.COMPLETE?y&&S().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,h.t5)("Test run completed successfully"))}):C.status===P.q2.ERROR&&S().then(()=>{r((0,b.EO)(t)),r((0,b.hT)()),i((0,h.Vo)("Test run failed"))})},[C,k,v,l,y,r,i,S]);let I=(0,f.useMemo)(()=>c&&(null==q?void 0:q.items)?c:null,[c,null==q?void 0:q.items]),D=async()=>{if((null==l?void 0:l.fides_key)&&c)try{let e;try{e=JSON.parse(_)}catch(e){i((0,h.Vo)("Invalid JSON in test input"));return}r((0,b.Vh)(l.fides_key)),i((0,h.t5)("Test run started"));let n=await a({connection_key:t,dataset_key:l.fides_key,identities:e,policy_key:c});(0,N.D4)(n)?(i((0,h.Vo)((0,m.e$)(n.error))),r((0,b.hT)())):"data"in n?r((0,b.eY)(n.data.privacy_request_id)):(r((0,b.hT)()),i((0,h.Vo)("No privacy request ID in response")))}catch(e){r((0,b.hT)()),i((0,h.Vo)("Failed to start test run"))}};return(0,n.jsxs)(s.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",minHeight:"0",children:[(0,n.jsxs)(s.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.xvT,{children:"Test inputs"}),(0,n.jsx)(p.Z,{copyText:_})]}),(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.WPr,{id:"policy","aria-label":"Policy selector","data-testid":"policy-select",placeholder:"Select policy",value:I,options:M,onChange:e=>{r((0,b.kF)(e))},className:"w-64"}),(0,n.jsx)(s.wpx,{htmlType:"submit",size:"small",type:"primary","data-testid":"run-btn",onClick:y?()=>{r((0,b.qU)()),i((0,h.t5)("Test manually stopped by user"))}:D,disabled:!c||!o,children:y?"Stop":"Run"}),(0,n.jsx)(O.b,{label:y?"Stop the currently running test":"Run a test access request using the provided test input data and the selected access policy"})]})]}),(0,n.jsx)(s.gxH,{size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:y,height:"100%",value:_,onChange:e=>{let t=e.target.value;j(t);try{let e=JSON.parse(t);l&&r((0,b.qD)({datasetKey:l.fides_key,values:e}))}catch(e){}}}),(0,n.jsxs)(s.X6q,{as:"h3",size:"sm",children:["Test results ",(0,n.jsx)(p.Z,{copyText:d})]}),(0,n.jsx)(s.gxH,{isReadOnly:!0,size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:!1,height:"100%",value:d})]})};let D=e=>e.id?Array.isArray(e.id)?e.id[0]:e.id:"";var A=()=>{var e;let t=D((0,r.useRouter)().query),{data:i,isLoading:c}=(0,u.rn)(t,{skip:!t}),f=(null==i?void 0:null===(e=i.connection_configs)||void 0===e?void 0:e.key)||"";return c?(0,n.jsx)(l.Z,{title:"Systems",children:(0,n.jsx)(a.Z,{})}):(0,n.jsxs)(l.Z,{title:"System inventory",mainProps:{height:"100vh",display:"flex",flexDirection:"column"},children:[(0,n.jsx)(d.Z,{heading:"System inventory",breadcrumbItems:[{title:"System inventory",href:o.So},{title:(null==i?void 0:i.name)||"",href:"/systems/configure/".concat(t,"#integrations")},{title:"Test datasets"}]}),(0,n.jsxs)(s.gCW,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",padding:"0",children:[(0,n.jsxs)(s.Ugi,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",maxHeight:"60vh",children:[(0,n.jsx)(C,{connectionKey:f}),(0,n.jsx)(I,{connectionKey:f})]}),(0,n.jsx)(s.xuv,{flex:"0 0 auto",children:(0,n.jsx)(M,{})})]})]})}},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=i(19043)},76737:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{default:function(){return l},noSSR:function(){return a}});let n=i(51538);i(24246),i(27378);let s=n._(i(21887));function r(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function l(e,t){let i=s.default,n={loading:e=>{let{error:t,isLoading:i,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let l=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?i({...n,loader:()=>null!=l?l().then(r):Promise.resolve(r(()=>null))}):(delete n.webpack,delete n.modules,a(i,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28438:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=i(51538)._(i(27378)).default.createContext(null)},21887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let n=i(51538)._(i(27378)),s=i(28438),r=[],a=[],l=!1;function o(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),r=null;function o(){if(!r){let t=new d(e,i);r={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return r.promise()}if(!l){let e=i.webpack?i.webpack():i.modules;e&&a.push(t=>{for(let i of e)if(t.includes(i))return o()})}function u(e,t){!function(){o();let e=n.default.useContext(s.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let a=n.default.useSyncExternalStore(r.subscribe,r.getCurrentValue,r.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:r.retry}),[]),n.default.useMemo(()=>{var t;return a.loading||a.error?n.default.createElement(i.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:r.retry}):a.loaded?n.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return u.preload=()=>o(),u.displayName="LoadableComponent",n.default.forwardRef(u)}(o,e)}function c(e,t){let i=[];for(;e.length;){let n=e.pop();i.push(n(t))}return Promise.all(i).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(r).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let i=()=>(l=!0,t());c(a,e).then(i,i)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},65218:function(e,t,i){e.exports=i(76737)}},function(e){e.O(0,[6527,2888,9774,179],function(){return e(e.s=54543)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3785],{90988:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems",function(){return t(69955)}])},30952:function(e,s,t){"use strict";t.d(s,{f:function(){return d}});var l=t(24246),a=t(66726),n=t.n(a),r=t(27378),i=t(26917);let d=e=>{let{value:s,onChange:t,placeholder:a,...d}=e,[o,c]=(0,r.useState)(s);(0,r.useEffect)(()=>{c(s||"")},[s]);let u=n()(t,500),m=(0,r.useCallback)(e=>{c(e),u(e)},[]);return(0,l.jsx)(i.Z,{value:o,onChange:m,onClear:()=>{c(""),t("")},placeholder:a,...d})}},35287:function(e,s,t){"use strict";var l=t(24246),a=t(20595),n=t(88038),r=t.n(n);t(27378),s.Z=e=>{let{children:s,title:t,mainProps:n}=e;return(0,l.jsxs)(a.kCb,{"data-testid":t,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,l.jsxs)(r(),{children:[(0,l.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,l.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,l.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,l.jsx)(a.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...n,children:s})]})}},58754:function(e,s,t){"use strict";var l=t(24246),a=t(20595),n=t(70788);s.Z=e=>{let{heading:s,breadcrumbItems:t,isSticky:r=!0,children:i,rightContent:d,style:o,...c}=e;return(0,l.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...o}:{paddingBottom:"24px",...o},children:[(0,l.jsxs)(a.jqI,{justify:"space-between",children:["string"==typeof s?(0,l.jsx)(a.lQT,{className:t||i?"pb-4":void 0,level:1,"data-testid":"page-heading",children:s}):s,d&&(0,l.jsx)("div",{"data-testid":"page-header-right-content",children:d})]}),!!t&&(0,l.jsx)(n.m,{className:i?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),i]})}},19904:function(e,s,t){"use strict";t.d(s,{Tg:function(){return r}});var l=t(24246),a=t(16134),n=t(31793);let r=e=>(0,a.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,l.jsx)(l.Fragment,{children:t}):null}},97181:function(e,s,t){"use strict";t.d(s,{d:function(){return o}});var l=t(24246),a=t(20595),n=t(34090),r=t(27378),i=t(46238),d=t(40324);let o=e=>{let{name:s,label:t,labelProps:o,tooltip:c,isRequired:u,layout:m="inline",helperText:p,...y}=e,[g,h,{setValue:x}]=(0,n.U$)(s),j=!!(h.touched&&h.error),[v,f]=(0,r.useState)("");g.value||"tags"!==y.mode&&"multiple"!==y.mode||(g.value=[]),"tags"===y.mode&&"string"==typeof g.value&&(g.value=[g.value]);let k="tags"===y.mode?(e,s)=>e?e.value!==v||g.value.includes(v)?y.optionRender?y.optionRender(e,s):e.label:'Create "'.concat(v,'"'):void 0:y.optionRender||void 0,b=e=>{f(e),y.onSearch&&y.onSearch(e)},_=(e,s)=>{x(e),y.onChange&&y.onChange(e,s)};return"inline"===m?(0,l.jsx)(a.NIc,{isInvalid:j,isRequired:u,children:(0,l.jsxs)(a.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,l.jsx)(d.__,{htmlFor:y.id||s,...o,children:t}):null,(0,l.jsxs)(a.jqI,{align:"center",children:[(0,l.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(a.WPr,{...g,id:y.id||s,"data-testid":"controlled-select-".concat(g.name),...y,optionRender:k,onSearch:"tags"===y.mode?b:void 0,onChange:_,value:g.value||void 0,status:j?"error":void 0}),p&&(0,l.jsx)(a.Q6r,{children:p}),(0,l.jsx)(d.Bc,{isInvalid:j,message:h.error,fieldName:g.name})]}),(0,l.jsx)(i.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,l.jsx)(a.NIc,{isInvalid:j,isRequired:u,children:(0,l.jsxs)(a.gCW,{alignItems:"start",children:[(0,l.jsxs)(a.jqI,{align:"center",children:[t?(0,l.jsx)(d.__,{htmlFor:y.id||s,fontSize:"xs",my:0,mr:1,...o,children:t}):null,(0,l.jsx)(i.b,{label:c})]}),(0,l.jsx)(a.WPr,{...g,id:y.id||s,"data-testid":"controlled-select-".concat(g.name),...y,optionRender:k,onSearch:"tags"===y.mode?b:void 0,onChange:_,value:g.value||void 0,status:j?"error":void 0}),p&&(0,l.jsx)(a.Q6r,{style:{marginTop:0},children:p}),(0,l.jsx)(d.Bc,{isInvalid:j,message:h.error,fieldName:g.name})]})})}},70788:function(e,s,t){"use strict";t.d(s,{m:function(){return o}});var l=t(24246),a=t(20595),n=t(79894),r=t.n(n),i=t(27378);let{Text:d}=a.AntTypography,o=e=>{let{items:s,...t}=e,n=(0,i.useMemo)(()=>null==s?void 0:s.map((e,t)=>{let n=t===s.length-1,i={...e},o=i.onClick&&!i.href;return("string"==typeof i.title&&(i.title=(0,l.jsx)(d,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:i.title})),o)?i.title=(0,l.jsx)(a.wpx,{type:"text",size:"small",icon:i.icon,onClick:i.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:i.title}):(i.icon&&(i.title=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"anticon align-text-bottom",children:i.icon}),i.title]})),i.href&&i.title&&(i.title=(0,l.jsx)(r(),{href:i.href,className:"ant-breadcrumb-link",children:i.title}),delete i.href)),i}),[s]);return(0,l.jsx)(a.zrq,{items:n,...t})}},33335:function(e,s,t){"use strict";t.d(s,{E:function(){return l}});let l=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},22583:function(e,s,t){"use strict";t.d(s,{j:function(){return a}});var l=t(85054);let a={[l.Ej.TAXONOMY_WHITE]:"default",[l.Ej.TAXONOMY_RED]:"error",[l.Ej.TAXONOMY_ORANGE]:"warning",[l.Ej.TAXONOMY_YELLOW]:"caution",[l.Ej.TAXONOMY_GREEN]:"success",[l.Ej.TAXONOMY_BLUE]:"info",[l.Ej.TAXONOMY_PURPLE]:"alert",[l.Ej.SANDSTONE]:"sandstone",[l.Ej.MINOS]:"minos"}},92818:function(e,s,t){"use strict";t.d(s,{r:function(){return d}});var l=t(24246),a=t(27378),n=t(97181),r=t(22583),i=t(85054);let d={[i.Ej.TAXONOMY_WHITE]:"White",[i.Ej.TAXONOMY_RED]:"Red",[i.Ej.TAXONOMY_ORANGE]:"Orange",[i.Ej.TAXONOMY_YELLOW]:"Yellow",[i.Ej.TAXONOMY_GREEN]:"Green",[i.Ej.TAXONOMY_BLUE]:"Blue",[i.Ej.TAXONOMY_PURPLE]:"Purple",[i.Ej.SANDSTONE]:"Sandstone",[i.Ej.MINOS]:"Minos"},o=e=>{let{color:s,...t}=e;return(0,l.jsx)("span",{"aria-hidden":!0,className:"mr-2 inline-block size-4 rounded-lg align-middle",style:{backgroundColor:"var(--fidesui-bg-".concat(r.j[s],")"),border:s===i.Ej.TAXONOMY_WHITE?"1px solid var(--fidesui-neutral-200)":"none",...t.style}})},c=e=>{let s=null==e?void 0:e.value,t=null==e?void 0:e.label;return(0,l.jsxs)("span",{className:"flex items-center",children:[(0,l.jsx)(o,{color:s}),(0,l.jsx)("span",{children:t})]})};s.Z=e=>{let s=Object.values(i.Ej).map(e=>({value:e,label:d[e]})),[t,r]=(0,a.useState)(void 0);return(0,l.jsx)(n.d,{...e,options:s,optionRender:c,layout:"stacked",value:t,onChange:e=>{r(e)},prefix:(0,l.jsx)(o,{color:null!=t?t:i.Ej.TAXONOMY_WHITE,style:{marginBottom:"2px"}})})}},69955:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return J}});var l=t(24246),a=t(20595),n=t(86677),r=t(27378),i=t(25980),d=t(35287),o=t(77830),c=t(58754),u=t(30952),m=t(812),p=t(65450),y=t(34090),g=t(83766),h=t.n(g),x=t(55484),j=t(97181),v=t(40324),f=t(28079),k=t(1315),b=t(92818);let _="all-suggested";var E=e=>{let{options:s,loading:t,name:n,suggestedDataUses:i,...d}=e,[o,c,{setValue:u}]=(0,y.U$)(n),m=!!(c.touched&&c.error),p=(0,r.useMemo)(()=>{let e=[],t=[];return null==s||s.forEach(s=>{i.includes(s.value)?e.push(s):t.push(s)}),{suggested:e,all:t}},[s,i]),g=p.suggested.length?[{label:"Select all suggested",value:_},{label:(0,l.jsxs)(a.vyj,{children:[(0,l.jsx)(a.QMR,{size:14}),(0,l.jsx)("span",{children:"Suggested data uses"})]}),value:"suggested",options:p.suggested},{label:(0,l.jsxs)(a.vyj,{children:[(0,l.jsx)(a.PJP.BBB,{}),(0,l.jsx)("span",{children:"All data uses"})]}),value:"all",options:p.all}]:p.all;return(0,l.jsxs)(a.jqI,{vertical:!0,gap:"small",children:[(0,l.jsx)(a.jqI,{align:"center",children:(0,l.jsx)(v.__,{htmlFor:d.id||n,fontSize:"xs",my:0,mr:1,children:"Data uses"})}),(0,l.jsx)(a.WPr,{options:g,mode:"multiple",placeholder:"Select data uses",allowClear:!0,loading:t,value:o.value,onChange:e=>{e.includes(_)?u(h()([...i,...e.filter(e=>e!==_)])):u(e)},status:m?"error":void 0,virtual:!1,...d}),(0,l.jsx)(v.Bc,{isInvalid:m,message:c.error,fieldName:o.name})]})},S=t(85054);let C=x.Ry().shape({name:x.Z_().required("Name is required").label("Name"),label_color:x.Z_().required("Color is required").label("Color"),systems:x.IX().of(x.Z_()).label("Systems"),data_uses:x.IX().of(x.Z_()).label("Data uses")});var N=e=>{let{selectedSystemKeys:s=[],onSubmit:t,onCancel:n,isSubmitting:i=!1}=e,{data:d=[],isLoading:o}=(0,f.fd)(),{data:c,isLoading:u}=(0,k.K3)(),m=(0,r.useMemo)(()=>d.map(e=>({label:e.name||e.fides_key,value:e.fides_key})),[d]),p=(0,r.useMemo)(()=>{var e;let t=null!==(e=null==c?void 0:c.filter(e=>s.includes(e.fides_key)))&&void 0!==e?e:[];return h()(null==t?void 0:t.flatMap(e=>e.privacy_declarations.map(e=>e.data_use)))},[c,s]),g=(0,r.useMemo)(()=>{var e;return null!==(e=null==c?void 0:c.map(e=>({label:e.name||e.fides_key,value:e.fides_key})))&&void 0!==e?e:[]},[c]),x={name:"",description:"",label_color:S.Ej.TAXONOMY_WHITE,systems:s,data_uses:[],active:!0};return(0,l.jsx)(y.J9,{initialValues:x,validationSchema:C,onSubmit:t,enableReinitialize:!0,children:e=>{let{isValid:s,dirty:t}=e;return(0,l.jsx)(y.l0,{children:(0,l.jsxs)(a.jqI,{vertical:!0,gap:"middle",children:[(0,l.jsx)(a.AntTypography.Title,{level:2,children:"Create system group"}),(0,l.jsx)(v.j0,{name:"name",label:"Name",isRequired:!0,variant:"stacked",placeholder:"Enter system group name"}),(0,l.jsx)(v.Ks,{name:"description",label:"Description",variant:"stacked",placeholder:"Enter system group description",resize:!1}),(0,l.jsx)(j.d,{name:"systems",label:"Systems",mode:"multiple",placeholder:"Select systems",options:g,layout:"stacked",allowClear:!0,loading:u}),(0,l.jsx)(b.Z,{name:"label_color",label:"Color"}),(0,l.jsx)(E,{name:"data_uses",options:m,loading:o,suggestedDataUses:p}),(0,l.jsxs)(a.jqI,{gap:"small",justify:"space-between",className:"pt-4",children:[(0,l.jsx)(a.wpx,{onClick:n,disabled:i,children:"Cancel"}),(0,l.jsx)(a.wpx,{type:"primary",htmlType:"submit",loading:i,disabled:!s||!t||i,"data-testid":"save-btn",children:"Create group"})]})]})})}})},w=t(31793),T=t(31883),O=e=>{let{selectedRowKeys:s,createModalIsOpen:t,setCreateModalIsOpen:n,handleCreateSystemGroup:d,handleBulkAddToGroup:o,groupMenuItems:c}=e,[u,y]=a.Pg3.useMessage(),[g,h]=(0,r.useState)(!1),[x]=(0,p.WP)(),{plus:j}=(0,i.hz)(),{data:v}=(0,w.wv)({page:1,size:100,username:""}),[f]=(0,p.C9)(),k=(0,r.useCallback)(async e=>{let t=await x({data_steward:e,system_keys:s});(0,T.D4)(t)?u.error((0,m.e$)(t.error,"A problem occurred assigning stewards")):u.success("".concat(s.length," systems assigned to ").concat(e," successfully"))},[x,s,u]),b=async()=>{let e=await f(s);(0,T.D4)(e)?u.error((0,m.e$)(e.error,"A problem occurred deleting systems")):u.success("".concat(s.length," systems deleted successfully"))},_=(0,r.useMemo)(()=>{let e=[];return c.length&&j&&e.push(s.length?{key:"add-to-system-group",label:"Add to system group",children:[{key:"new-group",label:"Create new group +",onClick:()=>n(!0)},{type:"divider"},...c.map(e=>({key:e.key,label:e.label,onClick:()=>o(e.key)}))]}:{key:"new-group",label:"Create system group +",onClick:()=>n(!0)}),(null==v?void 0:v.items.length)&&e.push({key:"assign-data-steward",label:"Assign data steward",disabled:!s.length,children:v.items.map(e=>({key:e.username,label:e.username,onClick:()=>k(e.username)}))},{type:"divider"}),e.push({key:"delete",label:"Delete",disabled:!s.length,onClick:()=>{h(!0)}}),e},[c,j,null==v?void 0:v.items,s.length,n,o,k]);return(0,l.jsxs)(l.Fragment,{children:[y,(0,l.jsx)(a.$zI,{open:g,onCancel:()=>h(!1),onOk:b,okText:"Delete",okType:"danger",centered:!0,children:(0,l.jsxs)(a.AntTypography.Paragraph,{children:["Delete ",s.length," systems? This action cannot be undone."]})}),(0,l.jsx)(a.$zI,{open:t,destroyOnHidden:!0,onCancel:()=>n(!1),centered:!0,width:768,footer:null,children:(0,l.jsx)(N,{selectedSystemKeys:s.map(e=>e.toString()),onSubmit:d,onCancel:()=>n(!1)})}),(0,l.jsx)(a.S0p,{trigger:["click"],menu:{items:_},children:(0,l.jsx)(a.wpx,{icon:(0,l.jsx)(a.PJP._ME,{}),children:"Actions"})})]})},A=t(19904),I=t(26070),M=t(3110),P=t(99640),D=t(8125),R=t(16394),z=t(33335),X=t(69353),Y=t(88832),q=t(34929),W=e=>{let{privacyDeclarations:s,...t}=e,{getDataUseDisplayName:a}=(0,q.Z)(),n=s.map(e=>e.data_use).map(e=>({label:a(e),key:e}));return(0,l.jsx)(I.Q,{values:n,...t})},Z=t(56141),B=t.n(Z),L=t(22583);let F="update-system-groups-msg";var G=e=>{let{selectedGroups:s,allGroups:t,system:n,columnState:i,...d}=e,[o,c]=(0,r.useState)(!1),[u,p]=(0,r.useState)(s.map(e=>e.fides_key)),[y,g]=a.Pg3.useMessage(),[h]=(0,k.qQ)(),x=async()=>{if(c(!1),B()(u,s.map(e=>e.fides_key)))return;y.open({key:F,type:"loading",content:"Updating groups for ".concat(n.name,"...")});let e=await h({...n,system_groups:u});(0,T.D4)(e)?y.open({key:F,type:"error",content:(0,m.e$)(e.error,"Failed to update system groups")}):y.open({key:F,type:"success",content:"Groups updated for ".concat(n.name)}),setTimeout(()=>{y.destroy(F)},3e3)};return(0,l.jsxs)(a.jqI,{gap:"small",...d,children:[g,!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.j8w,{onClick:()=>c(!0),addable:!0,"data-testid":"group-add-btn","aria-label":"Add group"}),(0,l.jsx)(I.Q,{values:s.map(e=>e&&{label:e.name,key:e.fides_key,tagProps:{color:e.label_color?"".concat(L.j[e.label_color]):void 0,bordered:!1}}),columnState:i})]}),o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.WPr,{options:t.map(e=>({label:e.name,value:e.fides_key})),mode:"tags",defaultValue:s.map(e=>e.fides_key),defaultOpen:!0,onChange:e=>{p(e)}}),(0,l.jsx)(a.wpx,{icon:(0,l.jsx)(a.PJP.MCw,{}),onClick:x})]})]})},U=()=>{let{data:e}=(0,X.QD)(),s=(0,r.useMemo)(()=>e?e.reduce((e,s)=>({...e,[s.fides_key]:s}),{}):{},[e]),{data:t}=(0,w.wv)({page:1,size:100,username:""}),[d]=(0,p.DW)(),[o]=(0,X.Xz)(),[c]=(0,X.Nr)(),[u,y]=(0,r.useState)(!1),[g,x]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1),[f,k]=(0,r.useState)(!1),[b,_]=(0,r.useState)(null),E=(0,D.o)({pagination:{defaultPageSize:25,pageSizeOptions:[25,50,100]},search:{defaultSearchQuery:""},sorting:{defaultSortKey:Y.E.NAME,defaultSortOrder:"ascend",validColumns:[Y.E.NAME]}}),{columnFilters:C,pageIndex:N,pageSize:O,searchQuery:q,updateSearch:Z,sortKey:B,sortOrder:L}=E,{data:F,isLoading:U,isFetching:$}=(0,p.xF)({page:N,size:O,search:q,sort_by:B,sort_asc:"ascend"===L,show_deleted:!0,...C}),J=(0,r.useMemo)(()=>{var e,s;return{enableSelection:!0,dataSource:null!==(e=null==F?void 0:F.items)&&void 0!==e?e:[],totalRows:null!==(s=null==F?void 0:F.total)&&void 0!==s?s:0,isLoading:U,isFetching:$,getRowKey:e=>e.fides_key,customTableProps:{locale:{emptyText:(0,l.jsx)("div",{children:"No systems found"})}}}},[F,U,$]),{tableProps:Q,selectionProps:H}=(0,D.V)(E,J),{selectedRowKeys:K}=null!=H?H:{},[V,ee]=a.Pg3.useMessage(),{plus:es}=(0,i.hz)(),et=(0,n.useRouter)(),el=(0,A.Tg)([S.Sh.SYSTEM_DELETE]),ea=async e=>{let s=await d(e.fides_key);(0,T.D4)(s)?V.error((0,m.e$)(s.error,"Failed to delete system")):V.success("Successfully deleted system"),k(!1)},en=async e=>{let s={...e,fides_key:(0,z.E)(e.name),active:!0},t=await c(s);if((0,T.D4)(t))V.error((0,m.e$)(t.error));else{var l,a;let e="System group '".concat(t.data.name,"' created");(null===(l=t.data.systems)||void 0===l?void 0:l.length)===1?e+=" with system '".concat(t.data.systems[0],"'"):(null===(a=t.data.systems)||void 0===a?void 0:a.length)&&(e+=" with ".concat(t.data.systems.length," systems")),V.success(e)}v(!1)},er=(0,r.useCallback)(async e=>{var t;if(!K)return;let l=s[e],a=await o({...l,systems:h()([...null!==(t=l.systems)&&void 0!==t?t:[],...K.map(e=>e.toString())])});(0,T.D4)(a)?V.error((0,m.e$)(a.error)):V.success("".concat(null==K?void 0:K.length," systems added to group '").concat(e,"'"))},[s,o,K,V]),ei=(0,r.useMemo)(()=>{var s;return null!==(s=null==e?void 0:e.map(e=>({key:e.fides_key,label:e.name,onClick:()=>er(e.fides_key)})))&&void 0!==s?s:[]},[e,er]);return{tableProps:Q,selectionProps:H,columns:(0,r.useMemo)(()=>{var n;return[{title:"Name",dataIndex:"name",key:Y.E.NAME,render:(e,s)=>(0,l.jsx)(P.Z,{href:"/systems/configure/".concat(s.fides_key),"data-testid":"system-link-".concat(s.fides_key),children:e||s.fides_key}),ellipsis:!0,fixed:"left",sorter:!0,sortOrder:B===Y.E.NAME?L:null},{dataIndex:"system_groups",key:Y.E.SYSTEM_GROUPS,render:(t,a)=>{var n;return(0,l.jsx)(G,{selectedGroups:null!==(n=null==t?void 0:t.map(e=>null==s?void 0:s[e]).filter(e=>!!e))&&void 0!==n?n:[],allGroups:e,system:{...a,system_groups:null!=t?t:[]},columnState:{isWrapped:!0,isExpanded:u},className:"w-96"})},title:"Groups",hidden:!es,menu:{items:M.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?y(!0):"collapse-all"===e.key&&y(!1)}},filters:(0,R.nZ)(null==e?void 0:e.map(e=>e.fides_key),e=>{var t,l;return null!==(l=null===(t=s[e])||void 0===t?void 0:t.name)&&void 0!==l?l:e}),filteredValue:(null==C?void 0:C.system_groups)||null},{title:"Data uses",menu:{items:M.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?x(!0):"collapse-all"===e.key&&x(!1)}},dataIndex:"privacy_declarations",key:Y.E.DATA_USES,render:e=>(0,l.jsx)(W,{privacyDeclarations:e,columnState:{isWrapped:!0,isExpanded:g}})},{title:"Data stewards",dataIndex:"data_stewards",key:Y.E.DATA_STEWARDS,render:e=>(0,l.jsx)(I.v,{values:null!=e?e:[],valueSuffix:"users"}),filters:(0,R.nZ)(null==t?void 0:null===(n=t.items)||void 0===n?void 0:n.map(e=>e.username)),filteredValue:(null==C?void 0:C.data_stewards)||null},{title:"Description",dataIndex:"description",key:Y.E.DESCRIPTION,render:e=>(0,l.jsx)("div",{className:"max-w-96",children:(0,l.jsx)(a.AntTypography.Text,{ellipsis:{tooltip:e},children:e})}),ellipsis:!0},{title:"Actions",key:Y.E.ACTIONS,render:(e,s)=>(0,l.jsx)(a.kCb,{justify:"end",children:(0,l.jsx)(a.S0p,{trigger:["click"],menu:{items:[{key:"edit",label:"Edit",icon:(0,l.jsx)(a.PJP.I8b,{}),onClick:()=>et.push("/systems/configure/".concat(s.fides_key))},...el?[{key:"delete",label:"Delete",icon:(0,l.jsx)(a.PJP.ZNm,{}),onClick:()=>{_(s),k(!0)}}]:[]]},children:(0,l.jsx)(a.wpx,{size:"small",icon:(0,l.jsx)(a.PJP.r43,{}),"aria-label":"More actions",type:"text","data-testid":"system-actions-menu"})})}),fixed:"right"}]},[B,L,es,e,null==C?void 0:C.system_groups,null==C?void 0:C.data_stewards,null==t?void 0:t.items,u,s,g,el,et]),searchQuery:q,updateSearch:Z,columnFilters:C,pageIndex:N,pageSize:O,createModalIsOpen:j,setCreateModalIsOpen:v,deleteModalIsOpen:f,setDeleteModalIsOpen:k,setSelectedSystemForDelete:_,handleCreateSystemGroup:en,handleDelete:ea,handleBulkAddToGroup:er,messageContext:ee,groupMenuItems:ei,selectedSystemForDelete:b}},$=()=>{var e,s;let{tableProps:t,selectionProps:n,columns:r,searchQuery:i,updateSearch:d,createModalIsOpen:o,setCreateModalIsOpen:c,deleteModalIsOpen:m,setDeleteModalIsOpen:p,handleDelete:y,handleCreateSystemGroup:g,handleBulkAddToGroup:h,messageContext:x,groupMenuItems:j,selectedSystemForDelete:v}=U();return(0,l.jsxs)(l.Fragment,{children:[x,(0,l.jsxs)(a.jqI,{justify:"space-between",className:"mb-4",children:[(0,l.jsx)(u.f,{value:i,onChange:d,"data-testid":"system-search"}),(0,l.jsxs)(a.jqI,{gap:"small",children:[(0,l.jsx)(O,{selectedRowKeys:null!==(e=null==n?void 0:n.selectedRowKeys)&&void 0!==e?e:[],createModalIsOpen:o,setCreateModalIsOpen:c,handleCreateSystemGroup:g,handleBulkAddToGroup:h,groupMenuItems:j}),(0,l.jsx)(a.$zI,{open:m,onCancel:()=>p(!1),onOk:()=>!!v&&y(v),okText:"Delete",okType:"danger",cancelText:"Cancel",centered:!0,children:(0,l.jsxs)(a.AntTypography.Paragraph,{children:["Are you sure you want to delete"," ",null!==(s=null==v?void 0:v.name)&&void 0!==s?s:null==v?void 0:v.fides_key,"? This action cannot be undone."]})})]})]}),(0,l.jsx)(a.V5H,{...t,columns:r,rowSelection:n})]})},J=()=>{let e=(0,n.useRouter)(),{dictionaryService:s}=(0,i.hz)();return(0,l.jsx)(d.Z,{title:"System inventory",children:(0,l.jsxs)(a.xuv,{"data-testid":"system-management",children:[(0,l.jsxs)(c.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems"}],children:[s&&(0,l.jsx)(a.S0p,{trigger:["click"],menu:{items:[{label:"Create new system",key:"add-system",onClick:()=>e.push(o.N5)},{label:"Add multiple systems",key:"add-multiple-systems",onClick:()=>e.push(o.bJ)}]},children:(0,l.jsx)(a.wpx,{type:"primary","data-testid":"add-system-btn",icon:(0,l.jsx)(a.PJP._ME,{}),className:"absolute right-8 top-8",children:"Add system"})}),!s&&(0,l.jsx)(a.wpx,{type:"primary","data-testid":"add-system-btn",onClick:()=>e.push(o.N5),children:"Add new system"})]}),(0,l.jsx)($,{})]})})}},31883:function(e,s,t){"use strict";t.d(s,{Bw:function(){return l.Bw},D4:function(){return l.D4}});var l=t(19043)}},function(e){e.O(0,[431,8765,9278,5163,1896,7245,9965,2888,9774,179],function(){return e(e.s=90988)}),_N_E=e.O()}]);